From nobody Mon May 20 04:04:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjP820b7sz5LhKB; Mon, 20 May 2024 04:04: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 4VjP815qzKz4BNl; Mon, 20 May 2024 04:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5FWSOLQ6u8siNOge4Zr4KqIN8v4/HVTzUr8kin8kMs=; b=e0K29B0LpdBTCTrrgsnLKvxHldrdZYRK7NJeODsYiBurPvY19E3MYux0f+f0F/0mkAmr6H Ta5pl3OV+alNQi4CU75dx9IMbHQYn33VM3+jn2bJShg3AIAhYmz69XdDs/YVIZyhqi4a3w 0vFNbcMMVpG/SraJqPcCcfcV5uwd4dNyIM9nwUDgBwVFZRng6CROZQFzHFlKuS8FSsVQAE sS9WNXthdDKISXXLEjY3fzbFA1tnPhV+TzjovZI4NkpABpP3oshDxJP3QGvYmxg2Mcpvqc SGeybMtb3+q+jex7I2ZpJosBF7li2r9M01kAhpF/eIMutGMNOLamtDs2TSlD5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716177841; a=rsa-sha256; cv=none; b=SyRw7JEgM8K2gPCh9+XvLjv6s/3R/JQgq9wSL69+uFYf8ZDNs4bVmUrH4FCwF8fQKE9tNv 955hfvYsLhI28C2nyC/rurekkaNRWKlMRSHKNzsKK3ZeIMtSUrsXiTirfW8F5f/uIwfb8U tycYFNxjcwVPgkvUE/3GXkg4ejznGMvAfsTb9E4bu1aCf6/Otj1oVlu5nm1ghmjDQcStTG 3tqotO0+dD5oBTIIIUpaTamVK2W0EctsL4kLIjIYy0m5tEYwsndWGWleFhdSXzg8Otdn6l Pmf8InXjJlNQNjt8tBxpqEqOZ+h49T8fa0ym+VIKDuQKnXRdWvJacW8bWzlUjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5FWSOLQ6u8siNOge4Zr4KqIN8v4/HVTzUr8kin8kMs=; b=ftDRvS8Xfrym0ZxJNxvFRlvNcyCOc2cC4FVY2nBIwJMEbnQUVLD8n6tCiikJanjWn+hyTT wzTwvJL7YtrSe0yZOLFlWbRMaVf2U1hBYdc+ZVQnS7KGp4Mb1La0AS9uknbj/DC2szoLS9 JzgOXf7E4+D2KX5jk8/AUpZoMfDyk5qGkYrAOsByxSi4bJKWb0HVUxySAWHmcGS5ouaS26 KiD8FjdjgAkcof1zmdHalBDIgDjmchBG+kvXeOA/DSRqHzmrtL+9rKyJV4wOCWKVZuimgo g94p0x9y2OA4rQCHClzE27fsqlgLfpSxTN6kS4yA+hIGXxBRIxca5mSEVBXrtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjP814rnPzNHD; Mon, 20 May 2024 04:04:01 +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 44K441XT080253; Mon, 20 May 2024 04:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K441cq080250; Mon, 20 May 2024 04:04:01 GMT (envelope-from git) Date: Mon, 20 May 2024 04:04:01 GMT Message-Id: <202405200404.44K441cq080250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 92f2a4c820fe - main - compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92f2a4c820fea9efcb6ee6a7029495c8152958c1 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=92f2a4c820fea9efcb6ee6a7029495c8152958c1 commit 92f2a4c820fea9efcb6ee6a7029495c8152958c1 Author: Zhenlei Huang AuthorDate: 2024-05-20 04:02:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-20 04:02:32 +0000 compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname() This local variable s is for iterating characters of global variable `version`. The content of `version` is not going to be altered by function freebsd4_uname(). MFC after: 1 week --- sys/kern/kern_xxx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index 46155cf6a73e..fb76d420df7c 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -315,7 +315,8 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) { int name[2], error; size_t len; - char *s, *us; + const char *s; + char *us; name[0] = CTL_KERN; name[1] = KERN_OSTYPE; From nobody Mon May 20 04:04:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjP82745Mz5Lh84; Mon, 20 May 2024 04:04: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 4VjP826KRpz4Bnt; Mon, 20 May 2024 04:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIle0se6l54NXswkCt0biVsZva0j6lvggLD71a8MMBE=; b=KTTNTejCY4iA8EtYzmQE1oAucGPbnSU0TxJftInRJtnYq0cwMmUMeKFduD/MsySKKO09K2 7TaDT6XpJ4j+3SqLe+PSvhU0eGx03/1RxI9OdoBeae/0flF1tIv1K71dYfbhWrN1sVJ9C8 gWHYSBvxCV3Jx0h/qmwlBKdk4DDxltypRPtxJJIlwLdtlmBMJHadO0yKBzs9O3mhjQXSoC HchUEQgrjL6Vh/gF0Rmz9aJ9SyiGJBg7d0aXHvq5Ep0/ei0dPA+A9uQfM0rE/cT6WPA9z5 t8lGqQYBO4ltRBNMi1ENiQaVD2uNTzdT4XSuJtWHntNAx6sHoB1AqZFDzSaeLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716177842; a=rsa-sha256; cv=none; b=JcLT+9POubykTUwLgqF5sP5qjrqiUskSq/6idOhvOEsXUyo1xRsbgSss/p6Rrr+ZMPToZ2 14BNslaz9aMUZUAvvqvPgmQLcu1Zt3lzKMtELSZkIH7T/Q56NgsfiOyp68wUdhf3KUIvW6 mepT6xHMXF47smM3MOvTLsg64+uapddOOvkalEWH4Fopd9Au+6YfQP3exlcH5xwzHRksxF nggl2vVNezezSRGBcT8vOJXsb0NK0fmheycqcngrMiFaxzXu8vGKUUuxQpYOOviE+SC2QP biVXn39CoR7kFuNuuOFXWcZWFIiKrnHtAtJ2cRbcySos80mCewvloPTITse3cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIle0se6l54NXswkCt0biVsZva0j6lvggLD71a8MMBE=; b=Dnp3jvEdkqJ+DFeLE3QIgnkKcfIlQpS+lAK2ns4YOnm7CaPYgJee9P13esHRmHWqM/gnns 6li0l/whXTqiE1DDJ7drewGzCSF4WXKXJSzxgpznUnPuwl1e//JQaTFKdPDQQU3rl+PmeQ zPT1EKdRcCKAG7jfDaDdqljLZzBNZSMtk2pxKFoTtFbnACap8LCHue6GPv+rvjZcxGJ07v 0fWG5RAIlUUbT+R5Eisk7onkutlADCvT/jJogNA+rn+wywpa4M8bmm51Fs9Fsg7ajKWdZq yT752go3IkNOQBcnbxr++oD4eOQRH0WdTslzJQMNh1idGHcwiqJ4Ut1koTrLxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjP825wbCzNDb; Mon, 20 May 2024 04:04: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 44K442At080315; Mon, 20 May 2024 04:04:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K442BH080312; Mon, 20 May 2024 04:04:02 GMT (envelope-from git) Date: Mon, 20 May 2024 04:04:02 GMT Message-Id: <202405200404.44K442BH080312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 68c890b4433d - main - linux(4): Add const qualifier to the value parameter of function handle_string() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68c890b4433d3655c7df91cc43f89f4d6a8b35e4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=68c890b4433d3655c7df91cc43f89f4d6a8b35e4 commit 68c890b4433d3655c7df91cc43f89f4d6a8b35e4 Author: Zhenlei Huang AuthorDate: 2024-05-20 04:02:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-20 04:02:33 +0000 linux(4): Add const qualifier to the value parameter of function handle_string() The content that `value` point to is not going to be altered by function handle_string(). MFC after: 1 week --- sys/compat/linux/linux_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c index 65c64a7ba563..97341c051af7 100644 --- a/sys/compat/linux/linux_sysctl.c +++ b/sys/compat/linux/linux_sysctl.c @@ -74,7 +74,7 @@ LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, unsupported_sysctl, "char *"); #ifdef LINUX_LEGACY_SYSCALLS static int -handle_string(struct l___sysctl_args *la, char *value) +handle_string(struct l___sysctl_args *la, const char *value) { int error; From nobody Mon May 20 04:08:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFF70Jkz5LhH9; Mon, 20 May 2024 04:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFF6Fblz4CpB; Mon, 20 May 2024 04:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DI6nN52cr09OdW82vCXN1gT6cIksfPDnf2g+job65W8=; b=rzBc/NaY1CDCB2rHxDNJYn4LSIjL1LCPC6d5LJB+PmNqx7LVBsCoSBfRyGQk//0pSpgo7S jb7NyBL7aYXj9H1LhWMWXvaeiivMWczEwxr8cWpRpD/rIRsu1ZJxSImY/NkwIERn2Gi+Ql 2ZOP9yAlACFPfzdEDWSx5C20Sz8ilTS8+iGQXOrmZ7EDuUPS8CqgMna6OiD7IH9l3Pf1or iUIjLsfW2GAHMEw5AA0AxQkv5N06XjUtylxLszDTDtnIfZpL8C6D7XaIvJmTO2pxgreT6l YRyE5BkZCt0dX2UKPN8faRT8Je7jI9Prue1MQ21bChOXXA2gJNXIFgE73pUgFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178113; a=rsa-sha256; cv=none; b=yAFiX2CODov2XmJ8PzibTbrEwLF0dCtnB5G/iZgOdV/lxDQPo5wJhb79C+slkVlYIFXhml 52XeMlLXyf4UkiabTWvIj2IymH059nlCj3kzop6IIhSwpMf7y0iTCzN+1DTUqBibLHmCs7 HP3dLjZ8NFc+IfXtjvKL6vpmSAbUEW6ZEhbk3zIuZwAYRMhy9hQEBTN4DLjf9kPi7IyvEA OKZLBk/Y1ri93RNeqPstoGcI54JAiSGSNUTrvCHqCGPh2pG9pd5+KoULP68zrLRzOUBlcM W8PwggElx/HeuiDJgBeDcqxn3tEt1tKGPiSvl5JkSL/ddQvWsa9A3EXxPtG/6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DI6nN52cr09OdW82vCXN1gT6cIksfPDnf2g+job65W8=; b=sVVHgrd7XoQVpESPs6LlhVf0Ocvq0cpJuZhK4kPVm54FzCeUxocfWUNa67es4e5lt10l6e /GguQp4IxNqsF5kesSlCjkIPwO70eQXWdmO9MzPkkDslVtjXwdo+JsSxPS36pxRhufSZMU wn37dIYvX1TXgXiQsjxkZAbwh9rDrco+CMl0CSFsftTvPDRfvpT757XdoECk2TFMsCrRBa NypKGvwvPX79p0J9mRZQAlr/qg/ct8Nve7PhuPH+4yi6BnK0vWKifIWxDNrdIihiI/9OoQ d2a+nDSIMbA/j80G0t6DBmKIzc5iJmW4WZUXCFwk9suRboDq9dZSgGuUl3MZaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFF5rZwzNbh; Mon, 20 May 2024 04:08:33 +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 44K48Xv9081049; Mon, 20 May 2024 04:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48XEa081046; Mon, 20 May 2024 04:08:33 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:33 GMT Message-Id: <202405200408.44K48XEa081046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1d7bdae9ca3c - main - kboot: Move console, acpi and smbios init List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d7bdae9ca3ca821e93386d85e87de491471cad7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d7bdae9ca3ca821e93386d85e87de491471cad7 commit 1d7bdae9ca3ca821e93386d85e87de491471cad7 Author: Warner Losh AuthorDate: 2024-05-19 16:41:52 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:40 +0000 kboot: Move console, acpi and smbios init Move the console probing to as early as possible. There's no real support for anything but hostcons, and setting it up early will show other error messages. ACPI and SMBIOS probing can be done just after we have the console, so move it there. This allows other parts of the early code to use info from that, as well as overriding and env vars set by these things on the command line (smbios data may be wrong during initial development phases as the automated way to populate per-board data may not be established, etc). Sponsored by: Netflix --- stand/kboot/kboot/main.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c index e57446baa47d..ed5cad450000 100644 --- a/stand/kboot/kboot/main.c +++ b/stand/kboot/kboot/main.c @@ -342,16 +342,23 @@ main(int argc, const char **argv) heapbase = host_getmem(heapsize); setheap(heapbase, heapbase + heapsize); + /* + * Set up console so we get error messages. + */ + cons_probe(); + + /* + * Find acpi and smbios, if they exists. This allows command line and + * later scripts to override if necessary. + */ + find_acpi(); + find_smbios(); + /* Parse the command line args -- ignoring for now the console selection */ parse_args(argc, argv); parse_file("host:/kboot.conf"); - /* - * Set up console. - */ - cons_probe(); - /* Initialize all the devices */ devinit(); @@ -394,13 +401,6 @@ main(int argc, const char **argv) memory_limits(); enumerate_memory_arch(); - /* - * Find acpi, if it exists - */ - find_acpi(); - - find_smbios(); - interact(); /* doesn't return */ return (0); From nobody Mon May 20 04:08:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFH256gz5LhG1; Mon, 20 May 2024 04:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFH0Dsjz4ClW; Mon, 20 May 2024 04:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P+gaWZu9nIV2fCRR4XJou4su42oPaYW3F+0tiexcdac=; b=KzBN0jhhyrr8D5gYC784vUFXqYLBXO8/+VI1GqkNRwSbzMkmQqMnZlxrO3UWSmbfmjS9+k lsGtlvvu7PCvzmltPkV2bxGnphghNme7RlqEMfbYQCSVx27e+q6CECQHezPQLnqXTaEyLx o1xeMSIWOQWt1nCxcf1I+EAMHjYybcX6BbGHfSG8egVlJjpySGag5F7Zm/nP/ZPWP4/B8B qHmUKm9b9kkmIYayDsBK0OQPKDFxL0Zac6qj3mwaPL7Gs6osAo8UNF/z99XGRjYeYHvQtL rErgwCmK8gqG9+tSabFFmw1hP97lLAcDjmSa3Ovwy0pfbmNBOkI6tRzaUZVS0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178115; a=rsa-sha256; cv=none; b=XmAccClcqMm6OCukjU3rLyrKOrz5xHYshy+oqKdoWVpcF/+7hx5cL5TjeccDFQwdV1n1qk ZE0taAQuRKqKhVmebCxct4Yfgnz1oAaiKdHC1wbMaAtRzCKknhbHw+SQpKj+tnTSdieH/1 Wcpj3Je19V6mV0QGfqKcGX14Xpv/z+yI3QzeHn8o8lvB4B/CmbtQOfdVrZX2ROD9X66fxj 6EppqdknSRkK9O3LKMZ8juXqNuYMXJtNkgXBekR/NxoUGpe6+VmpWpZyRc+fLkFH4Iwhzk 5M4rdIsd8vSby8d83B3EiKOljWzyH/5Z3rc01h+Woolq96TLowNvmmTrWKHXQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P+gaWZu9nIV2fCRR4XJou4su42oPaYW3F+0tiexcdac=; b=h5dJiiSs2VT4Y9BUmwCVbiECqqwMQRi7OZcQj+ffKViyZ/ScLn8JXsx/8di5uSJ5J76hKP 4TB1Qguw34MBNf8dZEmScH3hDGTHbFLzPzbzme0+eeLkhdfWUsh74pOj4aq0U097JfPV4O Rvk3JaUrXkv8l8nXSRFM/QC2dJVmTF4s76xeh+OT3yJlhsI2VFbPE5CGiDzaTMKGZ4+Kbn d0vL7fjmqwtvdDoyKpNW2PgJoWjaAZQOiy76wXsPjy8ehf/xO0FDVpA845WWMN0gUlLRm+ 0IQxXQFzBEId0y+6f51V1tn27YsrgTGFuDvyXEJzviYvrJ23SrI6l1h7O5a2qQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFG6y0hzNHH; Mon, 20 May 2024 04:08:34 +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 44K48YXJ081098; Mon, 20 May 2024 04:08:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48Yaa081095; Mon, 20 May 2024 04:08:34 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:34 GMT Message-Id: <202405200408.44K48Yaa081095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 68344c9c6c69 - main - loader: separate lang init from scripting init List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68344c9c6c69fc604b402eee420285356f7a677f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=68344c9c6c69fc604b402eee420285356f7a677f commit 68344c9c6c69fc604b402eee420285356f7a677f Author: Warner Losh AuthorDate: 2024-05-19 17:48:14 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:40 +0000 loader: separate lang init from scripting init Create interp_preinit() to initialize the scripting language to run scripts. Make sure you can call it multiple times, but only the first one has effect, After it's call, you can run scripts in the scripting language. At the moment, no functional change. Sponsored by: Netflix --- stand/common/bootstrap.h | 3 ++- stand/common/interp.c | 1 + stand/common/interp_forth.c | 13 +++++++++++-- stand/common/interp_lua.c | 23 +++++++++++++++++++++-- stand/common/interp_simple.c | 5 +++++ 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index b7d6e538f9be..79ce0b023b7a 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -54,7 +54,8 @@ bool interp_has_builtin_cmd(const char *cmd); /* Called by interp.c for interp_*.c embedded interpreters */ int interp_include(const char *); /* Execute commands from filename */ -void interp_init(void); /* Initialize interpreater */ +void interp_preinit(void); /* Initialize interpreater execution engine */ +void interp_init(void); /* Initialize interpreater and run main script */ int interp_run(const char *); /* Run a single command */ /* interp_backslash.c */ diff --git a/stand/common/interp.c b/stand/common/interp.c index c6ac01ea099b..5d20822e037d 100644 --- a/stand/common/interp.c +++ b/stand/common/interp.c @@ -60,6 +60,7 @@ interact(void) * we need to switch interpreters. */ interp_identifier = bootprog_interp; + interp_preinit(); interp_init(); printf("\n"); diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c index 854addb22d5c..388a20e319b3 100644 --- a/stand/common/interp_forth.c +++ b/stand/common/interp_forth.c @@ -337,12 +337,21 @@ bf_run(const char *line) return (result); } +static bool preinit_run = false; + void -interp_init(void) +interp_preinit(void) { - + if (preinit_run) + return; setenv("script.lang", "forth", 1); bf_init(); + preinit_run = true; +} + +void +interp_init(void) +{ /* Read our default configuration. */ interp_include("/boot/loader.rc"); } diff --git a/stand/common/interp_lua.c b/stand/common/interp_lua.c index aa759aa99ec1..2a61bb9d04af 100644 --- a/stand/common/interp_lua.c +++ b/stand/common/interp_lua.c @@ -96,17 +96,21 @@ static const luaL_Reg loadedlibs[] = { {NULL, NULL} }; +static bool preinit_done = false; + void -interp_init(void) +interp_preinit(void) { lua_State *luap; struct interp_lua_softc *softc = &lua_softc; - const char *filename; const luaL_Reg *lib; lua_init_md_t **fnpp; TSENTER(); + if (preinit_done) + return; + setenv("script.lang", "lua", 1); LDBG("creating context"); @@ -126,6 +130,21 @@ interp_init(void) LUA_FOREACH_SET(fnpp) (*fnpp)(luap); + preinit_done = true; + + TSEXIT(); +} + +void +interp_init(void) +{ + lua_State *luap; + struct interp_lua_softc *softc = &lua_softc; + const char *filename; + + TSENTER(); + + luap = softc->luap; filename = getenv("loader_lua"); if (filename == NULL) filename = LOADER_LUA; diff --git a/stand/common/interp_simple.c b/stand/common/interp_simple.c index d675da0aa61e..437739a3bcc4 100644 --- a/stand/common/interp_simple.c +++ b/stand/common/interp_simple.c @@ -34,6 +34,11 @@ INTERP_DEFINE("simp"); +void +interp_preinit(void) +{ +} + void interp_init(void) { From nobody Mon May 20 04:08:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFJ61LWz5LhC2; Mon, 20 May 2024 04:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFJ0pZ0z4CtG; Mon, 20 May 2024 04:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sgjtmUhDr6VgrkcT0oweZuL6QVyOJA6b6zKoaDFmgtk=; b=WUcqii5j+eKMdMC07NlkhMcIlIFfq/+XPwQGita3udFQMdIH6GTqaYT+nePZjeqeesuSd8 ycg/NfchRrMS3q5cUYq6TU9H3i21j67pRBexBMa/7mQmFh+2722mSd6J+OLHlnTIqkuXv6 DJtkIapPbeDjWRB0txmIDMIxkmwmYS+0szH62etaV0W4VKv3aAGncmVFeoVRLHuPm9JbV0 tjkaGJyweX8cjSazNTH8SbpNu3SmJLW62+5Gf43wrPnOoyx9Jh9lDQLstNHOmxyrCFrOt5 3kzhzrRyYN5y56KXRtjcEg/yB6siOCUrdv4hbccfzPb8SokxmKtCCcofymZAwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178116; a=rsa-sha256; cv=none; b=WEJpRc0eETIbwKkbO19IfYPLPS+PhLZNEG8/bkCmOXaIntzQkfWrAQJDJY4ECdd6s4dOdg AFjd7d2F2h5jAXudQVqXpcS0DC/Uoc36UPFrB6nDfNVTSCYUbXsrvjckFcJcarvndFrbAW m2D5ystAAZxP96wpI1iveRU67LqK4Zdc2tENDx/eV2vdy69cmtdxHp0LONHSSMizfErtA/ TMjHEE/Yf/9AbfUa93ZfIer/U38XRqA8ftrqmdWaCG9fpmHY5gp9J+w+1lwFBsABdft/NF 9IrdbWLNo41ndHLBm7fzqjtEwJbXc0MZejJTig4MbBXQzfUXs9sy1ngvEz5YWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sgjtmUhDr6VgrkcT0oweZuL6QVyOJA6b6zKoaDFmgtk=; b=qA/8vDj39TJxi5H8ir/ZKHJZbEzyTHzcsBFkv6jC9Xs/CAhwENRJzEbgmFnHeks7OEVCK6 fpNHGcQ5pmlit1KxlfUFmDVBdWsL31WFCdjWLqB8fpBdE75DciFUaqStOSjtso0d9P+TSa NAgV+g7Rts6MDrAO4E1H7kUSkpxKPaIEg1ydOx1bX2FDpkm8jXP3IwaK0RrdnYp9C6J6Ju op3qRtd0gN5pqm1FWa382PA8GT4Kn5KSWGxRLMryZ1bD82gsI4TZ0C97Xv2AfIF3zAtamx 10XP9lokndG64fkl2j9r1fO3/Qu6drr6+pxgK4QjygyNGRasv5f6ob429C++RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFJ0Qt5zNHJ; Mon, 20 May 2024 04:08:36 +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 44K48aJc081155; Mon, 20 May 2024 04:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48ZVH081152; Mon, 20 May 2024 04:08:35 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:35 GMT Message-Id: <202405200408.44K48ZVH081152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0111f09ca670 - main - kboot: Initialize hostfs_root sooner (and remove kboot.conf) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0111f09ca67070271e43655db2e4989cf2d64f88 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0111f09ca67070271e43655db2e4989cf2d64f88 commit 0111f09ca67070271e43655db2e4989cf2d64f88 Author: Warner Losh AuthorDate: 2024-05-19 17:05:48 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 kboot: Initialize hostfs_root sooner (and remove kboot.conf) Move the initialization of hostfs_root to be a bit sooner. While it doesn't matter for the default case, we may want to use hostfs files sooner. Also, while we're here, remove kboot.conf. It duplicates the command line and has proven difficult to use. It will be replaced by an early script that can influence the state of the boot loader before we select a device to boot from (including strongly suggesting which one to boot from). Sponsored by: Netflix --- stand/kboot/kboot/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c index ed5cad450000..994df1ec9fa1 100644 --- a/stand/kboot/kboot/main.c +++ b/stand/kboot/kboot/main.c @@ -357,17 +357,17 @@ main(int argc, const char **argv) /* Parse the command line args -- ignoring for now the console selection */ parse_args(argc, argv); - parse_file("host:/kboot.conf"); + hostfs_root = getenv("hostfs_root"); + if (hostfs_root == NULL) + hostfs_root = "/"; /* Initialize all the devices */ devinit(); + /* Figure out where we're booting from */ bootdev = getenv("bootdev"); if (bootdev == NULL) bootdev = hostdisk_gen_probe(); - hostfs_root = getenv("hostfs_root"); - if (hostfs_root == NULL) - hostfs_root = "/"; #if defined(LOADER_ZFS_SUPPORT) if (bootdev == NULL || strcmp(bootdev, "zfs:") == 0) { /* From nobody Mon May 20 04:08:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFK4QWbz5LhT1; Mon, 20 May 2024 04:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFK1s9Cz4Ccc; Mon, 20 May 2024 04:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jCRt0RqzQxofSGaFHaZAd0xGEa3LEHIX4OEhtihoebI=; b=La3LhFj3zPQ7IQOO7fYV/bGdo6VawsHvukdngmpaOWqyreU0+uWaKKX/NdUo7n490Jci3V eT7thVooXFosNEt8MDiSrNIWByMbh4uV28qbHEwAgqTh36xI8iyg7N8OXVjkFu1hEeP+8z PoKdbBAaV6fM7QrhFcRGS4kT7ntcgf4jwATDN8AWQspOweBJnnb7eL8NB0LoHRkKS4RlKf R3kt9Bo9K/3zCf+c0sRINCwE84+M/c5X9p/8AXhTiNXREQgePU+BXwRxzPWlgZ2ZMyRjY6 fngGW6a9QVoIwvqUepDN/ZEQvkS5/YGP+x5EGCeD5HJCYhdKMr3SN30iP1Pr6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178117; a=rsa-sha256; cv=none; b=PAU55xAGmMlrgo6wm1EjyZ6Gcv7+e6YsCP4t37iqCfDAz3J/z2teqfH1JJjalZ9RImgnWz dBg91EeuANS+tHEx95wuA3p5e5hjCKomGTCZWlgdqADLW/Jn1uYXZRWK0s0tXBq2hL/MxN vOxIx3ResfZLkf/phH9pr7J0zxcYf4cLBhfxLJObtU+rCUQt/hFWQ06fAqf2vSXzMrCSJC u5thMH6pa8NgSpxnDfyszw6YNXtqzuu1x45txLWgSPE6NSzXRYu7vEYDJt7uZyjflim300 RW5T8HEHmt2wispvEbimCQvx/YFlHvQNxsFY/D10WiPGbAeiTSY0mUEjjw9rGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jCRt0RqzQxofSGaFHaZAd0xGEa3LEHIX4OEhtihoebI=; b=Na8cWrSRMprlNRlkW3lDahrxD4HTfHRwRY8e3v8DbLDEC2B9OnAuG3iLDq/mIR1hZMIXGq +1CGl1lc4MulwYOzXl2nD1BL2v0SA1n+nM3DdGlLx1envKOVhMUyjmYvHjFQ6M0gFPuIUP 5a3WJR2fRx/hK2eXpypSSle4uzne1DsmKpVVchNBdqlxPavyL+Mh1sxw0MAfYf6UaPzifX RBEHdqM89l+x4y5MVs7qh1YnzgJyHi5q126i41Q14lwKcc2h6kYRm8+SqOY4n5+qdNX6sS tw7MXlhac9BtjwS2Hbm+r3GzTJErxhIWtD1dhHmx4u8eXrxPo4IpE7JTB/Vc4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFK1TCKzNbj; Mon, 20 May 2024 04:08:37 +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 44K48bWC081200; Mon, 20 May 2024 04:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48boO081197; Mon, 20 May 2024 04:08:37 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:37 GMT Message-Id: <202405200408.44K48boO081197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f989ebd4dea2 - main - kboot: Use C99 initialiers for hostconsole. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f989ebd4dea2ad45f3dd491d86f821a524a0360f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f989ebd4dea2ad45f3dd491d86f821a524a0360f commit f989ebd4dea2ad45f3dd491d86f821a524a0360f Author: Warner Losh AuthorDate: 2024-05-19 20:47:20 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 kboot: Use C99 initialiers for hostconsole. Sponsored by: Netflix --- stand/kboot/kboot/hostcons.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/kboot/kboot/hostcons.c b/stand/kboot/kboot/hostcons.c index 114188adcff2..9c09a2721891 100644 --- a/stand/kboot/kboot/hostcons.c +++ b/stand/kboot/kboot/hostcons.c @@ -35,14 +35,13 @@ static int hostcons_getchar(void); static int hostcons_poll(void); struct console hostconsole = { - "host", - "Host Console", - 0, - hostcons_probe, - hostcons_init, - hostcons_putchar, - hostcons_getchar, - hostcons_poll, + .c_name = "host", + .c_desc = "Host Console", + .c_probe = hostcons_probe, + .c_init = hostcons_init, + .c_out = hostcons_putchar, + .c_in = hostcons_getchar, + .c_ready = hostcons_poll, }; static struct host_termios old_settings; From nobody Mon May 20 04:08:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFL4Vpgz5LhC3; Mon, 20 May 2024 04:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFL2sMXz4Cpm; Mon, 20 May 2024 04:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IB75wKn5wCg8i8ZcuRvahzM3svpEnCt89MPNYRtBmgQ=; b=kGE/dyGFtM5VKY1WOdsqkOflYv0VDMhZ16CabXcG2v6m/qXWEUmjwT7NM+8/NnjLrMwjGh KHBJs2xSC7zAyO1JbAf4EK6OKXKlA3bhXHWou0tFTAnJVNznnYbjBD6uJUBqGx2AqAE4wU owL9BNqUA0+/cH+HhQrccQ13kyt7JlNCWPfpEUEnCxBGjbKCih2MLKBYouRfz9xBho/kBV ewRsyMjaZCf/6PfcephTBrJELeCtkvkXFaOyCA+HaQlbVU12rU0a6Xu5T2QfqqnhOF3vS6 DM5N+eDCpwfH2j5wF76yVk5YzVcadujVZdDC/pEaBd4Uf3e/D3+fJovEmRCH5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178118; a=rsa-sha256; cv=none; b=A1J6f1YaOFuZizFl/Akr6s0kbfUeDTXXwfFnclITDFVxFt3DSVJmaf/BWnM3XkMnt8d5Fy hmEdDO1nrr4S7XneKrq9WM3A0F1HdgA0qeDZzAyfGYd9LYTNbMwnuuXDKtylz5B7jWup68 ouZjpuJOI7FrvMqjdMyI4gYbyyzo8xiwpSLG7eGSAXZV7jii7PBh9Qh63dwM+eGLQyZErg zW8eHFCLdqSz6965zpSa2n/Ms+MaauVihmEDz0VMUj23/KTllL7ik2JcfyQivm2DZI02Hf bxf+ZiHOlFmRat5/Pjf7hHblHJmpgpadQij315vyjTlQFdpqM550ioRFJmFtbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IB75wKn5wCg8i8ZcuRvahzM3svpEnCt89MPNYRtBmgQ=; b=wZ1Prii6ZAo0YJC5Q6MBuWdQSNv7Z1LwA3kggnDiJivx/2A/SEbAeIgg/p6wS5JkywX0wk 6wGmtFdU09XMZE872ry7gf/S2+T5m8SrXfj8YZg/cHw91inreHnJXM70dBplwhZi9uKM0h 6I52Ex9xV3Ig8NuAmvJUAFUDSTR0vtAlafQZa6dPGcjkWthFw/gDTcELtowiEpPIuAWwSO PDA5+mlZHhUqd4TOOjQ1Y9aLkFhp3geXMpy5ZxzSNS6e+rYZ6XSD/DBY2WvJqNJtCn9wQA 2LaEPln7XorNoMWvyekAprFIBNaQxUBTBcrBSKLoL4BQXIBnfv9XKSCRQMZAhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFL2Rt4zNDd; Mon, 20 May 2024 04:08:38 +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 44K48cVK081245; Mon, 20 May 2024 04:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48cix081242; Mon, 20 May 2024 04:08:38 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:38 GMT Message-Id: <202405200408.44K48cix081242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a578e2b896d9 - main - boot/i386: Use C99 initializer for textvidc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a578e2b896d9e6803a830c99fb486fa60ceac33f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a578e2b896d9e6803a830c99fb486fa60ceac33f commit a578e2b896d9e6803a830c99fb486fa60ceac33f Author: Warner Losh AuthorDate: 2024-05-19 20:49:02 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 boot/i386: Use C99 initializer for textvidc Sponsored by: Netflix --- stand/i386/libi386/textvidc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/i386/libi386/textvidc.c b/stand/i386/libi386/textvidc.c index 4b79f9fc66b3..75d498930119 100644 --- a/stand/i386/libi386/textvidc.c +++ b/stand/i386/libi386/textvidc.c @@ -70,14 +70,13 @@ static int esc; struct console textvidc = { - "vidconsole", - "internal video/keyboard", - 0, - vidc_probe, - vidc_init, - vidc_putchar, - vidc_getchar, - vidc_ischar + .c_name = "vidconsole", + .c_desc = "internal video/keyboard", + .c_probe = vidc_probe, + .c_init = vidc_init, + .c_out = vidc_putchar, + .c_in = vidc_getchar, + .c_ready = vidc_ischar }; static void From nobody Mon May 20 04:08:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFM66sjz5LhC4; Mon, 20 May 2024 04:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFM4dCsz4Cm6; Mon, 20 May 2024 04:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cxGwQ3NDOc1b33h4wR5b76XwcoQRd869M8CrNIPAmFM=; b=bVW227U7qbbkeiBW3CXV0AnHk2Jr3wXoTxRxtHqThEmJD8eIEPi80ODulGRuCJq6KEWgH0 DnpM0xHjw5obrwYfVmdFaoYKha4R6OkBec6s/0euE1UCbqDrAPGTcye4gjFZ7MTNLU1QjQ fq+hwLSqCCyOEKjoq71hdogs3/H0uPRcvSu1H/2oKlypC56++8R2PugNMdnjFr3krNlM+Z M55ad4xrLztjp9dJBZB0F7nyWj1KJtXfnEBO8U0uF/FYv9L15DsIYTFPnxMate+dWKlE5N PbGnbrB7oMwp8ENA6R/EbPaDKVQY/+7VGyLM1aWCxTxKxiym6LNlj7sCQ6LIQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178119; a=rsa-sha256; cv=none; b=CZP8RylXzW2Iq7h2K50gUPYkxtSEn44C2b9rfzHlfK3deI9nrZsb0bZj0slOUnuqDZ5fCQ gpgiMHBUa1ZKQMlrNUqRit02rkk3RyGQPhfRItFCJbkZ67WOOq+AerG8RUlcQlcoCtCa23 e0nS3ktLl2V01yLhfvbi7/zuR0xpSgrDkGzYXURUkSIi/vQHUexVNcRlI/5bdYuBr1I7uL 4lz05vy4ucY8DnzHBfxgBM0W+Zq8fcw00u7PaBoQSxlcaJI4uKCgzqpWQT0pH6DGtQBABb 33nq6jHa6DZIi62U3VKWezrp8F7BLzPQkeOCNu5gYSCzMkQDfYl0wbE7ILSBQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cxGwQ3NDOc1b33h4wR5b76XwcoQRd869M8CrNIPAmFM=; b=y0Zsuduvaf13te0VtHMt9tmKYtRzT3A0YG5OmNPmGgMG7BAjN22eYAz73OC6QjFoXwafFs P2moflk7oc+Vr1PFcBPDe/4pAzPAqm7FSgabXqddzFKpQaG/blnK5OhqoLmG3YdHjPVLUi StkVQNlO8YfoPIi8XUF7XrjkSbhe4YZ5ROXp1f35Q+at2oIA9NhDsN6ScOP7TzmbHcYZgj muttNA9pVEv1SEfGuSS5sC92jg0Zk7+bVoGiZ9ZEfAPVLe+O/BTeVHdCyiwVU1BmMjWcBu AJh3+bCif2dwu2p6wVkFyWryrp+Z7V+4kIJEM+UN9QjziPZGjrKWOay5AsEUTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFM3PDNzNQ9; Mon, 20 May 2024 04:08: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 44K48dM2081290; Mon, 20 May 2024 04:08:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48d9b081287; Mon, 20 May 2024 04:08:39 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:39 GMT Message-Id: <202405200408.44K48d9b081287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 803060b21799 - main - i386/spinconsole: Use C99 initializers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 803060b21799664ba2fd8d9d9890aaaf57421a5f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=803060b21799664ba2fd8d9d9890aaaf57421a5f commit 803060b21799664ba2fd8d9d9890aaaf57421a5f Author: Warner Losh AuthorDate: 2024-05-19 20:52:53 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 i386/spinconsole: Use C99 initializers Sponsored by: Netflix --- stand/i386/libi386/spinconsole.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/i386/libi386/spinconsole.c b/stand/i386/libi386/spinconsole.c index 156eaf35e1c0..67561ff03bbd 100644 --- a/stand/i386/libi386/spinconsole.c +++ b/stand/i386/libi386/spinconsole.c @@ -47,14 +47,13 @@ static int spinc_ischar(void); extern struct console *consoles[]; struct console spinconsole = { - "spinconsole", - "spin port", - 0, - spinc_probe, - spinc_init, - spinc_putchar, - spinc_getchar, - spinc_ischar + .c_name = "spinconsole", + .c_desc = "spin port", + .c_probe = spinc_probe, + .c_init = spinc_init, + .c_out = spinc_putchar, + .c_in = spinc_getchar, + .c_ready = spinc_ischar }; static struct console *parent = NULL; From nobody Mon May 20 04:08:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFN6jwfz5LhC6; Mon, 20 May 2024 04:08: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 4VjPFN4p2Wz4D7X; Mon, 20 May 2024 04:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7Lt6AW6XxvT24Q38criV+t5CgRusaufBPoZASvhV+g=; b=p3HvNaEEH8y+LV04LqpqCgkKVr7NYSrPuPuES3XXpG6Glnz30XxOmILZ48s4aoxH+3jlBd N1oQGb2ZQKUKyg3iSkBV1yPmec32Ogc5eEiCIJ5+73YL3vMluuxwBAo7qY7LQ8nhBTWZYs n48mTUJkgtJUjb/toTKwaAhZMMNVHAdRCwNVuAfZ+LdRpnKaCQGX1K944PF+HaTW6qSmLs 0kUKte1PnIcCj70D68UKVsMeFz1d2h/rB5SkwbvIeaKMcZ6Bkyxik0CZJSTSc9IMj1PXhX IFoq/+pvsA52y0G0hJK6AicOFFUSxb6BTBOBrSrFlJoJ92DOIL+4ZlGfkz9KXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178120; a=rsa-sha256; cv=none; b=h5RdWKe4kmEfPGwZx8XjUVTZBjbfp6Mmsd6WlxYRHZYMFvGpsSqaSqvU/gzDS9zTDmTLSn mfdpo62TOqpKsoadp32TQel5SZZZcuA9gPUK27bhtSaiw6euue0g3YOm95V4KZoF4tb3rP pu1EjxGJoh9+MFhITJCdrlG9ODcpJBQNCB62SOzaGeJmWX+UMsO3/duy0LIufGhKwDqwZ9 hcFF6eo2WY77Cdi9yAy+5zE2IU0xnKcFhb9ACLVAwDUZ5jCBjqLo0bprmxesQl8l4QpHXn eybdDWZq36uNVD1E6/jBVoVugJVogr/h1u/ys/rN74pInMEQa7wVW8M7bCoKYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7Lt6AW6XxvT24Q38criV+t5CgRusaufBPoZASvhV+g=; b=kEmGAw2W6VNx+oH7d27bvq0JV52bao/Yv7pD5iCg2yRYWygNdl67wv+4AI3LdeHJZWhcLX aEIf3OwPS82+tKPkiFKzQMVIRzuWFBTHghVDI7yU5B3GRAjEaU2mrM62D0CKBmVlXWofz6 BuJlfAhn1X3mdayeZC/Z6/JYderv7aSNJgHpfnykckOTL2U5IA55MkPr3vMZkZa/EPZrML ihypENHh6Zy8gofZLx1sbH9Me5Y0DRs71Y4fFXkDoXC3UFmUvCGhg5eEmxupNSHKwKPSWR OWAk2uPA3GxBOnXPMiod7UkqbPSc84mW9UD3935nmxkL0IYuL/SyXn1wixcT8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFN4NVCzNQB; Mon, 20 May 2024 04:08: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 44K48eTJ081330; Mon, 20 May 2024 04:08:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48evY081327; Mon, 20 May 2024 04:08:40 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:40 GMT Message-Id: <202405200408.44K48evY081327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5e7b0cd93a95 - main - i386/nullconsole: Use C99 initializers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e7b0cd93a950033b1ab69f21a030ae39efc64f4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e7b0cd93a950033b1ab69f21a030ae39efc64f4 commit 5e7b0cd93a950033b1ab69f21a030ae39efc64f4 Author: Warner Losh AuthorDate: 2024-05-19 20:55:09 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 i386/nullconsole: Use C99 initializers Sponsored by: Netflix --- stand/i386/libi386/nullconsole.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/i386/libi386/nullconsole.c b/stand/i386/libi386/nullconsole.c index b4ffd3e30789..1cd6cd096f27 100644 --- a/stand/i386/libi386/nullconsole.c +++ b/stand/i386/libi386/nullconsole.c @@ -45,14 +45,13 @@ static int nullc_getchar(void); static int nullc_ischar(void); struct console nullconsole = { - "nullconsole", - "null port", - 0, - nullc_probe, - nullc_init, - nullc_putchar, - nullc_getchar, - nullc_ischar + .c_name = "nullconsole", + .c_desc = "null port", + .c_probe = nullc_probe, + .c_init = nullc_init, + .c_out = nullc_putchar, + .c_in = nullc_getchar, + .c_ready = nullc_ischar }; static void From nobody Mon May 20 04:08:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFP6cfXz5Lh8Z; Mon, 20 May 2024 04:08: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 4VjPFP5Ggxz4D51; Mon, 20 May 2024 04:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YI9fhQR6/qyQBLhqWbT56TIMxcI7JL0xYNeNguy9u8=; b=CtKLKDXOrRVgejzubvysMg5amtHfGQCo+36T/6EB6w5Zsy0Sq6Gq6rEPDNTTLpOLXZALvW pAXxDi8d/oseaFNiX6Z8iwCg+cWjE6ldLQ1wnQZfxzMdbsY05BEAflpRQ4UXFgZ2VAuBpa YtH4Z/iN0AHu6dpbl4BSZXlxzhMtmUziNU621oOItuRWU5gfAm9hi+RJtvCosgX2ijHjZj RdecpfdAiwl/1mkYxXIupY8tPY9PnZM26+xBxZ7MIA2OVAozKcP8o8leatV7E8ZXl9uoio kmqQYHQhUJTfoaXjdsZf6nV9Xe5VldBkGRmz9DEBd0HICe4IBEG8NDo0Bx4lhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178121; a=rsa-sha256; cv=none; b=Wlj2K7+uXVdSYRz9LfNKvBBybTilH+Aq2ZHK248DHUH9yJFxEUcMBfT3l99hz7TrX5ZkyH KNTiw3NPwy9XWXcVVLSctzX97jVLTh9VQcRkjepZbv7krqvC29MtYcGuhvomy4EoqCgM+Y VqU9Z5mpWESoeHTJEV9kzvF2jbY0du6UJ0ofqS9eKx/euqm7EVWT2hnMQOtuBHVlSYnpW1 yr4Pdv7uNXA3wHfRdY6Z2qGGqsTigbPWwrti/PghdRwlvMVoxa6++LSHfCuc/6W2yCYla2 /drk/p0s99QJ8M0OWX7ef0xYDtv9dmsYJcaroOBc4Tgax+f4l1RszPjcXXB/Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YI9fhQR6/qyQBLhqWbT56TIMxcI7JL0xYNeNguy9u8=; b=tifIQ9rOqH0bYegdMS6aJDUigIXedHtk3y2fZ7QMAtEE7rpb4qPF/L28acrlTwps9Ugfp6 h3qjLAe62ObmRvhmomr1GNvN8BBGzCjSuP4/cFVfQjG2bQIQB3cK33XEVN8nmpFzkWhOh/ N/4JcG9hW0SkhPWN4JrWgvUc/+aro/TFFuSRdAIOGZzQs1+DJZG7KRolKwfpXJErXF3+QG OqOBXm6A1LhRFcO0MFhRJfK6wJgWlvFovAhY1hHnXXf7iCHuKcpWsmr4IlkykF58J/eyNI e4BG3Heuuav9/O/8n1DMri6KKiFwD7k2M+kFNQzVKZrNTJ8rK0SbmLHNP5AUQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFP4vDgzNMl; Mon, 20 May 2024 04:08: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 44K48fXn081370; Mon, 20 May 2024 04:08:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48fVX081367; Mon, 20 May 2024 04:08:41 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:41 GMT Message-Id: <202405200408.44K48fVX081367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b3551da9cd3d - main - efi_console: Use c99 initializers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3551da9cd3dacbc7242c3be6fefe234784645fe Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b3551da9cd3dacbc7242c3be6fefe234784645fe commit b3551da9cd3dacbc7242c3be6fefe234784645fe Author: Warner Losh AuthorDate: 2024-05-19 20:57:16 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 efi_console: Use c99 initializers Sponsored by: Netflix --- stand/efi/libefi/efi_console.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 4a3219ef3017..2e28cf1ec460 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -126,14 +126,14 @@ int efi_cons_poll(void); static void cons_draw_frame(teken_attr_t *); struct console efi_console = { - "efi", - "EFI console", - C_WIDEOUT, - efi_cons_probe, - efi_cons_init, - efi_cons_putchar, - efi_cons_getchar, - efi_cons_poll + .c_name = "efi", + .c_desc = "EFI console", + .c_flags = C_WIDEOUT, + .c_probe = efi_cons_probe, + .c_init = efi_cons_init, + .c_out = efi_cons_putchar, + .c_in = efi_cons_getchar, + .c_ready = efi_cons_poll }; /* From nobody Mon May 20 04:08:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFR1wwpz5LhKr; Mon, 20 May 2024 04:08: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 4VjPFQ6BbPz4Cvc; Mon, 20 May 2024 04:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILhPSXsJR8HntEiAU9UnS80b150kq8JOdGAkqRRBFqM=; b=dibIHPbnkY2pRM7cpz1BaEzuxrUqi2zfEdkGPkwtd+oowY6zeAJdRIc8e3v7GgwRBHa+xh +oH3cT6LdbS/NorPh2n3TTjaC6Jd//y3ZKfKqiaUuL83V1Trilbrex/GNGD1kl3EOjzKyo RXUrNJpSyE5KriF6GqXN916uGb4+W2pl14H6EIGX4fuSxuoAky2vRIvL+WxYjYBs50vibw jFMZXkJ2jUICfTFDLVF6seaoHd9z3BbC3o0htMIfGhWlTDsjfdWFeFKeyXCH4HmhgqpmkH 6qRUGVxLYXyOBaLvq0nM671Zc+t9fmNRr1DRYK/Es6Fi7qA2vRJQcOKt1TAncw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178122; a=rsa-sha256; cv=none; b=F8+HYkjR5UTgWEFKkmUN8p3oM7YGBqpNmcIndLvIWW2QnYt8vy1a1+/MuQNzYfKkSBKrvV /dX1pSjvscN2aZWd1xyzQnZoNUe59Y/Rw2vOl6fmITaPV/l+6f2dvBjGmNhdClUZw0ek+D h6U7WAk5QoiP1AnzT65Y5v8hV1ZPpaif5/vqo8IlAV/Zm8lZezNhVL2HG64gXi8MVzSOjt 8/0Xut5GXKEJfQRKNCEL/B3fn8Sk0Nzg9ini4ZH8VFzEn3J4YKHLZp421jcki9v3J1LH5b MkJ8FLxz2EEwUpKejRahlGo6md72VsF5C/pnBiOmW/7spTZStwBNkYAZotN11g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILhPSXsJR8HntEiAU9UnS80b150kq8JOdGAkqRRBFqM=; b=tibo8IsOkcozMEwrEHyY8YoDlxZgdp98XTIliBFPEFRuOuOAp6q5F3t5rOddKfPJHWDxX5 YH+s5AMlS66SOYIIH00SOhl7o8eRB5gn39Ibi3igNwQs8tw3v2197ywU+gj7eP3voYh6GM 06QSHuvDz0GslY8IANclDoEPWp1xD1t9y3cWgiUlGd2qK8fwSz4D7E6YX22LplZQfXzjHm sh9fQVAG7JRshqv5k3X27APaNdu/JVJqPJSg5O/K/4ysF2Y9ljKSnHrdpHNy4/xcjv/e5r 2XWqN98rSj2yhWx8KATPaJWKFxqSj07BNs32Yq8fh5qbWE7cS02/1l0dh7et0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFQ5m14zNbk; Mon, 20 May 2024 04:08: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 44K48ggi081421; Mon, 20 May 2024 04:08:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48gFK081418; Mon, 20 May 2024 04:08:42 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:42 GMT Message-Id: <202405200408.44K48gFK081418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6e28b4aa15e0 - main - uboot: Use c99 initializers for the console struct List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e28b4aa15e057f59c0e022094c3f82f3062c2a3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6e28b4aa15e057f59c0e022094c3f82f3062c2a3 commit 6e28b4aa15e057f59c0e022094c3f82f3062c2a3 Author: Warner Losh AuthorDate: 2024-05-19 20:58:42 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 uboot: Use c99 initializers for the console struct Sponsored by: Netflix --- stand/uboot/uboot_console.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/uboot/uboot_console.c b/stand/uboot/uboot_console.c index 60d6ccaf4417..c02ba9aba5f0 100644 --- a/stand/uboot/uboot_console.c +++ b/stand/uboot/uboot_console.c @@ -37,14 +37,13 @@ static int uboot_cons_getchar(void); static int uboot_cons_poll(void); struct console uboot_console = { - "uboot", - "U-Boot console", - 0, - uboot_cons_probe, - uboot_cons_init, - uboot_cons_putchar, - uboot_cons_getchar, - uboot_cons_poll, + .c_name = "uboot", + .c_desc = "U-Boot console", + .c_probe = uboot_cons_probe, + .c_init = uboot_cons_init, + .c_out = uboot_cons_putchar, + .c_int = uboot_cons_getchar, + .c_ready = uboot_cons_poll, }; static void From nobody Mon May 20 04:08:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFS339dz5LhG9; Mon, 20 May 2024 04:08: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 4VjPFS04jQz4D3D; Mon, 20 May 2024 04:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uc0Pt8qa55POHJ0XaeRuGN1caRpnp5fg8eWNhb+VuUE=; b=rArzXegibMGRE0rGPvLF2d/aP/yvukbp53umaJNoEmzh7RwkF2n2zyDR2M44ZIMHwE5emX 2fQv2cS03NI3ayQ9XMX/4S6fobI6CctPM/54bGUOwZ/UoPl4bZe+d+TIWYoQaMuab0beSt 0Nt24UmenzUf3tN69BVrYOfVl1e7zDxcz0gaEJjHwsIy1mAr7wTU8VqrWPRZ7JvmjQKS0h YsiRMLRC4osPMQLC+MfFnqdT0eS/jKEaBypGfIKh8zkSL3THPZdhMs/fDkKkiVWCYMgSTv erLjR7tYZ7uWeJlEF2iNcHqKL4zEnQSl9KJ16tL9oBhvED66pBLZgffO0s71NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178124; a=rsa-sha256; cv=none; b=O5IcKDZYr0mR9aQwFvkobLhipCRt3WfN9PvocJop31nQl4zNTlixTtci8zF2XRaTbz1DZa aaeOKD7HKJ9ch32rl+SOsJx3avf8Y9JB37cgPSnE595ZKcWKc+MSSbeC+62gYN1/tGQQGP q6zGZK/AfjBloRUD2LZiTk6JVmce6L4WZfAyzG7Opc3sKL6YR2J9tqsrgRfwzY+sJnf0XZ CVG4CbAbAAsyN1pxIL94BxFHT5KXT7zxjMlFJkQSF8IirOllU3hhk+KBy1NlTBJDmvLwcj OV3CGZ+m18HQS7oMkwpz7FLQfPHw+LfbSL3yw6Ke+rxEeaXggnSc0fkGlEpW3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uc0Pt8qa55POHJ0XaeRuGN1caRpnp5fg8eWNhb+VuUE=; b=uqf98fDP/iz974/XI8990tahATRNr12ENC5qGaC5FS0ndw8v255BybFmWFQ+zG59tIEpkw rpCv1cDS9U+qQy3otVjB5T/+lkjgenKVQG0kAygp0KSq7MQ2SZmasE+3+JU4gCJjmcEOAv YVbue/b2JS0oAHCDlUj8470/thYm+p6q+Os4v/5UHPhvBEpRkIn8bGDpHhyurcDuYeodvb uiOd4rHPlMw/gHsJkDBuJYrrKuKpzjzL06pEizNMf4bZkNmIpHKE3K2knlFGENHX8dLkJn vkapOgkhvgHtAG9YmojN/+Y/rqN15WxBimjYgNmLBRksCG2TS3M4ppgl8eyOPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFR6nnTzNHK; Mon, 20 May 2024 04:08: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 44K48hxa081476; Mon, 20 May 2024 04:08:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48hA6081473; Mon, 20 May 2024 04:08:43 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:43 GMT Message-Id: <202405200408.44K48hA6081473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1f180d0a404a - main - ofw: Use C99 initializers for the console struct List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f180d0a404a700889e40a91bbe21c20f310da4a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1f180d0a404a700889e40a91bbe21c20f310da4a commit 1f180d0a404a700889e40a91bbe21c20f310da4a Author: Warner Losh AuthorDate: 2024-05-19 21:01:23 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 ofw: Use C99 initializers for the console struct Sponsored by: Netflix --- stand/libofw/ofw_console.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index b0ead0aba198..4fbd43d3f612 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -41,14 +41,13 @@ static ihandle_t stdin; static ihandle_t stdout; struct console ofwconsole = { - "ofw", - "Open Firmware console", - 0, - ofw_cons_probe, - ofw_cons_init, - ofw_cons_putchar, - ofw_cons_getchar, - ofw_cons_poll, + .c_cname = "ofw", + .c_desc = "Open Firmware console", + .c_probe = ofw_cons_probe, + .c_init = ofw_cons_init, + .c_out = ofw_cons_putchar, + .c_in = ofw_cons_getchar, + .c_ready = ofw_cons_poll, }; static void From nobody Mon May 20 04:08:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFT2gh9z5LhND; Mon, 20 May 2024 04:08: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 4VjPFT0XwMz4D3V; Mon, 20 May 2024 04:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8K4Ku9XrLPieB5Dgii060+Pb9U8F1RJqMhtD2z5CCA=; b=r1/1Vm3H02n8d2hlf70YVorYFboirN9iw+xGQzKtWODYZNQnUxtOsRsklDGeMRlRnDLqKk NswOYyQnOj1ne0At4et6Jfs+icOszyx/kdxBHhZ0I0VrJqD5+CXOTuXBUHbMjpu5GOjAlM nzLsFqEekZTBYS1dD7NrUIneLI8OtgOA7ivFYuV06eNoN3NifxESG+R/djTeIWLiSz9z59 d+2BBFOXRZxuOlwdr9gFdTeJZo9sKsKlIb3skdalwdAFN2x0iMoBrUWY8DZQn+R+Kq/LJY rf+HbSar6097mf2XpXIE2aaMdNTdVhs1lqIfCxYoz+5RDYTB8O9ds9+x7muM1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178125; a=rsa-sha256; cv=none; b=u9zYyQUmeQi8JmBPVErda/AgNm0FD/GZpATO7s5rB0WfrM8FHA48zaUj1dXMS7JYgXzS4a ZmqhVhRMdcy0NHxy2sP8dkEHA5aj8ZIJ/pUMf0+SRCwO/G2bFWsLnxeUHIGz2dm/ISswqd EmySauvGiZ8V87tM5pQqbPNRSqGcDyT3u6BENZcf+2Mq/ET0HTQIIztngusdGrldVYJdfz SGU+7u2cQJPVxco7I4dMYBdfg699Paldk0dLsgEyXVs58ysrxG1RV+Aboh+aST1x7CkCgi lXobc2R5EOVocCj76zCz6IByr63kFfZ/QdRws9tQShhYs0Wy/rSjymWDEQP8mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8K4Ku9XrLPieB5Dgii060+Pb9U8F1RJqMhtD2z5CCA=; b=uxJMAiSXsUq0dwip8CA7Y9lFf4dstmAV6s2Tf3E+KVZRMkEuAYSBS+4jpnPGBiG1dq5iu6 TyYKDlPu9vZdc2DWXgZ1MU/VZ3KHnXRnyda1Tm+0j2Q2c9qFLQoWsuX6S8EcLILj7vfTsH n3x+h+PATHHYMnjwwGUGvRGZcQCF3fBGRTSWzfBtmZ+mHIAlsDkASZ8qVC5VURTSp1DKop 5SMs7V94qkj5LZXConO/OBMlL8aL0g8Dhp92287rn/apUTYO+XjurDKRxrcU71tuQLuPfJ 6RrEiwGMeY+93/NGnMohLJ7m5+A4S2ww7ESCiAiRqIGRPU7EdfCjQSoBkHIquw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFT08d9zNK4; Mon, 20 May 2024 04:08: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 44K48iFW081538; Mon, 20 May 2024 04:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48i8Z081535; Mon, 20 May 2024 04:08:44 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:44 GMT Message-Id: <202405200408.44K48i8Z081535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 125b181674e8 - main - userboot: Use C99 Initializers for each of the consoles here List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 125b181674e894baebfe463ed097305329427a2e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=125b181674e894baebfe463ed097305329427a2e commit 125b181674e894baebfe463ed097305329427a2e Author: Warner Losh AuthorDate: 2024-05-19 21:03:34 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 userboot: Use C99 Initializers for each of the consoles here Sponsored by: Netflix --- stand/userboot/userboot/userboot_cons.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/stand/userboot/userboot/userboot_cons.c b/stand/userboot/userboot/userboot_cons.c index a905f1397232..26c89dc2a37e 100644 --- a/stand/userboot/userboot/userboot_cons.c +++ b/stand/userboot/userboot/userboot_cons.c @@ -42,14 +42,13 @@ static int userboot_cons_getchar(void); static int userboot_cons_poll(void); struct console userboot_console = { - "userboot", - "userboot", - 0, - userboot_cons_probe, - userboot_cons_init, - userboot_cons_putchar, - userboot_cons_getchar, - userboot_cons_poll, + .c_name = "userboot", + .c_desc = "userboot", + .c_probe = userboot_cons_probe, + .c_init = userboot_cons_init, + .c_out = userboot_cons_putchar, + .c_in = userboot_cons_getchar, + .c_ready = userboot_cons_poll, }; /* @@ -57,14 +56,13 @@ struct console userboot_console = { * console to comconsole without resulting in an error */ struct console userboot_comconsole = { - "comconsole", - "comconsole", - 0, - userboot_comcons_probe, - userboot_comcons_init, - userboot_cons_putchar, - userboot_cons_getchar, - userboot_cons_poll, + .c_name = "comconsole", + .c_desc = "comconsole", + .c_probe = userboot_comcons_probe, + .c_init = userboot_comcons_init, + .c_out = userboot_cons_putchar, + .c_in = userboot_cons_getchar, + .c_ready = userboot_cons_poll, }; static void From nobody Mon May 20 04:08:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFV4cvzz5LhTF; Mon, 20 May 2024 04:08: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 4VjPFV201Yz4DBw; Mon, 20 May 2024 04:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3kNsEMVhlDlDBdLpeFp4cluhMZp8tBgGZBSBWDZcBg=; b=bIj0mYV37o4dR+A3BKc5HFgeu8AiaRs6om+BU8JJhMmuuAJTgZcIoh03EHVY/4uuGFkVI3 b+jLrsKkon8WSjsmqUywLnMPjQ1qaHnz/KCXwtYxP/eQ2Du/b17zdzqgsPFY9B237i/BT5 nYw+kNZQ+BNdlBxvZq0/q8rQO5/bnU0F3W0w++KM6fjf18v4UtaauTSGkShXFf87Sn+Lbj VfeUsQtlqPtleKI/qyfTZG8g9yCeQy3yjkPIpD6UlHHH2gKfFIc2DwfYlAye376WTrf1Hv bDYh8shggS34UMACEhP4ZPro9HARzTstNLaLswtDezCSxQgsPhyzdSDFPeRogQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178126; a=rsa-sha256; cv=none; b=uiOAjPdnxd6/wzhLPt62PxF6sIcdtuPzt5iTWGiRB52zniv02a016Xts2LVP+fQWlWTY29 x7h2edC+6sWc8I31SokG5rz7hOIR6D09HDOriP1mSqWsyiujWvePSZIO0atuCZl+N/LKHN Qj3hribWD3Pt25BMDqCZ4dJCHaPYz6JDFJ1cjRwhYrcvwmeYsvaynLZ/J68r+BqYKlz8aY lo7lsFJGGAWia4w2092uCl2GWnao6gG28swgWiMFccWezDB1yvOFr30qI/tud6WEBFaZ2S tePiireZgSE1s5cRSV/ryEFT+kM8MT/XXKy+xdhAcBGy6K3Zzyxo2Y5j80azOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3kNsEMVhlDlDBdLpeFp4cluhMZp8tBgGZBSBWDZcBg=; b=fAtWRFbFRVen3yrtKJBBNnxL+Hp+tM4V3E50Ek1L49MgJlaBESKz3hWyZRTWlBUlbIrjNh YKOsRkoMgC6WzU+XAYAG1u6E8pyQJI/PYRThFER8tezJwb2bqocpIs1DWY8CrdQGz4U+nK S0PpFKzJ2JXbXHAB0a80jTuJ/8jv9NHY4R+RcDu48QdzzXHj6et6kErXgg7ne2+yFlD2l1 X6jL7OJEOHpJhfhqgFG3wFfnDUboVsXaXWF6FgNk7wKQaNVZgurAiUF9fwrsKwjWYR+IHs Fgcppi634mi5Chos/6+epjL4cukRMIqJSbjy3qWRsYrb8ibXAr0ODU8qWZC9+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFV1QWCzNHL; Mon, 20 May 2024 04:08: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 44K48kTa081585; Mon, 20 May 2024 04:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48k6Z081582; Mon, 20 May 2024 04:08:46 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:46 GMT Message-Id: <202405200408.44K48k6Z081582@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2d425b634f74 - main - loader: c_init returns 0 or 1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d425b634f742ca7a803ab678ad9226607335161 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2d425b634f742ca7a803ab678ad9226607335161 commit 2d425b634f742ca7a803ab678ad9226607335161 Author: Warner Losh AuthorDate: 2024-05-19 21:08:40 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 loader: c_init returns 0 or 1 c_init returns 0 (success) or 1 (failure). Don't return other values. Sponsored by: Netflix --- stand/efi/libefi/eficom.c | 4 ++-- stand/i386/libi386/comconsole.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/efi/libefi/eficom.c b/stand/efi/libefi/eficom.c index d5f3f07e083f..f1ce14eb50f8 100644 --- a/stand/efi/libefi/eficom.c +++ b/stand/efi/libefi/eficom.c @@ -390,10 +390,10 @@ static int comc_init(int arg __unused) { if (comc_setup()) - return (CMD_OK); + return (0); eficom.c_flags &= ~(C_ACTIVEIN | C_ACTIVEOUT); - return (CMD_ERROR); + return (1); } static void diff --git a/stand/i386/libi386/comconsole.c b/stand/i386/libi386/comconsole.c index b2d48b13a9f4..dc6bbcfe9806 100644 --- a/stand/i386/libi386/comconsole.c +++ b/stand/i386/libi386/comconsole.c @@ -140,8 +140,8 @@ comc_init(int arg) if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) == (C_PRESENTIN | C_PRESENTOUT)) - return (CMD_OK); - return (CMD_ERROR); + return (0); + return (1); } static void From nobody Mon May 20 04:08:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFX0YMNz5LhQt; Mon, 20 May 2024 04:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFW2v64z4D63; Mon, 20 May 2024 04:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwblnS7F/nEEoMuovJKB4U/hj5XUnpUOJCK0OJzDi54=; b=LUgjCPJF+CQBjeN0ZG51QpsnaqiMafuZ6T3iwnXlIAG0KwK7p30OSG1mGvLFvFACev7FN5 AxIiJSuizKo3mQzbkaXkbTbSZ4qD3GfR9b3d+0DZyY/v0F0vFnmI3YhleE6qx2YiLwX3jQ 3aNkBDvi/1osxUj92+YCsWTlIhyj8DJmhbvVkXkHF+7YP/bwjt0HTC13pBHDoTOAoAZR8i JKVt+/TLDqQUnk8L/wvcpAD9DAwB/ZLc8qw4FgX5qaIaEYxZMKnbKds0Bp011RkCd+KeRn WoViYm0zx7gJt75Kiapu/56ctkCCYovkasAsp1MKL7wo4a03Us4G5a8LnUNigw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178127; a=rsa-sha256; cv=none; b=cIaE/y257a6WfHDoMAs+o2c2dwhP7PbHyLwYDenrP/k3W5kzUMv8qVsdXGgyTr9SZtr2DP u616hU8tPQnn/jOd1SLqM0oCO/VomNBLpO/8PYFvV/868BrLM+eorZ8hMo5Rz3FTQjMD0B RGKkcgml9mR5O02NqGoI6YUteM4+jO6u28pBWTITxjnuo2zWFsWi3YsFOtl1pe/zqKDx3n witbOUdP5Wg8ESvZKjLUaTovqKVqd+r1LeVNV09JdGnHlkhfxphslHPcDgYLnICtguqsUX eSnKGnV5HBDwCNCMIw6689wBvnAdcHW60+lOkgtmFQAZ+5issQ7YBOrQGv+vQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwblnS7F/nEEoMuovJKB4U/hj5XUnpUOJCK0OJzDi54=; b=avGWk+6HEvRRxPzhEkwnpr8SDzytsYiK5dF0KRYkYm2lsmkdFpOrf1TCsERjdTGu5GMwGz 0bSUCOqaaxHcRR7kR56GIIAEyNaJ2fAVBW+3T9xSEgqkW5RxFy5s3c6TOFQl7Rn8QfXrTw S9EnWzMRER5SkKq0me2hrF/ZsqvrSYAXJB684Gx+avaWA0cV1Xx3iRImgSaomYHNdxnVxT E013rorbHqhn5sdcDJ9PbsYEDzC3bun2TpfopS4lDZLovSdjJfmptNjgkhB5REW6NtgBli v9XPxy6KeqgTODC5gOyFNnAHkoma0CBKf61rZ4wxZseHWJXfuZiSeMGQuGTE/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 4VjPFW2TjBzNB8; Mon, 20 May 2024 04:08: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 44K48lZI081643; Mon, 20 May 2024 04:08:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48lL8081640; Mon, 20 May 2024 04:08:47 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:47 GMT Message-Id: <202405200408.44K48lL8081640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3f012b9508c8 - main - loader: stlye(9) nit: Space between return and the value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f012b9508c8a4d7874f114e76ebccd80c78e890 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f012b9508c8a4d7874f114e76ebccd80c78e890 commit 3f012b9508c8a4d7874f114e76ebccd80c78e890 Author: Warner Losh AuthorDate: 2024-05-19 21:10:32 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:43 +0000 loader: stlye(9) nit: Space between return and the value Sponsored by: Netflix --- stand/i386/libi386/nullconsole.c | 6 +++--- stand/i386/libi386/spinconsole.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stand/i386/libi386/nullconsole.c b/stand/i386/libi386/nullconsole.c index 1cd6cd096f27..2878512071ad 100644 --- a/stand/i386/libi386/nullconsole.c +++ b/stand/i386/libi386/nullconsole.c @@ -63,7 +63,7 @@ nullc_probe(struct console *cp) static int nullc_init(int arg) { - return(0); + return (0); } static void @@ -74,11 +74,11 @@ nullc_putchar(int c) static int nullc_getchar(void) { - return(-1); + return (-1); } static int nullc_ischar(void) { - return(0); + return (0); } diff --git a/stand/i386/libi386/spinconsole.c b/stand/i386/libi386/spinconsole.c index 67561ff03bbd..d4c22bdbb1c3 100644 --- a/stand/i386/libi386/spinconsole.c +++ b/stand/i386/libi386/spinconsole.c @@ -71,7 +71,7 @@ static int spinc_init(int arg) { - return(parent->c_init(arg)); + return (parent->c_init(arg)); } static void @@ -97,12 +97,12 @@ static int spinc_getchar(void) { - return(-1); + return (-1); } static int spinc_ischar(void) { - return(0); + return (0); } From nobody Mon May 20 04:08:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFX5B2qz5LhL9; Mon, 20 May 2024 04:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFX3jSGz4D1X; Mon, 20 May 2024 04:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yybiQK/VyqCQH/q2XhClgotq42C2VULSofqOayRiHDU=; b=ussRVE7D1HYwbnXjNR3Y/aXKhbXhv5tNBi6Lpw3Z8ALv4Ozb/coJIbWy69d7Ba8rQHc4Mm ymqb4YeFWEmXV8+vlVGLXoXOlHF2bvzsDVSEw4LG/AcNjHw8K5qBBo/IjKNzGWBvQ6ypF3 /BEu9NUBcpy6zThfUpqTNUpkt4BfU0DWJHVVcn5plqP/u0dKvYxScZjQpgLpFWHqR53r/n zZhnYD+tlQSnjBpc6bI5GNy+fWAyktoQLvkdU0NP0aQlW1KVWNWRaIrYS1xLTJ667d3Ll1 R3rWbtczHCvqn9fevBBlCxvSzkFhsXw3bzOEbd6Ypu0StDdYg0n7ALim8r1DQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178128; a=rsa-sha256; cv=none; b=cZG4LCO8Zp4XpP9/cSbHE7whGO0/oMupggzc4fcJYyTEHtO1P2mTilC14vmlF4o/BCKKUn 7K+oT4+wRAQoQTIKw2Sx3g7mamZqouub+JQL5gqEWuI6deJ14PNBsS+3ExJPznZF8dqa9O PUi+vvY09yMS8Uv8PlloksKRXEfL/VD/aJ/10Ay+kEeCVjzsipJPsxWtHTaIAmIRRjcbOz jarHWsu/IC2HNO3lk/q8sURxhjueD6MTBR/a1DckNCditP+7fRwEk8wLYnSbSMi+1wsaDa NOJXC081ozR1w/hKGCz+9ANegPev2xIg2N2kGUq10Kwnx25wceBtboTCExtSlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yybiQK/VyqCQH/q2XhClgotq42C2VULSofqOayRiHDU=; b=VOLIpvpLvfcxcBF7KwEMjwseK6ES527qfUCMMdyWFJ7nRBrg8G963tvjR+uC7FkrD4ce0A uHIxZ0mLTKY0RaIgR2cgakIbj33SbqAHZ5GiWcuHckp9Cse7tJxMOeLAMA0nGABvY1qXI2 QnlLQzdW3u3/gqJjPPGDmXPSKSwgo9qBcXAJrkxSalKUESvsu26YQZg3DP6y0pVx15Hemu 5p5hvuOsva7sFkrSHF+uvDrDXlulqrUltALh2paOdsCLv3oD+HC/gY/fDMtRT+eUftB2CH C1wa6xyG01S+5htIWpUcOBL0mvmc341R0Z2WKYq07JAnxuNmhBB+g2mDlIH73A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFX3K9VzNDf; Mon, 20 May 2024 04:08: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 44K48mSF081690; Mon, 20 May 2024 04:08:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48mqg081687; Mon, 20 May 2024 04:08:48 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:48 GMT Message-Id: <202405200408.44K48mqg081687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4cddd20e1ea8 - main - loader/ofw: Style(9) pass over return statements List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cddd20e1ea8b9c622c72edfad3e64f70e9d56a9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4cddd20e1ea8b9c622c72edfad3e64f70e9d56a9 commit 4cddd20e1ea8b9c622c72edfad3e64f70e9d56a9 Author: Warner Losh AuthorDate: 2024-05-19 21:14:43 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:43 +0000 loader/ofw: Style(9) pass over return statements Make these consistent. Some files weren't even consistent with themselves. Make them all either return ( ); or return; Sponsored by: Netflix --- stand/libofw/devicename.c | 4 ++-- stand/libofw/ofw_console.c | 10 +++++----- stand/libofw/ofw_copy.c | 8 ++++---- stand/libofw/ofw_module.c | 2 +- stand/libofw/ofw_net.c | 12 ++++++------ stand/libofw/ofw_time.c | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/stand/libofw/devicename.c b/stand/libofw/devicename.c index 5e3a789c13db..f6419632c6bc 100644 --- a/stand/libofw/devicename.c +++ b/stand/libofw/devicename.c @@ -101,12 +101,12 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path idev = malloc(sizeof(struct ofw_devdesc)); if (idev == NULL) { printf("ofw_parsedev: malloc failed\n"); - return ENOMEM; + return (ENOMEM); }; strlcpy(idev->d_path, devspec, min(rem_path - devspec + 1, sizeof(idev->d_path))); *dev = &idev->dd; if (path != NULL) *path = rem_path; - return 0; + return (0); } diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index 4fbd43d3f612..75f9bfba0968 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -62,7 +62,7 @@ ofw_cons_probe(struct console *cp) static int ofw_cons_init(int arg) { - return 0; + return (0); } void @@ -90,7 +90,7 @@ ofw_cons_getchar(void) if (saved_char != -1) { l = saved_char; saved_char = -1; - return l; + return (l); } /* At least since version 4.0.0, QEMU became bug-compatible @@ -109,12 +109,12 @@ ofw_cons_poll(void) unsigned char ch; if (saved_char != -1) - return 1; + return (1); if (OF_read(stdin, &ch, 1) > 0) { saved_char = ch; - return 1; + return (1); } - return 0; + return (0); } diff --git a/stand/libofw/ofw_copy.c b/stand/libofw/ofw_copy.c index b855a5b41d96..17a46fe4e480 100644 --- a/stand/libofw/ofw_copy.c +++ b/stand/libofw/ofw_copy.c @@ -119,14 +119,14 @@ ofw_copyin(const void *src, vm_offset_t dest, const size_t len) } bcopy(src, (void *)dest, len); - return(len); + return (len); } ssize_t ofw_copyout(const vm_offset_t src, void *dest, const size_t len) { bcopy((void *)src, dest, len); - return(len); + return (len); } ssize_t @@ -143,7 +143,7 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len) buf = malloc(chunk); if (buf == NULL) { printf("ofw_readin: buf malloc failed\n"); - return(0); + return (0); } if (ofw_mapmem(dest, len)) { @@ -166,5 +166,5 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len) } free(buf); - return(len - resid); + return (len - resid); } diff --git a/stand/libofw/ofw_module.c b/stand/libofw/ofw_module.c index 8d56f6debbb6..4c1fe9cd279d 100644 --- a/stand/libofw/ofw_module.c +++ b/stand/libofw/ofw_module.c @@ -42,5 +42,5 @@ int ofw_autoload(void) { /* XXX Call some machdep autoload routine? */ - return(0); + return (0); } diff --git a/stand/libofw/ofw_net.c b/stand/libofw/ofw_net.c index b4bcb7a00fe2..3418216a9836 100644 --- a/stand/libofw/ofw_net.c +++ b/stand/libofw/ofw_net.c @@ -80,13 +80,13 @@ static void *dmabuf; static int ofwn_match(struct netif *nif, void *machdep_hint) { - return 1; + return (1); } static int ofwn_probe(struct netif *nif, void *machdep_hint) { - return 0; + return (0); } static ssize_t @@ -123,7 +123,7 @@ ofwn_put(struct iodesc *desc, void *pkt, size_t len) printf("netif_put: OF_write returned %d\n", rv); #endif - return rv; + return (rv); } static ssize_t @@ -256,13 +256,13 @@ ofwn_getunit(const char *path) for (i = 0; i < nofwninfo; i++) { printf(">>> test =\t%s\n", ofwninfo[i].ofwn_path); if (strcmp(path, ofwninfo[i].ofwn_path) == 0) - return i; + return (i); if (strcmp(newpath, ofwninfo[i].ofwn_path) == 0) - return i; + return (i); } - return -1; + return (-1); } #endif diff --git a/stand/libofw/ofw_time.c b/stand/libofw/ofw_time.c index c2da603bb52e..48372428ae29 100644 --- a/stand/libofw/ofw_time.c +++ b/stand/libofw/ofw_time.c @@ -35,7 +35,7 @@ time(time_t *tloc) secs = OF_milliseconds() / 1000; if (tloc) *tloc = secs; - return secs; + return (secs); } time_t @@ -43,7 +43,7 @@ getsecs(void) { time_t n = 0; time(&n); - return n; + return (n); } void From nobody Mon May 20 04:08:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFZ092jz5LhQx; Mon, 20 May 2024 04:08: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 4VjPFY4PBgz4D6L; Mon, 20 May 2024 04:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXTGZsUyL6UQIRWta+luiDoqz38a+V9p/xUveJlm+z0=; b=rPHpcGl1Ps8wKX/Yu/G2fD7E+FPFtWiX584tlp+M9EbZpAzgS4SEJOTeN0A1J3gr6O4mJ8 F5ywiffXYJfZDQ6AN2rclXwo/NyZW9IeQws0AlAPFDx3y+Al0JbbH3HWWla45jE23XVv2t KfiBZf3zpeaD9bv6QMxdgfA1HP1iQr2ve8OAfnznLSsNLJ3HkW7SlWl8urKBSk6og+GfkN 8SRFhPcOrvy5zSrgWgkMyZgQ6m552RE+lCmZkXCLcowoGkdnBa2UX6OA3cuUxCU80TD1AK 1oaLIlyiJyajGrMxJWMne4wml33m2riOSYlFGE6lasAQpRy/K+aoT5hRqFQXLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178129; a=rsa-sha256; cv=none; b=q5gIs/gI+yj22rHHNa8Fm5+wjfERvP/EJ/A9XySD+MpcP2jqRKSig8QBmJrlC2xtLL+6Iw BQq6mN1T/mn4h0u6cG9T5p/9wAIfz3qCeG5tyrbKT1DB4IeW+spMCwPKUtJ0UOS2r4odjb g2Uvdp7+EZJjgESaYc+kWETLT3gQhUBEdW3ERYMsiXCH8pxyAEnmD7Atev8ZSGSD4Z69Mq 2uBGneGOM5w4TAO/UPeS65qYOlg2/1OKx24iIzfHmcdkx0u0xCJOcsVy+ch1DalipN7Qki S5btbnfaDwM7fc1jHaKv9Jl5nR1Qjz0Y6xJUft/x9xtLo6Pa1PhiZR6gZG6GUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXTGZsUyL6UQIRWta+luiDoqz38a+V9p/xUveJlm+z0=; b=CobJfdheyn9k9/rPRO2SQHXY+1AggkteA6AokWQnoOKe68Td5GimmIQkWNhNnAeYg8TDzw HuJL9hsb8S7zUQXt1ORsK4XXewZLykkKcDheinTi8oY5NGzgSVn5BJeA7uhgm7aEGre23h QAD0NYf+Btf0TE24r3iXEOWytM7d8abGE92v3EdPyF4H0fAAQlpL60/dwzKpDLJIT3Xeyw lG2KdzrCQMd3JG/lGeqIbgMctLS90sIpwgd4WVjtd5Jl0AT8CQEOetim2sAMBvr6NFYMPj IXrYfZIYuRjXV5sc6MaWppzxn+teqJqrrArU63CitN/GdvFXQzb0uqL/SRMx6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFY3zyZzNB9; Mon, 20 May 2024 04:08: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 44K48noB081723; Mon, 20 May 2024 04:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48n1f081720; Mon, 20 May 2024 04:08:49 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:49 GMT Message-Id: <202405200408.44K48n1f081720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 861f802b3eba - main - textvidc: Reindent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 861f802b3ebaf05075c6dd8be25f802c3e6527b6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=861f802b3ebaf05075c6dd8be25f802c3e6527b6 commit 861f802b3ebaf05075c6dd8be25f802c3e6527b6 Author: Warner Losh AuthorDate: 2024-05-19 21:18:58 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:43 +0000 textvidc: Reindent Since this is now 'new code' go ahead and reindent for modern project preferences. Sponsored by: Netflix --- stand/i386/libi386/textvidc.c | 683 +++++++++++++++++++++--------------------- 1 file changed, 343 insertions(+), 340 deletions(-) diff --git a/stand/i386/libi386/textvidc.c b/stand/i386/libi386/textvidc.c index 75d498930119..1dd950bc4021 100644 --- a/stand/i386/libi386/textvidc.c +++ b/stand/i386/libi386/textvidc.c @@ -82,112 +82,112 @@ struct console textvidc = { static void vidc_probe(struct console *cp) { - /* look for a keyboard */ + /* look for a keyboard */ #if KEYBOARD_PROBE - if (probe_keyboard()) + if (probe_keyboard()) #endif - { - cp->c_flags |= C_PRESENTIN; - } + { + cp->c_flags |= C_PRESENTIN; + } - /* XXX for now, always assume we can do BIOS screen output */ - cp->c_flags |= C_PRESENTOUT; + /* XXX for now, always assume we can do BIOS screen output */ + cp->c_flags |= C_PRESENTOUT; } static int vidc_init(int arg) { - int i; + int i; - if (vidc_started && arg == 0) - return (0); - vidc_started = 1; + if (vidc_started && arg == 0) + return (0); + vidc_started = 1; #ifdef TERM_EMU - /* Init terminal emulator */ - end_term(); - get_pos(&curx, &cury); - curs_move(&curx, &cury, curx, cury); - fg_c = DEFAULT_FGCOLOR; - bg_c = DEFAULT_BGCOLOR; + /* Init terminal emulator */ + end_term(); + get_pos(&curx, &cury); + curs_move(&curx, &cury, curx, cury); + fg_c = DEFAULT_FGCOLOR; + bg_c = DEFAULT_BGCOLOR; #endif - for (i = 0; i < 10 && vidc_ischar(); i++) - (void)vidc_getchar(); - return (0); /* XXX reinit? */ + for (i = 0; i < 10 && vidc_ischar(); i++) + (void)vidc_getchar(); + return (0); /* XXX reinit? */ } static void vidc_biosputchar(int c) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0xe00 | (c & 0xff); - v86.ebx = 0x7; - v86int(); + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0xe00 | (c & 0xff); + v86.ebx = 0x7; + v86int(); } static void vidc_rawputchar(int c) { - int i; + int i; - if (c == '\t') { - int n; + if (c == '\t') { + int n; #ifndef TERM_EMU - int curx, cury; + int curx, cury; - get_pos(&curx, &cury); + get_pos(&curx, &cury); #endif - n = 8 - ((curx + 8) % 8); - for (i = 0; i < n; i++) - vidc_rawputchar(' '); - } else { + n = 8 - ((curx + 8) % 8); + for (i = 0; i < n; i++) + vidc_rawputchar(' '); + } else { #ifndef TERM_EMU - vidc_biosputchar(c); + vidc_biosputchar(c); #else - /* Emulate AH=0eh (teletype output) */ - switch(c) { - case '\a': - vidc_biosputchar(c); - return; - case '\r': - curx = 0; - curs_move(&curx, &cury, curx, cury); - return; - case '\n': - cury++; - if (cury > 24) { - scroll_up(1, fg_c, bg_c); - cury--; - } else { - curs_move(&curx, &cury, curx, cury); - } - return; - case '\b': - if (curx > 0) { - curx--; + /* Emulate AH=0eh (teletype output) */ + switch(c) { + case '\a': + vidc_biosputchar(c); + return; + case '\r': + curx = 0; + curs_move(&curx, &cury, curx, cury); + return; + case '\n': + cury++; + if (cury > 24) { + scroll_up(1, fg_c, bg_c); + cury--; + } else { + curs_move(&curx, &cury, curx, cury); + } + return; + case '\b': + if (curx > 0) { + curx--; + curs_move(&curx, &cury, curx, cury); + /* write_char(' ', fg_c, bg_c); XXX destructive(!) */ + return; + } + return; + default: + write_char(c, fg_c, bg_c); + curx++; + if (curx > 79) { + curx = 0; + cury++; + } + if (cury > 24) { + curx = 0; + scroll_up(1, fg_c, bg_c); + cury--; + } + } curs_move(&curx, &cury, curx, cury); - /* write_char(' ', fg_c, bg_c); XXX destructive(!) */ - return; - } - return; - default: - write_char(c, fg_c, bg_c); - curx++; - if (curx > 79) { - curx = 0; - cury++; - } - if (cury > 24) { - curx = 0; - scroll_up(1, fg_c, bg_c); - cury--; - } - } - curs_move(&curx, &cury, curx, cury); #endif - } + } } /* Get cursor position on the screen. Result is in edx. Sets @@ -197,13 +197,13 @@ void get_pos(int *x, int *y) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0300; - v86.ebx = 0x0; - v86int(); - *x = v86.edx & 0x00ff; - *y = (v86.edx & 0xff00) >> 8; + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0300; + v86.ebx = 0x0; + v86int(); + *x = v86.edx & 0x00ff; + *y = (v86.edx & 0xff00) >> 8; } #ifdef TERM_EMU @@ -213,26 +213,26 @@ void curs_move(int *_x, int *_y, int x, int y) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0200; - v86.ebx = 0x0; - v86.edx = ((0x00ff & y) << 8) + (0x00ff & x); - v86int(); - *_x = x; - *_y = y; - /* If there is ctrl char at this position, cursor would be invisible. - * Make it a space instead. - */ - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0800; - v86.ebx = 0x0; - v86int(); + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0200; + v86.ebx = 0x0; + v86.edx = ((0x00ff & y) << 8) + (0x00ff & x); + v86int(); + *_x = x; + *_y = y; + /* If there is ctrl char at this position, cursor would be invisible. + * Make it a space instead. + */ + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0800; + v86.ebx = 0x0; + v86int(); #define isvisible(c) (((c) >= 32) && ((c) < 255)) - if (!isvisible(v86.eax & 0x00ff)) { - write_char(' ', fg_c, bg_c); - } + if (!isvisible(v86.eax & 0x00ff)) { + write_char(' ', fg_c, bg_c); + } } /* Scroll up the whole window by a number of rows. If rows==0, @@ -243,15 +243,15 @@ void scroll_up(int rows, int fgcol, int bgcol) { - if (rows == 0) - rows = 25; - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0600 + (0x00ff & rows); - v86.ebx = (bgcol << 12) + (fgcol << 8); - v86.ecx = 0x0; - v86.edx = 0x184f; - v86int(); + if (rows == 0) + rows = 25; + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0600 + (0x00ff & rows); + v86.ebx = (bgcol << 12) + (fgcol << 8); + v86.ecx = 0x0; + v86.edx = 0x184f; + v86int(); } /* Write character and attribute at cursor position. */ @@ -259,12 +259,12 @@ void write_char(int c, int fgcol, int bgcol) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0900 + (0x00ff & c); - v86.ebx = (bgcol << 4) + fgcol; - v86.ecx = 0x1; - v86int(); + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0900 + (0x00ff & c); + v86.ebx = (bgcol << 4) + fgcol; + v86.ecx = 0x1; + v86int(); } /**************************************************************/ @@ -279,28 +279,28 @@ void CD(void) { - get_pos(&curx, &cury); - if (curx > 0) { + get_pos(&curx, &cury); + if (curx > 0) { + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0600; + v86.ebx = (bg_c << 4) + fg_c; + v86.ecx = (cury << 8) + curx; + v86.edx = (cury << 8) + 79; + v86int(); + if (++cury > 24) { + end_term(); + return; + } + } v86.ctl = 0; v86.addr = 0x10; v86.eax = 0x0600; v86.ebx = (bg_c << 4) + fg_c; - v86.ecx = (cury << 8) + curx; - v86.edx = (cury << 8) + 79; + v86.ecx = (cury << 8) + 0; + v86.edx = (24 << 8) + 79; v86int(); - if (++cury > 24) { - end_term(); - return; - } - } - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0600; - v86.ebx = (bg_c << 4) + fg_c; - v86.ecx = (cury << 8) + 0; - v86.edx = (24 << 8) + 79; - v86int(); - end_term(); + end_term(); } /* Absolute cursor move to args[0] rows and args[1] columns @@ -310,12 +310,12 @@ void CM(void) { - if (args[0] > 0) - args[0]--; - if (args[1] > 0) - args[1]--; - curs_move(&curx, &cury, args[1], args[0]); - end_term(); + if (args[0] > 0) + args[0]--; + if (args[1] > 0) + args[1]--; + curs_move(&curx, &cury, args[1], args[0]); + end_term(); } /* Home cursor (left top corner) */ @@ -323,9 +323,9 @@ void HO(void) { - argc = 1; - args[0] = args[1] = 1; - CM(); + argc = 1; + args[0] = args[1] = 1; + CM(); } /* Clear internal state of the terminal emulation code */ @@ -333,162 +333,162 @@ void end_term(void) { - esc = 0; - argc = -1; + esc = 0; + argc = -1; } /* Gracefully exit ESC-sequence processing in case of misunderstanding */ void bail_out(int c) { - char buf[16], *ch; - int i; - - if (esc) { - vidc_rawputchar('\033'); - if (esc != '\033') - vidc_rawputchar(esc); - for (i = 0; i <= argc; ++i) { - sprintf(buf, "%d", args[i]); - ch = buf; - while (*ch) - vidc_rawputchar(*ch++); + char buf[16], *ch; + int i; + + if (esc) { + vidc_rawputchar('\033'); + if (esc != '\033') + vidc_rawputchar(esc); + for (i = 0; i <= argc; ++i) { + sprintf(buf, "%d", args[i]); + ch = buf; + while (*ch) + vidc_rawputchar(*ch++); + } } - } - vidc_rawputchar(c); - end_term(); + vidc_rawputchar(c); + end_term(); } static void get_arg(int c) { - if (argc < 0) - argc = 0; - args[argc] *= 10; - args[argc] += c - '0'; + if (argc < 0) + argc = 0; + args[argc] *= 10; + args[argc] += c - '0'; } /* Emulate basic capabilities of cons25 terminal */ void vidc_term_emu(int c) { - static int ansi_col[] = { - 0, 4, 2, 6, 1, 5, 3, 7, - }; - int t; - int i; - - switch (esc) { - case 0: - switch (c) { + static int ansi_col[] = { + 0, 4, 2, 6, 1, 5, 3, 7, + }; + int t; + int i; + + switch (esc) { + case 0: + switch (c) { + case '\033': + esc = c; + break; + default: + vidc_rawputchar(c); + break; + } + break; + case '\033': - esc = c; - break; - default: - vidc_rawputchar(c); - break; - } - break; + switch (c) { + case '[': + esc = c; + args[0] = 0; + argc = -1; + break; + default: + bail_out(c); + break; + } + break; - case '\033': - switch (c) { case '[': - esc = c; - args[0] = 0; - argc = -1; - break; - default: - bail_out(c); - break; - } - break; - - case '[': - switch (c) { - case ';': - if (argc < 0) /* XXX */ - argc = 0; - else if (argc + 1 >= MAXARGS) - bail_out(c); - else - args[++argc] = 0; - break; - case 'H': - if (argc < 0) - HO(); - else if (argc == 1) - CM(); - else - bail_out(c); - break; - case 'J': - if (argc < 0) - CD(); - else - bail_out(c); - break; - case 'm': - if (argc < 0) { - fg_c = DEFAULT_FGCOLOR; - bg_c = DEFAULT_BGCOLOR; - } - for (i = 0; i <= argc; ++i) { - switch (args[i]) { - case 0: /* back to normal */ - fg_c = DEFAULT_FGCOLOR; - bg_c = DEFAULT_BGCOLOR; - break; - case 1: /* bold */ - fg_c |= 0x8; - break; - case 4: /* underline */ - case 5: /* blink */ - bg_c |= 0x8; - break; - case 7: /* reverse */ - t = fg_c; - fg_c = bg_c; - bg_c = t; - break; - case 22: /* normal intensity */ - fg_c &= ~0x8; - break; - case 24: /* not underline */ - case 25: /* not blinking */ - bg_c &= ~0x8; - break; - case 30: case 31: case 32: case 33: - case 34: case 35: case 36: case 37: - fg_c = ansi_col[args[i] - 30]; - break; - case 39: /* normal */ - fg_c = DEFAULT_FGCOLOR; - break; - case 40: case 41: case 42: case 43: - case 44: case 45: case 46: case 47: - bg_c = ansi_col[args[i] - 40]; - break; - case 49: /* normal */ - bg_c = DEFAULT_BGCOLOR; - break; + switch (c) { + case ';': + if (argc < 0) /* XXX */ + argc = 0; + else if (argc + 1 >= MAXARGS) + bail_out(c); + else + args[++argc] = 0; + break; + case 'H': + if (argc < 0) + HO(); + else if (argc == 1) + CM(); + else + bail_out(c); + break; + case 'J': + if (argc < 0) + CD(); + else + bail_out(c); + break; + case 'm': + if (argc < 0) { + fg_c = DEFAULT_FGCOLOR; + bg_c = DEFAULT_BGCOLOR; + } + for (i = 0; i <= argc; ++i) { + switch (args[i]) { + case 0: /* back to normal */ + fg_c = DEFAULT_FGCOLOR; + bg_c = DEFAULT_BGCOLOR; + break; + case 1: /* bold */ + fg_c |= 0x8; + break; + case 4: /* underline */ + case 5: /* blink */ + bg_c |= 0x8; + break; + case 7: /* reverse */ + t = fg_c; + fg_c = bg_c; + bg_c = t; + break; + case 22: /* normal intensity */ + fg_c &= ~0x8; + break; + case 24: /* not underline */ + case 25: /* not blinking */ + bg_c &= ~0x8; + break; + case 30: case 31: case 32: case 33: + case 34: case 35: case 36: case 37: + fg_c = ansi_col[args[i] - 30]; + break; + case 39: /* normal */ + fg_c = DEFAULT_FGCOLOR; + break; + case 40: case 41: case 42: case 43: + case 44: case 45: case 46: case 47: + bg_c = ansi_col[args[i] - 40]; + break; + case 49: /* normal */ + bg_c = DEFAULT_BGCOLOR; + break; + } + } + end_term(); + break; + default: + if (isdigit(c)) + get_arg(c); + else + bail_out(c); + break; } - } - end_term(); - break; + break; + default: - if (isdigit(c)) - get_arg(c); - else bail_out(c); - break; + break; } - break; - - default: - bail_out(c); - break; - } } #endif @@ -496,9 +496,9 @@ static void vidc_putchar(int c) { #ifdef TERM_EMU - vidc_term_emu(c); + vidc_term_emu(c); #else - vidc_rawputchar(c); + vidc_rawputchar(c); #endif } @@ -506,26 +506,26 @@ static int vidc_getchar(void) { - if (vidc_ischar()) { - v86.ctl = 0; - v86.addr = 0x16; - v86.eax = 0x0; - v86int(); - return (v86.eax & 0xff); - } else { - return (-1); - } + if (vidc_ischar()) { + v86.ctl = 0; + v86.addr = 0x16; + v86.eax = 0x0; + v86int(); + return (v86.eax & 0xff); + } else { + return (-1); + } } static int vidc_ischar(void) { - v86.ctl = V86_FLAGS; - v86.addr = 0x16; - v86.eax = 0x100; - v86int(); - return (!V86_ZR(v86.efl)); + v86.ctl = V86_FLAGS; + v86.addr = 0x16; + v86.eax = 0x100; + v86int(); + return (!V86_ZR(v86.efl)); } #if KEYBOARD_PROBE @@ -550,13 +550,16 @@ vidc_ischar(void) static void delay7(void) { - /* - * I know this is broken, but no timer is available yet at this stage... - * See also comments in `delay1ms()'. - */ - inb(IO_DUMMY); inb(IO_DUMMY); - inb(IO_DUMMY); inb(IO_DUMMY); - inb(IO_DUMMY); inb(IO_DUMMY); + /* + * I know this is broken, but no timer is available yet at this stage... + * See also comments in `delay1ms()'. + */ + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); } /* @@ -571,9 +574,9 @@ delay7(void) static void delay1ms(void) { - int i = 800; - while (--i >= 0) - (void)inb(0x84); + int i = 800; + while (--i >= 0) + (void)inb(0x84); } /* @@ -587,55 +590,55 @@ delay1ms(void) static int probe_keyboard(void) { - int retry = PROBE_MAXRETRY; - int wait; - int i; - - while (--retry >= 0) { - /* flush any noise */ - while (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) { - delay7(); - inb(IO_KBD + KBD_DATA_PORT); - delay1ms(); - } + int retry = PROBE_MAXRETRY; + int wait; + int i; + + while (--retry >= 0) { + /* flush any noise */ + while (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) { + delay7(); + inb(IO_KBD + KBD_DATA_PORT); + delay1ms(); + } - /* wait until the controller can accept a command */ - for (wait = PROBE_MAXWAIT; wait > 0; --wait) { - if (((i = inb(IO_KBD + KBD_STATUS_PORT)) - & (KBDS_INPUT_BUFFER_FULL | KBDS_ANY_BUFFER_FULL)) == 0) - break; - if (i & KBDS_ANY_BUFFER_FULL) { - delay7(); - inb(IO_KBD + KBD_DATA_PORT); - } - delay1ms(); - } - if (wait <= 0) - continue; + /* wait until the controller can accept a command */ + for (wait = PROBE_MAXWAIT; wait > 0; --wait) { + if (((i = inb(IO_KBD + KBD_STATUS_PORT)) + & (KBDS_INPUT_BUFFER_FULL | KBDS_ANY_BUFFER_FULL)) == 0) + break; + if (i & KBDS_ANY_BUFFER_FULL) { + delay7(); + inb(IO_KBD + KBD_DATA_PORT); + } + delay1ms(); + } + if (wait <= 0) + continue; - /* send the ECHO command */ - outb(IO_KBD + KBD_DATA_PORT, KBDC_ECHO); + /* send the ECHO command */ + outb(IO_KBD + KBD_DATA_PORT, KBDC_ECHO); - /* wait for a response */ - for (wait = PROBE_MAXWAIT; wait > 0; --wait) { - if (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) - break; - delay1ms(); - } - if (wait <= 0) - continue; + /* wait for a response */ + for (wait = PROBE_MAXWAIT; wait > 0; --wait) { + if (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) + break; + delay1ms(); + } + if (wait <= 0) + continue; - delay7(); - i = inb(IO_KBD + KBD_DATA_PORT); + delay7(); + i = inb(IO_KBD + KBD_DATA_PORT); #ifdef PROBE_KBD_BEBUG - printf("probe_keyboard: got 0x%x.\n", i); + printf("probe_keyboard: got 0x%x.\n", i); #endif - if (i == KBD_ECHO) { - /* got the right answer */ - return (1); + if (i == KBD_ECHO) { + /* got the right answer */ + return (1); + } } - } - return (0); + return (0); } #endif /* KEYBOARD_PROBE */ From nobody Mon May 20 05:06:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjQWd5YSZz5LnSw; Mon, 20 May 2024 05:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjQWd51tjz4Nlf; Mon, 20 May 2024 05:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716181565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5E47zfedlGKDQtQ8wPjIdMFCSydoIhN63NPTzhgrBv8=; b=aXPmooT1kp7utYGjVuTUo0x3lnQ4qGCpkE3W1cToU9Dh+J9L5R1CKZkGjE6i5hTG0R81TM 2kH9gA43+RKLAfIttAHc+lPqNxv/FIOiTXpYMsCzq8BvwXFB58w5SqC4I96lmp62Q5iXre jPhK6/bCoCnIr6FGhJj7xLE3wiOt4v4x8wai3bd0gr1Qf7SXaV9A2KtVvFlCOzVGwJSPfA hIv+A0fXU7yQBoddcT4bB9uYpsU9gQaXrZ4NwfVhouEZ5+Z94uBVsrW/sJTxDwsYChq1ex gxNV5UleD+a1qXPq+u9NIWAVeTrFB3ci3qUDd7ARptA+JE/v8alTM5OWBRZNfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716181565; a=rsa-sha256; cv=none; b=OwawiAbXw6V2tUrqqLAcX5mKh5vFB6j0+t37rE7lFo2Cc3Mi/srqArLaTi4KjA9SZpCyI8 7PZJcZ5QmKyCcQVBrWtgVU4wJqf3belpNtKLyBaXkH8d9iI6DOTyzeSeYx8e8/Jivj0Vb0 835CMhbiX7dDeKrx/IJ2nGYAT7/Szq7OggOLgXXmSPY46IX5mMhHz/T9QonjzyLLwC0sm2 esBQiKHnQ3HRup+FOOeJNrjrWXrkdID9xNwCUDxsdmdSigxiO7q2DMahsSxW/cIKM8tXjj 7JcUZk9Xm6pj6e/rf0yGWPnMOVELPtI39ji8fStuOxvWOD2xOvpCLgVljNskHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716181565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5E47zfedlGKDQtQ8wPjIdMFCSydoIhN63NPTzhgrBv8=; b=CaqsIVW0+WHOLw2ZfwyTeoRqkzouUdU2EA0MqSDN0/knO/HpAMbOtVYWNhxDVPuwRn5Cu9 gN2bKQj6yZVQ8Pv7HuLkOZboemfF/yNeukvP4DE+aFz5v+MTMZgCZodo2n8+VQZQ3tr176 svzRL4Bp01eG6JQoBTZu4/QR2vuHdBzqtqX5lWuHtNgKXkhFPrTc8K/Km7OgiOcQiBp/jo 0yFJ84FtY/Or8f5jhf8TXBiUzAZidY099t36zTqZclRBmAwlNS0nOgR4TB+t3YgKYCHooc p8I19EnB7hq/aK1MpUs+VKVbvLeCEv00BMwch7AD7qKpIdfKnufZ9ngGZG4g6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjQWd4cvBzP8B; Mon, 20 May 2024 05:06:05 +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 44K565NZ083320; Mon, 20 May 2024 05:06:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K565id083317; Mon, 20 May 2024 05:06:05 GMT (envelope-from git) Date: Mon, 20 May 2024 05:06:05 GMT Message-Id: <202405200506.44K565id083317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c7581d76a1e4 - main - loader: fix stupid typos List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7581d76a1e46a925bba59d3e18394908f65c907 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c7581d76a1e46a925bba59d3e18394908f65c907 commit c7581d76a1e46a925bba59d3e18394908f65c907 Author: Warner Losh AuthorDate: 2024-05-20 05:04:18 +0000 Commit: Warner Losh CommitDate: 2024-05-20 05:04:18 +0000 loader: fix stupid typos Sponsored by: Netflix --- stand/libofw/ofw_console.c | 2 +- stand/uboot/uboot_console.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index 75f9bfba0968..6925641eb606 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -41,7 +41,7 @@ static ihandle_t stdin; static ihandle_t stdout; struct console ofwconsole = { - .c_cname = "ofw", + .c_name = "ofw", .c_desc = "Open Firmware console", .c_probe = ofw_cons_probe, .c_init = ofw_cons_init, diff --git a/stand/uboot/uboot_console.c b/stand/uboot/uboot_console.c index c02ba9aba5f0..b850a88c4018 100644 --- a/stand/uboot/uboot_console.c +++ b/stand/uboot/uboot_console.c @@ -42,7 +42,7 @@ struct console uboot_console = { .c_probe = uboot_cons_probe, .c_init = uboot_cons_init, .c_out = uboot_cons_putchar, - .c_int = uboot_cons_getchar, + .c_in = uboot_cons_getchar, .c_ready = uboot_cons_poll, }; From nobody Mon May 20 12:15:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjc2l5bZgz5L7yw; Mon, 20 May 2024 12:15: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 4Vjc2l3vJ7z4Fg6; Mon, 20 May 2024 12:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716207311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TLij/l1vEELjeTm00Fd0tIxudMJb/vpHfjNKt2lQ21E=; b=bHyAuxvx5RyeejAMwiP/ejPX8LbPnRqpkAacvEEROuGKpNqIC6l7l5TJQxzWLrpL4c18Gx HakbFxCwQXkuolDSBMClsXBj+EM+4iRENqn02y/xIjXZHNrizyW9NklpUWmvffm+Rdtv6n 9Vy13dAJv+v8yzcDNYYDfd6b0+MOvL6PhqvFAlTvE7h4HH0R9j2JoRrDYlj0Epj31MEv+9 vnZ1aE8iy7Liufwh0WepEDKMtRY7bLaR+rrSPZwE2VxaSrDzUm0XX+d/wBlxPZyUHZs4bO UQGT10/f2L0bkA7WwULGgTI8tKlhzykGND0gSbS1no4FuxK04jUsguDyisrSmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716207311; a=rsa-sha256; cv=none; b=bljGBMCkY4NWUABx+4u+FPgwRW88IDlfEtV7mSqdtFW+xtuWFjLqg7ABAYJN+IAsTS5InV oSVaEFfr1JcjVXErE6q59GAmgb16DvKW8wzgTBZVPQkAeN7RfICBeemcmF0DbwzIFYInAy gNdfcAwJG6DbbC3+x8RbyI8hHFxEKScyXuTmF0j7Wcl/72yqUw12KN/hdBpG/ifOAc/vwv 7l13OCETd/bEWUkAOqM0/4oxPIDd52AWMhwHa1deLOD/DBT44oojcpPQ7Cf40ADGOr+z0U 6+RHx2uFhwLX35k37qEiyrsSEWToIfvCOnp7tqegCjS15SIZSBqJad2MzbOxCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716207311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TLij/l1vEELjeTm00Fd0tIxudMJb/vpHfjNKt2lQ21E=; b=xkTgU8Y1c2WUjx/yHdSIBFGte2VsqRvHphyz1KGy7cAlIwvKV6YZkz1eJ2oD2OQliGoDIB xcH6e2bvJ4vXCA9K4UdyqYTJEOaMGsg+/e+eRnD18Ym56xVS7gLdD72Hj7q0M+ADw79Cdc BEh2DzmPmYZrfqMCyPWSzSxMWYuLe9q6gvZEjT9iPn7+FjbOdTNi3/KQloEJGWjJHVok/s bH2BARvQHJcxgrv1xf2bTDJWN9GOSvu+y2Jf8KqoEFJGf6lLeiJxWooBjUafFI6DceL3Tu JZBi9lo2/7zZ18x3TE61OEuoujNBPqAuWsowPuPbx8y1r3XQQ7oStPgQYWxrmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjc2l2Gv8zdLT; Mon, 20 May 2024 12:15:11 +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 44KCFBZ3011724; Mon, 20 May 2024 12:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KCFBNZ011721; Mon, 20 May 2024 12:15:11 GMT (envelope-from git) Date: Mon, 20 May 2024 12:15:11 GMT Message-Id: <202405201215.44KCFBNZ011721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 93fbfef0b503 - main - if_vxlan(4): Add checking for loops and nesting of tunnels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93fbfef0b50354b7a1620822454ef29cd415cb2d Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=93fbfef0b50354b7a1620822454ef29cd415cb2d commit 93fbfef0b50354b7a1620822454ef29cd415cb2d Author: Zhenlei Huang AuthorDate: 2024-05-20 12:14:07 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-20 12:14:07 +0000 if_vxlan(4): Add checking for loops and nesting of tunnels User misconfiguration, either tunnel loops, or a large number of different nested tunnels, can overflow the kernel stack. Prevent that by using if_tunnel_check_nesting(). PR: 278394 Diagnosed by: markj Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45197 --- sys/net/if_vxlan.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index c6c3af57c78b..9153adf64cfc 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -432,6 +432,21 @@ TUNABLE_INT("net.link.vxlan.legacy_port", &vxlan_legacy_port); static int vxlan_reuse_port = 0; TUNABLE_INT("net.link.vxlan.reuse_port", &vxlan_reuse_port); +/* + * This macro controls the default upper limitation on nesting of vxlan + * tunnels. By default it is 3, as the overhead of IPv6 vxlan tunnel is 70 + * bytes, this will create at most 210 bytes overhead and the most inner + * tunnel's MTU will be 1290 which will meet IPv6 minimum MTU size 1280. + * Be careful to configure the tunnels when raising the limit. A large + * number of nested tunnels can introduce system crash. + */ +#ifndef MAX_VXLAN_NEST +#define MAX_VXLAN_NEST 3 +#endif +static int max_vxlan_nesting = MAX_VXLAN_NEST; +SYSCTL_INT(_net_link_vxlan, OID_AUTO, max_nesting, CTLFLAG_RW, + &max_vxlan_nesting, 0, "Max nested tunnels"); + /* Default maximum number of addresses in the forwarding table. */ #ifndef VXLAN_FTABLE_MAX #define VXLAN_FTABLE_MAX 2000 @@ -2721,6 +2736,7 @@ vxlan_encap6(struct vxlan_softc *sc, const union vxlan_sockaddr *fvxlsa, #endif } +#define MTAG_VXLAN_LOOP 0x7876706c /* vxlp */ static int vxlan_transmit(struct ifnet *ifp, struct mbuf *m) { @@ -2746,6 +2762,13 @@ vxlan_transmit(struct ifnet *ifp, struct mbuf *m) m_freem(m); return (ENETDOWN); } + if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_VXLAN_LOOP, + max_vxlan_nesting) != 0)) { + VXLAN_RUNLOCK(sc, &tracker); + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ELOOP); + } if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) fe = vxlan_ftable_entry_lookup(sc, eh->ether_dhost); From nobody Mon May 20 13:33:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjdmn0gBfz5LH5P; Mon, 20 May 2024 13:33: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 4Vjdmn08pdz4NmS; Mon, 20 May 2024 13:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7ahZmNLAHzE8IUqxP9PBNV29Kf15Je3UKwudAwrWuw=; b=i4O3c34KFwcGoiC0+jRMEK1cmBMfGZBmUPBs3apU4NcjdaEYfzYO++nAx+wEMUU0Rp76EF p6nuf6digM/z0M1Rvvw78hlss3PRP3FXmlv57Dd4qlQuGRAIz/xEsNgxcJze4giota6b9a J7mQU975DoaJzOoUS6IAR3Xo6krpKREIEt2vS2USKipWWg3Kjhkropn5mPV5ngM4I/HZVX XxA1dnGQafHzbFZ+ab3U1L8kJAf3IKYTLmwhbu+O5bs06+Ozc7UKZGnHGZw1B+Jx9TFOUo pC24o26TXYgOW1B55UYokf3ZSsX2WVEqmrAAW35MlnQioUa3r+HAjA9H9d3NbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716211993; a=rsa-sha256; cv=none; b=lTrBX3/Kfuu7Y0fMDch2YuXnLpMy1Erm7ay76ijEGQhCY0re5WZWS/5LDSVoq3OZMS9NSH tDgc/tVURmWBhYTrD5LEV/RRIJ3cwk5mUqS+L7mSnhmfGo2Ae0w4aPiUeRXhxp3x+qnCC2 uvnbzCrq3WQbb6YDAeFUal6Gtl2L1o428Vl1199toNGDVaj1D5eltmZh0VpJcExjoDYz3j HBHZN9HOgneIQtihaeXuTsFpQ+fhBawPo6Gzfy1YWAoy8hci+XszFlLR8fknbrp+W1CAMC sErJXsY5KeAK73oW84xAMulf+d37je31XdADpDTVGWbM8bWj4Q0IdSuyLDpI9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7ahZmNLAHzE8IUqxP9PBNV29Kf15Je3UKwudAwrWuw=; b=lk5zgA72AwWnuHzrnCpZQOJzyEUr9vEDH9eC6ADRwn/YfoP8T77ALpiZ7qO2dxKpaK/GyR Gc9+3BsTqKzOp5B9SiJku3WWGljcv3LrNyjqIpLdcX0ly/m+rP9X+AtcHKUJcbe9D9K+UE eZHFKtYwoBerdJmaFUaSuDWJLJ5y7L12mmfdrOBVWuewFWfOYNlLjucdlpqTaSoMqBl9+m JftmoyPT3iKC35gqFozc2p4ydgP3Sjo9wHzj7wiRB71EGIQjfc3VI48aw6D+5Yj2oYLJCe KaaIfRXc9tvAHvRmpyokbCSqUJq6CSgQgg+Fj4SnSK7cjt/XoNP/4SLoqPzxYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjdmm6tgFzgll; Mon, 20 May 2024 13:33:12 +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 44KDXClO045747; Mon, 20 May 2024 13:33:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDXCLb045744; Mon, 20 May 2024 13:33:12 GMT (envelope-from git) Date: Mon, 20 May 2024 13:33:12 GMT Message-Id: <202405201333.44KDXCLb045744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 974ea6b297f8 - main - libdiff: Detect and recover from file truncation. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 974ea6b297f8f9821bbb60670e2b90ba9989b283 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=974ea6b297f8f9821bbb60670e2b90ba9989b283 commit 974ea6b297f8f9821bbb60670e2b90ba9989b283 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 13:26:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 13:26:33 +0000 libdiff: Detect and recover from file truncation. If a memory-mapped file is truncated before we get to the end, the atomizer may catch SIGBUS. Detect that, reduce the input length to what we were actually able to read, and set a flag so the caller can take further action (e.g. warn the user and / or start over). Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45217 --- contrib/libdiff/include/diff_main.h | 1 + contrib/libdiff/lib/diff_atomize_text.c | 35 ++++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/contrib/libdiff/include/diff_main.h b/contrib/libdiff/include/diff_main.h index 04a6c6e748c9..11700580db4b 100644 --- a/contrib/libdiff/include/diff_main.h +++ b/contrib/libdiff/include/diff_main.h @@ -118,6 +118,7 @@ struct diff_data { /* Flags set by file atomizer. */ #define DIFF_ATOMIZER_FOUND_BINARY_DATA 0x00000001 +#define DIFF_ATOMIZER_FILE_TRUNCATED 0x00000002 /* Flags set by caller of diff_main(). */ #define DIFF_FLAG_IGNORE_WHITESPACE 0x00000001 diff --git a/contrib/libdiff/lib/diff_atomize_text.c b/contrib/libdiff/lib/diff_atomize_text.c index 32023105af94..d8a69733fc00 100644 --- a/contrib/libdiff/lib/diff_atomize_text.c +++ b/contrib/libdiff/lib/diff_atomize_text.c @@ -16,6 +16,8 @@ */ #include +#include +#include #include #include #include @@ -122,10 +124,18 @@ diff_data_atomize_text_lines_fd(struct diff_data *d) return DIFF_RC_OK; } +static sigjmp_buf diff_data_signal_env; +static void +diff_data_signal_handler(int sig) +{ + siglongjmp(diff_data_signal_env, sig); +} + static int diff_data_atomize_text_lines_mmap(struct diff_data *d) { - const uint8_t *pos = d->data; + struct sigaction act, oact; + const uint8_t *volatile pos = d->data; const uint8_t *end = pos + d->len; bool ignore_whitespace = (d->diff_flags & DIFF_FLAG_IGNORE_WHITESPACE); bool embedded_nul = false; @@ -136,8 +146,22 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d) ARRAYLIST_INIT(d->atoms, 1 << pow2); + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = diff_data_signal_handler; + sigaction(SIGBUS, &act, &oact); + if (sigsetjmp(diff_data_signal_env, 0) > 0) { + /* + * The file was truncated while we were reading it. Set + * the end pointer to the beginning of the line we were + * trying to read, adjust the file length, and set a flag. + */ + end = pos; + d->len = end - d->data; + d->atomizer_flags |= DIFF_ATOMIZER_FILE_TRUNCATED; + } while (pos < end) { - const uint8_t *line_end = pos; + const uint8_t *line_start = pos, *line_end = pos; unsigned int hash = 0; while (line_end < end && *line_end != '\r' && *line_end != '\n') { @@ -164,15 +188,16 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d) *atom = (struct diff_atom){ .root = d, - .pos = (off_t)(pos - d->data), - .at = pos, - .len = line_end - pos, + .pos = (off_t)(line_start - d->data), + .at = line_start, + .len = line_end - line_start, .hash = hash, }; /* Starting point for next line: */ pos = line_end; } + sigaction(SIGBUS, &oact, NULL); /* File are considered binary if they contain embedded '\0' bytes. */ if (embedded_nul) From nobody Mon May 20 13:33:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjdmq6lHYz5LGf2; Mon, 20 May 2024 13:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjdmq1wkXz4Nwc; Mon, 20 May 2024 13:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2UFTRig/9hy7rCWfAC5k+xMj8pTrKkn4hMbAB9MCIoA=; b=OaqcuQ4ml1uhZGWfMAPoSN9F6WMZ/t8dRQvErh1cSo/TL7zgBinFmr+ObYc8ndz28ndQLW UKIV5slwRZdl5yUjTUDG4Tv6VuTmH4iXdLRVaUMf8oAV5Qu5nvGQcWiQ/QWN5vah2kSoDb tBGfdJSSWYI2PGW4N1ICwyrOVKcdvK3XeI2Xn8yWB2zpVwQW31yrUxD/pAyTlZR21ICvAD JNA4l7co5a//jukqRaNaPwropk3fbVaEnXJJ4Ity4KlUveZWDCgeJplwlBRAnDFKUMAo2W pqJMXPE7OAJ1LlGpDCk8BLHoqusQOg6YaWmmbox3rljH52tb5sxVDTraZQ3TGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716211995; a=rsa-sha256; cv=none; b=gN45l+9eYkJVzsGdvGwoDKmpVNH9MmaMZDLubgF6egX2nxST3RcJxMUos7YDx2DknWuH0M Q1ZwIQGZyzHd6JQmW/nndyi5fSIBIq5ENHEP0YE6+Cxk5OwtPpjLVEQZeyVO/fWEy/Kgnc kdeG41JFW+YljPnxICVyshAAaKU4RdWpRWYaQwCccpTeUy/RDCCBJjh7ehSV5P6CJOdfT8 oi4KLKdHXWdZYEn0TzIEmASOnBnQWm6PLhW6k86LWieFgsHtnWKG/Mk2ZTtd5sxwdv55ll dD34wJ1i6rU8z0i9jPL+80PohWRghEv0gvhA4LkNc5avntqR+nvgu6QkedoP4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2UFTRig/9hy7rCWfAC5k+xMj8pTrKkn4hMbAB9MCIoA=; b=lwshz1Iv/F9i5Z1WMP3HxWxwMADVO6DuAB6bsOkrySifql7gFJeJ5x42YhlJvnRnjpdXMD i97+Acrmg/fSPboBV9S3NQ4vop6cLW8gJ1LR3E4f/DFngRCkBglfaNMGYfydFM9CE1PU7V GkflbHRqOJuJzj5EbPvQDtcBdE2RB8kLwbyQTNRW9rgeLRn7iSSq+Je9JYIThd9AeG1FcR DpnivErOMZpXHlvoQj1Yn7wPp2v+OzSZStHRbpO7ySkwixSn35FgRiHd+WQSe9uyVSob8W vZoEutN7YT7Y3MPLJ2Y9hpjeozmz/hm5wDXDXMKRX5bIbvDS9DwLiJHCelqDXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjdmq1Y32zglb; Mon, 20 May 2024 13:33: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 44KDXFTf045859; Mon, 20 May 2024 13:33:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDXFiO045856; Mon, 20 May 2024 13:33:15 GMT (envelope-from git) Date: Mon, 20 May 2024 13:33:15 GMT Message-Id: <202405201333.44KDXFiO045856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b780b6508b58 - main - diff: Warn if the atomizer detected truncation. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b780b6508b586f52126037fd748fe74dbeb12495 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b780b6508b586f52126037fd748fe74dbeb12495 commit b780b6508b586f52126037fd748fe74dbeb12495 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 13:26:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 13:26:46 +0000 diff: Warn if the atomizer detected truncation. Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D45219 --- usr.bin/diff/diffreg_new.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/diff/diffreg_new.c b/usr.bin/diff/diffreg_new.c index 3b50dfd5940b..a7a40ec12ec9 100644 --- a/usr.bin/diff/diffreg_new.c +++ b/usr.bin/diff/diffreg_new.c @@ -218,10 +218,14 @@ diffreg_new(char *file1, char *file2, int flags, int capsicum) rc = D_ERROR; goto done; } + if (left.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED) + warnx("%s truncated", file1); if (diff_atomize_file(&right, cfg, f2, (uint8_t *)str2, st2.st_size, diff_flags)) { rc = D_ERROR; goto done; } + if (right.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED) + warnx("%s truncated", file2); result = diff_main(cfg, &left, &right); if (result->rc != DIFF_RC_OK) { From nobody Mon May 20 13:33:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjdmp3QQLz5LGvk; Mon, 20 May 2024 13:33: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 4Vjdmp0vFtz4Nwb; Mon, 20 May 2024 13:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpkUYWUzHhaPdfnTN/qjWdIM63B53FbAnNqmi478gMc=; b=jnFtBotsdLNiU8oya6DwsdjiHzG1G5ieZj2hWM8BdBw2VUr8pqdQkop6OUcuJtkVxeyOf2 jx3A3id27ybz6n1agH3EMewyzjddYWwxd86trHQguJFkGpQjW4BOx89dwxfL7xo/S4LVjl 7Vqr/ZepK6RPkdM3ia6Qzsp4aWoMrR7PIohfPtoIW1XObHlHNdMt4E09j6ql9ICZEhoKzI 4Ky996fuxmPKL0wKPBj92s8+YydtoWpA43qcU9X3u5n+Wya8ZSMhpJHcmbVs6YNAZfOtn9 NrTCsTr6hwS/KaIBNMb9SjgMo8kmIKly7dEOc5otHxELoHqEQe97Y9FPVCUCsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716211994; a=rsa-sha256; cv=none; b=Avkug74CyXYENTI8WXQneHBk3m37ukfLvMZEeexxzc5ytoYYGw4Q8l3sKzNAUzeLv+5UXv ZHHYpTwkWCkbxTphD598Uzl9MPca1NcE5vGbCOV83d0VA36b6nrX2VE/7wIqwXs3JexMQP JfxeSqZKS2E3oBIvqSywO3MOUoDd4dlrNwqkAqDGQwdBWp0kdHL5EF2UmHDfVWqHQDxqzi gs3NDT8qJEbpW7r2TlOo8Ru24zsHLUWh4kThBHl6xRQL4IgSfIC/BoGM1Qg4L8eNznt4i5 1k3pz5VRB8s/BuKE3VUKohk15qQlYJr+ssrWtWVy8czUVbArpy+AdKlK+lAFDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpkUYWUzHhaPdfnTN/qjWdIM63B53FbAnNqmi478gMc=; b=sZ+Sfk55vxCElPQvHm1nE7pGurCbgZxMp7TzQuwDVNC7uSnvYm2+YExKcE7Xumsk+aTq9Z kS2Ob43UYdHELDD1YPMWc6b9bsPtrPFTg9Hr1cTBJSPtNlTJYLqIcLXt70XAfmYa6En3KS wQQeyC23awsgxH0FmDVVCFSQ7rWV2refYFg1eHITeYGJUJc//WD0Dw8KoVUILw6WHRU4jG Lsj5gV880Nn54lN54Y7jf9uLv78HIiC7u0UWIXvbndWTVZwOdyaGF5pWHtJFCzYhcCfetc RUUEC8p/VHLoo9sepnTwAbbsL4hNxAU81YKptq9rzLqZTTpFLK7JL+cC9G369Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjdmp0W0DzgL7; Mon, 20 May 2024 13:33: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 44KDXDLq045803; Mon, 20 May 2024 13:33:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDXD6D045800; Mon, 20 May 2024 13:33:13 GMT (envelope-from git) Date: Mon, 20 May 2024 13:33:13 GMT Message-Id: <202405201333.44KDXD6D045800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 02d98d1850f8 - main - libdiff: Add a test for the truncation issue. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02d98d1850f870e535b93dccb7284dffe81d65d7 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=02d98d1850f870e535b93dccb7284dffe81d65d7 commit 02d98d1850f870e535b93dccb7284dffe81d65d7 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 13:26:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 13:26:42 +0000 libdiff: Add a test for the truncation issue. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D45218 --- etc/mtree/BSD.tests.dist | 2 ++ lib/libdiff/Makefile | 5 ++++ lib/libdiff/tests/Makefile | 8 ++++++ lib/libdiff/tests/libdiff_test.c | 61 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index d0451081022b..3f447f9ec25e 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -419,6 +419,8 @@ .. libdevdctl .. + libdiff + .. libexecinfo .. libkvm diff --git a/lib/libdiff/Makefile b/lib/libdiff/Makefile index 3fa8e6b05d2d..8541ff424de2 100644 --- a/lib/libdiff/Makefile +++ b/lib/libdiff/Makefile @@ -1,3 +1,5 @@ +.include + LIB= diff INTERNALLIB= # API not published or supported. @@ -12,4 +14,7 @@ WARNS= CFLAGS+= -I${SRCTOP}/contrib/libdiff/compat/include CFLAGS+= -I${SRCTOP}/contrib/libdiff/include +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/lib/libdiff/tests/Makefile b/lib/libdiff/tests/Makefile new file mode 100644 index 000000000000..278ad7c95dcf --- /dev/null +++ b/lib/libdiff/tests/Makefile @@ -0,0 +1,8 @@ +PACKAGE= tests + +ATF_TESTS_C= libdiff_test + +CFLAGS = -I${SRCTOP}/contrib/libdiff/lib -I${SRCTOP}/contrib/libdiff/include +LIBADD = diff + +.include diff --git a/lib/libdiff/tests/libdiff_test.c b/lib/libdiff/tests/libdiff_test.c new file mode 100644 index 000000000000..f12717686721 --- /dev/null +++ b/lib/libdiff/tests/libdiff_test.c @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2024 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +ATF_TC_WITH_CLEANUP(diff_atomize_truncated); +ATF_TC_HEAD(diff_atomize_truncated, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verify that the atomizer " + "does not crash when an input file is truncated"); +} +ATF_TC_BODY(diff_atomize_truncated, tc) +{ + char line[128]; + struct diff_config cfg = { .atomize_func = diff_atomize_text_by_line }; + struct diff_data d = { }; + const char *fn = atf_tc_get_ident(tc); + FILE *f; + unsigned char *p; + size_t size = 65536; + + ATF_REQUIRE((f = fopen(fn, "w+")) != NULL); + line[sizeof(line) - 1] = '\n'; + for (unsigned int i = 0; i <= size / sizeof(line); i++) { + memset(line, 'a' + i % 26, sizeof(line) - 1); + ATF_REQUIRE(fwrite(line, sizeof(line), 1, f) == 1); + } + ATF_REQUIRE(fsync(fileno(f)) == 0); + rewind(f); + ATF_REQUIRE(truncate(fn, size / 2) == 0); + ATF_REQUIRE((p = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fileno(f), 0)) != MAP_FAILED); + ATF_REQUIRE(diff_atomize_file(&d, &cfg, f, p, size, 0) == 0); + ATF_REQUIRE((size_t)d.len <= size / 2); + ATF_REQUIRE((size_t)d.len >= size / 2 - sizeof(line)); + ATF_REQUIRE(d.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED); +} +ATF_TC_CLEANUP(diff_atomize_truncated, tc) +{ + unlink(atf_tc_get_ident(tc)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, diff_atomize_truncated); + return atf_no_error(); +} From nobody Mon May 20 13:44:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjf1m40t0z5LJHS; Mon, 20 May 2024 13:44: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 4Vjf1m2LxPz4QFL; Mon, 20 May 2024 13:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O92m/83AwjQxcMCZRUeYXKll791XU4gHHtX3UphlaG8=; b=WTG+/+bqnguHHAEdpa9wMzWq8UI6LyvUX2NfMIDTuvaAplRoPK1AR4QAafBm/Qf4cNtKVj 3fWV+Gsi4c1it+H1XPTCl9jn0d0d5QCE0JJC2n/LILjgKpLaLT5YuvLmaz2D3K+cn2OyRE t/LVB82JMbVaRb1FWKUZ/StfHYXA8kvcguntbWNoUUVlg9LS7t5Ksjz42xXd3/mgtgQblI A+Mi+GBZq+0ztxyj2haqcoQqRJZTaAJzBJzoEtt0k8IG66cWC48G+67suTLZ23ngXSBq4a OcQaqLaQ7nGvdNBRhvlA8KJCJnMKPn73JuAIqqwRIMSkbEHPrB3uVfE/z4426w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716212668; a=rsa-sha256; cv=none; b=M6ZjsCPu94Ox0K7zpaS/CWujRFYLlm/auZq/rymb6u4eQ518r/51K76Av5ywnPuwSgQDAk ttf3vr3QsAgu6KKDt3W++cHSae7Rr+7lXpSNfc4Q8umc6dsaA3gNe2QlYUAjmVk1QZWrfX vfPIMJLMvpjmEjVG4z8PrTKq9f2HTSDxbldvNBSTU8h0kNFUCnHeuA02dQZUnqPkD7X4AJ 7dIi44wRSGRtDHsx73LF1qYToftD1ucvnixhTJXbAPu1hEhWt7wLa6HGiDPGY18cBtL2ph 7Rf2TVLTnih4wRa+tOs+KJ1l3aQrdMt5LWVowwrIp66cNrCrxdP5IstjGsgZAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O92m/83AwjQxcMCZRUeYXKll791XU4gHHtX3UphlaG8=; b=ZaBm5y+Wi5wclg7imHusuMrXrZKg/GEqDYitIiLIjkYaI8Ld/ZI0WmFZgKuHCAZWnsBLyq hQ1bB3gzWuQANYref0dlT24u+fwnwxz07E+HI3ot1XmXjzXBXsWxDNBcqIQ6Rg/7uVy020 HHxfM5d6jVuYMczX1xBrBuN6XZ/RoHqFFMrK/XgXYI8fIQEKWLCmL08GLkdvJekX2tffyu HLVQ8+V/PKGyZAWaPeGztFD1wRrkGQRlT5O7HIRuBMvRayR0vUCZu0UXRSOKyaWWBWQoCE peeqkM6+Oz5TWPyQwNhUhQVOOXDWUbzxduapptV94/f837h0ziKSjpy0qXqIDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjf1m1fM0zh6J; Mon, 20 May 2024 13:44: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 44KDiSLj062462; Mon, 20 May 2024 13:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDiSrg062458; Mon, 20 May 2024 13:44:28 GMT (envelope-from git) Date: Mon, 20 May 2024 13:44:28 GMT Message-Id: <202405201344.44KDiSrg062458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 0b39b2e2ddb2 - main - adduser: create dataset only if home is directly within dataset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e commit 0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e Author: Mike Karels AuthorDate: 2024-05-20 13:43:34 +0000 Commit: Mike Karels CommitDate: 2024-05-20 13:43:34 +0000 adduser: create dataset only if home is directly within dataset Currently, if the prefix of the new home directory is a subdirectory of a ZFS dataset, adduser will create a new dataset up one or more levels from the intended destination. "pw useradd" will then create a normal directory in the desired location, leaving an unused dataset. Check for this situation when determining whether to create a dataset, and let pw create the directory. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D45229 MFC after: 3 days --- usr.sbin/adduser/adduser.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh index 7c3fdb418179..ecac7478befd 100644 --- a/usr.sbin/adduser/adduser.sh +++ b/usr.sbin/adduser/adduser.sh @@ -474,7 +474,7 @@ get_homeperm() { # so, enable ZFS home dataset creation. # get_zfs_home() { - local _prefix= + local _prefix= _tmp= # check if zfs kernel module is loaded before attempting to run zfs to # prevent loading the kernel module on systems that don't use ZFS @@ -487,6 +487,13 @@ get_zfs_home() { Zcreate="no" return fi + # Make sure that _prefix is not a subdirectory within a dataset. If it + # is, the containing dataset will be the same for it and its parent. + _tmp=$(${ZFSCMD} list -Ho name "$(dirname "${homeprefix}")" 2>/dev/null) + if [ "${_tmp}" = "${_prefix}" ]; then + Zcreate="no" + return + fi zhome="${_prefix}/${username}" } From nobody Mon May 20 14:14:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjfhg1T9zz5LLQ2; Mon, 20 May 2024 14:14: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 4Vjfhg0x3Vz4W4f; Mon, 20 May 2024 14:14:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4iQoKYnRoAT4B9GCTpZnrY32E/z5YoJreyPGtbQDfQ=; b=f1mHoxdyO4uAUKm+92ZGm6tPgqhxM9vJLgQPsBzAkR8HuScuBzX+loLcfocJL12/GCzat8 Lcjz7sptRlSG/VEIXhIFMQNbzesIClKSgrSEbn+yQenM8VZ/varrLrUhiNL3CKeK0S4/i3 4GCqYGFqnvklqBY6IRhmFlHtuWxhF+lbVbV0o2K5DRY5+MkmkANEqFDTEikAHRktQG3ZSi olWCYK15dqv5hLqPRpjjeV8pbT+v+saPX0FPXYnsZD7Iz1JaFX5IIN8qNWu5bvMkmkcNpS 7m84igwaFBN4BPXuoozCbCeHJj7P/xddGKshMejToZOQwS6vW4H/yy7aPGQqqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214483; a=rsa-sha256; cv=none; b=NS8YM+rIpmN4g4AtWmkfMGxftZ8u8tN+ruNE3J6yI8rglRPQZlCYZbu0M8fD+rINsE53yK 6QQTbxdxNBPVwo4CWwmuF1tvxhEZCAVmeeTprVW5drOMMHmjZhVjYxNqXcNgf50SUzaIDi t4KUFn9spED0Xp8GHtpvWSJy01OEW5Ctz+Cd5FS7CZ7ixFDepXQSTCHr9LEVrRfOkNLLAa QOcq07DykepvqAgR9Se7zDImDkPuLVMLnIgSPPbiZ2/0OipCX7eu79rxi33JBfWU40FYq4 dA/AUZHD2UZqW8OY1xfXdYELAIBaiNML/c68Oni35rc4Lybf2ueKr9ftZya55A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4iQoKYnRoAT4B9GCTpZnrY32E/z5YoJreyPGtbQDfQ=; b=Gb0u7LaBu3rCzuYndpaNG4LecPYNcTBknq5YZG+lkHA3Qcif3qEyjC2B31WgdFOGJb2ElC MO8Hnm+6zSPdGxNgWhi5Q1H+m6gJ3xKFe+NVenHSgFyPTNSvaJHKgUorKUGdm45T3oSzjW RsCxOD0N1xu1HCeFcniPXSudU/hTzSK0FpX4oz6Qqa8GbDq/w1rtxo360rgk6/NxTZW15c HiDwQyvTwEDfBGxbxBGrLTuuQS0EoYPEaBPf8jvQJWDKeRkJntcF8Slh28dfHgJQaoeYvU gYc5nv1xJE/uU2waf7PQcPvdi0ygw6iDOO256oZVgPHoQYaWlukjtDDdmAfyng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjfhg0XSCzhL9; Mon, 20 May 2024 14:14: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 44KEEgun014282; Mon, 20 May 2024 14:14:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEEg71014279; Mon, 20 May 2024 14:14:42 GMT (envelope-from git) Date: Mon, 20 May 2024 14:14:42 GMT Message-Id: <202405201414.44KEEg71014279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2db2292dac73 - main - sound: Get rid of redundant assignments in chn_init() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2db2292dac7331be5414f86c3ef7863c7b6a4ac6 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2db2292dac7331be5414f86c3ef7863c7b6a4ac6 commit 2db2292dac7331be5414f86c3ef7863c7b6a4ac6 Author: Christos Margiolis AuthorDate: 2024-05-20 14:14:17 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:14:17 +0000 sound: Get rid of redundant assignments in chn_init() c is allocated with M_ZERO. Reported by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45273 --- sys/dev/sound/pcm/channel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 846885b9d729..039d9abb9da2 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1261,8 +1261,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, bs = NULL; CHN_INIT(c, children); CHN_INIT(c, children.busy); - c->devinfo = NULL; - c->feeder = NULL; c->latency = -1; c->timeout = 1; From nobody Mon May 20 14:14:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjfhh2lD9z5LLd5; Mon, 20 May 2024 14:14: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 4Vjfhh1yWJz4Vp3; Mon, 20 May 2024 14:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ltk0v2XuRTJn3PFr/ittL8wlvfFExaLq0lGiS2EQ/0Y=; b=mUhYjz1PIYLXiJbA9YUbYEzoz53GmidlJMoi5rus2dDRyVOlliRDwP/24AunshH+VTLQqc IYnejZhJioZE4A3m2YnUAN/3xUS0BI4Ec1pdmPUkQAvAOU61QFmh6HbhnKGH8dzqV1iVz3 xeIHtPR2Yeedw1RL2PQuEpc+tqKQFdFhx2EiPeAy7CV96WG4Zb3M9dVqHuxP0LN8AlxcDZ NsCwhCxYYt+zdzlD7PhzLUd4PRiHpBzYE+pHUg/FxZcv9zQa8GMsp114NBvDCR4PdQk9L9 6pyOTC4J5TPtDJWKz+/isHlZ2c9zPApI9ez9LcECBHhDp7P1C1A2FSzS3v6zvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214484; a=rsa-sha256; cv=none; b=ej+05j0sdvj7j2AB6iJJUemju9FhSO+Y46HZXUwwEmk4e7bhe9uJLQhd0b4Kr+0P0BdwbR ZmMUEP39xADiJVLrZyVROcLS5Z8AQZWan1M3mNIHbu8qkP91ElVx5u1v4Zv16MW6raMLFN C1OzKy0sCdvNh4Mi7MOvNWLw89uHbVI4NI8TI8v+YT3pTOB/fvTJRorpjqbfgB4TO3Eg6U /JmWanCm/swr1T5vbmmHtFZOoLDogKeYyjs8HdCS+tKOAmqqTSns6DMCnx4BeJ5BYJgzKx ZGH6X0R63GwHBJ68vro0nFbZtKIrZ28UhZp7O47f2ZIew7ant6zeYk4hzLMtxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ltk0v2XuRTJn3PFr/ittL8wlvfFExaLq0lGiS2EQ/0Y=; b=lg3CJDmFc6hZHKA5/NnYbP2bo1DNiQwN8ds84xS5M6yjJmP/GYYBD5eiDmY9sxC3YpNSv4 DC8rPshnJRSWrBh1DIplclSdANqpD0M5e9yxi69TgxeQ3OTkOoaOi+yhNAKhViOkxjhtiK hajsEYuMpj0LrZMvF1bXdTVJD7D35ujWtJYc5Vc0hVKzJcE13QcC86tN+ZQOOW+GahLOPZ cBo3/ZkLRGj89Ti1d0lfJmaaznEZbOUsEZiDsCrsUhHc5To33znCDWgM07XPOVyzETd/0h eKn+BdefcjNGcig4z5zkuEaCiONpqxwKXYLSxuYOPgaPP9iblt9I8iYEzfrf/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjfhh1Yx8zhYd; Mon, 20 May 2024 14:14: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 44KEEiGt014332; Mon, 20 May 2024 14:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEEiQm014329; Mon, 20 May 2024 14:14:44 GMT (envelope-from git) Date: Mon, 20 May 2024 14:14:44 GMT Message-Id: <202405201414.44KEEiQm014329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 5d1a5d6f1f59 - main - sound: Prevent uninitialized variable destruction in chn_init() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d commit 5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d Author: Christos Margiolis AuthorDate: 2024-05-20 14:14:25 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:14:25 +0000 sound: Prevent uninitialized variable destruction in chn_init() If dsp_unit2name() fails, we'll get to out2 with b, bs and devinfo uninitialized, which will result in a panic. Reported by: Pierre Pronchery Reported by: Coverity Scan CID: 1545029, 1545025 Pull-request: https://github.com/freebsd/freebsd-src/pull/1240 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45272 --- sys/dev/sound/pcm/channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 039d9abb9da2..a18ef1cf4234 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1236,6 +1236,8 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, } PCM_UNLOCK(d); + b = NULL; + bs = NULL; c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK | M_ZERO); c->methods = kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO); c->type = type; @@ -1257,8 +1259,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, snprintf(c->name, sizeof(c->name), "%s:%s:%s", device_get_nameunit(c->dev), dirs, devname); - b = NULL; - bs = NULL; CHN_INIT(c, children); CHN_INIT(c, children.busy); c->latency = -1; From nobody Mon May 20 14:18:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjfnM5Ql4z5LM8q; Mon, 20 May 2024 14:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjfnM3B8pz4Wm2; Mon, 20 May 2024 14:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0JYeWCjSXQCLgGEzIxvIWjpzuhvJxUyVgqayv+lANY=; b=jzcCHjwA1l3jfbYxDKt+5C4wvxR+9Rzk1Jwe2ax4uv99UjEpYjWtlHKYYxNNjdhG1qiKZu t9Stt3xDGolAwXeri5RzwS726/PlVSeB3ZBc9Fuzlu9tTKRuMBJUzL2f2M7nwVDb8x+luH rq96D5pF7y1sECG5bXiVUI8I5kijardzeycdcTfLQtQ4soUCxBlaLoxlK8BknN5s+IlnA3 xmZyhdZjV8Ol+nTkccZm1Mv0otbqJm2726vVb7yQ0Qr7Ow3xXpJcxW29upsGuqFq0lSLK3 KjZFBG7zlEOb9TbBWKlHNB9rCfo2El8rNLC88wWQnEzQgnGRvQ2u9JCKqZtCUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214727; a=rsa-sha256; cv=none; b=U841UP4Ybt+w+3Mb+LKW7eKEngaCK3acWT/LTeMy4t023AqtlSrpVcp7x1oYQh9l2NNI/U gmxGnEevFEZASJD7jrstRFJ2unPrWkK0EB/tce3o2pEPvCnS6qXoYqilXSCl1SbtE1R5+k Hm7cDbnMBdKOR/niDejeR/Akn623ws5ZHUQrUWDLgkbIFvat8ruuyuV7TFjFQsKkLxv49A MNCZxed5n2J2JMnoyF12VBF/tfgHPdbyaJB9IP/GIs5sBcl0j58p9WzNwvN+fNWo+ptX7A WyB6zl1/k9tBF425Ipo3aYbVAWjwoBmKU6p1OpKbDylk8qvPJ189H6mAqqwoTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0JYeWCjSXQCLgGEzIxvIWjpzuhvJxUyVgqayv+lANY=; b=UpXRPUOMJnaq0/GK6/fC366OpJD4kCDybjrZWEZQuY+caveyyW2q+7WrBol8k4YVXEbUK2 5HOpOcZc7fwVjY47My4HmnVVPSM7ukPOc318Wl0sYF5jherQN4VOdxvLrux99N16YfUNaE Wdg9EMNrppbmqzH0S3qtd6j5WW6vmuVZU1XS3gYkGhKJ8C1a5eCA5b64Z7+3VB8CUjH+hb 3IlvE2DPljmVrwnD5oNfFIro0BNQYoG4HfqE0yJwltVIB96cEHKBigU3FI2GZZSLBuJqRB osrBGBR5JKNWOZIDUeFGv+JWDcwXHSbiRXHN58sIoiYNOxPCjZ8eqM1nQGqqfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjfnM2nQ8zh5M; Mon, 20 May 2024 14:18: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 44KEIloP014999; Mon, 20 May 2024 14:18:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEIlfO014996; Mon, 20 May 2024 14:18:47 GMT (envelope-from git) Date: Mon, 20 May 2024 14:18:47 GMT Message-Id: <202405201418.44KEIlfO014996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 074d337ad618 - main - sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 074d337ad618f9cc2a1d5ab18b484928e57bd72b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=074d337ad618f9cc2a1d5ab18b484928e57bd72b commit 074d337ad618f9cc2a1d5ab18b484928e57bd72b Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:28 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:18:28 +0000 sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* SNDSTIOC_ADD_USER_DEVS* expects a user-supplied sndstioc_nv_arg->nbytes, however we currently do not check whether this size is actually valid, which results in a panic when SNDSTIOC_ADD_USER_DEVS* is called with an invalid size. sndstat_add_user_devs() calls sndstat_unpack_user_nvlbuf(), which then calls malloc() with that size. PR: 266142 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45236 --- sys/dev/sound/pcm/sndstat.c | 5 +++++ sys/sys/sndstat.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index edb33e92ade9..f310d8f3bff3 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -864,6 +864,11 @@ sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data) goto done; } + if (arg->nbytes > SNDST_UNVLBUF_MAX) { + err = ENOMEM; + goto done; + } + err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl); if (err != 0) goto done; diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index f0e4d352242f..8a49042b0453 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -74,6 +74,11 @@ struct sndstioc_nv_arg { #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +/* + * Maximum user-specified nvlist buffer size + */ +#define SNDST_UNVLBUF_MAX 65535 + #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) #define SNDSTIOC_GET_DEVS \ From nobody Mon May 20 14:18:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjfnN4mRwz5LM4X; Mon, 20 May 2024 14:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjfnN48vMz4Wyp; Mon, 20 May 2024 14:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1LTbhjjqAWWKeM4naCzL6O4ixa/W54Ra15mLqT2RY0=; b=J7Miy9kvfeLYychPjoHWrxVW0SAuGDacqPxf0AW2QrF/ZLPEzNkMhtajBCCvEBKi6O9Cb4 Q845eLZSbItUufd0I1EFlAFjb3kErcNqdZ63sdg+VVgm68Kp5UP/eCnJ50ir+lRjyFQoOb vMCH2npKId8ZnmXg04/fhYkg0TDpW4UVbtwgjdw0VI9VHQiJxNPVSzI3cs+UsKS17Lk6ai yI9IQQqFZSOJOSXonZnJWb+zcE2Af86EeDYZYTlX9tVl71E7sAtJYxUPr41nPWPM8Fbnpl tn7JGyI1mWNIMLNoFl0ZH31x6dT+mhYsDCXXHQkEsj0MJO+Jof7BcYekLd9nZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214728; a=rsa-sha256; cv=none; b=mOR1Kz937SDxQKK55+cdf4mIfvQi24xoyFXZPhu8bMQWrSQ08mK10LttLSjZj6Zy0MrXVn FSdf/IRyJVOHIEIMNj1bjMe3U0d611zK5Lfy6Iewqg9D3LjZS6fA6c1s7sZKlolqufcLK5 AO35L6NtGR/F1dwFWYhKM03EUq2//JpoWVe54K2DFHgNB1Ues1tpTVyQZH8rT4FketQHjj 6kTxp5wcHHuz7Kd1UG5aiN6reGmmEsNOjJ+w607+VTzPYwmA9+yl5Ft9GDs/m3wRFuKEdR LJoDWSfYTWFnEHgu8xV+jLpP9GjbqL4+Go6Yx5zB3AV/yX9mpw/OPu2m2AlAzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1LTbhjjqAWWKeM4naCzL6O4ixa/W54Ra15mLqT2RY0=; b=mHzjq+CIzVL1Y+ebp/uv/GH5UcDF78Q0pY6i61s9Q7hXVLamZBu1Mytpiz0PyIA8xizQU7 oe6Al3XVpkHhY2b6iNa7zWfO57CDqYXj2PA8/7kPLxe/f45kN9UtG6QhmFtA5UrcAoWNAf GmotIhqXFwU223JqNIr3E6CstoWD+VDtRhS1gO+a8eqkqMhPPJI9hUy1WlmQg5uruMqyxM s+511wPwVemYWvcTPb0n4ZTX37XQww8ds9KMIiRr/IyKKSmXXaKCvJoB8XzLwfW9xR8ce4 x0tmbXd4hTbH4alPNfwnKw2Y/z18UFF/ln34A/kUJW72gBcuZ+HhE5sCf9o7dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjfnN3lvVzhYf; Mon, 20 May 2024 14:18: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 44KEImHi015044; Mon, 20 May 2024 14:18:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEImbA015041; Mon, 20 May 2024 14:18:48 GMT (envelope-from git) Date: Mon, 20 May 2024 14:18:48 GMT Message-Id: <202405201418.44KEImbA015041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 64f4e2db6d19 - main - sound: Correctly check nvlist_unpack() error List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a commit 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:33 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:18:33 +0000 sound: Correctly check nvlist_unpack() error The current check is never false and if nvlist_unpack() fails, we might panic later down the road. PR: 266144 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45237 --- sys/dev/sound/pcm/sndstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index f310d8f3bff3..bbcb2fda7c29 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -705,7 +705,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl) } *nvl = nvlist_unpack(nvlbuf, nbytes, 0); free(nvlbuf, M_DEVBUF); - if (nvl == NULL) { + if (*nvl == NULL) { return (EINVAL); } From nobody Mon May 20 14:29:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjg1d6DDwz5LN63; Mon, 20 May 2024 14:29: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 4Vjg1d4HTBz4Yxm; Mon, 20 May 2024 14:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716215365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIe5xG0z5+jxqrQyn/I3hC9MmT0hv94L6JSS1leXRB8=; b=CE3xkRrSNDE34kQi1RKmDXZop672j29rIq77Zrvw9OGn2kFzjbC12L3EA5h6vPRe1Ko2Bx hzVZz+NoCipK9GAKDwbW643kWTr8KSbYrxyIVHTpxay8rOeLawdXSXOhN0HsP5TqvGxLJX N3hWgQeYJGTF7IrR2FCTcxX990zYrx5A5nwnxrQ2ip/TwwhmQk75cxHvlF1M2aKF/RASm0 0vpU9BAAGNwjTnZJJxzBaweYT7eEVy0zAHJFLvRuGyi6G9qu30tkpsuFONjXaKRdUdS6M6 wKpEL8T4zUgugYWfcLp2LD/ZvvcIVKo9fHvx6GpD58z5rWyE7g4yaEjO8XiF7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716215365; a=rsa-sha256; cv=none; b=Fr2AmCBPkT2mFsrbsKS1+KXi+qeoGsKSYfSO1JbkNEaPhaXg05p/q5mlGN3cPIOvkjETXQ M0JoP9/wJriDP1HVDOfRCW2Vh61UCaznhhj2hStXosjbeSJF4FTRugyF2XZ4Ks0Y0nC0IH 2zpe7Lh4+AGbNyugSv8+knTt2OI8VYtAiG6Jn472l9CsLIJs8RVR4z6402PWe4GW6AT71a PEEGthj5puT5F2IYXYYEU45OngYUSJ5GKNPWGIGZQdKgizvQW1TBNsWVz+FjMyhPd0DNV5 vh3LdVrUrVE9TGbPwN03oBDpl9t5CxKZj4Vi/Mr256+Tpi+noxLsOqqi49JpyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716215365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIe5xG0z5+jxqrQyn/I3hC9MmT0hv94L6JSS1leXRB8=; b=yqTYHkPEiykIM3hDXFW5F8UAzL4jYMVeamkvJPw+nwTHmJcq4d401aC6UaKif+n6uRTUrr n98jl5UDNAZulfEF45lp8Z87LynIiBLe0P/EkdzyDye531UCJ08EPyQZ4b+YxopBPBJm6+ 5K74MkUXtyt07u1tOX7KjeVujQvzCjsQfcDKrwX2pEX4mDTi92d61Lg/sGltXMhAWrYXyL hl+dXOl6+Yd5Byv9zXVpwFaP5jcEqEBI/YnhjBPC9vuGdXkbaPRJtQCd1vwgG4engosSIE Sc9h6lYrREyPqCyRH+uNz/mk91uw0FbeSjG7qhPaaedcKc0BJ4roe8N6sRZXyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjg1d3tl5zh5h; Mon, 20 May 2024 14:29: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 44KETPb6031588; Mon, 20 May 2024 14:29:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KETPgX031585; Mon, 20 May 2024 14:29:25 GMT (envelope-from git) Date: Mon, 20 May 2024 14:29:25 GMT Message-Id: <202405201429.44KETPgX031585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 9c7f83bbb4cd - main - diff: Nits in tests. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068 commit 9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 14:27:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 14:27:50 +0000 diff: Nits in tests. Sponsored by: Klara, Inc. --- lib/libdiff/tests/libdiff_test.c | 1 + usr.bin/diff/tests/diff_test.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libdiff/tests/libdiff_test.c b/lib/libdiff/tests/libdiff_test.c index f12717686721..e82a36f3d38a 100644 --- a/lib/libdiff/tests/libdiff_test.c +++ b/lib/libdiff/tests/libdiff_test.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 9a17d180da02..ab731fa32d26 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -96,7 +96,6 @@ b278988_body() printf 'a\n\nb\nn' > b278988.b.in atf_check -o empty -s eq:0 \ diff -Bw b278988.a.in b278988.b.in - } header_body() From nobody Mon May 20 14:48:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjgRw6ssgz5LQ1y; Mon, 20 May 2024 14:48: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 4VjgRw6NF9z4dbb; Mon, 20 May 2024 14:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716216524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cW8b7/zNaY55Dtpw5XngowMhmK8VQlL+SLfzWPJ7v4Q=; b=Fp+uDlZA8dzppz+DsR7EPU8x6CrwK43rFb/1KL0zE4Nc1oKJiJ1mVXV75ClPYHnR7lCbm6 X/ftG6cBAzv9lmsNULyU/I7cJ9QrN7fPkVNSLZkCg1SSNWY4WIJ8Ba9ZcLmtSYFHGOMNXg 2Rzsw24OBcoDilcYMYlQApTzB75Esm0plWL2/axCyowsZCeBY7d69+m+2vDR1W+DHGZeHs dvKltlBLZ98VSfJaZh+3y4qbJQweuqNDYdEE6BFVBz9BLQNBKd8JxidSR0OT8iCdqZk6jN 94wTWlY0p25fAOmyB47/W3XKFv9bUyYrjVDsqFedgCqjjnF4TFSVglOQcDQOAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716216524; a=rsa-sha256; cv=none; b=SDpk49kXWIVN2b3fMULGyu04uLn+lg4b3FKMEMlZ4f4OOK1SsYQVksCKbAMOStrfy8k6Q5 1mvrmS3ltKV+wbVH8w1Jh2Kx988Ag97FffFGBPuHMwcMWS081i/w40NbS831a3lBhIwO/I yeCFocK9pfBfJ4xAqtBMGLYhzrnjvN5uzTyBsDDTbjZ1NgwH7fzUWKtCdlTY5jnps4W8RQ fgOf5YJ7kaxKN/FDL7e9K6n7jfiqP1z94VQyA33LvRq2AKRd+LBiSrjv3cXFv/2cPDtdMJ oM+IskqYYD4PhUhGkBqhO/brG3FQk+duQ7HznDxCvqhp6IOV3GQwbAvtk7ZuXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716216524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cW8b7/zNaY55Dtpw5XngowMhmK8VQlL+SLfzWPJ7v4Q=; b=LRZTk22JeiD6t/RAmp0MUv8YOabz8iDhq3xK2VkR/uh14l9KbXkWy/1x1luUX5byDuOQ1n urAuQjeSXxBrbrb0zLA/MzofL0yX5TLqgWkOjr/mAjlppomGUp9hbgs39HTYfhGGJh+Lp2 9JYVb/jYLhsayp+/ASV31n9pAA79+fnfgXpEzSBPiXtivXFjihl4pmdf8rotP88SCU9gMj OQD93PbcB9D2OpvQ0aEHypsBaFwD7GJacECmyslglRFZL3Q8LRjjHhIS65bpE63RO7259r z0llzERz3V6gUK0grgxSLPC8I/IgSx2efVlFv8oJPBcgA/Wze/M8asl/JLfIeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjgRw5cSszhwK; Mon, 20 May 2024 14:48: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 44KEmiQ3066207; Mon, 20 May 2024 14:48:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEmio6066204; Mon, 20 May 2024 14:48:44 GMT (envelope-from git) Date: Mon, 20 May 2024 14:48:44 GMT Message-Id: <202405201448.44KEmio6066204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6edb14c006f6 - main - Make WITHOUT_UNDEFINED_VERSION the default List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6edb14c006f6eafe1f31f54ce7fe2158321fa18d Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6edb14c006f6eafe1f31f54ce7fe2158321fa18d commit 6edb14c006f6eafe1f31f54ce7fe2158321fa18d Author: Brooks Davis AuthorDate: 2024-05-02 17:13:39 +0000 Commit: Brooks Davis CommitDate: 2024-05-20 14:40:19 +0000 Make WITHOUT_UNDEFINED_VERSION the default Link with --no-undefined-version by default. Will detect and prevent the accidental removal of symbols from versioned libraries. (cherry picked from commit 4510f2ca9170927309a423274e03f1eb8e27da27) This reverts commit b25ceb97eddcd58cfb2b433fe301ab28c678c249. Reviewed by: arichardson, kib, dim, emaste Differential Revision: https://reviews.freebsd.org/D44216 --- share/man/man5/src.conf.5 | 8 +++++--- share/mk/bsd.opts.mk | 4 ++-- tools/build/options/WITHOUT_UNDEFINED_VERSION | 2 -- tools/build/options/WITH_UNDEFINED_VERSION | 4 ++++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index f3e45ca8a661..12f78e20085a 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1719,9 +1719,11 @@ and that the runtime support library is available Do not build .Xr unbound 8 and related programs. -.It Va WITHOUT_UNDEFINED_VERSION -Link libraries with --no-undefined-version to ensure all symbols are -provided. +.It Va WITH_UNDEFINED_VERSION +Link libraries with --undefined-version which permits version maps to +contain symbols that are not present in the library. +If this is necessicary to build a particular configuration, a bug is +present and the configuration should be reported. .It Va WITHOUT_UNIFIED_OBJDIR Use the historical object directory format for .Xr build 7 diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 38d53cc6bf30..65ae4f4cfa7c 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -68,7 +68,6 @@ __DEFAULT_YES_OPTIONS = \ SSP \ TESTS \ TOOLCHAIN \ - UNDEFINED_VERSION \ WARNS \ WERROR @@ -81,7 +80,8 @@ __DEFAULT_NO_OPTIONS = \ PROFILE \ RETPOLINE \ STALE_STAGED \ - UBSAN + UBSAN \ + UNDEFINED_VERSION __DEFAULT_DEPENDENT_OPTIONS = \ MAKE_CHECK_USE_SANDBOX/TESTS \ diff --git a/tools/build/options/WITHOUT_UNDEFINED_VERSION b/tools/build/options/WITHOUT_UNDEFINED_VERSION deleted file mode 100644 index 0e58eb00f3c1..000000000000 --- a/tools/build/options/WITHOUT_UNDEFINED_VERSION +++ /dev/null @@ -1,2 +0,0 @@ -Link libraries with --no-undefined-version to ensure all symbols are -provided. diff --git a/tools/build/options/WITH_UNDEFINED_VERSION b/tools/build/options/WITH_UNDEFINED_VERSION new file mode 100644 index 000000000000..71b048349a6f --- /dev/null +++ b/tools/build/options/WITH_UNDEFINED_VERSION @@ -0,0 +1,4 @@ +Link libraries with --undefined-version which permits version maps to +contain symbols that are not present in the library. +If this is necessicary to build a particular configuration, a bug is +present and the configuration should be reported. From nobody Mon May 20 15:48:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjhmc5Shnz5LWcH; Mon, 20 May 2024 15:48:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjhmc51S2z4r40; Mon, 20 May 2024 15:48:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716220096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wc0jJXdJRJCfOh+9e+YdO+LwyFl4mxarwcEKHs8BFIc=; b=EENyhJKQSePa5dY5B4khV+X6K4CGYAQGCXyRgSXT2llQ6JcLCRWwgLtJfHqkrjHj5Dtnx7 6U+RVvxLM6wxA7kmhbK/M+VNHgHwYiFfJ/cVZWwXZx2JRBDJwNYJwnFQjn6+zfras6Oejb Pet1eO0ydcpXPpLFunZNBCvc5ZHf5TI1GbkXPBnDnDOC6Tb6/zeQ+iAzl9+FfPN3cC/UoC VwUoq7374uXivjUYci+JbFkYtrKfDE7FPXG0Dg9JQdcuqLA2V2At8EzDXvNTKjGpDuYES4 4vvs2RZO5U6nHxu7rdi8TdaIfdwZQHaBzo4QcY7troZ13Bba7WVXYnpo0tzAuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716220096; a=rsa-sha256; cv=none; b=Zr+IM6LlA9iGG0TwJ8BpcrvY5cE597Uf+JTq712/SMmhU20xbK3wRDB5SZKpJk2kZD1rbB HOIChN3cg/y+ltJ5SA6rbWWPy53+o0LqK76WZ7nWYwCImyXnQ0FK/bIcAFq9fm5lW399dN YbvB0V0iy7UDAPhuWD66yh3S6ANKxuCKJEKNWeJnxgvrvQlrZiEGWVnqtCdI0TnbRWjE0m H8AK6w/DqqBRSRMNLpl7ZCvUxpvVRPn5Ec7xfOKDc95LN7w/s/xHoMzgy0qqV+7z127ZUs +wPO81e75Yv/NNaYap829RYRzQLRwNxnzywl3QmQdz7yPVkoqMAmq9Hw+PxH6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716220096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wc0jJXdJRJCfOh+9e+YdO+LwyFl4mxarwcEKHs8BFIc=; b=VMuONNxD9nAkF8EGwvHvITQlKN1aZRloc3818HpFU3mZI2Lj06IdSZDTZaDlJO+NA5zkb+ nrIIsVpTnB5oGBRJxXwMhuBPXzgWpM1iNWqWEbC00sGug/afXO7pk4UBhnDahRnBIpB6RF XQPjr2VZYTUrrfek5h0uuOjCszPiekwBHrbCGFx02Pc63KZkIwXzwFmTXy2xoYizNPyM1N lvFBTw7yCxjmp8BMGruFuhLO1NvmsiVWvcXmpKWHE+T6kyH1YuLTdlLzs+0hMN6JrlhrM2 LsIq8lL3j+stMEg9761UpRUzA2ka70siptwDV7pWE+1ZFODGEc9at6QBqB4eaw== Received: from [IPV6:2601:644:937f:4c50:59bf:dc4e:16d3:ef1] (unknown [IPv6:2601:644:937f:4c50:59bf:dc4e:16d3:ef1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vjhmb1hWNz1107; Mon, 20 May 2024 15:48:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 20 May 2024 08:48:13 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cff79fd02636 - main - linuxkpi: Fix spin_lock_init Content-Language: en-US To: "Bjoern A. Zeeb" Cc: Emmanuel Vadot , Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202405170559.44H5xD7d019861@gitrepo.freebsd.org> <2cd3e698-1b42-4e7f-93a0-aacccb55c8d6@FreeBSD.org> <20240517183350.e45f54df07f670980d5a51c3@bidouilliste.com> <0f2c4189-e259-4bd8-ad31-212a8df0e1b5@FreeBSD.org> <188o7q6o-n0rn-235r-76n4-779o555094r9@SerrOFQ.bet> From: John Baldwin In-Reply-To: <188o7q6o-n0rn-235r-76n4-779o555094r9@SerrOFQ.bet> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/17/24 2:36 PM, Bjoern A. Zeeb wrote: > On Fri, 17 May 2024, John Baldwin wrote: > >> On 5/17/24 9:33 AM, Emmanuel Vadot wrote: >>> On Fri, 17 May 2024 09:07:53 -0700 >>> John Baldwin wrote: >>> >>>> On 5/16/24 10:59 PM, Emmanuel Vadot wrote: >>>>> The branch main has been updated by manu: >>>>> >>>>> URL: >>>>> https://cgit.FreeBSD.org/src/commit/?id=cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>> >>>>> commit cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>> Author: Emmanuel Vadot >>>>> AuthorDate: 2024-05-17 04:52:53 +0000 >>>>> Commit: Emmanuel Vadot >>>>> CommitDate: 2024-05-17 05:58:59 +0000 >>>>> >>>>> linuxkpi: Fix spin_lock_init >>>>> Some linux code re-init some spinlock so add MTX_NEW to >>>>> mtx_init. >>>>> Reported by: David Wolfskill >>>>> Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code") >>>>> --- >>>>> sys/compat/linuxkpi/common/include/linux/spinlock.h | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> index 3f6eb4bb70f6..2992e41c9c02 100644 >>>>> --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> @@ -140,7 +140,7 @@ typedef struct mtx spinlock_t; >>>>> #define spin_lock_name(name) _spin_lock_name(name, >>>>> __FILE__, __LINE__) >>>>> #define spin_lock_init(lock) mtx_init(lock, >>>>> spin_lock_name("lnxspin"), \ >>>>> - NULL, MTX_DEF | MTX_NOWITNESS) >>>>> + NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW) >>>>> #define spin_lock_destroy(_l) mtx_destroy(_l) >>>> >>>> This is only ok because of MTX_NOWITNESS. Reiniting locks without >>>> destroying >>>> them corrupts the internal linked lists in WITNESS for locks using >>>> witness. >>>> That may warrant a comment here explaining why we disable witness. >>> >>> I'll try to look at what linux expect for spinlocks, it could also be >>> that we need to do this because some drivers via linuxkpi does weird >>> things ... >>> >>>> It might be nice to add an extension to the various lock inits for code >>>> that >>>> wants to opt-int to using WITNESS where a name can be passed. Using those >>>> would >>>> be relatively small diffs in the client code and let select locks opt into >>>> using WITNESS. You could make it work by adding an optional second >>>> argument >>>> to spin_lock_init, etc. that takes the name. >>> >>> We can't change spin_lock_init, we need to follow linux api here. >> >> You can use macro magic to add support for an optional second argument. >> >> #define _spin_lock_init2(lock, name) mtx_init(lock, name, NULL, MTX_DEF) >> >> #define _spin_lock_init1(lock) mtx_init(lock, spin_lock_name("lnxspin"), ...) >> >> #define _spin_lock_init_macro(lock, name, NAME, ...) >> NAME >> >> #define spin_lock_init(...) \ >> _spin_lock_init_macro(__VA_ARGS__, _spin_lock_init2, >> _spin_lock_init1)(__VA_ARGS__) >> >> Then you can choose to specifically annotate certain locks with a name >> instead in which case they will use WITNESS. > > I think the real confusing here comes from the fact that FreeBSD has > spin_lock_destroy in LinuxKPI which I believe is a local addition > (though not documented as such) for semi-native drivers using parts of > LinuxKPI and in order to use spinlocks according to "FreeBSD > expectations". > > I believe (and still hope someone would correct me) that Linux has not > functions to destroy locks like we do? I believe for rwlocks I had left > that remark on the review: > https://reviews.freebsd.org/D45206#1031316 > > So if you use WITNESS anywhere you could only really do so for > "internal" parts but nowhere in Linux driver code as that will likely > simply break assumptions? You could only do it safely if you added local modifications to the driver, yes. My understanding is that while we aim for as little modifications to drivers as possible to permit merging in updates, we don't mandate absolutely zero local changes. The approach I described above would permit selectively using WITNESS at the expense of local diffs that would have to be maintained across updates. -- John Baldwin From nobody Mon May 20 16:08:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjjCw1pZGz5LYCx; Mon, 20 May 2024 16:08: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 4VjjCv6ddxz4sw6; Mon, 20 May 2024 16:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716221307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kh5IZm9+wnDWvX6+VwyDteZEtn+dbRrMj4YpH4IzdnQ=; b=FhOOK7IlPuTGbG9hhJXZYEHd/J3UTynFtRLyhm6cAJBrMepkcEDOqgEWiDNuT5XDS54QE4 X1Stmt0yDzqDDwtFQuB0TDpgnHy8bNd6BfVJANCJfrDB/k3Dlf9m9e7Bq5TYvQH8d1F58f LRFk5MLqDtOFuR1FjjjCEdtZnkLxtcuIVJrB7gtokqL7d8TqvZjpVWx5hRQtNcjO+8Oz5T O/S+AdVi+10hjCaxEju3fmNwqU0MA26zvLqE/m9aKctQrJpUdO9yD1EGTZdlTAAddHxPDR WW+3M9kU/vz79/vZFih27w8zm5VRUQe8fYwtjLBMXgntxxmQ/C3oiwb1OwCPzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716221307; a=rsa-sha256; cv=none; b=xP3I7f8LkSbuYvzUBBEY1FsjqUy/IbI263szDLi76nlW+V+H2+NlSVKtFUH/3zUKmAIrbm OAHV7eF+sSIJYhSEY/8C6RdHiytFyMdiWkJO2mkoNNVBJrymCx8EJld1TlTFTNneJBFtVU 3Ijj+ONBpXLw8bbg22ykyuMJna/WOd9//J8O6A3wjDYY3PIHd8tSb9PbB2gNhTZeLBB3X6 66Mgffix71EpDeY7q6U3kVVOppKojTXwY8qF0hqQMACDIXOcoyMMNkl/wdzonHKzbjVa1s DAj0ulVaES5vn4fNnLiPRqE9fXLJEYPZbAI5g/5flgj1J43Tz/IKpYiUS+TCDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716221307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kh5IZm9+wnDWvX6+VwyDteZEtn+dbRrMj4YpH4IzdnQ=; b=yUUAG82ziW7cDff927HJMU6WqfUDsBsKM0oT81uKN6SJPgDxVops3prvPVgyOXRCSQujWY 9qwFacygUmFc4P3Sx+rkcj7Nhgbe/ABOZxxBip1248iKQks18F+QuqYv+mVd1BeED45/f1 mz1NK3BiWxavabMZy+CJSxNDC1hQP91oKmDI05DmSQryhuFmLsNHdGWFv3GqJTA5Bh2Rd1 xL1zIle/lkhDqK0IYhOBbfC0KqeQEoZX/oKemd/FCBkb7Iw5DpxG3bUsM9MrAQbso6W52G Ag3Zi14fUxJKIF9rTkiHGsJSbNn8pTf817k0+rUE1yivAp4ilvPwhF0o+rng7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjjCv6CrJzknS; Mon, 20 May 2024 16:08: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 44KG8R0T001725; Mon, 20 May 2024 16:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KG8R4k001722; Mon, 20 May 2024 16:08:27 GMT (envelope-from git) Date: Mon, 20 May 2024 16:08:27 GMT Message-Id: <202405201608.44KG8R4k001722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 37be4197f72a - main - man: the exists function needs to validate the first parameter List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 commit 37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 Author: Wolfram Schneider AuthorDate: 2024-05-20 16:02:21 +0000 Commit: Wolfram Schneider CommitDate: 2024-05-20 16:02:21 +0000 man: the exists function needs to validate the first parameter This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion) --- usr.bin/man/man.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 03803b777463..af638527f497 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -201,6 +201,10 @@ decho() { # Returns true if glob resolves to a real file and store the first # found filename in the variable $found exists() { + if [ -z "$1" ]; then + return 1 + fi + local IFS # Don't accidentally inherit callers IFS (breaks perl manpages) From nobody Mon May 20 16:40:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjjx075bsz5Lcbn; Mon, 20 May 2024 16:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjjx06dffz40TD; Mon, 20 May 2024 16:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vUJLccYZszNZTf8dojLppLbD9AfHWm5mtQUvxEH5Z0w=; b=l7N3OWgGUqtS1JUw/xOXu36O+XoFoxCRuXNnlGeffSkXiF5Szww5Ji69LSXrHIWqQdqBh2 gOz2lr4MdKHSDtHBVsKvKs81hfTlB4AstFSoJuCkNbZLbSEfnz9CTGfVTsZ00p0F/Z29mR EtuPj+bhATtIGnr2lnS2OfeuxN274+Q9d0MygXbdW5u/NgwhKKNSjNueI++H+HPTzBUEVN 7gPqg3/D7f5IEN8pztGbbu6hkARVICQOUorvk8lxHReP1BVlSY2ffHFVJUT8dWZzqiTqpz +v6Qswww9iVsekLjbOjN1iYJRyr6IXZt8zexGcGjQsWAFmdrdTBkJIKviQydVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716223236; a=rsa-sha256; cv=none; b=OO/oUt3d+0vwM6nXcewCQmzvnMrUyDemzcZm3BtQBdC/2o6hltv5opkjpZuur7Rl5TGpnb MiIBaw0bokGy7Y5ox1bvsq9KMv5vi36Y+FYz0nNiDv3z8Snzb96Y+lnIAfAkz62l7YJajn UQ02Whf7dlwkZENZ9GFia2Hm7PK1xyXBMx0RGm3miyj/JmSR4IgullH5LuJPmaICHPwZeh FM/jTY0IbSOHtlCAGGcvZqXJfdc5PfX6qWZZ+t7tvUo8cQjEWOF7LjTryQFbvvi0f2OrYW sHQxOur2MBXODxNwURlOveyt3C4bAx6jHNHYh1MU1ZlDMgEwkD3P2EV4/8b9mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vUJLccYZszNZTf8dojLppLbD9AfHWm5mtQUvxEH5Z0w=; b=oeNJKHyPnEg23Zb+AlpFx8zM1xnbpBEyCpAeT1YMk+sHuEHkjUG/5apcILYFmxQaLGK0qV u/E7sNASAkIsWXgE6dAiHufng5lWTq89cvNCvq6rjmPS65W0SmAzqQ2r7nVrt50Z0lKwWd M+uDTUkcg6v409WVoEV8Ou3oLaP3s3O+7zio1x1/hzhJJLqFy/zqh7beYBzFbiBJtDat11 3iWeSWB8DBCaz8aUl+24BTY+PTHG4AVv8b7jgPGYSj/RRfpn7EZCkkwFS3aVJLW/xTaTcq wyP9ylFYMEG8GrtSpJNwS11L7jVZOD83UzXKxkOcLkHpDuj6vwJjOJqxqhiB+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 4Vjjx06FBbzm3X; Mon, 20 May 2024 16:40:36 +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 44KGeaYT060835; Mon, 20 May 2024 16:40:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KGea7E060833; Mon, 20 May 2024 16:40:36 GMT (envelope-from git) Date: Mon, 20 May 2024 16:40:36 GMT Message-Id: <202405201640.44KGea7E060833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Renato Botelho Subject: git: 55d29905489c - main - bsdinstall: Fix wifi network selection size List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: garga X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55d29905489c975ee33b86d34f38e78b5ba29817 Auto-Submitted: auto-generated The branch main has been updated by garga: URL: https://cgit.FreeBSD.org/src/commit/?id=55d29905489c975ee33b86d34f38e78b5ba29817 commit 55d29905489c975ee33b86d34f38e78b5ba29817 Author: Renato Botelho AuthorDate: 2024-05-20 13:43:35 +0000 Commit: Renato Botelho CommitDate: 2024-05-20 16:39:29 +0000 bsdinstall: Fix wifi network selection size Use correct variable while creating dialog used to select among available wireless networks Approved by: asiciliano Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D45271 --- usr.sbin/bsdinstall/scripts/wlanconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 338e4f0a4109..f044bc1cba98 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -216,7 +216,7 @@ while :; do f_dialog_title "Network Selection" prompt="Select a wireless network to connect to." f_dialog_menu_size height width rows "$DIALOG_TITLE" \ - "$DIALOG_BACKTITLE" "$prompt" "" $menu_list + "$DIALOG_BACKTITLE" "$prompt" "" $NETWORKS NETWORK=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ From nobody Mon May 20 16:50:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjk8w3PtJz5LdBZ; Mon, 20 May 2024 16:50: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 4Vjk8w2wZQz41Ms; Mon, 20 May 2024 16:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cX5yT7l9bQcMoZh0pjh6XLEGfQAD5+KFU5GmUkxqZmk=; b=KoEANUEbuwtNmfc8sf3rw8eHRL70+MVFBkda0bXcxZLm3ZSnt1pfHdH8OsCYK0r3/GvaWM jTCjkC8ptrv3S7h/FbTPZSGUyEjulrUdv55UQQvqGUA6fjCYlBXn9U3OAIaae9SnlH+PpL PAX+S1J5Bs17raMmeTPrzoPdFl9pvQL0v/Daf5oQwRSGu5EApuRsQEBhnzpkd2IB9REQ1s umGmabDuKLn+arDpoOeHPHE2Si97EaJbfJERU4wVWk4ggNDOZrcJalAnsBSNAyPSjUMbgJ Iod3J6cTl8zakYXpvAKkPnDSvOzSttycIUkZb2D/0zRNkTv+QtwWOySAQjtmEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716223856; a=rsa-sha256; cv=none; b=mhteqpbZ7TIvef4dqo4NFlY5Gg6fV0bV1Hn/QbTsHsfzCP/J6tjYT4JyWTMzJHvZg6dj2B uVXe2KOQaSdpMKiUbMb4gw28h0F1Wl2x3WvGB+O80+9HG5f0Z8jiPhEDxTtv7oKVhGXPRY rgzXYJreTM+uUgkjNz6wFw0i6vdiLQf5nko89t4cqfRpmOxMhQSqR8ZkGc5koVn3HyZ5Wu C87lsJDTTJVTMCTl5eT3MQ0ELuv678uZ4THcCv1qeEXttSil8f4brd8eDUhbzOZD7WSXvL 3iqeJkQSEPclBsKJn9u8LC2aAHshFpWFGsCpgIPtb+UkOU5wx9pueyO06TnLow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cX5yT7l9bQcMoZh0pjh6XLEGfQAD5+KFU5GmUkxqZmk=; b=JPHnTNqi6uGXoW279nfusw3KuP2BW7SKPQq5F7jPn9pCgCF5LF+DccSqS3VaIEdfrXjY94 wm++podKWeRl8obNRsAPi5Ue9LSCML2BbEEo5b41rZUWLOJlJB+/eW9Tsz9rANPn1dapF4 exDVS0gU1DqMCV01PtB88eqXCdoHtWJu5CA5yHeKcnVcXLcYt1UwNxwpTmeTykByS1Ynd7 t24MM1EJL9+1jAQTWsM3B/94zakGhIeGDsFVT1v/w9u4oIieOOg1d6gkCkJWT+y6HEAn5p Je+5SoepwFPD3vYjzloJZFcPK0MLkn/v8fWitNz0wzyaiBYnhbErQCW8LG5myQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vjk8w2WtYzm1b; Mon, 20 May 2024 16:50: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 44KGouFY079285; Mon, 20 May 2024 16:50:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KGouqJ079282; Mon, 20 May 2024 16:50:56 GMT (envelope-from git) Date: Mon, 20 May 2024 16:50:56 GMT Message-Id: <202405201650.44KGouqJ079282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: da590a3e18cb - main - lock.9: LK_TIMELOCK is a lockmgr flag, not lockinit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da590a3e18cb883ba0444b78deeca5a2ed0b042f Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=da590a3e18cb883ba0444b78deeca5a2ed0b042f commit da590a3e18cb883ba0444b78deeca5a2ed0b042f Author: Ryan Libby AuthorDate: 2024-05-20 16:48:32 +0000 Commit: Ryan Libby CommitDate: 2024-05-20 16:48:32 +0000 lock.9: LK_TIMELOCK is a lockmgr flag, not lockinit Reviewed by: imp, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45246 --- share/man/man9/lock.9 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9 index 110fdd68fda0..96f617a72123 100644 --- a/share/man/man9/lock.9 +++ b/share/man/man9/lock.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd November 17, 2017 +.Dd May 18, 2024 .Dt LOCK 9 .Os .Sh NAME @@ -108,10 +108,6 @@ should log messages about duplicate locks being acquired. Disable .Xr ktr 4 logging for this lock. -.It Dv LK_TIMELOCK -Use -.Fa timo -during a sleep; otherwise, 0 is used. .El .El .Pp @@ -182,6 +178,10 @@ Fail if operation has slept. .It Dv LK_NOWAIT Do not allow the call to sleep. This can be used to test the lock. +.It Dv LK_TIMELOCK +Use +.Fa timo +during a sleep; otherwise, 0 is used. .It Dv LK_NOWITNESS Skip the .Xr witness 4 From nobody Mon May 20 17:41:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjlH96wb5z5L1wH; Mon, 20 May 2024 17:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjlH96QRSz47Ns; Mon, 20 May 2024 17:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716226885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TgJuvro6GBDnfxu1pbF+M12RZ3qWEq9YAG2cLVjJM1Q=; b=MWuDuvm1vDIHcIJetgR2L0rvE+l0NLcuSGcg52kaiFqdoflSENc87/CsB6WT9RD9qiIkL4 bOX/KDVkeynX4LnE0EWPFZ8m0YZD+YxV6XzQgIHcix7egAfJbITSya04tJc4Wx14E/zpfe yUKve4B4k0y4RtnIktAb95tj337CidPz2u9Q+oVIn8R5qfLu3KtrAGzlVqCzsRezX1c4i7 wsdd8PR7KLgiGg0cy+I8WPy5R8NIbL3U1y7blmU4i3tucSbuQhLpiN6EqzLXrAtOauVHKj VUYqaWP3PzscoFjDQEZc51Q/cRmy+dR2ivfPAzILEELo44xnzQCs82ARSqBbxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716226885; a=rsa-sha256; cv=none; b=dfC3P2NFEnDzNgEALO9H3D1XlGuoAhJXR+L6k7feYGFeYjtrfPalRkOJNeg79MiciXHL7r ixNjOVAbFhc6n09waNU+Gp74v33DzttZ3lzEMYr7hg17ZmhTSlNLRCqj6ySF64mkzXJLj0 AZK6NfVQXVPRtXtq/RqAiqw2ZwWalbNKSMW2gYh/+PQIkS7H66zPC2yDUGICUuf/PKzbay 0ILM8jViy0jIAKcrQG+JSfvwYrMm2/SFMTY5/pEAIuGZBiMSxFOv250OduZh06Z7gI9/zU PZ9vUB6d6yFcYDQ/o+YR9MycG5tsD2hqXM5q3YIEgWzqFRtGJFU04RRjvV/+bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716226885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TgJuvro6GBDnfxu1pbF+M12RZ3qWEq9YAG2cLVjJM1Q=; b=V6axSePkbT2V6Z51G48DssMfW0OiMMA6j0qPNwP4phEzN8PqJ0ss61aZleoEy5CBTC/kOf jaepNiS5HDWXi1SPY4uaLJx1fi3h+OjE69vMfgphkVRIrnnM55DDoGYJWSt4U9Qp1GvdpF 1iD3RIkXv9qqOEHiYgOqv/oYifd1uFbpGeMDApW+cm+yj3lG1FdSTbZuxeX/fx1MtcTBZv P3UF8ykiurl758Xfe5ndfKZTS2oZu+qpa6H2a+xT+7uypnjoEnmfCy1zlDmt+pxUwn/VUN W7065GKy0DsBEVyQdoTk8GnCnkx9Trs/cDI0WDn0akBG0BxL4Tk7nmv59SlG8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjlH962RsznCq; Mon, 20 May 2024 17:41: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 44KHfPVm069411; Mon, 20 May 2024 17:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KHfPB8069408; Mon, 20 May 2024 17:41:25 GMT (envelope-from git) Date: Mon, 20 May 2024 17:41:25 GMT Message-Id: <202405201741.44KHfPB8069408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: d59058f3b313 - main - sound: Make SNDST_UNVLBUF_MAX a power of two List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d59058f3b31353442497e728dd5beb80585ad8d2 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d59058f3b31353442497e728dd5beb80585ad8d2 commit d59058f3b31353442497e728dd5beb80585ad8d2 Author: Christos Margiolis AuthorDate: 2024-05-20 17:41:18 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 17:41:18 +0000 sound: Make SNDST_UNVLBUF_MAX a power of two Fixes: 074d337ad618 ("sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*") Reported by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45277 --- sys/sys/sndstat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 8a49042b0453..e0e403b1a72a 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -77,7 +77,7 @@ struct sndstioc_nv_arg { /* * Maximum user-specified nvlist buffer size */ -#define SNDST_UNVLBUF_MAX 65535 +#define SNDST_UNVLBUF_MAX 65536 #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) From nobody Tue May 21 05:54:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk3YK4KYvz5LLN4; Tue, 21 May 2024 05:54: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 4Vk3YK1vCrz4L7k; Tue, 21 May 2024 05:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716270885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOMtdVuUOQ9eR4jJc0ME7+e2/eCo4BJelMVCEOIPU68=; b=DA2WivopHQHhEKizwFYRCAphA4/BHYq/H//j7FprmuG2HgHlALfmbwnEQ75uCO5wKqd/Rl UT8lPCNcoMhHHXvSJTPxKvbfOiMczxF/tWBbib0jo3FQClQ/tlvjaXiFbQoDmmBBc8RMEU 9GD3p8tmjQplfqccExenZxB+qV8638lUU8KdeBLoucZi7m5hAShxUPTovJKGKlv52123Wd /NwWdsb/JWOB3fBYcNvUGwjN/h9xM2+OQEVAy07HC0lGBBs3uRcsbd3OaTn17q+Ci1zORv P908yb9PFs0QHCEj+aqgqax51g0BjUQQ0OIVXof2o4wMS3ie4REuLM/BswWaAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716270885; a=rsa-sha256; cv=none; b=q9Qv7MimI+CIFZo7wBjFj3BvmKssEz3kFKgWQLGGM6uDsAp8j4/B23dr6e2f6eU11Oq8xp GrgFuiJ5x782mk/YirqatcXrl9rgkbs77wNMPvdH2tupWxmRq+Km7wq4iCtg3jb+EOEXOJ MmhaYW2YjRoDMNMmT4IxJqpEjjL24XJJuky+Ntp7wRgxuQmKICCo/92TrnbX4ijtYo3G+2 Xt2F4unO8uj+xtBVe11C6DVYYe++RbQKENhkaS508BBUiUUkTIx6dwnaD6QV7rD9lxwSDa 7cxtRZm31xkFrZcHkncf6evLNqYcn375KKFKH/iWUM7uGNh0jzsW3egxC/HaMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716270885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOMtdVuUOQ9eR4jJc0ME7+e2/eCo4BJelMVCEOIPU68=; b=uWuNzuuq3h4v0f1AmYFe6SmZiZOG31mbBquDGAyXDw1XLqPe42OiP/OyGo7vPhMMbLpX6e 3DrJMFl1Ry0MXcX+wtTTlO+ITb70PReMvEtxIy5rt4VSZ42dtZlwgJHMC03JH9KIqeSw00 NF7865YSw59b2l412f5Hcx8b1wN/otnurmG4tmAeZTMMcnzoYyFBcQj7J47e3XgwnHhjDV QO6TnnWZf6J71l58BfEiHVhsHJ+CREqJrUpvrjUb6gBzl/OqPID7SUhVYEbsfJh83S914C 6laG1CIAw8crQOhOn+oCdR5mv5CU+0Ne0/WX6IICQFE0JPknEV/V2W+JaNTJIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vk3YK0Yzlz18Wk; Tue, 21 May 2024 05:54: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 44L5siWs004396; Tue, 21 May 2024 05:54:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L5siAj004394; Tue, 21 May 2024 05:54:44 GMT (envelope-from git) Date: Tue, 21 May 2024 05:54:44 GMT Message-Id: <202405210554.44L5siAj004394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 8e5e42d54ad3 - main - Add man page for the ice network driver. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e5e42d54ad3093e38263814d1f3e7d8406d5421 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8e5e42d54ad3093e38263814d1f3e7d8406d5421 commit 8e5e42d54ad3093e38263814d1f3e7d8406d5421 Author: Mathieu Simon AuthorDate: 2024-05-21 05:49:50 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-21 05:53:02 +0000 Add man page for the ice network driver. PR: 262892 MFC after: 3 days Reviewed by: concussious.bugzilla@runbox.com, erj Differential Revision: https://reviews.freebsd.org/D45270 --- share/man/man4/Makefile | 2 + share/man/man4/ice.4 | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 252 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4d3a5273d726..164efe3ddf66 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -214,6 +214,7 @@ MAN= aac.4 \ ${_hwpstate_intel.4} \ i2ctinyusb.4 \ iavf.4 \ + ice.4 \ ichsmb.4 \ ${_ichwd.4} \ icmp.4 \ @@ -711,6 +712,7 @@ MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ice.4 if_ice.4 MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 new file mode 100644 index 000000000000..da46c758479c --- /dev/null +++ b/share/man/man4/ice.4 @@ -0,0 +1,250 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Copyright (c) 2019-2020, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms of the Software, 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. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this Software without specific prior written permission. +.\" +.\" 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.Dd May 20, 2024 +.Dt ICE 4 +.Os +.Sh NAME +.Nm ice +.Nd "Intel Ethernet 800 Series Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iflib" +.Cd "device ice" +.Ed +.Pp +To load the driver as a module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ice_load="YES" +.Ed +.Sh DESCRIPTION +.Ss Features +The +.Nm +driver provides support for any PCI Express adapter or LOM +(LAN On Motherboard) +in the Intel Ethernet 800 Series. +As of this writing, the series includes devices with these model numbers: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your adapter. +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +This value coincides with the maximum Jumbo Frame size of 9728. +.Pp +This driver version supports VLANs. +For information on enabling VLANs, see the +.Pa README . +.Pp +Offloads are also controlled via the interface, for instance, checksumming for +both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can +be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Ss Additional Utilities +There are additional tools available from Intel to help configure and update +the adapters covered by this driver. +These tools can be downloaded directly from Intel at +.Lk https://downloadcenter.intel.com , +by searching for their names, or by installing certain packages: +.Bl -bullet +.It +To change the behavior of the QSFP28 ports on E810-C adapters, use the +Intel EPCT (Ethernet Port configuration tool); installed by the +.Em sysutils/intel-epct +package. +.It +To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) +Update Utility for Intel Network Adapter 800 series; installed by the +.Em sysutils/intel-nvmupdate-100g +package. +.El +.Sh HARDWARE +Most adapters in the Intel Ethernet 800 Series with SFP28/QSFP28 cages +have firmware that requires that Intel qualified modules are used; these +qualified modules are listed below. +This qualification check cannot be disabled by the driver. +.Pp +The +.Nm +driver supports 100Gb Ethernet adapters with these QSFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 E100GQSFPSR28SRX +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 SPTMBP1PMCDF +.It +Intel\(rg 100G QSFP28 100GBASE-CWDM4 SPTSBP3CLCCO +.It +Intel\(rg 100G QSFP28 100GBASE-DR SPTSLP2SLCDF +.El +.Pp +The +.Nm +driver supports 25Gb and 10Gb Ethernet adapters with these SFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 10G/25G SFP28 25GBASE-SR E25GSFP28SR +.It +Intel\(rg 25G SFP28 25GBASE-SR E25GSFP28SRX (Extended Temp) +.It +Intel\(rg 25G SFP28 25GBASE-LR E25GSFP28LRX (Extended Temp) +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with these SFP+ modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSR +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG1P5 +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG2P5 +.It +Intel\(rg 10G SFP+ 10GBASE-SR E10GSFPSRX (Extended Temp) +.It +Intel\(rg 1G/10G SFP+ 10GBASE-LR E10GSFPLR +.El +.Pp +Note that adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. +.Pp +This is not an exhaustive list; please consult product documentation for an +up-to-date list of supported media. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +See the +.Xr iflib 4 +man page for more information on using iflib sysctl variables as tunables. +.Bl -tag -width indent +.It Va hw.ice.#.enable_health_events +TBW +.It Va hw.ice.#.debug.enable_tx_fc_filter +TBW +.It Va hw.ice.#.debug.enable_tx_lldp_filter +TBW +.It Va hw.ice.#.debug.enable_health_events +TBW +.El +.Sh SYSCTL PROCEDURES +.Bl -tag -width indent +.It Va dev.ice.#.fc +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is +TX pause. +.It Va dev.ice.#.advertise_speed +Allows one to set advertised link speeds, this will then cause a link +renegotiation. +.It Va dev.ice.#.current_speed +This is a display of the current setting. +.It Va dev.ice.#.fw_version +Displays the current firmware and NVM versions of the adapter. +.It Va dev.ice.#.ddp_version +TBW +.It Va dev.ice.#.requested_fec +TBW +.It Va dev.ice.#.negotiated_fec +TBW +.It Va dev.ice.#.fw_lldp_agent +TBW +.It Va dev.ice.#.ets_min_rate +TBW +.It Va dev.ice.#.up2tc_map +TBW +.It Va dev.ice.#.pfc +TBW +.El +.Sh INTERRUPT STORMS +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr iflib 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.2 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Intel Corporation Aq Mt freebsd@intel.com . From nobody Tue May 21 13:41:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkFvT3gGdz5LND5; Tue, 21 May 2024 13:41: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 4VkFvS4yysz4HWk; Tue, 21 May 2024 13:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716298868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ngt/fW5tRLRiX6gG+wPpKzlVQDL/uOUGtqMLAx3eDzI=; b=egSc3XKIYiPfbZ+iGZpYV2KJgqvtzzXm4eMn5zBjH9JaGck7p1cSCzBZUMigiG17ua2IKI SE0hThzzU30ce/9cfN9AfLluxeyRodmvo8LA0K3V34w+rfAdJOmNcBleBA2o7fwlLlw7DA robZNROfVc4DyR3BOdwe2gMYbmzqbltNoI3hXjUcY50D8jnj6NWK/P1y9j7Vf5YtON+rMX Ba8u/4xGcNF/6zZB+0eZy5h0ODUIL6QAgtXllRZ9+JX8OHPlUOZEfA0VHuwBZsi1Y49INi f6Nn4jzDKI1JmW7BaUnlsUEyUD1YS/5tMkMeTrdcd/IiAwurz+xHWh9M8cONmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716298868; a=rsa-sha256; cv=none; b=Z6fxagEaEJsIzkc1mE/U00CAaa31r6hCgw5ZuqyjeX4EXURJ3RvAD6DWVEdizvthwJN8Kl rueAnwqBaoz0JwPNVgtkmlHyA7l8DkiXSFxPAet0kbnUuWdqGX2DPfKjRlnxu84fpIPwYe Oo/MQkb3sDmaIJacvgltVg992B6MTRf5r6xJAjb/tpbOlZp6fvL+LldWYA1wtYhwpcitbk mGwwcQXpq07p4gcbcxCWSl2MIuf+UlPdOoKZBfzUlLCLjywsUSrgS8ZBnd+cyNJpjG6Er2 ZIcbeIpwOsLi6QRimzgWWbKJIk3pE1bAlprACih5Ejn7YmVncM2oOFWunsnOOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716298868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ngt/fW5tRLRiX6gG+wPpKzlVQDL/uOUGtqMLAx3eDzI=; b=cisBA886sxAILY/xw3yeiypJrAj07D0l+ZdWBc6dGRdRXW5rv8k3neH/srRGR53cohlMAz Ms6QzypR5tqrYac1tCbZc+ZJfsQZJGCsCFFzWsTgWkkXwRNqGlEsEV8xoFkmmnxnkMmhB6 ZXmdnQg3fzlsJwRdF1UJUMNaSTEp7sT5WchG7TXizh2wxsUnK1fG+QChZU7Bm0daoeeX1U N+5RmeovdslOMGTTQBr7wJlpK3ilQyGtvCqdxIUlQ0/T+HNuip0sxL9XU5lI3H9ICpEaCw 2SdGSE7bvc8HL7D2LBTdJUaCSstN5oKEVRaHrzUIGsy1DNQ0Tnvq88dSovzLXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkFvR4WC7zP4c; Tue, 21 May 2024 13:41: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 44LDf77C091745; Tue, 21 May 2024 13:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LDf7E2091742; Tue, 21 May 2024 13:41:07 GMT (envelope-from git) Date: Tue, 21 May 2024 13:41:07 GMT Message-Id: <202405211341.44LDf7E2091742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7975f57b7e14 - main - uipc_shm: Fix double check for shmfd->shm_path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7975f57b7e14b146ca730421ef9e2094c242e9c0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7975f57b7e14b146ca730421ef9e2094c242e9c0 commit 7975f57b7e14b146ca730421ef9e2094c242e9c0 Author: Ricardo Branco AuthorDate: 2024-05-20 13:09:08 +0000 Commit: Ed Maste CommitDate: 2024-05-21 13:39:53 +0000 uipc_shm: Fix double check for shmfd->shm_path Reviewed by: emaste, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1250 --- sys/kern/uipc_shm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 1136f34a6f85..c83455d1e70b 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1910,21 +1910,19 @@ shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list) kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; kif->kf_un.kf_file.kf_file_size = shmfd->shm_size; if (shmfd->shm_path != NULL) { - if (shmfd->shm_path != NULL) { - path = shmfd->shm_path; - pr_path = curthread->td_ucred->cr_prison->pr_path; - if (strcmp(pr_path, "/") != 0) { - /* Return the jail-rooted pathname. */ - pr_pathlen = strlen(pr_path); - visible = strncmp(path, pr_path, pr_pathlen) - == 0 && path[pr_pathlen] == '/'; - if (list && !visible) - return (EPERM); - if (visible) - path += pr_pathlen; - } - strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); + path = shmfd->shm_path; + pr_path = curthread->td_ucred->cr_prison->pr_path; + if (strcmp(pr_path, "/") != 0) { + /* Return the jail-rooted pathname. */ + pr_pathlen = strlen(pr_path); + visible = strncmp(path, pr_path, pr_pathlen) == 0 && + path[pr_pathlen] == '/'; + if (list && !visible) + return (EPERM); + if (visible) + path += pr_pathlen; } + strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); } return (0); } From nobody Tue May 21 14:53:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkHWL1tR3z5LX34; Tue, 21 May 2024 14:53: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 4VkHWL1Q0lz4RMP; Tue, 21 May 2024 14:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716303230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rvw2aiOUYKBydkf4BKjxg5CwRXDnMKzUyX6t3SKdTA=; b=JVsfPBuN4eODBlkLb+C1tgoQ2mAE0KkJoNV9F2HrW6ZqOUHwqQTX2U0D7l83o5g2Or8JGJ tdzQv/TXuclFYmcP5ZU8Z9e4p5qxfJLWY3dE43gq63Szy6rGMoKICJ6dItAd/jQpzbGmkd dUjmjYRqegs/IHihXPu7Mc5SKSvu+nfLKahjoDKntfrjm7UZ6CIxWYMmzY2LF+Xy/1RcIW PhFodTCOVXOHk5E0jB0QmVtsiGZrSAXQMNsE7lJSAN/ZEpIisp5uMRrk1rm0T4Of4fPvhg iyG2cVejBt33FfKT8DdiRypyjAH3N4Dki8raA+9Hm0bxHb7bOFsMaR9qrlGQ6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716303230; a=rsa-sha256; cv=none; b=XbGL6kk9lWcO6by4SM8Rv1/QD5vIzRLIsFxg/Ra+/0/8R2VjzpRbnB/C+wUD7awnGZB2Km zjaLfkJQBH8nZoMuqNwYdMeTYnOjJXBIMpeXpFLe+HsJNaFZH5rHPK9U/Z/x6sfEbJWSIk ngUtSpwszvLpnGh029mSCSz+q4bOy6zaXbTs/++PjgYO/Rjw3XOfa34X3wNBTdsRnlACzf EyJGV9F22q4Q3wLMMUzjQhgNiOb5uVAywebP7oeLqGi2GJVdXXDElDCebDCeeBKByDvPfY SUYPyWSsh4f31Mk9BoTMTscaXGOFYzUOvStbCg6IWyNdiJpv0N7NXkr0DquKrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716303230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rvw2aiOUYKBydkf4BKjxg5CwRXDnMKzUyX6t3SKdTA=; b=YODws0lQf+nTTggEE2qTphGkaEva0UaL6eSPJMbFbwGB6jyasKtLu/md9VLQ88xjILrXaJ fMT5/TpWKS2vWgh8DFQeeH69Lpt0BRm1tmzfmoRe3QA/pol+Ncg50uhSiftdfJn+zgHGdZ Ic2xHkYfDo7ryv1Kt4qSU755J6sDSiw7ninCmgdhbsmN9Wb/9Em2ksnRbaVaQcyrLsXnc9 5j/r+d4G+xNsuVmGUhjwWcTPmDYGt6n4/v0BrG27g6CGMZElj7bX+smB7NbaEVRJiujyHP lSH74ezKhkElP9zTmiilYfyzIohteaH/CeozxZvjz56vS2vs/kA8n3DJdSUJQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkHWL11r0zRFy; Tue, 21 May 2024 14:53: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 44LEroXV017251; Tue, 21 May 2024 14:53:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LEroch017248; Tue, 21 May 2024 14:53:50 GMT (envelope-from git) Date: Tue, 21 May 2024 14:53:50 GMT Message-Id: <202405211453.44LEroch017248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 48edad2edf6e - main - fix (nuageinit): SSH keys are not handled in metadata but in userdata List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48edad2edf6eb7a539e40dad8e1f87e3fa4973fd Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=48edad2edf6eb7a539e40dad8e1f87e3fa4973fd commit 48edad2edf6eb7a539e40dad8e1f87e3fa4973fd Author: Jeremy Collin AuthorDate: 2024-05-21 14:52:23 +0000 Commit: Baptiste Daroussin CommitDate: 2024-05-21 14:52:42 +0000 fix (nuageinit): SSH keys are not handled in metadata but in userdata MFC After: 1 day --- libexec/nuageinit/nuageinit | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 08224061d1b1..df637bbc5064 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -164,13 +164,6 @@ if citype == "config-2" then nuage.err("nuageinit: error parsing config-2: meta_data.json: " .. err) end local obj = parser:get_object() - local sshkeys = obj["public_keys"] - if sshkeys then - local homedir = nuage.adduser(default_user) - for _,v in pairs(sshkeys) do - nuage.addsshkey(root .. homedir, v) - end - end nuage.sethostname(obj["hostname"]) -- network From nobody Tue May 21 16:36:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkKpB5sL3z5LlB4; Tue, 21 May 2024 16:36: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 4VkKpB5Dtrz4gw9; Tue, 21 May 2024 16:36:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716309410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ez2netc/SXcJOnnfDfsmqDcECY/rC9s8BMeuwZbU38=; b=kNEIrfyls5UCjzslO2qktV89Q1n1VGgXdym8B+hcoBk+uqaCPwlkyaY9W3mSu0wuWZ0o08 u/K4ioJNKeAbnJkcgASyxTkgPSZcU2WjYurSejma0R+OguCfrHyYWg/9mhZum8Wk2d1Nhr gJrAavksLTe5TEwWX2z9XLWZ5qRrTdnqagIih5CrV/NdA6O9M6WIEfHiWiTvWVBanZ1tyo TkXdlRL+3L+qP0m2dByNniJn+Pg0fJVSODr1Zq03pJkXbE28Yoz/ZUZTe8ryhE+pMZC82y lys1zii0yHjkJe9IYpAouPptzNoK7Mxxcpl8NnsZCHqNpEFeeWt4isNz9m4FOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716309410; a=rsa-sha256; cv=none; b=ymdhce9iu7hKxRfB+HlGxK5e689cAlwSOOUDGWg2qt7gdcQdraZvVEFlg+rJFjftzaqran HQc/MBnk1sbUgYz4lxj8cW4elUCQeHSGDHUGchCw98gXWjUXiXzM2OnKhHDCoWy/V4NF9u 3jqU6FshNc3W0W1has8VO0cI3Wd6L98pqa3h1idrP6wHUEfmSas8Vo87EtY+6tDcAL3sJL WJOzlWz6T3KkArC93I9z+yyj943crSlIUfbB9iFNMF1euQeqoSo7xtrvpfzH7SILU4qrD4 4xXMKS02feM7Msfj5p9fNp3Za5E+EZe6fU8b5ewYAM27BoGr6LAVgKQBlaq8Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716309410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ez2netc/SXcJOnnfDfsmqDcECY/rC9s8BMeuwZbU38=; b=vuF1OcHpW7T5DK29Nswhe4kxBWzs1PtAPJPcdTejjGOMD+gBlFWBZRHYOGPt8WtyWAxrYt GwAr6j34SNGyt/+4zXNiLjLPmpx85yqHftnjyM24o1ub74pvJ6A34aFv07T3Q5S3LXapm2 j5bUNCtNmdGrbYGXpc1k6FC8zNaNW6TAwBUXXJUWncrAFTcJWESmCYZl+gfpBorLO8uei1 l0WzaT9xiL8fo81463LeglVJly5Q1UB4tFw5SgnkndCqpbnADPsFb9kPtzErdoxYQcXLoh m30XBHfEGLS2iBhxBxjUJKOPPs8P5A/1wEasclNYpdUde1es8nCkBRNIV7I66A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkKpB4qhSzV78; Tue, 21 May 2024 16:36: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 44LGaoTb086646; Tue, 21 May 2024 16:36:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LGaoii086643; Tue, 21 May 2024 16:36:50 GMT (envelope-from git) Date: Tue, 21 May 2024 16:36:50 GMT Message-Id: <202405211636.44LGaoii086643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 76df3c57a0ab - main - ifconfig: Redo fix vlan/vlanproto reconfiguration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76df3c57a0abfd24652bfa33982ba136d9d0575b Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=76df3c57a0abfd24652bfa33982ba136d9d0575b commit 76df3c57a0abfd24652bfa33982ba136d9d0575b Author: Zhenlei Huang AuthorDate: 2024-05-21 16:35:01 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-21 16:35:01 +0000 ifconfig: Redo fix vlan/vlanproto reconfiguration When the if_vlan(4) interface has not been fully configured, i.e., a bare interface without a physical interface associated with it, retrieving the current settings of it and unconditionally overwriting `params` will result in losing vlandev settings in `params`. That will lead to failing to associate the if_vlan(4) interface with the requested physical interface and the false report 'both vlan and vlandev must be specified'. Fix that by checking if the vlan interface has been fully configured. The basic VLAN test is slightly modified to cover this case. PR: 279181 Reviewed by: kp Tested by: Mike Tancsa Fixes: b82b8055ad44 ifconfig: fix vlan/vlanproto reconfiguration MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45283 --- sbin/ifconfig/ifvlan.c | 31 ++++++++++++++++++++++++++----- tests/sys/net/if_vlan.sh | 10 +++++++--- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index a79ea35bc14b..0a2603f1736f 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -60,6 +60,7 @@ #include "ifconfig.h" #define NOTAG ((u_short) -1) +#define NOPROTO ((u_short) -1) static const char proto_8021Q[] = "802.1q"; static const char proto_8021ad[] = "802.1ad"; @@ -67,7 +68,7 @@ static const char proto_qinq[] = "qinq"; static struct vlanreq params = { .vlr_tag = NOTAG, - .vlr_proto = ETHERTYPE_VLAN, + .vlr_proto = NOPROTO, }; static void @@ -157,6 +158,8 @@ vlan_create(if_ctx *ctx, struct ifreq *ifr) errx(1, "must specify a tag for vlan create"); if (params.vlr_parent[0] == '\0') errx(1, "must specify a parent device for vlan create"); + if (params.vlr_proto == NOPROTO) + params.vlr_proto = ETHERTYPE_VLAN; ifr->ifr_data = (caddr_t) ¶ms; } ifcreate_ioctl(ctx, ifr); @@ -173,6 +176,8 @@ static void vlan_set(int s, struct ifreq *ifr) { if (params.vlr_tag != NOTAG && params.vlr_parent[0] != '\0') { + if (params.vlr_proto == NOPROTO) + params.vlr_proto = ETHERTYPE_VLAN; ifr->ifr_data = (caddr_t) ¶ms; if (ioctl(s, SIOCSETVLAN, (caddr_t)ifr) == -1) err(1, "SIOCSETVLAN"); @@ -196,8 +201,16 @@ setvlantag(if_ctx *ctx, const char *val, int dummy __unused) errx(1, "value for vlan out of range"); if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) { - vreq.vlr_tag = params.vlr_tag; - memcpy(¶ms, &vreq, sizeof(params)); + /* + * Retrieve the current settings if the interface has already + * been configured. + */ + if (vreq.vlr_parent[0] != '\0') { + if (params.vlr_parent[0] == '\0') + strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ); + if (params.vlr_proto == NOPROTO) + params.vlr_proto = vreq.vlr_proto; + } vlan_set(ctx->io_s, &ifr); } } @@ -230,8 +243,16 @@ setvlanproto(if_ctx *ctx, const char *val, int dummy __unused) errx(1, "invalid value for vlanproto"); if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) { - vreq.vlr_proto = params.vlr_proto; - memcpy(¶ms, &vreq, sizeof(params)); + /* + * Retrieve the current settings if the interface has already + * been configured. + */ + if (vreq.vlr_parent[0] != '\0') { + if (params.vlr_parent[0] == '\0') + strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ); + if (params.vlr_tag == NOTAG) + params.vlr_tag = vreq.vlr_tag; + } vlan_set(ctx->io_s, &ifr); } } diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh index 675ed0090e8c..458e3cc36bc6 100755 --- a/tests/sys/net/if_vlan.sh +++ b/tests/sys/net/if_vlan.sh @@ -22,8 +22,12 @@ basic_body() jexec alcatraz ifconfig ${epair_vlan}a up jexec alcatraz ifconfig ${vlan0} 10.0.0.1/24 up - vlan1=$(jexec singsing ifconfig vlan create vlandev ${epair_vlan}b \ - vlan 42) + vlan1=$(jexec singsing ifconfig vlan create) + + # Test associating the physical interface + atf_check -s exit:0 \ + jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 + jexec singsing ifconfig ${epair_vlan}b up jexec singsing ifconfig ${vlan1} 10.0.0.2/24 up @@ -37,7 +41,7 @@ basic_body() # And change back # Test changing the vlan ID atf_check -s exit:0 \ - jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 + jexec singsing ifconfig ${vlan1} vlan 42 vlandev ${epair_vlan}b atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1 } From nobody Tue May 21 16:49:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkL4Z6fCFz5LmVJ; Tue, 21 May 2024 16:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkL4Z5J4Lz4jl8; Tue, 21 May 2024 16:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716310158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LkPpmJj1us617NHljWfbfv2Dyo1ZVGBYoC99r+MwaOw=; b=wN8nQnA+zpTiPeWSOl9btvvsDsM/25oGlRVg51RVX7M/8vtO4HqK+C3bVZM6+yROPfz+Me r3kgbi/fFuektR+fEkfI/fGvNmKPfrYCxVcu/voyrt87TSEek1p0z4PwPofBs3Z9TqXVev v3xAmMTOFzplXIcWtK8HxblCxZLGvbRHdGL8ur8y6cZw7WZZEo1kpA9hPEfRkRoI3bZSvs 9pO8CjYUA4wqR7CwuxkRxurh4SPnDjljmetDuaa55V90BYQjOG8NEOzA9rVHEJkGWiGkoX uZ69HA8Coy87X7aF9fkumv3F+DBYw5P5fiHgTtGpyN5HX0B5Zu0juMieaeT45g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716310158; a=rsa-sha256; cv=none; b=Kvi4LPc0iUEVtdB34WANRK1rfixfkF08EXAsioKseENSWnNaKKRzCT2bnKREOp7k7Fxa+4 Oc7zEpmXeQNHXwJ9CJ/WPzNmu88uRyOM0+fIGlTPeAJbSZsTps0WOICyebxRlzwpy1H5LD YorCaCcxSrmO/t8X02a8gQPbyN9W7OweL/sY+VWJtFHWNI7YFMha2Mq2iD3RBSjr0H5FV2 8DSeiUe5T093p2n6JT7P+RNRVO22uWNcVjdlW8JOJkrN6h+3dIomtNOtsgxxBFTBxvPHGo 6SWkqlzqShjGKLsvuwx9Xa2m3/aVpPs7q6X3HonTxfXBAxpQ8UTRx4aOWziHRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716310158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LkPpmJj1us617NHljWfbfv2Dyo1ZVGBYoC99r+MwaOw=; b=nro0QlTA7qOcd0zlQOONs3rHAZCecEYXzSum30t8m1dTYsuL2X1Wh2Oe7c0WqyJqqK2Ysw qXsD2FfUEz7H050yo7DG1biKmbXrdGb2lScVhwo2856Nn9WuWGb1I4bRYxeBxpM0FQ4qy1 jwAyQ3jOVvtQqju0OC3zjfiUnTqZg0EdsAWGQx7ztRdfulRjZJcGOcPjWVEmImuSpa0J67 lGgROqUZIvClqGhRjopQ1NJx+HdfK8oO6zqKRWLKSexRt/cTIOmLoSt558c0zaLv5Gr3S+ +UGawKEHv2TXwV5KiGrsw8o71nb/rR073H8ppIDFpN82krb66Ow8vIWGWkvEog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkL4Z4nvgzVB0; Tue, 21 May 2024 16:49: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 44LGnIuA004693; Tue, 21 May 2024 16:49:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LGnIYq004690; Tue, 21 May 2024 16:49:18 GMT (envelope-from git) Date: Tue, 21 May 2024 16:49:18 GMT Message-Id: <202405211649.44LGnIYq004690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4ebf794a08de - main - cryptocheck: Don't test Chacha20-Poly1305 with an IV size of 8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ebf794a08de04ebf1c520f07bff3f8fdf48819a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4ebf794a08de04ebf1c520f07bff3f8fdf48819a commit 4ebf794a08de04ebf1c520f07bff3f8fdf48819a Author: John Baldwin AuthorDate: 2024-05-21 16:42:12 +0000 Commit: John Baldwin CommitDate: 2024-05-21 16:48:50 +0000 cryptocheck: Don't test Chacha20-Poly1305 with an IV size of 8 OpenSSL 3.0+ doesn't support an IV size of 8 either for the Chacha20 stream cipher or the AEAD combination with Poly1305. This did work previously with OpenSSL 1.1. Reviewed by: markj Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D45280 --- tools/tools/crypto/cryptocheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index 2db283e4f65b..ef3e225e94f6 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -136,7 +136,7 @@ * aes-ccm128 128-bit AES-CCM * aes-ccm192 192-bit AES-CCM * aes-ccm256 256-bit AES-CCM - * chacha20-poly1305 Chacha20 with Poly1305 per RFC 8439 + * chacha20-poly1305 Chacha20 (96 bit nonce) with Poly1305 per RFC 8439 */ #include @@ -253,7 +253,7 @@ static const struct alg { .evp_cipher = EVP_aes_256_ccm }, { .name = "chacha20-poly1305", .cipher = CRYPTO_CHACHA20_POLY1305, .type = T_AEAD, .tag_len = POLY1305_HASH_LEN, - .iv_sizes = { CHACHA20_POLY1305_IV_LEN, 8 }, + .iv_sizes = { CHACHA20_POLY1305_IV_LEN }, .evp_cipher = EVP_chacha20_poly1305 }, }; From nobody Tue May 21 18:16:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkN1T688Xz5LxZW; Tue, 21 May 2024 18:16: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 4VkN1T5K99z3wk9; Tue, 21 May 2024 18:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM0w+7Gc5WaxqYOY+zIV/kPKkiwOCMVJRq8EDo4pCc0=; b=ovEBQ9rOQUov7TD3X8vPwPW0Jc8Ve89bEqmYbAtsEQLryFCczohaPN9prLZnRDkwY20fkM EQpbt0CwTMPoh34VRSFynFQeGd+JlPmd/97ZB75Xu6ZrpFb7x8ie5FhpqorSpYkowUesiK XNF4owEGDmnYHKXHaon0AupOb7NxqM769s/OjFj5EA3yCVd6oBLzbAWNnwwfdhEl+Y69z0 HRanuv/QNyvRWGMqAt4mYxrnRh97bmKkZTe5BM74rj+/Hb9gIFFI5B5BgmrxvS0R8CrRVu lw9fYHo9IW183jYW3y3dkuvhwMcZwEhrDU6nQSFTW3l6Y//zdo/tXd1TFESeUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716315405; a=rsa-sha256; cv=none; b=VXc4quIv4mwTbzmDe2eNWlEp17i65g473sBhPv3UQTUswGa4ZCcAUaVsIclnyB4Rj77Oz1 xYgluxiX/vxppGBNKVwL2K9Smk33O4/TUwlMBUzn5F6CNn08zvzxQiiMn3Ds5KpEtEYoge S76it5oS3rdRVxhe3SS9pthQT/2cYG/oAZ1EHjz4POtoYZ20RyC7T6hxquwv4/79+te7pn 22gLatmQg0xLxsRc3WGPa4uht2W1slpX4UdDlW9LYqZhQEbSFR+6Edgo1nhw+ru4Th4dN6 IZ8xhooItZyoR7AWsxndMQb3N1geUA8KD35/K3qwKccmInYAtYcmk2rUy96/iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM0w+7Gc5WaxqYOY+zIV/kPKkiwOCMVJRq8EDo4pCc0=; b=oYjNT0CdFaboBqzKCYVe6SWaWDNnK29o9asIZD8vovl2LJv+HJo8FIkKczJ2qQEHNYS7sf fJCszAVOb5H0nMYaOlZbvKltEnh+qB62LHQSSOoImaKet1JARC+5sb9c3hCAirT2wzUc5x fdI+Za10DfrncV+1mqXwbv/XOxw/bUotHebpWuKCBQrjlvJOBJ2X3YrPxEhlsFVgxyHagT c2b6h/TZSZ7hkCK79KJ5SZ8569vVv459NwBL2wDoRT0YQD7c9UaJKUYzapGnm5aPg5hEGV kyD1lv5rE0dfcl46AOVIagPsXyzofR7pd2CvlU82DYYrnQSKe5+RlyS16mc0Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkN1T4pBxzXtt; Tue, 21 May 2024 18:16: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 44LIGjtk056158; Tue, 21 May 2024 18:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIGjHA056155; Tue, 21 May 2024 18:16:45 GMT (envelope-from git) Date: Tue, 21 May 2024 18:16:45 GMT Message-Id: <202405211816.44LIGjHA056155@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: b92cd6b2944a - main - lockmgr: make lockmgr_disowned public and use it List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b92cd6b2944af2112787c55949e0c8194305c8c4 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=b92cd6b2944af2112787c55949e0c8194305c8c4 commit b92cd6b2944af2112787c55949e0c8194305c8c4 Author: Ryan Libby AuthorDate: 2024-05-21 17:21:50 +0000 Commit: Ryan Libby CommitDate: 2024-05-21 17:21:50 +0000 lockmgr: make lockmgr_disowned public and use it Reviewed by: mckusick, kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45248 --- sys/kern/kern_lock.c | 7 ++----- sys/sys/lockmgr.h | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index f152185f5fbf..1b4d21f064a7 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -138,9 +138,6 @@ LK_CAN_SHARE(uintptr_t x, int flags, bool fp) #define LK_TRYWIT(x) \ (LK_TRYOP(x) ? LOP_TRYLOCK : 0) -#define lockmgr_disowned(lk) \ - (((lk)->lk_lock & ~(LK_FLAGMASK & ~LK_SHARE)) == LK_KERNPROC) - #define lockmgr_xlocked_v(v) \ (((v) & ~(LK_FLAGMASK & ~LK_SHARE)) == (uintptr_t)curthread) @@ -243,7 +240,7 @@ static void lockmgr_note_exclusive_release(struct lock *lk, const char *file, int line) { - if (LK_HOLDER(lockmgr_read_value(lk)) != LK_KERNPROC) { + if (!lockmgr_disowned(lk)) { WITNESS_UNLOCK(&lk->lock_object, LOP_EXCLUSIVE, file, line); TD_LOCKS_DEC(curthread); } @@ -1135,7 +1132,7 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje * any waiter. * Fix-up the tid var if the lock has been disowned. */ - if (LK_HOLDER(x) == LK_KERNPROC) + if (lockmgr_disowned_v(x)) tid = LK_KERNPROC; /* diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index ebe238cd0e25..48eea47c60da 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -130,6 +130,10 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct rwlock *ilk, LOCK_FILE, LOCK_LINE) #define lockmgr_disown(lk) \ _lockmgr_disown((lk), LOCK_FILE, LOCK_LINE) +#define lockmgr_disowned_v(v) \ + (LK_HOLDER((v)) == LK_KERNPROC) +#define lockmgr_disowned(lk) \ + lockmgr_disowned_v(lockmgr_read_value((lk))) #define lockmgr_recursed_v(v) \ (v & LK_WRITER_RECURSED) #define lockmgr_recursed(lk) \ From nobody Tue May 21 18:16:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkN1V6XD5z5Lxnr; Tue, 21 May 2024 18:16: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 4VkN1V5xKdz3wxy; Tue, 21 May 2024 18:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7a+fpdMunyNo66jIvY3F9ubxJ8fdJjAekhugFGz0yeI=; b=WOK1oEYo1jAEFciA/JqrLhcYLromBrYMBHcpAk8mZJykeXWfqFvBFLGSZM1iPEMXYnNSIW gMCIQ2nHDbrbFhNhXkjm9I7+93o+RW2AT6sSu1tdKV3pvO2mkSHI0lXr0kKdUuoxxsK2A1 mkWF4MLnSLDh4QwK/CATrhoEiDrYftn4/N5bagpcdMfbEzxSnfD541qlsAZelo6gTUl2Y0 9lr12OGicfsWwCCdZbbk0DbnVRGkTkOwQALNhflc2X88blsZ1PkTpy9cmfSiXCbz98fAId dburWI1FZmDTOCtBJzsr79TDpGkz5ET+dYg2tlsfbG2X8GCwksHLiyGYE11kQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716315406; a=rsa-sha256; cv=none; b=lOdIk0ba+BeyJCWV9g+oaxv+1zcFDPQgp52gZ4LyTStONeGMjs/VdelMGPqCtbV9SuP9rj ygvhwfFF8pnTPbqoTycWnw5MXE0zXmI4RhFhjTLCbfnlZanPj24t7jSj3nMDPhc6NOJ5OU l2W9Mz0030f70/X0/EgfV4RUJNgVLGVtpyo5SB846hKolGUTTSeAccjnjCXpKZ+aLCNKiU RIQTLB9Nn3WrvkbX/VY2K/6h04z4X1B4dJrVcSOxXWM5noGR5K1JecelbjGShRMLAM046/ S8mp+tEpSAadXKFmwENOfH7C752OGpBie12SQO8DWf15pC6s6bckwoxrEJIDXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7a+fpdMunyNo66jIvY3F9ubxJ8fdJjAekhugFGz0yeI=; b=rUZ1UN+LE9Guoamwu9Yd3IQcvgCq1ejbFZQBeT6xXMt2LETWU2LGWg4NcNV1p0OyjTbWbI QVvBOA862Mn5zYaHmZO8Ds6FQFvT1wj8hYkfOcfUOLuc1M1/aKr1Tb4YkT+FYr/Bbwmcy2 bKGwvEUs5DzPSKD2NRT7FHmXsT5dSfgI7ns8aZ6AhccJ7agz5YBztj1dRMAkzBkCMv8Bc6 ce19vTdRXBw1NgOsio4mdYX3Un1PmYmghraPJTMncKyc7KnDeHHeCTtZ9f7H5BOqV0RyDr CaZAttkVne2HiBT3wJ6hGDxu6M1iYjF1PsgjlcallV8hKbeSJ6Ib31kLlX8mGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkN1V5XpDzYMP; Tue, 21 May 2024 18:16: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 44LIGkis056200; Tue, 21 May 2024 18:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIGkNt056197; Tue, 21 May 2024 18:16:46 GMT (envelope-from git) Date: Tue, 21 May 2024 18:16:46 GMT Message-Id: <202405211816.44LIGkNt056197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: bd56aad33c25 - main - buf: define and use BUF_DISOWNED List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd56aad33c2533615f76c17795f0aa70b7686309 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=bd56aad33c2533615f76c17795f0aa70b7686309 commit bd56aad33c2533615f76c17795f0aa70b7686309 Author: Ryan Libby AuthorDate: 2024-05-21 17:21:50 +0000 Commit: Ryan Libby CommitDate: 2024-05-21 17:21:50 +0000 buf: define and use BUF_DISOWNED Implement an API where previously code was directly reaching into the buf's internal lock. Reviewed by: mckusick, imp, kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45249 --- sys/geom/geom_vfs.c | 4 ++-- sys/sys/buf.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index 893c8dfffa6f..87b2fea21baa 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -124,12 +124,12 @@ g_vfs_done(struct bio *bip) mp = cdevp->si_mountpt; if (mp != NULL) { if (bp->b_iocmd == BIO_READ) { - if (LK_HOLDER(bp->b_lock.lk_lock) == LK_KERNPROC) + if (BUF_DISOWNED(bp)) mp->mnt_stat.f_asyncreads++; else mp->mnt_stat.f_syncreads++; } else if (bp->b_iocmd == BIO_WRITE) { - if (LK_HOLDER(bp->b_lock.lk_lock) == LK_KERNPROC) + if (BUF_DISOWNED(bp)) mp->mnt_stat.f_asyncwrites++; else mp->mnt_stat.f_syncwrites++; diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 70fb2812c3ba..cee9547912a6 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -341,6 +341,13 @@ struct buf { */ #define BUF_ISLOCKED(bp) \ lockstatus(&(bp)->b_lock) + +/* + * Check if a buffer lock is currently held by LK_KERNPROC. + */ +#define BUF_DISOWNED(bp) \ + lockmgr_disowned(&(bp)->b_lock) + /* * Free a buffer lock. */ From nobody Tue May 21 18:16:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkN1X2Gfvz5Lxd7; Tue, 21 May 2024 18:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkN1W6G5vz4vwt; Tue, 21 May 2024 18:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUwto1QTfsO7yUOZKRNcaN8x7Tq/szRkWCAcFJCVcI0=; b=pc74PIPaekZ0gLVAho2WN8KBMIOswr4ye5MWYmRDHvLCdWzJBPPy0Zpc94dVMkUKkHtWud M2QOd+QT4sUDFzohbuof584iTTac8Si8rd3TnheNUVB4VTSpJR11YH+20txEUJ24qZEAGb yfhEIG72+hXbVlmVJ16CqUKPYQXztsT1GC5qEMtHH9KQ4sfvkML/OFMq7rAyuOcHXXGWad jwYnyNXHNHSQztGxGsIe7ryuotkJU6j2jxrEN+59EHU6mPPIwIzN1FSPIH65bF7+zLiLGa yU3kYOw9nR9JBoUIorGTHZSQnqEkcYuBzBCqWBMDdIIxfCkcE/bXK7ROidLsTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716315407; a=rsa-sha256; cv=none; b=raiBRR4BpQuF7WYl7p3FMpoTgyqWQ1C8RxOAA2s2cqnW55SJkEX4NEL4+SmN6G9HBQtc8v 0yaPBfv2RBpZuS66E7oDddCZM6aH0l3wEmu6dN1zWthwhi/74vkTusKjZWNnc2IuiSsWw7 iAQVpboy01DqAjWKAw03EiI+9yhmlMwrXYYaMNN0bUn8pLQMK+vfkYrA2I8ZKNnoNpDTBH 2Smjomv2gRXwAWlAHxlXHsfAY9I574GbsCqPVIAko1qsnXII4AUSyb8sUQBOmCBB01DE7a +u3erVtUjYdLslWlzIR5qjOhWcG6ZAW0nl+mLW6bMnvOhcALJ7FvrcDPv0waxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUwto1QTfsO7yUOZKRNcaN8x7Tq/szRkWCAcFJCVcI0=; b=PLOBJo6bwUwYLCMr8wpoaNakVQOLvnibogSQeM2bDA912J5NfoZ9vM/Xnzpymnz0YxrMjy UGOwbstzdZl/Crjg0MWq0k1kEMG4kq1MumNfyv5+WzBRORhiOuANzNfgjF+1DyLxv2dBKH ehTK6SpcVr7ZoMb3UPedsy7yH3sh2M/nefKsM+7JT88AHddtIP7UT/nqh+USWeKb54W4Rl lT8rtzAz887uLCUkn7Q+djUk8M8WQrAIqkEgDyPw7l5JHfntF9PKTwx3fTGxKpxoDZczbV BT/ICuDpOMLezhomd57MuK5GlUYoiNqVsjKOTkPq2SDDl0GLN8DTEPnFhNT3BQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkN1W5szxzXtv; Tue, 21 May 2024 18:16: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 44LIGlaZ056242; Tue, 21 May 2024 18:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIGlT6056239; Tue, 21 May 2024 18:16:47 GMT (envelope-from git) Date: Tue, 21 May 2024 18:16:47 GMT Message-Id: <202405211816.44LIGlT6056239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: a332ba32d4a2 - main - getblk: fail faster with GB_LOCK_NOWAIT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a332ba32d4a26e20c959db14afa11ccfa25cf76c Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a332ba32d4a26e20c959db14afa11ccfa25cf76c commit a332ba32d4a26e20c959db14afa11ccfa25cf76c Author: Ryan Libby AuthorDate: 2024-05-21 17:21:50 +0000 Commit: Ryan Libby CommitDate: 2024-05-21 17:21:50 +0000 getblk: fail faster with GB_LOCK_NOWAIT If we asked not to wait on a lock, and then we failed to get a buf lock because we would have had to wait, then just return the error. This avoids taking the bufobj lock and a second trip to lockmgr. Reviewed by: mckusick, kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45245 --- sys/kern/vfs_bio.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index b5466fb2cd53..01057072d991 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -4010,8 +4010,23 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag, error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL, "getblku", 0, 0); - if (error != 0) + if (error != 0) { + KASSERT(error == EBUSY, + ("getblk: unexpected error %d from buf try-lock", error)); + /* + * We failed a buf try-lock. + * + * With GB_LOCK_NOWAIT, just return, rather than taking the + * bufobj interlock and trying again, since we would probably + * fail again anyway. This is okay even if the buf's identity + * changed and we contended on the wrong lock, as changing + * identity itself requires the buf lock, and we could have + * contended on the right lock. + */ + if ((flags & GB_LOCK_NOWAIT) != 0) + return (error); goto loop; + } /* Verify buf identify has not changed since lookup. */ if (bp->b_bufobj == bo && bp->b_lblkno == blkno) @@ -4020,6 +4035,10 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag, /* It changed, fallback to locked lookup. */ BUF_UNLOCK_RAW(bp); + /* As above, with GB_LOCK_NOWAIT, just return. */ + if ((flags & GB_LOCK_NOWAIT) != 0) + return (EBUSY); + loop: BO_RLOCK(bo); bp = gbincore(bo, blkno); From nobody Tue May 21 18:50:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkNmZ1Sdyz5M1YF; Tue, 21 May 2024 18:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkNmY5p12z41Rx; Tue, 21 May 2024 18:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716317437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7fPLSckUu2ipheFU0IhhtJzLOt2bcDcZz0fMcpT1nVU=; b=X9nUiISiscOR1vul0nkOmz0JCylQQiToCnaEwEfeKlfbmnomQ6KU62sDNxroZPVxgYKHsQ SUc4as+v42qbGUtoHhMAfU/mfK/ag9XLEPwM/OwfNSwwwN/ou7wj/J4EdDTYA8cYS1TXZB YzZz0wxBVsBTMbyl6Rp2oqr4WeRRTbubP2MlfAfcz17NpIqIdYpcA/5QeDHzbX88YfnoDM ZaJvzHHt7ENDMhv5AGD72jiV4XOUZ34HcxnNQNKNAI1WeLKdyjq1PqDH4d8XP9uC98xpiP KnuB4/qfg9Ik4y379mjt2gUpo4tKcsRywFZWHgj2bP4Z1wJWxxCrHHRZbUsTIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716317437; a=rsa-sha256; cv=none; b=jiFRtxFsrD/sqHYdYoLA3DPiZ8kQjtYQ1xGsiN8WmDZipJwh7GFzBbMrolSnC09WpYzrFc 81Tx8dimBEN433HxLrRIJZkzzbzrDurmqjod7Ts4ebobQF/BlT+5Yz+USE75u9x12BaKU+ yuW5d4HmNCCTgE87rBy2izoT0T/eBaN7/F3bbwe3C8G7mRoape8noj6uoXRZZHkHUEzJ5Z B7gxfBY1f7fWbca3zJFpmwMsdpdxOy00afNzpjj6bHJcQUc34HHDbF0vu+Xpj8NwucS5hw LQBBdn+AXFD9Z5bPZn5n0I7WUIGY9yHAPt9szcbiFgXKqjGSRc60gbuuFpuOmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716317437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7fPLSckUu2ipheFU0IhhtJzLOt2bcDcZz0fMcpT1nVU=; b=gKkfnVQb/6Dm+f8ijcOqCFEC7oZrmYovrMVyxkV7Rfn3fKRPOFZJvgC8WoagEJmwyng9lS UZNT4ceI5ORU3WZ7MLOM9uu3iLA3F+UO5KqIwL3Z8vahol1C1XkXHzyjadb4YlbxUlTajP vMleT+cTcFFm11arrh9m+zq+W2Hm2GAWPQStzmJvFVGDYT24xwYzAXnjl4358UNDvSU+We AJUen4O3BfWNv12Bu8+5Jsg0CNjAHx2Wu4dJQQL2uxNfF7BP1dT/JH2O91I0V9aBRVGQ8v bbRG83iFI4jtfZYLk2FKTzUIPvDvqQG81ycCHORVbSxbY+xrlyxjc9Y68kaI1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkNmY3Fc7zZ6N; Tue, 21 May 2024 18:50:37 +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 44LIobed015549; Tue, 21 May 2024 18:50:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIobfk015546; Tue, 21 May 2024 18:50:37 GMT (envelope-from git) Date: Tue, 21 May 2024 18:50:37 GMT Message-Id: <202405211850.44LIobfk015546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: c80c104cbd52 - main - glabel.8: Describe cases related to permissions / existing mounts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c80c104cbd52db994c0f2757bd1c6d014744022c Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=c80c104cbd52db994c0f2757bd1c6d014744022c commit c80c104cbd52db994c0f2757bd1c6d014744022c Author: Chris Moerz AuthorDate: 2024-05-21 18:10:11 +0000 Commit: Joseph Mingrone CommitDate: 2024-05-21 18:49:17 +0000 glabel.8: Describe cases related to permissions / existing mounts Specially, note some requirements for label changes: - glabel requires write permission on device - filesystems first need to be unmounted for new labels to persist across reboots - if the affected device node holds the filesystem root, single-user mode with r/o mount will be required. Also, while here, apply some formatting tweaks. PR: 276724 Reported by: Alex Matei Reviewed by: gbe, jrm, Alexander Ziaee Differential Revision: https://reviews.freebsd.org/D44394 --- lib/geom/label/glabel.8 | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/geom/label/glabel.8 b/lib/geom/label/glabel.8 index d6f253342905..da958b52befd 100644 --- a/lib/geom/label/glabel.8 +++ b/lib/geom/label/glabel.8 @@ -137,7 +137,7 @@ e.g. .Pa /dev/diskid/DISK-6QG3Z026 . .Pp Generic labels created and managed solely by -.Xr glabel 8 +.Nm are created in the .Pa /dev/label/ directory. @@ -164,7 +164,8 @@ device will be one sector smaller than the device from which it was created. .Pp Note that for all label types, nested GEOM classes will cause additional device nodes to be created, with context-specific data appended to their -names. E.g. for every node like +names. +E.g. for every node like .Pa /dev/label/bigdisk there will be additional entries for any partitions which the device contains, like @@ -172,6 +173,17 @@ contains, like and .Pa /dev/label/bigdiskp1a . .Pp +.Nm +requires write access to a device to create, modify, and destroy +"automatic" labels. +It will fail to persist changes if they are applied while a file +system on the device is currently mounted. +To ensure that modifications are stored across a reboot, the file system +needs to be unmounted first. +If the device holds the system's root file system, entering into +single user mode and mounting in read-only mode is required to persist +the change. +.Pp The first argument to .Nm indicates an action to be performed: @@ -252,12 +264,13 @@ Most .Nm LABEL providers implement a .Xr sysctl 8 -flag and a tunable variable named in the above format. This flag -controls if the label provider will be active, tasting devices +flag and a tunable variable named in the above format. +This flag controls if the label provider will be active, tasting devices and creating label nodes in the .Xr devfs 4 -tree. It is sometimes desirable to disable certain label types if -they conflict with other classes in complex GEOM topologies. +tree. +It is sometimes desirable to disable certain label types if they +conflict with other classes in complex GEOM topologies. .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. From nobody Tue May 21 20:04:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQPx3hfTz5M8lJ; Tue, 21 May 2024 20:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQPx353Bz4Cqm; Tue, 21 May 2024 20:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVzr75Wet5tEQe+17LLCnURwY1/DWSSGi7WQ/uarcIw=; b=MIYdGjxAeKqzUS8JYmGdU1sxy0W+zPEcbnmqCdjwXRogMSeyLDmEmvqdry7+/bS/EX8Rp1 mz7qpenPYSKgqc0yq3n8XyFxLOtnEdH3ttbvSfLsSx0L1pQsRa6Ly30oWIjrMKT4oh1Hl7 LaTN+yWqj1hmwLdjIhIa+CdzKtrzCbCdW55cAlNhYqOUiCIZeRLQW8utVqOGC280A2xK+8 QHs0irepYTAwU9lP4431cP72A6AuU2tmw5zC+fLHOxd98Xp8Zu+kSIyHKc/88TB06hqae4 kYiQ0jstOAckQIg7splggz7aAfp0ox8tNkfv1WJZaVT+BClKh1RXNEd9krHtDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716321877; a=rsa-sha256; cv=none; b=vNck9boji2kI2SqJP2Y9m1qCS1/2B4wfgIn6AWeUunlVv4GeoLCV1qHrl4TM8B4qplIb64 ObwDeE678FjU8cPJPuwOVIFWjSvQLt37sy/4TbLLy32w+/dzO8ZPVP4rc3mSACusqj6q8k QuxZDY5wZbdzzRwQZaxduKdO8g/U3/PSH7iD3ykqxIw4WUTnLeGNDRoA6IWave/ALQxelx FmpvJt3cmxcLrQ0Sed6toCVkzTH5Aqj4EIpOYJbGrdAjCZiL4AoW6FAWN/I3XRx0I57p5r 7qH1gmY1wbChvhS6+nfh4fBBkChDcJtBlo3IhvqjEdQL0jwdaiigZo5aZcrQiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVzr75Wet5tEQe+17LLCnURwY1/DWSSGi7WQ/uarcIw=; b=eCW8rE19Z6CaaIhqjs7HBEBMBs2Qh5RElb0wfE6epICdLc/9jIeTK81COuB2jUPTcm6fQ9 s0s0kQM/YeCgBQDnE7bhMobpss1p2fUCqRKyl0KPHpchv01ezn2Dtysd2GZJZiIur31xEl qDtNFh8RYkO6Qke5/vkCfAIO2usc5bhZ6yD45SzE0Vk6RT5soaA6fQHkSmvhqjfBcqHmLi Hm4jdjHSUbaG9t8L1J5zMWFlEQY6ZoFz1VXj8UDpuApqc/Kd7xlmDLWo4MgSc6Fc/SaCFM Yd2nq1/RmcWobp3SiCAjJWqTG1rqOc4acpIywV5dDtjH754Qm2xtJhorgFxr5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkQPx2hS7zbt8; Tue, 21 May 2024 20:04:37 +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 44LK4buf042777; Tue, 21 May 2024 20:04:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK4bxK042774; Tue, 21 May 2024 20:04:37 GMT (envelope-from git) Date: Tue, 21 May 2024 20:04:37 GMT Message-Id: <202405212004.44LK4bxK042774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 6b7e4254a29e - main - capsicum: allow rfork(2) in capability mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b7e4254a29e3228a7273622556b60416e300509 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=6b7e4254a29e3228a7273622556b60416e300509 commit 6b7e4254a29e3228a7273622556b60416e300509 Author: Edward Tomasz Napierala AuthorDate: 2024-05-21 19:55:09 +0000 Commit: Mariusz Zaborski CommitDate: 2024-05-21 20:02:36 +0000 capsicum: allow rfork(2) in capability mode Reviewed by: brooks, rwatson MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D45040 --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 094c538b22e0..9fdd443955c7 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1455,7 +1455,7 @@ int inherit ); } -251 AUE_RFORK STD { +251 AUE_RFORK STD|CAPENABLED { int rfork( int flags ); From nobody Tue May 21 20:04:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQPy4Zjvz5M8lM; Tue, 21 May 2024 20:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQPy3xbpz4D2C; Tue, 21 May 2024 20:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p7cjIvMgxfO238g9YpqYviN5svS4QkgYdTMuRxWU910=; b=cGeoUSyfq1dqiVzuc3f8n1OqVmU6ehBomdNuxGoIu/rOlLWBaIwnogNA97ZA6zRzMuu9nm JWJMiZFDNYQY1lOCtyNjqPOOHL4mO4Km0TsJzgChPYyvZqLxK9fTGBHr82Tdhirage/XDD UBca7lIcMGEjRe7ZOHQASrYFyXakBIsEuG5dixTLxAw58VPhFHFbcXHdG1NX36g/RimX7h U0N0JPZubB9iOtF8anR4OlUyTyQhIuhY3UNjcXoutnNeyCuVt9CJMUinovIQGWvAuzYejW jF08ebpG+J3phaDn5HXjB2p6l5fRHKTihF4FrvGyPDjyNimnz+yIJWTqzh4nBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716321878; a=rsa-sha256; cv=none; b=xq0OfHrX1PYhzCJhLPX87qRA7UBK++5EoiYyx2TWVGMUYvruqPg7OlDtDzyf6GbgjetQSc YKtwUgAXMTF1Ia820usj6fag2WtRBCRQgqIrE7ec2DfAMDrGAgjIcf54VOq6HcDHPUMZKZ tbpcFC7l2oQvCvTAhWxqF5cwaE0Zw2wr7DVLj9vW3g0hj6n7VpunVBhFaRsYeZdgHoQK8z wQnF3rVG104AKl/Zk3RtRjgJN24UFAf7xOn392C7g/kHwHgjJnBODIvRTCdkvNU2hzhyfa Pjc80Gmg1Qh0Qg0vElzHaDJgDld9SJOXqIEJN8BiQ5Gr0yd2T9gwiTESjDntmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p7cjIvMgxfO238g9YpqYviN5svS4QkgYdTMuRxWU910=; b=sJleM7C3r/CcbRGVg+P1wxr9nATCnnXMEq6qN9oCgXhCYdG5I8XZELX7rDEkjscTFEh3JE XTJZ4N5HcV+V1Ez70eEJTbtChN0LaT3WHCFYSrhGHyEUc9DM62DbhPf8oVyTs+C0nVDhkz V7qs+knVsfaYXO1Hjm2DTspLtoAfHXAe1iZotiv80gQAWhVcJIWhngm6ICtceKLaQlybnU VwRBrUhDk6uvuMoSo3X5wA2Urt/SazjazLR4j/r3Hozxye21Wk83qXu2ateME7ESR3YQGe X2uHYjLX98YkYrrcHj5KPmblvt1tlh2a1THFemdhm2OsGQiPEBAmOwmNhcupsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkQPy3YK3zbt9; Tue, 21 May 2024 20:04:38 +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 44LK4cTT042807; Tue, 21 May 2024 20:04:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK4cBG042804; Tue, 21 May 2024 20:04:38 GMT (envelope-from git) Date: Tue, 21 May 2024 20:04:38 GMT Message-Id: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 408957613bc0 - main - Regen List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 408957613bc065c4444812c3ae276ace03697ebd Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd commit 408957613bc065c4444812c3ae276ace03697ebd Author: Mariusz Zaborski AuthorDate: 2024-05-21 20:02:50 +0000 Commit: Mariusz Zaborski CommitDate: 2024-05-21 20:03:20 +0000 Regen --- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/kern/init_sysent.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index dd3b1464caba..54b07374bbce 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -312,7 +312,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 248 = ntp_gettime */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = reserved for local use */ { .sy_narg = AS(minherit_args), .sy_call = (sy_call_t *)sys_minherit, .sy_auevent = AUE_MINHERIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 250 = minherit */ - { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ + { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_issetugid, .sy_auevent = AUE_ISSETUGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 253 = issetugid */ { .sy_narg = AS(lchown_args), .sy_call = (sy_call_t *)sys_lchown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = lchown */ diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 46459f4c4e37..291d38865bd3 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -311,7 +311,7 @@ struct sysent sysent[] = { { .sy_narg = AS(ntp_gettime_args), .sy_call = (sy_call_t *)sys_ntp_gettime, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 248 = ntp_gettime */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = reserved for local use */ { .sy_narg = AS(minherit_args), .sy_call = (sy_call_t *)sys_minherit, .sy_auevent = AUE_MINHERIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 250 = minherit */ - { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ + { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_issetugid, .sy_auevent = AUE_ISSETUGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 253 = issetugid */ { .sy_narg = AS(lchown_args), .sy_call = (sy_call_t *)sys_lchown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = lchown */ From nobody Tue May 21 22:07:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkT7S5p3kz5Kgqm; Tue, 21 May 2024 22:07:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkT7S54rYz4TQY; Tue, 21 May 2024 22:07:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sK6lbZuu0HgRum+krzTvmP0g9e50k8IdaT1QMxB2V8g=; b=EE1Waeb5gqVRihToliT6Lcs/x3c133nQn74MWhXPfRsu3008vLzOFfFExPm1s9UPKerDhJ GKmKBpV9Gd0DzqbDlRQXTW73l1BwmtRZm96DlWqD2NQXE7/m3Y7646NUlMjEmdJ05xuM7X Q2WfDz9Kfkg/9fJ36rPDaW+abmD57c9q0S9DbAdoRdGYGVu1BW+UVMv67dBR0NIf55khx6 xSV/KStjQ6FYzTcwQgVkydCnWj48BWpYAMi/xCnVs08BTo8DkBNrSURzBm1x0ZQvDPCJGh edNNNX9OAylnSLrx+1/jTUjmAcJt93Ofd/xeMWsmxGankktnlnOfpF9v984E6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716329236; a=rsa-sha256; cv=none; b=XrWmAvgppjpX4d5Aqh49wj8CIowAHR9laKnL/rRWD3RjATbEyhgfM0SzMM+kUFvDdMnAvP Rht1WDHDjLVH02Gf9Oh5SQkUYTg9QGyVTGTb1olBD3JcnjdPYJY3DCIXOIia+iHkCGNPbC mQsDNoJQOdd1OsN1mQx9ORSrrVR1rGbPOcTBh1UZJlZ9n05ktpbOc/hEwTYapU0x3dxB8L M0eoEEYjMCuQJX4dgyUlFxjmiLeE1fcuowkYaUhu37EaLeCuYvCgeYvKPxcIPPej/Is6mK oTSIyLmMwtP1e7l76gFh+FkmphIQWXwhtzAr2L+o5CNoka7t7TrG/FPoi3TvlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sK6lbZuu0HgRum+krzTvmP0g9e50k8IdaT1QMxB2V8g=; b=pBdxEWmhkzIOHrRMpcOI0qS4xO8qwuKcdViLoBJAhg9UABv0VJ8pXa2kyopMtndqGZaeeD CtUB4KVHKnV2trQt7Us0sTOz5EK5wL89qao6/HOlQDygRGF2bZc4PRh2+vObejnMsW1eyI 7ZdFV22QWdDJ1o0vUYbzuf4O6dfASV0HGUzFCwc4M9XSIRUBfqfIhrDnt5vm+9LrLcnY2R 50PHM5hu+pN4DlZjd5bUWMMjeAFVVgwGkxxHKzIhibK1SWCkoEto5XaiKoRbgNBWHlyF0a Osrb6ile/mGH9pttSxq5M/uE757UaNEMS+XhiEDe/fP2AmzXDaeOckObkv+dUQ== Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VkT7S3xH9zNLR; Tue, 21 May 2024 22:07:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E56AE8D4A126; Tue, 21 May 2024 22:07:14 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 458EA2D029D8; Tue, 21 May 2024 22:07:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id yd5-swuxlK9M; Tue, 21 May 2024 22:07:12 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B30012D029D2; Tue, 21 May 2024 22:07:12 +0000 (UTC) Date: Tue, 21 May 2024 22:07:12 +0000 (UTC) From: "Bjoern A. Zeeb" To: John Baldwin cc: Emmanuel Vadot , Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: cff79fd02636 - main - linuxkpi: Fix spin_lock_init In-Reply-To: Message-ID: <30s1641n-04ps-4024-0797-45573737pqq6@SerrOFQ.bet> References: <202405170559.44H5xD7d019861@gitrepo.freebsd.org> <2cd3e698-1b42-4e7f-93a0-aacccb55c8d6@FreeBSD.org> <20240517183350.e45f54df07f670980d5a51c3@bidouilliste.com> <0f2c4189-e259-4bd8-ad31-212a8df0e1b5@FreeBSD.org> <188o7q6o-n0rn-235r-76n4-779o555094r9@SerrOFQ.bet> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Mon, 20 May 2024, John Baldwin wrote: > On 5/17/24 2:36 PM, Bjoern A. Zeeb wrote: >> On Fri, 17 May 2024, John Baldwin wrote: >> >>> On 5/17/24 9:33 AM, Emmanuel Vadot wrote: >>>> On Fri, 17 May 2024 09:07:53 -0700 >>>> John Baldwin wrote: >>>> >>>>> On 5/16/24 10:59 PM, Emmanuel Vadot wrote: >>>>>> The branch main has been updated by manu: >>>>>> >>>>>> URL: >>>>>> https://cgit.FreeBSD.org/src/commit/?id=cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>>> >>>>>> commit cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>>> Author: Emmanuel Vadot >>>>>> AuthorDate: 2024-05-17 04:52:53 +0000 >>>>>> Commit: Emmanuel Vadot >>>>>> CommitDate: 2024-05-17 05:58:59 +0000 >>>>>> >>>>>> linuxkpi: Fix spin_lock_init >>>>>> Some linux code re-init some spinlock so add MTX_NEW to >>>>>> mtx_init. >>>>>> Reported by: David Wolfskill >>>>>> Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify >>>>>> code") >>>>>> --- >>>>>> sys/compat/linuxkpi/common/include/linux/spinlock.h | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> index 3f6eb4bb70f6..2992e41c9c02 100644 >>>>>> --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> @@ -140,7 +140,7 @@ typedef struct mtx spinlock_t; >>>>>> #define spin_lock_name(name) _spin_lock_name(name, >>>>>> __FILE__, __LINE__) >>>>>> #define spin_lock_init(lock) mtx_init(lock, >>>>>> spin_lock_name("lnxspin"), \ >>>>>> - NULL, MTX_DEF | MTX_NOWITNESS) >>>>>> + NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW) >>>>>> #define spin_lock_destroy(_l) mtx_destroy(_l) >>>>> >>>>> This is only ok because of MTX_NOWITNESS. Reiniting locks without >>>>> destroying >>>>> them corrupts the internal linked lists in WITNESS for locks using >>>>> witness. >>>>> That may warrant a comment here explaining why we disable witness. >>>> >>>> I'll try to look at what linux expect for spinlocks, it could also be >>>> that we need to do this because some drivers via linuxkpi does weird >>>> things ... >>>> >>>>> It might be nice to add an extension to the various lock inits for code >>>>> that >>>>> wants to opt-int to using WITNESS where a name can be passed. Using >>>>> those >>>>> would >>>>> be relatively small diffs in the client code and let select locks opt >>>>> into >>>>> using WITNESS. You could make it work by adding an optional second >>>>> argument >>>>> to spin_lock_init, etc. that takes the name. >>>> >>>> We can't change spin_lock_init, we need to follow linux api here. >>> >>> You can use macro magic to add support for an optional second argument. >>> >>> #define _spin_lock_init2(lock, name) mtx_init(lock, name, NULL, MTX_DEF) >>> >>> #define _spin_lock_init1(lock) mtx_init(lock, spin_lock_name("lnxspin"), >>> ...) >>> >>> #define _spin_lock_init_macro(lock, name, NAME, ...) >>> NAME >>> >>> #define spin_lock_init(...) \ >>> _spin_lock_init_macro(__VA_ARGS__, _spin_lock_init2, >>> _spin_lock_init1)(__VA_ARGS__) >>> >>> Then you can choose to specifically annotate certain locks with a name >>> instead in which case they will use WITNESS. >> >> I think the real confusing here comes from the fact that FreeBSD has >> spin_lock_destroy in LinuxKPI which I believe is a local addition >> (though not documented as such) for semi-native drivers using parts of >> LinuxKPI and in order to use spinlocks according to "FreeBSD >> expectations". >> >> I believe (and still hope someone would correct me) that Linux has not >> functions to destroy locks like we do? I believe for rwlocks I had left >> that remark on the review: >> https://reviews.freebsd.org/D45206#1031316 >> >> So if you use WITNESS anywhere you could only really do so for >> "internal" parts but nowhere in Linux driver code as that will likely >> simply break assumptions? > > You could only do it safely if you added local modifications to the driver, > yes. My understanding is that while we aim for as little modifications to > drivers as possible to permit merging in updates, we don't mandate absolutely > zero local changes. The approach I described above would permit selectively > using WITNESS at the expense of local diffs that would have to be maintained > across updates. Okay. Makes sense. In that case I think we should more than we do today mark the spin_lock_destroy(), the WTINESS enabled ones, etc. "FreeBSD specific" even in LinuxKPI (marking them with #ifdef or at least comments or calling them slightly differently). -- Bjoern A. Zeeb r15:7 From nobody Tue May 21 22:13:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkTGM5xZzz5Kh7R; Tue, 21 May 2024 22:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkTGM5R17z4TsQ; Tue, 21 May 2024 22:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xSbG6mVA43ZWH9Kjk4qK8iF9hj8Uh3mgTcCxn+te/o0=; b=aSA2+heRVOI3Y7CaIOgtDNSc0p0nP3Rj1ji4PrK+miHyCwBrut5NMqdrPGLAIsAfXiKMQH zgQtWbLTdAW9yoGtfPXgdNEIuDgrqHREUJAcwh8Cq+gZVvFz2IkhrppOkg+d8lZhJ9v8zl kSZqueARMxVx6jifxrtb/QnCAkZ3aVavIQeCDMMSnTLAK6G9fsFpc1DmX/j2b23Qj3hrsw UB1gFSjiN53wsvVxg3uQuF1yVg12dKbsw4HhFIlBJ2vsisno/URN8/iBTspGMB/Xf4Sa5u gO9WnNQUcrk4bmIHpwU8fhk6LqHk0gEjyUkw5kbYDA9mRZI98yIOtqnnFqUEjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716329595; a=rsa-sha256; cv=none; b=rsDwxPuC4IMb9M9E4mbtiHrlWVZdPDIA0WzJXivQM2X3jKu8iVD4UEp/ZUPk71VSxOAuXp 1ruraerOwzNBmgrxVzhVxdab2hiRkEzUb5UArI8ZT6bvFbN426Ta0x6tJxKU8S/5NDOk5d 6zcno+xIotxq+evmY8cuLGcXxNj/D66P2HNSS6Aw1S3cv57o4an9MoZcb6wa/QV2+TVbvH ryfiZqXDko15fbVmJk5P6FeNzWNwQMigJEe8z68i2ZoBaU7e5gdRwSRVcTQexhmeheLyD2 wiSAXFB5d1GK8lDy84FodKduDuf4r5A7B7c32Tzd8TRkz4JIR2dFgxYLWz7eqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xSbG6mVA43ZWH9Kjk4qK8iF9hj8Uh3mgTcCxn+te/o0=; b=UAbEYUEstSdEmpQ2+Z5TfcJZ8+1J+h+cqsGoRdZMPr72+xzo4Q4q7JURDZNUnvsV1w0WyN Or/Mx2z0yq2oUJm41SS4IDOFQmrtbSq+u0CeoAXkCEVJLiNtTIbFYEgLLy67Y977OdknnA fZKvXQpmOwrQKk2NzujT3ZhI5pG/4sUWdLgyh6UITVzpFu6/YE+YL1c+jAvOkurDT7jKXi pJIxwHzC7eJDauiM66AeYO6GT0MuOFSnaZcE+2Lxir3CYuJUATX4XE1RQn3wHPNDPp63MX C7vTahO/Upr/woyHBoyuVmjp3h2o6A+lV9RxfgnDtXFzF0ZxstC6rsG9srO36Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkTGM52Zdzfp9; Tue, 21 May 2024 22:13: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 44LMDFxU061636; Tue, 21 May 2024 22:13:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMDFoS061633; Tue, 21 May 2024 22:13:15 GMT (envelope-from git) Date: Tue, 21 May 2024 22:13:15 GMT Message-Id: <202405212213.44LMDFoS061633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 69b6c4a6ec66 - main - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69b6c4a6ec6654978628ccd48edce46f00ac3e96 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=69b6c4a6ec6654978628ccd48edce46f00ac3e96 commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96 Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-05-21 22:12:00 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Tue May 21 22:15:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkTJt3mKrz5KhL2; Tue, 21 May 2024 22:15: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 4VkTJt2v0Fz4VHf; Tue, 21 May 2024 22:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdkTYktb04dm3lIPPKdAFyDDRRcw+r/HAPBFh2vltpQ=; b=alGVFpeZoDhUPkOx3fZVmxX6fD8jjaNd4TvKccXkcKSfVqUBFn2TXEgeDgiLoEtvmOH4v6 aCnP9fKbt/FbpFdiW4ypNgpFgthZdaH9hr6n6jHPGlxH2vFBJyVVZUy3rT0Y6u0m8lzBq7 /CbavQU7ujnQt7M4NjJ/9N31e77snsGsPRt3dL0AE7rBWGSu/RT7mklgNT0MQ2klsRgEMw 6RnDpEqx0hwe3lF/v4XkleFhbV3T3vVNPgnrAPkKaaMEPJcTxixCra2Pk4D0P+1IREenDZ qvlhytlF8oS2GysaB43xH+yhPTlEC0CCoJRqx9HAmIkXHyvov2jV3ZdzklDNow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716329726; a=rsa-sha256; cv=none; b=OCnlp9YLpY2SJlEopmfH0ZphLtmXfgK28f8eXFVgusBGbyZdw8G/o54mSOtRCDwThyeroO kQyhzWi3C1/1dT4OgI2i2KcvLgfX2zDS1DTv+B3HmfJX2W6axVnYAYOF963EIK6McR6vVb ThTUdStcpluUxjpvTsQYvQNe0XipaVfYj0N2Cb6ItBqMZcqeEAYi9GsA5bSqoYkUpYFsfB aIJE4ZoDcOwScbcmC4AnYMRmxiiFdfqjUg05KBDAQIdMEfqpUm2ArdTk565nq/j73XIAA7 OzG5CD0eY8cJKag5tcXjg7uuckFCETAmCQRsYg3R68vdn0owkMz5hCEm6eFL0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdkTYktb04dm3lIPPKdAFyDDRRcw+r/HAPBFh2vltpQ=; b=e/AnIBiwUiSckc5cTNeOGkIxzw8l+W7ecQwFRXkSuJDcNcoypFQ0IKz9d4Y7zydjBC9yRU 1TPFcpqkActAG1B9e1cSINDN+VWSSaC6+T5xhTdI4QliEV43eO08RlNzPwg0Gkwf9n31gu bMcW1Xeesnb3htwEj6Ed8O02XlopgZwZRIDlwpFD3NIraNqVxaC5WXYpbpAGEcs0LsZOdO bYtyGoj7VR4y1ZoqKwuUveW2osNFb4dW2eHWiEiOlJCVxiweCtbxFGZ3FiFNqV0lK8FUVa eKITCRXdiUUqu8BRICMbUraKPYZVyFY22B91cYvsJGqxfESrNj6FszlFUM0IzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkTJt2VRszg0T; Tue, 21 May 2024 22:15:26 +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 44LMFQSx062072; Tue, 21 May 2024 22:15:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMFQqs062069; Tue, 21 May 2024 22:15:26 GMT (envelope-from git) Date: Tue, 21 May 2024 22:15:26 GMT Message-Id: <202405212215.44LMFQqs062069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8e4b8e9d807a - main - LinuxKPI: add kvmemdup() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf commit 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:43:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-05-21 22:14:50 +0000 LinuxKPI: add kvmemdup() Add kvmemdup() as a variant of kmemdup(). While currently it could just call kmemdup() we duplicate the code and use kvmalloc() in case someone will change the implementation of kvmalloc/kvfree in slab.h. This is used by an updated wireless driver. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45181 --- sys/compat/linuxkpi/common/include/linux/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 9e1818a38594..32470312b78b 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -98,6 +98,18 @@ kmemdup(const void *src, size_t len, gfp_t gfp) return (dst); } +/* See slab.h for kvmalloc/kvfree(). */ +static inline void * +kvmemdup(const void *src, size_t len, gfp_t gfp) +{ + void *dst; + + dst = kvmalloc(len, gfp); + if (dst != NULL) + memcpy(dst, src, len); + return (dst); +} + static inline char * strndup_user(const char __user *ustr, long n) { From nobody Tue May 21 22:35:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkTmL0Wb0z5Kyj3; Tue, 21 May 2024 22:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkTmK6zchz4X6R; Tue, 21 May 2024 22:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716330946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uKxpXi9yYcN72yqVi0TYGHURbXdK7oyw6TMecd8RvI=; b=lTJlYh2anZ40ZQpZUU1CAawIFOBk+QPKDJa94+vQTzUqQ+fi7wAyXU+VBkvMF+PaNRUk+P NSmq2YhijyAkfdk9RX2Kmko1Qc2BakGX+eZkkPLYoT0P0IHYaz6AXBX94zmlBtnKkpfzgV k5DgrqfdUKOyGzOrR+F6fy3rpaudPXsjoTKikCTgwyb20l98uJq31iPx1Tgq+WQhGNloev VHwghmIOtXTEXqUwVFT7I20/7meDvaE/VJ2I5MzjLZGXT+xAM1yRwssem4U1SXDLm40240 wtdRStZ+ashTS7jUUlzooEtHhA5q9S5EOZHM91hgCZEcgeoGwI4G9F7/t1JcNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716330946; a=rsa-sha256; cv=none; b=IV+1FP3n0y1IOvTz4uKU+eD8bQ47MILZgZzIJVqySnyLO8EY/LnuhxfCDeuoUkaYM2bzyS xX7SG8eOFRMY1w2SW759Vyb0LL2YUCTsXpPDEMFok017V2pjQwP9sqWVedfUvkPIvqf/+I SFuXQVbcmtZAQhyIg9olHnQFlax7Xr1CpzSelvgve9CqROyRokYsGelOJuEkM8/Ek4myWC bRCaHOE233EW5WjsIlCFLTtmshGy9/asY56q5HeRjlAfhdi7KD/L+DyhVj7w7R7wVTYMkX HdpR3s6zJcdPB5guVezZySX4zpM/cdg8p2j+CInUfsYC/3r4Mx2wMkLG04jjKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716330946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uKxpXi9yYcN72yqVi0TYGHURbXdK7oyw6TMecd8RvI=; b=yRQHhlvjtf1AQtfqYyFyR7BLoLcJuLwZQSxILkO2pUAWhGrYHbUjIOVkXbikzr4nSEhBm/ hXok+aFZ7VaZM3m8/Ch50aBrhHlPGFKVJliL9zx/uz1g7p7rz2exU093e2yHqjvTka3/5A IgSLseSRsiXkMrWXje6YvFSSaOPaKhiv2gBJjsnKgrINL5di59gRENj8/nqNCYFD6uJIqw 3wFiRSmNZyJCb4r+SNdktv1B4SBPpD12OzaxgtijfDqV7BLdjijBWy56VK95DQf+wtmU/g qf6eRO8TUQxu23SQ1z7N9KfoxzzA+JNFlUTh1kje2YFYyxtVhif6fzjHwrKFyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkTmK6b2TzggW; Tue, 21 May 2024 22:35: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 44LMZjn5095277; Tue, 21 May 2024 22:35:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMZj3A095274; Tue, 21 May 2024 22:35:45 GMT (envelope-from git) Date: Tue, 21 May 2024 22:35:45 GMT Message-Id: <202405212235.44LMZj3A095274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a4be1eb21165 - main - access(2): Discourage use of these system calls. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4be1eb21165d7aedae9dc6634528619ff10d025 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a4be1eb21165d7aedae9dc6634528619ff10d025 commit a4be1eb21165d7aedae9dc6634528619ff10d025 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-21 22:35:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-21 22:35:22 +0000 access(2): Discourage use of these system calls. Fixes: 421025a274fb PR: 262895 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45240 --- lib/libsys/access.2 | 105 +++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 55 deletions(-) diff --git a/lib/libsys/access.2 b/lib/libsys/access.2 index 91fe50a08cc4..46c00362a574 100644 --- a/lib/libsys/access.2 +++ b/lib/libsys/access.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 13, 2024 +.Dd May 21, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -45,35 +45,43 @@ .Fn faccessat "int fd" "const char *path" "int mode" "int flag" .Sh DESCRIPTION The -.Fn access -and +.Fn access , .Fn eaccess -system calls check the accessibility of the -file named by -the +and +.Fn faccessat +system calls report whether an attempt to access the file designated +by their .Fa path -argument -for the access permissions indicated by -the +in the manner described by their .Fa mode -argument. +argument is likely to succeed. The value of .Fa mode -is either the bitwise-inclusive OR of the access permissions to be -checked -.Dv ( R_OK +is either the bitwise-inclusive OR of the desired permissions +.Po +.Dv R_OK for read permission, .Dv W_OK for write permission, and .Dv X_OK -for execute/search permission), -or the existence test -.Pq Dv F_OK . +for execute / search permission +.Pc +or +.Dv F_OK +to simply check whether the file exists. .Pp -For additional information, see the -.Sx "File Access Permission" -section of -.Xr intro 2 . +For a number of reasons, these system calls cannot be relied upon to +give a correct and definitive answer. +They can at best provide an early indication of the expected outcome, +to be confirmed by actually attempting the operation. +For existence checks, either +.Xr stat 2 +or +.Xr lstat 2 +should be used instead. +See also +.Sx SECURITY CONSIDERATIONS +below. .Pp The .Fn eaccess @@ -87,6 +95,13 @@ the real user ID in place of the effective user ID, the real group ID in place of the effective group ID, and the rest of the group access list. .Pp +See the +.Sx DEFINITIONS +section of +.Xr intro 2 +for additional information on file access permissions and real +vs. effective user and group IDs. +.Pp The .Fn faccessat system call is equivalent to @@ -114,8 +129,10 @@ list, defined in .In fcntl.h : .Bl -tag -width indent .It Dv AT_EACCESS -The checks for accessibility are performed using the effective user and group -IDs instead of the real user and group ID as required in a call to +The checks are performed using the effective user and group IDs, +like +.Fn eaccess , +instead of the real user and group ID, like .Fn access . .It Dv AT_RESOLVE_BENEATH Only walk paths below the directory specified by the @@ -147,23 +164,15 @@ Likewise for .Dv R_OK and .Dv W_OK . -.Pp -.Fn access , -.Fn eaccess -and -.Fn faccessat -will always dereference symbolic links. -If the symbolic link itself needs to be referenced, -.Xr lstat 2 -should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS +The .Fn access , .Fn eaccess , -or +and .Fn faccessat -will fail if: +system calls may fail if: .Bl -tag -width Er .It Bq Er EINVAL The value of the @@ -254,25 +263,11 @@ system call appeared in .Fx 8.0 . .Sh SECURITY CONSIDERATIONS The -.Fn access -system call -is a potential security hole due to race conditions and -should never be used. -Set-user-ID and set-group-ID applications should restore the -effective user or group ID, -and perform actions directly rather than use -.Fn access -to simulate access checks for the real user or group ID. -The -.Fn eaccess -system call -likewise may be subject to races if used inappropriately. -.Pp -.Fn access -remains useful for providing clues to users as to whether operations -make sense for particular filesystem objects (e.g. 'delete' menu -item only highlighted in a writable folder ... avoiding interpretation -of the st_mode bits that the application might not understand -- -e.g. in the case of AFS). -It also allows a cheaper file existence test than -.Xr stat 2 . +.Fn access , +.Fn eaccess , +and +.Fn faccessat +system calls are subject to time-of-check-to-time-of-use races and +should not be relied upon for file permission enforcement purposes. +Instead, applications should perform the desired action using the +requesting user's credentials. From nobody Tue May 21 22:52:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkV8B5fP0z5L1RC; Tue, 21 May 2024 22:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkV8B3lJtz4Zcp; Tue, 21 May 2024 22:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUiOPg2wSuMdEbz29Rdcvud63elmr3NThtq+1wH9vKY=; b=ixOs6T7znsEykmbk/jPgIpeuGAxlP4MkHGJCUW4XdIW4aV0lfUzd13jA6W3CMSmnus0S8I xbx+m0BePC1eifU2f3boOPfCVJ/Aun+Se7uWtwByao2xPbFAuyqyR/3JsJBRfEdw/XzagQ cmnNNLOyJ5nRhpLsFFzYQo3PjSYb0DZCCtGGNcNDyWmEslnbgJ3EyPPPidvGzLhrlwZxIC 1l9Bvy9UEmT0DISAv8lFp0E3wxGcozFVk5k4TlecAXSJCEyuVKrbJLKpdH2hmKo6BBz16b PayOH4HSSmUR/kl4pN6+wVhv1rQfr/s7fPp0fiI9anqkIu3IuVJlMw9Mx4dPlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716331978; a=rsa-sha256; cv=none; b=dEs4zwZYevVoDjuVYKxPhyZ+eS2FvUk9VXnWsm0FRODGgFIfV+KJ/sq5B9ZS0VgkMj45eo 1+cu1qp5VbZSHMxf6m9/uSART1pDejxPnBaaQ+BEWpmH+ccCJSx2cb4jNNO20Q+e+5wQS3 kDG854y2hTgobq+nefc0lNP7JJYMJ8Z6XnDgFX6rJwMGc/r/0vw2Zsy+LfPrnUEjtAhnJ2 fmtNrXPNJwThyIaNWd/ksgCcSlndMJhhqgE09F+l2qsfxl/z1DdmgQhKGFLJPqtp2xNcoY ki3dRlsYBNBFgfy2gwc9qGqbsQznhqjgaJY2vWhiGw/seP4XOeBS4sWVUG83cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUiOPg2wSuMdEbz29Rdcvud63elmr3NThtq+1wH9vKY=; b=j0XJXg/XR/AMeSi/VaFJgj+/nwcRG9YI+WZizaxRuZRNFPZ9/r7oy1Pi01aH3cULcaIwWc Z3me/n1KUPsdCIO0R55Wd4oZg0JJTp3JcLCD4mj6qja7aGudoHmAl4qaUl7MdeyHeRpbkJ 4HuACF+6caz3eDpjuHDvPO3DqfbtBpnPHIuYVTcHsQEESJsjxa+jSbl3+hjh90ENvD/xL2 0rTvlpc+STozGB3vxDLMxhTkNoRfs+SezXDsMprgxy5Swz7qwJ3qEzvgwdb1cVDwyuKr36 Tt0+DOJNJZbbfSAMfCl4KMvvYiNgdWJZij/2rCONxlYSU1kuPQJZ49Asz/8eaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkV8B3M66zhLk; Tue, 21 May 2024 22:52:58 +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 44LMqwWT029225; Tue, 21 May 2024 22:52:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMqwXe029222; Tue, 21 May 2024 22:52:58 GMT (envelope-from git) Date: Tue, 21 May 2024 22:52:58 GMT Message-Id: <202405212252.44LMqwXe029222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: e20971500194 - main - ftpd: stop using -g flag for /bin/ls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e20971500194d2f7299e9d01ca3b20e9bc6b4009 Auto-Submitted: auto-generated The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=e20971500194d2f7299e9d01ca3b20e9bc6b4009 commit e20971500194d2f7299e9d01ca3b20e9bc6b4009 Author: Allan Jude AuthorDate: 2024-05-21 22:40:12 +0000 Commit: Allan Jude CommitDate: 2024-05-21 22:50:14 +0000 ftpd: stop using -g flag for /bin/ls In 3bfbb521 the behaviour of ls was changed such that -g was no longer a noop for compatibility with BSD 4.3, but instead changed the output of long mode to exclude the owner of the file and display only the group. Update how FTPd invokes ls to restore the previous behaviour Reported-by: Andrew Fengler Reviewed-by: jrtc27, des, imp MFC after: 3 days Sponsored-by: ScaleEngine Inc. Fixes: 3bfbb521fef5 ("ls: Improve POSIX compatibility for -g and -n.") --- libexec/ftpd/ftpcmd.y | 4 ++-- libexec/ftpd/ftpd.8 | 2 +- libexec/ftpd/ftpd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 742de2f4c086..c090130d8137 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -451,12 +451,12 @@ cmd | LIST check_login CRLF { if ($2) - retrieve(_PATH_LS " -lgA", ""); + retrieve(_PATH_LS " -lA", ""); } | LIST check_login SP pathstring CRLF { if ($2) - retrieve(_PATH_LS " -lgA %s", $4); + retrieve(_PATH_LS " -lA %s", $4); free($4); } | STAT check_login SP pathname CRLF diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index fcc5da0b6db1..2241ea78de81 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -276,7 +276,7 @@ is specified. .It EPSV Ta "prepare for server-to-server transfer, multiprotocol" .It FEAT Ta "give information on extended features of server" .It HELP Ta "give help information" -.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA" +.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lA" .It LPRT Ta "specify data connection port, multiprotocol" .It LPSV Ta "prepare for server-to-server transfer, multiprotocol" .It MDTM Ta "show last modification time of file" diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 8004d51a4579..f3a1105f6437 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2321,7 +2321,7 @@ statfilecmd(char *filename) struct stat st; code = lstat(filename, &st) == 0 && S_ISDIR(st.st_mode) ? 212 : 213; - (void)snprintf(line, sizeof(line), _PATH_LS " -lgA %s", filename); + (void)snprintf(line, sizeof(line), _PATH_LS " -lA %s", filename); fin = ftpd_popen(line, "r"); if (fin == NULL) { perror_reply(551, filename); From nobody Tue May 21 23:25:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkVsP2rhpz5L48T; Tue, 21 May 2024 23:25: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 4VkVsP2M73z4d6j; Tue, 21 May 2024 23:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716333913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyOABYotkSVoeFaiMvz2Di2/5Aq+aGI0Ylh6v8d76dE=; b=pHriW3KyaAh6qNZi4TfOtqIcjx1zstR4JDwhxsiMQrqGpHFMdMiRMcnQBWwyAfonur2/NZ Wx2n8NrOO3PtUMrAHS2txwCkepZXagaA4hQGoPrXRpD4vhRA5NpQfpGCg0AMbsNyQ4w3oX JCvR4X3PAFggVq+GuDcOHpx1ePwR5mjRhqG+T8eH9JR9L8XiONGe4/i4X1RyI2cmVDnVA2 ZosmPFl686HPsjVHdKB+MQp+zv5cBlXIgY7ah8yEEnd+iXsL35AcZt42vkZenqDMxuJ9k5 zc9mX5Rs4tEF5V/1x+Diosk4K1MsfCS6NwufjDFRN5NSc0zowvjnpmaHgRzOgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716333913; a=rsa-sha256; cv=none; b=L0eQ9TAr9N4F9kHwiW4eSlEvyPCdKZ7M/OwMD+C5VsePGmZsnneVY1mOkwVTVlMjyvNl9R 9o602huL1ceESC1pxFHRZxPBLwppsS0IKEDmdZWYtuUZhCE2TD3nUtwx7iwdmPs/+ZbmT0 /NdegJaBvyexoHb2xlxBj7xhwEWVoQtXImqk10h2cfkTR6YfTYIwepu/JH6LAQOSymt8IY P2qAPDfvYrOc7nV8lrOfVABevqNVsXwarOiUbSdKNhJvgLF9qAYxR4Om0hPceNtFNiGuCS 46oAJ9Eg3zEzvXkQMw/PR4KphHOkRcHGdKyP/d0MQObm/7Ux9qv0IezPkfAX/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716333913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyOABYotkSVoeFaiMvz2Di2/5Aq+aGI0Ylh6v8d76dE=; b=NK/u9ftnN0XiBPOxoLtKI97g0WpzbXMjh2fJbTE0wPrs2uqE2AXbp5iBiyycR1uIIfKigM lti3mc7zqjI7U5Hn9GDkk/+TlaWEGwxTS8DrIYOO4gwiU3VbEKHryFYuQ+tL02lQGwIZtx b0u57kBU3+gS9nl6jbrtIUKcXYxX+DmeQOifyCda52o9cXQvvQPBZf58LmgOrbO6Sb9dR1 /S2eBdglOERkkfKogyHKxaEhsSBv7YbkoTqLPiJojWaPmBi5KG87YRnLdOv2ue8eZlOy4q vzZB4XYEs/P9TxnY83JTrA7tqWJXvpFNwEa9Vbt1ZvzmacUpnpGQ2qYJb+/Kvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkVsP1yN9zhP3; Tue, 21 May 2024 23:25: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 44LNPDCQ080936; Tue, 21 May 2024 23:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNPDND080933; Tue, 21 May 2024 23:25:13 GMT (envelope-from git) Date: Tue, 21 May 2024 23:25:13 GMT Message-Id: <202405212325.44LNPDND080933@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ba222f6fb4b2 - main - iavf(4): Improve man page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba222f6fb4b226ab24beaa13a8591dcb624ae70f Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ba222f6fb4b226ab24beaa13a8591dcb624ae70f commit ba222f6fb4b226ab24beaa13a8591dcb624ae70f Author: Eric Joyner AuthorDate: 2024-05-21 23:24:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-21 23:24:31 +0000 iavf(4): Improve man page MFC after: 3 days Reviewed by: erj Differential Revision: https://reviews.freebsd.org/D43093 --- share/man/man4/iavf.4 | 348 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 282 insertions(+), 66 deletions(-) diff --git a/share/man/man4/iavf.4 b/share/man/man4/iavf.4 index 2e265a5a2fbb..d55e084e82cc 100644 --- a/share/man/man4/iavf.4 +++ b/share/man/man4/iavf.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2013-2018, Intel Corporation .\" All rights reserved. .\" @@ -29,12 +32,12 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd January 30, 2019 +.Dd May 21, 2024 .Dt IAVF 4 .Os .Sh NAME .Nm iavf -.Nd "Intel Adaptive Virtual Function driver" +.Nd "Intel Ethernet Adaptive Virtual Function Driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -51,87 +54,300 @@ if_iavf_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the PCI Virtual Functions from the 700 Series of -ethernet devices and newer product families. -The driver supports Jumbo Frames, TX/RX checksum offload, -TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, and -Receive Side Steering (RSS), all for both IPv4 and IPv6. -For further hardware information and questions related to hardware -requirements, see -.Pa http://support.intel.com/ . -.Pp -Support for Jumbo Frames is provided via the interface MTU setting. -Selecting an MTU larger than 1500 bytes with the +driver provides support for any PCI Virtual Function created from certain +Intel Ethernet devices. +This driver is compatible with virtual functions bound to devices based on the +following: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.It +Intel\(rg Ethernet Controller I710 +.It +Intel\(rg Ethernet Controller X710 +.It +Intel\(rg Ethernet Controller XL710 +.It +Intel\(rg Ethernet Network Connection X722 +.It +Intel\(rg Ethernet Controller XXV710 +.It +Intel\(rg Ethernet Controller V710 +.El +.Pp +The associated Physical Function (PF) drivers for this VF driver are: +.Pp +.Bl -bullet -compact +.It +.Xr ice 4 +.It +.Xr ixl 4 +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your Intel Ethernet Adapter. +All hardware requirements listed apply to use with +.Fx . +.Ss The VF Driver +The VF driver is normally used in a virtualized environment where a host driver +manages SR\-IOV, and provides a VF device to the guest. +.Pp +In the +.Fx +guest, the iavf driver would be loaded and will function using +the VF device assigned to it. +.Pp +The VF driver provides most of the same functionality as the core driver, but +is actually a subordinate to the host. +Access to many controls is accomplished by a request to the host via what is +called the "Admin queue." +These are startup and initialization events, however; once in operation, the +device is self\-contained and should achieve near native performance. +.Pp +Some notable limitations of the VF environment: +.Bl -bullet +.It +The PF can configure the VF to allow promiscuous mode, using a configuration +parameter in +.Xr iovctl.conf 5 ; +otherwise, promiscuous mode will not work +.It +Media info is not available from the PF, so the active media will always be +displayed as auto in .Xr ifconfig 8 -utility configures the adapter to receive and transmit Jumbo Frames. -The maximum MTU size for Jumbo Frames is 9706. +.El +.Ss Adaptive Virtual Function +Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to +adapt to changing feature sets of the physical function driver (PF) with which +it is associated. +This allows system administrators to update a PF without having to update all +the VFs associated with it. +All AVFs have a single common device ID and branding string. .Pp -Offloads are also controlled via the interface, for instance, -checksumming for both IPv4 and IPv6 can be set and unset, TSO4 -and/or TSO6, and finally LRO can be set and unset. +AVFs have a minimum set of features known as "base mode," but may provide +additional features depending on what features are available in the PF with +which the AVF is associated. +The following are base mode features: +.Bl -bullet -compact +.It +4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) +for Tx/Rx +.It +iavf descriptors and ring format +.It +Descriptor write\-back completion +.It +1 control queue, with iavf descriptors, CSRs and ring format +.It +5 MSI\-X interrupt vectors and corresponding iavf CSRs +.It +1 Interrupt Throttle Rate (ITR) index +.It +1 Virtual Station Interface (VSI) per VF +.It +1 Traffic Class (TC), TC0 +.It +Receive Side Scaling (RSS) with 64 entry indirection table and key, +configured through the PF +.It +1 unicast MAC address reserved per VF +.It +8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device +.It +16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device +.It +Stateless offloads \- non\-tunneled checksums +.It +AVF device ID +.It +HW mailbox is used for VF to PF communications +.El +.Sh CONFIGURATION AND TUNING +.Ss Important System Configuration Changes +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. .Pp -For more information on configuring this device, see -.Xr ifconfig 8 . +The default is 1000. .Pp -.Em NOTE : -This +Best throughput results are seen with a large MTU; use 9706 if possible. +The default number of descriptors per ring is 1024. +Increasing this may improve performance, depending on your use case. +.Ss Configuring for no iflib +.Xr iflib 4 +is a common framework for network interface drivers for +.Fx +that uses a shared set of sysctl names. +.Pp +The default .Nm -driver is only for Virtual Functions. -For 700 series Physical Functions, use the -.Xr ixl 4 -driver. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt before booting the kernel or stored in -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va hw.iavf.rx_itr -The RX interrupt rate value, set to 62 (124 usec) by default. -.It Va hw.iavf.tx_itr -The TX interrupt rate value, set to 122 (244 usec) by default. -.It Va hw.iavf.enable_head_writeback -When the driver is finding the last TX descriptor processed by the hardware, -use a value written to memory by the hardware instead of scanning the -descriptor ring for completed descriptors. -Disabled by default; this mimics the "legacy" TX behavior found in -.Xr ixgbe 4 . -to ensure compatibility with future, non-700 series VF devices. +driver depends on it, but it can be compiled without it. +.Ss Jumbo Frames +Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) +to a value larger than the default value of 1500. +.Pp +Use the +.Xr ifconfig 8 +command to increase the MTU size. +.Pp +To confirm the MTU used between two specific devices, use +.Xr route 8 : +.Bd -literal -offset indent +route get +.Ed +.Pp +NOTE: +.Bl -bullet +.It +The maximum MTU setting for jumbo frames is 9706. +This corresponds to the maximum jumbo frame size of 9728 bytes. +.It +This driver will attempt to use multiple page-sized buffers to receive +each jumbo packet. +This should help to avoid buffer starvation issues when allocating receive +packets. +.It +Packet loss may have a greater impact on throughput when you use jumbo +frames. +If you observe a drop in performance after enabling jumbo frames, enabling +flow control may mitigate the issue. .El -.Sh SUPPORT -For general information and support, -go to the Intel support website at: -.Pa http://support.intel.com/ . +.Ss Checksum Offload +Checksum offloading supports both TCP and UDP packets and is supported for both +transmit and receive. +.Pp +TSO (TCP Segmentation Offload) supports both IPv4 and IPv6. +Both of these features are enabled and disabled via +.Xr ifconfig 8 . .Pp -If an issue is identified with this driver with a supported adapter, -email all the specific information related to the issue to -.Mt freebsd@intel.com . +NOTE: +.Bl -bullet -compact +.It +TSO requires Tx checksum; if Tx checksum is disabled then TSO will also +be disabled. +.El +.Ss LRO +LRO (Large Receive Offload) may provide Rx performance improvement. +However, it is incompatible with packet\-forwarding workloads. +You should carefully evaluate the environment and enable LRO when possible. +.Ss Rx and Tx Descriptor Rings +Allows you to set the Rx and Tx descriptor rings independently. +Set them via these +.Xr iflib 4 +sysctls: +.Bl -tag -width indent +.It dev.iavf.#.iflib.override_nrxds +.It dev.iavf.#.iflib.override_ntxds +.El +.Ss Link\-Level Flow Control (LFC) +The VF driver does not have access to flow control settings. +It must be managed from the host side. .Sh SEE ALSO .Xr arp 4 , +.Xr ice 4 , +.Xr iflib 4 , .Xr ixl 4 , .Xr netintro 4 , .Xr vlan 4 , -.Xr ifconfig 8 , -.Xr iflib 9 +.Xr ifconfig 8 +.Pp +See the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for additional information on features. +It is available on the Intel website at either of the following: +.Bl -bullet +.It +.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831 +.It +.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html +.El +.Pp +For information on how to identify your adapter, and for the latest Intel +network drivers, refer to the Intel Support website: +.Aq Lk http://www.intel.com/support +.Sh CAVEATS +.Ss Driver Buffer Overflow Fix +The fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069 +.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html , +is included in this and future versions of the driver. +.Ss Network Memory Buffer Allocation +.Fx +may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. +You can check to see if the system is mbuf\-starved by running +.Li "netstat -m" . +Increase the number of mbufs by editing the lines below in +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +kern.ipc.nmbclusters +kern.ipc.nmbjumbop +kern.ipc.nmbjumbo9 +kern.ipc.nmbjumbo16 +kern.ipc.nmbufs +.Ed +.Pp +The amount of memory that you allocate is system specific, and may require +some trial and error. +Also, increasing the following in +.Xr sysctl.conf 5 +could help increase +network performance: +.Bd -literal -offset indent +kern.ipc.maxsockbuf +net.inet.tcp.sendspace +net.inet.tcp.recvspace +net.inet.udp.maxdgram +net.inet.udp.recvspace +.Ed +.Ss UDP Stress Test Dropped Packet Issue +Under small packet UDP stress with the +.Nm +driver, the system may drop UDP packets due to socket buffers being full. +Setting the PF driver's Flow Control variables to the minimum may resolve the +issue. +.Ss Disable LRO when routing/bridging +LRO must be turned off when forwarding traffic. +.Sh SUPPORT +For general information, go to the Intel support website at +.Aq Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with the released source code on a supported kernel +with a supported adapter, email the specific information related to the issue +to +.Aq Mt freebsd@intel.com . +.Sh LEGAL +Intel\(rg is a trademark or registered trademark of Intel Corporation +or its subsidiaries in the United States and / or other countries. +.Pp +Other names and brands may be claimed as the property of others. .Sh HISTORY The .Nm device driver first appeared in -.Fx 10.1 . -under the name "ixlv" +.Fx 10.1 +under the name +.Nm ixlv . It was converted to use -.Xr iflib 9 -and changed to its current name in -.Fx 12 . +.Xr iflib 4 +and renamed in +.Fx 12.4 . .Sh AUTHORS -.An -nosplit The .Nm -driver was written by -.An Jack Vogel Aq Mt jfv@freebsd.org -and -.An Eric Joyner Aq Mt erj@freebsd.org . -.Sh CAVEATS -This driver is supposed to function on VFs spawned from future network devices by Intel, -but at the time of this writing, has only been tested on the 700 series VFs. +driver was written by the +.An Intel Corporation Aq Mt freebsd@intel.com From nobody Tue May 21 23:28:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkVwf4h3Zz5L4cg; Tue, 21 May 2024 23:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkVwf4BYBz4dnH; Tue, 21 May 2024 23:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vc0dX5r4NYGHzNjbWaiL/sUAv1sXExeyalTwU7B/wHQ=; b=siu3RGaXqXwZz2AmInNhT3gwyhuKyXykkoJGHHl1f700Dt7WL7xHWjDSHT4HFgeE3XY8zW TudaZNqCrmpP/v8oWtr1Rw4UzBgvgA2edHqNnOc7tZr2vOXEYTn3fd2W47Wn3fKJlt13FR JZVz/X5CFyT1Rx9lp5B442H91lsnYCgDYzWyzPy+wu1fW4uld88SolQt4gNK1sRVuw12c5 Sufoq7M5oVTAUgrd5Z+eXGtS40YfhQvX5PNuhEJLUAm8b18SmVA54VP0yIydoe6MZmC+SR vJeZ/8PC698M0mdvhlhf078uaHqzfbulqCWjXSuogmSSEgHVXerzHdS083dZFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334082; a=rsa-sha256; cv=none; b=ZJ7l0fJDDMUIngSHtfT79EMgeTrkiEyegPC39i/L0iO+taOVelk7v7NS6fGtr8a4eI0GrJ 5uYppGsUgKm0B+BkdMbjyzXeHO/Zf7XDGrr/7npEjQSmv68oAsXSVMguNnXrcyd9unnc/z RFte0pQloTjT4353MR4RwB/XoDEevt0Perlc2pbEU68zfR0+cgmniAo7E87Wi9mhxa+e3u ON1n61z4eruESrfVLkUay3cn6xjtpw8xYGCOABGsjsTN8b2Iq34AAlU/csdUU1RD/e5+bi 98ykZog7v9rjeCTsxYpYMJtxcf/CGO1Ge0XPa64uU+O+q5GLSU6vRtJnLGTojQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vc0dX5r4NYGHzNjbWaiL/sUAv1sXExeyalTwU7B/wHQ=; b=dEwIy0vidws9K3YmG4TJSvNIYSqGLzkzlnNYEEiGW/HYg1LEXl6BTsfTa63eg+wF7ntVhk ZhIkztjA2O6Fq3YgbnGnmHeUNOieCsE0CuLWZRrRF09BX03R2r2IQf/lLP9yvyqtZ73aya W6QLy8tZ9ySBXCp+zC6b7JJK6VYOjsxulML/gEQxwBkiO9bRgE20ALrbsnXEgiGYg8TXvJ 6J1x2H7WlmKXX4SZPczNd9S/UNtxDqblV8SpiePbc4zvbngfXGrMNYDLz/IAIBD5Y8n4HP /dZkz/R63R+jM6JzrjUFs6zgUMwr5PcAlrh1zPhnWDLxbtVaqbbXUFOPoNUAPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkVwf3mQXzhKp; Tue, 21 May 2024 23:28: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 44LNS2Uh081416; Tue, 21 May 2024 23:28:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNS2rl081413; Tue, 21 May 2024 23:28:02 GMT (envelope-from git) Date: Tue, 21 May 2024 23:28:02 GMT Message-Id: <202405212328.44LNS2rl081413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: bb025df25738 - main - LinuxKPI: add FIELD_PREP_CONST() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb025df257386c5d1087b652e8ed951bceb89862 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bb025df257386c5d1087b652e8ed951bceb89862 commit bb025df257386c5d1087b652e8ed951bceb89862 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:40:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-05-21 23:27:10 +0000 LinuxKPI: add FIELD_PREP_CONST() Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely expected on this version in Linux. This is called by an updated wireless driver. Sposnored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45180 --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index a2020d247489..8a91b0663f37 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -131,6 +131,10 @@ _uX_replace_bits(8) #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) +/* Likely would need extra sanity checks compared to FIELD_PREP()? */ +#define FIELD_PREP_CONST(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + #define FIELD_GET(_mask, _value) \ ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask))) From nobody Tue May 21 23:42:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFp42Grz5L5YC; Tue, 21 May 2024 23:42: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 4VkWFp2wbSz4gW7; Tue, 21 May 2024 23:42:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N39m837JWGqhTOMymAZsh0BV8Jxnw6/Jm7vYe8LpNGY=; b=Og6FdDAAoj21+oFMN9h9hhzgFPmZi0SIflFCwf+0ba5lJT4QKGczngQwXT9CPslgg9KI2+ 2lFKSWY9C82E/e2GL71gb56IBrN+msa8XIyQ4pRE2FXHw8pMrUcvBsgFtxIm35ucDpXmv1 yaxhiGz6ucyl+Wi5VkXJFDZ5TwKz0dWN/VAff9Btb+Z6TPneM4oRiQprK8hMd6Y6+q+aly temZxYtSoJl0BjcVhwcsxXuaIDJlzkiEM+V5d9r87y/v9WrgDeielTD0pGutF3n+QNHvdv G5RhN5zUP27jkdEKdqjiIpsszJ+848DiIKT9UtFVDNZqJFtvpEBXLc8hmd1B1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334974; a=rsa-sha256; cv=none; b=kNf3KseG8yTODcuAZLQh2OwxsElV3lt44V+llXNuoS+TNasoARjuxhhqgT3+ysRtnnmR8c /+Gm8MwVTjF/XhnEn+avBVWLQjsS3CVINjskyfUVassPeRI4GAJCKcoWT/5jL66ZhvPCys aaUpn66PWDkAXngOv1gj5t5pFA9CSfEfGHuHuxK1Efl1d1nHtfr483rLZu59CvJzT7DrqW IIZAluBESk2O+Ru9Mom110elG5HDnEZEfTB8HmohApTQsQcBw1MnPTKB3AdFwa+myBpdlO 9Cdy9mDsaop92fmHlIB2ykI7qi0krZdv9pOEfe/C82vyUT2mB68woKMx41SzRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N39m837JWGqhTOMymAZsh0BV8Jxnw6/Jm7vYe8LpNGY=; b=XtRQtlTQOKuJwlWSgrKaiinCp9tus3/3sv3tvkd4TzjGSngRKi4r9CRYl8HxfS1/5Zg0Nv I0xab2BqGvtCoSIZXe2k+yJimSTEdhfsAGDbtHabC5NAslRllpBBDkBYEcXjta5ZucV9m5 iYmjHvOb1eCg3HqZ5NiStgbkAaI3zJvxuByL/b1A+njPH8UQuBUguNcHlSs6Qu5APAMYsP en16+++z78GrOP8PwB9AoGKWsAe0YUXRMdUYRLuzOnVaD/wKTOzK+Z17Df48tE9nK7Fabk JTkMXpvQEQP98kg3WE7TexXPuC0MwitMM36JAyoJ7/mdBYBVhFliTSAQ9w+csg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWFp2XGFzj4K; Tue, 21 May 2024 23:42: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 44LNgsbf014348; Tue, 21 May 2024 23:42:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNgs8d014345; Tue, 21 May 2024 23:42:54 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:54 GMT Message-Id: <202405212342.44LNgs8d014345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7839534a5a7b - main - autofs manuals: align lists, tag SPDX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7839534a5a7b0d97131512888d6baa8ba5c20e56 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7839534a5a7b0d97131512888d6baa8ba5c20e56 commit 7839534a5a7b0d97131512888d6baa8ba5c20e56 Author: Alexander Ziaee AuthorDate: 2024-05-16 23:18:30 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 autofs manuals: align lists, tag SPDX MFC after: 3 days Fixes: 286c4906d60f (add -noauto), 3914ddf8a7b1 (import autofs) Pull Request: https://github.com/freebsd/freebsd-src/pull/1243 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1243 --- usr.sbin/autofs/auto_master.5 | 5 ++++- usr.sbin/autofs/automount.8 | 5 ++++- usr.sbin/autofs/automountd.8 | 5 ++++- usr.sbin/autofs/autounmountd.8 | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/usr.sbin/autofs/auto_master.5 b/usr.sbin/autofs/auto_master.5 index 30c78cc26766..4f960161859b 100644 --- a/usr.sbin/autofs/auto_master.5 +++ b/usr.sbin/autofs/auto_master.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -246,7 +249,7 @@ Special maps have names beginning with .Li - . Supported special maps are: .Pp -.Bl -tag -width "-hosts" -compact +.Bl -tag -width "-noauto" -compact .It Li -hosts Query the remote NFS server and map exported shares. This map is traditionally mounted on diff --git a/usr.sbin/autofs/automount.8 b/usr.sbin/autofs/automount.8 index 953b3c265178..83ff1cd61709 100644 --- a/usr.sbin/autofs/automount.8 +++ b/usr.sbin/autofs/automount.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -49,7 +52,7 @@ or unmounts .Xr autofs 4 filesystems to match. These options are available: -.Bl -tag -width ".Fl v" +.Bl -tag -width "-D" .It Fl D Define a variable. It is only useful with diff --git a/usr.sbin/autofs/automountd.8 b/usr.sbin/autofs/automountd.8 index 0384fe2e7ed2..1a790fa52414 100644 --- a/usr.sbin/autofs/automountd.8 +++ b/usr.sbin/autofs/automountd.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -54,7 +57,7 @@ forks a child process. The child process parses the appropriate map and mounts filesystems accordingly. Then it signals the kernel to release blocked processes that were waiting for the mount. -.Bl -tag -width ".Fl v" +.Bl -tag -width "-m maxproc" .It Fl D Define a variable. .It Fl i diff --git a/usr.sbin/autofs/autounmountd.8 b/usr.sbin/autofs/autounmountd.8 index 69b4565703e6..582e0d36b214 100644 --- a/usr.sbin/autofs/autounmountd.8 +++ b/usr.sbin/autofs/autounmountd.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -52,7 +55,7 @@ After a specified time passes, attempts to unmount a filesystem, retrying after some time if necessary. .Pp These options are available: -.Bl -tag -width ".Fl v" +.Bl -tag -width "-d" .It Fl d Debug mode: increase verbosity and do not daemonize. .It Fl r From nobody Tue May 21 23:42:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFq64Hmz5L5lJ; Tue, 21 May 2024 23:42: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 4VkWFq3vvfz4gBq; Tue, 21 May 2024 23:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HjrC6geoJLKRj1zwRnc4ahXKogSHngVTOJe3Ik+Cl68=; b=HFDSq74uYRKx3fN00c9NaW4uWwLKoBOdQcETNhTmVmS40g8s5b8aYbXZ9sns9eA4QkATQ4 wj6ntfcxQXaGheRFw61+Ul/NIs0vgX4Xdzz+JL8Cvz2UGY0feOvU52BOkaSvFB4J7aBG9r Hm+E/Ew1Sg0UETL3wx4+PL1bLCbZc+Y+67dji3MfG84+/8t0QMGLZx7Vi9AQ7jPX8PprqN L4+R0ip3v21gqeDDzGdpzmo92KPHx6/+rReyNldR0mT/V794GtSs0PX3KoAoru/tYL8bdb cUdE/ztKWLi9QogDfIAfphizrjyFkWwh+6P9IM8MJWkCNcL5gtCMzDU2OEn/UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334975; a=rsa-sha256; cv=none; b=sOgMOeAQ80KBFIqG2ypEZSi7OHgmM2wBZId+6nt9d568rnOTJc1oE9b08q68eYMh+T10A6 NYYXJFVd7R2HgAdJND/+cC4NgnjRdXjcyOnlexFGUnNH3fiknDPqdC11Zjbnc+YR3flfw5 zY8AsXnLW5dg2KMD+2C+ZzKli8WVW5ckgLgNlhJDGQh636UbqR2WAw9EplyRN6Ea3Lvcfg SiHZFNH6vWrjkM5xAWe0NergDkSdExAFE9dIQ15sgLwzOwTAI3ksJXTV7/bdIOMKRpmDRo pTyeKhCxCAmD+HDdnLG2uaDKtoXf50tk7ZaYrYqLM1HdUheuDzCBu8nQD7mPGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HjrC6geoJLKRj1zwRnc4ahXKogSHngVTOJe3Ik+Cl68=; b=kbi6uDIab9U4v0J2ynhUw5v+7L/6obimfoJYqwTa9aGmiHCTgn/I/jRN4L1pJztmwrxWWt 4+nXQF/jGmhec1cHc6xknhIzpOT22FD6LDCaw8pI7iB/vb+m+XZb8uDEOsoo+xS0e14KKw 1PoNgffc7M4uC/pPvVhD/q5uLxWeiHy5etSBOM8KbQvQKwDY0+jolyIdH4FJS+q1oRRzCA USCpNSoTaN/gWQZ1V3OqEYfEIdEV4oQbi1bXXS9gc42L/2BDzookTGn3JjD0ajyZWk5Fz8 DTR1lh//vv9uhVd4o1fLXxJ7Dge/p+yjKEAcFbmFqX85ZHjXzpXmzJm0GzYevw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWFq3Wmtzj2c; Tue, 21 May 2024 23:42: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 44LNgt6B014391; Tue, 21 May 2024 23:42:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNgtuL014388; Tue, 21 May 2024 23:42:55 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:55 GMT Message-Id: <202405212342.44LNgtuL014388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5ad3b09f2fe9 - main - unionfs.4: describe better, tag SPDX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ad3b09f2fe91028d3ffccb80d128d3408ef74f8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5ad3b09f2fe91028d3ffccb80d128d3408ef74f8 commit 5ad3b09f2fe91028d3ffccb80d128d3408ef74f8 Author: Alexander Ziaee AuthorDate: 2024-05-16 22:49:01 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 unionfs.4: describe better, tag SPDX Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1242 --- share/man/man4/unionfs.4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man4/unionfs.4 b/share/man/man4/unionfs.4 index 205958def903..85714331b6ce 100644 --- a/share/man/man4/unionfs.4 +++ b/share/man/man4/unionfs.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Gordon Bergling .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +29,7 @@ .Os .Sh NAME .Nm unionfs -.Nd "UNION FS" +.Nd union mount file system .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your From nobody Tue May 21 23:42:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFr5Wk2z5L5sl; Tue, 21 May 2024 23:42: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 4VkWFr4sljz4gbw; Tue, 21 May 2024 23:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikNPhqJS0MHtfRi1LQUfBAiw4uI9117pjFfppL127sE=; b=X0LhxItUuIzb9laTTGPoLnbhaoUGxdvKEfBawHtxdhkZ3jNutrNntGH6oSI6xFa2/NGUzo Dr194P9EY2g8CEo5fZkPv8Fk4Co1j5ozHjgbeqj5caDr2JSmKNApnXaX4/kclmcpuurCPw XE/la71N9Rce4TihREXURLoBfSvVCSUyPHEkRwYeBpz2G5QQFiMIQqeem2OQRUX9jFcEdy M0grsvyMyxjT2EPggAjxX5TrkbdJx+tq0Dwn5yk/525ISn0rBjdVDVlhBIglJ4KAJsRM1W MWc48KN9Rsh1qYXhOQJ/Of9EjkyxCtbQFTvXw8KuHobIAbwST4lLp1HtqcWF1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334976; a=rsa-sha256; cv=none; b=MdvXsVWP6KQRCUE6kLuHjcicKt6NjPxXoFp8QHQKxj8dKAC3PFUIBVAzzd1IVXtybPYRXl VpL/mHdwvx04PS5bG8YSov7E3OSxnHVrYjpjfdMmnDudtBxNXw+iyPpg++znfOINNPQAgs C9aJ7tdG/WLNqBoHoIPiwJ7QoQ7jq/uy0kPmAooKLvnofljM/87lW9OYW/V+z1qFEDIebS PuJH2eo4K+O26S2BgDB0hG0tjrKa250RzODaBcZKI3hN3Cy7GwNXuqieT/LY+JDV4cwSK4 Z9r8uVpGYa9qlPXjwKs71VhKs5xtsO4ua8EQQ6wWJ+LCPfbSJPrDFzLMpMZBxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikNPhqJS0MHtfRi1LQUfBAiw4uI9117pjFfppL127sE=; b=ebwRYVgW7oslUbpON/nN0e1Q7ZyP+6ln7Kg2Ze+SEQA1GSxDh8P9OKT1WBfnFH8Yov2iBk 70yFTSTsAvEZGh39fVwprmtEbXrZ/4b85sxWY6TFOaR3AljPB8zpumk+w7Eb/D6RgXHczr KQGiB15IuuGeGXNcAZdcAGEbpy925EEIU4wMgKKElvRChhiD5YrKhsKMQvf66qv3LYtpvm wfE1rMmyQFbPnwwch1GxXj8aRCm6/n6lbcOXLWhrgRCW10P8yrfpiC1nF8Q9ABejvU49P+ L+sv8J1i6xhWFn6IWB1WCuhAi3B1fTlZuD7ajZzPhXgfzNWBU1LTok7YhC1uXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWFr4Tvfzj2d; Tue, 21 May 2024 23:42: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 44LNguxd014434; Tue, 21 May 2024 23:42:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNguTl014431; Tue, 21 May 2024 23:42:56 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:56 GMT Message-Id: <202405212342.44LNguTl014431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bd2d71b1c865 - main - smb.4/smbfs.4: distinguishable descriptions, +SPDX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd2d71b1c8658c05f92dd87dede042c498d66d50 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd2d71b1c8658c05f92dd87dede042c498d66d50 commit bd2d71b1c8658c05f92dd87dede042c498d66d50 Author: Alexander Ziaee AuthorDate: 2024-05-16 21:54:30 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 smb.4/smbfs.4: distinguishable descriptions, +SPDX Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1241 --- share/man/man4/smb.4 | 5 ++++- share/man/man4/smbfs.4 | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index d2a1c3b9a618..fb4836c03688 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifer: BSD-2-Clause +.\" .\" Copyright (c) 1998, Nicolas Souchu .\" Copyright (c) 2004, Joerg Wunsch .\" Copyright (c) 2015, Michael Gmelin @@ -29,7 +32,7 @@ .Os .Sh NAME .Nm smb -.Nd SMB generic I/O device driver +.Nd System Management Bus generic I/O device driver .Sh SYNOPSIS .Cd "device smb" .Sh DESCRIPTION diff --git a/share/man/man4/smbfs.4 b/share/man/man4/smbfs.4 index c0650b8e17d6..f60a9618bc3f 100644 --- a/share/man/man4/smbfs.4 +++ b/share/man/man4/smbfs.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Gordon Bergling .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +29,7 @@ .Os .Sh NAME .Nm smbfs -.Nd "SMB FS" +.Nd server message block (SMB1/CIFS) file system .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your From nobody Tue May 21 23:42:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFt0nZdz5L5sn; Tue, 21 May 2024 23:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWFs5qkHz4gY9; Tue, 21 May 2024 23:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=knjsLndYunGLnSmzNWfPZtGDx4+XG0rUEZCwIJ+8KQo=; b=afUtpOJbByg5+jC3VVxD1ESgksYrvTQ4HcKddaysH6amAk61lrlhjQC0HEYVnZLLZpGdBS F6mXOZvm3CXMy/h1bvq+9lrriSGrD6Rz8B8WCsUesy3jXncAnythQetFlnoO6g7fex5dLs gqSmjOX55GS61dW7FuRmb5zjmR2VJlBDZdECxhqhDX/IrWeWLa8bBWW/pgOQnSpnOICPlm CvUnEfwElzGaihPUooz3Z/2ElfZ+Q8iGYdjscrpRhKKN9jW+uSDDoaVrCzNRQIKoPRcCgz UlQnucLOfXDPiNQBsMyWEF94fjixp01OqFXnBUrZfJKU0Y1NaoNjwZZwKjArtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334977; a=rsa-sha256; cv=none; b=xL0yaMuEm9xXPRN2yvmg+jzVV4aNqEuzF+L1cV1zw2zv0Q+T0K0N9tjb1CiTxB5n1fTDSo R1rk8bzq90xm5kylkZKy85M2KUYAjYebla11R/5Kmm0mY88a33UEb1kKVpihYTw+qivqaf LsmTixwN6i9EExzret2N6llBZxiSOmnGrnz7E515pUVEmb0SvhaqdI2k1itt4teZI3asVK uIxrljxNzF8jm7dewL35749nU+ca/22oK2ocshCjHKoHcJlDSJTosCAN+ghpVno4QnZC1s hqMvWaz6nh7jU1tX0iCPVsgY8iM2bt08FrbYBq7IVlPEk04wVFzlIqqKwnaZGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=knjsLndYunGLnSmzNWfPZtGDx4+XG0rUEZCwIJ+8KQo=; b=stgY3OWVtS2jjoNsW1/fq4FvPuZfNgpVegxo9Wvd7kCJxIwWzVkF42CkjuFbxDph9GlbYN GV9XVhwYxnzOwv7hYr+AH5hRIV7IRlCrwbsgJHW50HTdbWt3+QcFAJfX1OG4LYNQPUfUco H7ODgM/uJlQAOIeOia9GOi1EzHErnakDgvTb1Ihd/zqB1Kl7HZXIcnfTKC8ASqT5GEpWGl Wi/b/de94a9u2sv/5u+IgY1QqGNeihHoWRgPN9sI26Wr6nuTaWv/RPDR4Dr13iiSnVqIsr nC2VL7VIH3U1e8FRGzi3mxlwrAuwRFh9HYMMVpssB4FcKoqz7DK5pzcKvaVxOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWFs5RVYzhd6; Tue, 21 May 2024 23:42: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 44LNgvIQ014480; Tue, 21 May 2024 23:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNgvql014477; Tue, 21 May 2024 23:42:57 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:57 GMT Message-Id: <202405212342.44LNgvql014477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 408572a24e55 - main - libnvmf: avoid resource leak List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 408572a24e55a4c9ff9f81d1403ec0e055841264 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=408572a24e55a4c9ff9f81d1403ec0e055841264 commit 408572a24e55a4c9ff9f81d1403ec0e055841264 Author: Pierre Pronchery AuthorDate: 2024-05-16 14:34:34 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 libnvmf: avoid resource leak In nvmf_host_fetch_discovery_log_page(), the log variable may have been allocated on the heap during the first loop cycle, and should be free()'d before exiting upon errors. Reported by: Coverity CID: 1545034 Sponsored by: The FreeBSD Foundation Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1239 --- lib/libnvmf/nvmf_host.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libnvmf/nvmf_host.c b/lib/libnvmf/nvmf_host.c index b78e2af65897..a0d95470d8ee 100644 --- a/lib/libnvmf/nvmf_host.c +++ b/lib/libnvmf/nvmf_host.c @@ -653,19 +653,23 @@ nvmf_host_fetch_discovery_log_page(struct nvmf_qpair *qp, log = NULL; for (;;) { error = nvmf_get_discovery_log_page(qp, 0, &hdr, sizeof(hdr)); - if (error != 0) + if (error != 0) { + free(log); return (error); + } nvme_discovery_log_swapbytes(&hdr); if (hdr.recfmt != 0) { printf("NVMF: Unsupported discovery log format: %d\n", hdr.recfmt); + free(log); return (EINVAL); } if (hdr.numrec > 1024) { printf("NVMF: Too many discovery log entries: %ju\n", (uintmax_t)hdr.numrec); + free(log); return (EFBIG); } From nobody Tue May 21 23:56:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYJ1sM3z5L6lQ; Tue, 21 May 2024 23:56: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 4VkWYH6lqcz4jHJ; Tue, 21 May 2024 23:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Dn1wn6vsoeUFIbq8vSDtkRP7cSlzlZKH0GfUhZPeHc=; b=aOy/sgWKGF/gQvEeEe+6y3qecHM6QID16JGnhJO1fQ96aJbX4bUWIpSgsp+8BFtKOG7qm8 5DQPy4N45psMmLJr2mGnR7fvYxT3g1wEDK7ju6xls2cJWfENRRAA5qu9/BNdEfAMsPwYZQ 0GR77CLAAg9jVU1SpmBPMkJo101SF3GfhkZ+MyTuVaOnsVLqQjBN8Gxc1Dei8POZ75USOT NrxehYazOnFe2yyzh15fzs8dKhWVO4XXDpOOvq8n7B+MhxFpr56FDZgag6xPh0otI2ALlu laDwBw+07RGC+L+yO/dgLHA25/eGnE2kxKsDoMhyvP5fvQ6kcEm+mZJaAbJDCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335779; a=rsa-sha256; cv=none; b=ec2YGPN7G9AwwEA5jwzGcyjjn4W3ix8I0qC8BQTsuAHeXkt0Pf7+DNioeMR/jnophLZE05 J1az6UxKh24lnan8YVA5Uhg1ERbiXkLmQ4zYL2mdnvRv/j/4oygKwjgZK+uIoxPagTQ5is c3P5E2hYNmmAZW491cCdqb+q4/8Uy/0SPjEPkm7a6q1RoSlZmw77HNjOb7g4uWd0RAfCYI zjpoCvd9yw2R5gU3x1rTDvvt8A1n6eYA3I9QApKPdFEwCd0nK6jPdS5bg0futawcmkQhfo V0p4vG3n4OsX0u3OVgHLqg5uUYMvBxSk8RkjJZYfH6iFwbJA9rz6Sl7GQL3uOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Dn1wn6vsoeUFIbq8vSDtkRP7cSlzlZKH0GfUhZPeHc=; b=phPWluQ+TLz9sCfueMBOLOx61QOVc+yW7mikqMNlhsxgqWPnISux6mUm6EFyd8qrztecRA O/JH9JBHUEffv42lq98Oc3t6NuXYOn0xG3YqN3iZs5yPJSdn4nyhNJ0rXoQXOLPau5tu7B xPrBR8xwjch9TwsHr5sXlPVmI7zJ4cnIXSW2VRQN6wKJNa5fKC8rZlPLJpi5XqZo7q0buL vvVWPVEa8JRumvu+T/mM5tLhdDnD07hA/6hXFBi6omlyieUOOrwnujvm1VixuU1umyOXXf QIuWHlHMgUih+H8MgAakc6HLk2pRMgYApeATus93SMBqOfdGP4zAB5Vg0F5j3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWYH64n5zj4p; Tue, 21 May 2024 23:56: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 44LNuJbB032126; Tue, 21 May 2024 23:56:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuJRg032123; Tue, 21 May 2024 23:56:19 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:19 GMT Message-Id: <202405212356.44LNuJRg032123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 973c32297f3b - main - kern/rman: update DPRINTF() macro, avoid semicolon swallowing match function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 973c32297f3b43deae37d8e26b25d1133daa2a38 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=973c32297f3b43deae37d8e26b25d1133daa2a38 commit 973c32297f3b43deae37d8e26b25d1133daa2a38 Author: Elliott Mitchell AuthorDate: 2024-05-09 05:34:49 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:15 +0000 kern/rman: update DPRINTF() macro, avoid semicolon swallowing match function Using a variadic macro allows passing everything properly to printf(). Using the do { } while(0) construct ensures the macro acts like any other single statement. This shows just how long some of this has existed. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 1393781a66fe..ffd8def66b5c 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -98,7 +98,7 @@ static int rman_debug = 0; SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN, &rman_debug, 0, "rman debug"); -#define DPRINTF(params) if (rman_debug) printf params +#define DPRINTF(...) do { if (rman_debug) printf(__VA_ARGS__); } while (0) static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager"); @@ -154,8 +154,8 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end) struct resource_i *r, *s, *t; int rv = 0; - DPRINTF(("rman_manage_region: <%s> request: start %#jx, end %#jx\n", - rm->rm_descr, start, end)); + DPRINTF("rman_manage_region: <%s> request: start %#jx, end %#jx\n", + rm->rm_descr, start, end); if (start < rm->rm_start || end > rm->rm_end) return EINVAL; r = int_alloc_resource(M_NOWAIT); @@ -439,10 +439,10 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rv = NULL; - DPRINTF(("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], " + DPRINTF("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], " "length %#jx, flags %x, device %s\n", rm->rm_descr, start, end, count, flags, - dev == NULL ? "" : device_get_nameunit(dev))); + dev == NULL ? "" : device_get_nameunit(dev)); KASSERT(count != 0, ("%s: attempted to allocate an empty range", __func__)); KASSERT((flags & RF_FIRSTSHARE) == 0, @@ -453,21 +453,21 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, r = TAILQ_FIRST(&rm->rm_list); if (r == NULL) { - DPRINTF(("NULL list head\n")); + DPRINTF("NULL list head\n"); } else { - DPRINTF(("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1)); + DPRINTF("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n", + r->r_end, start, count-1); } for (r = TAILQ_FIRST(&rm->rm_list); r && r->r_end < start + count - 1; r = TAILQ_NEXT(r, r_link)) { ; - DPRINTF(("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1)); + DPRINTF("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n", + r->r_end, start, count-1); } if (r == NULL) { - DPRINTF(("could not find a region\n")); + DPRINTF("could not find a region\n"); goto out; } @@ -481,23 +481,23 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, * First try to find an acceptable totally-unshared region. */ for (s = r; s; s = TAILQ_NEXT(s, r_link)) { - DPRINTF(("considering [%#jx, %#jx]\n", s->r_start, s->r_end)); + DPRINTF("considering [%#jx, %#jx]\n", s->r_start, s->r_end); /* * The resource list is sorted, so there is no point in * searching further once r_start is too large. */ if (s->r_start > end - (count - 1)) { - DPRINTF(("s->r_start (%#jx) + count - 1> end (%#jx)\n", - s->r_start, end)); + DPRINTF("s->r_start (%#jx) + count - 1> end (%#jx)\n", + s->r_start, end); break; } if (s->r_start > RM_MAX_END - amask) { - DPRINTF(("s->r_start (%#jx) + amask (%#jx) too large\n", - s->r_start, amask)); + DPRINTF("s->r_start (%#jx) + amask (%#jx) too large\n", + s->r_start, amask); break; } if (s->r_flags & RF_ALLOCATED) { - DPRINTF(("region is allocated\n")); + DPRINTF("region is allocated\n"); continue; } rstart = ummax(s->r_start, start); @@ -514,17 +514,17 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rstart < s->r_end); rend = ummin(s->r_end, ummax(rstart + count - 1, end)); if (rstart > rend) { - DPRINTF(("adjusted start exceeds end\n")); + DPRINTF("adjusted start exceeds end\n"); continue; } - DPRINTF(("truncated region: [%#jx, %#jx]; size %#jx (requested %#jx)\n", - rstart, rend, (rend - rstart + 1), count)); + DPRINTF("truncated region: [%#jx, %#jx]; size %#jx (requested %#jx)\n", + rstart, rend, (rend - rstart + 1), count); if ((rend - rstart) >= (count - 1)) { - DPRINTF(("candidate region: [%#jx, %#jx], size %#jx\n", - rstart, rend, (rend - rstart + 1))); + DPRINTF("candidate region: [%#jx, %#jx], size %#jx\n", + rstart, rend, (rend - rstart + 1)); if ((s->r_end - s->r_start + 1) == count) { - DPRINTF(("candidate region is entire chunk\n")); + DPRINTF("candidate region is entire chunk\n"); rv = s; rv->r_flags = new_rflags; rv->r_dev = dev; @@ -551,11 +551,11 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rv->r_rm = rm; if (s->r_start < rv->r_start && s->r_end > rv->r_end) { - DPRINTF(("splitting region in three parts: " + DPRINTF("splitting region in three parts: " "[%#jx, %#jx]; [%#jx, %#jx]; [%#jx, %#jx]\n", s->r_start, rv->r_start - 1, rv->r_start, rv->r_end, - rv->r_end + 1, s->r_end)); + rv->r_end + 1, s->r_end); /* * We are allocating in the middle. */ @@ -575,14 +575,14 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, TAILQ_INSERT_AFTER(&rm->rm_list, rv, r, r_link); } else if (s->r_start == rv->r_start) { - DPRINTF(("allocating from the beginning\n")); + DPRINTF("allocating from the beginning\n"); /* * We are allocating at the beginning. */ s->r_start = rv->r_end + 1; TAILQ_INSERT_BEFORE(s, rv, r_link); } else { - DPRINTF(("allocating at the end\n")); + DPRINTF("allocating at the end\n"); /* * We are allocating at the end. */ @@ -602,7 +602,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, * former restriction could probably be lifted without too much * additional work, but this does not seem warranted.) */ - DPRINTF(("no unshared regions found\n")); + DPRINTF("no unshared regions found\n"); if ((flags & RF_SHAREABLE) == 0) goto out; From nobody Tue May 21 23:56:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYK2Qstz5L6NG; Tue, 21 May 2024 23:56: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 4VkWYK15Jbz4jDl; Tue, 21 May 2024 23:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qrsnISRICuEHpHcLNQMjuAdlG4LZ2NbIJw3pj1KFhso=; b=srTHLw8suQAltnTJSOin81YShx4pBzBS4XCXvgY7Yrg5f2Cj1qu4qfCpA2Bk59sn8ueR46 uB771vQ6tBNqy4WoVJjMiaWgahxWsQTyvldvQtEuqnxmBiUwDdYsCpXTTR9V8+232kZLs/ 3ulxFY1OCXP65JsTyJc/6mcIBpLOHR0k5g8pQyd3ZoLeDzYvW4jqWd3QRG+AaTlXVVFjtz oix/CxrBx5JktorpZzuXrmG9caZAfxdHwciiAgCuXPJuUlwbQxXeTaxOursbywhN6eczKL NtHKc0n0lBKBvMu7el5Zq1FkPJ16e8fHKZGWfHXYCp30HqTaA/1Rkb0VG4HIbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335781; a=rsa-sha256; cv=none; b=bbU+1A9YTnVTyhgNKbmTMTLojX9mpLfLq7eO+tIrJii2xQV6mt3P4jRSzGOURIeWpsW31a lW0ReaY7rMFcyEm8vtMEcxS9p3HEcww2rIui1wcheryPWsICqwSW1b91A4nBrXR1w02A4Y KunBRTd0kNJnZF6B5IHQPF6L3oTGA76fJXNCzQ96IIEjf4sDKbvGNR2omzijkD2eXA1gcm VZPf2sZk1ApyDKOydHLlrTLz4s3Ri63jNzqScriGy5FQPg0ohEsoWHnZ8dmUhyjkw3nrjJ uMiXY1jbW9xVPYXQ7Bauzdy8K/U5sMJefln94B4Vvdty/pNndlKbQnvWMsQlVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qrsnISRICuEHpHcLNQMjuAdlG4LZ2NbIJw3pj1KFhso=; b=h2HDt0LwvbNJen3eZ7TiKia+GxhsegXBxLlAx1bzG+dNOnCTD3bcx+fDF5zJDcOJ/h702T Jw3/+Kb6BuP72Pi3wig8fscEsBxkh9eMLU2junhoN2Vvi9omJwJJQtwMvXKF9B4OItLOnw 3ScFS8RuHDYnreb72wLREivjz/ATiZ4Z9eCuGgl913Pc6NKgp3yeAa+ERWwpRK8lssEOAo /5jT8BWVG6exrVMWkVGYLpcSKiZQ37cW7qyf+tLPLk6ZNBBGU8hjb4lRtRJkUXXLnXkudY IJ/bCIIT0rCZ7gpvyvwlSjk7MwSh0G1MrEoCHHdOy2JHVL7NfIGt3toHfDDFbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWYJ74vVzjKB; Tue, 21 May 2024 23:56: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 44LNuKTd032171; Tue, 21 May 2024 23:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuKS8032168; Tue, 21 May 2024 23:56:20 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:20 GMT Message-Id: <202405212356.44LNuKS8032168@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: beb1165a018d - main - kern/rman: update debugging lines in subr_rman.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: beb1165a018d32f243c331a427dc212cf3b7febd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=beb1165a018d32f243c331a427dc212cf3b7febd commit beb1165a018d32f243c331a427dc212cf3b7febd Author: Elliott Mitchell AuthorDate: 2024-05-09 04:15:53 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:21 +0000 kern/rman: update debugging lines in subr_rman.c Rather than hard-code the function name, use __func__ instead. Apply some style and adjust indentation as appropriate. Remove the no longer required braces. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index ffd8def66b5c..d4da67b2f16f 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -154,7 +154,7 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end) struct resource_i *r, *s, *t; int rv = 0; - DPRINTF("rman_manage_region: <%s> request: start %#jx, end %#jx\n", + DPRINTF("%s: <%s> request: start %#jx, end %#jx\n", __func__, rm->rm_descr, start, end); if (start < rm->rm_start || end > rm->rm_end) return EINVAL; @@ -439,10 +439,9 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rv = NULL; - DPRINTF("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], " - "length %#jx, flags %x, device %s\n", rm->rm_descr, start, end, - count, flags, - dev == NULL ? "" : device_get_nameunit(dev)); + DPRINTF("%s: <%s> request: [%#jx, %#jx], length %#jx, flags %x, " + "device %s\n", __func__, rm->rm_descr, start, end, count, flags, + dev == NULL ? "" : device_get_nameunit(dev)); KASSERT(count != 0, ("%s: attempted to allocate an empty range", __func__)); KASSERT((flags & RF_FIRSTSHARE) == 0, @@ -452,19 +451,17 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, mtx_lock(rm->rm_mtx); r = TAILQ_FIRST(&rm->rm_list); - if (r == NULL) { - DPRINTF("NULL list head\n"); - } else { - DPRINTF("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1); - } + if (r == NULL) + DPRINTF("NULL list head\n"); + else + DPRINTF("%s: trying %#jx <%#jx,%#jx>\n", __func__, r->r_end, + start, count-1); + for (r = TAILQ_FIRST(&rm->rm_list); r && r->r_end < start + count - 1; - r = TAILQ_NEXT(r, r_link)) { - ; - DPRINTF("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1); - } + r = TAILQ_NEXT(r, r_link)) + DPRINTF("%s: tried %#jx <%#jx,%#jx>\n", __func__, r->r_end, + start, count-1); if (r == NULL) { DPRINTF("could not find a region\n"); From nobody Tue May 21 23:56:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYL2ZSZz5L6j5; Tue, 21 May 2024 23:56: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 4VkWYL1NVMz4jBy; Tue, 21 May 2024 23:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qk+QV4ZJEXXsnzWZ0gn38HEuvna1F64nrJftwfGg7XA=; b=YpGjhJBT96AvyIVp11ho84IdfS/TN6DdvnNiB5kM8/WSf2//zwEiRE9ly5FdT9ITrIjRUa m46I9RhlngHvRkKPv2lVrXxieTBfrTpRgWt4JaBL891FgUmkjl7lgrdb7uGgFJM+cx5u9R P0MxvXhM3DxFoLvxSl2C3W692cs1aqMmUk2+p+3hYG5MbD5t3H3QEcTZHJz3rnMlxqpcim 49HW9bb2+QcCWUB77Ale+uzYtydRvV85ZctOiCSXEMmYjvVa7BkOtqBnwIKYYSyLhLz+4H PegZbPqk9wmH00sZ4s27ph2CzVKeAhzH8JE4EJ9eLhuqvezguDWBiGtk8pVIRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335782; a=rsa-sha256; cv=none; b=b+3e4TOqz/Co8rJBjFRzhm/MRTb3qSsYSOwqEgktWW8pgeCqsf7lwNGcjj6qneziEzob7h 4NQG2ngzde+3JEd2eWGj1l3bJddFYnx8K2WIn6j18ftVigDQlbZDUPg+QWRlr36cowdwiw 0uFydVOVHAWHSqAujwPvKH9I7J77EgMGPobUhArn5JoDCTzB5oxKi+JoM0CsKddf9T8L69 B3SMleujDjSU5FWxQ0ay+AkQPx2e1MBHar1xVb6ilZYRU8p0mO5gvw70UECXbii39FqhcD TPTRbK87W+FDWLCPF/6wmAKf72lkTMqBcl8me2+haiShzgd9OSp3Dgt7IEzSGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qk+QV4ZJEXXsnzWZ0gn38HEuvna1F64nrJftwfGg7XA=; b=YT+JlaSIhycrFOFJPQjWa7ffoENxHgGahtNR96mkVI25dvj932XnhMTYO1CqygD+1yad5l H+etbu2FtoySInU2Sd3tPRFqd7woMq7A/mk8emday+FVyMaQoFBOh5YTZl2o0tzIoW7eUK YYLIL/qHlQxLIgrJpN6U8UseEGskD8Dil27WWgFwn7UMtLQ8482uyqx+/KWkyYUi1mP0sn olYx8jZRitYPM13JgHqgA2D2C28ajDJcAGOjqZExk0wWTFU21hbmx3JnrKQPzITUHzBaL4 O9BYLDuH09UC+eYWuOff1okII+IkLsfRTbdHNWvHLrwStLTn45v/WiprUNLEoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWYL0zmZzjKC; Tue, 21 May 2024 23:56: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 44LNuMEI032219; Tue, 21 May 2024 23:56:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuMsn032216; Tue, 21 May 2024 23:56:22 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:22 GMT Message-Id: <202405212356.44LNuMsn032216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 037946dc9b07 - main - kern/rman: remove rman_reserve_resource_bound(), partially revert 13fb6657723 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 037946dc9b07f7e0085e71798f5b397c5d9597db Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=037946dc9b07f7e0085e71798f5b397c5d9597db commit 037946dc9b07f7e0085e71798f5b397c5d9597db Author: Elliott Mitchell AuthorDate: 2024-05-09 04:55:28 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:24 +0000 kern/rman: remove rman_reserve_resource_bound(), partially revert 13fb6657723 Not once has rman_reserve_resource_bound() ever been used. There are though several uses of RF_ALIGNMENT. In light of this remove this extra and leave the actually used portion in place. This partially reverts commit 13fb6657723c1e9cb47bbd286942b432a4306b96. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- share/man/man9/rman.9 | 35 +++++++++-------------------------- sys/kern/subr_rman.c | 23 ++++------------------- sys/sys/rman.h | 3 --- 3 files changed, 13 insertions(+), 48 deletions(-) diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9 index 35a2d176233c..d175b60b4010 100644 --- a/share/man/man9/rman.9 +++ b/share/man/man9/rman.9 @@ -40,7 +40,6 @@ .Nm rman_last_free_region , .Nm rman_release_resource , .Nm rman_reserve_resource , -.Nm rman_reserve_resource_bound , .Nm rman_make_alignment_flags , .Nm rman_get_start , .Nm rman_get_end , @@ -90,11 +89,6 @@ .Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" .Fa "u_int flags" "device_t dev" .Fc -.Ft "struct resource *" -.Fo rman_reserve_resource_bound -.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" -.Fa "rman_res_t bound" "u_int flags" "device_t dev" -.Fc .Ft uint32_t .Fn rman_make_alignment_flags "uint32_t size" .Ft rman_res_t @@ -266,7 +260,7 @@ and are set to the bounds of the free region and zero is returned. .Pp The -.Fn rman_reserve_resource_bound +.Fn rman_reserve_resource function is where the bulk of the .Nm logic is located. @@ -279,7 +273,7 @@ The caller can specify the and .Fa end of an acceptable range, -as well as a boundary restriction and required alignment, +required alignment, and the code will attempt to find a free segment which fits. The .Fa start @@ -296,15 +290,13 @@ The alignment requirement .Pq if any is specified in .Fa flags . -The -.Fa bound -argument may be set to specify a boundary restriction such that an -allocated region may cross an address that is a multiple of the -boundary. -The -.Fa bound -argument must be a power of two. -It may be set to zero to specify no boundary restriction. +Often the +.Dv RF_ALIGNMENT_LOG2 +macro is used to specify alignment to a power-of-2 size, or +.Fn rman_make_alignment_flags +can be used to compute the +.Fa flags +value at runtime. A shared segment will be allocated if the .Dv RF_SHAREABLE flag is set, otherwise an exclusive segment will be allocated. @@ -312,15 +304,6 @@ If this shared segment already exists, the caller has its device added to the list of consumers. .Pp The -.Fn rman_reserve_resource -function is used to reserve resources within a previously established region. -It is a simplified interface to -.Fn rman_reserve_resource_bound -which passes 0 for the -.Fa bound -argument. -.Pp -The .Fn rman_make_alignment_flags function returns the flag mask corresponding to the desired alignment .Fa size . diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index d4da67b2f16f..2019e19090c0 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -429,13 +429,12 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) #define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_PREFETCHABLE)) struct resource * -rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, - rman_res_t count, rman_res_t bound, u_int flags, - device_t dev) +rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags, device_t dev) { u_int new_rflags; struct resource_i *r, *s, *rv; - rman_res_t rstart, rend, amask, bmask; + rman_res_t rstart, rend, amask; rv = NULL; @@ -472,8 +471,6 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, KASSERT(start <= RM_MAX_END - amask, ("start (%#jx) + amask (%#jx) would wrap around", start, amask)); - /* If bound is 0, bmask will also be 0 */ - bmask = ~(bound - 1); /* * First try to find an acceptable totally-unshared region. */ @@ -505,8 +502,6 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, */ do { rstart = (rstart + amask) & ~amask; - if (((rstart ^ (rstart + count - 1)) & bmask) != 0) - rstart += bound - (rstart & ~bmask); } while ((rstart & amask) != 0 && rstart < end && rstart < s->r_end); rend = ummin(s->r_end, ummax(rstart + count - 1, end)); @@ -607,8 +602,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, if (SHARE_TYPE(s->r_flags) == SHARE_TYPE(flags) && s->r_start >= start && (s->r_end - s->r_start + 1) == count && - (s->r_start & amask) == 0 && - ((s->r_start ^ s->r_end) & bmask) == 0) { + (s->r_start & amask) == 0) { rv = int_alloc_resource(M_NOWAIT); if (rv == NULL) goto out; @@ -644,15 +638,6 @@ out: return (rv == NULL ? NULL : &rv->r_r); } -struct resource * -rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags, device_t dev) -{ - - return (rman_reserve_resource_bound(rm, start, end, count, 0, flags, - dev)); -} - int rman_activate_resource(struct resource *re) { diff --git a/sys/sys/rman.h b/sys/sys/rman.h index b8b2016cc94a..70655339183b 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -148,9 +148,6 @@ int rman_release_resource(struct resource *r); struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags, device_t dev); -struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start, - rman_res_t end, rman_res_t count, rman_res_t bound, - u_int flags, device_t dev); void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); void rman_set_device(struct resource *_r, device_t _dev); From nobody Tue May 21 23:56:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYM52FVz5L6L7; Tue, 21 May 2024 23:56: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 4VkWYM2Yt6z4jC4; Tue, 21 May 2024 23:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V2XoKVh85r6j0/qqMvbXx1HmxozgljMge+E4Tg7Grg=; b=ogSqjB/6fuu8LVk3Md9UPS9DJFAQbYXg5wKQDw5Z4L1xKlqOP4LV1/6urvdwHp+tP3+jYc 6Tv3q8iMeLnVzLRZN1proj95/hwI7EBjDdvm41wVYPvvqY6FgcCjfcJ9d5fueDvY6acvwF LiFdO2RpGIWOy1TU1WmErtletj8ADSWqfh6XrVsBAwNkLECu4BLuT15QQZhXt1vLogXlVq 6e7f9PAT53hOmYFiFG0pc8gwNzwwwEOyl53O2/Qt107W/MBe90j7Q4ZQ4Y/lu9Jn8lNmnc cbZUZnc6GS8Yxr5TG73lIJ6PVbTuJ36LjNgLIxPhdfzUCIn7P6SMeaeEsLSLDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335783; a=rsa-sha256; cv=none; b=xXD2u/BHTDEA10lNZfSUvbm6pzVneQSy8MiBOy8ho5UDdlRQwUDkl9Wdda28psuu4vNmv2 nJGkBWTHaodrBmuoKrWZO/CRHaOPXvbS9ahBsuL0dJnBMQzhcInOvKZCDcj6vx8cq6o1Zg J9f7z48ecat8XoYZpFMUOmfB1GPPShuMBbjnm3E+vczS+Rcpdo3T1qOM4s2eAXuWZY1BRa 8arJFO9Hc65bO9eQ+PIdSqUnif8G+PdMuu6JsWRPKVxQ8KcaaKGOdrKzPL6KCdc4hpr3ri 4jYrK3JtpYuATSvJOr4n4HG1Slx9J+bBKgON1vuKvO66AqhHQ4xkCpv9ESzczQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V2XoKVh85r6j0/qqMvbXx1HmxozgljMge+E4Tg7Grg=; b=GZXOLsfFdnlN+KEPG18XQwbY4Jtyh7qLtIrD5+W8xMb1SctLa3WauYjW1G+jYIdSE6Qf7w r9QhI0CnQxvsbhD/Y/W+UeMlI+7XJTymnNg8RD//3Hw4dR4gjuSrWB08u8Tv52DZH4TsqK SUKRjSP1rRQYF60cWPVGlnFxr5u5K7lBB3P4i8ktpRtvUGSGhzu2+IHLLrcjiGCe8xZlsA /AvVwS+DfqDAxqX6nyG5WtlPNc4MY8ciu3XtLPDwmCm9hFPj3YIFL2dOVQplqIszxGB+wF sSvXE/8LInyvsmZGjsoUZDk0rg2ptRPGuzrHrUkWlDFbs76jmpryKXw6mkx7wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWYM1xxvzjTv; Tue, 21 May 2024 23:56: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 44LNuN4l032259; Tue, 21 May 2024 23:56:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuN8B032256; Tue, 21 May 2024 23:56:23 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:23 GMT Message-Id: <202405212356.44LNuN8B032256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 996fa9fb4ec4 - main - kern/rman: update rman_make_alignment_flags() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 996fa9fb4ec47995e89d2089e6084d37dcb1033c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=996fa9fb4ec47995e89d2089e6084d37dcb1033c commit 996fa9fb4ec47995e89d2089e6084d37dcb1033c Author: Elliott Mitchell AuthorDate: 2024-05-09 04:47:09 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:27 +0000 kern/rman: update rman_make_alignment_flags() The flsl() function makes use of hardware functionality to compute the value faster than this loop. The only deviation from flsl() is at 0. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 2019e19090c0..508152f74002 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -776,19 +776,14 @@ rman_release_resource(struct resource *re) uint32_t rman_make_alignment_flags(uint32_t size) { - int i; /* * Find the hightest bit set, and add one if more than one bit * set. We're effectively computing the ceil(log2(size)) here. */ - for (i = 31; i > 0; i--) - if ((1 << i) & size) - break; - if (~(1 << i) & size) - i++; - - return(RF_ALIGNMENT_LOG2(i)); + if (__predict_false(size == 0)) + return (0); + return (RF_ALIGNMENT_LOG2(flsl(size - 1))); } rman_res_t From nobody Tue May 21 23:56:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYP00cZz5L6ql; Tue, 21 May 2024 23:56: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 4VkWYN3H7sz4hyJ; Tue, 21 May 2024 23:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8izRIUi3gq4xb59TEBgIm57otsn3+dcmFSP5n7Qn64=; b=m8+s/Ql5/za1jnmuP034tzWMjS3QS3OIRb6emFWtopAqoMkoThyt/T1ubpYaqCWa79Cs3a cuaKh7jMk1JAe0wqHixqOBLzF9P2Pwnom9yq8wHf7CtX7XZmzmdhqne03JbVM549FEG4fb gGGOPLzq+ugCfBVBs6LDAb/F0zGPyvan3aR+uHE7VselZ/axCSvadv9IPOyDOZQ5M/CZeR 9kT1ik2vwbTUdodBte1Mxc55czqoQlcmQZgRmcuWXMNGFHENuTKOMDfiZ2wnGK9mhqw2D9 lm2ClwUvZTIF2Dz1zVQiAR+/HX6HgUcfAE2qtIUIl10A3BYd05ijS6US2U9H5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335784; a=rsa-sha256; cv=none; b=Ol3d05ipv/FYAlcdgXnmS8M9aexsQDwj32bSIHGWawTFydQDUZTw5bQu7DwBch4PpkcE2s zpRbqNh4bBnOhdvrdMEQybm/g04uLXVCkJWUECksfDQiSBrdQubIS7LjxANxT/rasxuAiE cxVFuX9dshZNic6z3DyVpqMRH9+lL+mJs0lW2yQYwA9QiI2bs19ZCjgb90vd158rzq+XbZ nNjkadkkF01BwRYHq3VhmFGvz2qva8SSBGFp9LeYv3aw7V0vXhpwLXKiogyg5ksH/Ln78A ranac8j21ipc2x3O93RHQuDHVUhAHNk86CAKCC6o7RdIVprBS6MdXrlVHdNmzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8izRIUi3gq4xb59TEBgIm57otsn3+dcmFSP5n7Qn64=; b=M/0kA/g7KEyWHhvmSrq30BVY8lENoRuWNDZ2GnrQhR3tFErXc6KyIahq4m45eCf0ne1mgO OBTdnd7q2pf2IqzJtD9QNVCN7bxGNE4QJi13tBKfvxcZYp64k4Ag2Z0c0W9/q26+wJzwGT pUf2DRTgcjFwAqKH/lUlHtLu47pwmqtWkzTRkk4HGm0AUSuSMND/1Q4uGPAF+/sXkREM6+ Ih6kCGlkcrcpZ0N0/vv5gD2Ac0TZvSiluBTrz1YQEKySnXEhSmZjJluYuAuFFwerzaMv4e 48aan3mdPOg6nCYTxSwtDknEY8fH5fDG33qckF0anXc2XqgRmpZ05okjfnkWTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWYN2sYDzjKD; Tue, 21 May 2024 23:56: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 44LNuOF1032312; Tue, 21 May 2024 23:56:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuOKl032309; Tue, 21 May 2024 23:56:24 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:24 GMT Message-Id: <202405212356.44LNuOKl032309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cbcb9778dd95 - main - kern/rman: mark rman get functions as taking constants List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbcb9778dd957adf28fac011c6d7b511ca80c469 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cbcb9778dd957adf28fac011c6d7b511ca80c469 commit cbcb9778dd957adf28fac011c6d7b511ca80c469 Author: Elliott Mitchell AuthorDate: 2024-05-10 16:13:39 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:29 +0000 kern/rman: mark rman get functions as taking constants The arguments are left completely unchanged by these functions. This allows passing constant pointers for verifying ownership, but not modifying the contents. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 26 +++++++++++++------------- sys/sys/rman.h | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 508152f74002..dbb09850d049 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -787,28 +787,28 @@ rman_make_alignment_flags(uint32_t size) } rman_res_t -rman_get_start(struct resource *r) +rman_get_start(const struct resource *r) { return (r->__r_i->r_start); } rman_res_t -rman_get_end(struct resource *r) +rman_get_end(const struct resource *r) { return (r->__r_i->r_end); } rman_res_t -rman_get_size(struct resource *r) +rman_get_size(const struct resource *r) { return (r->__r_i->r_end - r->__r_i->r_start + 1); } u_int -rman_get_flags(struct resource *r) +rman_get_flags(const struct resource *r) { return (r->__r_i->r_flags); @@ -822,7 +822,7 @@ rman_set_virtual(struct resource *r, void *v) } void * -rman_get_virtual(struct resource *r) +rman_get_virtual(const struct resource *r) { return (r->__r_i->r_virtual); @@ -836,7 +836,7 @@ rman_set_irq_cookie(struct resource *r, void *c) } void * -rman_get_irq_cookie(struct resource *r) +rman_get_irq_cookie(const struct resource *r) { return (r->__r_i->r_irq_cookie); @@ -850,7 +850,7 @@ rman_set_bustag(struct resource *r, bus_space_tag_t t) } bus_space_tag_t -rman_get_bustag(struct resource *r) +rman_get_bustag(const struct resource *r) { return (r->r_bustag); @@ -864,7 +864,7 @@ rman_set_bushandle(struct resource *r, bus_space_handle_t h) } bus_space_handle_t -rman_get_bushandle(struct resource *r) +rman_get_bushandle(const struct resource *r) { return (r->r_bushandle); @@ -882,7 +882,7 @@ rman_set_mapping(struct resource *r, struct resource_map *map) } void -rman_get_mapping(struct resource *r, struct resource_map *map) +rman_get_mapping(const struct resource *r, struct resource_map *map) { map->r_bustag = rman_get_bustag(r); @@ -899,7 +899,7 @@ rman_set_rid(struct resource *r, int rid) } int -rman_get_rid(struct resource *r) +rman_get_rid(const struct resource *r) { return (r->__r_i->r_rid); @@ -912,7 +912,7 @@ rman_set_type(struct resource *r, int type) } int -rman_get_type(struct resource *r) +rman_get_type(const struct resource *r) { return (r->__r_i->r_type); } @@ -925,14 +925,14 @@ rman_set_device(struct resource *r, device_t dev) } device_t -rman_get_device(struct resource *r) +rman_get_device(const struct resource *r) { return (r->__r_i->r_dev); } int -rman_is_region_manager(struct resource *r, struct rman *rm) +rman_is_region_manager(const struct resource *r, const struct rman *rm) { return (r->__r_i->r_rm == rm); diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 70655339183b..323da4a62201 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -124,18 +124,18 @@ TAILQ_HEAD(rman_head, rman); int rman_activate_resource(struct resource *r); int rman_adjust_resource(struct resource *r, rman_res_t start, rman_res_t end); int rman_first_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end); -bus_space_handle_t rman_get_bushandle(struct resource *); -bus_space_tag_t rman_get_bustag(struct resource *); -rman_res_t rman_get_end(struct resource *); -device_t rman_get_device(struct resource *); -u_int rman_get_flags(struct resource *); -void *rman_get_irq_cookie(struct resource *); -void rman_get_mapping(struct resource *, struct resource_map *); -int rman_get_rid(struct resource *); -rman_res_t rman_get_size(struct resource *); -rman_res_t rman_get_start(struct resource *); -int rman_get_type(struct resource *); -void *rman_get_virtual(struct resource *); +bus_space_handle_t rman_get_bushandle(const struct resource *); +bus_space_tag_t rman_get_bustag(const struct resource *); +rman_res_t rman_get_end(const struct resource *); +device_t rman_get_device(const struct resource *); +u_int rman_get_flags(const struct resource *); +void *rman_get_irq_cookie(const struct resource *); +void rman_get_mapping(const struct resource *, struct resource_map *); +int rman_get_rid(const struct resource *); +rman_res_t rman_get_size(const struct resource *); +rman_res_t rman_get_start(const struct resource *); +int rman_get_type(const struct resource *); +void *rman_get_virtual(const struct resource *); int rman_deactivate_resource(struct resource *r); int rman_fini(struct rman *rm); int rman_init(struct rman *rm); @@ -143,7 +143,7 @@ int rman_init_from_resource(struct rman *rm, struct resource *r); int rman_last_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end); uint32_t rman_make_alignment_flags(uint32_t size); int rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end); -int rman_is_region_manager(struct resource *r, struct rman *rm); +int rman_is_region_manager(const struct resource *r, const struct rman *rm); int rman_release_resource(struct resource *r); struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, From nobody Tue May 21 23:59:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWcl0RWJz5L6sm; Tue, 21 May 2024 23: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 4VkWck7379z4lFR; Tue, 21 May 2024 23: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=1716335959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gUOb8RSSY32V9pulHMXADoZD1DmINIFkvWrP4Cyj0k=; b=ZraUXOCR1LzM5xD43d1Gq0E7Q1JN9Kqvz4CHAkG7Lv17qnqo+D3nEB8rNlPebL1M5X5RD+ 0l90ecR3RgC+HrS1wpEs/9r3Um/f11UDI3mtl+kUSj6jWCEXYfJY/KiIzNu4iNirakNNhj ORTbVzY7pDYPYwburJMOP8qwCxUn9yE543y+szM4nEEpHFcm2CD/a4ou9JkzSA2INTDBC4 5SszxsSlZgT3Wn69zcXBdLpLmqTwLoFLB0KGg1eRjeC8exuuLtVoyR7vNNeejsrpLTob4I XTm7Fgw9RFFRdIE4zoqtYeQqbN6fE7sTGSUVYiyYgLC81zWIt7jA4SCif9d1DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335959; a=rsa-sha256; cv=none; b=XEPe+IU4XON8onEk2Tnz/J4XDu0vjUkKrmBWeNv8aRHJ2/RI4OPNpUh71yVLD8/Vch7RfY sD8sYepMo/RHz2wl0Kd/99TesRXJVgQ5hsSEfgYa5x2lVHIh1YhWq0JbNvl8CJBZ3lNh9c ZchJBZ0b8O4QncocFsk2lrIENltefDQq9g/cAojr+biyEVDeybQEVQORiRX2NU1CQWFVhw OM67esO3lCtgCSslSoPeQclZYRCMPOFxMWNIneETlL7+GNfdbOuxGhKHfcMCvz6RNha2ff ElUoKkykg2PjQSRrhLsAYI9srF25R4bRYP8djrlwkpYFNEd6bWrr8BGJ9gl95w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gUOb8RSSY32V9pulHMXADoZD1DmINIFkvWrP4Cyj0k=; b=iCa8UsbijeTLzuqTwHipAv80EkV396Ia8SIQ+rR5C9TgyEVg1Fq3Hqc9gmngUoaMTWjEO/ IIDOBag28+XllQEDVmyeGeNdRmPJOrdHjtbVSnVt5610JkuevJLqtbo0gFl62FI5K+wwFI vEMaj935G7SXme30drAetwmYOl9KNZLrN7Bl3M7o+3wy/v9hqzt079vdVUDQgD6ylku9kz kfqfqamyDRg+WiJHk/0ztgalu4635P8V/dBKrLZEwns8vEBg5Bs1FKe85G0TqXYXT+9/4o wTquLwTj2h2BninxJtcT4WNx7WHNkM+wEx0W6YebLWfJdOvZaeQX7N5UiSz6gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkWck6ZMMzjXD; Tue, 21 May 2024 23: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 44LNxIT9032848; Tue, 21 May 2024 23: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 44LNxIYv032845; Tue, 21 May 2024 23:59:18 GMT (envelope-from git) Date: Tue, 21 May 2024 23:59:18 GMT Message-Id: <202405212359.44LNxIYv032845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 25a04527b706 - main - linprocfs: Add support for proc/sysvipc/{msg,sem,shm} List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25a04527b706577dac781fc249e3dbe948ccae60 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=25a04527b706577dac781fc249e3dbe948ccae60 commit 25a04527b706577dac781fc249e3dbe948ccae60 Author: Ricardo Branco AuthorDate: 2024-05-12 20:26:15 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:58:28 +0000 linprocfs: Add support for proc/sysvipc/{msg,sem,shm} Reviewed by: imp,kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1232 --- sys/compat/linprocfs/linprocfs.c | 137 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 391d5f679ee5..bfa2074a78d3 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2092,6 +2092,134 @@ linprocfs_domax_map_cnt(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/sysvipc/msg + */ +static int +linprocfs_dosysvipc_msg(PFS_FILL_ARGS) +{ + struct msqid_kernel *msqids; + size_t id, size; + int error; + + sbuf_printf(sb, + "%10s %10s %4s %10s %10s %5s %5s %5s %5s %5s %5s %10s %10s %10s\n", + "key", "msqid", "perms", "cbytes", "qnum", "lspid", "lrpid", + "uid", "gid", "cuid", "cgid", "stime", "rtime", "ctime"); + + error = kern_get_msqids(curthread, &msqids, &size); + if (error != 0) + return (error); + + for (id = 0; id < size; id++) { + if (msqids[id].u.msg_qbytes == 0) + continue; + sbuf_printf(sb, + "%10d %10lu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n", + (int)msqids[id].u.msg_perm.key, + IXSEQ_TO_IPCID(id, msqids[id].u.msg_perm), + msqids[id].u.msg_perm.mode, + msqids[id].u.msg_cbytes, + msqids[id].u.msg_qnum, + msqids[id].u.msg_lspid, + msqids[id].u.msg_lrpid, + msqids[id].u.msg_perm.uid, + msqids[id].u.msg_perm.gid, + msqids[id].u.msg_perm.cuid, + msqids[id].u.msg_perm.cgid, + (intmax_t)msqids[id].u.msg_stime, + (intmax_t)msqids[id].u.msg_rtime, + (intmax_t)msqids[id].u.msg_ctime); + } + + free(msqids, M_TEMP); + return (0); +} + +/* + * Filler function for proc/sysvipc/sem + */ +static int +linprocfs_dosysvipc_sem(PFS_FILL_ARGS) +{ + struct semid_kernel *semids; + size_t id, size; + int error; + + sbuf_printf(sb, "%10s %10s %4s %10s %5s %5s %5s %5s %10s %10s\n", + "key", "semid", "perms", "nsems", "uid", "gid", "cuid", "cgid", + "otime", "ctime"); + + error = kern_get_sema(curthread, &semids, &size); + if (error != 0) + return (error); + + for (id = 0; id < size; id++) { + if ((semids[id].u.sem_perm.mode & SEM_ALLOC) == 0) + continue; + sbuf_printf(sb, + "%10d %10lu %4o %10u %5u %5u %5u %5u %jd %jd\n", + (int)semids[id].u.sem_perm.key, + IXSEQ_TO_IPCID(id, semids[id].u.sem_perm), + semids[id].u.sem_perm.mode, + semids[id].u.sem_nsems, + semids[id].u.sem_perm.uid, + semids[id].u.sem_perm.gid, + semids[id].u.sem_perm.cuid, + semids[id].u.sem_perm.cgid, + (intmax_t)semids[id].u.sem_otime, + (intmax_t)semids[id].u.sem_ctime); + } + + free(semids, M_TEMP); + return (0); +} + +/* + * Filler function for proc/sysvipc/shm + */ +static int +linprocfs_dosysvipc_shm(PFS_FILL_ARGS) +{ + struct shmid_kernel *shmids; + size_t id, size; + int error; + + sbuf_printf(sb, + "%10s %10s %s %21s %5s %5s %5s %5s %5s %5s %5s %10s %10s %10s %21s %21s\n", + "key", "shmid", "perms", "size", "cpid", "lpid", "nattch", "uid", + "gid", "cuid", "cgid", "atime", "dtime", "ctime", "rss", "swap"); + + error = kern_get_shmsegs(curthread, &shmids, &size); + if (error != 0) + return (error); + + for (id = 0; id < size; id++) { + if ((shmids[id].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0) + continue; + sbuf_printf(sb, + "%10d %10lu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n", + (int)shmids[id].u.shm_perm.key, + IXSEQ_TO_IPCID(id, shmids[id].u.shm_perm), + shmids[id].u.shm_perm.mode, + shmids[id].u.shm_segsz, + shmids[id].u.shm_cpid, + shmids[id].u.shm_lpid, + shmids[id].u.shm_nattch, + shmids[id].u.shm_perm.uid, + shmids[id].u.shm_perm.gid, + shmids[id].u.shm_perm.cuid, + shmids[id].u.shm_perm.cgid, + (intmax_t)shmids[id].u.shm_atime, + (intmax_t)shmids[id].u.shm_dtime, + (intmax_t)shmids[id].u.shm_ctime, + 0, 0); /* XXX rss & swp are not supported */ + } + + free(shmids, M_TEMP); + return (0); +} + /* * Constructor */ @@ -2241,6 +2369,15 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(dir, "max_map_count", &linprocfs_domax_map_cnt, NULL, NULL, NULL, PFS_RD); + /* /proc/sysvipc/... */ + dir = pfs_create_dir(root, "sysvipc", NULL, NULL, NULL, 0); + pfs_create_file(dir, "msg", &linprocfs_dosysvipc_msg, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "sem", &linprocfs_dosysvipc_sem, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "shm", &linprocfs_dosysvipc_shm, + NULL, NULL, NULL, PFS_RD); + return (0); } From nobody Wed May 22 02:20:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkZlg0M12z5LLWR; Wed, 22 May 2024 02:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkZlf33n0z3wvd; Wed, 22 May 2024 02:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716344430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0gLqwFYfGEU1/XwFz1n7grKOE7AckNrvihkMdKTXe8=; b=mc07SNwLdln2OatiWTbeoFLwfNqMaEAc6HWzxpfwGUxJko+wKf2DSjWX9qvSZZzV8BWNu0 c51/KtLs8c/vXDYI1s/JGf6qwU+H+F9YTHq+dIq+O/gU5ZM7AO15tkkfB91GeWoxk4j5Zi gVTXrv7eazMJy9+ZdgVHBTEwfpARo3UmF931+pXy/Lrg4tuWqdUI2R+HgawAiLzhy4RQUZ qroxy/+d9/LRXEXKn31WdlAcCj4ZGRZ/E84BShTrsRCM2q4N/cdpoaDPHz2N0sXn0w9TDR wipLWzyRm+2dNqTjphTT+fJH0M4bvGSLTqN9DZhg0pt3QH1HCbBDcW5oVVVPhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716344430; a=rsa-sha256; cv=none; b=XuQikzonLn2Bu64pi3o4OSTjnOBicSbipvUHy/jEFc3hm2imgVOp1mvdxPGk2TdXOTRcEI WY+t+qleqk9wVLE3WmZQiLVQxfFXVDFPdc0n4TPmm2kmgfFe1chBq3y1UOaGaJARDifJGa 7ueDOvU669fZ+V2bDr3JJJNbYRbiXy+YaCY0jcwcHwHZYx1mgAVxx8AiodecBDYFHtVJ7Z dO4RNiiBMzS8pCakIphe4EV7Kuzirg7fZ7K3IxpS6/P+ltLzo6AGgXwX1P8Ub+kKPxUy7E r/YJSmhj3E6TUq+dKs0sJucM3KxKlGpgRHn3lIbdr23KgTsD/hPdXiVje/H0Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716344430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0gLqwFYfGEU1/XwFz1n7grKOE7AckNrvihkMdKTXe8=; b=psF0nSl8ANWS3wCFDXUvroGTxReAStegbTzmCEpDsEkkCxmSC1evLsFFqgTKyXocafx5et h+R7enSlYUmHeyim/2+F3XbwPmrAGEJ4eH1F+4DHuUULtifpVwMtYoAfuy/j0rbOLTV3+n 1rblnT/E7Ki/5aHyBqP+0ED7YdfeqkEb1NY8aVFujQH+a2TawDcIQzXaC2x7oIK++Zr3la BIOW6Lz9UPn2JC8ebppRpl/BE69QjB/Nd+7Asjc9JyQ+v9RSz2/LGEZAPmrdfwI1FIr6Ki BggpMjq0lcw2WRmOXC59oMxlW8GFJkKb248DYb/K+vr5FwAV5w2YXauK7O9z7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkZlf2gJtznKG; Wed, 22 May 2024 02:20: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 44M2KU9e077216; Wed, 22 May 2024 02:20:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M2KUBr077213; Wed, 22 May 2024 02:20:30 GMT (envelope-from git) Date: Wed, 22 May 2024 02:20:30 GMT Message-Id: <202405220220.44M2KUBr077213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 208f11e8063a - main - linprocfs: use %z for size_t arguments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 208f11e8063af7b52bddd4e7a179906e7e8c7ddf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=208f11e8063af7b52bddd4e7a179906e7e8c7ddf commit 208f11e8063af7b52bddd4e7a179906e7e8c7ddf Author: Warner Losh AuthorDate: 2024-05-22 02:01:58 +0000 Commit: Warner Losh CommitDate: 2024-05-22 02:03:08 +0000 linprocfs: use %z for size_t arguments 64-bit doesn't care or give a warning, but i386 compile complains (rightly) that these are size_t and need a %z modifier. Fixes: 25a04527b706 Sponsored by: Netflix --- sys/compat/linprocfs/linprocfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index bfa2074a78d3..617eb122291c 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2115,7 +2115,7 @@ linprocfs_dosysvipc_msg(PFS_FILL_ARGS) if (msqids[id].u.msg_qbytes == 0) continue; sbuf_printf(sb, - "%10d %10lu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n", + "%10d %10zu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n", (int)msqids[id].u.msg_perm.key, IXSEQ_TO_IPCID(id, msqids[id].u.msg_perm), msqids[id].u.msg_perm.mode, @@ -2158,7 +2158,7 @@ linprocfs_dosysvipc_sem(PFS_FILL_ARGS) if ((semids[id].u.sem_perm.mode & SEM_ALLOC) == 0) continue; sbuf_printf(sb, - "%10d %10lu %4o %10u %5u %5u %5u %5u %jd %jd\n", + "%10d %10zu %4o %10u %5u %5u %5u %5u %jd %jd\n", (int)semids[id].u.sem_perm.key, IXSEQ_TO_IPCID(id, semids[id].u.sem_perm), semids[id].u.sem_perm.mode, @@ -2198,7 +2198,7 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS) if ((shmids[id].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0) continue; sbuf_printf(sb, - "%10d %10lu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n", + "%10d %10zu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n", (int)shmids[id].u.shm_perm.key, IXSEQ_TO_IPCID(id, shmids[id].u.shm_perm), shmids[id].u.shm_perm.mode, From nobody Wed May 22 02:45:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkbJT01XRz5LNKy; Wed, 22 May 2024 02:45: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 4VkbJS6KZVz41VV; Wed, 22 May 2024 02:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716345928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ezMmhhSUKujljubfTad+p/EoX+lZ6UVW2s+GmrWuta0=; b=nSCeKZ0LkIDq1rDlOJwesVE/nVVakB38PcC/HZ8aypby6GWP4u8xck5Cp4AStcrs6xOTLN VK5Lo55AxJ+inOL7UIG2BZUMgtpCgDKQwHO6Z0EXbKGIVFduNLX2e+GLdBefIfxIm/LDkk l1MfwBgJAlx4evcYYhEpTNodR3cDY+m7r8wQngtvFXa+ecWsUwiZpiJg5AY1BJlqn8SKDu hPJscEmeCkuHR8Nhcpbhpa+Pd6QKgbO8BgqSUZ5C/qhljuWQ6teczqCTZYsTmUjS3Gt5eo ygeVOKUGM+yA9i2DPcX1SUegZ/kE9p/moHvsBuaFdFWe5J9bSN4yxGDr6ehEkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716345928; a=rsa-sha256; cv=none; b=tSw+NN5lO5SYtnTPlMxY2HX1aRc0A/PHxTTeAzYUS6KJLHw4OtjItfKeCGRwWpspQuwAEv gMQi5bMcPhyRxpZO9k6TsHx1qcNXf7vc6RduLspjV9iUg2PnO5leAItBA7MHdLnyEbvQaU onsaByW26RceIkGYy2h0/H/tgdhsaNr02iHJwZBMG6RzwVXQ51m/1XOwp3OiZddE1hzpZ9 yrQAHCHepfy+Sw7okzWLaHwhNAmfWdGPRvdj10FaajDLDUGX63s76xyKrSkWNVwSPrKLzK L+l/Nuo6efQNGiLY/iUHI1Hxi7tsBPOXOkltphwxvGyCUlmIw4GrGBetJ+CSJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716345928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ezMmhhSUKujljubfTad+p/EoX+lZ6UVW2s+GmrWuta0=; b=PsM3lMKpnwiv4SXPkscpCYZONpsTMNggemc/ZnLuLUH/i+5K/2Mjyb9fLMe5MlXO1yHZJr Xd5lgjE3CxiuW3w47YKoDM62ubYd1CDEXMtmh4fdKR9YVUndjWGGbP2n6mDUEitBs9Spw6 ikM83TfeXdU2Te30VV2bdK/a6/mZQxW8O0ktDMSgfVMk83M57mg0WSFB3KKlEqTrXk8Ska OxMhwHrtVrSljB9vM648Mpk3AZLEH1awJkjqjeTrS3NvSHoj2rqUol9fPuRRYA/nNOXd6e 4ewC1AnuraQCoydTZAk5hGvObHAjbr3670N+taBQOb6Xs00M2iiclwcVAcrn3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkbJS5nrjznRy; Wed, 22 May 2024 02:45: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 44M2jSCa017820; Wed, 22 May 2024 02:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M2jSQp017817; Wed, 22 May 2024 02:45:28 GMT (envelope-from git) Date: Wed, 22 May 2024 02:45:28 GMT Message-Id: <202405220245.44M2jSQp017817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: dc501a9ec093 - main - Allow DEBUG_SH=rc:all to debug all rc.d List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc501a9ec093f73d9cbff666df4bf16cd5a358fd Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=dc501a9ec093f73d9cbff666df4bf16cd5a358fd commit dc501a9ec093f73d9cbff666df4bf16cd5a358fd Author: Simon J. Gerraty AuthorDate: 2024-05-22 02:44:20 +0000 Commit: Simon J. Gerraty CommitDate: 2024-05-22 02:44:20 +0000 Allow DEBUG_SH=rc:all to debug all rc.d Usually a bad idea but there are exceptions to every rule. Allso debugging all rc.d scripts or all with a given arg. --- libexec/rc/rc.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 16b2c9fc5e88..6ed9d24fdf5c 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1076,7 +1076,7 @@ run_rc_command() err 3 'run_rc_command: $name is not set.' fi - DebugOn rc:$name rc:$name:$rc_arg $name:$rc_arg + DebugOn rc:all rc:all:$rc_arg rc:$name rc:$name:$rc_arg $name:$rc_arg # Don't repeat the first argument when passing additional command- # line arguments to the command subroutines. From nobody Wed May 22 03:03:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkbjk28rfz5LQ19; Wed, 22 May 2024 03:03: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 4Vkbjk1fHXz42dv; Wed, 22 May 2024 03:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716347034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDczNObiLuSWXfecGuwZ1gdqm6KWwb/LS1+O/z3MI8Q=; b=vBnxR2p2Ixfo/PvOYRKLBhjSReIC+wh3jImHsmypP3c1e0VAiSkLn2nDPqqmbLy6/t67XA YJDvFhZgqfH1YWDYvJeqo3YPZYLChbfe4n3h4uKtG0HD2zKAHesiOcDrIqboNOM+KjYVnY d1qMsmGYlvTBzn3dXGBg+Il76gJSopyEoHDkZOTDn5ES+M+gHhuAK5ptFCE0YU3jZ6kgbj XjqTWb5ehRqGON5p9PnL9Bi7AYubW15d6094HlXlqIoLQuVLsllmWVr3q43LgV6sZIdv15 IEh3YYK5ly0a9QeUORdGu6tX9UjTvWJUM/u+Ww8QoXM4fQxvP1jZxWbdK5UjNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716347034; a=rsa-sha256; cv=none; b=AJpFDnzvitiapShrmKS+A39Jtxp+Y9BidGRt4OYLjOi8xXo4Qe76AhrK9jW51W/rTJUF/f 4MHrLpSbDTSbfj/0FRe+au6P4UE4aY758JIg26A/1S1skcBy1tgpMAv5pTGlJ3NE/+rFzd 1nj+Savdk5S0+HqPw1h4VLuZ6tYJFNrl1XdBb3tJ/EQuz9Ihz6vSR7MOT6dCsSVlcmkA56 B2OUWtPeFbnDRMn8w8Yps5GJF0WnDlVxWViq1RVDP93xK7HYLxhYmq55sXJky8ErsAUigL W63zQFYCGHVd/gZE8dlIxFyLLlPHisq90Q1yKe5yeuusWUHOpXaUXI+HO62wAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716347034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDczNObiLuSWXfecGuwZ1gdqm6KWwb/LS1+O/z3MI8Q=; b=LWQOYTGGAMZiuWc1NSnK4Lva7QqPI+xu/RPAmpWJknRwlc6RBqDPdu+v7fpqTml4MJ6Xan P4APNYQa1pBzjpZYL096HNAGjltseZOlmAlDq6baHyJSaW90vxO3VuCeMsN6kc6kIrO5Ma bCV0riq5hWjnmWi7qLq7mQTa+twE+Xhc7DrzGBIw4QMOCzyV0arBZlAwtKFLyd6opiVaq9 Pm8RYDh9txqWDGPEV8FEw7gXgVe1GZCh0FQrjJc3IiSNrQOB1+LcLHHrqVivhfVspmM44c xyDGz6t8peGSMD5L2kwI3eWxh7JQAHde59Hv3I8vJhbpcctCtUQHat9C8JpfaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkbjk1FXPzpHJ; Wed, 22 May 2024 03:03: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 44M33snm053441; Wed, 22 May 2024 03:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M33s8c053438; Wed, 22 May 2024 03:03:54 GMT (envelope-from git) Date: Wed, 22 May 2024 03:03:54 GMT Message-Id: <202405220303.44M33s8c053438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 31223e68e299 - main - Simplify the code. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31223e68e299cc7dbef4573adb368918f260b6ef Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=31223e68e299cc7dbef4573adb368918f260b6ef commit 31223e68e299cc7dbef4573adb368918f260b6ef Author: Pawel Jakub Dawidek AuthorDate: 2024-05-19 01:58:14 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2024-05-22 03:01:24 +0000 Simplify the code. Obtained from: Fudo Security Reviewed by: asomers, imp Approved by: oshogbo (mentor) Differential Revision: https://reviews.freebsd.org/D45247 --- sys/fs/fuse/fuse_vnops.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 3f8f3322162a..925838c89bcb 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2248,19 +2248,14 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) return (err2); if (vap->va_uid != old_va.va_uid) return err; - else - accmode |= VADMIN; drop_suid = true; - } else - accmode |= VADMIN; - } else - accmode |= VADMIN; + } + accmode |= VADMIN; } if (vap->va_gid != (gid_t)VNOVAL) { if (checkperm && priv_check_cred(cred, PRIV_VFS_CHOWN)) drop_suid = true; - if (checkperm && !groupmember(vap->va_gid, cred)) - { + if (checkperm && !groupmember(vap->va_gid, cred)) { /* * Non-root users may only chgrp to one of their own * groups @@ -2274,11 +2269,8 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) return (err2); if (vap->va_gid != old_va.va_gid) return err; - accmode |= VADMIN; - } else - accmode |= VADMIN; - } else - accmode |= VADMIN; + } + accmode |= VADMIN; } if (vap->va_size != VNOVAL) { switch (vp->v_type) { From nobody Wed May 22 03:57:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkcvM2PY2z5LVDZ; Wed, 22 May 2024 03:57: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 4VkcvM1rQXz47Ms; Wed, 22 May 2024 03:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716350239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lc7vUzjV0kCfel4VUi/rbDlk0RTsEd+Hcw6zxQ4aXr0=; b=ZTupjAUw7ONqQIkvGob5RAp6S2fXIN6LdY6TMQgxzRFPYffuNuzM/Txsncj8h9CxjrTURg 1gOOe6DL///d8Cp/LypCeOq1erEHArX5pWRhbXtWMV26PV4MskAGdqiWAlI6jfLgNcwtcC q+t3UPvQ++dQ2/GLGHM0Y86cUAeRiItLwx6Nsgh7iANx0tFqEFRp3DdahW3Owyl3CBv/i7 p14iRDQJ38ZyRE3o5xXVOMAtb4h1TgGyJMiHWzRd1hbOXrWfExvmSca4r/jQRfF9Ei9eDa 6LP+OPTuViylTzbZcTqsHoSAQ0FdzihLTij1agq/1hlFcz775p3QjXrGnBeY+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716350239; a=rsa-sha256; cv=none; b=ZGU6q5hy7iJqdG8qiqLAmedxrBcCUzoDOE5x2eO9mdJxdLdnJ8EMgmJOf8pHyAo/5x+ohB gc18JIv0X1tg/m62M74SD7k/VrzJH/O46M5DPyEwU1ChIs2k04BzyVaFu58/d9Ce4e6oHR 0+KyXIww73tev47u7bu6XfHcPdCjoOm6o41bW5PL3omubmCKh9VRkz++pbz7UIrjSxTd5Y 6JmKT2Fhu2MuhkUZLb/mvuUizbW5VspVI9VV3JlKKl2DzFi9ZMdJ0fX9oNqnL/lLWOkx4t l87kcyq2H4BT2oPEQvsN48odyjC+yvpM+niWRVFU3DNMdMGARtXwimSygJizig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716350239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lc7vUzjV0kCfel4VUi/rbDlk0RTsEd+Hcw6zxQ4aXr0=; b=nS0YDMyczUplMTvsxNfnMhq5uUQXY7Dv8+3jF14iVa7rYVUSetEeGhjAv1rg217Nd+kNu0 vWXJhQYNtel86LCnrz8rIq+KPocLkdsjBU5XOORz4tjo1i9uc7/BKW//X834Rk8eLtYC0M 2hUawpRqtaYkYyWkJHz5umsPkUdEDK28K6KPpyfaytdFIQPHuAUarokXBeGbmosbsIXivm 6FJxgS90sIiD0AlSX445mYZw9MdVaHHkTCGaLBw1m6IYJfMQWxIsDBtylzH2e8rbWdWAcy 302jdfU4dxp5psdcW59Yd5wzs7a0Zz2k9ppFMG0kZx09KIJqxlOr/3847aKZCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkcvM1RmQzqdm; Wed, 22 May 2024 03:57: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 44M3vJvT038038; Wed, 22 May 2024 03:57:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M3vJpk038035; Wed, 22 May 2024 03:57:19 GMT (envelope-from git) Date: Wed, 22 May 2024 03:57:19 GMT Message-Id: <202405220357.44M3vJpk038035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: ff4fc43afdea - main - Fix build. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff4fc43afdeaadac0d40ca46850ba2e863e0c8d3 Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=ff4fc43afdeaadac0d40ca46850ba2e863e0c8d3 commit ff4fc43afdeaadac0d40ca46850ba2e863e0c8d3 Author: Pawel Jakub Dawidek AuthorDate: 2024-05-22 03:56:59 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2024-05-22 03:56:59 +0000 Fix build. --- sys/fs/fuse/fuse_vnops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 925838c89bcb..eb07861c04ba 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2249,6 +2249,7 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) if (vap->va_uid != old_va.va_uid) return err; drop_suid = true; + } } accmode |= VADMIN; } @@ -2269,6 +2270,7 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) return (err2); if (vap->va_gid != old_va.va_gid) return err; + } } accmode |= VADMIN; } From nobody Wed May 22 04:52:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkf7J1yzMz5LZKV; Wed, 22 May 2024 04:52: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 4Vkf7J1SQsz4Jqv; Wed, 22 May 2024 04:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716353564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YvKjEYHXkQ2u02I1K9h+f3VSqKv2QVXrMOhoB1D3ZTM=; b=TZNQOHz/nnos1FY+4lQgiSXuciGTjn5Mga/Mspo7x9CkTAf7e+zn0oH13S+VKgCrMd7Rax mAvmwyxUZ0OxZfuIGtATRIqnH2tnHnhku7QYm0ifi0W/yz8Tyg9OdMMQ8TFiysrd/r+6P/ HR9D76ww4z4xSDhV5vwvoMYSefPt00R8l97Dpb5BJ7+yNdveHE3RCbbMBMGetrj+VYErbI Upzcy3XBG5HZ4CDhe1q5PE69aD0Yt4WEGXO1i+4X6FXi0PdbbKtGCOYZZzCRiBEPApfj/I uo+YTDoe3O2k0w0xftD4zlZx53K7z4QsTXmGNPcbfg/zULRxZyAZmJDtm3N7/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716353564; a=rsa-sha256; cv=none; b=KKsUQbjZy5S/dmlTn8KPfdCMM/kJsq6tZq4Xy930Iwpx5AgV7ajHIx2p2JxW3ZR9h9W5fq na2vVkV3uhS9pIkAhhVT19sDCcdzUeJIrFjImPH53rK9x3a1Qe8K//br+4go81BPiLNO5F 6Z25QtWoKSfb2wigsECiV0V9VHGv8tto/HfapQd4KtYmbMp4yYkYfCdKVKctUM1JS+qAdg arN1cSZ70FwzCiQqglnTjIVM7ISIpn0YXb0jF17v2Qya17Om5VNEbkrR23kUwCwgFIaZ7O TkSprw1eLNQbY3DukoCGQIb6+7yyMD+WFEaRxdUo1sLezhVhkHBQ1gk+dagEBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716353564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YvKjEYHXkQ2u02I1K9h+f3VSqKv2QVXrMOhoB1D3ZTM=; b=CR+I/JJbO2fbqrZkP8vD++8w8kXT/pg0LDn3op0sW7px3k8xSQVoeqxUeh2dS/EDawMeDs WOWTT2OZo3d+nKLKc1vB2TkRD66FfLvL9tBf5vJ9eME4d8AsWXB4WRqmQWHH+oJefrwEn4 JBtt6EYHBr5YLYKGrFB6qxUKjLXFaQBGAhBm2zyPtboO1IRGHwrWrJ01af16jSmOJPM4Vx zNZTcOLQLpZNTHICk6C8aYJwZ+IKwBBp6j9eYwJ++qEtEbasIkNNrl/XTbm22maauTeSE6 58YzqE5N1i8fR6x+SB+C24V3G/Rb1NIfK8Enn9FP7Qi0JBzkrGzAgZHozW9R4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkf7J0zydzs4l; Wed, 22 May 2024 04:52: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 44M4qiAG038938; Wed, 22 May 2024 04:52:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M4qiYt038935; Wed, 22 May 2024 04:52:44 GMT (envelope-from git) Date: Wed, 22 May 2024 04:52:44 GMT Message-Id: <202405220452.44M4qiYt038935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 61e3e1776d40 - main - capsicum: SIGTRAP is delivered also on ECAPMODE error. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61e3e1776d400c72cbdc521212bf932ed11be507 Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=61e3e1776d400c72cbdc521212bf932ed11be507 commit 61e3e1776d400c72cbdc521212bf932ed11be507 Author: Pawel Jakub Dawidek AuthorDate: 2024-01-22 21:37:04 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2024-05-22 04:51:50 +0000 capsicum: SIGTRAP is delivered also on ECAPMODE error. Approved by: oshogbo (mentor) --- sys/kern/sys_capability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sys_capability.c b/sys/kern/sys_capability.c index d59ad37f35ec..e71dc4f3285b 100644 --- a/sys/kern/sys_capability.c +++ b/sys/kern/sys_capability.c @@ -85,7 +85,7 @@ bool __read_frequently trap_enotcap; SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RWTUN, &trap_enotcap, 0, - "Deliver SIGTRAP on ENOTCAPABLE"); + "Deliver SIGTRAP on ECAPMODE and ENOTCAPABLE"); #ifdef CAPABILITY_MODE From nobody Wed May 22 05:37:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkg7S2v1Pz5Ldvt; Wed, 22 May 2024 05:37: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 4Vkg7S1rfbz4MjY; Wed, 22 May 2024 05:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716356276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lIXKGB1097VhDp5BjTWnHspxl9/YjEXSiDVJ7C/azfQ=; b=N3a1w8wP+XcYtCw5HyyWmKsTik+8FdbP/SfmppgbNKOK7Kyfi31bj7bZRb3g5+Mq0XVurM v3MSxrI+9BFZGsMDZdKngGAXFf/1ttpw11jQxESlapCpqm1HfE+fdg97oOk6fIlskIqF7D RuofkxLT1H09YLpIHhzYxdnOUra/9GrMJMBvSz8WtyYtiK9IgT2EKFOSDLuNt0JWfuSo5U CCuibwVXTAF8x9VbBTTyFwJattIj9EmzMo5Gd1mWkOmTMvVLl/nMPTRKjNunEcOqqXdGHV TCMd896/26UaW7qH1keb3wblAsqMFuRAfKyV+sZR4wg7tiaiIPlZdWJ5Kv5ooA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716356276; a=rsa-sha256; cv=none; b=utCis846XAEC5UlimoJTMpMAYzPj0fFG6t9w6Q/KHp7Ok4iSjPE3pz0wU9cvT2Qkwj0Gcm t8F2Yv0jCiN0Sa7rUCIyTX9y4/SK4X4nrMiA9HtfbJ1paMCTJVBf3TkXglyjlwm8TlkJI7 oJl1cxlyQwd8TvJIuTf2kovvhTJbGn57NQanneGg315jP9zEZfDrLLHGQ8Cf3hlE3sIygZ Is0cz1ULeI5uDcFSRD9Qq3wdYAiJMJGSCupJRjm+EUrKfjY8VRLAVatRconcNXbLmYypAR j6kWbEb7Cf59mzBqVlmoYvA2mSbsEQn39Vxk1hEafnL5cuOvU3RSIQsKiOoYTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716356276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lIXKGB1097VhDp5BjTWnHspxl9/YjEXSiDVJ7C/azfQ=; b=bk88tL6Q3HO6opalKF5y//i/CpDA0+tV75DfL4m82xWzXfrVhk+cRQwk459uTHvoBfcdfc 5xicKEA5efyWB+e9Huvsf0dqQDRGAXZGPTmK6PN5JFE3BbRTojp17JT050d7uvEfTWHB4V QqpHTGNQCOQ9iKoi+4fMKx6YFuMbeAVToo1rb79irk/gAa/673bRlRN8WFjyslx/L5+Fvt 0w1vFq9VqQjOnnBRBS9hprg6ci6gANS0RCBC1ukEGFSL/LD4iuZ9nY0eReot3qUEHNcUoE 6fvEMxPmwKhpM1UfuT1nGh4AvrWKIWLWLYJdvBJSkCmglXLeu3A1RWMZKYiLkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkg7S1S2LzswM; Wed, 22 May 2024 05:37: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 44M5bu6c007295; Wed, 22 May 2024 05:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M5bugu007292; Wed, 22 May 2024 05:37:56 GMT (envelope-from git) Date: Wed, 22 May 2024 05:37:56 GMT Message-Id: <202405220537.44M5bugu007292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 6e824f371301 - main - time: siginfo_recvd needs to be marked volatile List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e824f3713011f7955a4f88fb16445e8e2cbe72c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6e824f3713011f7955a4f88fb16445e8e2cbe72c commit 6e824f3713011f7955a4f88fb16445e8e2cbe72c Author: Kyle Evans AuthorDate: 2024-05-22 05:36:29 +0000 Commit: Kyle Evans CommitDate: 2024-05-22 05:37:41 +0000 time: siginfo_recvd needs to be marked volatile sig_atomic_t does not imply volatility, we must do it ourselves to avoid caching of siginfo_recvd loads. Sponsored by: Klara, Inc. --- usr.bin/time/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 92148ab2e35b..4c1ce06543e3 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -54,7 +54,7 @@ static void showtime(FILE *, struct timespec *, struct timespec *, static void siginfo(int); static void usage(void) __dead2; -static sig_atomic_t siginfo_recvd; +static volatile sig_atomic_t siginfo_recvd; static char decimal_point; static struct timespec before_ts; static int hflag, pflag; From nobody Wed May 22 07:41:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkjsw5jsnz5L7bq; Wed, 22 May 2024 07:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkjsw4VrDz4b9f; Wed, 22 May 2024 07:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rk4+f8/ahlGsC6GYzdLW82W1iGLhRL4iR67iOpihzao=; b=SIYGaVZ4ob03pDkTYP0Q0Yq1R8nG11z6SyuLG5vn4a9Qnvg7WzuuzjNY+Eth9LrqoHS02R o9mP8Pl9i7pybnVZ2g99Ujt0tNVnG/9zNU2o3YHheaYxgaQiC1lKNdmzXarIqwu9nRNLer d4FIKP9l9zc8XljpgaJ7swXyWldrXXZtVheZRhcjEe0LLF3ySg8IqkAORp7XnHmy+dqU2t vzcFrb062dncOPdTO2qXcF8x8HCgrOXkpiD5bLnP1EJfBJ6vILlVeb5uVsQuAlR3VSxuQh J6FIPfoPnAotSxIAYeLHk7AumZz1GxoAJW/bW23TJ4NVXK9HMMQ+oMzqI8wCcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716363684; a=rsa-sha256; cv=none; b=JJ2brLEehdMiLLY7OcLg+8peOSCnU/C5dCTOia0WQIqDAB4cTOTBiWIO7qnOPN+c0cinyC Jj3eFSfyHpWVQnlMFMDUSh692PpRhNUXZ1qazPmLbM0labXsST2L6osVblB00QNP75x6ZS A4PWVL6WZ2VfJOPeRmnphF97lYeGKZYasU58S4URMGfL+iuSthz+BtBgG/fBQPYsnWDhT8 bcSX7LMqUbYDxCgfXw9eh/9ehERQ7DiX+ubKT5w3pxhLxbU95PozPRfbfhBDV+QNwAs2e9 F2dAu6+T6DE9tbSwE+45Z8G9iL65+Qg+fiMGizF3udoTktKdpkGxMQJ+SfNZRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rk4+f8/ahlGsC6GYzdLW82W1iGLhRL4iR67iOpihzao=; b=Kws2J9ASOHQbPCtQeRiI1QYwpwCDHjCKeyss6Om9Wrw45csefnPvTk1jq+52YKdVCsywZs UBUK/nAooi1u5KJBZZlAUxyLVBlG5EwkcheuW0SyVSimdtj7TJvbEdlJ47LTzGe97zcIKX kMXdBo4oO/YbP6n9jCIqxeN9Vqx4SrgyUQYJ1vjQX2cLsFSL92L06tEbEJ/i4Xk2+YptvL XpU3TWUEz98egDCHtX8zp6y6oqi5UrfkOnMmoqBHv4ykBP3Gj+SJoBxJ9blLgEhKC1DwIl V++nA25xCORFRJIK/T2RyjpiYUnsMYLt0ByARoEyKvvcPpTjmv2OvSSuLJT4bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkjsw3qFczwl4; Wed, 22 May 2024 07:41: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 44M7fOEe019905; Wed, 22 May 2024 07:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M7fOne019902; Wed, 22 May 2024 07:41:24 GMT (envelope-from git) Date: Wed, 22 May 2024 07:41:24 GMT Message-Id: <202405220741.44M7fOne019902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: bdd12889eaa6 - main - if_vlan: handle VID conflicts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdd12889eaa64032b3d09ef47e9a6f7081863378 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bdd12889eaa64032b3d09ef47e9a6f7081863378 commit bdd12889eaa64032b3d09ef47e9a6f7081863378 Author: Kristof Provost AuthorDate: 2024-05-21 11:31:13 +0000 Commit: Kristof Provost CommitDate: 2024-05-22 07:08:02 +0000 if_vlan: handle VID conflicts If we fail to change the vlan id we have to undo the removal (and vlan id change) in the error path. Otherwise we'll have removed the vlan object from the hash table, and have the wrong vlan id as well. Subsequent modification attempts will then try to remove an entry which doesn't exist, and panic. Undo the vlan id modification if the insertion in the hash table fails, and re-insert it under the original vlan id. PR: 279195 Reviewed by: zlei MFC atfer: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D45285 --- sys/net/if_vlan.c | 10 ++++++++++ tests/sys/net/if_vlan.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index b69d8107e30d..788fdf787249 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1715,10 +1715,20 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid, ifv->ifv_proto = proto; if (ifv->ifv_vid != vid) { + int oldvid = ifv->ifv_vid; + /* Re-hash */ vlan_remhash(trunk, ifv); ifv->ifv_vid = vid; error = vlan_inshash(trunk, ifv); + if (error) { + int ret __diagused; + + ifv->ifv_vid = oldvid; + /* Re-insert back where we found it. */ + ret = vlan_inshash(trunk, ifv); + MPASS(ret == 0); + } } /* Will unlock */ goto done; diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh index 458e3cc36bc6..41dac6222cbb 100755 --- a/tests/sys/net/if_vlan.sh +++ b/tests/sys/net/if_vlan.sh @@ -297,6 +297,42 @@ bpf_pcp_cleanup() vnet_cleanup } +atf_test_case "conflict_id" "cleanup" +conflict_id_head() +{ + atf_set descr 'Test conflicting VLAN IDs, PR #279195' + atf_set require.user root +} + +conflict_id_body() +{ + vnet_init + + epair=$(vnet_mkepair) + + vnet_mkjail alcatraz ${epair}b + vlan_a=$(jexec alcatraz ifconfig vlan create) + vlan_b=$(jexec alcatraz ifconfig vlan create) + + jexec alcatraz ifconfig ${vlan_a} vlan 100 vlandev ${epair}b + jexec alcatraz ifconfig ${vlan_b} vlan 101 vlandev ${epair}b + + atf_check -s exit:1 -o ignore -e ignore \ + jexec alcatraz ifconfig ${vlan_a} vlan 101 + + atf_check -s exit:0 -o match:"vlan: 100" \ + jexec alcatraz ifconfig ${vlan_a} + + atf_check -s exit:0 -o ignore -e ignore \ + jexec alcatraz ifconfig ${vlan_a} vlan 100 +} + +conflict_id_cleanup() +{ + vnet_cleanup + +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -306,4 +342,5 @@ atf_init_test_cases() atf_add_test_case "qinq_dot" atf_add_test_case "qinq_setflags" atf_add_test_case "bpf_pcp" + atf_add_test_case "conflict_id" } From nobody Wed May 22 07:45:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkjz30VVcz5L88K; Wed, 22 May 2024 07:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkjz303ZYz4bmL; Wed, 22 May 2024 07:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MjIW6zOIGl/Y5HG7RH+pHPNXPwA292ovP4mDinNDFwE=; b=H0waCKkYtE8iDlwsfxCRAnOKjrmYq9HFDF3pF3KWDwR+j4fGuxWGmRY9ObEfPgaRy053BT wA6d5lPTtN8hZpnoK+c7HGVNTCgkxhjwudi22o8Lv2RV+k21XwPvLhc6dYxOP9CGmR1bHo MgpBjgMq4Q1O1NufTFR4PP4w57+aOVbgDpXWXSE9xF6Yo+6rtc5h3Cj9EEPQPQuM3crVac DNUr9Z1mqAUDwfzKCTZk+qyHEG+fO8lM4U+wIUnwzbTWZtzcqaJyBbm2RNaPJH1g/oGPem fs219HgEfZsEmMEZzKE6pmKybPkmvHcUciLNu4k2ovb1doUchi3w0jorLZA7uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716363951; a=rsa-sha256; cv=none; b=wj3dHb5PNRs4cWXMVSY2wkq3OL+tYfxD/Rsi/8vZ1HaWeeMcasT0L7yMqoAi7K7Ma/2lQS NOP7opJFwL/pnuMmiRevqNYiuPJQ8LXzKMiIm8Ln1a7eBv2FMTY06sbta6mSTiwSSS9Qqt XXpMb1KfHBbjonyb2N1zMjchIXRU4iN8K57lopvB3w71IbS6kIoehJaz5QyzaOpPMJquYd /VvOELJ0dky+dG03AlCwstsEeLgrJ3UM4io4bahwKi5l2WUGY4MrQy9oHI+bo1rwm5E1TH uBwRYTy6pMe1orLJh4ohdAEu81bLxgAQq29FAOl5FrJQpZiHOPjuZXHAj71oFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MjIW6zOIGl/Y5HG7RH+pHPNXPwA292ovP4mDinNDFwE=; b=hfnG0ztOfB6Cr0roA3yTOklIVcn6unvV07XRgEO4GEfhu813sArixegOWfdu0HxgNHmkmn FWgkucYkJTS0sttTvVH9bacpuSp5nFS5bprn8EyNmgrcLaBFEW0LHYwcE4k0xhjtjnW2Tu Fp5W958ymBEGn+Q8ULwD+BcRjT0rfmhbOPqYe2/ho8/D2fnI88QmPMdOSpbgN1zKqtal00 hGRXfISLHZkyY4zsyiRTT+fXg3I8EG6vo3+0ZNY6cwW1xHouOULsmvbVr0U3G8q3MHeTzj uB1vwtH8UDMJtpWhYdrwnjsp+tFQy/waVGSPASizJSzhuqpQkJ460th2ahqxUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkjz26SqPzxBf; Wed, 22 May 2024 07:45: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 44M7jofD026253; Wed, 22 May 2024 07:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M7josw026250; Wed, 22 May 2024 07:45:50 GMT (envelope-from git) Date: Wed, 22 May 2024 07:45:50 GMT Message-Id: <202405220745.44M7josw026250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Juraj Lutter Subject: git: 7618c9e1637c - main - daemon: Add -C (--restart-count) option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7618c9e1637caea97723ff8accd60f3dc436b044 Auto-Submitted: auto-generated The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/src/commit/?id=7618c9e1637caea97723ff8accd60f3dc436b044 commit 7618c9e1637caea97723ff8accd60f3dc436b044 Author: Juraj Lutter AuthorDate: 2024-04-25 13:40:00 +0000 Commit: Juraj Lutter CommitDate: 2024-05-22 07:45:23 +0000 daemon: Add -C (--restart-count) option Add a new option (-C, --restart-count) to specify the maximum number of times that the controlled process is restarted if restart (-r) is restarted. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44944 --- usr.sbin/daemon/daemon.8 | 19 ++++++++++++++++--- usr.sbin/daemon/daemon.c | 25 ++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 4fafb8528f18..52fbc230ac77 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 27, 2023 +.Dd April 25, 2024 .Dt DAEMON 8 .Os .Sh NAME @@ -43,6 +43,7 @@ .Op Fl T Ar syslog_tag .Op Fl l Ar syslog_facility .Op Fl R Ar restart_delay_seconds +.Op Fl C Ar restart_count .Ar command arguments ... .Sh DESCRIPTION The @@ -55,6 +56,17 @@ log file. .Pp The options are as follows: .Bl -tag -width indent +.It Fl C , Fl -restart-count Ar restart_count +Restart the process at most +.Ar restart_count +times. +When zero is specified, +.Nm +will exit. +The maximum restart count is +.Cm 128 . +This option is used together with option +.Fl -restart . .It Fl c , Fl -change-dir Change the current working directory to the root .Pq Dq Pa / . @@ -72,8 +84,9 @@ Close and re-open it when signal .Dv SIGHUP is received, for interoperability with -.Xr newsyslog 1 -and similar log rotation / archival mechanisms. If +.Xr newsyslog 8 +and similar log rotation / archival mechanisms. +If .Fl -output-file is not specified, this flag is ignored. .It Fl l , Fl -syslog-facility Ar syslog_facility diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 26e34d1d2e2b..7214faf8bde3 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -56,6 +56,9 @@ /* 1 year in seconds */ #define MAX_RESTART_DELAY 60*60*24*365 +/* Maximum number of restarts */ +#define MAX_RESTART_COUNT 128 + #define LBUF_SIZE 4096 enum daemon_mode { @@ -92,6 +95,8 @@ struct daemon_state { bool restart_enabled; bool syslog_enabled; bool log_reopen; + int restart_count; + int restarted_count; }; static void restrict_process(const char *); @@ -109,7 +114,7 @@ static void daemon_exec(struct daemon_state *); static bool daemon_is_child_dead(struct daemon_state *); static void daemon_set_child_pipe(struct daemon_state *); -static const char shortopts[] = "+cfHSp:P:ru:o:s:l:t:m:R:T:h"; +static const char shortopts[] = "+cfHSp:P:ru:o:s:l:t:m:R:T:C:h"; static const struct option longopts[] = { { "change-dir", no_argument, NULL, 'c' }, @@ -121,6 +126,7 @@ static const struct option longopts[] = { { "child-pidfile", required_argument, NULL, 'p' }, { "supervisor-pidfile", required_argument, NULL, 'P' }, { "restart", no_argument, NULL, 'r' }, + { "restart-count", required_argument, NULL, 'C' }, { "restart-delay", required_argument, NULL, 'R' }, { "title", required_argument, NULL, 't' }, { "user", required_argument, NULL, 'u' }, @@ -139,6 +145,7 @@ usage(int exitcode) " [-u user] [-o output_file] [-t title]\n" " [-l syslog_facility] [-s syslog_priority]\n" " [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]\n" + " [-C restart_count]\n" "command arguments ...\n"); (void)fprintf(stderr, @@ -152,6 +159,7 @@ usage(int exitcode) " --child-pidfile -p Write PID of the child process to file\n" " --supervisor-pidfile -P Write PID of the supervisor process to file\n" " --restart -r Restart child if it terminates (1 sec delay)\n" + " --restart-count -C Restart child at most N times, then exit\n" " --restart-delay -R Restart child if it terminates after N sec\n" " --title -t Set the title of the supervisor process\n" " --user -u <user> Drop privileges, run as given user\n" @@ -198,6 +206,13 @@ main(int argc, char *argv[]) case 'c': state.keep_cur_workdir = 0; break; + case 'C': + state.restart_count = (int)strtonum(optarg, 0, + MAX_RESTART_COUNT, &e); + if (e != NULL) { + errx(6, "invalid restart count: %s", e); + } + break; case 'f': state.keep_fds_open = 0; break; @@ -331,6 +346,12 @@ main(int argc, char *argv[]) state.mode = MODE_SUPERVISE; daemon_eventloop(&state); daemon_sleep(&state); + if (state.restart_enabled && state.restart_count > -1) { + if (state.restarted_count >= state.restart_count) { + state.restart_enabled = false; + } + state.restarted_count++; + } } while (state.restart_enabled); daemon_terminate(&state); @@ -723,6 +744,8 @@ daemon_state_init(struct daemon_state *state) .keep_fds_open = 1, .output_fd = -1, .output_filename = NULL, + .restart_count = -1, + .restarted_count = 0 }; } From nobody Wed May 22 07:55:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkkBc5LPCz5L9Fn; Wed, 22 May 2024 07:55:52 +0000 (UTC) (envelope-from lexi@le-fay.org) Received: from fuchsia.eden.le-Fay.ORG (fuchsia.eden.le-fay.org [IPv6:2001:8b0:aab5:107::11]) by mx1.freebsd.org (Postfix) with ESMTP id 4VkkBc4SYVz4d1F; Wed, 22 May 2024 07:55:52 +0000 (UTC) (envelope-from lexi@le-fay.org) Authentication-Results: mx1.freebsd.org; none Received: from iris.eden.le-Fay.ORG (iris.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::6]) by fuchsia.eden.le-Fay.ORG (Postfix) with ESMTP id 19A732C447; Wed, 22 May 2024 07:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=le-fay.org; s=fuchsia; t=1716364552; bh=ffGlMRZPAj4dR+KZomi0jpUWZrk65WvS9k0lbZKhgrg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=vTT6nUDFs6vw6plBHf4tVSZiK5D2f0oytJHzcYupV2gkZNcMYnsu4M9aKxHU4eeS5 70VQzrzB3wm2mIK0nXnWp6x29gPpqMJtxoC/i2QBXiEl4irKrliZaTupx+xB8+W8XK J+8ebLfBXe1qzk6UCO1Q4uCgenFAEU6gyGElmuC8= Received: from ilythia.eden.le-fay.org (ilythia.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by iris.eden.le-Fay.ORG (Postfix) with ESMTPSA id A0A462C04D8; Wed, 22 May 2024 08:55:52 +0100 (BST) Date: Wed, 22 May 2024 08:55:51 +0100 From: Lexi Winter <lexi@le-fay.org> To: Mariusz Zaborski <oshogbo@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ay5cg3YZlD96aRyp" Content-Disposition: inline In-Reply-To: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20712, ipnet:2001:8b0::/32, country:GB] X-Rspamd-Queue-Id: 4VkkBc4SYVz4d1F --Ay5cg3YZlD96aRyp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Mariusz Zaborski: > The branch main has been updated by oshogbo: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D408957613bc065c4444812c3ae= 276ace03697ebd >=20 > commit 408957613bc065c4444812c3ae276ace03697ebd > Author: Mariusz Zaborski <oshogbo@FreeBSD.org> > AuthorDate: 2024-05-21 20:02:50 +0000 > Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> > CommitDate: 2024-05-21 20:03:20 +0000 >=20 > Regen > --- > sys/compat/freebsd32/freebsd32_sysent.c | 2 +- > sys/kern/init_sysent.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) i'm sorry if this is considered accepted practice in FreeBSD (i'm not a committer) but could i please request more useful commit messages than "Regen" for things like this? when looking through 'git log', especially 'git log --format=3Doneline', it's really not clear what this commit actually does, meaning if i'm looking through the log for commits related to a problem i'm having, i have to examine commits like this by hand to see if they're related. it would save me (and other people, i suppose) a lot of time if the commit message could at least mention what it's touching, e.g. "Regen sys/compat/freebsd32/freebsd32_sysent.c". --Ay5cg3YZlD96aRyp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmZNpQUACgkQDHqbqZ41 x5mN9wwAm63A4aPyITZ5NYp8Mclqd+IHubROEahjfJWr0CxccYbW4n8h7oR03ze8 nyraXV8WZT+zb5Kr7l0MQ5QOfPmgKG3NpCgBo+5OfST/9jXrv7SOzjhjSJSqoFSp AvSeF3cmsPgQHwUnQmJsOgUEZ3G4zY4AufAOhhgqXOSbNqMqvzkSGMoJsuRlFmFi /l8cwAcCgzDa8Sj8u3zNFjkRqPCT4cWBg74fWpmM9i7mxAQtbDv4Sz1KIPNZfczW m15XEoG0DSSvpiH25om8+78an65rKzrd8caLfJ2ZNWsDBW9ebb8TlwsXtbAysmj/ rMRfFi/2b/2RY17Wn1sL5OszSG463HOpjJhr1vVkeWk4NN/7PbARd5xe+xC1cvTG M79tHj1NUGUeKleNTvFzdZO/1sfwHzq1vnva0FhesVNOtoBD//PXANAJx2Xqu4TB GN8bPT3w7bhuelSTrI4EmeH6PgitI25L81ikkWfRLbDKi1hnBI1UxMDICK8U5Usw 57sfGxwB =R2ou -----END PGP SIGNATURE----- --Ay5cg3YZlD96aRyp-- From nobody Wed May 22 08:31:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0D1c7Lz5LDCQ; Wed, 22 May 2024 08:31: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 4Vkl0D16Xqz4j6n; Wed, 22 May 2024 08:31:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CS5YAAEiDjntgLrdfvG5POuPjSlhXUMdEOThsQUNdX0=; b=hB0K7NOvHBLemGqUR6yHkY0FPb6Actd5t9IfM8F451UKMHQURPPKS2epg8/yRi5YSVevSb dN6Vjue8zqffLCf5fM/Ld3+sdcSR0es3brIakTCuM48bLf0W4EBsmZUvnepnsZPQ5ySxND S1gj8TXKeWvQS6Y34Xr5Pe8pihWN7nd1Z6oKjzCktX1Gh75puq27lNxoPnI7o6eBETxf8L T7nal8NSuxKFe7CIIWPV3UKH8HdVJJPTOSpSnvDmW3EoNq8ql+gt92pr8WNJYjwTqKRCfY w9gxNvcYcMdO7CW3IMfhz9ousr+iJ/Hno2QRwPnkZXhF21g8LoFY6EFGc0WY9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366716; a=rsa-sha256; cv=none; b=JtHMYb1HJXXgajRs+DJM8lSysZeaFcn8LonAo917xXcb8+PXdy9m5cfWAy5uutfz1ETYAK 8kPck8a612H7r6k4NGA609PGYh0BRgjvKRj2uw8OsSipJfYjQmfXDvn3mX5BVhSW302EzL 890L5Zgv2e18gxzRyuIukEEnE+/Q/3WAlHIDZsI1qTe900mQHWwpp7IY4S7OO0ULlmajPt 7udeSyeFXWO04GnHb3XzWYC8JzdDhZWbJ9PgWq2Yyg90CJ26lOTAJHChVNw5+edplsUFb6 0TSNIxi9RFt9CfWlBNjOrWLIV/bchFO+JiY/ROky4giyJLP3UJzSydpJT8mrjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CS5YAAEiDjntgLrdfvG5POuPjSlhXUMdEOThsQUNdX0=; b=PiNfoUlyj15yufaM/75AiHw5c3pfhh/FFZydj1LkAWtQRw4UQme6beleHYixu7jlhIstAa baww0AYCH3Al9kRZ/zoSNUs/SNOw/Lh5I7iYzWUmQdGAHRYCMHHfFE22fK3LvSnaixXKaF jqNxRRGjQBi3CvQLCpJMDn9iF6E0nDO0sH0IFr49tHLtJX6fsbne3dsjVOWZDewKj5/1Ds UTMCki/ydik6f34vjR7gqzFURYLxGmE8vaw7WjdjtcA+78PDkfeXVCw+kMyT+aGxdLmGX3 +1YtJWZ8t1uin7b63zVIet5OAHziTHlBCDGwXdZfapqRYhW6eMQHfY3UYOGN9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0D0kLZzxpG; Wed, 22 May 2024 08:31: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 44M8Vue4008667; Wed, 22 May 2024 08:31:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vuqt008664; Wed, 22 May 2024 08:31:56 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:56 GMT Message-Id: <202405220831.44M8Vuqt008664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 9f44638ef2c4 - main - stand/efi: Fix for binutils when targeting arm64 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f44638ef2c46861565b89bb01bbeeab17755649 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9f44638ef2c46861565b89bb01bbeeab17755649 commit 9f44638ef2c46861565b89bb01bbeeab17755649 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:17:26 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:17:26 +0000 stand/efi: Fix for binutils when targeting arm64 When linking with ld.bfd it complain with the following: /usr/local/bin/aarch64-unknown-freebsd14.0-ld: start.o: relocation R_AARCH64_ABS32 against `__data_size' can not be used when making a shared object Fix this by marking the __data_size with ABSOLUTE. This returns a non-relocatable value which appears to be the same behaviour of lld. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45257 --- stand/efi/loader/arch/arm64/arm64.ldscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/arch/arm64/arm64.ldscript b/stand/efi/loader/arch/arm64/arm64.ldscript index 18aead05cb49..889a1bafb9f7 100644 --- a/stand/efi/loader/arch/arm64/arm64.ldscript +++ b/stand/efi/loader/arch/arm64/arm64.ldscript @@ -68,7 +68,7 @@ SECTIONS . = ALIGN(16); .dynsym : { *(.dynsym) } _edata = .; - __data_size = . - __data_start; + __data_size = ABSOLUTE(. - __data_start); /* Unused sections */ .interp : { *(.interp) } From nobody Wed May 22 08:31:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0F3D46z5LD06; Wed, 22 May 2024 08:31: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 4Vkl0F1t98z4j6q; Wed, 22 May 2024 08:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F69tYcE7FA71GpWO5ITAtaYNy/fzZwq/D8nMQCBJI8s=; b=v7RQSnQS+K3pA9c3Ed/G4VbeQsZN7DI4g/XaW6naBplFui71IZVkTuGCL/d9SgmpmUtpkq jm3M2NfWZTuQ4ZCUyI1n6RditEx6gr+wizXRZTinFjeqMrSyGpkki5AgPV7Vr3ZKetBFjr EnvYB2RpHWPSRwrK2goZ4h8lEiCAz1HJrjr2Hnvg+LUyJbZ687GhuOJWB35bBdDX4bMoM1 IH9weC/YTdiMksRlHpdKB1BBllnkUenL6qNkGkG/QF0KiXGxNx4EOnl4O3joVSPsoPVLEj wNIaBOcUtNq9mfb/guFNMBzRCaBbTcMGvbJHFAnWimu6ra/8aGCS8bsG7FVFrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366717; a=rsa-sha256; cv=none; b=cg87x48exSpqOwHP84lJewa2/gezEszc55vdTLHqcFndQld0+OF1t/z5xWt35OwbAFgnd2 SJ9TefFoxd/1TAKx2Gv7cT4Gg9mxfuec+dpgzKz/YYnJjwCPEUT6e3HR5K69ZOrvkcOfbT acNCDc2Q4+UUuAfkdoiYNSsfQfJuBQpbTADM0UloQNSPbl2RfOjOF1Ouibd8LjED+K27L6 YZoRDRCq5w7CSwePNWpI7EIf9px0CNfaTiU75kmHFmJwCf3//A/7BEHey8fmc/z4lS7thT vStZu5NZEGi+1MP0L5l9DxUFvFV/kQ68WojDbDteAisf7idvamL8zCysOl+0zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F69tYcE7FA71GpWO5ITAtaYNy/fzZwq/D8nMQCBJI8s=; b=DqH5MoYH6jitDI7yToL8pv4z9c7P8JJs0paGb71MpigptAueiNkg9Fwystgp9XKxS3cCLc WcjIytiiEoIrzzlPbSub6+QlHPYuzHnePQaKAyPEQdipbJuQ0r6Yy8YVPpw+5SUBd5U4i5 QLQvKjeVbvaBDdpURO62NTs/jEKflcCZT1t7jmhAMuL2trO5+t3Cc/jWurVVobGizHA/cy FpOxENLnItEi+mrq/hFSxr31iE51JRQOktERas1OUjiYy8GiJtKNbfA4xt/qTUaLW1zvgP LQ/+5pm67HOO1mBTB3nCeWBDQ+s6ougruW68XkjQS1cBU3dvtA+W99e7AuewRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0F1TdWzyG0; Wed, 22 May 2024 08:31: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 44M8VvbE008719; Wed, 22 May 2024 08:31:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vv9U008716; Wed, 22 May 2024 08:31:57 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:57 GMT Message-Id: <202405220831.44M8Vv9U008716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 8e82c5e28db6 - main - stand/kboot: Fix the linker script OUTPUT_FORMAT List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e82c5e28db6fb19f75d10fd2e7c3db784723f1f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8e82c5e28db6fb19f75d10fd2e7c3db784723f1f commit 8e82c5e28db6fb19f75d10fd2e7c3db784723f1f Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:17:52 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:17:52 +0000 stand/kboot: Fix the linker script OUTPUT_FORMAT ld.bfd doesn't understand elf64-aarch64 but does have elf64-littleaarch64. Switch to this so we can link kboot with it. While here switch to the single format version. We are unlikely to support booting from a big-endian Linux. Reviewed by: imp, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45258 --- stand/kboot/kboot/arch/aarch64/aarch64.ldscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/kboot/kboot/arch/aarch64/aarch64.ldscript b/stand/kboot/kboot/arch/aarch64/aarch64.ldscript index 9460be1874bf..dd551247125b 100644 --- a/stand/kboot/kboot/arch/aarch64/aarch64.ldscript +++ b/stand/kboot/kboot/arch/aarch64/aarch64.ldscript @@ -1,4 +1,4 @@ -OUTPUT_FORMAT("elf64-aarch64", "elf64-aarch64", "elf64-aarch64") +OUTPUT_FORMAT("elf64-littleaarch64") OUTPUT_ARCH(aarch64) ENTRY(_start) SECTIONS From nobody Wed May 22 08:31:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0G6Tnrz5LD6w; Wed, 22 May 2024 08:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0G2lYjz4jBJ; Wed, 22 May 2024 08:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YE/QyoqyZpATJkmQb4fwQA+bml6r8dHPUS+QtXEsmc=; b=sXFYIyop0g4GMW/nkY8cmCyP3/qdefyKio9NX9gJcl0GZECZZ7D5Z5ykEfNRcyHg+ecEIQ N73RTzPVVrZEpxRlS13/H2KJ0p6Fg4V/dqNfyB/wS7JIiqnKacZYqcR2AqYS+ZOyKorcr1 x1asE9OJnfHch4Cxe+ec7+D2ze/IHCP2EIsI/kaCdzBY8h09BAdZjqPR01ekeC3GXfu1jT YMrocFGLDXUrK4li/w5wYVw67eXfM3FuI2K/yJIVmsREob/S9PERUbPM02fn+9N2L0CMhB M2tCuaJfXD0UOMJKzAYByOFeX8Rz2OpO0G8OMDWbeQBGDSVSIo1xscl0i0vwzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366718; a=rsa-sha256; cv=none; b=no/4VJLSZydYnycczKTICy/QkmN3Sbgc+6AC4/5OwdPU16zSUmuWl5y14CfSPg0l4GD561 e3Q8aY0i8i6X7fBbEKdZ66Q15kIyZeXPHlSaronwt0pC3KrbkUetYWA0FrDm+5RmNFjkEn ZDuJ+/hJr1/JzsMOl7qBnVcLR1vc+wpEj/3TIG1NT+CWEzYwjEA/dWwNhhisk6Wy6RaXzh TyYs1KWW2de7Hw9/WNC6DNQLSEHLJi8jNiMx2UOH1e8gn585yZ8BM1emufXKv+wM2Lf4Cd bhcBFFyvrdb3mWSjGCcPNTt+pUd+oVCZXGOhhSgem8HESus6k5qO7uFb806JIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YE/QyoqyZpATJkmQb4fwQA+bml6r8dHPUS+QtXEsmc=; b=NEGMgbmErEC3QSYKJ2PWXJ1pvGNmJKE41xwYZYQ3xoU7AZibh5ZlglDbkHIXXNzM7SJmEB BuMHwxDy1lmY1yWjk4f7/MhrmhBDKrI7aT/1RpASFPBc47kFvS0XdBcGVfWImrtVp/sxzz H3VWqAsLoSYuPzUkqTDckZysej+ELuNqfyd2YXjxAtsjXjuiVQOUUsdbKux77Ru7ldLOsG FBGsAhoS8OPUrrA/xB/9mRcOhtodt6rLXmdL0CVVLyJCLJcTX0sQWFlld7HtBBX73aBKOP fnh8c39JpWPO86+ryQOHHnOus3+CxDNaORTGckCJ/g26IN1jjxe57CJipCnvYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0G2MkJzyRs; Wed, 22 May 2024 08:31:58 +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 44M8VwrL008770; Wed, 22 May 2024 08:31:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vwax008767; Wed, 22 May 2024 08:31:58 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:58 GMT Message-Id: <202405220831.44M8Vwax008767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 53120fbb6895 - main - csu: Find the main pointer through the GOT List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53120fbb68952b7d620c2c0e1cf05c5017fc1b27 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=53120fbb68952b7d620c2c0e1cf05c5017fc1b27 commit 53120fbb68952b7d620c2c0e1cf05c5017fc1b27 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:10 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:10 +0000 csu: Find the main pointer through the GOT Use the Global Offset Table to find the location of main in crt1. With lld the old code would point to main@plt, however ld.bfd fails to link when main is in a shared library. Fix this by using the GOT address to find main as it works with both lld and bfd. Reviewed by: jrtc27 Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45259 --- lib/csu/aarch64/crt1_s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/csu/aarch64/crt1_s.S b/lib/csu/aarch64/crt1_s.S index 981cf4653efd..1fb60f756a7a 100644 --- a/lib/csu/aarch64/crt1_s.S +++ b/lib/csu/aarch64/crt1_s.S @@ -44,8 +44,8 @@ ENTRY(_start) add x2, x1, x0, lsl #3 /* env is after argv */ add x2, x2, #8 /* argv is null terminated */ #ifdef PIC - adrp x4, main - add x4, x4, :lo12:main + adrp x4, :got:main + ldr x4, [x4, :got_lo12:main] #else ldr x4, =main #endif From nobody Wed May 22 08:31:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0H5FYgz5LD08; Wed, 22 May 2024 08:31: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 4Vkl0H3RmGz4jDr; Wed, 22 May 2024 08:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DECalKj5ot6reNhIRYo2nA/XKIpl1h5RQ7rq7d6SXX8=; b=Hj708paaSaVgUzlLUmVPKZP4msWxXKQGV1ppbI8t7HZGlJjr6CrygCADZPX+uCgtmyzwA2 9g2TgujcqdghAM0D0/o0GMyfp9lmJAWnj/LN0c9jxWiTmgniXDsg1j0G8WheVCVAbnNSk1 JYATxBU/63J5PZ8xuGjClsnGtkKRoj7PSAeIcYBYsNpYjX0FUl7geyslZzYF08lQaa5XTc F07Uwsmrc4EQNqsMXS7olASMcepy4VjPYOMKhoYCs2/NnAULRmfABNqvptl5hCgSrMHHRy lqU5xuZOmPdDbNJ/RC7kKAgvGB0notmTjs58LQUcYYfuI5VCk32P6CoO6h/rQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366719; a=rsa-sha256; cv=none; b=ctiVzYoH7Xz5DdetTBAHlYRZD9MKGs4L1bKi/lDWK7o/EZFFnsKBtSKIogoPWQdYDhMwpN fiIoKReneMb4p/CLvE+ZdCy/pdY0jfTder0/IWM7cFCHN8A0fOyTGa1bFe1ZBLmW4HaM1x tekLzKnlDMEnS5qAk0rIZMUmpNDBShQwnL4ytzeN9huQedS4TYJO0a7FUMMBeaF/WA5+Gn IunNUruvf7j63BB4X2A+DzYa9ZP28G/8mEmy3s4SQfhtNXd0P21qb17SyhmEvNzzicYpLE 3eijDhlV2zYA0yYoD/r8LMMppiyhINvEfKpOfgBLzdcu90Bq9KAyEKzjT5cP+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=1716366719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DECalKj5ot6reNhIRYo2nA/XKIpl1h5RQ7rq7d6SXX8=; b=oK2a1XNScLzojkXqRVUO9UM1JS/4/jA9YcA3PenV5wSbFAqlZTyg/oAnUNEpkyqUsxxN1T pKIHkC8e3XpH/T/4NTGqWoR+jAYWjm7SfUpmnJhc2dBJcyWZ5AtpQax9keuQNV375bnmfH i0l+n2m6g+A8Agq0k/sfo9CrMR877adi2ujJn6mifGOfUdmZj+BiuJgxYQax8hI5bn9KQC ftLPLQnScBjLulWclkIyc7E8qEibu/JCocs/xju1O/lSLkwE133yH+wgQJmnwBF5k1Y7Lo pPYXtA/pVZhL8mPjAjhxyt+bR/YuTm1k2dtxuj9KcdnIcNydPSRS0OWn5qNCow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0H345pzyhW; Wed, 22 May 2024 08:31: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 44M8VxIU008810; Wed, 22 May 2024 08:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vx61008807; Wed, 22 May 2024 08:31:59 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:59 GMT Message-Id: <202405220831.44M8Vx61008807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 940155d24afb - main - sys/sys: Fix __builtin_is_aligned fallback List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 940155d24afb5c80ce7fde59c856c5c0d5c6dbe1 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=940155d24afb5c80ce7fde59c856c5c0d5c6dbe1 commit 940155d24afb5c80ce7fde59c856c5c0d5c6dbe1 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:26 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:26 +0000 sys/sys: Fix __builtin_is_aligned fallback When the compiler doesn't provide __builtin_is_aligned we use macro as a fallback. The macro was missing brackets around one argument. This could lead to incorrect results when the argument is more complex than a single stagement. Fix this by adding the needed brackets. Reviewed by: brooks, imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45260 --- sys/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index a6545a29a302..037dfa55f923 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -902,7 +902,7 @@ /* Provide fallback versions for other compilers (GCC/Clang < 10): */ #if !__has_builtin(__builtin_is_aligned) #define __builtin_is_aligned(x, align) \ - (((__uintptr_t)x & ((align) - 1)) == 0) + (((__uintptr_t)(x) & ((align) - 1)) == 0) #endif #if !__has_builtin(__builtin_align_up) #define __builtin_align_up(x, align) \ From nobody Wed May 22 08:32:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0J6sgkz5LD09; Wed, 22 May 2024 08:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0J4vqRz4jSl; Wed, 22 May 2024 08:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUc/Do33OzDsJRWhcbweIzfOl9y/A/04boeGmVwLyJU=; b=uQV0iq9pYft/C2hu35HUlEaY0cXAOEc7TX/6DMNi0gwt97K5vE942taVLLWJNuY00/k8RE edX5foOXNDxCQiuPguZznwiV+ws7d0tq4ClKld8xRfjwbBRA/fJSiU6AnCX2We3bYfdaZ+ b6MrgewlvEhS5tdYjabinyun2qP1za4Eg3HJ46y+875dP3w8lopMaweP4C2YF8qxduHi2S ZDy9nrVDGMofhKlIOgtBUKn4Dd2i5XZMB9mSW12Npiyr/Mv4h5vI8kHAQqEVsXaW2apbtJ AtE2+PQHuQoX8dDdsBIJYKTEvvb8VxxNVtl4iDr4aQVOm0biJQE9Q1BMLjJS0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366720; a=rsa-sha256; cv=none; b=Og6WFSMRpEcwj6gwvE8BbDP/KjA0KOWSg0GqYO8eFGwrYi1gnUXxQnl+Gr2MDuoKSlc+xH W2qf2SeOBPbWezW6oroTUUkK/SmGkZlM/r/R0/Z4zdUZkPFmJworGCuTY6T7pfl3TvmHjc DOQnRGU5xSC6hJHxwtvtsbexnkoLNjrAn7gtMf412jPAy/F0M5eW6iU2M8+IFc+0/SC9iz 6ilGMsmXS6Q/6nbEuiWmohhsiL4ZMHuWzTuYu2Qjr+xft6C3OpEy/mxD9/O6JC/4fIBini /q1bTNEkJ++SC8Xmsm3+xDIlnoRspKnLquVoM2j87/QlVtW1iBCd542kgzzUsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUc/Do33OzDsJRWhcbweIzfOl9y/A/04boeGmVwLyJU=; b=yFbgFmmonKeGkXmYXktSPQjovnN7DsnMa4PVyeCc+FCqPsMs/hONNovcuIIwJQCStGY8rb bezqOmRd1vmfm62kzMtazomS6DoDK7e66cCB0RkHfkMFBDtTwxDCe7S+YwwFvSybjQkEPy LZBLPqlWPFz8iBt27Gvmw0fxjzE5GC5RaCyTZ+apCsLAoljt2dR3R329dhyVPgeyJuRqW0 rvn0Z0FzUbSfaZ/fE4Md5JgsVGKu0d5SMgxILPdnMBgDOb7qAVw/6Lvq/1I6eDo4gsX5r0 leeS8TYMTqujKmwm6+/sylRSFLIiAG8CZfqLL6QpTSANoUWIsxPT5fXCkxxYEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0J4TjzzyhX; Wed, 22 May 2024 08:32:00 +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 44M8W0mW008873; Wed, 22 May 2024 08:32:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W0T9008870; Wed, 22 May 2024 08:32:00 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:00 GMT Message-Id: <202405220832.44M8W0T9008870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 29c1cf9860e5 - main - arm64: Use the UL macro in TCR_EL1 defines List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29c1cf9860e531146220d9dc3596e4c79f91cfcd Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=29c1cf9860e531146220d9dc3596e4c79f91cfcd commit 29c1cf9860e531146220d9dc3596e4c79f91cfcd Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:39 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:39 +0000 arm64: Use the UL macro in TCR_EL1 defines While clang can handle numbers with a UL suffix in assembly files gcc/gas is unable to. Switch to use the UL macro for TCR_EL1 defines as some are used in locore.S Reviewed by: brooks, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45261 --- sys/arm64/include/armreg.h | 96 +++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index d1480cd61184..2af207a40009 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -2151,99 +2151,99 @@ /* TCR_EL1 - Translation Control Register */ /* Bits 63:59 are reserved */ #define TCR_TCMA1_SHIFT 58 -#define TCR_TCMA1 (1UL << TCR_TCMA1_SHIFT) +#define TCR_TCMA1 (UL(1) << TCR_TCMA1_SHIFT) #define TCR_TCMA0_SHIFT 57 -#define TCR_TCMA0 (1UL << TCR_TCMA0_SHIFT) +#define TCR_TCMA0 (UL(1) << TCR_TCMA0_SHIFT) #define TCR_E0PD1_SHIFT 56 -#define TCR_E0PD1 (1UL << TCR_E0PD1_SHIFT) +#define TCR_E0PD1 (UL(1) << TCR_E0PD1_SHIFT) #define TCR_E0PD0_SHIFT 55 -#define TCR_E0PD0 (1UL << TCR_E0PD0_SHIFT) +#define TCR_E0PD0 (UL(1) << TCR_E0PD0_SHIFT) #define TCR_NFD1_SHIFT 54 -#define TCR_NFD1 (1UL << TCR_NFD1_SHIFT) +#define TCR_NFD1 (UL(1) << TCR_NFD1_SHIFT) #define TCR_NFD0_SHIFT 53 -#define TCR_NFD0 (1UL << TCR_NFD0_SHIFT) +#define TCR_NFD0 (UL(1) << TCR_NFD0_SHIFT) #define TCR_TBID1_SHIFT 52 -#define TCR_TBID1 (1UL << TCR_TBID1_SHIFT) +#define TCR_TBID1 (UL(1) << TCR_TBID1_SHIFT) #define TCR_TBID0_SHIFT 51 -#define TCR_TBID0 (1UL << TCR_TBID0_SHIFT) +#define TCR_TBID0 (UL(1) << TCR_TBID0_SHIFT) #define TCR_HWU162_SHIFT 50 -#define TCR_HWU162 (1UL << TCR_HWU162_SHIFT) +#define TCR_HWU162 (UL(1) << TCR_HWU162_SHIFT) #define TCR_HWU161_SHIFT 49 -#define TCR_HWU161 (1UL << TCR_HWU161_SHIFT) +#define TCR_HWU161 (UL(1) << TCR_HWU161_SHIFT) #define TCR_HWU160_SHIFT 48 -#define TCR_HWU160 (1UL << TCR_HWU160_SHIFT) +#define TCR_HWU160 (UL(1) << TCR_HWU160_SHIFT) #define TCR_HWU159_SHIFT 47 -#define TCR_HWU159 (1UL << TCR_HWU159_SHIFT) +#define TCR_HWU159 (UL(1) << TCR_HWU159_SHIFT) #define TCR_HWU1 \ (TCR_HWU159 | TCR_HWU160 | TCR_HWU161 | TCR_HWU162) #define TCR_HWU062_SHIFT 46 -#define TCR_HWU062 (1UL << TCR_HWU062_SHIFT) +#define TCR_HWU062 (UL(1) << TCR_HWU062_SHIFT) #define TCR_HWU061_SHIFT 45 -#define TCR_HWU061 (1UL << TCR_HWU061_SHIFT) +#define TCR_HWU061 (UL(1) << TCR_HWU061_SHIFT) #define TCR_HWU060_SHIFT 44 -#define TCR_HWU060 (1UL << TCR_HWU060_SHIFT) +#define TCR_HWU060 (UL(1) << TCR_HWU060_SHIFT) #define TCR_HWU059_SHIFT 43 -#define TCR_HWU059 (1UL << TCR_HWU059_SHIFT) +#define TCR_HWU059 (UL(1) << TCR_HWU059_SHIFT) #define TCR_HWU0 \ (TCR_HWU059 | TCR_HWU060 | TCR_HWU061 | TCR_HWU062) #define TCR_HPD1_SHIFT 42 -#define TCR_HPD1 (1UL << TCR_HPD1_SHIFT) +#define TCR_HPD1 (UL(1) << TCR_HPD1_SHIFT) #define TCR_HPD0_SHIFT 41 -#define TCR_HPD0 (1UL << TCR_HPD0_SHIFT) +#define TCR_HPD0 (UL(1) << TCR_HPD0_SHIFT) #define TCR_HD_SHIFT 40 -#define TCR_HD (1UL << TCR_HD_SHIFT) +#define TCR_HD (UL(1) << TCR_HD_SHIFT) #define TCR_HA_SHIFT 39 -#define TCR_HA (1UL << TCR_HA_SHIFT) +#define TCR_HA (UL(1) << TCR_HA_SHIFT) #define TCR_TBI1_SHIFT 38 -#define TCR_TBI1 (1UL << TCR_TBI1_SHIFT) +#define TCR_TBI1 (UL(1) << TCR_TBI1_SHIFT) #define TCR_TBI0_SHIFT 37 -#define TCR_TBI0 (1UL << TCR_TBI0_SHIFT) +#define TCR_TBI0 (UL(1) << TCR_TBI0_SHIFT) #define TCR_ASID_SHIFT 36 #define TCR_ASID_WIDTH 1 -#define TCR_ASID_16 (1UL << TCR_ASID_SHIFT) +#define TCR_ASID_16 (UL(1) << TCR_ASID_SHIFT) /* Bit 35 is reserved */ #define TCR_IPS_SHIFT 32 #define TCR_IPS_WIDTH 3 -#define TCR_IPS_32BIT (0UL << TCR_IPS_SHIFT) -#define TCR_IPS_36BIT (1UL << TCR_IPS_SHIFT) -#define TCR_IPS_40BIT (2UL << TCR_IPS_SHIFT) -#define TCR_IPS_42BIT (3UL << TCR_IPS_SHIFT) -#define TCR_IPS_44BIT (4UL << TCR_IPS_SHIFT) -#define TCR_IPS_48BIT (5UL << TCR_IPS_SHIFT) +#define TCR_IPS_32BIT (UL(0) << TCR_IPS_SHIFT) +#define TCR_IPS_36BIT (UL(1) << TCR_IPS_SHIFT) +#define TCR_IPS_40BIT (UL(2) << TCR_IPS_SHIFT) +#define TCR_IPS_42BIT (UL(3) << TCR_IPS_SHIFT) +#define TCR_IPS_44BIT (UL(4) << TCR_IPS_SHIFT) +#define TCR_IPS_48BIT (UL(5) << TCR_IPS_SHIFT) #define TCR_TG1_SHIFT 30 -#define TCR_TG1_MASK (3UL << TCR_TG1_SHIFT) -#define TCR_TG1_16K (1UL << TCR_TG1_SHIFT) -#define TCR_TG1_4K (2UL << TCR_TG1_SHIFT) -#define TCR_TG1_64K (3UL << TCR_TG1_SHIFT) +#define TCR_TG1_MASK (UL(3) << TCR_TG1_SHIFT) +#define TCR_TG1_16K (UL(1) << TCR_TG1_SHIFT) +#define TCR_TG1_4K (UL(2) << TCR_TG1_SHIFT) +#define TCR_TG1_64K (UL(3) << TCR_TG1_SHIFT) #define TCR_SH1_SHIFT 28 -#define TCR_SH1_IS (3UL << TCR_SH1_SHIFT) +#define TCR_SH1_IS (UL(3) << TCR_SH1_SHIFT) #define TCR_ORGN1_SHIFT 26 -#define TCR_ORGN1_WBWA (1UL << TCR_ORGN1_SHIFT) +#define TCR_ORGN1_WBWA (UL(1) << TCR_ORGN1_SHIFT) #define TCR_IRGN1_SHIFT 24 -#define TCR_IRGN1_WBWA (1UL << TCR_IRGN1_SHIFT) +#define TCR_IRGN1_WBWA (UL(1) << TCR_IRGN1_SHIFT) #define TCR_EPD1_SHIFT 23 -#define TCR_EPD1 (1UL << TCR_EPD1_SHIFT) +#define TCR_EPD1 (UL(1) << TCR_EPD1_SHIFT) #define TCR_A1_SHIFT 22 -#define TCR_A1 (0x1UL << TCR_A1_SHIFT) +#define TCR_A1 (UL(1) << TCR_A1_SHIFT) #define TCR_T1SZ_SHIFT 16 -#define TCR_T1SZ_MASK (0x3fUL << TCR_T1SZ_SHIFT) +#define TCR_T1SZ_MASK (UL(0x3f) << TCR_T1SZ_SHIFT) #define TCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT) #define TCR_TG0_SHIFT 14 -#define TCR_TG0_MASK (3UL << TCR_TG0_SHIFT) -#define TCR_TG0_4K (0UL << TCR_TG0_SHIFT) -#define TCR_TG0_64K (1UL << TCR_TG0_SHIFT) -#define TCR_TG0_16K (2UL << TCR_TG0_SHIFT) +#define TCR_TG0_MASK (UL(3) << TCR_TG0_SHIFT) +#define TCR_TG0_4K (UL(0) << TCR_TG0_SHIFT) +#define TCR_TG0_64K (UL(1) << TCR_TG0_SHIFT) +#define TCR_TG0_16K (UL(2) << TCR_TG0_SHIFT) #define TCR_SH0_SHIFT 12 -#define TCR_SH0_IS (3UL << TCR_SH0_SHIFT) +#define TCR_SH0_IS (UL(3) << TCR_SH0_SHIFT) #define TCR_ORGN0_SHIFT 10 -#define TCR_ORGN0_WBWA (1UL << TCR_ORGN0_SHIFT) +#define TCR_ORGN0_WBWA (UL(1) << TCR_ORGN0_SHIFT) #define TCR_IRGN0_SHIFT 8 -#define TCR_IRGN0_WBWA (1UL << TCR_IRGN0_SHIFT) +#define TCR_IRGN0_WBWA (UL(1) << TCR_IRGN0_SHIFT) #define TCR_EPD0_SHIFT 7 -#define TCR_EPD0 (1UL << TCR_EPD0_SHIFT) +#define TCR_EPD0 (UL(1) << TCR_EPD0_SHIFT) /* Bit 6 is reserved */ #define TCR_T0SZ_SHIFT 0 -#define TCR_T0SZ_MASK (0x3fUL << TCR_T0SZ_SHIFT) +#define TCR_T0SZ_MASK (UL(0x3f) << TCR_T0SZ_SHIFT) #define TCR_T0SZ(x) ((x) << TCR_T0SZ_SHIFT) #define TCR_TxSZ(x) (TCR_T1SZ(x) | TCR_T0SZ(x)) From nobody Wed May 22 08:32:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0L0RQWz5LCxC; Wed, 22 May 2024 08:32: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 4Vkl0K5r5cz4jFf; Wed, 22 May 2024 08:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UC3mfCrndhCtCbqCUdvRohOxrdZa9exmQ1wOmW+tlI8=; b=pDQZoCRLjVynHoXkWCgh1Frp2r+TXWY6Yyu8ePJIbjo/KI9aAjz5AjOd9XCgePE8S8OnFs dW/WWP6BGhpyJUvz5zn6r6VMlBlH8cmeWVoi/I783F6QQ5TDb4XLBVZND7zvCXLGJlioM0 P3dz/y35CbN/EMN4/75WaPIIZCwx5Sxpv7fmnmrPTKNx6DNejq92vcJYOHEaLkGXQL6sQz xG9A/J3bxQfdk1KByAj06f7P1VPq+/WIVl/pYRkb2wSA6LVxx01gNG8uSGuui8Vlqb3Cj2 uo6VkmHtKiDxzx/fTgotCSnLp+oVp4Zfg2KCPgkAg/8kvTKpijUfP8IFsq6y8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366721; a=rsa-sha256; cv=none; b=uPX/sxh4x0Wna0jMRbd5SaTZI4ty1qrxWOzn4ItJEgdZlUMKXr2/xqoDrMsQ1lJ6GMWRZj 6AtMKBRb1Jd6CcNgI5KGSvUeAwLl6eefwNp6Zi1vccJ16pxSOBrseEqj4yQGgkc1p1yb42 f8CnofZV/QB+oEcp0GiNQDmN5KGTz1SnfiyIvomaaPGbbZhygVIZ1x04GupQMRYaBwP/S0 NxKTG0jFGc1VDr7QQQO1n6v2FGxzxbq/XYvw8htc9hk5gvZEp2OojtF+jUaEQAi50/llzJ 2JGGtF4OTBKqX/Hl2jkVbSVPuyvcJUKvVATpQd57c0R7//g3Ot/LMj8vUWpGug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UC3mfCrndhCtCbqCUdvRohOxrdZa9exmQ1wOmW+tlI8=; b=oNZJu8tA1PX38QlCzSMmr9/RZIiaA2+5WDsSi8MgSAFJGqVMAYsWlzER/ifipH+uuu7zg7 deDWN4BcW8BPwfIUbOzHnxOz4rV+14Hn06MAm8PPSWbJITprYxrOs2jQ516kIejo+xqtrw NO4UchC5lvdFYBuSVxOl+CrfB3ThNug+hPhEVoCP8QclcD8r6WQvlNLt8iZFmUPgCwpk06 6rsUcr0yq1+rpzSOT3c8DllaM/u7E1mWulPRbCIEG6ARrTDxE2zWAjPC7dwL8/TBty6Qb5 wwU75vcvWfTOBO/Q7RFY2YA9Ok6WqJxq4F9RjRq/foGUEXvp9mJDyKJKIc7/Pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0K5QWYzyRt; Wed, 22 May 2024 08:32:01 +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 44M8W1ru008924; Wed, 22 May 2024 08:32:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W1Qi008921; Wed, 22 May 2024 08:32:01 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:01 GMT Message-Id: <202405220832.44M8W1Qi008921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 57d714a23f5c - main - arm64: Add the pointer auth registers to armreg.h List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57d714a23f5ce21e389d53636b8bc6c1b45d518e Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=57d714a23f5ce21e389d53636b8bc6c1b45d518e commit 57d714a23f5ce21e389d53636b8bc6c1b45d518e Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:54 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:54 +0000 arm64: Add the pointer auth registers to armreg.h Add the pointer authentication registers to armreg.h. These will be used to support pointer authentication in a kernel built with GCC. Reviewed by: jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45262 --- sys/arm64/include/armreg.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 2af207a40009..7bdb28aad1e5 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -77,6 +77,86 @@ #define UL(x) UINT64_C(x) +/* APDAKeyHi_EL1 */ +#define APDAKeyHi_EL1_REG MRS_REG_ALT_NAME(APDAKeyHi_EL1) +#define APDAKeyHi_EL1_op0 3 +#define APDAKeyHi_EL1_op1 0 +#define APDAKeyHi_EL1_CRn 2 +#define APDAKeyHi_EL1_CRm 2 +#define APDAKeyHi_EL1_op2 1 + +/* APDAKeyLo_EL1 */ +#define APDAKeyLo_EL1_REG MRS_REG_ALT_NAME(APDAKeyLo_EL1) +#define APDAKeyLo_EL1_op0 3 +#define APDAKeyLo_EL1_op1 0 +#define APDAKeyLo_EL1_CRn 2 +#define APDAKeyLo_EL1_CRm 2 +#define APDAKeyLo_EL1_op2 0 + +/* APDBKeyHi_EL1 */ +#define APDBKeyHi_EL1_REG MRS_REG_ALT_NAME(APDBKeyHi_EL1) +#define APDBKeyHi_EL1_op0 3 +#define APDBKeyHi_EL1_op1 0 +#define APDBKeyHi_EL1_CRn 2 +#define APDBKeyHi_EL1_CRm 2 +#define APDBKeyHi_EL1_op2 3 + +/* APDBKeyLo_EL1 */ +#define APDBKeyLo_EL1_REG MRS_REG_ALT_NAME(APDBKeyLo_EL1) +#define APDBKeyLo_EL1_op0 3 +#define APDBKeyLo_EL1_op1 0 +#define APDBKeyLo_EL1_CRn 2 +#define APDBKeyLo_EL1_CRm 2 +#define APDBKeyLo_EL1_op2 2 + +/* APGAKeyHi_EL1 */ +#define APGAKeyHi_EL1_REG MRS_REG_ALT_NAME(APGAKeyHi_EL1) +#define APGAKeyHi_EL1_op0 3 +#define APGAKeyHi_EL1_op1 0 +#define APGAKeyHi_EL1_CRn 2 +#define APGAKeyHi_EL1_CRm 3 +#define APGAKeyHi_EL1_op2 1 + +/* APGAKeyLo_EL1 */ +#define APGAKeyLo_EL1_REG MRS_REG_ALT_NAME(APGAKeyLo_EL1) +#define APGAKeyLo_EL1_op0 3 +#define APGAKeyLo_EL1_op1 0 +#define APGAKeyLo_EL1_CRn 2 +#define APGAKeyLo_EL1_CRm 3 +#define APGAKeyLo_EL1_op2 0 + +/* APIAKeyHi_EL1 */ +#define APIAKeyHi_EL1_REG MRS_REG_ALT_NAME(APIAKeyHi_EL1) +#define APIAKeyHi_EL1_op0 3 +#define APIAKeyHi_EL1_op1 0 +#define APIAKeyHi_EL1_CRn 2 +#define APIAKeyHi_EL1_CRm 1 +#define APIAKeyHi_EL1_op2 1 + +/* APIAKeyLo_EL1 */ +#define APIAKeyLo_EL1_REG MRS_REG_ALT_NAME(APIAKeyLo_EL1) +#define APIAKeyLo_EL1_op0 3 +#define APIAKeyLo_EL1_op1 0 +#define APIAKeyLo_EL1_CRn 2 +#define APIAKeyLo_EL1_CRm 1 +#define APIAKeyLo_EL1_op2 0 + +/* APIBKeyHi_EL1 */ +#define APIBKeyHi_EL1_REG MRS_REG_ALT_NAME(APIBKeyHi_EL1) +#define APIBKeyHi_EL1_op0 3 +#define APIBKeyHi_EL1_op1 0 +#define APIBKeyHi_EL1_CRn 2 +#define APIBKeyHi_EL1_CRm 1 +#define APIBKeyHi_EL1_op2 3 + +/* APIBKeyLo_EL1 */ +#define APIBKeyLo_EL1_REG MRS_REG_ALT_NAME(APIBKeyLo_EL1) +#define APIBKeyLo_EL1_op0 3 +#define APIBKeyLo_EL1_op1 0 +#define APIBKeyLo_EL1_CRn 2 +#define APIBKeyLo_EL1_CRm 1 +#define APIBKeyLo_EL1_op2 2 + /* CCSIDR_EL1 - Cache Size ID Register */ #define CCSIDR_NumSets_MASK 0x0FFFE000 #define CCSIDR_NumSets64_MASK 0x00FFFFFF00000000 From nobody Wed May 22 08:32:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0M1Cjkz5LD9B; Wed, 22 May 2024 08:32: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 4Vkl0L6vklz4jCG; Wed, 22 May 2024 08:32:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vglw4Lkx3h4BXGuNSgZ20cdgkXZ3B+D73U6mV5/60nE=; b=OllF28Kd3ntJko+Se/mY5wXfkA+bXg0yJZWu43SnOKd25IYX0n47yeAUV3EEsebe6/mAIJ gma5aTWbWiaapRXzERd2XfOEBNB7UyWD1YJkdVC2D9rJ36YIFLSJTNOoZBW/0e3nl8HIjX zvkoZJd3UBWaGqmupNtQmqXJMPYjdV6qcY2bHZmI/5jT5Yov0kzzbjqDW6copuPWDhUZ/y hmhGzJUEcNTJq1hxUhwUxjFcf4GXFShenOTQ8f2v3feALMsv4jJ8y2XRa/S/f4op+lm6t8 W6vXzFMBT8puCcWYDWicpkEzLQOsvjCNIbAv8/yg9YfOZPRm3LvLwaHOpN38vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366723; a=rsa-sha256; cv=none; b=kExDVJ3Aj3UbRKdibJ9/5t26XL066h1tMRSFa4EKxwnhpqK6HLEiqOpTnt+QC7mLVjjnT6 eA2rxRiqF2gCgWSKR8wyp5pCoFDyHt27JzX7aR9nUG7J+8OJam/kQ3MYwQD2ILH4Ktzf9J HBsz2DpMxWzW3Or6jfTPOWXUbB/TkYCOJGG6EXSHxcLQuwEuvSGv1HpEAVK4AX8Q9Pf+Xj gq590m+9fMCs1PbsXQolDiELI5fmG0ALrAlOPoV3hxBIgIfH/1BUb/5YuzGu2HVo4Hu6Bo wSg2LnrFa1WU9j54kk8sqbPBjRiddZSkz5q0a2I/HyAle0kcHUTWdUcdTcQHrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vglw4Lkx3h4BXGuNSgZ20cdgkXZ3B+D73U6mV5/60nE=; b=nP2Z0BKhVXu4+nJ8/efOdQTrBSTDQCOZssY8u9AWd1tvSTRp3GEk5q27ahvQ7NSQKFdCRI WQqSvXQ82jk2buTPIq0yPA2kTq2LivEfCF1SihXUuWJPQsYoviVtJeUHrEhyx2vGMdva5t 2dDi6RhoaUSWe8ZCSN6XOhTOlCqouriWENDlq680Vfm624jBwhiCk3XLmYWtCifz//I6Nz QQ6Q6EiTcYrWFqArkRCJwPt5ZEPytFDFFX/YtoZizcd1m90uS2R9YLQEYdtAuLdPrq4ot9 G/hcch3nXcAsvZYtCHi+g4qt1EYMnsS9imnrXjcc6xBccxPqje/TXknlDkoEfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0L6T3WzyhZ; Wed, 22 May 2024 08:32: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 44M8W2bO008982; Wed, 22 May 2024 08:32:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W24M008979; Wed, 22 May 2024 08:32:02 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:02 GMT Message-Id: <202405220832.44M8W24M008979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 73c200447361 - main - arm64: Use the pointer auth register defines List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73c200447361a649e00cdb1693a0ae7f3291914e Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=73c200447361a649e00cdb1693a0ae7f3291914e commit 73c200447361a649e00cdb1693a0ae7f3291914e Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:06 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:06 +0000 arm64: Use the pointer auth register defines When building with gcc it complains the pointer authentication registers aren't valid with the architecture level we are targeting. Fix this by using the alternative spelling of these registers accesses through MRS_REG_ALT_NAME. Reviewed by: jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45263 --- sys/arm64/arm64/ptrauth.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/sys/arm64/arm64/ptrauth.c b/sys/arm64/arm64/ptrauth.c index 40f9c86d9468..b5f9fad1dc95 100644 --- a/sys/arm64/arm64/ptrauth.c +++ b/sys/arm64/arm64/ptrauth.c @@ -169,13 +169,11 @@ ptrauth_thread_alloc(struct thread *td) * Load the userspace keys. We can't use WRITE_SPECIALREG as we need * to set the architecture extension. */ -#define LOAD_KEY(space, name) \ -__asm __volatile( \ - ".arch_extension pauth \n" \ - "msr "#name"keylo_el1, %0 \n" \ - "msr "#name"keyhi_el1, %1 \n" \ - ".arch_extension nopauth \n" \ - :: "r"(td->td_md.md_ptrauth_##space.name.pa_key_lo), \ +#define LOAD_KEY(space, name, reg) \ +__asm __volatile( \ + "msr "__XSTRING(MRS_REG_ALT_NAME(reg ## KeyLo_EL1))", %0 \n" \ + "msr "__XSTRING(MRS_REG_ALT_NAME(reg ## KeyHi_EL1))", %1 \n" \ + :: "r"(td->td_md.md_ptrauth_##space.name.pa_key_lo), \ "r"(td->td_md.md_ptrauth_##space.name.pa_key_hi)) void @@ -187,7 +185,7 @@ ptrauth_thread0(struct thread *td) /* TODO: Generate a random number here */ memset(&td->td_md.md_ptrauth_kern, 0, sizeof(td->td_md.md_ptrauth_kern)); - LOAD_KEY(kern, apia); + LOAD_KEY(kern, apia, APIA); /* * No isb as this is called before ptrauth_start so can rely on * the instruction barrier there. @@ -240,8 +238,8 @@ ptrauth_mp_start(uint64_t cpu) __asm __volatile( ".arch_extension pauth \n" - "msr apiakeylo_el1, %0 \n" - "msr apiakeyhi_el1, %1 \n" + "msr "__XSTRING(APIAKeyLo_EL1_REG)", %0 \n" + "msr "__XSTRING(APIAKeyHi_EL1_REG)", %1 \n" ".arch_extension nopauth \n" :: "r"(start_key.pa_key_lo), "r"(start_key.pa_key_hi)); @@ -257,7 +255,7 @@ struct thread * ptrauth_switch(struct thread *td) { if (enable_ptrauth) { - LOAD_KEY(kern, apia); + LOAD_KEY(kern, apia, APIA); isb(); } @@ -271,7 +269,7 @@ ptrauth_exit_el0(struct thread *td) if (!enable_ptrauth) return; - LOAD_KEY(kern, apia); + LOAD_KEY(kern, apia, APIA); isb(); } @@ -282,11 +280,11 @@ ptrauth_enter_el0(struct thread *td) if (!enable_ptrauth) return; - LOAD_KEY(user, apia); - LOAD_KEY(user, apib); - LOAD_KEY(user, apda); - LOAD_KEY(user, apdb); - LOAD_KEY(user, apga); + LOAD_KEY(user, apia, APIA); + LOAD_KEY(user, apib, APIB); + LOAD_KEY(user, apda, APDA); + LOAD_KEY(user, apdb, APDB); + LOAD_KEY(user, apga, APGA); /* * No isb as this is called from the exception handler so can rely * on the eret instruction to be the needed context synchronizing event. From nobody Wed May 22 08:32:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0N2F1zz5LD5f; Wed, 22 May 2024 08:32:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0N0jSPz4jCS; Wed, 22 May 2024 08:32:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkzSw+sDMgZ9x3D2I7Bzg5r17YxDe59aj0cIyX1pUFM=; b=lFT+NyM3rVm5tNjgl8gXhe3s+5L/nAElYRwGcu4RSN7w7gqM0+9bt1RLASPv5+WapQ3YNY Bx6Y3bEYlksgrvJ7UF+47rGj/k8hqACHPU7dDg6wo/EcBG0BXNTTVoyVOtGKLn30Xxa7NL sLE1dBp+stod5pqLq7qykJfAhZGd5hYCb3fs6MceRHd6/si4mHP9HpP6fknhZjSBeKkjbI AkgKmmOyQPL4X4IrVq8IXNT6uKpf3EXXOi8iqyc8uo1kJutLYeL0cVN0bdonBbmet6uD16 +Z7bU7kNHkQFDKLT5urdmfIOcORq0maIWQaNQHZVSiJM8WZVHBQ5nfQvlIBAeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366724; a=rsa-sha256; cv=none; b=nwCGwRyC8PPoRsT9w7cZCu2nkEgVpZs3ySRxDDu0pu5Ztqo5WEyPnwvn85DVXIp5QHJ/Nc 27XNSO0TwRNJSlU+7Yo4g1gHhOkMqLJ7gC3n4dtL9HM+RgVTLauP3Fy96MM0W/wCe3fYjK CEzPC+1XL49shlkY79rYDXF98+G81HBniTb/og7L5PPMkS/VOpElAKkAj31B91igFmOzX0 3VySZtINY3BBP3VnbZqkIt1RvkjxkydtD6x0yo7mlMa2c4Rk/qt9aLmnqn+rXlIApy5Xa9 Zf58YUHoVP5g395NRNx1702OprPkmStamyxiehPENKNgdVJgIHu0JRP81QqrOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkzSw+sDMgZ9x3D2I7Bzg5r17YxDe59aj0cIyX1pUFM=; b=IZ2r0wVe9JQgrxFErU0Dz0eoFkBQ4M9A9eabXSqR6QGpYIfuAxsUw9Xuj5XSKSY/MATu8p N2LCGaP53TFIR6flIg+RL5wavTvUjo6xIhFHUHSUlAbNfU46mGMEgC3vAPxGl6gn4mBMgX HlVhK6SBMZeYP8D0kBMCwPnUmm1xI349MZfJFfYVcZ9sV2p38r4Dicn0UkneejXnswJjfv Qg3Wk6Cg+mSoOXSgKNFRLzeki6vKD6C62sEaHd8n7XrF4VJ9iuj8BorPGRA4A3y0ELSNpk VQDbFLhQA56PH+Dkmr/gHQTPDjx1nJDWeC+66PZ3RgVHh5cAEe6dDbGRjMAKFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0N0KD2zyG5; Wed, 22 May 2024 08:32:04 +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 44M8W3SB009027; Wed, 22 May 2024 08:32:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W37P009024; Wed, 22 May 2024 08:32:03 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:03 GMT Message-Id: <202405220832.44M8W37P009024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 4f012d7a7a47 - main - arm64/rockchip: Fix the build with GCC List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f012d7a7a473d2486f01ce355fd2c79c3d43db6 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4f012d7a7a473d2486f01ce355fd2c79c3d43db6 commit 4f012d7a7a473d2486f01ce355fd2c79c3d43db6 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:19 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:19 +0000 arm64/rockchip: Fix the build with GCC We were missing brackets in GPIO_FLAGS_PINCTRL. Without them GCC complains a use is ambiguous. Fix by adding the needed brackets. Reviewed by: manu, brooks, imp, jhb, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45264 --- sys/arm64/rockchip/rk_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 6a7ae95d4e8a..a86392f16624 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -76,7 +76,7 @@ enum gpio_regs { GPIO_INTR_EDGE_RISING | GPIO_INTR_EDGE_FALLING | \ GPIO_INTR_LEVEL_HIGH | GPIO_INTR_LEVEL_LOW) -#define GPIO_FLAGS_PINCTRL GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN +#define GPIO_FLAGS_PINCTRL (GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) #define RK_GPIO_MAX_PINS 32 struct pin_cached { From nobody Wed May 22 08:32:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0P40n3z5LD74; Wed, 22 May 2024 08:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0P1jNDz4jRk; Wed, 22 May 2024 08:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7MusWWA25168oYBIUukXisEZeDZTnZOCPrHUpYzY/s=; b=HcNQ4vNbKIDnbeVoV3H8Jql6e4YzFFY5A6pLksqOWvoCovyuFK1eGjJ5WjB0L4eTJ1iIsR E28haBCnvJfpqn0H62uOBUFIzsmffmQFhpbXIAGxatXVWAzLLxPV30oepliPSIKmT+K8Vr qohL+n4PpnYawA1fbLhOcrhVT07zjj+BgDUJP2XWUguPBeG/Kgvdzy6U+HAOx2avOA2T9p 3aEfH2yO+p91BRHLM5cVsc6SfiFpg3GejqBP68OyZU+paV4Y148Vd4Y84GmVcam/8mjo8X lvDfxEZR/GsW4sYb7D0XmCmxK9+yNLgFbo91HPiGtRMzDoM7VsSvjteBruRI5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366725; a=rsa-sha256; cv=none; b=HFM/huVUYmhQgIfbtOd/kiA/ZhbTOsWSY/p1GtT2VtW3eJIcHcD2g0GOYLVHFNP6xZiLFd kejIAXK/fLUhbRU4Bi7/tAwFZ7l1wKZMclERU1lOS66mdfE7KBxHNysIpji6OihJOzsS7G 0/pBxptaqi3Ijjpi46LBpNeUdVrlAMjE224RJiRvVLo+IAh06v0YLqpUl+1kMX1e1VKtcn 1nre51yQcMC/f6tNZm63d+bXVj1mRBsfSEMiCk3VM1t+NN0LA1h5oX6voMrIqUNt6EVRJe BuKqsMBUbFyD3Sge2QuE9vn0TxYS92SHBkj+mLIcRjgSz4jplgY5t7VQ8YzWug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7MusWWA25168oYBIUukXisEZeDZTnZOCPrHUpYzY/s=; b=HYA18HN8aLzbeNMa0FW93q23IZQLBMjNnzSytDFLLp0HZE4r81xPyGwW+jLfPvjghWhWV4 LXuaqndEArB8GriyzJhOmQOPcD1EEpduqmSCQh4z2g61VKNbr7JvNTnDW8AmOVYyw0EkGX 28MzBdMKt6oFqTqgqzIfAFDsN+QOTOLa3xVSdOJOQP/L+gZKKUqUyM65f1Y47q6+1toPAb Kcj6bx6iHP6A93gm5dqfcwc718EfRbxvlxcut+KLbtZpfvMOUdJwCnoEEzu0uIc7Zht92r lQaxGAcAvKCNJG+8g3HPL3fknzvSexGyomQPb8l709lKwefoDiq+Qd9Z0hXkNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0P1L8wzxkC; Wed, 22 May 2024 08:32:05 +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 44M8W5w1009070; Wed, 22 May 2024 08:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W5Ti009067; Wed, 22 May 2024 08:32:05 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:05 GMT Message-Id: <202405220832.44M8W5Ti009067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: f55e866488ba - main - pci: Fix pci_host_generic_acpi with gcc List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f55e866488ba2d8bb5b79659ee84bec1fe7808fb Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f55e866488ba2d8bb5b79659ee84bec1fe7808fb commit f55e866488ba2d8bb5b79659ee84bec1fe7808fb Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:38 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:38 +0000 pci: Fix pci_host_generic_acpi with gcc In pci_host_generic_acpi.c we loop over pci_acpi_quirks to check if we need to handle any quirks. GCC doesn't like the terminatin as it sets a fixed width string to 0. As this the array is only ever used in this file change to use nitems to find when to stop the loop. Reviewed by: brooks, imp, jhb, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45265 --- sys/dev/pci/pci_host_generic_acpi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/pci_host_generic_acpi.c b/sys/dev/pci/pci_host_generic_acpi.c index 2191ec4d655a..0cd17d5f5555 100644 --- a/sys/dev/pci/pci_host_generic_acpi.c +++ b/sys/dev/pci/pci_host_generic_acpi.c @@ -99,7 +99,6 @@ static struct { { "MVEBU ", "CN9130 ", PCIE_ECAM_DESIGNWARE_QUIRK }, { "MVEBU ", "CN9131 ", PCIE_ECAM_DESIGNWARE_QUIRK }, { "MVEBU ", "CN9132 ", PCIE_ECAM_DESIGNWARE_QUIRK }, - { 0 }, }; /* Forward prototypes */ @@ -202,9 +201,9 @@ static void pci_host_acpi_get_oem_quirks(struct generic_pcie_acpi_softc *sc, ACPI_TABLE_HEADER *hdr) { - int i; + size_t i; - for (i = 0; pci_acpi_quirks[i].quirks; i++) { + for (i = 0; i < nitems(pci_acpi_quirks); i++) { if (memcmp(hdr->OemId, pci_acpi_quirks[i].oem_id, ACPI_OEM_ID_SIZE) != 0) continue; From nobody Wed May 22 08:32:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0Q4HKcz5LDSc; Wed, 22 May 2024 08:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0Q2lCsz4jWy; Wed, 22 May 2024 08:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3T5T/SgZVshoWTpIJZtltUbZ60NtpDUolDWVUHhY9A=; b=V7WbIpAb8sdxm54sml5F6UkpZqPu9J+F9NnwZatlLhqPKzcla2DypZFBLis2fEXvs2tm3D b8NCO1+0MehEuZDh/M7eg0DMxHTlQiRo0QvL19xzmdXFWjy2kSJdKTf+IIe5WshSINEuzr KzYTZUF7N0cvXefMO3L4jpI2mUMrTQo+9iAHshjFAiMw2Nv/6dBf8mjXMPkfWe7u0qlK5g ljLubknE+0DG4diSPGY2MMbdh+QEZyaIn+NtGKuHVeP2agAUpRReKSj+KUa2V+ZPG9K/QD HXi0+RPPELNBrolJjyUJdEtOWn1Sa+XiLGjMKSuGazjwri7vlqsoiAsmJp9KRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366726; a=rsa-sha256; cv=none; b=m7WtnRaFd2NKeaPQ5nADBDcBYB3osQLNi5VsxzeHJ6aMzdMncMk0Ycsr4sDzEFHsDwGIYC Rbk28Weo0Uqw7JS+kiFb9xrWMJFWzjyxLp+633hCjIVMkp04Log0S2e4dGb+SnAwy8jTUt RMUq2DcUJC3a0I8q7Dirik5eTL98XIBP6XJQJUQaUDbj57VKajbyVAJhKdkJgiqNwel/CW Q/IgYoK07C6NhfIbOyael60j2HvEmYSnN5S8r9MID3I5IGlTmYglJWW19j98SFeQEz0i0Q QmLFKQlUVp9G5KFjKJfxRf44nBdXp0dgYlXRcCHiyOIkaBPZ803R5rQaALVMOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3T5T/SgZVshoWTpIJZtltUbZ60NtpDUolDWVUHhY9A=; b=imGW+zeVnUXWBViYtDVAO3atp5tHYOcHpE+T9u/Bnb06dHyXIqlDNXNG0keBUYBooK1mks Uyh3HwvMNfjM+6PEvx7HHQKxMHvVS5olqshpbuz6IavAXMThT3msUOiLkpg3/1v2AnVA5A ApFjCD/IvSbBlWpemhfizmbDezcS7Q57F0igUMyAlGqDudguvEyV6i9USxXRzBC4oGG8/4 5lnqVvZ48rUL/bT7ElBNF7Xiq2eZNvOGzej+DUkDWP4vRcHLSzHZcPEJypbWolWb1ykLR/ Ngyqkk44jDubdmSfqvHODvjNpVP6ChlbKbwYLLwflizjHfSfNiI26LuDfzTe7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0Q2MP1zyG7; Wed, 22 May 2024 08:32:06 +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 44M8W6fT009115; Wed, 22 May 2024 08:32:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W6G5009112; Wed, 22 May 2024 08:32:06 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:06 GMT Message-Id: <202405220832.44M8W6G5009112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 131c1718c633 - main - dev/hwpmc: Fix the dmc620 MD4 macro List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 131c1718c6331e87f139b42b4ad0e57b6a71ea44 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=131c1718c6331e87f139b42b4ad0e57b6a71ea44 commit 131c1718c6331e87f139b42b4ad0e57b6a71ea44 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:49 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:49 +0000 dev/hwpmc: Fix the dmc620 MD4 macro Add braces to the dmc620 MD4 macro to fix the GCC build. Reviewed by: brooks, imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45266 --- sys/dev/hwpmc/pmu_dmc620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/pmu_dmc620.c b/sys/dev/hwpmc/pmu_dmc620.c index 42e5dfdbf154..c33e5264f7de 100644 --- a/sys/dev/hwpmc/pmu_dmc620.c +++ b/sys/dev/hwpmc/pmu_dmc620.c @@ -68,7 +68,7 @@ struct pmu_dmc620_softc { #define RD4(sc, r) bus_read_4((sc)->sc_res[0], (r)) #define WR4(sc, r, v) bus_write_4((sc)->sc_res[0], (r), (v)) -#define MD4(sc, r, c, s) WR4((sc), (r), RD4((sc), (r)) & ~(c) | (s)) +#define MD4(sc, r, c, s) WR4((sc), (r), (RD4((sc), (r)) & ~(c)) | (s)) #define CD2MD4(sc, u, r, c, s) MD4((sc), DMC620_CLKDIV2_REG((u), (r)), (c), (s)) #define CMD4(sc, u, r, c, s) MD4((sc), DMC620_CLK_REG((u), (r)), (c), (s)) From nobody Wed May 22 08:32:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0R6CWgz5LDG6; Wed, 22 May 2024 08:32: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 4Vkl0R3r3mz4jJn; Wed, 22 May 2024 08:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gNh/uno41hhGPE7GnddiFK92Yd98I7R5lYZYo5Dkxc=; b=f7eZw8VRwptshIjU1NDD10LSE0i+pfzx+EnnYZfutFUyBGROTBUWqfpsXeMDKHU+KkWJjm ix/SRwK+8ypWF0slYtilPkDfskJ3qPbunkrIK6SnH9gsSCSA3ApYaHfc41yE2eO6ueN5M5 lmvkLScTtwWgBm70xRUX4LKKla5fTicOJdu0IuDXI6lIBvkH3/No3nsklMw+sdOKvorzsp k/telwLc6GGfrTKsKvJoske3k/vQhkz0HZ0LoSSkU7jqOWZwZ5/S2i507gFQ2cfHO4Ryx7 IrSuGs3l2FJd2lnDpiaoPT4QYwu72mdbJL24rmlEnTYOsKtgTeSy/ZTDMonGWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366727; a=rsa-sha256; cv=none; b=JmJ8M+YQotL8ZxAMMSg5Tecm+2qPUUDNo198+1MeStsRo/s8qoxDPlhAI4OmJhKOi/3d+B v6af5ex+XTEUnmQha1INhqsSDLy4Dw/gOzt5wiTh9im5IxtxSgsJ6FklkFG7ZvMAnYfEU9 wpjJMzgfQJH+xiMNeOU5lqAgD5xoNAjs0+xGJlBnDLWf0n7vH/Wz96Le0EhdCyjdcT1PFq 12NWcexb3kF6fzA7uWmDe0p7NDCR68sGzKudYGQV0AiiUN9wPAKw9/7RnaQ6kr23Rbw1eM E2eRz97ayWeHS0uYJYLg7FDFaEGaO8nb5pfkO9SBht28vudX9auRXbGREH7SJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gNh/uno41hhGPE7GnddiFK92Yd98I7R5lYZYo5Dkxc=; b=PzMs0BZbh4oGCrUFksRvoCL8+Gl5as6QxJ+NfdH1R7ZCC5uh99ogDL9wEtDrQk4p0Z0CaX 3zrVG08/8M2Nw9tt1QspE9FZCsfwxdtW7RAscPGgkLujyeK1KnfiwjlDfIELkm2QogHqZF EHhcUjq6c3PKBNxUXzLtdLuIqoXroDALnBuECLrpy851rElSFiywV5NhZdJc9YuWZ+z6O3 3zYHUgZ2D/jQ1TfP9vvC3FvbZS51MacwcngTabYIOAEWyBFVDyXhTWH4txtim6XK5N3o3g advJ+TCI7RpIFzcr3cM05MPFQPrgo0bd4iHHJl5GLoCgb0sDil72OySkUWDVSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkl0R3SVmzxZk; Wed, 22 May 2024 08:32: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 44M8W7ei009163; Wed, 22 May 2024 08:32:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W7iK009160; Wed, 22 May 2024 08:32:07 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:07 GMT Message-Id: <202405220832.44M8W7iK009160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: c2628accc029 - main - sys: Build arm64 per-thread SSP with GCC List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2628accc029a07eb8ff73b6df7f7d6af194ca2d Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c2628accc029a07eb8ff73b6df7f7d6af194ca2d commit c2628accc029a07eb8ff73b6df7f7d6af194ca2d Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:20:01 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:20:01 +0000 sys: Build arm64 per-thread SSP with GCC It has been supported since GCC 9. It is unlikely anything older than that will build the kernel so mark it as supported by GCC. Reviewed by: brooks, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45267 --- sys/conf/Makefile.arm64 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 1505b6c2a45b..52f0f9052db3 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -30,7 +30,8 @@ CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" PERTHREAD_SSP_ENABLED!= grep PERTHREAD_SSP opt_global.h || true ; echo .if !empty(PERTHREAD_SSP_ENABLED) -. if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 +. if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000) || \ + ${COMPILER_TYPE} == "gcc" ARM64_SSP_CFLAGS = -mstack-protector-guard=sysreg ARM64_SSP_CFLAGS += -mstack-protector-guard-reg=sp_el0 ARM64_SSP_CFLAGS += -mstack-protector-guard-offset=0 From nobody Wed May 22 09:08:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vklpk4VHHz5LHR4; Wed, 22 May 2024 09:08: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 4Vklpk3tvlz4qPQ; Wed, 22 May 2024 09:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716368926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvez3tj17B7FaJO3nWhQdZ6pCoNYGiA3ZjI1svDuRYs=; b=K2seFYQlBfeYffUIpbb2jOB4h11D9TM1ChooE7gMSXg13RclAUDaY45iDdtJ/umq+DeFG0 Talc20Rb+IrcITutLzRZFhvjabHXS0gK06y/ZuQzljkkqmY1mTcUMuB5tL7Sq3q+TXQMRB m12EeB2QIrPsxLws1C++4vK+MB/hMEXpHa/RV+rgzCWsmMsWAFrS+xlDgjABIcoTRyI3xX AtY74Ogp25Frq8MmsW0PWGlae37X+62F9RnSorBuTAfKfbPA1W8ly4H3pZPCkU8mzHXH0A W3qHbn01V/4MwJ3g6Ja7yaf92Amlf+wD0BIaQMrZAGm8BIPwyP4KFkRIAAeeuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716368926; a=rsa-sha256; cv=none; b=KX/rhTAn0WzLqUolV9ic3qJy3MAPSYvIj5krK2tlEnC2wJ1bfzTh8gS4LtN3uWDsdhHFF+ nFb/S0qbQEbkRYWa8r9XrMSm6wYzPgL8ZXn71FBtzfagom5CbIRuzPbB4QYp+G5xLULwz0 fy5KlHb6lqZGjS0U/8DkkO7/G+dkj9fIibceGUfznIP50ldPFvOJFccRQoX/vTmhwPn7/V wUsYn8Qh0vE6TBOwJoY8Fc8aXdCLv2SgMMqWOfeeLkTGFJ3Scf0M4e5P1H5Raa5aTUwe6c isbVPfDeaYW+l3ecmvIaOb0JPzVjJeskcMaKntiymI4i7y+twhzBKZjQhtQ4hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716368926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvez3tj17B7FaJO3nWhQdZ6pCoNYGiA3ZjI1svDuRYs=; b=tqmBWAqSffftj91Xm+FB7RuEuIwnKGsayD1QXt1W4urQZoTYV9pawxOkGmm7R+vhKn8YJA cdY2u1+6H+m6IBs8L6MSjKHpmvFnE1vSUUaorDg5GNhStoKwuyUb9MhuyE267+qwa9WgvY deAbWmaFMmuXYWaF6kn7IxyY0H8/Kxw1gfTDDUsXsisNOo9CCKPtqZpncrw6bh8/KiFaxQ b/x3cQplgjmLIYVnCz5hVMdO8ZRcHkFkQ216H87GjSH9rj6OQ7hnDWcGzmSk4b7+SQBKXh AlTJZSE6pAeCCyOgO6RUwd3OOqGuJEuo0CHHRiwdLIsbukdCwJojXfvfROhCBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vklpk33fWz101J; Wed, 22 May 2024 09:08: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 44M98kIr062350; Wed, 22 May 2024 09:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M98kar062347; Wed, 22 May 2024 09:08:46 GMT (envelope-from git) Date: Wed, 22 May 2024 09:08:46 GMT Message-Id: <202405220908.44M98kar062347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev <dsl@FreeBSD.org> Subject: git: ac4ddc467bfe - main - arm64: Fixed IOMMU compilation errors List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d Auto-Submitted: auto-generated The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d commit ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d Author: Dmitry Salychev <dsl@FreeBSD.org> AuthorDate: 2024-05-21 20:25:59 +0000 Commit: Dmitry Salychev <dsl@FreeBSD.org> CommitDate: 2024-05-22 09:08:00 +0000 arm64: Fixed IOMMU compilation errors These are missing changes after 1228b93b410a when ref_count was removed from bus_dma_tag_common and 1e3f42b6bad5, when the address arguments were switched to pointers. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45289 --- sys/arm64/conf/NOTES | 4 +++- sys/arm64/iommu/iommu.c | 1 - sys/arm64/iommu/iommu_pmap.c | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index 3e8499c872b9..cc713db86538 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -240,6 +240,8 @@ nooptions COMPAT_FREEBSD10 # arm64 supports 32-bit FreeBSD/arm binaries (armv[67] ABIs) options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm +options IOMMU # ARM64 SMMU/IOMMU + ##################################################################### # ZFS support @@ -250,4 +252,4 @@ options ZFS # device iichid # HID-over-I2C support options IICHID_DEBUG # Enable HID-over-I2C debug messages -options IICHID_SAMPLING # Workaround missing GPIO INTR support +options IICHID_SAMPLING # Workaround missing GPIO INTR support \ No newline at end of file diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index cb2b86c9dc41..b765763e3a60 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -172,7 +172,6 @@ iommu_tag_init(struct iommu_domain *iodom, struct bus_dma_tag_iommu *t) maxaddr = MIN(iodom->end, BUS_SPACE_MAXADDR); - t->common.ref_count = 0; t->common.impl = &bus_dma_iommu_impl; t->common.alignment = 1; t->common.boundary = 0; diff --git a/sys/arm64/iommu/iommu_pmap.c b/sys/arm64/iommu/iommu_pmap.c index d356a92c4d66..8a0ea641e231 100644 --- a/sys/arm64/iommu/iommu_pmap.c +++ b/sys/arm64/iommu/iommu_pmap.c @@ -632,8 +632,8 @@ retry: l1p = smmu_pmap_l1(pmap, va); l2p = smmu_pmap_l2(pmap, va); - cpu_dcache_wb_range((vm_offset_t)l1p, sizeof(pd_entry_t)); - cpu_dcache_wb_range((vm_offset_t)l2p, sizeof(pd_entry_t)); + cpu_dcache_wb_range(l1p, sizeof(pd_entry_t)); + cpu_dcache_wb_range(l2p, sizeof(pd_entry_t)); goto retry; } @@ -644,7 +644,7 @@ retry: /* New mapping */ smmu_pmap_store(l3, new_l3); - cpu_dcache_wb_range((vm_offset_t)l3, sizeof(pt_entry_t)); + cpu_dcache_wb_range(l3, sizeof(pt_entry_t)); smmu_pmap_resident_count_inc(pmap, 1); dsb(ishst); @@ -681,7 +681,7 @@ pmap_gpu_remove(struct smmu_pmap *pmap, vm_offset_t va) smmu_pmap_resident_count_dec(pmap, 1); smmu_pmap_clear(pte); - cpu_dcache_wb_range((vm_offset_t)pte, sizeof(pt_entry_t)); + cpu_dcache_wb_range(pte, sizeof(pt_entry_t)); rc = KERN_SUCCESS; out: From nobody Wed May 22 10:36:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vknng0TsYz5LRg8; Wed, 22 May 2024 10:37:59 +0000 (UTC) (envelope-from dsl@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vknnf74dcz4xYt; Wed, 22 May 2024 10:37:58 +0000 (UTC) (envelope-from dsl@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716374279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EBkOcq3mRcu/zQ2HrUhi5pMKMi9K6abTiRmyZ2zb2lM=; b=chqgKM4w93FYkK+4Z8WniyNz1EGUrSAHnSdqCfQlgyfErdK3mKD642bK1iH8usAWW8/wSt u/lppQZj+3+Lr4yJgOu1LADcra60l7QJSW829EC4NQP9tm62nPOxy23S1y5lDR8dqrWUza STOps8/VhASgGtUBZssnZ8IqLFBKOqIT92ZX/gI0zLsIsMREgswhfiV978RGqVOl8Oyca+ MrwROV2wC+Gr3EJt/HwEDlQPJfadg5CQkl6Eu5S9iVgJJnGY6tVzRo+NFw11WjuBHjbi7Y jBuwQj7KBJanjVdi5T4L4euKgJSDQKVbaFhl1HaTgYudyf/hDL9+R1mnjx5AaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716374279; a=rsa-sha256; cv=none; b=bdFCfxutCXJzOKjNh5RKOjWgMxrsmALr1vJHOwacBGKw1C+0LulSRvviWxCmvXtIwePFZ/ v9xgEirVFf7vJ1eQkz0Osc+l1w1Fs4lTiqX7b5grStnO9GhSKCs5PLNWfujymkQeMimd2q dV3z3/cLcUNx/oyXUBGD2rfO0C/eZtvMCrfusuxZrHN1kb/ooFDqNZEgCaYJDJJjNQp8aa /+A+MLPvh6svYB8ITNpeYiXO+FTjJtr1FG4iiie5kJeivQHr9Etf8PG7EBmXenrpsUwCzM IQUiZOvWxc1yEt3oSR6mEsYaOCaWGld6VFtkYLlEhCQrvaokzw9rKw3E3rpzXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716374279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EBkOcq3mRcu/zQ2HrUhi5pMKMi9K6abTiRmyZ2zb2lM=; b=liOQs7/ywljmlOAf3sY2CDOnURdCJ8aYkbCwP4iIQzgiZ+WSNYkuS04gM4Y+HZONCCXk3V HEN68UOwSpqOVbsFEORLtilI+GgEKmjncXSPSpxcouKdvL9gkxn1LSydoDm4AP+RwfcSX8 ++NOAi4cWqQ92a3Sm5b0H/qFNFo+iW5ONw/OhZLB/RPuKAXY4Lh0ME9Rvug19XJONJyb2C gVES2F+wi+HeYgKU/V4FnsSXKrXj2xbky2hw5Krd/+kYCYWlXaWYEi3B6wpY3HiJ847I9X N19BuwBbh2AbdTutTFv0vtNFNFwQOspJQI48Z+hscuWgeXm1khJk226SIHMw4w== Received: from localhost (unknown [91.226.51.235]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: dsl) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vknnf4dr6zfcv; Wed, 22 May 2024 10:37:58 +0000 (UTC) (envelope-from dsl@FreeBSD.org) References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> User-agent: mu4e 1.8.13; emacs 29.3 From: Dmitry Salychev <dsl@FreeBSD.org> To: Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Date: Wed, 22 May 2024 12:36:31 +0200 In-reply-to: <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> Message-ID: <86r0dugmik.fsf@peasant.tower.home> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain Lexi Winter <lexi@le-fay.org> writes: > [[PGP Signed Part:Undecided]] > Mariusz Zaborski: >> The branch main has been updated by oshogbo: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd >> >> commit 408957613bc065c4444812c3ae276ace03697ebd >> Author: Mariusz Zaborski <oshogbo@FreeBSD.org> >> AuthorDate: 2024-05-21 20:02:50 +0000 >> Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> >> CommitDate: 2024-05-21 20:03:20 +0000 >> >> Regen >> --- >> sys/compat/freebsd32/freebsd32_sysent.c | 2 +- >> sys/kern/init_sysent.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) > > i'm sorry if this is considered accepted practice in FreeBSD (i'm not a > committer) but could i please request more useful commit messages than > "Regen" for things like this? > > when looking through 'git log', especially 'git log --format=oneline', > it's really not clear what this commit actually does, meaning if i'm > looking through the log for commits related to a problem i'm having, i > have to examine commits like this by hand to see if they're related. > > it would save me (and other people, i suppose) a lot of time if the > commit message could at least mention what it's touching, e.g. "Regen > sys/compat/freebsd32/freebsd32_sysent.c". > > [[End of PGP Signed Part]] Looks like it slipped in by mistake. I expected it to be reverted and re-worded. Regards, Dmitry -- https://wiki.freebsd.org/DmitrySalychev From nobody Wed May 22 11:13:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkpZc5fNNz5LVSh; Wed, 22 May 2024 11:13:28 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkpZc3F7Nz52Sm; Wed, 22 May 2024 11:13:28 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3c9bcd57524so515449b6e.3; Wed, 22 May 2024 04:13:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716376406; x=1716981206; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cgjujC0UUJyh4d7FaanX51+b5g0HzJXF7FhfPoAGurU=; b=AyLioozYilUqcUwvyjJQIlVd8VOumGieoD+VmIeUkCAjm1zIsUiqk+z2+zQ/c8WOsM tTBDPd5MmMcsOpR7UYKP2D175K3/FHs0s8XNiRAIW/XfSVH4Akmd5ohemSN6ve/d6Qrf hKlzo8pS+PlDnWq/rMr1LyISopwax7iz6y9mTFnvvfRH7PZOP5sCjr0lwTOVwsZoIIMR 4CbooQqipZ+mnep4aE4Jtp3kwCevxiNIJSHjx7EgX0sWYqsgtlswTOmG9bFvKYMc2bPC E8QhEchI/Jc0KInsw0gmhsTqAOWSQ3YCE9BxKZ77/mYik5OHohIes+Px83dokZuuQ/pM THDw== X-Forwarded-Encrypted: i=1; AJvYcCVPHzy/0/Pkx3xy78/oLlmpWfnEslWgrMQnAWfq0VjQEMNSZY6Osw450ZPziU457MIS6OqIsvIEVkq2vmm9Zv+DNVdsqxLfdl/jmcfvCLQHJQjpHs4oOcPfxUgUg0HFenR44Bpjc/yPsM8SU3zMReQM36blMZLyipVsc9hlwZ5tSWeOzg8VWNxcvZFNmgM= X-Gm-Message-State: AOJu0Yx4DqMnsRj7H3YRjQRQHu5ltQk1wjpsJx7WFVVEnYEMuPrQiMNW WKkSX/3t36Yxyhjcw3V7WiYXXbbF23AH8wo8dM80THeoewSg4oFfdCWOA3LTQjw+dKfA+LC/2hr B4OwlWDF8vl/brO5vf+3J7XAba4GS7ypbDpfhng== X-Google-Smtp-Source: AGHT+IFFHzGAK4QkLstG/7W+PH1xrygUSLOaBvdC0sEFl1/jNxXchnxsQRUR7WbpgWNdxfxvOpAvUCD+DqsY93uFFtU= X-Received: by 2002:a05:6871:58a:b0:23b:3428:725a with SMTP id 586e51a60fabf-24c68b66638mr1998173fac.1.1716376406389; Wed, 22 May 2024 04:13:26 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <86r0dugmik.fsf@peasant.tower.home> In-Reply-To: <86r0dugmik.fsf@peasant.tower.home> From: Mariusz Zaborski <oshogbo@freebsd.org> Date: Wed, 22 May 2024 13:13:15 +0200 Message-ID: <CAGOYWV8SUDtSisWiyYqO=8N4_eyJ-Gr=Wj8_BdFcjHHwj3hu3w@mail.gmail.com> Subject: Re: git: 408957613bc0 - main - Regen To: Dmitry Salychev <dsl@freebsd.org> Cc: Lexi Winter <lexi@le-fay.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000000fe260619090601" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4VkpZc3F7Nz52Sm --00000000000000fe260619090601 Content-Type: text/plain; charset="UTF-8" Hello, Not really as a mistake :) The files in question have many such commits (not only committed by me). So I have assumed this is a common practice. I'm happy to provide more details next time. However, I don't plan to revert it at this point as it seems pointless to complicate the log even more. For freebsd32: e90259af59a1 regen 38bfddf597b1 regen 7893419d492c Remove never implemented sbrk and sstk syscalls 30cdbb5833f6 freebsd32: Remove mac_syscall from the unimpl list af93fea71038 timerfd: Move implementation from linux compat to sys/kern c7df87209634 Regen 9121945d7003 Regenerate sysent stuff after $FreeBSD$ removal 7b42f338d7a3 freebsd32: Regen 11cdffc60325 Regen 6a0a634590e4 Regen f99cc5a38947 sysent: regen after 52a1d90c8bfe, posix_fadvise in capmode 8601fca7895c sysent: regen for syscallarg_t 0910a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments" 3889fb8af0b6 sysent: regen for syscallarg_t b7c55487ff2f Regen 5c1835b1d4b5 syscalls: regen 7fb006e7d61e syscalls: regen c2996f8ad930 syscalls: regen 30bc335a0501 freebsd32: regen 97fdcfcaf799 freebsd32: remove unnecessicary headers bcd07aaa4ebd freebsd32: regen 8460d3e9e6cb freebsd32: regen And for freebsd 408957613bc0 (HEAD -> main, origin/main, origin/HEAD) Regen 663838451ec6 syscalls: regen 38bfddf597b1 regen 7893419d492c Remove never implemented sbrk and sstk syscalls af93fea71038 timerfd: Move implementation from linux compat to sys/kern c7df87209634 Regen 9121945d7003 Regenerate sysent stuff after $FreeBSD$ removal 9abba78acc2a syscalls: regenerate 11cdffc60325 Regen 6a0a634590e4 Regen f99cc5a38947 sysent: regen after 52a1d90c8bfe, posix_fadvise in capmode 8601fca7895c sysent: regen for syscallarg_t 0910a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments" 3889fb8af0b6 sysent: regen for syscallarg_t b7c55487ff2f Regen 5c1835b1d4b5 syscalls: regen 7fb006e7d61e syscalls: regen c2996f8ad930 syscalls: regen e58e9a8cbd7c syscalls: regen 439c3d95638a Regen da9fe3529b3d Regen after 0dc332bff200 273728b1257f Regen 2c9764f36b6f regen syscall files after d51198d63b63 d89c1c461ce3 Reserve gaps in syscall numbers for local use 65a524b499ae Remove documentation of unimplemented syscalls 20321e622515 Regenerate syscall files after reallocation of aio_writev/aio_readv 1868a91fac5e Regenerate syscall files after addition of aio_writev/aio_readv 9dd48b87e6ca Regen. 0c5bd5f99320 Regen after r366145. Thanks, Mariusz On Wed, 22 May 2024 at 12:37, Dmitry Salychev <dsl@freebsd.org> wrote: > > Lexi Winter <lexi@le-fay.org> writes: > > > [[PGP Signed Part:Undecided]] > > Mariusz Zaborski: > >> The branch main has been updated by oshogbo: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd > >> > >> commit 408957613bc065c4444812c3ae276ace03697ebd > >> Author: Mariusz Zaborski <oshogbo@FreeBSD.org> > >> AuthorDate: 2024-05-21 20:02:50 +0000 > >> Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> > >> CommitDate: 2024-05-21 20:03:20 +0000 > >> > >> Regen > >> --- > >> sys/compat/freebsd32/freebsd32_sysent.c | 2 +- > >> sys/kern/init_sysent.c | 2 +- > >> 2 files changed, 2 insertions(+), 2 deletions(-) > > > > i'm sorry if this is considered accepted practice in FreeBSD (i'm not a > > committer) but could i please request more useful commit messages than > > "Regen" for things like this? > > > > when looking through 'git log', especially 'git log --format=oneline', > > it's really not clear what this commit actually does, meaning if i'm > > looking through the log for commits related to a problem i'm having, i > > have to examine commits like this by hand to see if they're related. > > > > it would save me (and other people, i suppose) a lot of time if the > > commit message could at least mention what it's touching, e.g. "Regen > > sys/compat/freebsd32/freebsd32_sysent.c". > > > > [[End of PGP Signed Part]] > > Looks like it slipped in by mistake. I expected it to be reverted and > re-worded. > > Regards, > Dmitry > > -- > https://wiki.freebsd.org/DmitrySalychev > --00000000000000fe260619090601 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hello,<br><br>Not really as a mistake :) The files in ques= tion have many such commits (not only committed by me). So I have assumed t= his is a common practice.<br>I'm happy to provide more details next tim= e. However, I don't plan to revert it at this point as it seems pointle= ss to complicate the log even more.<br><br>For freebsd32:<br>e90259af59a1 r= egen<br>38bfddf597b1 regen<br>7893419d492c Remove never implemented sbrk an= d sstk syscalls<br>30cdbb5833f6 freebsd32: Remove mac_syscall from the unim= pl list<br>af93fea71038 timerfd: Move implementation from linux compat to s= ys/kern<br>c7df87209634 Regen<br>9121945d7003 Regenerate sysent stuff after= $FreeBSD$ removal<br>7b42f338d7a3 freebsd32: Regen<br>11cdffc60325 Regen<b= r>6a0a634590e4 Regen<br>f99cc5a38947 sysent: regen after 52a1d90c8bfe, posi= x_fadvise in capmode<br>8601fca7895c sysent: regen for syscallarg_t<br>0910= a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments&qu= ot;<br>3889fb8af0b6 sysent: regen for syscallarg_t<br>b7c55487ff2f Regen<br= >5c1835b1d4b5 syscalls: regen<br>7fb006e7d61e syscalls: regen<br>c2996f8ad9= 30 syscalls: regen<br>30bc335a0501 freebsd32: regen<br>97fdcfcaf799 freebsd= 32: remove unnecessicary headers<br>bcd07aaa4ebd freebsd32: regen<br>8460d3= e9e6cb freebsd32: regen<br><br>And for freebsd<br>408957613bc0 (HEAD -> = main, origin/main, origin/HEAD) Regen<br>663838451ec6 syscalls: regen<br>38= bfddf597b1 regen<br>7893419d492c Remove never implemented sbrk and sstk sys= calls<br>af93fea71038 timerfd: Move implementation from linux compat to sys= /kern<br>c7df87209634 Regen<br>9121945d7003 Regenerate sysent stuff after $= FreeBSD$ removal<br>9abba78acc2a syscalls: regenerate<br>11cdffc60325 Regen= <br>6a0a634590e4 Regen<br>f99cc5a38947 sysent: regen after 52a1d90c8bfe, po= six_fadvise in capmode<br>8601fca7895c sysent: regen for syscallarg_t<br>09= 10a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments&= quot;<br>3889fb8af0b6 sysent: regen for syscallarg_t<br>b7c55487ff2f Regen<= br>5c1835b1d4b5 syscalls: regen<br>7fb006e7d61e syscalls: regen<br>c2996f8a= d930 syscalls: regen<br>e58e9a8cbd7c syscalls: regen<br>439c3d95638a Regen<= br>da9fe3529b3d Regen after 0dc332bff200<br>273728b1257f Regen<br>2c9764f36= b6f regen syscall files after d51198d63b63<br>d89c1c461ce3 Reserve gaps in = syscall numbers for local use<br>65a524b499ae Remove documentation of unimp= lemented syscalls<br>20321e622515 Regenerate syscall files after reallocati= on of aio_writev/aio_readv<br>1868a91fac5e Regenerate syscall files after a= ddition of aio_writev/aio_readv<br>9dd48b87e6ca Regen.<br>0c5bd5f99320 Rege= n after r366145.<br><br>Thanks,<br>Mariusz</div><br><div class=3D"gmail_quo= te"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 22 May 2024 at 12:37, Dmi= try Salychev <<a href=3D"mailto:dsl@freebsd.org">dsl@freebsd.org</a>>= wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br> Lexi Winter <<a href=3D"mailto:lexi@le-fay.org" target=3D"_blank">lexi@l= e-fay.org</a>> writes:<br> <br> > [[PGP Signed Part:Undecided]]<br> > Mariusz Zaborski:<br> >> The branch main has been updated by oshogbo:<br> >> <br> >> URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D40895761= 3bc065c4444812c3ae276ace03697ebd" rel=3D"noreferrer" target=3D"_blank">http= s://cgit.FreeBSD.org/src/commit/?id=3D408957613bc065c4444812c3ae276ace03697= ebd</a><br> >> <br> >> commit 408957613bc065c4444812c3ae276ace03697ebd<br> >> Author:=C2=A0 =C2=A0 =C2=A0Mariusz Zaborski <oshogbo@FreeBSD.or= g><br> >> AuthorDate: 2024-05-21 20:02:50 +0000<br> >> Commit:=C2=A0 =C2=A0 =C2=A0Mariusz Zaborski <oshogbo@FreeBSD.or= g><br> >> CommitDate: 2024-05-21 20:03:20 +0000<br> >> <br> >>=C2=A0 =C2=A0 =C2=A0Regen<br> >> ---<br> >>=C2=A0 sys/compat/freebsd32/freebsd32_sysent.c | 2 +-<br> >>=C2=A0 sys/kern/init_sysent.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 | 2 +-<br> >>=C2=A0 2 files changed, 2 insertions(+), 2 deletions(-)<br> ><br> > i'm sorry if this is considered accepted practice in FreeBSD (i= 9;m not a<br> > committer) but could i please request more useful commit messages than= <br> > "Regen" for things like this?<br> ><br> > when looking through 'git log', especially 'git log --form= at=3Doneline',<br> > it's really not clear what this commit actually does, meaning if i= 'm<br> > looking through the log for commits related to a problem i'm havin= g, i<br> > have to examine commits like this by hand to see if they're relate= d.<br> ><br> > it would save me (and other people, i suppose) a lot of time if the<br= > > commit message could at least mention what it's touching, e.g. &qu= ot;Regen<br> > sys/compat/freebsd32/freebsd32_sysent.c".<br> ><br> > [[End of PGP Signed Part]]<br> <br> Looks like it slipped in by mistake. I expected it to be reverted and<br> re-worded.<br> <br> Regards,<br> Dmitry<br> <br> -- <br> <a href=3D"https://wiki.freebsd.org/DmitrySalychev" rel=3D"noreferrer" targ= et=3D"_blank">https://wiki.freebsd.org/DmitrySalychev</a><br> </blockquote></div> --00000000000000fe260619090601-- From nobody Wed May 22 12:02:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkqg847Mfz5LZv7; Wed, 22 May 2024 12:02: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 4Vkqg83bLJz572h; Wed, 22 May 2024 12:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqfYKFfowWJY7TaXNxYb7i8tKZSDbnphe2s3qLNf9kE=; b=CT5VAMRCEbl9V/IF5iMiwnVjlLpVFH1vBoVx2XTa/zH5D1Vk3iTM4UU1a+PX8XL9HW62dv RHavGvdvOAHaS2jtbGAoNjjn/DWhLQiVnbCTytsdtH1K/EbidWJzAi0tDJzeTEYtmtAfxY ItPrvULGbcSFfCGaLPJCnGZnpPa9EWAHUWqAP57wqkY5vL07e00yVoLayd16YP2e/0FSGZ zTYdiOvh1LtGt0N5zpokEhVsT6oXY/CyJMvphB+V2mJoKwj6t9kBssvjc24quCZqP0Hatu DMbVSVu//jpDHOFGVXkl/CXg72MneUzvPAj+D0S8MJ+f899Xx3rdRkwBd8f+fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716379348; a=rsa-sha256; cv=none; b=Lr4CYUg0JPmlzbGydiqymJEoM9F2AaCTK0lvOJxG8KNsWNNI/PVi1icRxoz3MUfTE52DLL Xt2cgqi6ellA18MtzZGGIjmk08McYc4aI1ceqRLCIlywi71udb38mbfiL8NVZFRopx8nrC PB8qNAEPK/q4FV/54FzGoQneOgiXMLR8FhU0AkW/iiM4yAZgDbnVgqx7U3FzlteD54+bWF 198t4V79+any/UlcnO85853bvNlUNfKq1pJMCXplpkrDf+UKh8YeizfMXgQJntXydUx/5q gRsrOMKTBpYFxJJSzLhR6BkK7T/Zoao5xOHSzsFhG94VKCGeF+BE9N2+sEkbKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqfYKFfowWJY7TaXNxYb7i8tKZSDbnphe2s3qLNf9kE=; b=xvf+FkH/7X0vMrzHjNGgDdXSjLrGojIX3afnulFRd0M3St6aUpc2X5bCmlOpyvZ63yjPy/ Tf4JYZN3NpeVSkLDAZPBoIP7adH9KzHWi+1KEzfejXNxCE6DUlNO1HzAJ/s/zzT7yIwka0 BPNS1N3umZP/kXb8634i9Z1kpuXbKQUOmOVRRBQY2/KhP1v7I4WfiGR46+xPmxohWkqoeO l8bnucmrNWn2dJs6enG7pBQ2dv/sVdRGSYlLf9jz0knSo/VhYTnpSznV7f+Jicm9eNzDs+ aVrlYD24BYjBWNkM+mXAJ64+3px82FZ63j5bLdw8rzu0kMjHJzP0IMMjvETfFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkqg83BxZz14vy; Wed, 22 May 2024 12:02: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 44MC2S5w064291; Wed, 22 May 2024 12:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MC2Sff064288; Wed, 22 May 2024 12:02:28 GMT (envelope-from git) Date: Wed, 22 May 2024 12:02:28 GMT Message-Id: <202405221202.44MC2Sff064288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: 8aac90f18aef - main - mac_do: add a new MAC/do policy and mdo(1) utility List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8aac90f18aef7c9eea906c3ff9a001ca7b94f375 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=8aac90f18aef7c9eea906c3ff9a001ca7b94f375 commit 8aac90f18aef7c9eea906c3ff9a001ca7b94f375 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-09 22:03:28 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-22 12:01:41 +0000 mac_do: add a new MAC/do policy and mdo(1) utility This policy enables a user to become another user without having to be root (hence no setuid binary). it is configured via rules using sysctl security.mac.do.rules For example: security.mac.do.rules=uid=1001:80,gid=0:any The above rule means the user identifier by the uid 1001 is able to become user 80 Any user of the group 0 are allowed to become any user on the system. The mdo(1) utility expects the MAC/do policy to be installed and its rules defined. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D45145 --- share/man/man4/Makefile | 1 + share/man/man4/mac_do.4 | 78 +++++++ sys/modules/Makefile | 2 + sys/modules/mac_do/Makefile | 6 + sys/security/mac_do/mac_do.c | 545 +++++++++++++++++++++++++++++++++++++++++++ usr.bin/Makefile | 1 + usr.bin/mdo/Makefile | 4 + usr.bin/mdo/mdo.1 | 44 ++++ usr.bin/mdo/mdo.c | 76 ++++++ 9 files changed, 757 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 164efe3ddf66..69424a4be271 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -297,6 +297,7 @@ MAN= aac.4 \ mac_biba.4 \ mac_bsdextended.4 \ mac_ddb.4 \ + mac_do.4 \ mac_ifoff.4 \ mac_ipacl.4 \ mac_lomac.4 \ diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 new file mode 100644 index 000000000000..9a9ebe1ca989 --- /dev/null +++ b/share/man/man4/mac_do.4 @@ -0,0 +1,78 @@ +.\"- +.\" Copyright (c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 22, 2024 +.Dt MAC_DO 4 +.Os +.Sh NAME +.Nm mac_do +.Nd "policy allowing user to execute program as another user" +.Sh SYNOPSIS +To compile the +.Nm +policy into your kernel, place the following lines +in your kernel configruation file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Cd "options MAC_DO" +.Ed +.Sh DESCRIPTION +The +.Nm +policy grants users the ability to run processs as other users +according to predefined rules. +.Pp +The exact set of kernel privileges granted are: +.Bl -inset -compact -offset indent +.It Dv PRIV_CRED_SETGROUPS +.It Dv PRIV_CRET_SETUID +.El +.Pp +The following +.Xr sysctl 8 +MIBs are available: +.Bl -tag -width indent +.It Va security.mac.do.enabled +Enable the +.Nm +policy. +(Default: 1). +.It Va security.mac.do.rules +The set of rules. +.El +.Pp +The rules consist of a list of elements separated by +.So , Sc . +Each element is of the form +.Sm off +.Do +.Op Cm uid | Cm gid +.Li = +.Ar fid +.Li : +.Ar tid +.Dc +.Sm on . +Where +.Ar fid +is the uid or gid of the user or group the rule applies to, and +.Ar tid +is the uid of the targetted user. +Two special forms are accepted for +.Ar tid : +.Va any +or +.Va * , +which allow to target any user. +.Sh EXAMPLES +The following rule: +.Pp +.Dl security.mac.do.rules=uid=1001:80,gid=0:any +.Pp +means the user with the uid 1001 can execute processes as user with uid 80, +all the users which belongs to the group gid 0 can execute processes as any user. +.Sh SEE ALSO +.Xr mac 4 , +.Xr mdo 1 diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 2bd8914ab0d5..ad274e7f7b47 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -226,6 +226,7 @@ SUBDIR= \ ${_mac_biba} \ ${_mac_bsdextended} \ ${_mac_ddb} \ + ${_mac_do} \ ${_mac_ifoff} \ ${_mac_ipacl} \ ${_mac_lomac} \ @@ -587,6 +588,7 @@ _mac_bsdextended= mac_bsdextended .if ${KERN_OPTS:MDDB} || defined(ALL_MODULES) _mac_ddb= mac_ddb .endif +_mac_do= mac_do _mac_ifoff= mac_ifoff _mac_ipacl= mac_ipacl _mac_lomac= mac_lomac diff --git a/sys/modules/mac_do/Makefile b/sys/modules/mac_do/Makefile new file mode 100644 index 000000000000..532a5b9faa71 --- /dev/null +++ b/sys/modules/mac_do/Makefile @@ -0,0 +1,6 @@ +.PATH: ${SRCTOP}/sys/security/mac_do + +KMOD= mac_do +SRCS= mac_do.c vnode_if.h + +.include <bsd.kmod.mk> diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c new file mode 100644 index 000000000000..8685954b7db6 --- /dev/null +++ b/sys/security/mac_do/mac_do.c @@ -0,0 +1,545 @@ +/*- + * Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <sys/param.h> +#include <sys/malloc.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/module.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/sx.h> +#include <sys/sysctl.h> +#include <sys/systm.h> +#include <sys/ucred.h> +#include <sys/vnode.h> + +#include <security/mac/mac_policy.h> + +SYSCTL_DECL(_security_mac); + +static SYSCTL_NODE(_security_mac, OID_AUTO, do, + CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "mac_do policy controls"); + +static int do_enabled = 1; +SYSCTL_INT(_security_mac_do, OID_AUTO, enabled, CTLFLAG_RWTUN, + &do_enabled, 0, "Enforce do policy"); + +static MALLOC_DEFINE(M_DO, "do_rule", "Rules for mac_do"); + +#define MAC_RULE_STRING_LEN 1024 + +static unsigned mac_do_osd_jail_slot; + +#define RULE_UID 1 +#define RULE_GID 2 +#define RULE_ANY 3 + +struct rule { + int from_type; + union { + uid_t f_uid; + gid_t f_gid; + }; + int to_type; + uid_t t_uid; + TAILQ_ENTRY(rule) r_entries; +}; + +struct mac_do_rule { + char string[MAC_RULE_STRING_LEN]; + TAILQ_HEAD(rulehead, rule) head; +}; + +static struct mac_do_rule rules0; + +static void +toast_rules(struct rulehead *head) +{ + struct rule *r; + + while ((r = TAILQ_FIRST(head)) != NULL) { + TAILQ_REMOVE(head, r, r_entries); + free(r, M_DO); + } +} + +static int +parse_rule_element(char *element, struct rule **rule) +{ + int error = 0; + char *type, *id, *p; + struct rule *new; + + new = malloc(sizeof(*new), M_DO, M_ZERO|M_WAITOK); + + type = strsep(&element, "="); + if (type == NULL) { + error = EINVAL; + goto out; + } + if (strcmp(type, "uid") == 0) { + new->from_type = RULE_UID; + } else if (strcmp(type, "gid") == 0) { + new->from_type = RULE_GID; + } else { + error = EINVAL; + goto out; + } + id = strsep(&element, ":"); + if (id == NULL) { + error = EINVAL; + goto out; + } + if (new->from_type == RULE_UID) + new->f_uid = strtol(id, &p, 10); + if (new->from_type == RULE_GID) + new->f_gid = strtol(id, &p, 10); + if (*p != '\0') { + error = EINVAL; + goto out; + } + if (*element == '\0') { + error = EINVAL; + goto out; + } + if (strcmp(element, "any") == 0 || strcmp(element, "*") == 0) { + new->to_type = RULE_ANY; + } else { + new->to_type = RULE_UID; + new->t_uid = strtol(element, &p, 10); + if (*p != '\0') { + error = EINVAL; + goto out; + } + } +out: + if (error != 0) { + free(new, M_DO); + *rule = NULL; + } else + *rule = new; + return (error); +} + +static int +parse_rules(char *string, struct rulehead *head) +{ + struct rule *new; + char *element; + int error = 0; + + while ((element = strsep(&string, ",")) != NULL) { + if (strlen(element) == 0) + continue; + error = parse_rule_element(element, &new); + if (error) + goto out; + TAILQ_INSERT_TAIL(head, new, r_entries); + } +out: + if (error != 0) + toast_rules(head); + return (error); +} + +static struct mac_do_rule * +mac_do_rule_find(struct prison *spr, struct prison **prp) +{ + struct prison *pr; + struct mac_do_rule *rules; + + for (pr = spr;; pr = pr->pr_parent) { + mtx_lock(&pr->pr_mtx); + if (pr == &prison0) { + rules = &rules0; + break; + } + rules = osd_jail_get(pr, mac_do_osd_jail_slot); + if (rules != NULL) + break; + mtx_unlock(&pr->pr_mtx); + } + *prp = pr; + + return (rules); +} + +static int +sysctl_rules(SYSCTL_HANDLER_ARGS) +{ + char *copy_string, *new_string; + struct rulehead head, saved_head; + struct prison *pr; + struct mac_do_rule *rules; + int error; + + rules = mac_do_rule_find(req->td->td_ucred->cr_prison, &pr); + mtx_unlock(&pr->pr_mtx); + if (req->newptr == NULL) + return (sysctl_handle_string(oidp, rules->string, MAC_RULE_STRING_LEN, req)); + + new_string = malloc(MAC_RULE_STRING_LEN, M_DO, + M_WAITOK|M_ZERO); + mtx_lock(&pr->pr_mtx); + strlcpy(new_string, rules->string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + + error = sysctl_handle_string(oidp, new_string, MAC_RULE_STRING_LEN, req); + if (error) + goto out; + + copy_string = strdup(new_string, M_DO); + TAILQ_INIT(&head); + error = parse_rules(copy_string, &head); + free(copy_string, M_DO); + if (error) + goto out; + TAILQ_INIT(&saved_head); + mtx_lock(&pr->pr_mtx); + TAILQ_CONCAT(&saved_head, &rules->head, r_entries); + TAILQ_CONCAT(&rules->head, &head, r_entries); + strlcpy(rules->string, new_string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + toast_rules(&saved_head); + +out: + free(new_string, M_DO); + return (error); +} + +SYSCTL_PROC(_security_mac_do, OID_AUTO, rules, + CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE, + 0, 0, sysctl_rules, "A", + "Rules"); + +static void +destroy(struct mac_policy_conf *mpc) +{ + osd_jail_deregister(mac_do_osd_jail_slot); + toast_rules(&rules0.head); +} + +static void +mac_do_alloc_prison(struct prison *pr, struct mac_do_rule **lrp) +{ + struct prison *ppr; + struct mac_do_rule *rules, *new_rules; + void **rsv; + + rules = mac_do_rule_find(pr, &ppr); + if (ppr == pr) + goto done; + + mtx_unlock(&ppr->pr_mtx); + new_rules = malloc(sizeof(*new_rules), M_PRISON, M_WAITOK|M_ZERO); + rsv = osd_reserve(mac_do_osd_jail_slot); + rules = mac_do_rule_find(pr, &ppr); + if (ppr == pr) { + free(new_rules, M_PRISON); + osd_free_reserved(rsv); + goto done; + } + mtx_lock(&pr->pr_mtx); + osd_jail_set_reserved(pr, mac_do_osd_jail_slot, rsv, new_rules); + TAILQ_INIT(&new_rules->head); +done: + if (lrp != NULL) + *lrp = rules; + mtx_unlock(&pr->pr_mtx); + mtx_unlock(&ppr->pr_mtx); +} + +static void +mac_do_dealloc_prison(void *data) +{ + struct mac_do_rule *r = data; + + toast_rules(&r->head); +} + +static int +mac_do_prison_set(void *obj, void *data) +{ + struct prison *pr = obj; + struct vfsoptlist *opts = data; + struct rulehead head, saved_head; + struct mac_do_rule *rules; + char *rules_string, *copy_string; + int error, jsys, len; + + error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error == ENOENT) + jsys = -1; + error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len); + if (error == ENOENT) + rules = NULL; + else + jsys = JAIL_SYS_NEW; + switch (jsys) { + case JAIL_SYS_INHERIT: + mtx_lock(&pr->pr_mtx); + osd_jail_del(pr, mac_do_osd_jail_slot); + mtx_unlock(&pr->pr_mtx); + break; + case JAIL_SYS_NEW: + mac_do_alloc_prison(pr, &rules); + if (rules_string == NULL) + break; + copy_string = strdup(rules_string, M_DO); + TAILQ_INIT(&head); + error = parse_rules(copy_string, &head); + free(copy_string, M_DO); + if (error) + return (1); + TAILQ_INIT(&saved_head); + mtx_lock(&pr->pr_mtx); + TAILQ_CONCAT(&saved_head, &rules->head, r_entries); + TAILQ_CONCAT(&rules->head, &head, r_entries); + strlcpy(rules->string, rules_string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + toast_rules(&saved_head); + break; + } + return (0); +} + +SYSCTL_JAIL_PARAM_SYS_NODE(mdo, CTLFLAG_RW, "Jail MAC/do parameters"); +SYSCTL_JAIL_PARAM_STRING(_mdo, rules, CTLFLAG_RW, MAC_RULE_STRING_LEN, + "Jail MAC/do rules"); + +static int +mac_do_prison_get(void *obj, void *data) +{ + struct prison *ppr, *pr = obj; + struct vfsoptlist *opts = data; + struct mac_do_rule *rules; + int jsys, error; + + rules = mac_do_rule_find(pr, &ppr); + error = vfs_setopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error != 0 && error != ENOENT) + goto done; + error = vfs_setopts(opts, "mdo.rules", rules->string); + if (error != 0 && error != ENOENT) + goto done; + mtx_unlock(&ppr->pr_mtx); + error = 0; +done: + return (0); +} + +static int +mac_do_prison_create(void *obj, void *data __unused) +{ + struct prison *pr = obj; + + mac_do_alloc_prison(pr, NULL); + return (0); +} + +static int +mac_do_prison_remove(void *obj, void *data __unused) +{ + struct prison *pr = obj; + struct mac_do_rule *r; + + mtx_lock(&pr->pr_mtx); + r = osd_jail_get(pr, mac_do_osd_jail_slot); + mtx_unlock(&pr->pr_mtx); + toast_rules(&r->head); + return (0); +} + +static int +mac_do_prison_check(void *obj, void *data) +{ + struct vfsoptlist *opts = data; + char *rules_string; + int error, jsys, len; + + error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error != ENOENT) { + if (error != 0) + return (error); + if (jsys != JAIL_SYS_NEW && jsys != JAIL_SYS_INHERIT) + return (EINVAL); + } + error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len); + if (error != ENOENT) { + if (error != 0) + return (error); + if (len > MAC_RULE_STRING_LEN) { + vfs_opterror(opts, "mdo.rules too long"); + return (ENAMETOOLONG); + } + } + if (error == ENOENT) + error = 0; + return (error); +} + +static void +init(struct mac_policy_conf *mpc) +{ + static osd_method_t methods[PR_MAXMETHOD] = { + [PR_METHOD_CREATE] = mac_do_prison_create, + [PR_METHOD_GET] = mac_do_prison_get, + [PR_METHOD_SET] = mac_do_prison_set, + [PR_METHOD_CHECK] = mac_do_prison_check, + [PR_METHOD_REMOVE] = mac_do_prison_remove, + }; + struct prison *pr; + + mac_do_osd_jail_slot = osd_jail_register(mac_do_dealloc_prison, methods); + TAILQ_INIT(&rules0.head); + sx_slock(&allprison_lock); + TAILQ_FOREACH(pr, &allprison, pr_list) + mac_do_alloc_prison(pr, NULL); + sx_sunlock(&allprison_lock); +} + +static bool +rule_is_valid(struct ucred *cred, struct rule *r) +{ + if (r->from_type == RULE_UID && r->f_uid == cred->cr_uid) + return (true); + if (r->from_type == RULE_GID && r->f_gid == cred->cr_gid) + return (true); + return (false); +} + +static int +priv_grant(struct ucred *cred, int priv) +{ + struct rule *r; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (EPERM); + + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (rule_is_valid(cred, r)) { + switch (priv) { + case PRIV_CRED_SETGROUPS: + case PRIV_CRED_SETUID: + mtx_unlock(&pr->pr_mtx); + return (0); + default: + break; + } + } + } + mtx_unlock(&pr->pr_mtx); + return (EPERM); +} + +static int +check_setgroups(struct ucred *cred, int ngrp, gid_t *groups) +{ + struct rule *r; + char *fullpath = NULL; + char *freebuf = NULL; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (0); + if (cred->cr_uid == 0) + return (0); + + if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) + return (EPERM); + if (strcmp(fullpath, "/usr/bin/mdo") != 0) { + free(freebuf, M_TEMP); + return (EPERM); + } + free(freebuf, M_TEMP); + + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (rule_is_valid(cred, r)) { + mtx_unlock(&pr->pr_mtx); + return (0); + } + } + mtx_unlock(&pr->pr_mtx); + + return (EPERM); +} + +static int +check_setuid(struct ucred *cred, uid_t uid) +{ + struct rule *r; + int error; + char *fullpath = NULL; + char *freebuf = NULL; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (0); + if (cred->cr_uid == uid || cred->cr_uid == 0) + return (0); + + if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) + return (EPERM); + if (strcmp(fullpath, "/usr/bin/mdo") != 0) { + free(freebuf, M_TEMP); + return (EPERM); + } + free(freebuf, M_TEMP); + + error = EPERM; + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (r->from_type == RULE_UID) { + if (cred->cr_uid != r->f_uid) + continue; + if (r->to_type == RULE_ANY) { + error = 0; + break; + } + if (r->to_type == RULE_UID && uid == r->t_uid) { + error = 0; + break; + } + } + if (r->from_type == RULE_GID) { + if (cred->cr_gid != r->f_gid) + continue; + if (r->to_type == RULE_ANY) { + error = 0; + break; + } + if (r->to_type == RULE_UID && uid == r->t_uid) { + error = 0; + break; + } + } + } + mtx_unlock(&pr->pr_mtx); + return (error); +} + +static struct mac_policy_ops do_ops = { + .mpo_destroy = destroy, + .mpo_init = init, + .mpo_cred_check_setuid = check_setuid, + .mpo_cred_check_setgroups = check_setgroups, + .mpo_priv_grant = priv_grant, +}; + +MAC_POLICY_SET(&do_ops, mac_do, "MAC/do", + MPC_LOADTIME_FLAG_UNLOADOK, NULL); +MODULE_VERSION(mac_do, 1); diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 0a584a18d14a..a9d5c1563797 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -87,6 +87,7 @@ SUBDIR= alias \ lzmainfo \ m4 \ mandoc \ + mdo \ mesg \ ministat \ mkdep \ diff --git a/usr.bin/mdo/Makefile b/usr.bin/mdo/Makefile new file mode 100644 index 000000000000..e20f2719fc82 --- /dev/null +++ b/usr.bin/mdo/Makefile @@ -0,0 +1,4 @@ +PROG= mdo +SRCS= mdo.c + +.include <bsd.prog.mk> diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 new file mode 100644 index 000000000000..115ce44f4531 --- /dev/null +++ b/usr.bin/mdo/mdo.1 @@ -0,0 +1,44 @@ +.\"- +.\" Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 22, 2024 +.Dt MDO 1 +.Os +.Sh NAME +.Nm mdo +.Nd execute commands as another user +.Sh SYNOPSIS +.Nm +.Op Fl u Ar username +.Op Fl i +.Op command Op args +.Sh DESCRIPTION +The +.Nm +utility executes the specified +.Ar command +as user +.Ar username . +.Pp +If no +.Ar username +is provided it defaults to the +.Va root +user. +If no +.Ar command +is specified, it will execute the shell specified as +.Va SHELL +environnement variable, falling back on +.Pa /bin/sh . +.Pp +The +.Fl i +option can be used to only call +.Fn setuid +and keep the group from the calling user. +.Sh SEE ALSO +.Xr su 1 +.Xr mac_do 4 diff --git a/usr.bin/mdo/mdo.c b/usr.bin/mdo/mdo.c new file mode 100644 index 000000000000..22e2838daa08 --- /dev/null +++ b/usr.bin/mdo/mdo.c @@ -0,0 +1,76 @@ +/*- + * Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <sys/limits.h> + +#include <err.h> +#include <paths.h> +#include <pwd.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +static void +usage(void) +{ + fprintf(stderr, "usage: mdo [-u username] [-i] [--] [command [args]]\n"); + exit(EXIT_FAILURE); +} + +int +main(int argc, char **argv) +{ + struct passwd *pw; + const char *username = "root"; + bool uidonly = false; + int ch; + + while ((ch = getopt(argc, argv, "u:i")) != -1) { + switch (ch) { + case 'u': + username = optarg; + break; + case 'i': + uidonly = true; + break; + default: + usage(); + } + } + argc -= optind; + argv += optind; + + if ((pw = getpwnam(username)) == NULL) { + if (strspn(username, "0123456789") == strlen(username)) { + const char *errp = NULL; + uid_t uid = strtonum(username, 0, UID_MAX, &errp); + if (errp != NULL) + err(EXIT_FAILURE, "%s", errp); + pw = getpwuid(uid); + } + if (pw == NULL) + err(EXIT_FAILURE, "invalid username '%s'", username); + } + if (!uidonly) { + if (initgroups(pw->pw_name, pw->pw_gid) == -1) + err(EXIT_FAILURE, "failed to call initgroups"); + if (setgid(pw->pw_gid) == -1) + err(EXIT_FAILURE, "failed to call setgid"); + } + if (setuid(pw->pw_uid) == -1) + err(EXIT_FAILURE, "failed to call setuid"); + if (*argv == NULL) { + const char *sh = getenv("SHELL"); + if (sh == NULL) + sh = _PATH_BSHELL; + execlp(sh, sh, "-i", NULL); + } else { + execvp(argv[0], argv); + } + err(EXIT_FAILURE, "exec failed"); +} From nobody Wed May 22 12:06:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkqln1tPLz5Lb4g; Wed, 22 May 2024 12:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkqln0b3Bz57JQ; Wed, 22 May 2024 12:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUsQdyVdqUmEDeBNTRe18Oc1yRZ+8xLWO3PzANOYCKA=; b=Uwt62AV51cTgQn0lmUmqriov1KYCvhrZxMOiQHY0iqtlV0gOEW2goU2zBhT2q/L94QcMMG 6gdE/NaXEaQsX/Wolnc0W0Y50dSpvVUp2BZTNSl2fesrj9AXzdohFbbfpNJn6R6JnSfKLh VdJUpjHbJqD287VOpiYDSLDcOPrys7JP1DoiaR8K0G4WEUOpSr5E1V69cxI98s85HFQKX3 hfCq8+E+idqO1K8MEB+yuIqQtAr8W2gUXnxVr2bynu1XOMUUSeTDEYHlLBuBibQEyxy/YP t9QSPoZtq/b7m30s2W5Ee+BUyW8VCZzaJGqnEANUybckMZVxFOSw+/nBJHUb5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716379589; a=rsa-sha256; cv=none; b=TZDL+60l1j5fUyOKGnrtn21EroL8hSW5Ty0qIqm7PhNpoDxyCmGGdSwzfZvVj5O32x/AGM H83t/vkOPtVEVQuI9G1cWjnjcNOj3Zcr9DIGFH5CDyDYhKen+5F1OIxgWMQt+OCs7BClc/ v085OvVwAd9I9T/QtHqea9GDKUGNhUUHln9OYa6b7laOavv6gQawxVCPpG6gxn5pi8M8pr 3hQbRxWJcUrYGZQAI8JOdgIivj6tfKLcPsbEBEzJ9pMu8QhnOs8/3YQ1uyxe2kDHSgLvkB Sxn4wkq+FBnorgSMe94ghi/HdMkxE2Tug1Bw9+JwKufEggtk3aZQZLv6v/F2Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUsQdyVdqUmEDeBNTRe18Oc1yRZ+8xLWO3PzANOYCKA=; b=MaUxXgy8g+v6s0yPmit4siXVkKHGEEEhOl7t7sztWlyHITQZxQZi0jRlu3K8A9twsfQlo1 idbkdU7jKw5sOOIz76CAgYXKw2F+Vg/kuuAXNeFTWxDHb/ER7IzuJ9WZmecdNsqy5bVmKG 8yPiZQ9zouTf76pmG3UZ9pdiFTW3vhuVgz4LTypTsB2Jfeg/rOZzY+cigJn5RskQFGID4J 9qw0oor/35V9hoCzTBNirGD1jYlPFXCDNSxA2tCRfbtVXVgR1ONnEMp4D3JWG8sWl4bP68 ZvvzAmBSKRJsA7ZCEr1e/CXTG2oCPCkcY8eobxB0ROBmXNHY821BeJTdRBtz7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkqln03snz14cv; Wed, 22 May 2024 12:06: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 44MC6SCV064985; Wed, 22 May 2024 12: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 44MC6S7e064982; Wed, 22 May 2024 12:06:28 GMT (envelope-from git) Date: Wed, 22 May 2024 12:06:28 GMT Message-Id: <202405221206.44MC6S7e064982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: c180fd3d75c4 - main - RELNOTES: document MAC/do List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c180fd3d75c4289a7dcf675dc160c74aafd451c3 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c180fd3d75c4289a7dcf675dc160c74aafd451c3 commit c180fd3d75c4289a7dcf675dc160c74aafd451c3 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-22 12:05:57 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-22 12:05:57 +0000 RELNOTES: document MAC/do --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index 5c367720c928..5c2eff22168e 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. +8aac90f18aef: + new MAC/do policy and mdo(1) utility which enables a user to + become another user without the requirement of setuid root. + 7398d1ece5cf: hw.snd.version is removed. From nobody Wed May 22 13:24:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksTq0NNSz5Ljff; Wed, 22 May 2024 13:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksTp4rS2z45PV; Wed, 22 May 2024 13:24:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGAbU6UavWBKCu6KLGEGUg6trpWh4h1gP/DoBf/9HrM=; b=lFkEsYfKpBLSpOqMrbYVu/5MbPKTs0GSdyZXOrCokX5P3usV/SsdHr6KFoqFuR61Sn3QRH n2xBUaIgPE5B8wB4N70zSUPf7grPlvMxjifq1zYccg7ZLueJrdd9qNfkB7aqIgjej2q262 WFvdZcGr+l/6v6mpNDAfK4l/JvGC8ovuftW2z8P2qYFRYWoRSn70NBzGWcaIZSlx2FdK2B 7dg04BW7IOgMU14Xp7EKpA5tDsZNLcuvud2u7YTZSnq3FVD758nYdj+8sN8BlvEFZa36rs agiDiv9D4Sr3Qv+l4R3mZ8keuE+G9lOcKvTlX0WzvbbVqLnqk+8ZgryNiNk8eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384270; a=rsa-sha256; cv=none; b=cu9uyI0LAmqbNfhMnirG6DrPePgHlB91yPnggCOc/M1WnfUGAnWRoTV1QDHNQJZl1mJZOD thX38/18hnYb/JDZNujfU+Hv7AuwgB8tVW6BllaWv1Eyqc060J7bLlmo7FSVRtORUG2S9Q 112b1sJ/+XVUxO8zgmhuzLvFCqGtp9PvCwdnWAf4hFQo8LyoFJDcK/sqASC1QUK4WoPHYr tdYpgRdsOGWQ6HZbr8bCyqR54w3+OWIsyFtz7Njd/o1Y1XFmH0LbhPVTp+AdcNzs6mNYSU aMsOKMhO0juDnIYJ3k9cVve2oBujsY4wfoQM0EB+wiuxCuAzlr1Pf+QPaDE/ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGAbU6UavWBKCu6KLGEGUg6trpWh4h1gP/DoBf/9HrM=; b=UTCk4xjDt8qSvo5BpemF53M3DS/rNqQczD965Yaj5Ie1FteLeQOOLh79gU8x71pjB8hotL c5OrngdjomoMptXLk3qXMYTUM6nxZIIVFnAU21+sUB7KYhsT+5SQavh1jFwB0sNHQIhwKD wKa0mNq3dIC0ftcV0yZnZfQxyv14OviA0QP4ujuXZBaqEKhLTcyXCTJYUz2t2ASI0n9wfc pn1Fq0fgsvXCiA1f+I5dljhHXggm+hgKICY9NMZ6/7fYjrabDtYrqfh7Tt0g/mo4e9S8DP 3eHnFMvls7Xcd0vU2O92ajBGM/Z1U8m1rTYinbKFZNS4dP2htJw6v3w3UBXMaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VksTp4RDFz16xX; Wed, 22 May 2024 13:24: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 44MDOUcN099179; Wed, 22 May 2024 13:24:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDOUEB099176; Wed, 22 May 2024 13:24:30 GMT (envelope-from git) Date: Wed, 22 May 2024 13:24:30 GMT Message-Id: <202405221324.44MDOUEB099176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev <dsl@FreeBSD.org> Subject: git: 971b77da4649 - main - arm64: Return newline at the end of NOTES back List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 971b77da4649010a8b6b3adfaa21c550cd37dc52 Auto-Submitted: auto-generated The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=971b77da4649010a8b6b3adfaa21c550cd37dc52 commit 971b77da4649010a8b6b3adfaa21c550cd37dc52 Author: Dmitry Salychev <dsl@FreeBSD.org> AuthorDate: 2024-05-22 13:20:40 +0000 Commit: Dmitry Salychev <dsl@FreeBSD.org> CommitDate: 2024-05-22 13:20:40 +0000 arm64: Return newline at the end of NOTES back It fixes LINT kernel build after ac4ddc467bfe. MFC after: 3 days --- sys/arm64/conf/NOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index cc713db86538..b3bf2fedd5f7 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -252,4 +252,4 @@ options ZFS # device iichid # HID-over-I2C support options IICHID_DEBUG # Enable HID-over-I2C debug messages -options IICHID_SAMPLING # Workaround missing GPIO INTR support \ No newline at end of file +options IICHID_SAMPLING # Workaround missing GPIO INTR support From nobody Wed May 22 13:41:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vksst6Zp0z5LkpL; Wed, 22 May 2024 13:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vksst4v2Mz47Qt; Wed, 22 May 2024 13:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCkmzx1fpegrNF0q5iq7/wzF6NI4y3EQE0xVtaON8rc=; b=Db3FWVc1aSPLHXWzUzJjQm38Y0yiH3NYhvgyXMZSl2fLIoNN8K2dmJYqMIff4DroEdTAv+ hDY82Kdc39DNknH6RfAabZu7XL9fv1mst8tPFtcClR1zgs1Ouq1Yb4xDXv6kTaniU2iBil A4SUUK8XLHZ2kgzZIJJzk+QVthzKcDsmM7DaEKkO28pY85tz+tN9Y2mu7BmLxEDiJbojHd jgmX69MBv402pUqyTdfmtWOD3H7kK+4ah+gBUpj+0X9Di3RTRUImJzLOycYq45hVo4p0ZY 6Hc7qdpd3gp6H9S4D3uAZqc1wttk2I+vVoD3QDCgeDLWn7Jkzlq44oAWQpT9cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716385314; a=rsa-sha256; cv=none; b=SGzhWIEYP8c7ZD6HIWZNFChI8SQ3Y5pZxgwX5uFcwfQcoFEPYUT7dVp8RHjy/5tlZpbtNl UlSd7CfVC33nOPOueK+xKKPyMrknmWR62rmQZKbB2gz9hNep7PMoVxw74rey5MDdJRBpkD tg5nfxPCUelYLi6EUEoGly1d5CaaqGzzuX42GABRaSbgB4hq3I76uUz0fH8ChQbQ4ORjNU tsAbDl2Zw4GrsOR+5Qrk0fw1UqE+zRa/OY+75POMznRif61OtWcuiHenEAzfZNwdEjriII Gc3U+2/9hMsXzzYg4JN8nNVm4eta/KND3uDMEEKYJP26wdY61rFtub5zAJx7VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCkmzx1fpegrNF0q5iq7/wzF6NI4y3EQE0xVtaON8rc=; b=v059J7+5NYBRlj08t44tIy5xLZ+EQ9Bj9GsnZKCY2Ca6/bQOkOvxIJp7cbhRPWAjhqwO0W atYGHLn49GzQ0ak8+jwE/tJJihCgtGBWxDm3GuLrAuk7FJ5/cK070SNIi90CvUlvECklJ2 tVy9so9BNgMahgY/V/KDThaE1g4Ri7CcDwVUW6BwEbtQtRobz12eZnGK0V7LkLlS4z2XC7 WzP3jnQj9pvTBbfCWT8o9qoMQV2M9bX/g8H3k/Sv5UZkgN/gAwdp/gliYF3YzEQX1GFaQm SORS/TYzsyW4v1g/c6mRScsRm/MBD0rE2a43NgnE+q7D+AztCzfvFlZ89jKF5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vksst4W9gz172C; Wed, 22 May 2024 13:41: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 44MDfs72030749; Wed, 22 May 2024 13:41:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDfsF3030747; Wed, 22 May 2024 13:41:54 GMT (envelope-from git) Date: Wed, 22 May 2024 13:41:54 GMT Message-Id: <202405221341.44MDfsF3030747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger <netchild@FreeBSD.org> Subject: git: 2efbd480f1d3 - main - rc: add service jails framework List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2efbd480f1d37cbadc5af4476a87e5336c493910 Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=2efbd480f1d37cbadc5af4476a87e5336c493910 commit 2efbd480f1d37cbadc5af4476a87e5336c493910 Author: Alexander Leidinger <netchild@FreeBSD.org> AuthorDate: 2024-05-22 13:28:11 +0000 Commit: Alexander Leidinger <netchild@FreeBSD.org> CommitDate: 2024-05-22 13:41:48 +0000 rc: add service jails framework This takes a rc.d-service and starts it in a jail which shares the same root-path as the host (or parent jail) and may inherit the network from the host (or parent jail). Per service there is the possibility to specify some arguments which give more permissions (e.g. netv4, netv6, sysvipc...). Reviewed by: bcr (man page) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D40370 --- libexec/rc/rc.subr | 155 +++++++++++++++++++++++++++++++++++++++++++---- share/man/man5/rc.conf.5 | 112 +++++++++++++++++++++++++++++++++- 2 files changed, 255 insertions(+), 12 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 6ed9d24fdf5c..23651cbf8e58 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -50,6 +50,9 @@ PROTECT="/usr/bin/protect" ID="/usr/bin/id" IDCMD="if [ -x $ID ]; then $ID -un; fi" PS="/bin/ps -ww" +SERVICE=/usr/sbin/service +JAIL_CMD=/usr/sbin/jail +_svcj_generic_params="path=/ mount.nodevfs host=inherit" JID=0 CPUSET="/bin/cpuset" @@ -521,6 +524,16 @@ _find_processes() $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")' fi + if checkyesno ${name}_svcj && [ "${_rc_svcj}" != jailing ]; then + JID=$(/usr/sbin/jls -j svcj-${name} jid 2>/dev/null) + + case ${JID} in + ''|*[!0-9]*) + # svcj-jail doesn't exist, fallback to host-check + JID=0 + ;; + esac + fi _proccheck="\ $PS 2>/dev/null -o pid= -o jid= -o command= $_psargs"' | while read _npid _jid '"$_fp_args"'; do @@ -1138,6 +1151,18 @@ run_rc_command() _cpusetcmd="$CPUSET -l $_cpuset" fi + # If a specific jail has a specific svcj request, honor it (YES/NO). + # If not (variable empty), evaluate the global svcj catch-all. + # A global YES can be overriden by a specific NO, and a global NO is overriden + # by a specific YES. + eval _svcj=\$${name}_svcj + if [ -z "$_svcj" ]; then + _svcj=${svcj_all_enable} + if [ -z "$_svcj" ]; then + eval ${name}_svcj=NO + fi + fi + # setup pid check command if [ -n "$_procname" ]; then if [ -n "$pidfile" ]; then @@ -1174,7 +1199,7 @@ run_rc_command() _prepend=\$${name}_prepend _login_class=\${${name}_login_class:-daemon} \ _limits=\$${name}_limits _oomprotect=\$${name}_oomprotect \ _setup=\$${name}_setup _env_file=\$${name}_env_file \ - _umask=\$${name}_umask + _umask=\$${name}_umask _svcj_options=\$${name}_svcj_options if [ -n "$_env_file" ] && [ -r "${_env_file}" ]; then # load env from file set -a @@ -1188,6 +1213,45 @@ run_rc_command() fi fi + if [ -n "$_svcj_options" ]; then # translate service jail options + _svcj_cmd_options="" + + for _svcj_option in $_svcj_options; do + case "$_svcj_option" in + mlock) + _svcj_cmd_options="allow.mlock ${_svcj_cmd_options}" + ;; + netv4) + _svcj_cmd_options="ip4=inherit allow.reserved_ports ${_svcj_cmd_options}" + ;; + netv6) + _svcj_cmd_options="ip6=inherit allow.reserved_ports ${_svcj_cmd_options}" + ;; + net_basic) + _svcj_cmd_options="ip4=inherit ip6=inherit allow.reserved_ports ${_svcj_cmd_options}" + ;; + net_raw) + _svcj_cmd_options="allow.raw_sockets ${_svcj_cmd_options}" + ;; + net_all) + _svcj_cmd_options="allow.socket_af allow.raw_sockets allow.reserved_ports ip4=inherit ip6=inherit ${_svcj_cmd_options}" + ;; + nfsd) + _svcj_cmd_options="allow.nfsd enforce_statfs=1 ${_svcj_cmd_options}" + ;; + sysvipc) + _svcj_cmd_options="sysvmsg=inherit sysvsem=inherit sysvshm=inherit ${_svcj_cmd_options}" + ;; + vmm) + _svcj_cmd_options="allow.vmm ${_svcj_cmd_options}" + ;; + *) + echo ${name}: unknown service jail option: $_svcj_option + ;; + esac + done + fi + [ -z "$autoboot" ] && eval $_pidcmd # determine the pid if necessary for _elem in $_keywords; do @@ -1235,9 +1299,49 @@ run_rc_command() if [ -n "$_env" ]; then eval "export -- $_env" fi - _run_rc_precmd || return 1 - _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || return 1 - _run_rc_postcmd + + if [ "${_rc_svcj}" != jailing ]; then + _run_rc_precmd || return 1 + fi + if ! checkyesno ${name}_svcj; then + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || return 1 + else + case "$rc_arg" in + start) + if [ "${_rc_svcj}" != jailing ]; then + _return=1 + $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options \ + exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \ + exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \ + exec.consolelog="/var/log/svcj_${name}_console.log" \ + name=svcj-${name} && _return=0 + else + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + fi + ;; + stop) + if [ "${_rc_svcj}" != jailing ]; then + $SERVICE -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}stop $rc_extra_args || _return=1 + $JAIL_CMD -r svcj-${name} 2>/dev/null + else + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + fi + ;; + restart|status) ;; # no special case needed for svcj or handled somewhere else + *) + eval _rc_svcj_extra_cmd=\$${name}_${rc_arg}_svcj_enable + : ${_rc_svcj_extra_cmd:=NO} + if checkyesno _rc_svcj_extra_cmd && [ "${_rc_svcj}" != jailing ]; then + $SERVICE -v -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}${rc_arg} $rc_extra_args || _return=1 + else + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + fi + ;; + esac + fi + if [ "${_rc_svcj}" != jailing ]; then + _run_rc_postcmd + fi return $_return fi @@ -1295,9 +1399,21 @@ run_rc_command() return 1 fi - if ! _run_rc_precmd; then - warn "failed precmd routine for ${name}" - return 1 + if [ "${_rc_svcj}" != jailing ]; then + if ! _run_rc_precmd; then + warn "failed precmd routine for ${name}" + return 1 + fi + fi + + if checkyesno ${name}_svcj; then + if [ "${_rc_svcj}" != jailing ]; then + $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options\ + exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \ + exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \ + exec.consolelog="/var/log/svcj_${name}_console.log" \ + name=svcj-${name} || return 1 + fi fi # setup the full command to run @@ -1341,16 +1457,28 @@ $_cpusetcmd $command $rc_flags $command_args" # Prepend default limits _doit="$_cd limits -C $_login_class $_limits $_doit" + + local _really_run_it=true + if checkyesno ${name}_svcj; then + if [ "${_rc_svcj}" != jailing ]; then + _really_run_it=false + fi + fi + + if [ "$_really_run_it" = true ]; then # run the full command # - if ! _run_rc_doit "$_doit"; then - warn "failed to start ${name}" - return 1 + if ! _run_rc_doit "$_doit"; then + warn "failed to start ${name}" + return 1 + fi fi + if [ "${_rc_svcj}" != jailing ]; then # finally, run postcmd # - _run_rc_postcmd + _run_rc_postcmd + fi ;; stop) @@ -1372,6 +1500,11 @@ $_cpusetcmd $command $rc_flags $command_args" # and run postcmd. wait_for_pids $rc_pid + if checkyesno ${name}_svcj; then + # remove service jail + $JAIL_CMD -r svcj-${name} 2>/dev/null + fi + _run_rc_postcmd ;; diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 51a48341be60..9f32cfa5ab82 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 18, 2024 +.Dd May 22, 2024 .Dt RC.CONF 5 .Os .Sh NAME @@ -263,6 +263,19 @@ value. .It Ao Ar name Ac Ns Va _user .Pq Vt str Run the service under this user account. +.It Ao Ar name Ac Ns Va _svcj +.Pq Vt bool +If set to +.Dq Li YES , +auto-jail the service with inherited filesystem and other +jail properties depending on +.Ao Ar name Ac Ns Va _svcj_options . +.It Ao Ar name Ac Ns Va _svcj_options +.Pq Vt str +A list of jail properties for the service. +See +.Sx SERVICE JAILS +for a list of valid properties. .It Va apm_enable .Pq Vt bool If set to @@ -392,6 +405,12 @@ is set to these are the flags to pass to the .Xr powerd 8 daemon. +.It Va svcj_all_enable +Enable auto-jailing of all services which are not explicitly +excluded. +See +.Sx SERVICE JAILS +for more info. .It Va tmpmfs Controls the creation of a .Pa /tmp @@ -4917,6 +4936,97 @@ daemon. these are the flags to pass to the .Xr sendmail 8 .El +.Sh SERVICE JAILS +The service jails part of the rc system automatically puts a service +into a jail. +This jail inherits the filesystem and various other parts of the +parent (if you allow child-jails in your jails, service jails +can be used in jails) depending on the content of the +.Ao Ar name Ac Ns Va _svcj_options +variable. +Typically this variable is set inside rc scripts, but it can be +overriden in the rc config. +Valid options for +.Ao Ar name Ac Ns Va _svcj_options +are: +.Bl -tag -width indent-two +.It mlock +Allows to lock memory pages into the physical memory. +.It netv4 +Inherit the IPv4 address and allows to open reserved ports. +This can not be combined with +.Pa netv6 . +.It netv6 +Inherit the IPv6 address and allows to open reserved ports. +This can not be combined with +.Pa netv4 . +.It net_basic +Inherits the IPv4 and IPv6 addresses and allows to open +reserved ports. +.It net_raw +Allow to open raw sockets. +This option can be combined with +.Pa netv4 , +.Pa netv6 , +.Pa net_basic . +.It net_all +Inherits the IPv4 and IPv6 addresses, allows to open reserved +ports, allows to open raw sockets, and allows to open sockets +of protocol stacks that have not had jail functionality added +to them. +.It nfsd +Allows to run nfsd and affiliated daemons. +.It sysvipc +Allows access to SysV semaphores, SysV shared memory and +SysV messages. +.It vmm +Allows access to +.Xr vmm 4 . +This option is only available when +.Xr vmm 4 +is enabled in the kernel. +.El + +All non-network options can be combined with all other options. + +If the +.Ao Ar name Ac Ns Va _svcj +variable is set to +.Dq Li YES , +this particular service is started in a +service jail named +.Va svcj- Ns Ar name Ac . + +The +.Va svcj_all_enable +variable allows to enable service jails for all services of the +system at once. +Services which have +.Ao Ar name Ac Ns Va _svcj +set to +.Dq Li NO +are excluded. +Some services may set +.Ao Ar name Ac Ns Va _svcj +to +.Dq Li NO +in the script to either prevent service jails for this +service at all, or may set it to +.Dq Li NO +if it is not set in the +rc config, to exclude it from +.Va svcj_all_enable +but allow to explicitely enable it. +The sshd service for example would not see other jails, if +it would run as a service jail. +This may or may not be what is needed, and as such it is +excluded from +.Va svcj_all_enable +but can be enabled via setting +.Va sshd_svcj +to +.Dq Li YES . +.El .Sh FILES .Bl -tag -width "/etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf From nobody Wed May 22 13:41:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkssv6cQQz5Ll5J; Wed, 22 May 2024 13:41: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 4Vkssv5sKGz47fS; Wed, 22 May 2024 13:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+GPHMbkMd3vBWehwdMR6e/1HrISrHyOqD8zsNvnq1k=; b=B8pA/H5VGdkHU6N54GySTunO0BEXCwDN+22BX+MvZeyMPwWMbliP4vjvpXBstLBqjK4UTh UyojLU03HU2nuxD+JjMD4/YN0GHeMt3556JSQd73np+pRqQJ0ck2G5SvZpHQaliBfLcg8F 429EsP5RQghaARFsgRvV03nyusn4YgM0KBrjm8xMc51FcmYAkz4DXmo7Z2+qzUMjlxDlAY SChV58jYiYe8pwCsK5lazi7U5X0SYKerA84u2WMPE0CPgzjqhMro15B4Wp7DOsh8V0WENQ YEj0247YEoQAUGnH5HeLbHUi5MUYnd9ar+rtzw3tykZU1YP+zxAJ4JDTd/X5IQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716385315; a=rsa-sha256; cv=none; b=Z1wULB74jYW4DyASFPoSef041avlijp/xYNgUOBRZqsPnrJIERI36wh5/ljqIO6r18cv+y x0VZP67ep2oXjDbDqFGa6/nSPVczx6zem/+N3Q8aEi9Nb/XLgDCqdCKu5Y4UVQ65kYlkOq fkdE1sINJVff6SHgZMko6RwVesIFmXSOtoys6MebNoHI+XpvI8qaw2jJR5iVBXL8vY7XhV iHHQBcZSpgFOVeJOHjg7jTDpxfy9F4nMA6nWb6OW5vYbmdR/688sXbA+R9c1lffTjIdEed heUvCTGmc09afM7GQ71wNI3MGJyh8miqJFcRypriuX+cRj33tfHNXXhTqo2gGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+GPHMbkMd3vBWehwdMR6e/1HrISrHyOqD8zsNvnq1k=; b=C6/MVXNwUIGQ9kAnzBF7kAYcTOKm53dxHBptLKZX7ol3MYNiMV+ADxaiq3PE15+Y9W6ewR JMmTO0uADlaG1CwREtyjkByGdlg4cXiOPp0FcfMRVLDLgHMpz934UG2nEyayjpkc4eMag6 iDiH717wL3vHqxhcv8UlV14EoZTAxTxH9gvXgHgywFwfuARqiGcxp9xU21h2gVIYfg7JPg apJQm6Ao8sfLaA6XTxes3GgLJ7HnMLzjPWAAoESgP9dLSfuJT1sq2InWteOGGk3e/9ZLsM V62z4OP6ZM5xc5a5Ttz4cJYMpxajywjQ0WPYEUPtPmh1QLgP0snRy5Z3t4Poig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkssv5SMxz17D6; Wed, 22 May 2024 13:41: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 44MDfth6030809; Wed, 22 May 2024 13:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDftxc030806; Wed, 22 May 2024 13:41:55 GMT (envelope-from git) Date: Wed, 22 May 2024 13:41:55 GMT Message-Id: <202405221341.44MDftxc030806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger <netchild@FreeBSD.org> Subject: git: f99f0ee14e3a - main - rc.d: add a service jails config to all base system services List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f99f0ee14e3af81c23150a6a340259ca8a33d01a Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=f99f0ee14e3af81c23150a6a340259ca8a33d01a commit f99f0ee14e3af81c23150a6a340259ca8a33d01a Author: Alexander Leidinger <netchild@FreeBSD.org> AuthorDate: 2024-05-22 13:31:47 +0000 Commit: Alexander Leidinger <netchild@FreeBSD.org> CommitDate: 2024-05-22 13:41:49 +0000 rc.d: add a service jails config to all base system services This gives more permissions to services (e.g. network access to services which require this) when they are started as an automatic service jail. The sshd patch is important for the sshd-related functionality as described in the man-page in the service jails part. The location of the added env vars is supposed to allow overriding them in rc.conf, and to hard-disable the use of svcj for some parts where it doesn't make sense or will not work. Only a subset of all of the services are fully tested (I'm running this since more than a year with various services started as service jails). The untested parts should be most of the time ok, in some edge-cases more permissions are needed inside the service jail. Differential Revision: https://reviews.freebsd.org/D40371 --- libexec/rc/rc.d/accounting | 4 ++++ libexec/rc/rc.d/adjkerntz | 4 ++++ libexec/rc/rc.d/apm | 4 ++++ libexec/rc/rc.d/apmd | 4 ++++ libexec/rc/rc.d/auditd | 4 ++++ libexec/rc/rc.d/auditdistd | 2 ++ libexec/rc/rc.d/automount | 4 ++++ libexec/rc/rc.d/automountd | 4 ++++ libexec/rc/rc.d/autounmountd | 4 ++++ libexec/rc/rc.d/bgfsck | 4 ++++ libexec/rc/rc.d/blacklistd | 3 +++ libexec/rc/rc.d/bluetooth | 3 +++ libexec/rc/rc.d/bootparams | 2 ++ libexec/rc/rc.d/bridge | 4 ++++ libexec/rc/rc.d/bsnmpd | 2 ++ libexec/rc/rc.d/bthidd | 3 +++ libexec/rc/rc.d/ccd | 4 ++++ libexec/rc/rc.d/cfumass | 4 ++++ libexec/rc/rc.d/cleanvar | 4 ++++ libexec/rc/rc.d/cleartmp | 4 ++++ libexec/rc/rc.d/cron | 5 +++++ libexec/rc/rc.d/ctld | 4 ++++ libexec/rc/rc.d/ddb | 3 +++ libexec/rc/rc.d/defaultroute | 4 ++++ libexec/rc/rc.d/devd | 4 ++++ libexec/rc/rc.d/devfs | 4 ++++ libexec/rc/rc.d/devmatch | 4 ++++ libexec/rc/rc.d/dhclient | 3 +++ libexec/rc/rc.d/dmesg | 4 ++++ libexec/rc/rc.d/dnctl | 3 +++ libexec/rc/rc.d/dumpon | 4 ++++ libexec/rc/rc.d/fsck | 4 ++++ libexec/rc/rc.d/ftp-proxy | 2 ++ libexec/rc/rc.d/ftpd | 10 ++++------ libexec/rc/rc.d/geli | 4 ++++ libexec/rc/rc.d/geli2 | 4 ++++ libexec/rc/rc.d/ggated | 3 +++ libexec/rc/rc.d/gptboot | 4 ++++ libexec/rc/rc.d/growfs | 4 ++++ libexec/rc/rc.d/growfs_fstab | 4 ++++ libexec/rc/rc.d/gssd | 2 ++ libexec/rc/rc.d/hastd | 4 ++++ libexec/rc/rc.d/hcsecd | 3 +++ libexec/rc/rc.d/hostapd | 4 ++++ libexec/rc/rc.d/hostid | 4 ++++ libexec/rc/rc.d/hostid_save | 4 ++++ libexec/rc/rc.d/hostname | 4 ++++ libexec/rc/rc.d/inetd | 2 ++ libexec/rc/rc.d/iovctl | 4 ++++ libexec/rc/rc.d/ip6addrctl | 4 ++++ libexec/rc/rc.d/ipfilter | 3 +++ libexec/rc/rc.d/ipfs | 4 ++++ libexec/rc/rc.d/ipfw | 3 +++ libexec/rc/rc.d/ipfw_netflow | 3 +++ libexec/rc/rc.d/ipmon | 3 +++ libexec/rc/rc.d/ipnat | 3 +++ libexec/rc/rc.d/ippool | 4 ++++ libexec/rc/rc.d/ipropd_master | 12 ++++++++---- libexec/rc/rc.d/ipropd_slave | 14 +++++++++----- libexec/rc/rc.d/ipsec | 4 ++++ libexec/rc/rc.d/iscsictl | 4 ++++ libexec/rc/rc.d/iscsid | 4 ++++ libexec/rc/rc.d/jail | 4 ++++ libexec/rc/rc.d/kadmind | 10 +++------- libexec/rc/rc.d/kdc | 1 + libexec/rc/rc.d/keyserv | 2 ++ libexec/rc/rc.d/kfd | 8 ++------ libexec/rc/rc.d/kld | 4 ++++ libexec/rc/rc.d/kldxref | 4 ++++ libexec/rc/rc.d/kpasswdd | 10 +++------- libexec/rc/rc.d/ldconfig | 4 ++++ libexec/rc/rc.d/linux | 4 ++++ libexec/rc/rc.d/local | 4 ++++ libexec/rc/rc.d/local_unbound | 1 + libexec/rc/rc.d/localpkg | 6 ++++++ libexec/rc/rc.d/lockd | 7 +++++-- libexec/rc/rc.d/lpd | 2 ++ libexec/rc/rc.d/mdconfig | 3 +++ libexec/rc/rc.d/mdconfig2 | 3 +++ libexec/rc/rc.d/mixer | 4 ++++ libexec/rc/rc.d/motd | 4 ++++ libexec/rc/rc.d/mountcritlocal | 4 ++++ libexec/rc/rc.d/mountcritremote | 4 ++++ libexec/rc/rc.d/mountd | 6 ++++++ libexec/rc/rc.d/mountlate | 4 ++++ libexec/rc/rc.d/moused | 5 +++++ libexec/rc/rc.d/msgs | 4 ++++ libexec/rc/rc.d/natd | 4 ++++ libexec/rc/rc.d/netif | 4 ++++ libexec/rc/rc.d/netoptions | 4 ++++ libexec/rc/rc.d/netwait | 4 ++++ libexec/rc/rc.d/newsyslog | 4 ++++ libexec/rc/rc.d/nfscbd | 2 ++ libexec/rc/rc.d/nfsclient | 4 ++++ libexec/rc/rc.d/nfsd | 4 ++++ libexec/rc/rc.d/nfsuserd | 4 ++++ libexec/rc/rc.d/nisdomain | 4 ++++ libexec/rc/rc.d/nscd | 3 +++ libexec/rc/rc.d/ntpd | 3 +++ libexec/rc/rc.d/ntpdate | 4 ++++ libexec/rc/rc.d/opensm | 2 ++ libexec/rc/rc.d/os-release | 4 ++++ libexec/rc/rc.d/pf | 3 +++ libexec/rc/rc.d/pflog | 6 ++++++ libexec/rc/rc.d/pfsync | 4 ++++ libexec/rc/rc.d/power_profile | 3 +++ libexec/rc/rc.d/powerd | 4 ++++ libexec/rc/rc.d/ppp | 4 ++++ libexec/rc/rc.d/pppoed | 4 ++++ libexec/rc/rc.d/pwcheck | 4 ++++ libexec/rc/rc.d/quota | 3 +++ libexec/rc/rc.d/random | 4 ++++ libexec/rc/rc.d/rarpd | 2 ++ libexec/rc/rc.d/rctl | 4 ++++ libexec/rc/rc.d/resolv | 4 ++++ libexec/rc/rc.d/rfcomm_pppd_server | 4 ++++ libexec/rc/rc.d/root | 4 ++++ libexec/rc/rc.d/route6d | 2 ++ libexec/rc/rc.d/routed | 2 ++ libexec/rc/rc.d/routing | 4 ++++ libexec/rc/rc.d/rpcbind | 2 ++ libexec/rc/rc.d/rtadvd | 5 +++++ libexec/rc/rc.d/rtsold | 2 ++ libexec/rc/rc.d/rwho | 2 ++ libexec/rc/rc.d/savecore | 4 ++++ libexec/rc/rc.d/sdpd | 3 +++ libexec/rc/rc.d/securelevel | 4 ++++ libexec/rc/rc.d/sendmail | 2 ++ libexec/rc/rc.d/sshd | 6 ++++++ libexec/rc/rc.d/statd | 7 +++++-- libexec/rc/rc.d/static_arp | 4 ++++ libexec/rc/rc.d/static_ndp | 4 ++++ libexec/rc/rc.d/stf | 4 ++++ libexec/rc/rc.d/swap | 4 ++++ libexec/rc/rc.d/swaplate | 4 ++++ libexec/rc/rc.d/syscons | 4 ++++ libexec/rc/rc.d/sysctl | 4 ++++ libexec/rc/rc.d/sysctl_lastload | 4 ++++ libexec/rc/rc.d/syslogd | 2 ++ libexec/rc/rc.d/sysvipc | 4 ++++ libexec/rc/rc.d/tlsclntd | 2 ++ libexec/rc/rc.d/tlsservd | 2 ++ libexec/rc/rc.d/tmp | 3 +++ libexec/rc/rc.d/ubthidhci | 4 ++++ libexec/rc/rc.d/ugidfw | 4 ++++ libexec/rc/rc.d/utx | 4 ++++ libexec/rc/rc.d/var | 3 +++ libexec/rc/rc.d/var_run | 3 +++ libexec/rc/rc.d/virecover | 4 ++++ libexec/rc/rc.d/watchdogd | 4 ++++ libexec/rc/rc.d/wpa_supplicant | 3 +++ libexec/rc/rc.d/ypbind | 2 ++ libexec/rc/rc.d/ypldap | 2 ++ libexec/rc/rc.d/yppasswdd | 2 ++ libexec/rc/rc.d/ypserv | 2 ++ libexec/rc/rc.d/ypset | 3 +++ libexec/rc/rc.d/ypupdated | 2 ++ libexec/rc/rc.d/ypxfrd | 2 ++ libexec/rc/rc.d/zfs | 4 ++++ libexec/rc/rc.d/zfsbe | 4 ++++ libexec/rc/rc.d/zfsd | 4 ++++ libexec/rc/rc.d/zfskeys | 4 ++++ libexec/rc/rc.d/zpool | 4 ++++ libexec/rc/rc.d/zpoolreguid | 4 ++++ libexec/rc/rc.d/zpoolupgrade | 4 ++++ libexec/rc/rc.d/zvol | 4 ++++ 166 files changed, 598 insertions(+), 39 deletions(-) diff --git a/libexec/rc/rc.d/accounting b/libexec/rc/rc.d/accounting index 5c08f18cd2ca..1e0ece84fb15 100755 --- a/libexec/rc/rc.d/accounting +++ b/libexec/rc/rc.d/accounting @@ -76,4 +76,8 @@ accounting_rotate_log() } load_rc_config $name + +# doesn't make sense to run in a svcj: jail can't manipulate accounting +accounting_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/adjkerntz b/libexec/rc/rc.d/adjkerntz index 81ee596369a5..339f8add7201 100755 --- a/libexec/rc/rc.d/adjkerntz +++ b/libexec/rc/rc.d/adjkerntz @@ -14,4 +14,8 @@ start_cmd="adjkerntz -i" stop_cmd=":" load_rc_config $name + +# doesn't make sense to run in a svcj: jail can't modify kerntz +adjkerntz_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/apm b/libexec/rc/rc.d/apm index b2bde4d32d1c..3187f41c3a50 100755 --- a/libexec/rc/rc.d/apm +++ b/libexec/rc/rc.d/apm @@ -43,4 +43,8 @@ apm_status() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +apm_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/apmd b/libexec/rc/rc.d/apmd index 8c6293549dc0..aeb5042342d6 100755 --- a/libexec/rc/rc.d/apmd +++ b/libexec/rc/rc.d/apmd @@ -34,4 +34,8 @@ apmd_prestart() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +apmd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/auditd b/libexec/rc/rc.d/auditd index 90017d88ab85..caea2587a2e9 100755 --- a/libexec/rc/rc.d/auditd +++ b/libexec/rc/rc.d/auditd @@ -32,4 +32,8 @@ auditd_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +auditd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/auditdistd b/libexec/rc/rc.d/auditdistd index e7ae7d64d39d..0814c2a4d2c7 100755 --- a/libexec/rc/rc.d/auditdistd +++ b/libexec/rc/rc.d/auditdistd @@ -17,5 +17,7 @@ command="/usr/sbin/${name}" required_files="/etc/security/${name}.conf" extra_commands="reload" +: ${auditdistd_svcj_options:="net_basic"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/automount b/libexec/rc/rc.d/automount index b01928651ec4..19f367837189 100755 --- a/libexec/rc/rc.d/automount +++ b/libexec/rc/rc.d/automount @@ -28,4 +28,8 @@ automount_stop() } load_rc_config $name + +# mounting shall not be performed in a svcj +automount_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/automountd b/libexec/rc/rc.d/automountd index 4bc6f7d01862..b809e9dfc8ad 100755 --- a/libexec/rc/rc.d/automountd +++ b/libexec/rc/rc.d/automountd @@ -17,4 +17,8 @@ command="/usr/sbin/${name}" required_modules="autofs" load_rc_config $name + +# mounting shall not be performed in a svcj +automountd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/autounmountd b/libexec/rc/rc.d/autounmountd index c939c6d8d011..1d8b3bfa354f 100755 --- a/libexec/rc/rc.d/autounmountd +++ b/libexec/rc/rc.d/autounmountd @@ -16,4 +16,8 @@ pidfile="/var/run/${name}.pid" command="/usr/sbin/${name}" load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +autounmountd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/bgfsck b/libexec/rc/rc.d/bgfsck index 24753f9f561f..dd5c330c3d11 100755 --- a/libexec/rc/rc.d/bgfsck +++ b/libexec/rc/rc.d/bgfsck @@ -46,4 +46,8 @@ bgfsck_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +bgfsck_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/blacklistd b/libexec/rc/rc.d/blacklistd index b58c7c8a76b6..ecbb71e41fca 100755 --- a/libexec/rc/rc.d/blacklistd +++ b/libexec/rc/rc.d/blacklistd @@ -40,5 +40,8 @@ rcvar="blacklistd_enable" command="/usr/sbin/${name}" required_files="/etc/blacklistd.conf" +# no svcj options needed +: ${blacklistd_svcj_options:=""} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/bluetooth b/libexec/rc/rc.d/bluetooth index 679d669a6191..22bd5078034d 100755 --- a/libexec/rc/rc.d/bluetooth +++ b/libexec/rc/rc.d/bluetooth @@ -317,5 +317,8 @@ bluetooth_stop() load_rc_config $name hccontrol="${bluetooth_hccontrol:-/usr/sbin/hccontrol}" +# doesn't make sense to run in a svcj: nojail keyword +bluetooth_svcj="NO" + run_rc_command $* diff --git a/libexec/rc/rc.d/bootparams b/libexec/rc/rc.d/bootparams index ce0b8a45e672..1d435d4ee480 100755 --- a/libexec/rc/rc.d/bootparams +++ b/libexec/rc/rc.d/bootparams @@ -15,5 +15,7 @@ rcvar="bootparamd_enable" required_files="/etc/bootparams" command="/usr/sbin/${name}" +: ${bootparamd_svcj_options:="net_basic"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/bridge b/libexec/rc/rc.d/bridge index a42d82adacc5..98d9212593e5 100755 --- a/libexec/rc/rc.d/bridge +++ b/libexec/rc/rc.d/bridge @@ -90,4 +90,8 @@ bridge_stop() iflist=$2 load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +bridge_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/bsnmpd b/libexec/rc/rc.d/bsnmpd index 60c7242f0c1f..60f4f5e86617 100755 --- a/libexec/rc/rc.d/bsnmpd +++ b/libexec/rc/rc.d/bsnmpd @@ -13,6 +13,8 @@ desc="Simple and extensible SNMP daemon" rcvar="bsnmpd_enable" command="/usr/sbin/${name}" +: ${bsnmpd_svcj_options:="net_basic"} + load_rc_config $name pidfile="${bsnmpd_pidfile:-/var/run/snmpd.pid}" command_args="-p ${pidfile}" diff --git a/libexec/rc/rc.d/bthidd b/libexec/rc/rc.d/bthidd index ec7da8181ca3..4b230406c4d5 100755 --- a/libexec/rc/rc.d/bthidd +++ b/libexec/rc/rc.d/bthidd @@ -50,4 +50,7 @@ if evdev_enabled; then fi required_files="${config}" +# doesn't make sense to run in a svcj: nojail keyword +bthidd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ccd b/libexec/rc/rc.d/ccd index f7dde1c23f4e..5f2427e4beb0 100755 --- a/libexec/rc/rc.d/ccd +++ b/libexec/rc/rc.d/ccd @@ -21,4 +21,8 @@ ccd_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +ccd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cfumass b/libexec/rc/rc.d/cfumass index 79c9b0ae63d4..7d1117d7c388 100755 --- a/libexec/rc/rc.d/cfumass +++ b/libexec/rc/rc.d/cfumass @@ -145,4 +145,8 @@ cfumass_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +cfumass_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cleanvar b/libexec/rc/rc.d/cleanvar index 08e647dde5ae..dce5baa6875b 100755 --- a/libexec/rc/rc.d/cleanvar +++ b/libexec/rc/rc.d/cleanvar @@ -43,4 +43,8 @@ cleanvar_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +cleanvar_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cleartmp b/libexec/rc/rc.d/cleartmp index 8101474b33cf..c4dfb5367dcb 100755 --- a/libexec/rc/rc.d/cleartmp +++ b/libexec/rc/rc.d/cleartmp @@ -57,4 +57,8 @@ cleartmp_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +cleartmp_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cron b/libexec/rc/rc.d/cron index a37d3ceee02e..584db590d835 100755 --- a/libexec/rc/rc.d/cron +++ b/libexec/rc/rc.d/cron @@ -16,6 +16,11 @@ command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" load_rc_config $name + +# doesn't make sense to run in a svcj: in the generic case it may need +# access to more than a jails allows +cron_svcj="NO" + if checkyesno cron_dst then cron_flags="$cron_flags -s" diff --git a/libexec/rc/rc.d/ctld b/libexec/rc/rc.d/ctld index f09c032575d9..c91d7a9be921 100755 --- a/libexec/rc/rc.d/ctld +++ b/libexec/rc/rc.d/ctld @@ -19,4 +19,8 @@ required_modules="ctl" extra_commands="reload" load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +ctld_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ddb b/libexec/rc/rc.d/ddb index 40235bebf90e..08a7d345c326 100755 --- a/libexec/rc/rc.d/ddb +++ b/libexec/rc/rc.d/ddb @@ -35,4 +35,7 @@ load_rc_config $name required_files="${ddb_config}" command_args="${ddb_config}" +# doesn't make sense to run in a svcj: privileged operation +ddb_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/defaultroute b/libexec/rc/rc.d/defaultroute index d8d6b2e97dcd..b96f91d36118 100755 --- a/libexec/rc/rc.d/defaultroute +++ b/libexec/rc/rc.d/defaultroute @@ -70,4 +70,8 @@ defaultroute_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +defaultroute_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd index 43fb9d5928dd..47326662339c 100755 --- a/libexec/rc/rc.d/devd +++ b/libexec/rc/rc.d/devd @@ -38,4 +38,8 @@ devd_prestart() } load_rc_config $name + +# doesn't make sense to run in a svcj: executing potential privileged operations +devd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/devfs b/libexec/rc/rc.d/devfs index b7835bd561ce..9987d35f6ad3 100755 --- a/libexec/rc/rc.d/devfs +++ b/libexec/rc/rc.d/devfs @@ -68,4 +68,8 @@ read_devfs_conf() } load_rc_config $name + +# doesn't make sense to run in a svcj: may need more permissions +devfs_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/devmatch b/libexec/rc/rc.d/devmatch index 67bb14761614..21846355fcfe 100755 --- a/libexec/rc/rc.d/devmatch +++ b/libexec/rc/rc.d/devmatch @@ -78,4 +78,8 @@ devmatch_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: privileged operations +devmatch_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/dhclient b/libexec/rc/rc.d/dhclient index e2f204076eb6..78442da29193 100755 --- a/libexec/rc/rc.d/dhclient +++ b/libexec/rc/rc.d/dhclient @@ -59,6 +59,9 @@ dhclient_prestart() load_rc_config $name load_rc_config network +# dhclient_prestart is not compatible with svcj +dhclient_svcj="NO" + if [ -z $ifn ] ; then # only complain if a command was specified but no interface if [ -n "$1" ] ; then diff --git a/libexec/rc/rc.d/dmesg b/libexec/rc/rc.d/dmesg index ed36ec17b419..51e35d5d4e80 100755 --- a/libexec/rc/rc.d/dmesg +++ b/libexec/rc/rc.d/dmesg @@ -23,4 +23,8 @@ do_dmesg() } load_rc_config $name + +# doesn't make sense to run in a svcj +dmesg_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/dnctl b/libexec/rc/rc.d/dnctl index 7e65b899bd01..9067d278088e 100644 --- a/libexec/rc/rc.d/dnctl +++ b/libexec/rc/rc.d/dnctl @@ -16,6 +16,9 @@ start_cmd="${name}_start" required_files="$dnctl_rules" required_modules="dummynet" +# doesn't make sense to run in a svcj: config setting +dnctl_svcj="NO" + dnctl_start() { startmsg -n "Enabling ${name}" diff --git a/libexec/rc/rc.d/dumpon b/libexec/rc/rc.d/dumpon index a6748711b796..0dfcdb266b20 100755 --- a/libexec/rc/rc.d/dumpon +++ b/libexec/rc/rc.d/dumpon @@ -97,4 +97,8 @@ dumpon_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +dumpon_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/fsck b/libexec/rc/rc.d/fsck index 359733d8484c..e755f055dbe6 100755 --- a/libexec/rc/rc.d/fsck +++ b/libexec/rc/rc.d/fsck @@ -91,4 +91,8 @@ fsck_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +fsck_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ftp-proxy b/libexec/rc/rc.d/ftp-proxy index 250088d6bb35..c77dd36cd60b 100755 --- a/libexec/rc/rc.d/ftp-proxy +++ b/libexec/rc/rc.d/ftp-proxy @@ -13,6 +13,8 @@ desc="Internet File Transfer Protocol proxy daemon" rcvar="ftpproxy_enable" command="/usr/sbin/ftp-proxy" +: ${ftpproxy_svcj_options:="net_basic"} + load_rc_config $name # diff --git a/libexec/rc/rc.d/ftpd b/libexec/rc/rc.d/ftpd index 9bb9a722a2af..e25a561a520a 100755 --- a/libexec/rc/rc.d/ftpd +++ b/libexec/rc/rc.d/ftpd @@ -13,13 +13,11 @@ desc="Internet File Transfer Protocol daemon" rcvar="ftpd_enable" command="/usr/libexec/${name}" pidfile="/var/run/${name}.pid" -start_precmd=ftpd_prestart -ftpd_prestart() -{ - rc_flags="-D ${rc_flags}" - return 0 -} +: ${ftpd_svcj_options:="net_basic"} load_rc_config $name + +flags="-D ${flags} ${rc_flags}" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/geli b/libexec/rc/rc.d/geli index 16d24efd1e39..5fc5ded54ec3 100755 --- a/libexec/rc/rc.d/geli +++ b/libexec/rc/rc.d/geli @@ -121,4 +121,8 @@ geli_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +geli_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/geli2 b/libexec/rc/rc.d/geli2 index 16248d32ece8..cedd48a312ee 100755 --- a/libexec/rc/rc.d/geli2 +++ b/libexec/rc/rc.d/geli2 @@ -55,4 +55,8 @@ geli2_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +geli2_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ggated b/libexec/rc/rc.d/ggated index 22bc8beb7ca0..846019acb055 100755 --- a/libexec/rc/rc.d/ggated +++ b/libexec/rc/rc.d/ggated @@ -14,6 +14,9 @@ pidfile="/var/run/${name}.pid" load_rc_config $name required_files="${ggated_config}" +# XXX?: doesn't make sense to run in a svcj: low-level access +ggated_svcj="NO" + command_args="${ggated_config}" run_rc_command "$1" diff --git a/libexec/rc/rc.d/gptboot b/libexec/rc/rc.d/gptboot index 3f04143e79ec..188f1bb77557 100755 --- a/libexec/rc/rc.d/gptboot +++ b/libexec/rc/rc.d/gptboot @@ -73,4 +73,8 @@ gptboot_report() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +gptboot_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/growfs b/libexec/rc/rc.d/growfs index d16951b4bc3e..86bf199a8611 100755 --- a/libexec/rc/rc.d/growfs +++ b/libexec/rc/rc.d/growfs @@ -306,4 +306,8 @@ growfs_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +growfs_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/growfs_fstab b/libexec/rc/rc.d/growfs_fstab index a9d18c1eaed3..8b7cea3a63e5 100755 --- a/libexec/rc/rc.d/growfs_fstab +++ b/libexec/rc/rc.d/growfs_fstab @@ -58,4 +58,8 @@ growfs_fstab_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +growfs_fstab_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/gssd b/libexec/rc/rc.d/gssd index fa0edcead140..7ab3c181eeb1 100755 --- a/libexec/rc/rc.d/gssd +++ b/libexec/rc/rc.d/gssd @@ -13,5 +13,7 @@ name=gssd desc="Generic Security Services Daemon" rcvar=gssd_enable +: ${gssd_svcj_options:="net_basic nfsd"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/hastd b/libexec/rc/rc.d/hastd index 8c1d9e8bc16a..37df43d26c7d 100755 --- a/libexec/rc/rc.d/hastd +++ b/libexec/rc/rc.d/hastd @@ -26,4 +26,8 @@ hastd_stop_precmd() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +hastd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hcsecd b/libexec/rc/rc.d/hcsecd index 542305040357..8827e53777f3 100755 --- a/libexec/rc/rc.d/hcsecd +++ b/libexec/rc/rc.d/hcsecd @@ -21,4 +21,7 @@ config="${hcsecd_config:-/etc/bluetooth/${name}.conf}" command_args="-f ${config}" required_files="${config}" +# doesn't make sense to run in a svcj: nojail keyword +hcsecd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostapd b/libexec/rc/rc.d/hostapd index fe3dac1dea06..251df91a280b 100755 --- a/libexec/rc/rc.d/hostapd +++ b/libexec/rc/rc.d/hostapd @@ -38,4 +38,8 @@ required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp" extra_commands="reload" load_rc_config ${name} + +# doesn't make sense to run in a svcj: nojail keyword +hostapd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostid b/libexec/rc/rc.d/hostid index 0210ca433501..18d0fbabf6e4 100755 --- a/libexec/rc/rc.d/hostid +++ b/libexec/rc/rc.d/hostid @@ -156,4 +156,8 @@ hostid_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +hostid_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostid_save b/libexec/rc/rc.d/hostid_save index af7f4138a5dd..b9727d24bc57 100755 --- a/libexec/rc/rc.d/hostid_save +++ b/libexec/rc/rc.d/hostid_save @@ -44,4 +44,8 @@ hostid_save() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +hostid_save_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostname b/libexec/rc/rc.d/hostname index f6ac95c9c888..8b26c4f60633 100755 --- a/libexec/rc/rc.d/hostname +++ b/libexec/rc/rc.d/hostname @@ -77,4 +77,8 @@ hostname_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +hostname_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/inetd b/libexec/rc/rc.d/inetd index 9820f8dc319a..81cc18d95be2 100755 --- a/libexec/rc/rc.d/inetd +++ b/libexec/rc/rc.d/inetd @@ -16,5 +16,7 @@ pidfile="/var/run/${name}.pid" required_files="/etc/${name}.conf" extra_commands="reload" +: ${inetd_svcj_options:="net_basic"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/iovctl b/libexec/rc/rc.d/iovctl index 01e16221cc4a..b2404f5665b1 100755 --- a/libexec/rc/rc.d/iovctl +++ b/libexec/rc/rc.d/iovctl @@ -35,4 +35,8 @@ iovctl_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +iovctl_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ip6addrctl b/libexec/rc/rc.d/ip6addrctl index 50d9408d0731..eac1d2729e78 100755 --- a/libexec/rc/rc.d/ip6addrctl +++ b/libexec/rc/rc.d/ip6addrctl @@ -120,4 +120,8 @@ ip6addrctl_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +ipv6addrctl_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter index e951bc9b7878..d0cb09ab527c 100755 --- a/libexec/rc/rc.d/ipfilter +++ b/libexec/rc/rc.d/ipfilter @@ -15,6 +15,9 @@ rcvar="ipfilter_enable" load_rc_config $name stop_precmd="test -f ${ipfilter_rules}" +# doesn't make sense to run in a svcj: config setting +ipfilter_svcj="NO" + start_precmd="$stop_precmd" start_cmd="ipfilter_start" stop_cmd="ipfilter_stop" diff --git a/libexec/rc/rc.d/ipfs b/libexec/rc/rc.d/ipfs index c51527bde43c..2ec4ad3b1d00 100755 --- a/libexec/rc/rc.d/ipfs +++ b/libexec/rc/rc.d/ipfs @@ -49,4 +49,8 @@ ipfs_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +ipfs_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw index 2f6b20a41b1a..6d6f7577828f 100755 --- a/libexec/rc/rc.d/ipfw +++ b/libexec/rc/rc.d/ipfw @@ -163,4 +163,7 @@ ipfw_status() load_rc_config $name firewall_coscripts="/etc/rc.d/natd ${firewall_coscripts}" +# doesn't make sense to run in a svcj: config setting +ipfw_svcj="NO" + run_rc_command $* diff --git a/libexec/rc/rc.d/ipfw_netflow b/libexec/rc/rc.d/ipfw_netflow index 219f0a4facf6..129488ce60d0 100755 --- a/libexec/rc/rc.d/ipfw_netflow +++ b/libexec/rc/rc.d/ipfw_netflow @@ -73,4 +73,7 @@ ipfw_netflow_stop() load_rc_config $name +# doesn't make sense to run in a svcj: config setting +ipfw_netflow_svcj="NO" + run_rc_command $* diff --git a/libexec/rc/rc.d/ipmon b/libexec/rc/rc.d/ipmon index a6449f241b87..3ef0c895ad16 100755 --- a/libexec/rc/rc.d/ipmon +++ b/libexec/rc/rc.d/ipmon @@ -15,6 +15,9 @@ rcvar="ipmon_enable" command="/sbin/${name}" start_precmd="ipmon_precmd" +# no svcj options needed +: ${ipmon_svcj_options:=""} + ipmon_precmd() { # Continue only if ipfilter or ipnat is enabled and the diff --git a/libexec/rc/rc.d/ipnat b/libexec/rc/rc.d/ipnat index 88cf368876d7..56fe443686b1 100755 --- a/libexec/rc/rc.d/ipnat +++ b/libexec/rc/rc.d/ipnat @@ -18,6 +18,9 @@ extra_commands="reload" required_files="${ipnat_rules}" required_modules="ipl:ipfilter" +# doesn't make sense to run in a svcj: config setting +ipnat_svcj="NO" + ipnat_start() { echo "Installing NAT rules." diff --git a/libexec/rc/rc.d/ippool b/libexec/rc/rc.d/ippool index 42cef3faf7eb..0db8bbe98f61 100755 --- a/libexec/rc/rc.d/ippool +++ b/libexec/rc/rc.d/ippool @@ -13,6 +13,10 @@ name="ippool" desc="user interface to the IPFilter pools" rcvar="ippool_enable" load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +ippool_svcj="NO" + start_precmd="ippool_start_precmd" stop_cmd="${ippool_program} -F" reload_cmd="ippool_reload" diff --git a/libexec/rc/rc.d/ipropd_master b/libexec/rc/rc.d/ipropd_master index 9f8e1ee14490..a3ca498afe6c 100755 --- a/libexec/rc/rc.d/ipropd_master +++ b/libexec/rc/rc.d/ipropd_master @@ -14,6 +14,8 @@ required_files="$ipropd_master_keytab" start_precmd=${name}_start_precmd start_postcmd=${name}_start_postcmd +: ${ipropd_master_svcj_options:="net_basic"} + ipropd_master_start_precmd() { @@ -24,10 +26,6 @@ ipropd_master_start_precmd() for _slave in $ipropd_master_slaves; do echo $_slave done > /var/heimdal/slaves || return 1 - command_args="$command_args \ - --keytab=\"$ipropd_master_keytab\" \ - --detach \ - " } ipropd_master_start_postcmd() { @@ -36,4 +34,10 @@ ipropd_master_start_postcmd() } load_rc_config $name + +command_args="$command_args \ + --keytab=\"$ipropd_master_keytab\" \ + --detach \ +" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ipropd_slave b/libexec/rc/rc.d/ipropd_slave index 9d4b06f0e8f3..1735cff3de86 100755 *** 1539 LINES SKIPPED *** From nobody Wed May 22 13:56:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VktCH6Yctz5Lm0j; Wed, 22 May 2024 13:56: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 4VktCH631Hz4BRh; Wed, 22 May 2024 13:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njj99ici+jc/BoaEyjeU+KQq2h4LvuMlmmN0zrAfWrQ=; b=s0rb17e2ALhU/zay882xZTEa6oo6/5Q3BR0PTQcu4YE/8trEPFMnxJ6/tdFujoKqE3AcVh iAhFyOmZnU21WS5I3bNJzCA4S/v2P73+huTcqeJpHABh9MjKZmYVx1ro9a6Q1wHVFMdW12 m1PcyM7s7qteKvUs7U4FSUTtKP66PJ/eUdvx89l4JU3QY9euEQE1NGc0LIamceLlx+IwI4 LCf/2f3K3l1ei7YyWOUDDm5vtfBiVYInBgtkyvOsCRSHNi74STVqIGEzH3MOY07PVPUnUs XjxMm472lQv5RdwSdtuDHgCd7HHLokK4wSAaGQKWJft5IM3tJ0oSsjV9PDsjrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716386219; a=rsa-sha256; cv=none; b=KvankGizJ3zVQMAR9rCxr5cFZ6ae0O/6qS4BoPEFJ9YBQDyJiRWIclN3NybVzSHwZYvKku iBhk+iUNGYtILAszzBiwp5U5iXgQ2MwkNgheni3Kb9XQA3rru27J15iZ4BG9Mb9UtAlM4v TLcwznVK5zTy7TMt0CE/+P1caDJjSjd8hgrAe0PGwhYyDPCqoT4OUS+nFMjl/531obSBLn PB3jztpDd4wRlIruonRJbNSNOVbyaxU1hOyXP99HinnMhIuS6EGhI+EAzAE4xHDIOSPBWn FNVw/dA6pLFrYJrC2dEEPzfvpQ/E/PDUwX5vb18nGAa1mvZjtk6eGDIpGTZCsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njj99ici+jc/BoaEyjeU+KQq2h4LvuMlmmN0zrAfWrQ=; b=bLn+fGu0Le4qFDXWEoLObxsRTrWfiVJHap2zFXHiWWD1Fcysw/sXJhmEifa5CK140UyR8W M2FFg9eBkQNMMger3iF9lPWVHaiqqVEjVR/ZugqD/0H8hd3MXKg6zZbB+XibcKXKUpCOU/ Ckk1imZyaoV5W/TGZuOBjoSk6b454L/6nFc40boNVAHAcBr42qb+uEIxQss3cfLMS4qO5d KWAfGQ3+WP3xq3V0H/2mfuW2ObmkcpUECna/qO+oBEyFOW+jZwtfOu/2W7PxzBi+E29sCy wvBoRoCDrwd8+QL/vTNCUcV6YcShMkszNGSNk7tgjc04KhA18FdZJcIWZSnwLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VktCH5f7yz16tY; Wed, 22 May 2024 13:56: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 44MDuxb7050361; Wed, 22 May 2024 13:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDuxV4050358; Wed, 22 May 2024 13:56:59 GMT (envelope-from git) Date: Wed, 22 May 2024 13:56:59 GMT Message-Id: <202405221356.44MDuxV4050358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: eaab8e4166a0 - main - mac_do(4): fix typo List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eaab8e4166a02212cb7d6aea4304834d9bcf5ff9 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=eaab8e4166a02212cb7d6aea4304834d9bcf5ff9 commit eaab8e4166a02212cb7d6aea4304834d9bcf5ff9 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-22 13:56:03 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-22 13:56:36 +0000 mac_do(4): fix typo Reported by: Gary Jennejohn <garyj@gmx.de> --- share/man/man4/mac_do.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index 9a9ebe1ca989..ce9f8cf25a4a 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -27,7 +27,7 @@ according to predefined rules. The exact set of kernel privileges granted are: .Bl -inset -compact -offset indent .It Dv PRIV_CRED_SETGROUPS -.It Dv PRIV_CRET_SETUID +.It Dv PRIV_CRED_SETUID .El .Pp The following From nobody Wed May 22 14:47:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkvL51HfQz5Lqv9; Wed, 22 May 2024 14:47: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 4VkvL45ksgz4KKy; Wed, 22 May 2024 14:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqt+IbyqqaH1mJ8rd38cubPEVPCuljqih54NBaMbSyU=; b=H/2JR0sdUqOUxBPgv5/lfXM+QdTdJHcEC6j3M5i2LoHr4Y6XVaaP2x8gbE+c/duNSz4nBc LF+NXGa//HXnBDw0bSEQFX4FZDw5K9NvjsyxWBLewBAw5IqCn1IGBa0/0vlA6hRh1hbfPT qKCdJlrpMLUF3+gYC8nXK3JGq0Agr9XE6M/YAZKclxwbOjuIaMNMUzzvLotX7g8QsbcKnm SEcALXJAf3/8miqXroiug0SoX+6lA6PB7vjhp2993d+SYU+t3+qT3mRUV7lmTvzHM6u8Hi faspnACiNqPhU/R9UTMV32qv4gPuHd5xRspufwbpoy8lrerVl4ZEzLENGPY82A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716389276; a=rsa-sha256; cv=none; b=trsPKWXec/KtS+X01vp7Y5njv+DHzMq3aCJQ94BYCNdgIb1uWA9W08O13Pac9o/fZ7pfeX AJWNC3a/OU/ZppajGYv0iIvlC66iami2Bu8M9ScT2n/n59ygQ9y74FCEkipU47EGdjZ57j ziTTvBjdhRIYycomohgixjj0+Pdp1ybDUGnfET/IRafOm50tTDu/9i6kdpOw0hWIBJfDc5 TcJknmZ6cOLEO2BOkfENNbAjHJrlPc1cQd2g+D7VnFVbZumesJS0GzSzeIDQ6elU+Lb5Ym JXgAVHEKVwjJmvgqRxckcEZ2GF3+tH9hf8uv/79+XT5JWhWS1IZnKZ9+ZL9lpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqt+IbyqqaH1mJ8rd38cubPEVPCuljqih54NBaMbSyU=; b=Eejoq7sPljS24MLDz96lFqF55TfH0GQByb/6nfCcRvjIKHhR54QOFKKbxgUZxBOY1sSOby 1em4u6foabI8iiyYALEQXFnagznHcpMj1fnSza3/TktZG6dbv/JcNMMzO+6jkrK6KcScuK rEwt0JIR3CBWachOKNaytzcflRIA4Y4V0ti7QQElNGNLQUA4MdorpzQdqcbiyBx0gWg3GM 9oLV9UiGqPZbUBV+l9hCq/5d10aQB+9GWs+sjsJNAa2vKzmQe3sOc1islCWPPLwa7VFFIy nujbiUUMSDPExFw++qhFJ2gBUX9onMeWIX9GK51J6AZdhBHzQzgieAdgzxG8Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkvL45BQBz18CZ; Wed, 22 May 2024 14:47: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 44MElumo036836; Wed, 22 May 2024 14:47:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MEluXH036833; Wed, 22 May 2024 14:47:56 GMT (envelope-from git) Date: Wed, 22 May 2024 14:47:56 GMT Message-Id: <202405221447.44MEluXH036833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj <pkubaj@FreeBSD.org> Subject: git: b7f62c6042f8 - main - usr.bin/top: fix displaying load average for loads of at least 100 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7f62c6042f8b4b322d9fa20a8c6a81a9a58c164 Auto-Submitted: auto-generated The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=b7f62c6042f8b4b322d9fa20a8c6a81a9a58c164 commit b7f62c6042f8b4b322d9fa20a8c6a81a9a58c164 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2024-05-21 10:28:35 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2024-05-22 14:47:46 +0000 usr.bin/top: fix displaying load average for loads of at least 100 After top registers load average of at least 100 which then gets reduced to below 100, there are left stray digits. Supporting load over 100 requires increasing the width only to 6, but since we support over 1000 CPU's now, let's increase it to 7. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45284 --- usr.bin/top/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/display.c b/usr.bin/top/display.c index 32b8b12798dc..b6cde0e63aa7 100644 --- a/usr.bin/top/display.c +++ b/usr.bin/top/display.c @@ -252,7 +252,7 @@ i_loadave(int mpid, double avenrun[]) for (i = 0; i < 3; i++) { - printf("%c %5.2f", + printf("%c %7.2f", i == 0 ? ':' : ',', avenrun[i]); } @@ -289,7 +289,7 @@ u_loadave(int mpid, double *avenrun) /* we should optimize this and only display changes */ for (i = 0; i < 3; i++) { - printf("%s%5.2f", + printf("%s%7.2f", i == 0 ? "" : ", ", avenrun[i]); } From nobody Wed May 22 14:55:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkvVz2sxTz5LrHB; Wed, 22 May 2024 14:55: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 4VkvVz2Ck7z4LrD; Wed, 22 May 2024 14:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yJv/pwv9xGi2q5Gkt4Czp3DBUlGy6aZTRt3yr2bGeN4=; b=U4yiTUn53mo8vb4QKsh9lxzBd3jDbL9emRdr2K9ow3kmvISDNlPlaT6imLzSywfLmoJ+Je leQQP9E4vBP8AqNWaku3IhFz8AMbYixapY1H8P9FQoN50zarACSBFFV7G4S86yIhsgQEpf qc8NMLjXAsVS3pZIFauX0yWfcViyy92X+9jgIt3u2OkUa7D/fZcb1E0g+ouUfqB4Bo/QSv jNlJY0TjYhmFT0tYBu6k8ofTX1lfccaYeXhPLrBIA+rs8XKwGcyaWYIkkIC6aHHxNnWzQ2 ZwlK0OtWcwMpoNbpuz/fkSmFTORrkS/SnZ9qToQgT8HnM5+PZaseQ0BPxvqCWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716389739; a=rsa-sha256; cv=none; b=OTAlCKAQEVVRvJE5ArTSWRJpSRmt4zlXRnQ9RhVuSGftO0T3xHBXxKqct/DK+OBX1wIzqG 8SosncfFnfKkhh2o1q6li/MfY0ZUZBuB0zxWdB6ZVnC1E7CBbuGMDqTKyYBnq6A7/Q9hPi KIxs41uIjZu7PnVQiBGuna9quh+g/m4aakfXKjOtVBCnypKWtSytezr6QHzzDN4R+klwNT fvI+qWK0a/DhQNySphIgCl6hX7W1PXKPx5vHHXhOtL9yBnejGJhvWldWLwNtR5kPW/ys4/ jm9iVSxqynUh+CXKC4/hDjCSDI7/rhIj0CYFmnXhTB4R5EMxlBHUrClAJnuljg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yJv/pwv9xGi2q5Gkt4Czp3DBUlGy6aZTRt3yr2bGeN4=; b=qVrg8v23z3TlFo0jUKEUYGepUbTQIrCDXjPemLdMJRDOnFr6adIxl3DSYBGp7lWA+3Q+Kj +asqT3dbXPkmss8ZZ/xGwsImoGwRkl94Xfk2rPeO5/sbU0l4nD895vLfKMUfccOufBXx/X mjRP5shJmPJfpQaG3R7xRVkXIQlDjbkhGVcFVbaCJvmpf8EFh0FQ6LQtQr66wXAXp1/HyW iySFJKNX1ugtobUCvxPZalpT95mWpLEVclTckOjx+flOfOCxORZMws1a6cI6xTUME2AQp6 kFLyrv+eDa7UoRBjumR87gJ556SRF5jHXjq18wPrP5cexIkhbO6sBHIQbdZ+cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkvVz1jVdz17wh; Wed, 22 May 2024 14:55: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 44MEtdDW052846; Wed, 22 May 2024 14:55:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MEtdEn052843; Wed, 22 May 2024 14:55:39 GMT (envelope-from git) Date: Wed, 22 May 2024 14:55:39 GMT Message-Id: <202405221455.44MEtdEn052843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby <rlibby@FreeBSD.org> Subject: git: bea2bf458d2c - main - tpm_if.m: declare bus addresses as bus_size_t not bus_addr_t List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bea2bf458d2cc030e97fd7b9c210b3ee97ee8d79 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=bea2bf458d2cc030e97fd7b9c210b3ee97ee8d79 commit bea2bf458d2cc030e97fd7b9c210b3ee97ee8d79 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-05-22 14:55:04 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-05-22 14:55:04 +0000 tpm_if.m: declare bus addresses as bus_size_t not bus_addr_t Do like bus_space(9) does. This fixes the build on platforms where bus_addr_t and bus_size_t are different (like i386 PAE). Reviewed by: jhibbits Fixes: c2e9c5bbf022 tpm: Refactor TIS and add a SPI attachment Differential Revision: https://reviews.freebsd.org/D45287 --- sys/dev/tpm/tpm_bus.c | 2 +- sys/dev/tpm/tpm_if.m | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/tpm/tpm_bus.c b/sys/dev/tpm/tpm_bus.c index f0d3c26c33f1..6e2cc5d81cb6 100644 --- a/sys/dev/tpm/tpm_bus.c +++ b/sys/dev/tpm/tpm_bus.c @@ -77,7 +77,7 @@ tpm_write_4(device_t dev, bus_size_t off, uint32_t val) } static void -tpm_write_barrier(device_t dev, bus_addr_t off, bus_size_t length) +tpm_write_barrier(device_t dev, bus_size_t off, bus_size_t length) { struct tpm_sc *sc = device_get_softc(dev); diff --git a/sys/dev/tpm/tpm_if.m b/sys/dev/tpm/tpm_if.m index 2b6afe22f3e8..b0149ba163a6 100644 --- a/sys/dev/tpm/tpm_if.m +++ b/sys/dev/tpm/tpm_if.m @@ -41,7 +41,7 @@ METHOD int transmit { METHOD uint64_t read_8 { device_t dev; - bus_addr_t addr; + bus_size_t addr; } # @@ -49,28 +49,28 @@ METHOD uint64_t read_8 { # METHOD uint32_t read_4 { device_t dev; - bus_addr_t addr; + bus_size_t addr; }; METHOD uint8_t read_1 { device_t dev; - bus_addr_t addr; + bus_size_t addr; }; METHOD void write_4 { device_t dev; - bus_addr_t addr; + bus_size_t addr; uint32_t value; }; METHOD void write_1 { device_t dev; - bus_addr_t addr; + bus_size_t addr; uint8_t value; }; METHOD void write_barrier { device_t dev; - bus_addr_t off; + bus_size_t off; bus_size_t length; } From nobody Wed May 22 15:07:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkvmK1GM1z5LsRp; Wed, 22 May 2024 15:07:13 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkvmK0M0nz4NLn; Wed, 22 May 2024 15:07:13 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716390433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N+yYaUavOP62Bt5xOHK4bC39wbJsVWShv4RnyxbMN30=; b=EGhRrKcOZ0xRwLlylKCi9OaGkK60eou4igY+XTou3Ru87vvtFX96jNAXRHOIslSAM74nwI Vp+qZQWJUrT8/7QskooR/13ljlx/6AmS/e0pUmbhM27lgK5NzuYJ8dy3C52/9vygV+wD1p VRd7xFPjKoa+G59uPposGqLxcgPOytcPgeb70jrbC5TvISHYuFijJnEjE/cUImcHa38V6r yqj61iJUyYy3RTprhFN+QFtNaulILiE83Ebo30VtQryjxkLanC5NQZz2rIQye4yv048Yz1 s/iv6S8flHf6YT4k5ZtUaferSvbPlHKkz5oEvoYbJIm1lI23M4AmYCaxIjtNDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716390433; a=rsa-sha256; cv=none; b=y1GzYX6MDkyK31XnbdQ9AyqJwgvXeluJ9GO8f/sGdvpS0Y9omDlJjrqCVzGCmHW+7G197L bnrinWeBq7cGFmpWrWq5UsVEVOU3KHPm610MyB7fIv5wcl0fufHWzQS1UT6l+lQtESJ3YB g9vgpsQO9eX7Yre2y370HkW7rOdt+Ep+3n3yGvQnkmUbM2AmljLCWt84OUFeTLF9MM8NOa jrzDeq+UjRaV7PFTtMMbsLbqsrxIp6grR3G6rabkow/2WgmF9mumT+0gA8vl3vMgGLFp1U uLXWjO2/zSDcHNlP25X01bF37A2KoKj1y5od2QVlpxqLPP4NgsGm/zf9ruoFsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716390433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N+yYaUavOP62Bt5xOHK4bC39wbJsVWShv4RnyxbMN30=; b=FnKzxZSHrtXoTGrMYDr/EhOoSNXsix220nA4HiJ8yx6uNR+ZSRXE7NlX5X9P1UuFV0NIeI ze+HnNjJBCGm+s2rnIS3DY2Mw84Zk07k6Q13kPH7BzMMwES5bINEm/HbTCuMNMD2SP1/d1 YsSJO5T/sF9xuGMbAC8IlkTX90O/e1LRo/6unsmN5f/HiZ/ksg9q00COajZhdOE6mVim1H Jy39+ON7O5sgvBrgaUOStdarLn/AI9c2DvoDcsHP/YDvEYLzz1Elpg8A/3yGbfEj3NOnhx qbX3UiqFqiJoPCJPFONb51+JMU0tutXb4cz3GWmzUGOAAZX4jwqgQ1Fr1xjdpg== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VkvmJ6M56zyPT; Wed, 22 May 2024 15:07:12 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 58AF11F7FFF; Wed, 22 May 2024 17:07:11 +0200 (CEST) Date: Wed, 22 May 2024 17:07:11 +0200 From: Baptiste Daroussin <bapt@freebsd.org> To: Michael Osipov <michaelo@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Message-ID: <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202405030740.4437eWUC034126@gitrepo.freebsd.org> On Fri 03 May 07:40, Michael Osipov wrote: > The branch main has been updated by michaelo: > > URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed > > commit aa48259f337100e79933d660fec8856371f761ed > Author: Michael Osipov <michaelo@FreeBSD.org> > AuthorDate: 2024-04-15 11:05:17 +0000 > Commit: Michael Osipov <michaelo@FreeBSD.org> > CommitDate: 2024-05-03 07:38:55 +0000 > > periodic.conf: remove long deprecated security_daily_compat_var() > > This function is documented to be gone in after 11. Time to remove this > compat shim. > > PR: 275296 > Reviewed by: jrm (mentor) > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D44796 this broke pkg's periodic script, I would have appreciated a heads up to give me time to prepare a release compatible prior this commit. This also breaks some ports. Bapt From nobody Wed May 22 16:06:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkx591NlJz5LxpT; Wed, 22 May 2024 16:06: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 4Vkx590Pg1z4TJF; Wed, 22 May 2024 16:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pE8yhvksUc1e0C6VLjxZXpaUitkD86oKte+VdwphOW8=; b=A/X7T2H53gfsZCpnDroiIRHpXVzC4474I+TWcKxtYAkYSjNBrKqBGWrk5eTkgxXU+B0Ieq jlew2ZNKo1K5XhJi811GqG8e1Le4Xlui85kmhr+mV4KK4dYd0CeBKqoAKQpCH7KJXdpvMB k1MJ7sxm3f2cP17sjFfCWqc/t+inMkw7G2zlmg1mj4YVQp8J6bxjHHtzTucBc7TOfql/H4 dXDy9RvZsbHc7hISY8sTb359vguNlBv+XlEbn+Yf8u/1E8JeMK0hs+Yyt+SWcJLRdJz5XF 3/M3nTDG4w0Jwir2eJ+cbO5kqB2YbjWJ+qhFpgnIqRyyzU67UH4I/keN9sPOAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716394013; a=rsa-sha256; cv=none; b=uWhDjoi6CrF1qmeHzPHe8sylSDyQJ4rWwwdh6QpilgUSZP/BOMrxqMBLhfH3gZh2P7FkZa Ym2Wr/VObZKwomWPzJJ5Kw/co0FcMotNnjpkvYdOEwU0pnzeeo1TPaqmTs0ztT8aVlrsa7 YC1e8ukWl6tm6LT+pjgMnBjSe0hkF3Vm1Lw6NiZ9rKvFnAkKHafJMqkjzbm2aP1txqfupf nUPWYLxQ1HoTk5QLNootjOR3xPvx2HGwvDNvPEbP1NJIxJ12KJUFehNpOrDlub8X9d/qwc ztKSn/sm4SfMl3V67ADzPlzgL/2jv7Lx9AGqJmUPiyRvl4sgTwdnBoIzKJyVoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pE8yhvksUc1e0C6VLjxZXpaUitkD86oKte+VdwphOW8=; b=ldQDIv0pUPwaBTQzNu8liHDOZk02hiAXCM9ieQyWb0LJ0HRDv2RimbrIu0v2j2aKicCiYy qz92a7+K1srHvhcSL0K5li3LoyG6LEs9TLCtyRw4hKhFcOlHspVYyKCjFp0JlP3KCbZY1G geeFztpFxR6QvOXFoxj6xY2A+S/O8T2GngzogQzoUHrXW6SqB/QHLUrxS/CXA8zg6utjYD zuw726OmCRe5GhMQaZqqNriTlluVMg+PNZIpnrKQv4MxQJFoqThYzEOVP1mj5qHRKIa1Hg hmaxdumnTtIzXGlTjDdyPhSzt2acqx7T6KP+/YyhPqq9nhU36OsdkfEZF5OSEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkx5900p5z1BR3; Wed, 22 May 2024 16:06: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 44MG6qAI072516; Wed, 22 May 2024 16:06:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MG6qXq072513; Wed, 22 May 2024 16:06:52 GMT (envelope-from git) Date: Wed, 22 May 2024 16:06:52 GMT Message-Id: <202405221606.44MG6qXq072513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin <br@FreeBSD.org> Subject: git: ddd0d4f4cd65 - main - riscv: Fix SSTC extension support List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddd0d4f4cd65341a07bb3bb833dee7982018fd60 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=ddd0d4f4cd65341a07bb3bb833dee7982018fd60 commit ddd0d4f4cd65341a07bb3bb833dee7982018fd60 Author: Ruslan Bukin <br@FreeBSD.org> AuthorDate: 2024-05-22 14:51:45 +0000 Commit: Ruslan Bukin <br@FreeBSD.org> CommitDate: 2024-05-22 15:44:03 +0000 riscv: Fix SSTC extension support From the SSTC spec: "If the stimecmp (supervisor-mode timer compare) register is implemented, then STIP is read-only in mip and reflects the supervisor-level timer interrupt signal resulting from stimecmp. This timer interrupt signal is cleared by writing stimecmp with a value greater than the current time value." This fixes operation in Spike with sstc extension enabled. Example: spike --isa RV64IMAFDCH_zicntr_zihpm_sstc Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D45226 --- sys/riscv/riscv/timer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/riscv/riscv/timer.c b/sys/riscv/riscv/timer.c index 06806872d9fd..456dd463ab2a 100644 --- a/sys/riscv/riscv/timer.c +++ b/sys/riscv/riscv/timer.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015-2017 Ruslan Bukin <br@bsdpad.com> + * Copyright (c) 2015-2024 Ruslan Bukin <br@bsdpad.com> * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -143,7 +143,10 @@ riscv_timer_intr(void *arg) sc = (struct riscv_timer_softc *)arg; - csr_clear(sip, SIP_STIP); + if (has_sstc) + csr_write(stimecmp, -1UL); + else + csr_clear(sip, SIP_STIP); if (sc->et.et_active) sc->et.et_event_cb(&sc->et, sc->et.et_arg); From nobody Wed May 22 16:06:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkx5B27T6z5LxbB; Wed, 22 May 2024 16:06: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 4Vkx5B1ShPz4Srx; Wed, 22 May 2024 16:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30+sTgeLdmIeK/Q7Ss3XUcmVMUWQXL5K+i7WJfkd2CI=; b=yXDJPZScrvzXWN3r2aOnQyDqXrHmA7rAjSxLLxPqFFNVVUDtaNygjvfcevfC89h18F2nNd WKbG/Gwhm//eOv6N13sP3MDrXxztGVVZsub6A++o/qZTHbwhOnPKGKA57LXW+Rndh1HLxX OnlqhLmRWR11YPijU3JXSij7PkZMznNiKFnkmLAX5x67xQhMklX+CwEGePD/XSL/XhF7tw KVOdnVVAE/d4ldc9awxB8836rcgXUDs/9sX3TlOUxH0g52IhL+e+9vs2Iep/cwk/WJV5sb Ot3/9sHMZf/I6LYF/ogt/gERdWsIg9sIILmzuQsUa7qzRpOPVZlnRy1BKKp0gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716394014; a=rsa-sha256; cv=none; b=r1U6ZyQmtS6VVnlmxeXU4E10855ZMiq2IDielC4/e+FYhOnJ9uLyvjH0eAE72Z4HJxlRNE smspxWYoKQK/iJEodfgoyes+CSBgJeuPVIngj8c8d8ezXarkYrk+ho7euyeTjetNcYD7R7 IrmE9uE7JFU2m9hN1n8b0lPeiNltTGWu+c9IxmOScB9ohmq4HsWpuP/S6y1ZmPurNBEiox XmvfYyx7oHDmNKlhb0voLicEZ/WRgYqchqn/HiNo1uxKv8YEi5ivZI4aQGLaIogHbZXLJn +Qt1ZizskyS3vD87vFykkdTBbIqSEFTVY01HcWQK2qIMtuMHNGd/Iv6iiyl6QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30+sTgeLdmIeK/Q7Ss3XUcmVMUWQXL5K+i7WJfkd2CI=; b=KNuIzGMX+mv5MXOUx6za44Zbiv8S/HOUIQYd6gHSRfDHMAkifIERk0oleK7eAVcLQNl2i7 lnDYddktoecmy+0C5FD3cpg3V8G14lRZIJ4BgOE2ZOar0V8uolWz4WG/H2c4bMw7hcOyxm xzfD3cpafrqgEZhgWs/rASeHpWGT9EZiBuisHo3IaIWulQq5yN5Jm7M0pbLxwUhPlxsJqO XC8x7tPj33EJHv8XPOepB3Qm2SgW+tCdATWmaRWps5PaNEZArinRl2hdYvJQgC//AJMvZA ef1TEpV4KurNJj3j67Q5Ia/TadkEBuv+D+CZXGdv5SAHCg4Y9LKIOYxLzn/2rA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vkx5B0zCcz1BR4; Wed, 22 May 2024 16:06: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 44MG6sIU072568; Wed, 22 May 2024 16:06:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MG6st5072565; Wed, 22 May 2024 16:06:54 GMT (envelope-from git) Date: Wed, 22 May 2024 16:06:54 GMT Message-Id: <202405221606.44MG6st5072565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin <br@FreeBSD.org> Subject: git: 2183004e14a8 - main - riscv: Implement atomic operations List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2183004e14a863d65ca9192df1bea2625e3fdfb3 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=2183004e14a863d65ca9192df1bea2625e3fdfb3 commit 2183004e14a863d65ca9192df1bea2625e3fdfb3 Author: Ruslan Bukin <br@FreeBSD.org> AuthorDate: 2024-05-22 15:07:27 +0000 Commit: Ruslan Bukin <br@FreeBSD.org> CommitDate: 2024-05-22 15:45:11 +0000 riscv: Implement atomic operations Implement atomic_load_acq_16, atomic_store_rel_16. These are needed by bhyve(8) PCIe bus emulation code. Group 16-bit atomic functions similarly to 32 and 64-bit. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D45228 --- sys/riscv/include/atomic.h | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index ef9aa5ef057d..03c1327d74da 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> + * Copyright (c) 2015-2024 Ruslan Bukin <br@bsdpad.com> * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -105,8 +105,6 @@ atomic_fcmpset_rel_##WIDTH(__volatile uint##WIDTH##_t *p, \ ATOMIC_CMPSET_ACQ_REL(8); ATOMIC_FCMPSET_ACQ_REL(8); -ATOMIC_CMPSET_ACQ_REL(16); -ATOMIC_FCMPSET_ACQ_REL(16); #define atomic_cmpset_char atomic_cmpset_8 #define atomic_cmpset_acq_char atomic_cmpset_acq_8 @@ -116,11 +114,40 @@ ATOMIC_FCMPSET_ACQ_REL(16); #define atomic_fcmpset_rel_char atomic_fcmpset_rel_8 #define atomic_cmpset_short atomic_cmpset_16 -#define atomic_cmpset_acq_short atomic_cmpset_acq_16 -#define atomic_cmpset_rel_short atomic_cmpset_rel_16 #define atomic_fcmpset_short atomic_fcmpset_16 + +ATOMIC_CMPSET_ACQ_REL(16); +ATOMIC_FCMPSET_ACQ_REL(16); + +#define atomic_load_acq_16 atomic_load_acq_16 +static __inline uint16_t +atomic_load_acq_16(volatile uint16_t *p) +{ + uint16_t ret; + + ret = *p; + + fence(); + + return (ret); +} + +static __inline void +atomic_store_rel_16(volatile uint16_t *p, uint16_t val) +{ + + fence(); + + *p = val; +} + +#define atomic_cmpset_acq_short atomic_cmpset_acq_16 #define atomic_fcmpset_acq_short atomic_fcmpset_acq_16 +#define atomic_load_acq_short atomic_load_acq_16 + +#define atomic_cmpset_rel_short atomic_cmpset_rel_16 #define atomic_fcmpset_rel_short atomic_fcmpset_rel_16 +#define atomic_store_rel_short atomic_store_rel_16 static __inline void atomic_add_32(volatile uint32_t *p, uint32_t val) From nobody Wed May 22 17:03:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkyLX0C0Dz5M3Gg; Wed, 22 May 2024 17:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkyLW6r1lz4d6t; Wed, 22 May 2024 17:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3e9tsb5JgtNyj0SNJvjy/9z6JDjec333DqryQ18e6+c=; b=tfNidW1Jp9Bn9+I0AzlLRVSGr35wfOZqMu7dB8Tlb/VF35P2NbFrbYrZqHHBsOhWbwLi5x lPGAicanuHji58kjNTDg12Rnx9EDad4sxKf7Ytytyjk+bxZpfi6Ha9BeXrHU0hNnx5XLKc jhUWcZ2cZU8w739sRNxcLEZOPx/o1sjusNDZutrqcGGRFKe9BoIkg9QItvRcDF56WZA4lN e9XqDulKNPK+K4ioPvXN41X8f56xpXXyiQoP8aXmhOJf1ufYUbz4prXXwXaD2PIF2MJwCW ZGuYUwIgogTwuLDhdxInh/dWsjPvrpfN03Emt+CF1nq9iv/w3hU2JoRll1YR9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716397412; a=rsa-sha256; cv=none; b=lrH+rkhOctOpworT+Nu7UlJg8cWeuYCQwJ7H2aB6vyGdezOxgQk1PuhlnNrP/8ROYptCeM Qw9SHxigiSVO7kNKV+Wz8nQIiSYpVArQQCcko9X9Vs94BMPFZwctThSa8O1xi4K0XDZN+s BcXgE4Ws1D/4hvFyCyEo3bSMbdFnJb3HewyXQkuxgbqSgb17UWMCU75FeEEouWHmZ77xvR l9fApW34O1Gu9/HkUmIkSuaoYRP2rwvQSGaU5FpQTtuTaqC7Ijwweq4boblZaYUtZBS5U4 aHPRsEuP1eE7RdyCDO+IClAOONwqckc02mHceBNrWr+OdiIyDfwBYfTGvjgm3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3e9tsb5JgtNyj0SNJvjy/9z6JDjec333DqryQ18e6+c=; b=QpzOfsR0/vNm7Bad1m56YZsvjVSk+KUfRt5tkBd6jExYXHc7joPSnucHqds3/5Y5ZiJP17 ax42L61QBSSBRzlNmqvv749SX6w1f+4YRibYTJYuYzZ88hyMT0EW8+BA+dg9zbxaNNVjgM vAnMq9Zke8tn3Yz1UKtIprfC+BjT10Y2pcGdNoooUG54/QZCCvyX6YIJ4qu3v3NEjkQAsE CajQOLMaunATYGL4yXgIE2zQd/9Abcq+boPtVXRGBZcsfwryxJaOQWFEH9/PJu2NzBizoi oSLrLlCEDfzlP+3c62tbdLNf3cRTmMUwa7+YJOxHEAefGarqINi39UBFxr/XFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkyLW6RLKzDxs; Wed, 22 May 2024 17:03:31 +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 44MH3VU4074793; Wed, 22 May 2024 17:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MH3VJA074790; Wed, 22 May 2024 17:03:31 GMT (envelope-from git) Date: Wed, 22 May 2024 17:03:31 GMT Message-Id: <202405221703.44MH3VJA074790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 82854693aec1 - main - arm64: Allow userspace to be built with PAC and BTI List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82854693aec11f87f1f0560e8395452b64f1770f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=82854693aec11f87f1f0560e8395452b64f1770f commit 82854693aec11f87f1f0560e8395452b64f1770f Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 15:54:32 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 17:02:26 +0000 arm64: Allow userspace to be built with PAC and BTI Add the WITH/WITHOUT_BRANCH_PROTECTION build flags. This can be used to enable the use of pointer authentication (FEAT_PAuth) and branch target identification (FEAT_BTI) in userspace. The kernel already handles both of these is userspace, we just need to enable it. Leave disabled for a short period for this to settle before enabling. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42596 --- lib/libomp/Makefile | 3 +++ share/mk/bsd.lib.mk | 6 ++++++ share/mk/bsd.opts.mk | 5 +++++ share/mk/bsd.prog.mk | 6 ++++++ stand/Makefile.inc | 3 +++ tools/build/options/WITHOUT_BRANCH_PROTECTION | 1 + tools/build/options/WITH_BRANCH_PROTECTION | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/lib/libomp/Makefile b/lib/libomp/Makefile index aa9e6799ab59..2be8a207a219 100644 --- a/lib/libomp/Makefile +++ b/lib/libomp/Makefile @@ -1,4 +1,7 @@ +# z_Linux_asm.S is missing BTI support +MK_BRANCH_PROTECTION=no + .include <bsd.compiler.mk> SHLIB_NAME= libomp.so diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 981d0b49df39..575b521bea55 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -97,6 +97,12 @@ LDFLAGS+= -Wl,-zretpolineplt .endif # LLD sensibly defaults to -znoexecstack, so do the same for BFD LDFLAGS.bfd+= -Wl,-znoexecstack +.if ${MK_BRANCH_PROTECTION} != "no" +CFLAGS+= -mbranch-protection=standard +.if ${MACHINE_ARCH} == "aarch64" && defined(BTI_REPORT_ERROR) +LDFLAGS+= -Wl,-zbti-report=error +.endif +.endif # Initialize stack variables on function entry .if ${OPT_INIT_ALL} != "none" diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 65ae4f4cfa7c..18098c93605c 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -74,6 +74,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ ASAN \ BIND_NOW \ + BRANCH_PROTECTION \ CCACHE_BUILD \ CTF \ INSTALL_AS_USER \ @@ -102,6 +103,10 @@ __DEFAULT_NO_OPTIONS+= PIE __DEFAULT_YES_OPTIONS+=PIE .endif +.if ${MACHINE_CPUARCH} != "aarch64" +BROKEN_OPTIONS+= BRANCH_PROTECTION +.endif + __SINGLE_OPTIONS = \ INIT_ALL diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index c546c4f0b680..74a653057bda 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -69,6 +69,12 @@ LDFLAGS+= -Wl,-zretpolineplt .endif # LLD sensibly defaults to -znoexecstack, so do the same for BFD LDFLAGS.bfd+= -Wl,-znoexecstack +.if ${MK_BRANCH_PROTECTION} != "no" +CFLAGS+= -mbranch-protection=standard +.if ${MACHINE_ARCH} == "aarch64" && defined(BTI_REPORT_ERROR) +LDFLAGS+= -Wl,-zbti-report=error +.endif +.endif # Initialize stack variables on function entry .if ${OPT_INIT_ALL} != "none" diff --git a/stand/Makefile.inc b/stand/Makefile.inc index 13b3f2a1f418..391de6abc6d4 100644 --- a/stand/Makefile.inc +++ b/stand/Makefile.inc @@ -1,4 +1,7 @@ SUBDIR_PARALLEL= yes +# Firmware may not be able to handle branch protection failures +MK_BRANCH_PROTECTION= no + .include "defs.mk" diff --git a/tools/build/options/WITHOUT_BRANCH_PROTECTION b/tools/build/options/WITHOUT_BRANCH_PROTECTION new file mode 100644 index 000000000000..97b459b53c92 --- /dev/null +++ b/tools/build/options/WITHOUT_BRANCH_PROTECTION @@ -0,0 +1 @@ +Build with branch protection disabled. diff --git a/tools/build/options/WITH_BRANCH_PROTECTION b/tools/build/options/WITH_BRANCH_PROTECTION new file mode 100644 index 000000000000..3326aa5db965 --- /dev/null +++ b/tools/build/options/WITH_BRANCH_PROTECTION @@ -0,0 +1,4 @@ +Build with branch protection enabled. +On arm64 enable the use of pointer authentication and +branch target identification instructions on arm64. +These can be used to help mitigate some exploit techniques. From nobody Wed May 22 17:03:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkyLY1Cm7z5M3Nd; Wed, 22 May 2024 17:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkyLY0Ggtz4dBq; Wed, 22 May 2024 17:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6/FpjFuBfZoUYK24d9n4XEiaqXgmAyXLrzo/y7zHvg=; b=mLJ750II6HprwIW19z5ugs/lRzxg9NN3DMOzNKNyAs1QVHYlCyiRhkrRkgvj2e8P7lu8sV WYAFQH8y38FAhfXyS+qcJ3s5P4dI8nRj0mOdo1x1T2aTFKhkAV+0SishGDxa8FsAjdEJqQ RNVHaUBFDfPcykz5G4ZPHa3p2OHarzs8qSPdsMeWBUAyd3bn4cu+XwlPPtO89qHNBsF7e9 V7DdvUF6EIeeu9lc310XZ7XWJas4K/bDz6nT2wygRYwqJYMzCyzTPI8XlLEiJ3XEhqMQNk BuLGMLCmY0UVF1EwzNFsyNUwks2kG1gSM+yznlFj5KNxO7QJSCXTWyoxXRxo/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716397413; a=rsa-sha256; cv=none; b=EJVRCb8fsFOL8ZOpS6LBpM46sPu691878kIcYYavDoLXDZGmLvM5Um9bRQLx3OhbIyZie1 4DNiUwWycZ7Ya3Y/2TeASzw9H/fO9O5LqSSDsozWbIng46mIbP+l4N/qGZ4SDwpqfKCLwr JnXZWKJfOFBkSKCIMcYvKZZpejM2zoqxIiu7La7g8oLGzkM3uB1YHhrSyCx8WVfTEqgjHG fbFFX/wrr8WzABHb2L0Ml6+YmfAOVOaAC95VoOO2yhfiMoLSIaEmhFniuGkcFqA0Lnkb/J l0ymHbwu+2vLk9f+eZS3PBDvlzUxxK5/dm4ZgWDiVBfS+dSq4eqv2g8JlCkakA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6/FpjFuBfZoUYK24d9n4XEiaqXgmAyXLrzo/y7zHvg=; b=PWrhpPP9erUXXSMuJdVZd4B8yJGoEIGER0WyJaPAzMuKidZB9n/GHEqwSmJjGL2sjN11TR b7OJ+Z/VyFL9j4XdixamTU4DDu3y/Xv0zYwuz6GvafROx33yGtXrmXD5Q+PZoHOBiA66S6 pAR/z1e5P6R9n88+nzAtpnnFZJR6KjrqpHXXeAlKM0p1emsaK1lYabGvWXwn1TjvneXlZQ D6BnncsbZcoNZMbEjGanNMfJMO7FyK9DeprehhddbzSPZQK3xBnF0YFM0sLlroU/ixgUNf xMDPani6Uko5O08DPQ/elYOHIdp4DS1OlhrxFpecePD5/3O6HsS1wiyx/W1PnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VkyLX6zhVzDyZ; Wed, 22 May 2024 17:03: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 44MH3WC9074826; Wed, 22 May 2024 17:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MH3Wa6074823; Wed, 22 May 2024 17:03:32 GMT (envelope-from git) Date: Wed, 22 May 2024 17:03:32 GMT Message-Id: <202405221703.44MH3Wa6074823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: a3310b7943f8 - main - src.conf.5: Regen List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3310b7943f8128a4968620e1451e377b5d458ce Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a3310b7943f8128a4968620e1451e377b5d458ce commit a3310b7943f8128a4968620e1451e377b5d458ce Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 17:00:17 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 17:02:26 +0000 src.conf.5: Regen --- share/man/man5/src.conf.5 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 12f78e20085a..1d35823fc9c4 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd May 13, 2024 +.Dd May 22, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -137,7 +137,7 @@ Do not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS Do not build -.Xr autofs 5 +.Xr autofs 4 related programs, libraries, and kernel modules. .It Va WITHOUT_AUTO_OBJ Disable automatic creation of objdirs. @@ -234,6 +234,11 @@ Do not build or install .It Va WITHOUT_BOOTPD Do not build or install .Xr bootpd 8 . +.It Va WITH_BRANCH_PROTECTION +Build with branch protection enabled. +On arm64 enable the use of pointer authentication and +branch target identification instructions on arm64. +These can be used to help mitigate some exploit techniques. .It Va WITHOUT_BSDINSTALL Do not build .Xr bsdinstall 8 , From nobody Wed May 22 17:05:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkyNW15g0z5M3nk; Wed, 22 May 2024 17:05:15 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkyNW0CwFz4dhk; Wed, 22 May 2024 17:05:15 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tbFnZbg4hVk1NNkiIxtfT1zDALbDl0kutL0c94WqZyY=; b=ZBciIRlrq2kjzNG8Ck7V9nw9IGJqhVueXP6Q3uNiTszrVYd6pHB9hiVn3DwWXTaT+LfYF5 Qx+WKx+2EZJC+Ka3Yr7S8b3aH0CbkOLBAKam43IrMPfsOp6CWmTKNyP3IzBF1pQlc+s7rT 9Q+Xi9JjVWZKZzGQIJzXwLCHAm4JM9Iof7GOb4cNQb6jYxGKz9QRk1GXyzaIqtbhZ7e9dT A1VAjnpcbSPOZoAHlIEQVqSiaIeTAkFw9j+391fmJfw5AZ4a+DUzvajMOD2NEd2Fb9I8q3 szf6ZZIFovkwhF8OtXfEofha+zfFXbF5pny3WONtsHDay0dbpeIM+lRngb11WQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716397515; a=rsa-sha256; cv=none; b=PLd6ee2YB8IupQjjZnYXF5f0ClgPz/2p3HAWMc+oGCUlmAl1Ocvcv9BX8o9VGEfOQ4xROE gmdkK0e8+/mf+VlfG1s+WWll0FlLkefTZ3+k+zGZmGw1yQVkS9hVYeItDsFqFv+yORuYir /39UP++SpEi4TAWO4UH/p4RUpg2yVH18R0XqLDziVzopDPA05LFfA1zSX5O3M6ghqKG1tu fUZcvbOlZtKE70BFGGAhw9j1N9YjVFf4q+Rmklvzvw7+9t0xTpV0E+Rl8ZjjjOXBKNRRw3 3g1nzPtUtU2lVchJCtHZ4z2UdCzC3Ewmc/EswHBhFOF+siKmI/3b9lChJudGwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tbFnZbg4hVk1NNkiIxtfT1zDALbDl0kutL0c94WqZyY=; b=K+bHbB0gPpE+ETl7ImzZkwdMkugYIINh4Lq0zURLeBCZNsUFG2CYQjAdtsT/1ZmnmKJeFX NPoxxkWuaV4/kt4fKh/1h3LjNvSDjC8m0aQ6aF3wcDvJufq11qe25XTPMP9d8xzHJgXl5L iv/9WmSw5Wx+RQgm8eP5O9sDQqM2xR9l3dg8/ktQ9kFD6EoGuG+qD9780CoumOjGPiz0ox 1rU1GPjFiBTqPEaXrJw4kWdqQ65FdTD0uBOZqFTPgF44QN3p2P9UtQTvs6NuoC5NHPwLWc 9ixOjcd2EhSK0dxhqVKi59k50rpWoeLUd67BVhQCWDXyRJXvQl/2YitGFlQyQQ== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VkyNV6j1yz12Gn; Wed, 22 May 2024 17:05:14 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 3B2763C019B; Wed, 22 May 2024 17:05:14 +0000 (UTC) Date: Wed, 22 May 2024 17:05:14 +0000 From: Brooks Davis <brooks@freebsd.org> To: Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> On Wed, May 22, 2024 at 08:55:51AM +0100, Lexi Winter wrote: > Mariusz Zaborski: > > The branch main has been updated by oshogbo: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd > > > > commit 408957613bc065c4444812c3ae276ace03697ebd > > Author: Mariusz Zaborski <oshogbo@FreeBSD.org> > > AuthorDate: 2024-05-21 20:02:50 +0000 > > Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> > > CommitDate: 2024-05-21 20:03:20 +0000 > > > > Regen > > --- > > sys/compat/freebsd32/freebsd32_sysent.c | 2 +- > > sys/kern/init_sysent.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > i'm sorry if this is considered accepted practice in FreeBSD (i'm not a > committer) but could i please request more useful commit messages than > "Regen" for things like this? This is more or less standard practice for generated files. These commits are of basically no interest. Historically they had to exist because the source file $FreeBSD$ entries were embedded in the generated files and thus had to be final. That isn't true any more so I often just include them in the origional commit unless I'm doing a lot of minor changes to the source files. -- Brooks From nobody Wed May 22 18:50:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl0kF5VJGz5KVB7; Wed, 22 May 2024 18:50: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 4Vl0kD6lM4z4t75; Wed, 22 May 2024 18:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716403844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/OoPToZM3M+wjSmQHtyZdQsWImrjdYwPCboagSWl7U=; b=i9LkZ+wTR/1vab4py1j9USHTKsTzWWlYPEFM/bhAJLQDqV97JauMbXVSuNiP65HcXHBCOU jpl1+Lgb3cb97Ix9xV2KxPYBo28ks7CR9dSV4lhlsk22Imraq4bJv7W5fAMS/bQzlewUlk rD/qI3/WuQwasMYfZvNRBMaqplVr/7hQdoYoPG/0LueiZsbIHS55y4Nh0bq5beGWxN3X+M lGzmKYOh8dXB7CmIPQZS8dfKP+qHnLOMD6RXRlHupavAg/R/Nv0TDhncFMWL/TVnIlszwC zoiLmZlnIOVUpw8i8KTsKsPCCQ5gk1achJ6cVd+JxpDI24VgjOm5ay+w+ItkGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716403844; a=rsa-sha256; cv=none; b=s16V7rMneAyyhmLy9kNZ+R26Ut4a40s84uQ7HufJrRyX51XeB5A2GZoD03lNQ1xml81bb9 AATpm3Yi8Zemabdpz6+XG/HsH7RLMIN2kdAQeIL2WxxOrIoiXDj81FAjglkZmyhir77cF/ ib9mwYBz5F/dpCPu2gb9GdooBoJeAM7vGhlDc/xbkwXd7rPg8aRXqM3nDPYftgDUH4JHB2 mSQR4QYqdSzNF+yDWTcHFHr/6BjoX0bebylvOjgUTgcTsOOrOnoa8CYaMbIwPaaWI/vzvD trdSH00X2HsKpFgabkRjVaXrumfiIggtAEtr7WqaXQX4+JlxFYQ/67XKAapodA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716403844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/OoPToZM3M+wjSmQHtyZdQsWImrjdYwPCboagSWl7U=; b=b6zer8XBksgALu92wOXKmigPE3qvIpx6WdrR1IVGVUOsMV+D0e2spyZAmsy2C+oONq1B6e ki0vQLPM0Uwo+/EwGStZOk7WXEgHlAlCkOhkoG0kJOcDsMTnxakQWz44dU1k5An7BsU4HL 0WtyGbP4rNahvTYmseNZ4NCMjg21SKBLgTpXDHwcYg2eXqQgLB2EM4PplcohkoIXlXnCH4 9K1LpvNV/UJO4/zZAnWSus+zR57kJUFEgJCJicZc2z6WZPS5AFLtOexb8jB8vtET2aOk8G nJTGFr9yzj/lRrBd8mPe+Zos9LMX52hp8wpQoEpzf3lOk7H5DbjQyAUjlil1zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl0kD6MQDzHTd; Wed, 22 May 2024 18:50: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 44MIoicK053455; Wed, 22 May 2024 18:50:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MIoiDN053452; Wed, 22 May 2024 18:50:44 GMT (envelope-from git) Date: Wed, 22 May 2024 18:50:44 GMT Message-Id: <202405221850.44MIoiDN053452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: a45a9e61b498 - main - blackhole.4: improve man page List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a45a9e61b498393b05f3e1e2e3e6131c7b484dc4 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a45a9e61b498393b05f3e1e2e3e6131c7b484dc4 commit a45a9e61b498393b05f3e1e2e3e6131c7b484dc4 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-22 18:36:24 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-22 18:36:24 +0000 blackhole.4: improve man page Not the connection is dropped, but the incoming SYN segment. Reviewed by: concussious.bugzilla_runbox.com MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45296 --- share/man/man4/blackhole.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 00c8e3d7a2b6..090f330a6ed8 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd November 3, 2021 +.Dd May 22, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -51,7 +51,7 @@ when unexpected packets are received. .Ss TCP Normal behaviour, when a TCP SYN segment is received on a port where there is no socket accepting connections, is for the system to return -a RST segment, and drop the connection. +a RST segment, and drop the incoming SYN segment. The connecting system will see this as a .Dq Connection refused . From nobody Wed May 22 19:55:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl28t0j5mz5Kc3S; Wed, 22 May 2024 19:55:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl28t07QCz43Cr; Wed, 22 May 2024 19:55:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pJg58uSMvRqat4DB3n49tTIKCHhtrIsCiRUmoJ9pCdE=; b=hik+OTw3hgtru7TFsL2XaBnLWk+uiSnAnbxgeawD3IQu1+6E9dtbrImig3+d+LjjbHyrPi GAPN41uSYC7ZTOFYkWVgVH7K6BECqF5NTvItrYY6kYqQKq13yx60iAoFPoIwx40WTInemz SGvGjPHaqkmn7Ily9z7o2nW3y8JdebNpSVfD4/RbOQO4d2quHFdB5t3P5JtF3Gg1JVixnx lpXX9UEOdziWqZ3dgMnr3BJaoAVmBn/2Lky6y4EhbtASRE1kzB583e3imGvL7xSGA8jxBx Bf7S+4ulgEJowNlW2I8FSrlWKHciSk+Lx2e05WNSmozHXNgNKYKzh4KgAXwaUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716407726; a=rsa-sha256; cv=none; b=rhG83DxWlwTE223GG5ECtnz4eGaaRqstBPHYD8wBrcisLM4hsXt1M1xKZHR4NnJWArnd3l fK53Wxebrqw0pSdM0p62McWLjq2VJ0X46xiJMpuz56Q001+L8kriZXK5I6bAGy0sH51kDz mtKclgWyKGGFuzKKmI3Sv4UwH9U60bp12nCOP6eXJzAjCAreCV53p6yNBvsow0Dj22167U LNiudZWkSB7E9MAil4eBjhxWDYBTEfAj6lPFzhYX5iXO0zttDw/BvW6e71Ym6Z+SdOTYGk AjyN9LPGr52hT9CitCvSn+DxeLj7B6q0fnROKaNnIlgd/OExYE0xSe2oAHGS8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pJg58uSMvRqat4DB3n49tTIKCHhtrIsCiRUmoJ9pCdE=; b=KfCV1ih0qek5kX/A32VnE/eMKHfdxTt+yWViL8Ah6o+qPUa1PVWMbOwS9s6LtneHHUw5Km OAPALFXYiGNzpM5qS80VozHl75WrvSAA2HCpmRaNX/v/1U2SI7qSVgA6w9yleEshyWASWL p1gkc2qR1NKX8LQPnr52BFQNl7CJmkiRRkWSbAtI2owX3A4Fl68d3P4QYjDZO3ovFxvvgC pF+lqIfsK7drB+7symVeVKNLkc3jKQgSMfbzFcMn9DXm0SWPkgzPiqT9hkm/PS/TYOXN9V jLNqcu6e41rVm3+bbqIrYBqDGhFnKwm4Z8kcnAjV6cOzCNZDPGiufoi+zTTABA== Received: from [IPV6:2601:644:937f:4c50:b136:2176:fd7d:9c11] (unknown [IPv6:2601:644:937f:4c50:b136:2176:fd7d:9c11]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vl28s27gNz15Cl; Wed, 22 May 2024 19:55:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <3edabe3b-4b51-401f-ad64-e36c84fd455b@FreeBSD.org> Date: Wed, 22 May 2024 12:55:24 -0700 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 408957613bc0 - main - Regen Content-Language: en-US To: Dmitry Salychev <dsl@FreeBSD.org>, Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <86r0dugmik.fsf@peasant.tower.home> From: John Baldwin <jhb@FreeBSD.org> In-Reply-To: <86r0dugmik.fsf@peasant.tower.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/22/24 3:36 AM, Dmitry Salychev wrote: > > Lexi Winter <lexi@le-fay.org> writes: > >> [[PGP Signed Part:Undecided]] >> Mariusz Zaborski: >>> The branch main has been updated by oshogbo: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd >>> >>> commit 408957613bc065c4444812c3ae276ace03697ebd >>> Author: Mariusz Zaborski <oshogbo@FreeBSD.org> >>> AuthorDate: 2024-05-21 20:02:50 +0000 >>> Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> >>> CommitDate: 2024-05-21 20:03:20 +0000 >>> >>> Regen >>> --- >>> sys/compat/freebsd32/freebsd32_sysent.c | 2 +- >>> sys/kern/init_sysent.c | 2 +- >>> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> i'm sorry if this is considered accepted practice in FreeBSD (i'm not a >> committer) but could i please request more useful commit messages than >> "Regen" for things like this? >> >> when looking through 'git log', especially 'git log --format=oneline', >> it's really not clear what this commit actually does, meaning if i'm >> looking through the log for commits related to a problem i'm having, i >> have to examine commits like this by hand to see if they're related. >> >> it would save me (and other people, i suppose) a lot of time if the >> commit message could at least mention what it's touching, e.g. "Regen >> sys/compat/freebsd32/freebsd32_sysent.c". >> >> [[End of PGP Signed Part]] > > Looks like it slipped in by mistake. I expected it to be reverted and > re-worded. I don't think it's worth reverting at this point. For `make sysent` I would suggest 'sysent: Regen' as a commit log in the future. We typically use 'src.conf.5: Regen' after running `make makeman`. -- John Baldwin From nobody Wed May 22 19:57:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl2Cf6PCKz5Kc9V; Wed, 22 May 2024 19:57: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 4Vl2Cf5tHVz43Hq; Wed, 22 May 2024 19:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oP2Pg2OTP25E+I4fabKA/H44vzKLhkawGOAW7JwuMlg=; b=t94qtEgzfNTmUnWH1d7iFM+CBRNwIdQgHN9DKPBcaPyY9U2RB7OsEIpck8OCy9UyXVIaaY iWb8EwbMZpxijYGzBuDE9NiOuky2f8NMQws6H7ipMHlEcH9aagCc/JLpTpR4X/VOlnKDOi CEfn9X5wURE8Bhkc2CiVf3jBhq56n7kOiOdzsMNYIwrSMyMa8mM3CIlfAnLJpxFCXg06fW JYVt88ubMT5IZpQJGTL+Ey7bO+J7Xvo2eCi2xd1pEtv+jRhFDxfmorBdO4cHxqOpzrFh9v tCvfxluLxBejqwM2XBO8M+kRVxMzxMreHjhaV9d1hOS1cqDdZQEKrRL9XK2CdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716407870; a=rsa-sha256; cv=none; b=SzCvA8Uv/9mda+VdlwKsdYv5Dn8cysza2+MswZgCULUzpgKYgMFp1DITZyZ8uSrTEZQdOX fWdZsovHFHsBkOFHYpmwfy1ek16A6gELWruj3qNj2Gt/864UNSKIYl1xrrZofn+46H3DMf fK0x534Dq9TtmhXi9H4UT36RFYEVbnteH+deICDjqSyQADxq5VUN8xaLXDntOzSFxhAv5o lfHcEadSsdKW3liqupnCXC+lL99u54EcBdf6ArK0pTir7N59kej1VRqvqMyyWAYTwjYgvX bbn9joqhrOQD2HeCpTeXfOSMpoHbh1wcRYzIJuqmg6lcQvqtYCg3jG1sWRHE1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oP2Pg2OTP25E+I4fabKA/H44vzKLhkawGOAW7JwuMlg=; b=md62DESoTniLy9mnlUb6BoM92qnAIpn0gSvsZdS9qeN4PVaSsk4rIprOccjQan7jlJE3r5 CRNkjKKGYtpfkAEz4p88+K8sOvEOz7nhTosZf5ZoD/5Cqz/zBsvd0z/bENOX4iWCBJaS3D g6aiUMDZrz7elU+yK704zHkIyjbBDIY+BkEgvuFfahatWEBFUKl8EFb4Yg5THF5Kx9kUI3 uI9dKgQwmZrqpaSTtCrUMG5v9C/KDh8sAIrh/XmSK97+z+6eGrBmpgE9bGyc8A4IqlYzSs EhUCYn4qaoy3vcBIJPdHjSV8Gi1a8UHPP/aLPH0n9KNUbqt3hQSYHsXZVFvYNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl2Cf5MFpzJqk; Wed, 22 May 2024 19:57: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 44MJvoTa063490; Wed, 22 May 2024 19:57:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MJvo59063488; Wed, 22 May 2024 19:57:50 GMT (envelope-from git) Date: Wed, 22 May 2024 19:57:50 GMT Message-Id: <202405221957.44MJvo59063488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" <stevek@FreeBSD.org> Subject: git: 56b274213024 - main - Add function to OSD to get values without taking the lock. List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56b274213024957cea378d27393304ae5cc8ded9 Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=56b274213024957cea378d27393304ae5cc8ded9 commit 56b274213024957cea378d27393304ae5cc8ded9 Author: Stephen J. Kiernan <stevek@FreeBSD.org> AuthorDate: 2024-04-04 00:12:57 +0000 Commit: Stephen J. Kiernan <stevek@FreeBSD.org> CommitDate: 2024-05-22 19:55:48 +0000 Add function to OSD to get values without taking the lock. There are some cases of OSD use where the value is only initialized once at a point where successive access of the value can be done so safely without the need to take the lock. Reviewed by: markj Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44631 --- sys/kern/kern_osd.c | 23 ++++++++++++++++------- sys/sys/osd.h | 5 +++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_osd.c b/sys/kern/kern_osd.c index 38db612d34d9..dcd80a948ea7 100644 --- a/sys/kern/kern_osd.c +++ b/sys/kern/kern_osd.c @@ -278,25 +278,34 @@ osd_free_reserved(void **rsv) } void * -osd_get(u_int type, struct osd *osd, u_int slot) +osd_get_unlocked(u_int type, struct osd *osd, u_int slot) { - struct rm_priotracker tracker; void *value; - KASSERT(type >= OSD_FIRST && type <= OSD_LAST, ("Invalid type.")); - KASSERT(slot > 0, ("Invalid slot.")); - - rm_rlock(&osdm[type].osd_object_lock, &tracker); KASSERT(osdm[type].osd_destructors[slot - 1] != NULL, ("Unused slot.")); if (slot > osd->osd_nslots) { value = NULL; OSD_DEBUG("Slot doesn't exist (type=%u, slot=%u).", type, slot); } else { - value = osd->osd_slots[slot - 1]; + value = atomic_load_ptr(&osd->osd_slots[slot - 1]); OSD_DEBUG("Returning slot value (type=%u, slot=%u, value=%p).", type, slot, value); } + return (value); +} + +void * +osd_get(u_int type, struct osd *osd, u_int slot) +{ + struct rm_priotracker tracker; + void *value; + + KASSERT(type >= OSD_FIRST && type <= OSD_LAST, ("Invalid type.")); + KASSERT(slot > 0, ("Invalid slot.")); + + rm_rlock(&osdm[type].osd_object_lock, &tracker); + value = osd_get_unlocked(type, osd, slot); rm_runlock(&osdm[type].osd_object_lock, &tracker); return (value); } diff --git a/sys/sys/osd.h b/sys/sys/osd.h index 1c58c4fff8de..498cad5064f9 100644 --- a/sys/sys/osd.h +++ b/sys/sys/osd.h @@ -64,6 +64,7 @@ int osd_set_reserved(u_int type, struct osd *osd, u_int slot, void **rsv, void *value); void osd_free_reserved(void **rsv); void *osd_get(u_int type, struct osd *osd, u_int slot); +void *osd_get_unlocked(u_int type, struct osd *osd, u_int slot); void osd_del(u_int type, struct osd *osd, u_int slot); int osd_call(u_int type, u_int method, void *obj, void *data); @@ -79,6 +80,8 @@ void osd_exit(u_int type, struct osd *osd); osd_set_reserved(OSD_THREAD, &(td)->td_osd, (slot), (rsv), (value)) #define osd_thread_get(td, slot) \ osd_get(OSD_THREAD, &(td)->td_osd, (slot)) +#define osd_thread_get_unlocked(td, slot) \ + osd_get_unlocked(OSD_THREAD, &(td)->td_osd, (slot)) #define osd_thread_del(td, slot) do { \ KASSERT((td) == curthread, ("Not curthread.")); \ osd_del(OSD_THREAD, &(td)->td_osd, (slot)); \ @@ -98,6 +101,8 @@ void osd_exit(u_int type, struct osd *osd); osd_set_reserved(OSD_JAIL, &(pr)->pr_osd, (slot), (rsv), (value)) #define osd_jail_get(pr, slot) \ osd_get(OSD_JAIL, &(pr)->pr_osd, (slot)) +#define osd_jail_get_unlocked(pr, slot) \ + osd_get_unlocked(OSD_JAIL, &(pr)->pr_osd, (slot)) #define osd_jail_del(pr, slot) \ osd_del(OSD_JAIL, &(pr)->pr_osd, (slot)) #define osd_jail_call(pr, method, data) \ From nobody Wed May 22 20:24:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl2pD1kPrz5KfZf; Wed, 22 May 2024 20:24: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 4Vl2pD1Bs3z45ZR; Wed, 22 May 2024 20:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716409460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TV5IHBrVlOBHAObZrKKiQ1fO/+wI2cxzxpmFJpmxlw4=; b=GihOAdzmZAwxf2sPKLp1PmzS9Uo4NcGOVzDQXPcR9+rju3AWZ5uPgjZJip3iU787qztMRh deAj9wuyKASA6F1wt7RiRgVzHpZ3WSga8KWp5aw5XmRQXn+MKf95CGSUIAyiRv9yo1Z1i1 3l8BAxNk7NwXIFyVGX01AlQUfdsBwtQHzTh8pCX+/r7ZXspUxPCmQQfphDWhAKqtFTn1bH YFquI7zO5ZxLvR3gXjp5N2yIY7BhuSQyMLuHcjGudK9FzwL0lh8cTLIMI2E/izHWG/ZJWV pLR0wttj6qpd9Kde0VaZadkgRzTf1OCEAqE/TpJOjFHecuOImr2FecGj79ZeAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716409460; a=rsa-sha256; cv=none; b=fuxuF5oFMUTEF905IfqloalT+zD2c4hv2XEp3NSulZGrWgRhML/OwVIsOaR/AM27dX+Tj5 m222wxU3jT4QsKg+H3Jz4/bPHyuPOTjkUtZ+fjcoBT4wSZx+CB+BqO592AZtAtacMKRNTm R9fiGP2SJ5A0+MrjFRkUk2ut5BNmFa/LLXR8YvUsx/kamiELlJIeKzAfbk/2lC3SGl9gx/ SLMfyctblHaQhbLRiIZJdwDQoQpdwRMUI1tKWo7Xs6FfhBkCOy9na7YRtGnzdl485JZPPH ibTyq2+nzwBuWzxNvBtQmIeHxH5FziM56ZfsxT7NOu06o5GYKF2FZztn6OV7vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716409460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TV5IHBrVlOBHAObZrKKiQ1fO/+wI2cxzxpmFJpmxlw4=; b=qtYZt0WerYRfAo55weJcOhRj8LCyp5wW4DrDDeT5mNJZzeJF/tRqzGQg1zuV4sLNEMlUAW sl9WTc3ANAb2Jp9etagvgxsDc1bzxSTXBHfnIEOp2X+RfJ7G/4y3ALAY7aXOvU7u9PBjam VpcjWAFxZgHBAwgcy5RcS8xy2s8tltzjHkPJE67sT1vNdIKI4ZwBsATxjA3/s2tnxa2iwm rBa/yqH5TwIV/yNEqHWzsUvV1kUizF1S4nVFNvadramyHCS2sew5rpgMN4jSUJpln924Zf DiVG1Qywby13YyBv5e5guOQOTNfCbe9aY/eNdbzdzdn58KSLcIgcjpwD9v3O2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl2pD0p57zKlr; Wed, 22 May 2024 20:24: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 44MKOKdu013809; Wed, 22 May 2024 20:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MKOKVY013806; Wed, 22 May 2024 20:24:20 GMT (envelope-from git) Date: Wed, 22 May 2024 20:24:20 GMT Message-Id: <202405222024.44MKOKVY013806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 6841c2677c5b - main - zzz: Fix output formatting when suspend state not supported List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6841c2677c5b5e85fd727bfb934efdafd4ccc2bc Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6841c2677c5b5e85fd727bfb934efdafd4ccc2bc commit 6841c2677c5b5e85fd727bfb934efdafd4ccc2bc Author: Oleksandr Kryvulia <shuriku@shurik.kiev.ua> AuthorDate: 2024-05-22 20:21:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 20:21:18 +0000 zzz: Fix output formatting when suspend state not supported Reviewed by: imp (who also simplified things a little) Differenetial Revision: https://reviews.freebsd.org/D45299 --- usr.sbin/zzz/zzz.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/zzz/zzz.sh b/usr.sbin/zzz/zzz.sh index 0e0ceebe70b9..dde36e7984c6 100644 --- a/usr.sbin/zzz/zzz.sh +++ b/usr.sbin/zzz/zzz.sh @@ -27,9 +27,8 @@ if sysctl $ACPI_SUSPEND_STATE >/dev/null 2>&1; then # execute ACPI style suspend command exec acpiconf -s "$SUSPEND_STATE" else - echo -n "Requested suspend state $SUSPEND_STATE " - echo -n "is not supported." - echo "Supported states: $SUPPORTED_STATES" + echo "Requested suspend state $SUSPEND_STATE is not supported." + echo "Supported states: $SUPPORTED_STATES" fi # Check for APM support elif sysctl $APM_SUSPEND_DELAY >/dev/null 2>&1; then From nobody Wed May 22 21:08:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3n05Z1Dz5L1RD; Wed, 22 May 2024 21:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3n051Y1z4H7d; Wed, 22 May 2024 21:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eaD6jtPH/IbMlmZ5rM3F//8jgoVkvoXZoR4Bg3EReO8=; b=cW7D+H7Mj6lQkxpgbgDnynlre3pmYSN2tIi9EmbF8jNEpfSc+xsFnhRtnQWmmHcYaez5KI okHlZxUOXgN9SNyyblnS7wHFXLis4W8SvfuJhn8xRDI0/NM/fGNXO4kkERUeWzLQRGN3Yh rgM4KNms7GOSk/dK3WUDM+Q62zaW9W8ftSVquz8QG44yZtXInQTRLojW5z/6eyPGi4SNaK VSn2VgkBne9NOyFYCabOplKVbawL/JvXY1qWOuiAplJ69CBqGxNMjD3DxNSPU+vBqX7aIH V6EAQfOKmX/s1e0SxrTwQQuhLgwSLGipFEnUAhiSvhj0y4Lhtjaw0bzunD1CqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412100; a=rsa-sha256; cv=none; b=p+pWMO8ae1PkGRLp0qgD010Lk9Ho2LZHL0JPQ0giiANpFExinn5Tpt0Sg27kAUak1iaqaq 4IV2Kn0z//H7BaKEMiAknOeSkB2ztUd2mBW42a1AlCVrSEUPQNtJEw74ax9+MbNj27zVl3 4Hyz1VdF3r3aY4HFLLehv5p47mQJ1EzyTnrWX8DXDBc51O5mEPwSy4HIK7jfMTPL0fNdCZ 8Rt1BppTHF0C8jpo0rC0IgVKn2Q9a0iMTFCbATL3Iqu+icg68Aq2WnHufpgOC1vqIyT7zT 2guCYKnD1FrhHDrsYxYHKmEAlnAM7pg1dx3xahFIBkfRJ1IrKSFEniJwnMI0tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eaD6jtPH/IbMlmZ5rM3F//8jgoVkvoXZoR4Bg3EReO8=; b=D8oumlmnr71L2yEAFjk3yggh2HiZ1RIoZhUG8CEi8q2K04dgA0PRJXWrTRv32F6OxQfT8H zR5lteuivO+22Fv0LTtukcePyBMUrv+5U/TmHIscRb3oKNaQHQr0YwV4wXrN/4GNBthcGn Pf9KeS3kLPUJ3dmfyDu/SdkescnGZ1JxpOPI9SfuGNxT0S0kH04TG8ZVErNbEKzZnyBwiO HJ0LOvffmXX3ECCObu3s7pGOUNkQjZCxPgGeGU2h8f6zEZeqC5PsEoGO1QJJvzReGBbiml k26MUlK1SmZP+UKrgrAL6mwu1eqzzMdaNt9x7EQiZrNk/813sIpp5o+i1DeG8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl3n04cl8zM2f; Wed, 22 May 2024 21:08: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 44ML8KQP082979; Wed, 22 May 2024 21:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ML8K2l082976; Wed, 22 May 2024 21:08:20 GMT (envelope-from git) Date: Wed, 22 May 2024 21:08:20 GMT Message-Id: <202405222108.44ML8K2l082976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: 5a4d24610fc6 - main - LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5a4d24610fc6143ac1d570fe2b5160e8ae893c2c commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-05-22 02:24:51 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-22 21:04:19 +0000 LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes While the previous order worked well for iwlwifi 22000 and later chipsets (AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes. Change the teardown order to avoid these problems. The inline comments in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new order and also the old problems we were seeing (too early sta removal or silent non-removal) leading to follow-up problems. There is a possible further problem still lingering but a lot harder to trigger (see comment in review) and likely related to some other doings so we'll track it separately. Sponsored by: The FreeBSD Foundation MFC after: 3 days PR: 275255 Tested with: AX210, 8265 (bz); 9260 (Bakul Shah) Differential Revision: https://reviews.freebsd.org/D45293 --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 ++++++++++++++++++---------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d598e9af0050..b982413382f8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -993,33 +993,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new) } } -static void +static enum ieee80211_bss_changed lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { + enum ieee80211_bss_changed changed; + + changed = 0; sta->aid = 0; if (vif->cfg.assoc) { - struct ieee80211_hw *hw; - enum ieee80211_bss_changed changed; lhw->update_mc = true; lkpi_update_mcast_filter(lhw->ic, true); - changed = 0; vif->cfg.assoc = false; vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; - /* - * This will remove the sta from firmware for iwlwifi. - * So confusing that they use state and flags and ... ^%$%#%$^. - */ IMPROVE(); - hw = LHW_TO_HW(lhw); - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, - changed); - lkpi_hw_conf_idle(hw, true); + /* + * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with + * assoc = false right away here will remove the sta from + * firmware for iwlwifi. + * We no longer do this but only return the BSS_CHNAGED value. + * The caller is responsible for removing the sta gong to + * IEEE80211_STA_NOTEXIST and then executing the + * bss_info_changed() update. + * See lkpi_sta_run_to_init() for more detailed comment. + */ } + + return (changed); } static void @@ -1459,6 +1463,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -1742,16 +1748,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* See comment in lkpi_sta_run_to_init(). */ + bss_changed = 0; + bss_changed |= lkpi_disassoc(sta, vif, lhw); - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST - * as otherwise drivers (iwlwifi at least) will silently not remove - * the sta from the firmware and when we will add a new one trigger - * a fw assert. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -1768,7 +1769,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; @@ -1801,6 +1801,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -2289,14 +2291,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + bss_changed = 0; /* + * Start updating bss info (bss_info_changed) (assoc, aid, ..). + * * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. + * See comment there; removes the sta from fw if not careful + * (bss_info_changed() change is executed right away). + * + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + * + * The order which works best so far avoiding early removal or silent + * non-removal seems to be (for iwlwifi::mld-mac80211.c cases; + * the iwlwifi:mac80211.c case still to be tested): + * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here) + * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST + * (removes the sta given assoc is false) + * 3) add the remaining BSS_CHANGED changes and call bss_info_changed() + * 4) call unassign_vif_chanctx + * 5) call lkpi_hw_conf_idle + * 6) call remove_chanctx */ - lkpi_disassoc(sta, vif, lhw); + bss_changed |= lkpi_disassoc(sta, vif, lhw); + + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -2310,15 +2331,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } + lkpi_lsta_remove(lsta, lvif); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.use_short_preamble = false; + vif->bss_conf.qos = false; + /* XXX BSS_CHANGED_???? */ lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); LKPI_80211_LVIF_LOCK(lvif); @@ -2326,7 +2351,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif->lvif_bss = NULL; lvif->lvif_bss_synched = false; LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); /* * The very last release the reference on the ni for the ni/lsta on * lvif->lvif_bss. Upon return from this both ni and lsta are invalid @@ -2346,6 +2370,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); From nobody Wed May 22 21:09:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3pk02qFz5L1T9; Wed, 22 May 2024 21:09: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 4Vl3pj5Rxsz4Hrp; Wed, 22 May 2024 21:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jA50DRN/yBVoxX1sMNSA7jOBmp/hQHxIygkajycqeFc=; b=aBDJPWgisJrFNEbWtfls+hqO0Wr21RHf6YcZPRA0eFVxmd1qC4YRAcc39B0Hy5kjyYdu/y 2ITtkBE8izKufpdxEdslr10MiVKGNq3cREi/rnJWVIlv+gJbWvN4UIWxK02Qass2vhh8K2 7S2PBLQDbi1uFWHBilblQvdq7fv37TT/lOVzqq9Lb2zZeLIDVAhyHJ+o0Eea+wn5wZ79Dp Fw1+EN5r+wnfhGy76tburHrrOjjhC8DNop04YTkYy/CAOrHjF6mFibFC06CB+oVVioK0gP 2BpRa4HRk2TQIboOh+Zw5o3aV8Fcm/G3l8zK+G45A26PCUkKljXCnqRbPCn95g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412189; a=rsa-sha256; cv=none; b=RaidGSUuL4qukPBHMOThaQXnwya7xooxbW1g2F2Rhlr+D3GKFgz3Hqkn1QR2K7giWT3oAt Q5PLDS2Sq6meeVkJjG2SiBi3Ob17EdaqQYVRCA5yv0cgNGcx3nwlqWPCDMbtpDjyFzNi+1 wMz9+gzsSKoEzVfc5W0Qb0GfxZG9ce4/yB0F0Rt8xZW9Bi6dXEeEuBy4fRsGIdkOgulaxR RsEJSTxJSJuB9iv1ZtSrpmo1ihAc6QMbZpaRSFYgEo67qqLvNQsSOVdlDNE4B9xZccoU7O Aymn6GR/vIe8nbvnIurmlPMSXO35nVV3K818Y2E2CL5rFy9z0YmWlcpyiqxi8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jA50DRN/yBVoxX1sMNSA7jOBmp/hQHxIygkajycqeFc=; b=XlDZRfGunLHet+BiFjPGrjZvgatnYCJJ6uHphyXiNuczE2qtfbhGDLrVJ5xRuCqvQqiXss H4uCpCjRngpYjbhTaJIhlGx21wB39F+rh9AfAQvN59BrbqZRCgoSIU4l/FBaUAne6z7gdE qU3rincrjaHtE48TpentdFDmFvfj1p96GHeCmu2eBr3yMN+oRoGhlPR27LYEtGz7yUZn1M GdTxWtaiS+PZy4ydFqDTPsttm9YxId4dU4lympJyN+wdrCvgbXNEdYlUtthpt8ydvX+sNG S1u5btc7lKt+W8UdqdF/fc8tyEqw1reY9tUQ/tlIJH/HV1Pj+Q1fuWo7ZPigdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl3pj54L2zLYp; Wed, 22 May 2024 21:09: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 44ML9nac083294; Wed, 22 May 2024 21:09:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ML9nwI083291; Wed, 22 May 2024 21:09:49 GMT (envelope-from git) Date: Wed, 22 May 2024 21:09:49 GMT Message-Id: <202405222109.44ML9nwI083291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: d1af434d9994 - main - LinuxKPI: 802.11: rename chanctx_conf for consistency List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1af434d99941d32a09c48fb3ef77ef83e203d29 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d1af434d99941d32a09c48fb3ef77ef83e203d29 commit d1af434d99941d32a09c48fb3ef77ef83e203d29 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-22 21:08:55 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45185 --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b982413382f8..72b39e840bfd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1078,7 +1078,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1144,54 +1144,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1217,14 +1217,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1235,26 +1235,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1456,9 +1456,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1466,8 +1466,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1794,9 +1794,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1804,8 +1804,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2363,9 +2363,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -2373,8 +2373,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4770,7 +4770,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops; From nobody Wed May 22 21:10:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3q66vQFz5L0wG; Wed, 22 May 2024 21:10: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 4Vl3q669xwz4J2T; Wed, 22 May 2024 21:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Syo6tbMr8URKRzWu12JyPQBojZm+NCrlp6lISHNXxMM=; b=eubN8kLKNomLr8rU6J6dwy/s/urFCxWhzx7aQpXYDlhV12z8b1ZOthHsbpih+o3F2UZ2B/ s6fSeG2+EXDIO71SLgbBdWQDnGRvOHfK0AoSllDpvzYP5KUuO34EMfqDjjIDrGzPbpLJPo bKiybPhYpwIA5HUG6cp/gKcdPXTsYgWl6ghJmwwY7jr8TtUDBkbPp0j+4qetawoB8j3/2N cXBNKII9DsnSyg1urk1KCKfQLGxknM6jNUav4DM571GmWJyRAoVnRbbSet1TsqJ4KuXF3q 45gpEE/ak++0NYgbfjKmfWKGFiwsBA1b0izfRVEFw5i9+wMGSbjiQvcGBkKG3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412210; a=rsa-sha256; cv=none; b=OToLkkMtMWJD/Jo9xvEdQklNmRpIuwV3B0xFow9sIio9LAwvb54yxijipHZ0y6+E7ITjaa jSkH5xFP7Bc0urDjzns5MCV7vGXvZ4ozbsBbPfRWIyqTU+bVtV+As0pEbjpeA5uUbdFz5L 17+5IRlEZcldcOWT4zH9FG17cbSBr2yGaptM51MTlkSQRVmcku0gQ8CWvI74h2r5+weumw nFpHOP+VZqrRfbRDeK5DgrOE4HmTmZG8YO2GenycpSe4UV6AViKEhhmr3x1GW84LocSP8k ln2RfRK16AImbtw8am3yjvKfdQ0d0I0CS3+yLZkb78u7IaaPAtPcLdSiaA0EyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Syo6tbMr8URKRzWu12JyPQBojZm+NCrlp6lISHNXxMM=; b=ly5FtIodc3sVlg0jpeNkrBg0TTTcYbRTEJa5UxP5mSOT+FAEGE7J++6avDBs68+w+XH7M6 UHnEz9E9mfjVOyuGCV5YCv4WPS+KhOwvh2/bYgK0KG+B4GDHUeajyeh5Db4pF80QWA0giO Wyyapg5732XSv2iRD19VwfydJFjodoENzjDZootsW1BQNEXqXGNbZ8fMu5yyXxXHjImcO/ ftW2EGEnxx1X6jIGTsOvbl+Pez8XW1PMLYEBaUyZPBAXaDUSWAd46ktSxDh/AunjeR+mA0 dMp/kyBksQIybkDtAPVQaAuy6wwK7EmC9RquLAsjNjwr4syJzIyGwq1sYD4EQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl3q65nQmzLYq; Wed, 22 May 2024 21:10: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 44MLAAvc087909; Wed, 22 May 2024 21:10:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MLAAdf087895; Wed, 22 May 2024 21:10:10 GMT (envelope-from git) Date: Wed, 22 May 2024 21:10:10 GMT Message-Id: <202405222110.44MLAAdf087895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 0115ad61d859 - main - autofs: Fix cross-threading on file to delete List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0115ad61d859b5fe107c84abce6673c153800bda Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0115ad61d859b5fe107c84abce6673c153800bda commit 0115ad61d859b5fe107c84abce6673c153800bda Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-22 20:44:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 21:10:08 +0000 autofs: Fix cross-threading on file to delete We want to delete the new file, which is installed in man4 not man5. Noticed by: Gary Jennejohn Fixes: a03e8a40d404 Sponsored by: Netflix --- tools/build/mk/OptionalObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 82227eef5d50..c0118bcbf6cb 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -134,7 +134,7 @@ OLD_FILES+=etc/rc.d/autounmountd OLD_FILES+=usr/sbin/automount OLD_FILES+=usr/sbin/automountd OLD_FILES+=usr/sbin/autounmountd -OLD_FILES+=usr/share/man/man5/autofs.4.gz +OLD_FILES+=usr/share/man/man4/autofs.4.gz OLD_FILES+=usr/share/man/man5/auto_master.5.gz OLD_FILES+=usr/share/man/man8/automount.8.gz OLD_FILES+=usr/share/man/man8/automountd.8.gz From nobody Wed May 22 21:10:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3q80Fzgz5L1DN; Wed, 22 May 2024 21:10:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3q76NNDz4Hnr; Wed, 22 May 2024 21:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=634tumq4TSBj7HVLcw+yOmpfCRd27Me+9lrfhrkkH1Q=; b=Y4P8Yml0QmAtarLMShla3a+Qh885WGamHd0pug1pJP6D13b6Kst0skRFdkVDY6liW0ymWI r35wcyhnVjBlIW8+NcjhhinaNGhLtZOucb56HxVWv7DkJSFk/UNOKbIxPiyDPps4CpN+5O 3VepaODcooVrc3ShWA4Q13wXz94yL/cCWRlnHMdGt1wGlEa/2WYWPRl0meNQri2bhg/fsU QOG3lMqylWKAYmnt79R/p1huQofgTjeCnfoOXIy5CBdRcZ9M7i864DKcaahBdSFHRDEqn+ up0hK01dNlEgKBhFhTztMzivKw7rV1DXpSktcz45NBru7qvJmE7BDMv+8LNCqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412211; a=rsa-sha256; cv=none; b=ygyD8K41R554RW+8M//b8kOKePRRdm+UOBqj4zJuVkD5efCTW3UhkImXAM5tyqTd2P5MCO Kwl9oL1VJ4iuuMq/kiFW8wxKG1S5hpb1esHCpiNnFRrwtWLFqNZxi0gsCWSGsfPR1kMYjM Q6FXmaxdkKLKxHXwaeOFWGGUoIC3PKxL8GRpfL1v4GV2do3NofRRDVk93v537I1o4429kN M9UhjCortNza1XxszYwXjKl79ZezqC+8xVKL2x3xj4ioxq07a1FPXaupTmdjjpU9sekbH/ 3A3pCYT5p6efVFzUUAVt398n5CUuYXhdnU/yOmkJRLOHQfXOMxGR77BGR+4q4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=634tumq4TSBj7HVLcw+yOmpfCRd27Me+9lrfhrkkH1Q=; b=SBsuqURthFkUHmy6cLDskgzIibsygA8cn0HJqhhuHcsMndl5YjOCi2lT4yW7sB1JRKBatx B3YU1o4tUqB9wI7741Nl5TpzgzfES2h66GrzoJxe2ph6wElwKIi+CqAvEajn4hLdVEna2T YDBj3OjbEQ58Yg3I97wiGf2ePgcoxPdmeOyYgry/POQkcbV/DYyvhkXqqPOFQtVytt+cQg o0EmGjfsUDpf0/qoAuLo+kLUmL6mWH/DmUR++0X1NjZbk6Z8qgNWA61rQJpf/lc1sAq72D 8vgxaVq9HE60gcuc4gwxgyTUfE1Z3QYeymtwX6p6liH2pLB6kg7226S7hSeSvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl3q75ztWzLqg; Wed, 22 May 2024 21:10:11 +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 44MLABag088534; Wed, 22 May 2024 21:10:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MLABdN088529; Wed, 22 May 2024 21:10:11 GMT (envelope-from git) Date: Wed, 22 May 2024 21:10:11 GMT Message-Id: <202405222110.44MLABdN088529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 58e44aa01101 - main - Fix typo List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58e44aa01101d420c9d7021a788b6074b7183286 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=58e44aa01101d420c9d7021a788b6074b7183286 commit 58e44aa01101d420c9d7021a788b6074b7183286 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-22 21:05:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 21:10:09 +0000 Fix typo ioclt -> ioctl. <blush> Fixes: 08b452033834 Noticed by: Thomas Mueller and John W. De Boskey Pointy hat to: imp Sponsored by: Netflix --- share/man/man4/sg.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/sg.4 b/share/man/man4/sg.4 index bf7cb93cfb09..ac549452cc93 100644 --- a/share/man/man4/sg.4 +++ b/share/man/man4/sg.4 @@ -8,7 +8,7 @@ .Os .Sh NAME .Nm sg -.Nd Linux ioclt-compatible SCSI passthru device +.Nd Linux ioctl-compatible SCSI passthru device .Sh SYNOPSIS .Cd device sg .Cd device scbus From nobody Wed May 22 22:11:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl59j5tfJz5L6vb; Wed, 22 May 2024 22:11:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl59j5Nzdz4QYV; Wed, 22 May 2024 22:11:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716415881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mqqsY36mTXOls3vfPYpN1yF1EmfUYwFRyPn1z1M7Vfg=; b=kCpnGnaJ5v7F/Dl49RMpj3/eTj55NysOhwgBpUbrtHDi6KdZr1K2gnXuxhwJFTxN1wO1I8 GWzDAvgjhJw0DvnpPYei/ePc8CBvPSEvhAufKSAsVMRb8Aat/Tfg8LNpbyOvpWIas5kNTg kme8Om1vlVWViEVn/16hcGcLaXOwEHcYi2/HuewOqJflWsqKAbW9Axpe3/tbdYHSrISkgu YDpvRWcNxT0LD9nLqsfO+ebxlkYwOaR9QCBp8hH/1f336UnZQHzFji0Ae8ZvVGp4IyCEJW JChm9q3KpxATkf9LXAfWPQEnbxH8EnjL7mfeS+44z34hF9rAOwZFhRjgyL/oLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716415881; a=rsa-sha256; cv=none; b=aBZsqDPq+Fyu3sb8ugGssQfIiyq4pxqZx3FWlDqcjGv5LiqqUD1ZxNZQVKIK7WfRjjo7Zw dRF7aKHLMAMGD1kPbrrU/zqru/0MF/hhr0blnK8ZEqGCbAM0qJmgHr4YoNa3YK6rKs73GQ QXo0HuL43qibKg7EHFQb1TN+4pR3ODKoaDKtgMn6de88FUxhlux4suOPWabjqV0Dwmofz4 KvIcX1VdFu7xoWeQmL0e4mvfNbK0CDnFaz8JHZ3MqSGFfR6On7kA/6ubxasPC8f/t31Xl7 /bDdqam+spDT6twgkNIptbOvwGyHOgNwhyDdNWkCM31GQDicQSbUwmQ+QCv+UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716415881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mqqsY36mTXOls3vfPYpN1yF1EmfUYwFRyPn1z1M7Vfg=; b=WIXhIXt30zUuWqSL6iJTtH1mnKaSLjHHheUgGWW3+FxpQSb7PeeIkpA9377W70VpG2/rM4 ZzjMU/EfFk7uqfP0fpTlE4pxhBQTKZWVzLHjgdf/iFkii6SB1TpIhEC5aL0iAZakb++Ug2 LMHPXesAmowuygjVlNqi/nDCondpOssDVoBIZOsIlK6VNpcu7jlS8t/qo3IRWQfbG1+bOd k0+hKIBqRMh7VY4/hYkYHcjaHXcJiRQE6Nt38L/UZwHCSi23qlEZmlExMguezLbHlMgNgK tc5E7phjaEaOHl48Mc+kv7XiqvRXvMZrMw94rDdp6//UFL0qn+1C0hW2R3ElBA== Received: from [IPV6:2601:644:937f:4c50:b136:2176:fd7d:9c11] (unknown [IPv6:2601:644:937f:4c50:b136:2176:fd7d:9c11]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vl59j1qN5z185h; Wed, 22 May 2024 22:11:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <6d6df2f4-547e-48bf-a99f-a26859c5c51f@FreeBSD.org> Date: Wed, 22 May 2024 15:11:19 -0700 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 0c3ade2cf13d - main - nextboot: fix nextboot -k on ZFS Content-Language: en-US To: Gleb Smirnoff <glebius@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202402200354.41K3sPeT025629@gitrepo.freebsd.org> From: John Baldwin <jhb@FreeBSD.org> In-Reply-To: <202402200354.41K3sPeT025629@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/19/24 7:54 PM, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0c3ade2cf13df1ed5cd9db4081137ec90fcd19d0 > > commit 0c3ade2cf13df1ed5cd9db4081137ec90fcd19d0 > Author: Gleb Smirnoff <glebius@FreeBSD.org> > AuthorDate: 2024-02-20 03:51:22 +0000 > Commit: Gleb Smirnoff <glebius@FreeBSD.org> > CommitDate: 2024-02-20 03:51:22 +0000 > > nextboot: fix nextboot -k on ZFS > > zfsbootcfg(1) expects pool name to operate on, not currently mounted > filesystem name. > > Fixes: fd6d47375a78fbf0737012b7cc11180291781e8b > --- > sbin/reboot/reboot.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c > index 7ea4d50eaf74..ac3927cc2432 100644 > --- a/sbin/reboot/reboot.c > +++ b/sbin/reboot/reboot.c > @@ -130,6 +130,11 @@ write_nextboot(const char *fn, const char *env, bool force) > } > > if (zfs) { > + char *slash; > + > + if ((slash = strchr(sfs.f_mntfromname, '/')) == NULL) > + E("Can't find ZFS pool name in %s", sfs.f_mntfromname); > + *slash = '\0'; > zfsbootcfg(sfs.f_mntfromname, force); This broke nextboot -k on my systems using ZFS (was working fine prior to this commit): # nextboot -k test nextboot: Can't find ZFS pool name in head: No error: 0 # zpool list NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT head 79.5G 36.2G 43.3G - - 41% 45% 1.00x ONLINE - # zfs list NAME USED AVAIL REFER MOUNTPOINT head 36.2G 40.8G 2.16G legacy head/public 1.13G 40.8G 1.13G legacy head/tmp 836M 40.8G 836M legacy head/usr 28.3G 40.8G 2.34G legacy head/usr/local 534M 40.8G 534M legacy head/usr/obj 21.4G 40.8G 21.4G legacy head/usr/ports 23K 40.8G 23K legacy head/usr/src 4.00G 40.8G 4.00G legacy head/var 3.83G 40.8G 266M legacy head/var/crash 3.57G 40.8G 3.57G legacy head/var/tmp 23K 40.8G 23K legacy I think we should just punt on the error and pass the entire string again if slash is NULL. I'll test this locally and put it in a review if it works. -- John Baldwin From nobody Wed May 22 22:13:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5DR4fG0z5L7Ts; Wed, 22 May 2024 22:13: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 4Vl5DR467fz4Ql3; Wed, 22 May 2024 22:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKdALu2qbWuQsfc2cBrwYot3kb/QA+kkhBsIyOKRBxc=; b=thlFpjy80gQlES7LWpKC5I2ep9P5t/8xLcSiU9Y4cv9qv8GOjqSgcxKrDOAIb4+j02rbbp r4+NUXeAPFcNSF2qQ8x1awCX89XBChA/nfRrT4p70LXbvKFPfp6yfAYfbJMcstUVmTNsFu FpwJp/QhTP4zIWs4t2BHJ3Alm6ct1X4iaBM9FTOA9MAhFzg/O1xXfu0cIQkXxNUVT4fGNG Ujp7GK/BVtssX82WiMrSbDVVQEcEppy3d6Q7YDtg9Ppnl31Urb4Za2IaY5U3oYFSb3kHPC eC4JJr/FjaozPAmaqEIzeOz/LgRml5W1KnfN+x0CEyZChHRq8pzIJ6nxhfNPaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416023; a=rsa-sha256; cv=none; b=qZzXuzw2ucAkVJ95trkBHcDVnFmahlqmNFnzVN9zKccBmX06Aqe99hlQNrPkY44ZzHjcc6 ujGHapIxg+P1y1lTO3Y+ar0scvtGwjv0swSx5aOw0o2NiPh0a1AyClWOxpQVwEWRXxi+1e 9cYxc1TrK4CYMMn9pD3jmxho4msqSsUJMywTR4jrKfFUzxXBiiK5sxpKgIEAgoRf/hX86A yeSSwEOe2S7bHq68C/ekJoFgBk4ND51dBqXXsaH4bGul+pmMuzGREDgfXRoyehebIwgGo8 1HCP4wWcue6GMOv6WOKwGD1UdUwi7qHeGrKXFxhsu30PsL+1fniQGNDjtIxqYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKdALu2qbWuQsfc2cBrwYot3kb/QA+kkhBsIyOKRBxc=; b=B7/+RZSh3+G0Hd+vBZuBrhi7AQmb59ri9fHHt/Ths3KwyGwYjgXGQBZ/8oZO7kB+0QPr/E 7fKZf2K0En6fuhFm3dJmlXbXqGFbfHRYcOLM2MysW1PZVgRcF2bMSBz2IfhpHP/TcRL22u lip5MP2Z8EEs1Z2r/DjSOx1I8SnvN5jjkQBIKdxkxxW71NA5jOrXoPJsUn/hNdttK9FVIn LGUh2159cCHS1S6h8prqmqIBemFlHumtrI3S5XQFIgHpzLUBIyjyMJt59SkQ21LxO6Dw41 LPI/7TqTirOVfx0Nh8rWlYsZdjYwrO/pGqlhIqn64z9Hf2qeevG2cHFWkJUkyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl5DR3jk1zNVB; Wed, 22 May 2024 22:13: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 44MMDh9a000737; Wed, 22 May 2024 22:13:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMDhpM000734; Wed, 22 May 2024 22:13:43 GMT (envelope-from git) Date: Wed, 22 May 2024 22:13:43 GMT Message-Id: <202405222213.44MMDhpM000734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 63f18b37e01e - main - mqueuefs: minor style pass List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63f18b37e01ef214de762a091d3c98ae5028c8f4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=63f18b37e01ef214de762a091d3c98ae5028c8f4 commit 63f18b37e01ef214de762a091d3c98ae5028c8f4 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-22 02:52:47 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 22:13:29 +0000 mqueuefs: minor style pass Also remove not needed inclusion of sys/cdefs.h. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/uipc_mqueue.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 6400f0bce9f9..d842aff8fdc9 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -50,7 +50,6 @@ * use the IPC facility without having to mount mqueue file system. */ -#include <sys/cdefs.h> #include "opt_capsicum.h" #include <sys/param.h> @@ -379,7 +378,7 @@ mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn) static __inline struct mqfs_node * mqnode_alloc(void) { - return uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO); + return (uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO)); } static __inline void @@ -451,8 +450,8 @@ mqfs_create_node(const char *name, int namelen, struct ucred *cred, int mode, node->mn_type = nodetype; node->mn_refcount = 1; vfs_timestamp(&node->mn_birth); - node->mn_ctime = node->mn_atime = node->mn_mtime - = node->mn_birth; + node->mn_ctime = node->mn_atime = node->mn_mtime = + node->mn_birth; node->mn_uid = cred->cr_uid; node->mn_gid = cred->cr_gid; node->mn_mode = mode; @@ -1017,8 +1016,8 @@ mqfs_create(struct vop_create_args *ap) /* * Remove an entry */ -static -int do_unlink(struct mqfs_node *pn, struct ucred *ucred) +static int +do_unlink(struct mqfs_node *pn, struct ucred *ucred) { struct mqfs_node *parent; struct mqfs_vdata *vd; @@ -1244,15 +1243,15 @@ mqfs_setattr(struct vop_setattr_args *ap) td = curthread; vap = ap->a_vap; vp = ap->a_vp; - if ((vap->va_type != VNON) || - (vap->va_nlink != VNOVAL) || - (vap->va_fsid != VNOVAL) || - (vap->va_fileid != VNOVAL) || - (vap->va_blocksize != VNOVAL) || + if (vap->va_type != VNON || + vap->va_nlink != VNOVAL || + vap->va_fsid != VNOVAL || + vap->va_fileid != VNOVAL || + vap->va_blocksize != VNOVAL || (vap->va_flags != VNOVAL && vap->va_flags != 0) || - (vap->va_rdev != VNOVAL) || - ((int)vap->va_bytes != VNOVAL) || - (vap->va_gen != VNOVAL)) { + vap->va_rdev != VNOVAL || + (int)vap->va_bytes != VNOVAL || + vap->va_gen != VNOVAL) { return (EINVAL); } @@ -1281,7 +1280,7 @@ mqfs_setattr(struct vop_setattr_args *ap) * check in VOP_ACCESS() be enough? Also, are the group bits * below definitely right? */ - if (((ap->a_cred->cr_uid != pn->mn_uid) || uid != pn->mn_uid || + if ((ap->a_cred->cr_uid != pn->mn_uid || uid != pn->mn_uid || (gid != pn->mn_gid && !groupmember(gid, ap->a_cred))) && (error = priv_check(td, PRIV_MQ_ADMIN)) != 0) return (error); @@ -1291,7 +1290,7 @@ mqfs_setattr(struct vop_setattr_args *ap) } if (vap->va_mode != (mode_t)VNOVAL) { - if ((ap->a_cred->cr_uid != pn->mn_uid) && + if (ap->a_cred->cr_uid != pn->mn_uid && (error = priv_check(td, PRIV_MQ_ADMIN))) return (error); pn->mn_mode = vap->va_mode; @@ -1345,11 +1344,11 @@ mqfs_read(struct vop_read_args *ap) mq = VTOMQ(vp); snprintf(buf, sizeof(buf), - "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", - mq->mq_totalbytes, - mq->mq_maxmsg, - mq->mq_curmsgs, - mq->mq_msgsize); + "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", + mq->mq_totalbytes, + mq->mq_maxmsg, + mq->mq_curmsgs, + mq->mq_msgsize); buf[sizeof(buf)-1] = '\0'; len = strlen(buf); error = uiomove_frombuf(buf, len, uio); @@ -2014,7 +2013,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, AUDIT_ARG_MODE(mode); pdp = td->td_proc->p_pd; - cmode = (((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT); + cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT; mq = NULL; if ((flags & O_CREAT) != 0 && attr != NULL) { if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > maxmsg) @@ -2809,7 +2808,7 @@ freebsd32_kmq_timedsend(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error); @@ -2840,7 +2839,7 @@ freebsd32_kmq_timedreceive(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error); From nobody Wed May 22 22:13:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5DT04cfz5L7Jv; Wed, 22 May 2024 22:13: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 4Vl5DS59tfz4Qvx; Wed, 22 May 2024 22:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ipyL2aHEcinl9oUogMkemM245Nx01VFlRlwdmIXNncI=; b=BSsApBhuiA+EshlSnRR5qVSWEW8MKCHnjpIoEIo+UtVyixAH9iLYWUDF3tuFNgMB0qfnS8 qFQuoouXI0EyXK7up/IxPvW/8v7eNViLbI2CM/OyU5GcHzQ6EWwiwCYCXiO2AIwOXnB2vH Ma+K7+HseeVvt17sBJc0VlXI8kdOChaZX1ITGy1p3512Xj9mVDLVtG7Eew9zXeYjSchnXB w+u6BBdLoRfU1T8fRU7oIW9b4yeZi5fr6nfHMVd5Tq30U9URW8A3IXRSoD/Qzj2QJvLhST 0G5L+I+XXiDcLkArwh2SCRtG864TyPf8unZ+dQ+PUuOKq45eg90Tgjh1e2DYhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416024; a=rsa-sha256; cv=none; b=FEmG+eb/Dla7DyaSh52AqTryZhGFhve0CTTU/PM9p5zaVYj+eeCqREIvnPpRM9VPETr/UO IFf4Euj7K75fKG1Kd4Miz8ZRslEvno8cErHox7B699HsqtoNbrUQBOZklFnxcAbJI3gLcw 4Xl3chcPdRu5Jgvwbsa0gzVLiuJQiHnSBWp552Rj/Z+WB7igwTtVv7ZgGsZlmgbU15zkbW 2LXF9YMAri8QV5h5tmA+voF3Hmf7P0z4B6vj1GbNRjiW0fF7PeVkAYhvxLU48u5XpcnHH6 6BYd3O2BRDzwviTS5tEMGLfB7dvoCANwiwL0Jdw1eryYzcDL1xYWxf0m9vL2SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ipyL2aHEcinl9oUogMkemM245Nx01VFlRlwdmIXNncI=; b=ap2ZRavf/ztmWzdxEdww2q0jv9oaz5TxxMWfGmh1w8VAvXrZQ6YZql/Rm03KgU4SkFVPbk K9DI/jNf2tfAJGSMwP/PGeNhRXrW1VRzvFihJM67fl4XmVt0EHnntTiut/8AABcFPuI/5J vmNUoj2KkjuaREF7iBE5ecWTttSKbK05yGmTrlU9vzi8Mz1czJh8lppDkqv9vs4Er8rBCk ja8kzsWtvXe92rEzvmyIjwXQg/eQ/2QGSsRGVbHMPQRjh8YL2GEgngIKCrQmdln1YvxAak U5NGvXqDKlWxO2UtCN67WtTeivUqEyM8KXmpZIQW8Sl0Gvmun270a93mXdAyig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl5DS4msRzNrc; Wed, 22 May 2024 22:13: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 44MMDiMW000797; Wed, 22 May 2024 22:13:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMDiBi000794; Wed, 22 May 2024 22:13:44 GMT (envelope-from git) Date: Wed, 22 May 2024 22:13:44 GMT Message-Id: <202405222213.44MMDiBi000794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: b6f4a3fa75d2 - main - mqueuefs: uma_zfree() can be postponed until mqfs sx mi_lock is dropped List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6f4a3fa75d24637b4d81035655fcb3d3ea187ad Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b6f4a3fa75d24637b4d81035655fcb3d3ea187ad commit b6f4a3fa75d24637b4d81035655fcb3d3ea187ad Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-22 01:46:28 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 22:13:29 +0000 mqueuefs: uma_zfree() can be postponed until mqfs sx mi_lock is dropped Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/uipc_mqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index d842aff8fdc9..6f8fbaacdfb4 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -1109,9 +1109,9 @@ mqfs_reclaim(struct vop_reclaim_args *ap) sx_xlock(&mqfs->mi_lock); vp->v_data = NULL; LIST_REMOVE(vd, mv_link); - uma_zfree(mvdata_zone, vd); mqnode_release(pn); sx_xunlock(&mqfs->mi_lock); + uma_zfree(mvdata_zone, vd); return (0); } From nobody Wed May 22 22:13:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5DT6ysFz5L7ZR; Wed, 22 May 2024 22:13: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 4Vl5DT5rP5z4R5v; Wed, 22 May 2024 22:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeLSlpZNi8twWHo3Usl52MeZRtOAtbwATMOg5RZyVRA=; b=e64MEe6eQnUKJ48n8Eze6TlewrkR34GUUF7+s+GTEjs8vBxkxosffwngAglAEtFEeXYBio XAwIs/NdfnNpOM85Jd/DvEiNY9d4ewvCtVEI57z6xHyBzrNgEwu/UI30QsLM5zG1tHKpn2 ePWJ5urEXEkY9laUuoulc9crLmJ4/DGQBG7LcQLnvJ6TU3/YIhKf7mNH5chQEz76PaBOtR G5ankln1/HEGX6WAi17JfneqVzLe69Sq6xVv/rpFsgUDp3oNEMKPeoNgl7/ihDcNp2ExHS Q+e/v4JyMd5z5hyuu/JOtaskBwoZYxvbYq43xgrhTHbUZDyw99JQajWZ1p9r6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416025; a=rsa-sha256; cv=none; b=AdK4cnn2+aly2l8UnQlrV7Iw+lBtftnNXz79kLkrvaGZbgQuuBImpkZwU/3Z7pwVBxszKJ az5zCpjBvvaATc/WKN7YR8AhJuy7hwoaTbHf5H0HreGEfS+vjzU1abVHoxCeoJXDy4elWQ v4iPEaETtB4v1YNSL1uzjuHn1XExJOa/h//SDjFoc8YOoUVX0EaJW4BZJyc7nl5l/Vtp+D DCy/nLI9KMhJhrXFLSLwxNj94tpfrZ2sbsvp07w+HarEKWdWguuWjpEnlvOs57XT3RjHJF zhaDDOKIQxDIxsGbsZVj6MiobwLqeuHDcYrHEcdNOWKR7fbDISEPVKCPJ7jCDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeLSlpZNi8twWHo3Usl52MeZRtOAtbwATMOg5RZyVRA=; b=sJiz1xgKlIH7Jyx+x5jDkxtmURo62QNodYW3tSoKfuEDXMR3KNNUTdlCC9hF+1AqKz2CX7 Z3TXnajjl3gvbT5H+wY1oDrFsC5pS3knCw2R3+NhqN6BGvA1L4q1WQCtiJavPDtia3U52p UP9q1d60T5Saz3Ze7tVEdrSnRlQa88s5skgYi1+A9d1UiK5/6tN001yrc2O7gRnOdCcmJ1 fAm+wfqoZteQAo60o8ZB+59mE5TITrR0UTZN3v8zC0FxqPuxliIK9AZlsDx1JF3hNF60Ro Eep/B3fzOxUgJOH0etrQwvIEPui9jag+gWfQYjV5DYlW6LaHZzvxwWmkau2Fvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl5DT5RsyzNVC; Wed, 22 May 2024 22:13: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 44MMDjpV000854; Wed, 22 May 2024 22:13:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMDj8e000851; Wed, 22 May 2024 22:13:45 GMT (envelope-from git) Date: Wed, 22 May 2024 22:13:45 GMT Message-Id: <202405222213.44MMDj8e000851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: f0a4dd6d46e9 - main - mqueuefs: mark newly allocated vnode as constructed, under the lock List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4 commit f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-22 02:39:59 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 22:13:29 +0000 mqueuefs: mark newly allocated vnode as constructed, under the lock Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/uipc_mqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 6f8fbaacdfb4..7779d8877337 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -811,6 +811,7 @@ found: panic("%s has unexpected type: %d", pn->mn_name, pn->mn_type); } sx_xunlock(&mqfs->mi_lock); + vn_set_state(*vpp, VSTATE_CONSTRUCTED); return (0); } From nobody Wed May 22 22:21:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5P14nmfz5L7nr; Wed, 22 May 2024 22:21: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 4Vl5P14K0nz4SSC; Wed, 22 May 2024 22:21:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0b2spurlChCOfn3decoT3RsNG52+lm11bDGMKZ1eJVI=; b=ySSShagYDEdvPMBO5gar+2FuhXCRdNg7G4NLshSHNu1sbcB7DN/E4HAg3BCzC+6giRUADT r/VckjQlmqkdxx+BnsooaHB4SGuFGJ6j+oLtMjyLQErLfrhIXNW8Wh1hy5VxO5/8h0BKzU 17T4ZBGXNSYYmFL/sg5gUYMMejb/Or5Ot1FahEzmkD/fjHYFW8eajM5QhSPFFZSnizD4rA xb0eSwhZrjGbJdj/rK7Cu9ZE3j8ESmS7GE77wjWgNGs+YsoKDt1jF/UC3XY3TnxEZ4PZvy 1/EclPxRn/lvbG0AgQSRYFYBU+ztu8IbYclO3JH2iS5bwBtb7UYfTV1PvxY+iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416469; a=rsa-sha256; cv=none; b=NRBZtBerzAF2KSjwxMkET/So865maU5s6ReMFo21Q/h87QvrSpmpsPTGaa/m8DZxaYAIE6 jdCU8/+rt+M6Xmaa23jrcKD1lMuQfq5UlON1j51Zk3Wok5eqSAa6cXsM1GlFPqI/lOe83m 8nkEyTyUg9IwlGf1uV81R4a5QLa7gvQsmVkzYsrMYLMEHjla/7v+EkLLMHUzTxO8/p3Ela X+Q/ojRfwCBWH0Gk52f1ibBzwcdXdenRLWSOLTJNxERf4wmhqYVyHGGZnHxZ7XSK7zLCt0 i8qt1cdl24kIlEFIfOMzVYEsV0TaZB1dDUH+2ddbgdeJC18IELakBU1nxkbNLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0b2spurlChCOfn3decoT3RsNG52+lm11bDGMKZ1eJVI=; b=Cg0cIiR0WQ/NdpUsvBqEf+FLS05w2IHK8FlGzGwmW9un3xzOnze5DhkS/Ym8o9sfd24vKI NErf80FWXGjkVw+3NJkRwE+G77OxuHJT5Cdlsg17jk+ksK7LxWDCAF5Yq6sGxVr1KAsTL+ emzC3PCjrG0ZpoeKhC6R7rP8ahq00LMzNby3BrDPBJKOGXeZlCkOeG1QMd6fXXcTABb46E 341LqFbv5BhDig+UqgsSQBroP1DeYumcl23M0WHzw3GbMuUxpmqmYKgh7UGofQzag4U0e7 dQmCkEpNmePd3Gg8iop8MvZiEQkJ9AYVXGnFNDUoNjaBoTsXsUWum3z2CvwzdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl5P13x3czNs3; Wed, 22 May 2024 22:21: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 44MML9YI015591; Wed, 22 May 2024 22:21:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MML9is015588; Wed, 22 May 2024 22:21:09 GMT (envelope-from git) Date: Wed, 22 May 2024 22:21:09 GMT Message-Id: <202405222221.44MML9is015588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 93ad59a25189 - main - snd_hda: Add patch for Asus UX331UAL List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93ad59a251897431627345c287390ae134925a95 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=93ad59a251897431627345c287390ae134925a95 commit 93ad59a251897431627345c287390ae134925a95 Author: Lutz Bichler <Lutz.Bichler@gmail.com> AuthorDate: 2024-05-22 22:19:50 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 22:19:50 +0000 snd_hda: Add patch for Asus UX331UAL PR: 242802 MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D45238 --- sys/dev/sound/pci/hda/hdaa_patches.c | 11 +++++++++++ sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 12 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 9f3532562252..d425e3c0080b 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -359,6 +359,17 @@ hdac_pin_patch(struct hdaa_widget *w) patch_str = "as=4 seq=15"; break; } + } else if (id == HDA_CODEC_ALC294 && + subid == ASUS_UX331_SUBVENDOR) { + switch (nid) { + case 25: + /* XXX You are not expected to understand this. */ + config = 0x01a1103c; + break; + case 33: + patch_str = "as=1 seq=15"; + break; + } } else { /* * loop over hdaa_model_pin_patch diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 6a3314280a22..6b6bc58a4818 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -332,6 +332,7 @@ #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) #define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) +#define ASUS_UX331_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x14de) #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) #define ASUS_GL553VE_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x15e0) #define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) From nobody Wed May 22 22:24:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5Sg1P4lz5L8NF; Wed, 22 May 2024 22:24: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 4Vl5Sg0sTPz4TNk; Wed, 22 May 2024 22:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9vzXEiCrlS1RfKxij4v/RMpV3CFsDZ4Ra3BAUoy79s=; b=kuMTjNGJkD8QG6eTgR4yOyJNItxKcRrZd6t+9o+hazlB7pwO1jZEVy1bbo6zvs3pT+g8dP MU/TbKwcRfuecSMImtKb3/dt5f8sr39gdjCXHbLI8+mgoMuRqw0lDaAglv+U0UrY3W5Ndg iwOsD+wVGmoKHf9HLGwtnMbBMrPq02DoHIgEwi/DQhI/g6hMBqA5NpcM6J52aCrXasa9NI mRHSP/uC2RNprFyAypii2LI9/wgUJ/4nfSEIqi8icI2M+MH+4Zdp97gaH4QZ4InNRJHZxH zF9B18xoyMzeaFg6yOexJ/EXZTrw7fddGbwDobmiDKongPn5LNR7yA+cck9JDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416659; a=rsa-sha256; cv=none; b=VGZtjsrgMrTgRkDvQ9XUSt2I3IQ052JLAHOHXSCaKgWmhE+xstiJwGTY5vbwOvpvUHhtmY ZIX+Jf8Sm8+Z75HICNmGoXOoa3HCVMZIheZz0hkzK6ot1CEA97phX04ytC0ETUHVoRtWBN AKVXbO7x+vaNaJEhQ8oqYHfwGtL15mm056uMbqCLs5Qe+SFKalHXEHy5Mpzveg6V3bopjw v2yBD+MsdAhEbAU3T/O5wKt2IIMfKvFVOiMW7whJ2KMOenvQNC3F76Et9JbldTRUZ8cajw 1PPDs4lF5acCQQRL8lpkZqDrc2bD605ahGRI03lZqtypmrp3UlH748HHlRL1sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9vzXEiCrlS1RfKxij4v/RMpV3CFsDZ4Ra3BAUoy79s=; b=nfUM/EJ5ikNtB8vOPr90EilQkJ512Yw6kCanUL6qZAlto6CQ3bHriNgWI5x7jmG3o7oe++ 775a7kYPLri6jAezF2t1zbj5sYYaOIYRxonIGYjuv05aqRzCgMxeyy6Bj0bKQU2NJK+wQq DZiY8u3eiKbEOKqFssXCQNUAhvQPxlCQnUmxrxAr+KpvonafRiJ7Zbps/M9CAc6kXw+n5i kprxppnh/w8mPC1vdkOPN7FUHS6iCCHJNvKRaD2H8Vnd6lEfhX2RPJlIGHZJeAp49WE9/i /DFvXByXUYe+sr8Rj8FNPTiq8U4MkFJGvVreEOCL0PVVqy+3/oj3MFMixGskTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl5Sg0MMxzNf1; Wed, 22 May 2024 22:24: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 44MMOIvW018163; Wed, 22 May 2024 22:24:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMOIqc018160; Wed, 22 May 2024 22:24:18 GMT (envelope-from git) Date: Wed, 22 May 2024 22:24:18 GMT Message-Id: <202405222224.44MMOIqc018160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 1e84b85aad10 - main - geom: Remove sysctl.h List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e84b85aad10e7f83ef89bc1c13e251d3ac48ccc Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e84b85aad10e7f83ef89bc1c13e251d3ac48ccc commit 1e84b85aad10e7f83ef89bc1c13e251d3ac48ccc Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-22 22:23:45 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 22:24:11 +0000 geom: Remove sysctl.h These files don't need sysctl.h, so remove it. Sponsored by: Netflix --- sys/geom/geom_slice.c | 1 - sys/geom/geom_subr.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 3803697e8481..0839bc213817 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -40,7 +40,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/bio.h> -#include <sys/sysctl.h> #include <sys/proc.h> #include <sys/lock.h> #include <sys/mutex.h> diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 3fef8a918530..4e2c122ef6dd 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -44,7 +44,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/bio.h> -#include <sys/sysctl.h> #include <sys/proc.h> #include <sys/kthread.h> #include <sys/lock.h> From nobody Thu May 23 00:58:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t56D4yz5LNhn; Thu, 23 May 2024 00:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8t55KhQz4lp9; Thu, 23 May 2024 00:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ow6v7sY+aHJKQz48A1o8M5Chr3G1CxCW0Uaj5tLC970=; b=pZm6hksTTVQ2B4qz1tSvVTMIm2VB2XwqsgUZ4Lr3iwoouvqeAxZOevXU4fct8dzxHb/PTz xs06v3zuZjnXk614IqolOJXUaLHyg+wnmXb/lL4K8XnRabcmAo/0Z/2oC1DujLQVrskLdn V9kqlgUSx1Bfvzy/r4IvegKCn0WrC6bOf4eQf5briap0SrmUUmiTy7nOytVXeeDyUk74+e wtyEbh1WM08eHFCa+0uyLd4u69bZpu7sCKr6E84SUc2lYpRK1rVH8suTQ5/l4ZuxMJw+hT 4v21gF5xrEJorT0c9z8O8Gn/QeuSqCSECrTnxCbh6s4+nblazRR2IY3fa74NzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425885; a=rsa-sha256; cv=none; b=qTMjjjLhJP1d5A06La7JwOzPpRiSk1dQQREJOjywJ6eaoDSdIGd0S4AJGyEaMcehF8X8ej vkWuH433zXplSr7laxPaNLPftrv9CzS3QWCeLYAGbOqEjaYzZLcosklfx6iTexmu+JmhBS abY4GRmSCYOsabL3PBZOxzS997n8sUUnSdDBmBEe2cKOp9h6jGm9CHKUtZk4YkOvW+2Nhh 8RJXIgJDD5jXADSKCgtxndHbeBcj6bTJ8G7IRKrZ0VH36XwRP7qD1NYPzx7oH+b+SHxUbd a+1X8ZhffKu79n1iVzZPKw6vi4l3vCvFiOlHCHpdFimYdJ9QwV99FTbw7kD12w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ow6v7sY+aHJKQz48A1o8M5Chr3G1CxCW0Uaj5tLC970=; b=XjTvNIJJIJdDJVFz2acXxqJDiTuZu+SL5sQzIxnKXjPx72gM0GhV867P/1MwqCHBL5DVvD whuT3tU/0qH8VyabmcC1rpRPGKk5f9OevORzQX9M2xR24rzLzC/gvhxmY6wHZyD6tO2fJp 6lbf4FztEC+IjlkYXo9Mi1zjGG7sLgstbW757NY5Q8xJ59VYZs2AkXj9Weo2YQng8ke1lB DeRPsZ9V0/yCFu3D0ed6DEgt98z/QL5Ca4JQ4chJX10om89kVnVNk1ntIgAlrPgwoIXAKq sP8McAxj8UUuqXDq0X9Oo1XCP5bRlL8QZeiXyfUoErgxH0lWWEvkKHXc2xGcaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl8t54wsTzShT; Thu, 23 May 2024 00:58:05 +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 44N0w5Eh071837; Thu, 23 May 2024 00:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w5qL071834; Thu, 23 May 2024 00:58:05 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:05 GMT Message-Id: <202405230058.44N0w5qL071834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: e07f9178502b - main - sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e07f9178502b7cbc0769fc10e99ad0d013f437fd Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e07f9178502b7cbc0769fc10e99ad0d013f437fd commit e07f9178502b7cbc0769fc10e99ad0d013f437fd Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:04 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:04 +0000 sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO FreeBSD's implementation of SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO does not exactly work as intended. The problem is essentially that both IOCTLs return the same information, while in fact the information returned currently by dsp_oss_audioinfo() is what _only_ SNDCTL_ENGINEINFO is meant to return. This behavior is also noted in the OSS manual [1] (see bold paragraph in "Audio engines and device files" section), but since e8c0d15a64fa ("sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)") we can actually fix this, because we now expose only a single device for each soundcard, and create the engines (channels) internally. SNDCTL_ENGINEINFO will now report info about all channels in a given device, and SNDCTL_AUDIOINFO[_EX] will only report information about /dev/dspX. To make this work, we also have to modify the SNDCTL_SYSINFO IOCTL to report the number of audio devices and audio engines correctly. While here, modernize the minimum and maximum channel counting in both SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO. Currently these IOCTLs will report only up to 2 channels, which is no longer the case. [1] http://manuals.opensound.com/developer/SNDCTL_AUDIOINFO.html PR: 246231, 252761 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45164 --- sys/dev/sound/pcm/dsp.c | 179 +++++++++++++++++++++++++++++++++++++++++----- sys/dev/sound/pcm/dsp.h | 3 +- sys/dev/sound/pcm/mixer.c | 8 ++- sys/dev/sound/pcm/sound.c | 8 +-- 4 files changed, 173 insertions(+), 25 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 6e5fad048d40..4ee5d7c6738c 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -778,9 +778,15 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, ret = sound_oss_card_info((oss_card_info *)arg); break; case SNDCTL_AUDIOINFO: + ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + false); + break; case SNDCTL_AUDIOINFO_EX: + ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + true); + break; case SNDCTL_ENGINEINFO: - ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg); + ret = dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg); break; case SNDCTL_MIXERINFO: ret = mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg); @@ -2034,8 +2040,152 @@ dsp_unit2name(char *buf, size_t len, struct pcm_channel *ch) return (NULL); } +/** + * @brief Handler for SNDCTL_AUDIOINFO. + * + * Gathers information about the audio device specified in ai->dev. If + * ai->dev == -1, then this function gathers information about the current + * device. If the call comes in on a non-audio device and ai->dev == -1, + * return EINVAL. + * + * This routine is supposed to go practically straight to the hardware, + * getting capabilities directly from the sound card driver, side-stepping + * the intermediate channel interface. + * + * @note + * Calling threads must not hold any snddev_info or pcm_channel locks. + * + * @param dev device on which the ioctl was issued + * @param ai ioctl request data container + * @param ex flag to distinguish between SNDCTL_AUDIOINFO from + * SNDCTL_AUDIOINFO_EX + * + * @retval 0 success + * @retval EINVAL ai->dev specifies an invalid device + */ +int +dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) +{ + struct pcmchan_caps *caps; + struct pcm_channel *ch; + struct snddev_info *d; + uint32_t fmts; + int i, minch, maxch, unit; + + /* + * If probing the device that received the ioctl, make sure it's a + * DSP device. (Users may use this ioctl with /dev/mixer and + * /dev/midi.) + */ + if (ai->dev == -1 && i_dev->si_devsw != &dsp_cdevsw) + return (EINVAL); + + for (unit = 0; pcm_devclass != NULL && + unit < devclass_get_maxunit(pcm_devclass); unit++) { + d = devclass_get_softc(pcm_devclass, unit); + if (!PCM_REGISTERED(d)) { + d = NULL; + continue; + } + + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + if ((ai->dev == -1 && d->dsp_dev == i_dev) || + (ai->dev == unit)) { + PCM_UNLOCK(d); + break; + } else { + PCM_UNLOCK(d); + d = NULL; + } + } + + /* Exhausted the search -- nothing is locked, so return. */ + if (d == NULL) + return (EINVAL); + + /* XXX Need Giant magic entry ??? */ + + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + + bzero((void *)ai, sizeof(oss_audioinfo)); + ai->dev = unit; + strlcpy(ai->name, device_get_desc(d->dev), sizeof(ai->name)); + ai->pid = -1; + ai->card_number = -1; + ai->port_number = -1; + ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1; + ai->legacy_device = unit; + snprintf(ai->devnode, sizeof(ai->devnode), "/dev/dsp%d", unit); + ai->enabled = device_is_attached(d->dev) ? 1 : 0; + ai->next_play_engine = 0; + ai->next_rec_engine = 0; + ai->busy = 0; + ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; + ai->iformats = 0; + ai->oformats = 0; + ai->min_rate = INT_MAX; + ai->max_rate = 0; + ai->min_channels = INT_MAX; + ai->max_channels = 0; + + /* Gather global information about the device. */ + CHN_FOREACH(ch, d, channels.pcm) { + CHN_UNLOCKASSERT(ch); + CHN_LOCK(ch); + + /* + * Skip physical channels if we are servicing SNDCTL_AUDIOINFO, + * or VCHANs if we are servicing SNDCTL_AUDIOINFO_EX. + */ + if ((ex && (ch->flags & CHN_F_VIRTUAL) != 0) || + (!ex && (ch->flags & CHN_F_VIRTUAL) == 0)) { + CHN_UNLOCK(ch); + continue; + } + + if ((ch->flags & CHN_F_BUSY) == 0) { + ai->busy |= (ch->direction == PCMDIR_PLAY) ? + OPEN_WRITE : OPEN_READ; + } + + ai->caps |= + ((ch->flags & CHN_F_VIRTUAL) ? PCM_CAP_VIRTUAL : 0) | + ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : + PCM_CAP_INPUT); + + caps = chn_getcaps(ch); + + minch = INT_MAX; + maxch = 0; + fmts = 0; + for (i = 0; caps->fmtlist[i]; i++) { + fmts |= AFMT_ENCODING(caps->fmtlist[i]); + minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch); + maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch); + } + + if (ch->direction == PCMDIR_PLAY) + ai->oformats |= fmts; + else + ai->iformats |= fmts; + + ai->min_rate = min(ai->min_rate, caps->minspeed); + ai->max_rate = max(ai->max_rate, caps->maxspeed); + ai->min_channels = min(ai->min_channels, minch); + ai->max_channels = max(ai->max_channels, maxch); + + CHN_UNLOCK(ch); + } + + PCM_UNLOCK(d); + + return (0); +} + static int -dsp_oss_audioinfo_cb(void *data, void *arg) +dsp_oss_engineinfo_cb(void *data, void *arg) { struct dsp_cdevpriv *priv = data; struct pcm_channel *ch = arg; @@ -2047,10 +2197,10 @@ dsp_oss_audioinfo_cb(void *data, void *arg) } /** - * @brief Handler for SNDCTL_AUDIOINFO. + * @brief Handler for SNDCTL_ENGINEINFO * - * Gathers information about the audio device specified in ai->dev. If - * ai->dev == -1, then this function gathers information about the current + * Gathers information about the audio device's engine specified in ai->dev. + * If ai->dev == -1, then this function gathers information about the current * device. If the call comes in on a non-audio device and ai->dev == -1, * return EINVAL. * @@ -2066,11 +2216,9 @@ dsp_oss_audioinfo_cb(void *data, void *arg) * * @retval 0 success * @retval EINVAL ai->dev specifies an invalid device - * - * @todo Verify correctness of Doxygen tags. ;) */ int -dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) +dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) { struct pcmchan_caps *caps; struct pcm_channel *ch; @@ -2113,7 +2261,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) CHN_LOCK(ch); if (ai->dev == -1) { if (devfs_foreach_cdevpriv(i_dev, - dsp_oss_audioinfo_cb, ch) != 0) { + dsp_oss_engineinfo_cb, ch) != 0) { devname = dsp_unit2name(buf, sizeof(buf), ch); } @@ -2182,18 +2330,13 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) * if any channel is mono, minch = 1; * and if all channels are mono, maxch = 1. */ - minch = 0; + minch = INT_MAX; maxch = 0; fmts = 0; for (i = 0; caps->fmtlist[i]; i++) { - fmts |= caps->fmtlist[i]; - if (AFMT_CHANNEL(caps->fmtlist[i]) > 1) { - minch = (minch == 0) ? 2 : minch; - maxch = 2; - } else { - minch = 1; - maxch = (maxch == 0) ? 1 : maxch; - } + fmts |= AFMT_ENCODING(caps->fmtlist[i]); + minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch); + maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch); } if (ch->direction == PCMDIR_PLAY) diff --git a/sys/dev/sound/pcm/dsp.h b/sys/dev/sound/pcm/dsp.h index b81e60dc19b5..7559e855d4e1 100644 --- a/sys/dev/sound/pcm/dsp.h +++ b/sys/dev/sound/pcm/dsp.h @@ -36,6 +36,7 @@ extern struct cdevsw dsp_cdevsw; int dsp_make_dev(device_t); void dsp_destroy_dev(device_t); char *dsp_unit2name(char *, size_t, struct pcm_channel *); -int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *); +int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *, bool); +int dsp_oss_engineinfo(struct cdev *, oss_audioinfo *); #endif /* !_PCMDSP_H_ */ diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 9811496853c8..130333c7c442 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1282,9 +1282,13 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, case SNDCTL_CARDINFO: return (sound_oss_card_info((oss_card_info *)arg)); case SNDCTL_AUDIOINFO: + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + false)); case SNDCTL_AUDIOINFO_EX: - case SNDCTL_ENGINEINFO: - return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + true)); + case SNDCTL_ENGINEINFO: + return (dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg)); case SNDCTL_MIXERINFO: return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); } diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index e66462af2a71..072d42c4e989 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -718,9 +718,9 @@ sound_oss_sysinfo(oss_sysinfo *si) /* * Iterate over PCM devices and their channels, gathering up data - * for the numaudios and openedaudio fields. + * for the numaudioengines and openedaudio fields. */ - si->numaudios = 0; + si->numaudioengines = 0; bzero((void *)&si->openedaudio, sizeof(si->openedaudio)); j = 0; @@ -737,7 +737,7 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_UNLOCKASSERT(d); PCM_LOCK(d); - si->numaudios += PCM_CHANCOUNT(d); + si->numaudioengines += PCM_CHANCOUNT(d); CHN_FOREACH(c, d, channels.pcm) { CHN_UNLOCKASSERT(c); @@ -751,7 +751,6 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_UNLOCK(d); } - si->numaudioengines = si->numaudios; si->numsynths = 0; /* OSSv4 docs: this field is obsolete */ /** @@ -769,6 +768,7 @@ sound_oss_sysinfo(oss_sysinfo *si) si->numtimers = 0; si->nummixers = mixer_count; si->numcards = devclass_get_maxunit(pcm_devclass); + si->numaudios = devclass_get_maxunit(pcm_devclass); /* OSSv4 docs: Intended only for test apps; API doesn't really have much of a concept of cards. Shouldn't be used by applications. */ From nobody Thu May 23 00:58:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t673S0z5LNqT; Thu, 23 May 2024 00:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8t665gbz4lwS; Thu, 23 May 2024 00:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J9kJqu8u6C6Shcv9wInSfKAp1g24dJ1NtKI8nkUWt2g=; b=f8rQZZqoVUwdEBAll2vkQaTW4TsHz4I2sxBS0HVbc65LTns1we3Zm8FyLvElJc5IHMleOX 0vwrIODoJ+UlkVKDg30a/5p6Z4N/HV3m1lrBxNK6ixIotaHsDIMl0UNdl7eykZIfnZp7vc A/8egiHvs1EV72jl6HfyExOtf+yNeq2INylb0b24c4VCczO2cF/VCs0Pa2MJcalllU8rbv ckrC0N5yhQCN9UGL34L/YAXqVin87nmg3OLtACYTGhxo8VhnxqmGQqAJdmFl5dXJBvr52V xNOmWQIxIqSFMNaASMzPNuq/nzBCnupXRK3UrlLEBuUbf0vO7M7yHQlLgFKOZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425886; a=rsa-sha256; cv=none; b=DbCLoeuXd8s8v0e5X7Tq/6GdZmQBjdN0sKBtpS5XyDXAEC95vjfncs5LuqBnE2kuf7UAkt UY3Zk3YF9fQGmq424UUYb1zx3A5Eu57iFY3E3I2Gqt1OPu5Zg3rfYgExPeGSYqIENTbDwU G7wGHndtv10DuzgazxazZmpcFXnMeppkxQ6Z+LGHe/WOqMfYHxZ0GHKY47S4kZHHYigftz gaHUu/xjbZ8RJZ6Ml0cnG0RXXnLzw2uVL8OqPZM2vxCRfx+bGI9p+VabYFMavycut0MCpz R3I/K3a7tN4Ak6Mpdj9Av5KC0VjzLYXhf0g92fW2FfVvdTnBeH5WSWg/5Qx1aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J9kJqu8u6C6Shcv9wInSfKAp1g24dJ1NtKI8nkUWt2g=; b=mMLasV2NSMnapgnPzYEW92fLs0UbhQELDGB1rio0d6+haX4nBJte/dS0u9cu4S9HJde8V3 hMgr5MC95Eez2t10jDjNFt50LBPwrlqWxOG5pH1acmjrtKK8zvrj+g5EwA6mMxnktNY/VG RxxixaTBk0LKb8lAAp3sBK6HiqR4oqVJ4pbYcRLns46DqjaF5v1W8kvZE2tHUZkSzzdQ5d DBDDkski3on5sOBacSdcJAVyhcgxVheWunzMfeCjIgvdlj+lX3ZyP0+w76PM1m2jc8/SLD PdNP13V4st54qdEGwOYRPN1HYbRWzyQocqH3HTvj472NCUJrGmlMtOBlCgr7FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl8t65hf0zSTN; Thu, 23 May 2024 00:58:06 +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 44N0w60t071898; Thu, 23 May 2024 00:58:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w6Xp071895; Thu, 23 May 2024 00:58:06 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:06 GMT Message-Id: <202405230058.44N0w6Xp071895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 5d980fadf73d - main - sound: Handle unavailable devices in various OSS IOCTLs List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d980fadf73df64a1e0eda40a93170ed76ce6f14 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5d980fadf73df64a1e0eda40a93170ed76ce6f14 commit 5d980fadf73df64a1e0eda40a93170ed76ce6f14 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:17 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:17 +0000 sound: Handle unavailable devices in various OSS IOCTLs mixer(8)'s -a option is used to print information about all mixer devices in the system. To do this, it loops from 0 to mixer_get_nmixers(), and tries to open "/dev/mixer%d". However, this approach doesn't work when there are disabled/unregistered mixers in the system, or when an audio device simply doesn't have a mixer. mixer_get_nmixers() calls SNDCTL_SYSINFO and returns oss_sysinfo->nummixers, whose value is the number of currently _enabled_ mixers only. Taking the bug report mentioned below (277615) as an example, suppose a system with 8 mixer devices total, but 3 of them are either disabled or non-existent, which means they will not show up under /dev, meaning we have 5 enabled mixer devices, which is also what the value of oss_sysinfo->nummixers will be. What mixer(8) will do is loop from 0 to 5 (instead of 8), and start calling mixer_open() on /dev/mixer0, up to /dev/mixer4, and as is expected, the first call will fail right away, hence the error shown in the bug report. To fix this, modify oss_sysinfo->nummixers to hold the value of the maximum unit in the system, which, although not necessarily "correct", is more intuitive for applications that will want to use this value to loop through all mixer devices. Additionally, notify applications that a device is unavailable/unregistered instead of skipping it. The current implementations of SNDCTL_AUDIOINFO, SNDCTL_MIXERINFO and SNDCTL_CARDINFO break applications that expect to get information about a device that is skipped. Related discussion can be found here: https://reviews.freebsd.org/D45135#1029526 It has to be noted, that other applications, apart from mixer(8), suffer from this. PR: 277615 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45256 --- lib/libmixer/mixer.3 | 7 +- sys/dev/sound/pcm/dsp.c | 23 +++++- sys/dev/sound/pcm/mixer.c | 201 ++++++++++++++++++++++++---------------------- sys/dev/sound/pcm/mixer.h | 2 - sys/dev/sound/pcm/sound.c | 41 ++++++---- 5 files changed, 155 insertions(+), 119 deletions(-) diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index af2a8ff135a8..a3593898ed68 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -20,7 +20,7 @@ .\" THE SOFTWARE. .\" -.Dd January 19, 2023 +.Dd May 22, 2024 .Dt MIXER 3 .Os .Sh NAME @@ -395,7 +395,10 @@ Playback and recording. .Pp The .Fn mixer_get_nmixers -function returns the total number of mixer devices in the system. +function returns the maximum mixer unit number. +Although this might sound as incorrect behavior, given that one would expect +"nmixers" to refer to the total number of active mixers, it is more intuitive +for applications that want to loop through all mixer devices. .Pp The .Fn MIX_ISDEV diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 4ee5d7c6738c..c737df33b97d 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2040,6 +2040,19 @@ dsp_unit2name(char *buf, size_t len, struct pcm_channel *ch) return (NULL); } +static void +dsp_oss_audioinfo_unavail(oss_audioinfo *ai, int unit) +{ + bzero(ai, sizeof(*ai)); + ai->dev = unit; + snprintf(ai->name, sizeof(ai->name), "pcm%d (unavailable)", unit); + ai->pid = -1; + ai->card_number = unit; + ai->port_number = unit; + ai->mixer_dev = -1; + ai->legacy_device = unit; +} + /** * @brief Handler for SNDCTL_AUDIOINFO. * @@ -2084,8 +2097,14 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) unit < devclass_get_maxunit(pcm_devclass); unit++) { d = devclass_get_softc(pcm_devclass, unit); if (!PCM_REGISTERED(d)) { - d = NULL; - continue; + if ((ai->dev == -1 && unit == snd_unit) || + ai->dev == unit) { + dsp_oss_audioinfo_unavail(ai, unit); + return (0); + } else { + d = NULL; + continue; + } } PCM_UNLOCKASSERT(d); diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 130333c7c442..0cf6a9f42f8f 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -105,11 +105,6 @@ static struct cdevsw mixer_cdevsw = { .d_name = "mixer", }; -/** - * Keeps a count of mixer devices; used only by OSSv4 SNDCTL_SYSINFO ioctl. - */ -int mixer_count = 0; - static eventhandler_tag mixer_ehtag = NULL; static struct cdev * @@ -701,22 +696,13 @@ mixer_delete(struct snd_mixer *m) snd_mtxfree(m->lock); kobj_delete((kobj_t)m, M_MIXER); - --mixer_count; - return (0); } struct snd_mixer * mixer_create(device_t dev, kobj_class_t cls, void *devinfo, const char *desc) { - struct snd_mixer *m; - - m = mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_SECONDARY, desc); - - if (m != NULL) - ++mixer_count; - - return (m); + return (mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_SECONDARY, desc)); } int @@ -769,8 +755,6 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) pdev->si_drv1 = m; snddev->mixer_dev = pdev; - ++mixer_count; - if (bootverbose) { for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (!(m->devs & (1 << i))) @@ -839,8 +823,6 @@ mixer_uninit(device_t dev) d->mixer_dev = NULL; - --mixer_count; - return 0; } @@ -1411,6 +1393,17 @@ mixer_sysuninit(void *p) SYSINIT(mixer_sysinit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysinit, NULL); SYSUNINIT(mixer_sysuninit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysuninit, NULL); +static void +mixer_oss_mixerinfo_unavail(oss_mixerinfo *mi, int unit) +{ + bzero(mi, sizeof(*mi)); + mi->dev = unit; + snprintf(mi->id, sizeof(mi->id), "mixer%d (n/a)", unit); + snprintf(mi->name, sizeof(mi->name), "pcm%d:mixer (unavailable)", unit); + mi->card_number = unit; + mi->legacy_device = unit; +} + /** * @brief Handler for SNDCTL_MIXERINFO * @@ -1454,8 +1447,13 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) - continue; + if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) { + if ((mi->dev == -1 && i == snd_unit) || mi->dev == i) { + mixer_oss_mixerinfo_unavail(mi, i); + return (0); + } else + continue; + } /* XXX Need Giant magic entry */ @@ -1463,89 +1461,96 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) PCM_UNLOCKASSERT(d); PCM_LOCK(d); - if (d->mixer_dev != NULL && d->mixer_dev->si_drv1 != NULL && - ((mi->dev == -1 && d->mixer_dev == i_dev) || + if (!((d->mixer_dev == i_dev && mi->dev == -1) || mi->dev == i)) { - m = d->mixer_dev->si_drv1; - mtx_lock(m->lock); - - /* - * At this point, the following synchronization stuff - * has happened: - * - a specific PCM device is locked. - * - a specific mixer device has been locked, so be - * sure to unlock when existing. - */ - bzero((void *)mi, sizeof(*mi)); - mi->dev = i; - snprintf(mi->id, sizeof(mi->id), "mixer%d", i); - strlcpy(mi->name, m->name, sizeof(mi->name)); - mi->modify_counter = m->modify_counter; - mi->card_number = i; - /* - * Currently, FreeBSD assumes 1:1 relationship between - * a pcm and mixer devices, so this is hardcoded to 0. - */ - mi->port_number = 0; - - /** - * @todo Fill in @sa oss_mixerinfo::mixerhandle. - * @note From 4Front: "mixerhandle is an arbitrary - * string that identifies the mixer better than - * the device number (mixerinfo.dev). Device - * numbers may change depending on the order the - * drivers are loaded. However the handle should - * remain the same provided that the sound card - * is not moved to another PCI slot." - */ - - /** - * @note - * @sa oss_mixerinfo::magic is a reserved field. - * - * @par - * From 4Front: "magic is usually 0. However some - * devices may have dedicated setup utilities and the - * magic field may contain an unique driver specific - * value (managed by [4Front])." - */ - - mi->enabled = device_is_attached(m->dev) ? 1 : 0; - /** - * The only flag for @sa oss_mixerinfo::caps is - * currently MIXER_CAP_VIRTUAL, which I'm not sure we - * really worry about. - */ - /** - * Mixer extensions currently aren't supported, so - * leave @sa oss_mixerinfo::nrext blank for now. - */ - - /** - * @todo Fill in @sa oss_mixerinfo::priority (requires - * touching drivers?) - * @note The priority field is for mixer applets to - * determine which mixer should be the default, with 0 - * being least preferred and 10 being most preferred. - * From 4Front: "OSS drivers like ICH use higher - * values (10) because such chips are known to be used - * only on motherboards. Drivers for high end pro - * devices use 0 because they will never be the - * default mixer. Other devices use values 1 to 9 - * depending on the estimated probability of being the - * default device. - */ - - snprintf(mi->devnode, sizeof(mi->devnode), "/dev/mixer%d", i); - mi->legacy_device = i; + PCM_UNLOCK(d); + continue; + } - mtx_unlock(m->lock); + if (d->mixer_dev->si_drv1 == NULL) { + mixer_oss_mixerinfo_unavail(mi, i); + PCM_UNLOCK(d); + return (0); } + m = d->mixer_dev->si_drv1; + mtx_lock(m->lock); + + /* + * At this point, the following synchronization stuff + * has happened: + * - a specific PCM device is locked. + * - a specific mixer device has been locked, so be + * sure to unlock when existing. + */ + bzero((void *)mi, sizeof(*mi)); + mi->dev = i; + snprintf(mi->id, sizeof(mi->id), "mixer%d", i); + strlcpy(mi->name, m->name, sizeof(mi->name)); + mi->modify_counter = m->modify_counter; + mi->card_number = i; + /* + * Currently, FreeBSD assumes 1:1 relationship between + * a pcm and mixer devices, so this is hardcoded to 0. + */ + mi->port_number = 0; + + /** + * @todo Fill in @sa oss_mixerinfo::mixerhandle. + * @note From 4Front: "mixerhandle is an arbitrary + * string that identifies the mixer better than + * the device number (mixerinfo.dev). Device + * numbers may change depending on the order the + * drivers are loaded. However the handle should + * remain the same provided that the sound card + * is not moved to another PCI slot." + */ + + /** + * @note + * @sa oss_mixerinfo::magic is a reserved field. + * + * @par + * From 4Front: "magic is usually 0. However some + * devices may have dedicated setup utilities and the + * magic field may contain an unique driver specific + * value (managed by [4Front])." + */ + + mi->enabled = device_is_attached(m->dev) ? 1 : 0; + /** + * The only flag for @sa oss_mixerinfo::caps is + * currently MIXER_CAP_VIRTUAL, which I'm not sure we + * really worry about. + */ + /** + * Mixer extensions currently aren't supported, so + * leave @sa oss_mixerinfo::nrext blank for now. + */ + + /** + * @todo Fill in @sa oss_mixerinfo::priority (requires + * touching drivers?) + * @note The priority field is for mixer applets to + * determine which mixer should be the default, with 0 + * being least preferred and 10 being most preferred. + * From 4Front: "OSS drivers like ICH use higher + * values (10) because such chips are known to be used + * only on motherboards. Drivers for high end pro + * devices use 0 because they will never be the + * default mixer. Other devices use values 1 to 9 + * depending on the estimated probability of being the + * default device. + */ + + snprintf(mi->devnode, sizeof(mi->devnode), "/dev/mixer%d", i); + mi->legacy_device = i; + + mtx_unlock(m->lock); + PCM_UNLOCK(d); - if (m != NULL) - return (0); + return (0); } return (EINVAL); diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 6c5c8f3ec3fe..7139a766b392 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -69,8 +69,6 @@ u_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev); void *mix_getdevinfo(struct snd_mixer *m); struct mtx *mixer_get_lock(struct snd_mixer *m); -extern int mixer_count; - #define MIXER_CMD_DIRECT 0 /* send command within driver */ #define MIXER_CMD_CDEV 1 /* send command from cdev/ioctl */ diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 072d42c4e989..8d97dcd60231 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -766,7 +766,12 @@ sound_oss_sysinfo(oss_sysinfo *si) */ si->nummidis = 0; si->numtimers = 0; - si->nummixers = mixer_count; + /* + * Set this to the maximum unit number so that applications will not + * break if they try to loop through all mixers and some of them are + * not available. + */ + si->nummixers = devclass_get_maxunit(pcm_devclass); si->numcards = devclass_get_maxunit(pcm_devclass); si->numaudios = devclass_get_maxunit(pcm_devclass); /* OSSv4 docs: Intended only for test apps; API doesn't @@ -797,23 +802,29 @@ sound_oss_card_info(oss_card_info *si) for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d)) - continue; - if (i != si->card) continue; - PCM_UNLOCKASSERT(d); - PCM_LOCK(d); - - strlcpy(si->shortname, device_get_nameunit(d->dev), - sizeof(si->shortname)); - strlcpy(si->longname, device_get_desc(d->dev), - sizeof(si->longname)); - strlcpy(si->hw_info, d->status, sizeof(si->hw_info)); - si->intr_count = si->ack_count = 0; - - PCM_UNLOCK(d); + if (!PCM_REGISTERED(d)) { + snprintf(si->shortname, sizeof(si->shortname), + "pcm%d (n/a)", i); + strlcpy(si->longname, "Device unavailable", + sizeof(si->longname)); + si->hw_info[0] = '\0'; + si->intr_count = si->ack_count = 0; + } else { + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + + strlcpy(si->shortname, device_get_nameunit(d->dev), + sizeof(si->shortname)); + strlcpy(si->longname, device_get_desc(d->dev), + sizeof(si->longname)); + strlcpy(si->hw_info, d->status, sizeof(si->hw_info)); + si->intr_count = si->ack_count = 0; + + PCM_UNLOCK(d); + } return (0); } From nobody Thu May 23 00:58:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t81q6jz5LNng; Thu, 23 May 2024 00:58: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 4Vl8t800nNz4lly; Thu, 23 May 2024 00:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABWSO0OgC0lDAwMufVM9vU2Y1e08XOAZHFLNAmhFz4c=; b=dqu73Ai2wuh1idmyYc93WSVy9eMJQCxzoEqCi6OzJtOP5zMzisZmNL/2SjwO/rc/lC5ZXj 9cDsxwThJthCn91vZlN/SnBWBdEs+MioCgijPRTc9V5+fLZu7Y9//0xGfR2BijsDZlxg/o T9KhUbdrxrJ0sBJnkis35oBhhcdytHa0B/ndwtRN4rAgDLVAzbx2RKUHtg7jRVUeHOK8+U z3Wpsn2OfyxBE3FBW8opRJCHDxnDygOonCWAV366Ox5Gq+dAb5wW45YR00dcO4I6eIERZ8 PjFCRuowD2X38DtgxmeKNCBANqGV4/P1MwSzyHlJIMep6y1EWcGkr0WdJQU7VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425888; a=rsa-sha256; cv=none; b=t7BHrZjfN74tDge9RjzHrsRPt60Ct4J0geV71mRQ+U4HAX+mF2+8JGI3F0yeXennqXZyyQ 7c7PZLCx9DS/YU7Qa9N1W/ptsyzlLN4Kwo4zYXaE8GvAWbbbNPQbusUWJ986gzRcbahbBN VmLT+wZmRBgcEOE/6dBpjqehq7wkBi4lhyxfy/YNtLLhbTiIV6nk0wlHR0G1Hj6SEQbbCF CrWXuJleVUd+zLnDTIVzwDLK/NeDnoQEc82+Xg7Mm8D58KXR3+YY46OfJ8boYQYKu/ldWA ZrVAVS3BqhB4lB3bXxjJu2tGg2sMIieQxi80psALE0mGsu3fujUYlRCtF2GO8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABWSO0OgC0lDAwMufVM9vU2Y1e08XOAZHFLNAmhFz4c=; b=YXrJPnicFH7Q2fcQbxq+tsRiYliYhI0hKU3CCWOS4wgw/ylU52epvDNuKKDFzuvh6QvGj1 OH1OviJj8lg0TFrNw/GGLVLajBZ6M9/BrY9W5AhvUlKZIqjBadnwrt6kefx1EuhWB9+K7/ Iq8Gxxn9NcZrv1DMddQTO9Ag9VbB8RvQy1yztR2g2nHfX0kqNzfzxOmf6elKFPXRzUbh4+ RlmtMX2q83H5+TPjebsv+T+rYmCfMCEKDk8DOZdvXq021pQC2+oFGuVS8l/5dmGY69FHp0 kJWKI28iTTBN9sly4eOMcA31oeW3kJFwlDKdWlSFC/pHVAbEfgo3+Uee5F1exA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl8t76kXszSYg; Thu, 23 May 2024 00:58: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 44N0w7U2071949; Thu, 23 May 2024 00:58:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w70Q071946; Thu, 23 May 2024 00:58:07 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:07 GMT Message-Id: <202405230058.44N0w70Q071946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 0e80798518be - main - mixer(8): Ignore mixer_open() failures for the -a option List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e80798518be673bdad7245b627cb5bd7ec08888 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0e80798518be673bdad7245b627cb5bd7ec08888 commit 0e80798518be673bdad7245b627cb5bd7ec08888 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:25 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:25 +0000 mixer(8): Ignore mixer_open() failures for the -a option The most likely reason mixer_open() will fail is because either the device doesn't exist, or because it is disabled, so there is not reason to kill the application. Instead, continue and print the rest of the enabled mixers. PR: 277615 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45151 --- usr.sbin/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 47d8e6359b73..284ea955b7b4 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -99,7 +99,7 @@ main(int argc, char *argv[]) for (i = 0; i < n; i++) { (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i); if ((m = mixer_open(buf)) == NULL) - errx(1, "%s: no such mixer", buf); + continue; initctls(m); if (sflag) printrecsrc(m, oflag); From nobody Thu May 23 00:58:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t93PBVz5LNlk; Thu, 23 May 2024 00:58: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 4Vl8t91Ml3z4m2N; Thu, 23 May 2024 00:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSnSCvqef1rppD8iW29G256bdpiwRC5lY6t6YnOW7pk=; b=QZ+CjWWxYvLrTb/R8r2VaW4R7PT5sC438WneiSYD7kEp+FEJsYc0Z4onnI0kc8u+x0/WTt WaBcrWn2L8HrHx1GjI+3bsG0At1+/5Rig/3cTlZTLfuF8MWtjDEOTOtwzo5qx65zN1POVl jvYitg2IM2QWhMKnCv6ugPZHwNNhhkcLrtXoYo+G4q9SS5eHKixYqhBWuxGtrmgbHBd390 OpJt7UtW1Hkdd6vsbVnQNWEXVYPURLhEWc2sm/1n1kgxYJ3w3uywn3WozbsAvwWZucOn5D nkWMWpGV+4lVaBylKye9NejKmeJO6IJQUmxFy9SjV7u7/hIiRiJAMC+vPWYg0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425889; a=rsa-sha256; cv=none; b=iYoiIuxo6R/jqybipeUVaTukBX5QVB1bVhB9O50rElTLomnao4uE3cHrgxIilP4nlVTEcJ +Utk50xXC8+mETbgRitMqMihSHRJC3YmWZiMlnJYfazQJm4HA/QcZalAPJmSl6/Rq7scbE ncy3Jc71rFGrQQNA3hqkoOzz3V/zjyWaGoCx0eqQLcBiI48Vojw0O1nkx3vQ+5OAj9fxxI 065r7iyW6Prt19RKzijTekXQLh/OObzkL9k/mh+b8KsoA9VBI1hX4aVr2EKOqeraK1gs1a pI/1OoGImPlRtsGFXXnode2MZigC5EzdONMcItFpeJ/xJwryOo5Z7zAQdRXxvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSnSCvqef1rppD8iW29G256bdpiwRC5lY6t6YnOW7pk=; b=DpN9uMjb1PuaOxM1XsSd0QKrd7CMTCCQe3L2p5AoYxy0F9YpF6Jg6j9uwF5RWfXK1bBibr 2MQJ0WYcMW5d7qLu5WxWKZFcDp9uRRlGTjFINmb1Lj+Tc9MAP1Ik50HX3hbBjMKKgOyry2 J55PBfmjDp6OX3GDMe0UvBvKmctb4EHowUuCplq4EDWnCz3h5TnTJBIK7TEiSCZb4R0qg4 Tw58iIMO/10wyIUW8YTsrHYzoCMokIxSlk1DfC6mRKpR2CYIvliAm88qcBH7tWdZThW7Tf lBHZtYyd1kBwaFBXpGSiEzB6AopAf3zP/9zHiDTfQ6L2OUNCHdyE9Bqo64Or+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl8t90f1yzSYh; Thu, 23 May 2024 00:58: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 44N0w80D071988; Thu, 23 May 2024 00:58:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w8rk071985; Thu, 23 May 2024 00:58:08 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:08 GMT Message-Id: <202405230058.44N0w8rk071985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 67c89b21b956 - main - mixer(3): Implement mixer_get_path() function List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67c89b21b95601c01bafe5a0c518d320a39111c0 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=67c89b21b95601c01bafe5a0c518d320a39111c0 commit 67c89b21b95601c01bafe5a0c518d320a39111c0 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:36 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:36 +0000 mixer(3): Implement mixer_get_path() function This is better than hardcoding device paths in mixer applications. Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45275 --- lib/libmixer/Makefile | 1 + lib/libmixer/Symbol.map | 4 ++++ lib/libmixer/mixer.3 | 40 +++++++++++++++++++++++++++++++++++++--- lib/libmixer/mixer.c | 25 +++++++++++++++++++++++++ lib/libmixer/mixer.h | 1 + 5 files changed, 68 insertions(+), 3 deletions(-) diff --git a/lib/libmixer/Makefile b/lib/libmixer/Makefile index 6ca17a9d020d..3f8a4dad4a65 100644 --- a/lib/libmixer/Makefile +++ b/lib/libmixer/Makefile @@ -22,6 +22,7 @@ MLINKS+= mixer.3 mixer_get_dunit.3 MLINKS+= mixer.3 mixer_set_dunit.3 MLINKS+= mixer.3 mixer_get_mode.3 MLINKS+= mixer.3 mixer_get_nmixers.3 +MLINKS+= mixer.3 mixer_get_path.3 MLINKS+= mixer.3 MIX_ISDEV.3 MLINKS+= mixer.3 MIX_ISMUTE.3 MLINKS+= mixer.3 MIX_ISREC.3 diff --git a/lib/libmixer/Symbol.map b/lib/libmixer/Symbol.map index f16e13d66e4c..2ce39fd058ab 100644 --- a/lib/libmixer/Symbol.map +++ b/lib/libmixer/Symbol.map @@ -19,3 +19,7 @@ FBSD_1.7 { mixer_get_mode; mixer_get_nmixers; }; + +FBSD_1.8 { + mixer_get_path; +}; diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index a3593898ed68..c8a7ee1148a8 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -40,6 +40,7 @@ .Nm mixer_set_dunit , .Nm mixer_get_mode , .Nm mixer_get_nmixers , +.Nm mixer_get_path , .Nm MIX_ISDEV , .Nm MIX_ISMUTE , .Nm MIX_ISREC , @@ -86,6 +87,8 @@ Mixer library (libmixer, -lmixer) .Ft int .Fn mixer_get_nmixers "void" .Ft int +.Fn mixer_get_path "char * buf" "size_t size" "int unit" +.Ft int .Fn MIX_ISDEV "struct mixer *m" "int devno" .Ft int .Fn MIX_ISMUTE "struct mixer *m" "int devno" @@ -398,7 +401,21 @@ The function returns the maximum mixer unit number. Although this might sound as incorrect behavior, given that one would expect "nmixers" to refer to the total number of active mixers, it is more intuitive -for applications that want to loop through all mixer devices. +for applications that want to loop through all mixer devices (see the +.Sx EXAMPLES +section). +.Pp +The +.Fn mixer_get_path +function writes the path of the mixer device specified in the +.Ar unit +argument to the buffer specified in +.Ar buf . +.Ar unit +can be either -1, in which case +.Fn mixer_get_path +will fetch the path of the default mixer, or between 0 and the maximum mixer +unit. .Pp The .Fn MIX_ISDEV @@ -470,9 +487,10 @@ The .Fn mixer_set_mute , .Fn mixer_mod_recsrc , .Fn mixer_get_dunut , -.Fn mixer_set_dunit +.Fn mixer_set_dunit , +.Fn mixer_get_nmixers , and -.Fn mixer_get_nmixers +.Fn mixer_get_path functions return 0 or positive values on success and -1 on failure. .Pp The @@ -542,6 +560,22 @@ TAILQ_FOREACH(dp, &m->devs, devs) { (void)mixer_close(m); .Ed +.Ss Loop through all mixer devices in the system +.Bd -literal +struct mixer *m; +char buf[NAME_MAX]; +int n; + +if ((n = mixer_get_nmixers()) < 0) + errx(1, "no mixers present in the system"); +for (i = 0; i < n; i++) { + (void)mixer_get_path(buf, sizeof(buf), i); + if ((m = mixer_open(buf)) == NULL) + continue; + ... + (void)mixer_close(m); +} +.Ed .Sh SEE ALSO .Xr queue 3 , .Xr sysctl 3 , diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c index 93ace1d0c69b..4abbed9b27d3 100644 --- a/lib/libmixer/mixer.c +++ b/lib/libmixer/mixer.c @@ -493,3 +493,28 @@ mixer_get_nmixers(void) return (si.nummixers); } + +/* + * Get the full path to a mixer device. + */ +int +mixer_get_path(char *buf, size_t size, int unit) +{ + size_t n; + + if (!(unit == -1 || (unit >= 0 && unit < mixer_get_nmixers()))) { + errno = EINVAL; + return (-1); + } + if (unit == -1) + n = strlcpy(buf, BASEPATH, size); + else + n = snprintf(buf, size, BASEPATH "%d", unit); + + if (n >= size) { + errno = ENOMEM; + return (-1); + } + + return (0); +} diff --git a/lib/libmixer/mixer.h b/lib/libmixer/mixer.h index cb9575c5f012..80a4b5c91a82 100644 --- a/lib/libmixer/mixer.h +++ b/lib/libmixer/mixer.h @@ -115,6 +115,7 @@ int mixer_get_dunit(void); int mixer_set_dunit(struct mixer *, int); int mixer_get_mode(int); int mixer_get_nmixers(void); +int mixer_get_path(char *, size_t, int); __END_DECLS From nobody Thu May 23 00:58:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8tB4SlGz5LNsq; Thu, 23 May 2024 00:58: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 4Vl8tB2Js4z4lxJ; Thu, 23 May 2024 00:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZp6aJ6FfzK12ZSWK7HeBy1RA6NB8AVEKfowJQD8/xE=; b=IeZyzOSvPN2DU4ckurz/7+z4LREjtcmPGICdSdBKcHZnXnGynXeI8VlDdoYqU/LbKmdtxV m3mEl19SRsODgXZFZ7tsczjHkUmlt93W3lXADhu9vxTncFklgM0F/2mTvWy8GJeg8L5A+m z9tafGYLszVGvogncSocUDZsxxRYkFLoV9FZfT4bCsy7BrTZc/MdaATPNBMhY+yxnGQUMR 34R/bTj38V5blGioUhF7aGFHiiA7vKzg4Owwz79KQjQn8qKQ+e22wN6hWnCbs0/4LuP7so Nzwj+DakLK0MWRMxcjiEOIkn1Gqf+HnHL+qAPhVl7z/UOvWOfLNohHzRYzVzLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425890; a=rsa-sha256; cv=none; b=EmzIyGKE+kMeXPHyxncxO6JDvh/ba1NehoRJY4WC3Q1Jp3d7iHb+3xqFC5I0vL5je5jTKi UCG1091puZ4NsNb1zkP2mBS7d46vNlOIXJzmdQ8FYwkcvI+c3JATYl52WkNouWsPzGbdXy ikGWlD30tFqTo9xAzkx5gxtbR7o4Wngixb4IFFPH81HzxkdpfsEGQAUWz+Qgtn9wRd3p8A WckePHam0Rgp+/VLfJbmBJqmMhquARLROUxUbMIgutFSGn3hR9qw9aszChix6vPq6K5Dr1 mZxK5HfBMEFxl0HrBC6bnpI6kaE/KCHNOfAEEVKNWnBrdmt7dBOQRokHsrgirA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZp6aJ6FfzK12ZSWK7HeBy1RA6NB8AVEKfowJQD8/xE=; b=IyU1JDwifXeizN0+DjR2qekMqghhMKZ9XFclx7NvJwa5oznvMu4ApmtyPnWIjSE1A1L0Rl uONXEVW3XnaaoGabPcD4UaeaqJ7olphk+DdgxlC3YDHLqfiEn59KTBDQLiDImsheSuw5Vx rUk2rw/7d/rYdAYW02yIdwZS/xDDrKstfuIEwGi5Z/j4mtMlHk6TLYjSXf2sibGsAaRvEj z7amdki2qjWrYMeyIcw9c3qUyMRD0I3LlSgOEkKv6711XXZmBujCT9xAqxMKkG4ZHluL3K 88VyNHN47TSiFYychyZHcrKtjs5Gk4ub9HegfwP3a6ldgZbc0bnQHi28FBiq2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl8tB1d84zSTQ; Thu, 23 May 2024 00:58: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 44N0wA53072026; Thu, 23 May 2024 00:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0wAsN072023; Thu, 23 May 2024 00:58:10 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:10 GMT Message-Id: <202405230058.44N0wAsN072023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: e3b94b375e1d - main - mixer(8): Use mixer_get_path() List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f commit e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:43 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:43 +0000 mixer(8): Use mixer_get_path() Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45276 --- usr.sbin/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 284ea955b7b4..07dd16536495 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -97,7 +97,7 @@ main(int argc, char *argv[]) if ((n = mixer_get_nmixers()) < 0) errx(1, "no mixers present in the system"); for (i = 0; i < n; i++) { - (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i); + (void)mixer_get_path(buf, sizeof(buf), i); if ((m = mixer_open(buf)) == NULL) continue; initctls(m); From nobody Thu May 23 00:58:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8tC67ZXz5LNnk; Thu, 23 May 2024 00:58: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 4Vl8tC320Rz4lvG; Thu, 23 May 2024 00:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zy9zlmD6VT3se/etVyQy9UFAZT665oTVT6qRdLv7NFk=; b=yPGczrwk50FzZkzSIslNl4OtQE3rfvyKBZnaKsEBNycNvECDDdqflmgMqf326uH44osi7c saiRUdUpN9jOEAPUsfUqGv19ZcZJ6SuCLl4Y6I+fB+hxZYbsojIAH44Szxr8J73Z+ZDOuH vlqGnEMGPOLkLIvvA0+b40MH9f69dBWfpIgg7so69ZuaoD5kn9V9m7SKGSnjMYTi/KFqvt QkJN/9bPIqojlAfimv2Yqz413bqA/KfAKmla7stdM178wXs3RmUg3jaltjMSgwhyzZ9nUX w2BtLv4WtDpQNmSNSgMk35iVKDHB+vNCEpRmjcKQkspLlgqwi3acbziZdcfRcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425891; a=rsa-sha256; cv=none; b=ydHxl39Ob4StpPwzAekcXmn1PSsm13MCti+Sd+eP6WtNZkw+7lvAqu95i2nEe97ScHv5BV nryZ9gMlOhApvUcUVqGyoR4l4iFYpE89ocmMZPXO9pqeRZOMeZAJeG9SuNiHlykmCGKx5U WkWkcIo9LsJYgSbE2X4SqckxMEvClwiz2hLAffeHK6QMRcHFe+fPxl8D6z107djb+zi+VJ c8sPysf30umrEKGObcC8g7WGAD1ri0AOaBz34UpgutifB/fWByq17SQjKbpk44EOYzkzHF zp5Zq0L0VioQ69nOHXbGsAnLhW3gjzfIhgcqWxUz8cg7+D0DCDd5iNWS9lRIUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zy9zlmD6VT3se/etVyQy9UFAZT665oTVT6qRdLv7NFk=; b=SgXvRvLQ66Sbn34D9fuDWSv++UxYUl+FU43pBMZ0BklR/MItblIkrK9Pfk9XxTG18h0fC4 h3MBdJRNh5y449pYppe84ijyH+piys+adhBe7Mp2KYU/21IEMnlJWCIanUHQLdr9Y81s9h JNibRVM+LWl87WdLtZ7oGa6YhDmwxL4ukCk9CcDICqagF60xSrpJPae/Wi4amgXPo7jmwy qP2HRDFGuh93oTmkGv6GIZZT2O6cM1J64ts97/w1TZcDyS3UG9Z28nMxCT8zORCKxAUWre YGkUEfgra5Ci22YiyZUib4MdfvHqqSYm3Ug9lJu4FgceQdTSFnFA5qQ3QDI83Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl8tC2dxszSqT; Thu, 23 May 2024 00:58:11 +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 44N0wBZw072068; Thu, 23 May 2024 00:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0wB5Y072065; Thu, 23 May 2024 00:58:11 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:11 GMT Message-Id: <202405230058.44N0wB5Y072065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 1ab62c8d0674 - main - mixer.3: Fix mandoc -Tlint warnings List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ab62c8d067454b77bc9fb1c5aac75f263bb4143 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1ab62c8d067454b77bc9fb1c5aac75f263bb4143 commit 1ab62c8d067454b77bc9fb1c5aac75f263bb4143 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:49 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:49 +0000 mixer.3: Fix mandoc -Tlint warnings Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45290 --- lib/libmixer/mixer.3 | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index c8a7ee1148a8..4008867ef2fb 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -19,7 +19,6 @@ .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN .\" THE SOFTWARE. .\" - .Dd May 22, 2024 .Dt MIXER 3 .Os @@ -168,13 +167,15 @@ is always equal to the number of that pcmX device. For example, if the audio device's number is 0 (i.e pcm0), then .Ar unit is 0 as well. -This number is useful when checking if the mixer's audio card is the default one. +This number is useful when checking if the mixer's audio card is the default +one. .It Fa ndev Number of devices in .Ar devs . .It Fa devmask Bit mask containing all supported devices for the mixer. -For example, if device 10 is supported, then the 10th bit in the mask will be set. +For example, if device 10 is supported, then the 10th bit in the mask will be +set. By default, .Fn mixer_open stores only the supported devices in devs, so it is very unlikely this mask will @@ -318,23 +319,27 @@ opens the default mixer (hw.snd.default_unit). The .Fn mixer_close function frees resources and closes the mixer device. -It is a good practice to always call it when the application is done using the mixer. +It is a good practice to always call it when the application is done using the +mixer. .Ss Manipulating the mixer The .Fn mixer_get_dev and .Fn mixer_get_dev_byname -functions select a mixer device, either by its number or by its name respectively. -The mixer structure keeps a list of all the devices, but only \ -one can be manipulated at a time. -Each time a new device is to be manipulated, one of the two functions has to be called. +functions select a mixer device, either by its number or by its name +respectively. +The mixer structure keeps a list of all the devices, but only one can be +manipulated at a time. +Each time a new device is to be manipulated, one of the two functions has to be +called. .Pp The .Fn mixer_set_vol function changes the volume of the selected mixer device. The .Ar vol -parameter is a structure that stores the left and right volumes of a given device. +parameter is a structure that stores the left and right volumes of a given +device. The allowed volume values are between MIX_VOLMIN (0.0) and MIX_VOLMAX (1.0). .Pp The @@ -355,7 +360,8 @@ Toggle the device's mute (e.g mute if unmuted and unmute if muted). The .Fn mixer_mod_recsrc function modifies a recording device. -The selected device has to be a recording device, otherwise the function will fail. +The selected device has to be a recording device, otherwise the function will +fail. The .Ar opt parameter has to be one of the following options: From nobody Thu May 23 00:58:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8tD5H0qz5LNqc; Thu, 23 May 2024 00:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8tD42S2z4m7R; Thu, 23 May 2024 00:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0n4CXbHtTcBLi0TrD5wpkNxokbuQCZrOsuLrkXTPa4=; b=sBq03J3HAv/LREchYEe6kWc3F1oSiIinOLrmrmKD2vBWnd4TNcGJLvKCXwygxjJ2mjMXDl LurqfIXJdiIGG3tKzp9Qc16BX240l224PHCPrUHO84Sk654KerfE9fbrElhS8GepxiJsID gY3qqR98crY5nqhH7pbumQ+CL1kUltkCFnuAsudzTL/Hz8Ey4DxJnM1n5rDb1fmr4hMcu/ YCa3Wf6WAJIdaJiV1IO0XezvuTBAwZeje+9B8rTHYZqAmtUaF3fg97t+LZKANQYNoHEZuW x8hAIySHwcjU7NwdQb5fOsAqvEAhmPjY4Y2UYuFzgQ/n82TXyUICdWJMEf+NKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425892; a=rsa-sha256; cv=none; b=VxNJW/5ZX1EOpRUv2ebH1TB00Dc4ZAVTB34tcpeJF1yb8ArDmYQv2fYZhFoays6NjwPklR Sz4gkB5ZCxDf82eMscr3WZmF/EoOK5roz/ECW6ev1hPFawzUWQPqdcMPRfp6nMF3FZxIIW iylnq6/WwaqeSKJyJcsm8tSSMmd5VhP+vVKAQB+USkk88mxjxo5Ryi2rubzhEurxx/rIrb cvauXz1L24xuaCeHEY1ksaGRCcSV+0f2TS8SFhSvEMkeLuZWnd+DervA++ja6obYC8iEqL HJtpm9tUR1UrelvbNmJ78FEo/YgwJz4sj0XQu/UWhKRb3dpz+NOlMPLWgtD5TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0n4CXbHtTcBLi0TrD5wpkNxokbuQCZrOsuLrkXTPa4=; b=Dj0it7MzQpRhgVf45FESSzJf3CE+fCPglP5G0yEaWksP7ixjS87ouvnetPTrpZvSX/dgf7 LTa7t/tH6eKJHDtLuSCRoalBm10BaNG3XHUafB6lvA0sjKH5NOdbn/UkN6TV5Gsgiz+V9q 10LipmNFjUDfB5kfeaTRE0qblcvkXxHIgA90b3g9s7oBd2hADMCDWpFEBL4mypnnHhQ7kL rjQn+ClJt5uGw/PtOIvAPwNMLYHS4Xk+mynQuJ/KRA22F5ht4C6/euU/OphCKOJ+9kYYUs GRRuLory9eNOd6uQH/5ZtsztZltdLbAHe0F9t8Zgn9zFFjV/EK2d4weJ7lWXpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vl8tD3fK8zSYj; Thu, 23 May 2024 00:58:12 +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 44N0wCpN072125; Thu, 23 May 2024 00:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0wCaN072122; Thu, 23 May 2024 00:58:12 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:12 GMT Message-Id: <202405230058.44N0wCaN072122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 425a7bc465d4 - main - sound: Fix minchn, maxchn and fmts in sndstat_get_caps() List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 425a7bc465d4a6393c88c2e79c5ad77befda2a97 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=425a7bc465d4a6393c88c2e79c5ad77befda2a97 commit 425a7bc465d4a6393c88c2e79c5ad77befda2a97 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:55 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:55 +0000 sound: Fix minchn, maxchn and fmts in sndstat_get_caps() The current implementation (incorrectly) passes the channel encoding value to AFMT_CHANNEL(), which will always return 0, since the channel number bits are masked out by AFMT_ENCODING(). Also add missing fmts initialization and aggregate encoding formats into it directly. Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45312 --- sys/dev/sound/pcm/sndstat.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index bbcb2fda7c29..6880ce383ba4 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -330,7 +330,6 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, uint32_t *max_rate, uint32_t *fmts, uint32_t *minchn, uint32_t *maxchn) { struct pcm_channel *c; - unsigned int encoding; int dir; dir = play ? PCMDIR_PLAY : PCMDIR_REC; @@ -347,11 +346,11 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, return; } + *fmts = 0; *min_rate = UINT32_MAX; *max_rate = 0; *minchn = UINT32_MAX; *maxchn = 0; - encoding = 0; CHN_FOREACH(c, d, channels.pcm) { struct pcmchan_caps *caps; int i; @@ -364,9 +363,9 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, *min_rate = min(caps->minspeed, *min_rate); *max_rate = max(caps->maxspeed, *max_rate); for (i = 0; caps->fmtlist[i]; i++) { - encoding |= AFMT_ENCODING(caps->fmtlist[i]); - *minchn = min(AFMT_CHANNEL(encoding), *minchn); - *maxchn = max(AFMT_CHANNEL(encoding), *maxchn); + *fmts |= AFMT_ENCODING(caps->fmtlist[i]); + *minchn = min(AFMT_CHANNEL(caps->fmtlist[i]), *minchn); + *maxchn = max(AFMT_CHANNEL(caps->fmtlist[i]), *maxchn); } CHN_UNLOCK(c); } From nobody Thu May 23 03:11:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCqf45X3z5LcNS; Thu, 23 May 2024 03:11: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 4VlCqf3xJnz4CB7; Thu, 23 May 2024 03:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716433870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7hyCHc8EWBFp4DD23A7WgIlMbZ4vX5KoAOQs5WdCkU=; b=aRHXpchi/N2sBC7EA5IP0I9bg69alKDPFl/C72xdmcvSyX2CJREyyw8L9LBUEmuMONDVdQ LsCoJpY81xx0n1uA/dCJN1JBJHF12uYyEK9oZsEhwEDw9ozuWbq2eYD40RAXGLYJh4DVKH l4WC9g4kHUNBXAo+wBmF/ruxfvWLwcMmNqTFi7NRFuB/zXeWHVostD+4gLVicedu7xdd94 wSbVWmmcUTuk1a46qb0I6xCNa5fF7TsP182R988Rmm64Duv6Vj2Na5cX4IyrN+jtUUhi2V VlGApPfZwahsDgwkUQ014OCjVxdbnTP0M+HD8LdA+eHIzPbrvgU/8loEz+s32A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716433870; a=rsa-sha256; cv=none; b=vGBBcoYbvBXqU9g8jrFnCUZmiQg8MybPqz2yHof4jqoXoSCWTzHJ9xvr8B7PjK2BSaMYSP jLxlVVMFrkE2fSCtFeNyQU4gAh/EIBYSwEfcPeUo9vSPM3guiNcIdrfuhrAnuZejqIQEXY OGghgaguRf3AKu9ev5nRtnQKb1NZI/P2wLtH/VlYbPI2bDlgnvtHrAiazAznUGk5F9RplT hQrq9+00FZiDHh7ExAMgAmdF89xwAu34Souz4FOreuEa3zC5EWWDE9sVCWY1NRY/i0+Rvw oQeCyprN790GDMfj2fff2w3d+43nmNGA5PhA3n4sLb3htz/l4NApLk/ELH/Q+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716433870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7hyCHc8EWBFp4DD23A7WgIlMbZ4vX5KoAOQs5WdCkU=; b=jQf6DhV9LdTIoK+/SDKNWuIBGAlklNmtzIO27rEPSTrjqd2RN+unkqMaoa64G2tbwzQmLT +3+iBbhupwNHxzwU6MRWNgzaygcdKM70zl8ecRBjFrqvCsEWZafmP7DAuyLVtFlvJKFtdv ZwTupI3ljjs/7k9lowhnLV2bk8i+wJ8SmGox/ix15fnCp5HP0q554fzvLwtpUeZiQ7MXbb JZ2fLMyySGq17T3CsftEKHZATIvIjQ0G0i9P2LZUeg78Gbjd21SFHkUERzW1XowcSRjAO7 MdvevWLP8L3WkqbCi4luDYkTlX2+29zOsumk2gsJVx8lDU9PE7K0BCz2YUWlLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlCqf3M7TzYQx; Thu, 23 May 2024 03:11: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 44N3BAOR003899; Thu, 23 May 2024 03:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N3BAJT003896; Thu, 23 May 2024 03:11:10 GMT (envelope-from git) Date: Thu, 23 May 2024 03:11:10 GMT Message-Id: <202405230311.44N3BAJT003896@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox <alc@FreeBSD.org> Subject: git: 9fc5e3fb39ca - main - arm64: set ATTR_CONTIGUOUS on the DMAP's L2 blocks List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9fc5e3fb39ca5b2239066b750bea2ce5775bd79b Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=9fc5e3fb39ca5b2239066b750bea2ce5775bd79b commit 9fc5e3fb39ca5b2239066b750bea2ce5775bd79b Author: Alan Cox <alc@FreeBSD.org> AuthorDate: 2024-05-13 06:39:28 +0000 Commit: Alan Cox <alc@FreeBSD.org> CommitDate: 2024-05-23 03:09:43 +0000 arm64: set ATTR_CONTIGUOUS on the DMAP's L2 blocks On systems configured with 16KB pages, this change creates 1GB page mappings in the direct map where possible. Previously, the largest page size that was used to implement the direct map was 32MB. Similarly, on systems configured with 4KB pages, this change creates 32MB page mappings, instead of 2MB, in the direct map where 1GB is too large. Implement demotion on L2C (32MB/1GB) page mappings within the DMAP. Update sysctl vm.pmap.kernel_maps to report on L2C page mappings. Reviewed by: markj Tested by: gallatin, Eliot Solomon <ehs3@rice.edu> Differential Revision: https://reviews.freebsd.org/D45224 --- sys/arm64/arm64/pmap.c | 264 ++++++++++++++++++++++++++++++++++++++++++------ sys/arm64/include/pte.h | 5 + 2 files changed, 237 insertions(+), 32 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 269513589d78..2ce313de36cf 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -429,7 +429,6 @@ void (*pmap_stage2_invalidate_all)(uint64_t); #define TLBI_VA_SHIFT 12 #define TLBI_VA_MASK ((1ul << 44) - 1) #define TLBI_VA(addr) (((addr) >> TLBI_VA_SHIFT) & TLBI_VA_MASK) -#define TLBI_VA_L3_INCR (L3_SIZE >> TLBI_VA_SHIFT) static int __read_frequently superpages_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, superpages_enabled, @@ -470,6 +469,7 @@ static pt_entry_t *pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va); static pt_entry_t *pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, struct rwlock **lockp); static pt_entry_t *pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va); +static bool pmap_demote_l2c(pmap_t pmap, pt_entry_t *l2p, vm_offset_t va); static bool pmap_demote_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); @@ -1108,6 +1108,7 @@ pmap_bootstrap_l2_table(struct pmap_bootstrap_state *state) static void pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i) { + pt_entry_t contig; u_int l2_slot; bool first; @@ -1118,7 +1119,7 @@ pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i) pmap_bootstrap_l1_table(state); MPASS((state->va & L2_OFFSET) == 0); - for (first = true; + for (first = true, contig = 0; state->va < DMAP_MAX_ADDRESS && (physmap[i + 1] - state->pa) >= L2_SIZE; state->va += L2_SIZE, state->pa += L2_SIZE) { @@ -1129,13 +1130,27 @@ pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i) if (!first && (state->pa & L1_OFFSET) == 0) break; + /* + * If we have an aligned, contiguous chunk of L2C_ENTRIES + * L2 blocks, set the contiguous bit within each PTE so that + * the chunk can be cached using only one TLB entry. + */ + if ((state->pa & L2C_OFFSET) == 0) { + if (state->va + L2C_SIZE < DMAP_MAX_ADDRESS && + physmap[i + 1] - state->pa >= L2C_SIZE) { + contig = ATTR_CONTIGUOUS; + } else { + contig = 0; + } + } + first = false; l2_slot = pmap_l2_index(state->va); MPASS((state->pa & L2_OFFSET) == 0); MPASS(state->l2[l2_slot] == 0); pmap_store(&state->l2[l2_slot], PHYS_TO_PTE(state->pa) | ATTR_DEFAULT | ATTR_S1_XN | ATTR_KERN_GP | - ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | L2_BLOCK); + ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | contig | L2_BLOCK); } MPASS(state->va == (state->pa - dmap_phys_base + DMAP_MIN_ADDRESS)); } @@ -1667,6 +1682,20 @@ pmap_init(void) vm_initialized = 1; } +static SYSCTL_NODE(_vm_pmap, OID_AUTO, l1, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "L1 (1GB/64GB) page mapping counters"); + +static COUNTER_U64_DEFINE_EARLY(pmap_l1_demotions); +SYSCTL_COUNTER_U64(_vm_pmap_l1, OID_AUTO, demotions, CTLFLAG_RD, + &pmap_l1_demotions, "L1 (1GB/64GB) page demotions"); + +static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2c, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "L2C (32MB/1GB) page mapping counters"); + +static COUNTER_U64_DEFINE_EARLY(pmap_l2c_demotions); +SYSCTL_COUNTER_U64(_vm_pmap_l2c, OID_AUTO, demotions, CTLFLAG_RD, + &pmap_l2c_demotions, "L2C (32MB/1GB) page demotions"); + static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "2MB page mapping counters"); @@ -1771,12 +1800,12 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va, bool final_only) } /* - * Invalidates any cached final- and optionally intermediate-level TLB entries - * for the specified virtual address range in the given virtual address space. + * Use stride L{1,2}_SIZE when invalidating the TLB entries for L{1,2}_BLOCK + * mappings. Otherwise, use stride L3_SIZE. */ static __inline void -pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, - bool final_only) +pmap_s1_invalidate_strided(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + vm_offset_t stride, bool final_only) { uint64_t end, r, start; @@ -1786,19 +1815,30 @@ pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap == kernel_pmap) { start = TLBI_VA(sva); end = TLBI_VA(eva); - for (r = start; r < end; r += TLBI_VA_L3_INCR) + for (r = start; r < end; r += TLBI_VA(stride)) pmap_s1_invalidate_kernel(r, final_only); } else { start = end = ASID_TO_OPERAND(COOKIE_TO_ASID(pmap->pm_cookie)); start |= TLBI_VA(sva); end |= TLBI_VA(eva); - for (r = start; r < end; r += TLBI_VA_L3_INCR) + for (r = start; r < end; r += TLBI_VA(stride)) pmap_s1_invalidate_user(r, final_only); } dsb(ish); isb(); } +/* + * Invalidates any cached final- and optionally intermediate-level TLB entries + * for the specified virtual address range in the given virtual address space. + */ +static __inline void +pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + bool final_only) +{ + pmap_s1_invalidate_strided(pmap, sva, eva, L3_SIZE, final_only); +} + static __inline void pmap_s2_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, bool final_only) @@ -4521,7 +4561,6 @@ static void pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, vm_offset_t va, vm_size_t size) { - pd_entry_t *lip, *ptep_end; register_t intr; PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -4529,11 +4568,6 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, if ((newpte & ATTR_SW_NO_PROMOTE) != 0) panic("%s: Updating non-promote pte", __func__); - if (size == L3C_SIZE) - ptep_end = ptep + L3C_ENTRIES; - else - ptep_end = ptep + 1; - /* * Ensure we don't get switched out with the page table in an * inconsistent state. We also need to ensure no interrupts fire @@ -4546,20 +4580,59 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, * unchanged, so that a lockless, concurrent pmap_kextract() can still * lookup the physical address. */ - for (lip = ptep; lip < ptep_end; lip++) - pmap_clear_bits(lip, ATTR_DESCR_VALID); + pmap_clear_bits(ptep, ATTR_DESCR_VALID); /* * When promoting, the L{1,2}_TABLE entry that is being replaced might * be cached, so we invalidate intermediate entries as well as final * entries. */ - pmap_s1_invalidate_range(pmap, va, va + size, size == L3C_SIZE); + pmap_s1_invalidate_range(pmap, va, va + size, false); /* Create the new mapping */ + pmap_store(ptep, newpte); + dsb(ishst); + + intr_restore(intr); +} + +/* + * Performs a break-before-make update of an ATTR_CONTIGUOUS mapping. + */ +static void +pmap_update_strided(pmap_t pmap, pd_entry_t *ptep, pd_entry_t *ptep_end, + pd_entry_t newpte, vm_offset_t va, vm_offset_t stride, vm_size_t size) +{ + pd_entry_t *lip; + register_t intr; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + + if ((newpte & ATTR_SW_NO_PROMOTE) != 0) + panic("%s: Updating non-promote pte", __func__); + + /* + * Ensure we don't get switched out with the page table in an + * inconsistent state. We also need to ensure no interrupts fire + * as they may make use of an address we are about to invalidate. + */ + intr = intr_disable(); + + /* + * Clear the old mapping's valid bits, but leave the rest of each + * entry unchanged, so that a lockless, concurrent pmap_kextract() can + * still lookup the physical address. + */ + for (lip = ptep; lip < ptep_end; lip++) + pmap_clear_bits(lip, ATTR_DESCR_VALID); + + /* Only final entries are changing. */ + pmap_s1_invalidate_strided(pmap, va, va + size, stride, true); + + /* Create the new mapping. */ for (lip = ptep; lip < ptep_end; lip++) { pmap_store(lip, newpte); - newpte += PAGE_SIZE; + newpte += stride; } dsb(ishst); @@ -4873,8 +4946,8 @@ set_l3: /* * Remake the mappings with the contiguous bit set. */ - pmap_update_entry(pmap, l3p, firstl3c | ATTR_CONTIGUOUS, va & - ~L3C_OFFSET, L3C_SIZE); + pmap_update_strided(pmap, l3p, l3p + L3C_ENTRIES, firstl3c | + ATTR_CONTIGUOUS, va & ~L3C_OFFSET, L3_SIZE, L3C_SIZE); counter_u64_add(pmap_l3c_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_l3c: success for va %#lx in pmap %p", va, @@ -7843,8 +7916,9 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, MPASS((pmap_load(ptep) & ATTR_SW_NO_PROMOTE) == 0); /* - * Split the entry to an level 3 table, then - * set the new attribute. + * Find the entry and demote it if the requested change + * only applies to part of the address range mapped by + * the entry. */ switch (lvl) { default: @@ -7863,6 +7937,16 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, ptep = pmap_l1_to_l2(ptep, tmpva); /* FALLTHROUGH */ case 2: + if ((pmap_load(ptep) & ATTR_CONTIGUOUS) != 0) { + if ((tmpva & L2C_OFFSET) == 0 && + (base + size - tmpva) >= L2C_SIZE) { + pte_size = L2C_SIZE; + break; + } + if (!pmap_demote_l2c(kernel_pmap, ptep, + tmpva)) + return (EINVAL); + } if ((tmpva & L2_OFFSET) == 0 && (base + size - tmpva) >= L2_SIZE) { pte_size = L2_SIZE; @@ -7894,8 +7978,26 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, pte &= ~mask; pte |= bits; - pmap_update_entry(kernel_pmap, ptep, pte, tmpva, - pte_size); + switch (pte_size) { + case L2C_SIZE: + pmap_update_strided(kernel_pmap, ptep, ptep + + L2C_ENTRIES, pte, tmpva, L2_SIZE, L2C_SIZE); + break; + case L3C_SIZE: + pmap_update_strided(kernel_pmap, ptep, ptep + + L3C_ENTRIES, pte, tmpva, L3_SIZE, L3C_SIZE); + break; + default: + /* + * We are updating a single block or page entry, + * so regardless of pte_size pass PAGE_SIZE in + * order that a single TLB invalidation is + * performed. + */ + pmap_update_entry(kernel_pmap, ptep, pte, tmpva, + PAGE_SIZE); + break; + } pa = PTE_TO_PHYS(pte); if (!VIRT_IN_DMAP(tmpva) && PHYS_IN_DMAP(pa)) { @@ -7970,13 +8072,14 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va) newl2 = oldl1 & ATTR_MASK; /* Create the new entries */ + newl2 |= ATTR_CONTIGUOUS; for (i = 0; i < Ln_ENTRIES; i++) { l2[i] = newl2 | phys; phys += L2_SIZE; } - KASSERT(l2[0] == ((oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK), - ("Invalid l2 page (%lx != %lx)", l2[0], - (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK)); + KASSERT(l2[0] == (ATTR_CONTIGUOUS | (oldl1 & ~ATTR_DESCR_MASK) | + L2_BLOCK), ("Invalid l2 page (%lx != %lx)", l2[0], + ATTR_CONTIGUOUS | (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK)); if (tmpl1 != 0) { pmap_kenter(tmpl1, PAGE_SIZE, @@ -7987,6 +8090,7 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va) pmap_update_entry(pmap, l1, l2phys | L1_TABLE, va, PAGE_SIZE); + counter_u64_add(pmap_l1_demotions, 1); fail: if (tmpl1 != 0) { pmap_kremove(tmpl1); @@ -8227,6 +8331,96 @@ pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va) return (l3); } +/* + * Demote an L2C superpage mapping to L2C_ENTRIES L2 block mappings. + */ +static bool +pmap_demote_l2c(pmap_t pmap, pt_entry_t *l2p, vm_offset_t va) +{ + pd_entry_t *l2c_end, *l2c_start, l2e, mask, nbits, *tl2p; + vm_offset_t tmpl3; + register_t intr; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); + l2c_start = (pd_entry_t *)((uintptr_t)l2p & ~((L2C_ENTRIES * + sizeof(pd_entry_t)) - 1)); + l2c_end = l2c_start + L2C_ENTRIES; + tmpl3 = 0; + if ((va & ~L2C_OFFSET) < (vm_offset_t)l2c_end && + (vm_offset_t)l2c_start < (va & ~L2C_OFFSET) + L2C_SIZE) { + tmpl3 = kva_alloc(PAGE_SIZE); + if (tmpl3 == 0) + return (false); + pmap_kenter(tmpl3, PAGE_SIZE, + DMAP_TO_PHYS((vm_offset_t)l2c_start) & ~L3_OFFSET, + VM_MEMATTR_WRITE_BACK); + l2c_start = (pd_entry_t *)(tmpl3 + + ((vm_offset_t)l2c_start & PAGE_MASK)); + l2c_end = (pd_entry_t *)(tmpl3 + + ((vm_offset_t)l2c_end & PAGE_MASK)); + } + mask = 0; + nbits = ATTR_DESCR_VALID; + intr = intr_disable(); + + /* + * Break the mappings. + */ + for (tl2p = l2c_start; tl2p < l2c_end; tl2p++) { + /* + * Clear the mapping's contiguous and valid bits, but leave + * the rest of the entry unchanged, so that a lockless, + * concurrent pmap_kextract() can still lookup the physical + * address. + */ + l2e = pmap_load(tl2p); + KASSERT((l2e & ATTR_CONTIGUOUS) != 0, + ("pmap_demote_l2c: missing ATTR_CONTIGUOUS")); + KASSERT((l2e & (ATTR_SW_DBM | ATTR_S1_AP_RW_BIT)) != + (ATTR_SW_DBM | ATTR_S1_AP(ATTR_S1_AP_RO)), + ("pmap_demote_l2c: missing ATTR_S1_AP_RW")); + while (!atomic_fcmpset_64(tl2p, &l2e, l2e & ~(ATTR_CONTIGUOUS | + ATTR_DESCR_VALID))) + cpu_spinwait(); + + /* + * Hardware accessed and dirty bit maintenance might only + * update a single L2 entry, so we must combine the accessed + * and dirty bits from this entire set of contiguous L2 + * entries. + */ + if ((l2e & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == + (ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_SW_DBM)) + mask = ATTR_S1_AP_RW_BIT; + nbits |= l2e & ATTR_AF; + } + if ((nbits & ATTR_AF) != 0) { + pmap_s1_invalidate_strided(pmap, va & ~L2C_OFFSET, (va + + L2C_SIZE) & ~L2C_OFFSET, L2_SIZE, true); + } + + /* + * Remake the mappings, updating the accessed and dirty bits. + */ + for (tl2p = l2c_start; tl2p < l2c_end; tl2p++) { + l2e = pmap_load(tl2p); + while (!atomic_fcmpset_64(tl2p, &l2e, (l2e & ~mask) | nbits)) + cpu_spinwait(); + } + dsb(ishst); + + intr_restore(intr); + if (tmpl3 != 0) { + pmap_kremove(tmpl3); + kva_free(tmpl3, PAGE_SIZE); + } + counter_u64_add(pmap_l2c_demotions, 1); + CTR2(KTR_PMAP, "pmap_demote_l2c: success for va %#lx in pmap %p", + va, pmap); + return (true); +} + /* * Demote a L3C superpage mapping to L3C_ENTRIES 4KB page mappings. */ @@ -9314,6 +9508,7 @@ struct pmap_kernel_map_range { int l3pages; int l3contig; int l2blocks; + int l2contig; int l1blocks; }; @@ -9352,15 +9547,15 @@ sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_map_range *range, break; } - sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c%c %6s %d %d %d %d\n", + sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c%c %6s %d %d %d %d %d\n", range->sva, eva, (range->attrs & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP_RW ? 'w' : '-', (range->attrs & ATTR_S1_PXN) != 0 ? '-' : 'x', (range->attrs & ATTR_S1_UXN) != 0 ? '-' : 'X', (range->attrs & ATTR_S1_AP(ATTR_S1_AP_USER)) != 0 ? 'u' : 's', (range->attrs & ATTR_S1_GP) != 0 ? 'g' : '-', - mode, range->l1blocks, range->l2blocks, range->l3contig, - range->l3pages); + mode, range->l1blocks, range->l2contig, range->l2blocks, + range->l3contig, range->l3pages); /* Reset to sentinel value. */ range->sva = 0xfffffffffffffffful; @@ -9525,7 +9720,12 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) if ((l2e & ATTR_DESCR_MASK) == L2_BLOCK) { sysctl_kmaps_check(sb, &range, sva, l0e, l1e, l2e, 0); - range.l2blocks++; + if ((l2e & ATTR_CONTIGUOUS) != 0) + range.l2contig += + k % L2C_ENTRIES == 0 ? + 1 : 0; + else + range.l2blocks++; sva += L2_SIZE; continue; } diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h index 56eede01d776..1f36655a45e2 100644 --- a/sys/arm64/include/pte.h +++ b/sys/arm64/include/pte.h @@ -198,13 +198,18 @@ typedef uint64_t pt_entry_t; /* page table entry */ * can be coalesced into a single TLB entry */ #if PAGE_SIZE == PAGE_SIZE_4K +#define L2C_ENTRIES 16 #define L3C_ENTRIES 16 #elif PAGE_SIZE == PAGE_SIZE_16K +#define L2C_ENTRIES 32 #define L3C_ENTRIES 128 #else #error Unsupported page size #endif +#define L2C_SIZE (L2C_ENTRIES * L2_SIZE) +#define L2C_OFFSET (L2C_SIZE - 1) + #define L3C_SIZE (L3C_ENTRIES * L3_SIZE) #define L3C_OFFSET (L3C_SIZE - 1) From nobody Thu May 23 04:11:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlF8y4Xw7z5H1Mt; Thu, 23 May 2024 04:11: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 4VlF8y40dVz4JLx; Thu, 23 May 2024 04:11:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716437474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDX3kYqtkgT8gjT881coc+VQe++F81JR7Bece5BHg7Q=; b=D1nBnWMcWjjt/4uYMocCs0mo0aMgZMpM33W31Xp0C760Ubjy+vLlAFGE3sASPYXgpN3X8d TfP9thgLpz4HRfCj/NIRfvcZNz00IzHeL8lUYvrNwO1vDtmpSW1AncjJuHG8fALJaJqRzY XJ7+JpID3eVyX54kHkcymFyVKzb8wPChXpGuJOOMmNia0REid4H6geJhRZd7wXYkbXxoI2 Kqcy0UCC9CVJ9ewX7Fu0IYouLv8rjaTOUPIRQhOLGKrSghifNrUByuL7XNN70npoMFdVtb TfIlmFQET7Z15YFt/KSE6o/4y0JwxjWXjL/llzA8MJLIA5LC69UVpGzQf3knNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716437474; a=rsa-sha256; cv=none; b=HOmVWA7ODfZ8fsUd/GggN3YkdZwILEu+oR5biUM9Bt0E82NFBjsnBi6K9QwepHwmUzjSO6 2y2GLXhKrnL3AQ1bCZ85S8BRh2XuH3JR1ul+lutewPixCUECyTpkWP8IVvRXvD6ibwdlhd 46BK6Ev3xp4esfBfOEY8TfvwHEMZ0xoaqE//1vNPX+i8peBmXUdoadyolkA6CepBDnuw0Q ShPAFyy0Xsj82wW/l89VgklGJ2JGVpmcWomgUfxX9PlIjYxPdlTPlktnrlylxX/tcxKQNy 8bQk58lsKbtSAgQ9/C8x9KF3lwLcRXkbRbzbe5FDr9gc7fHYR9G+x2AiSXHthQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716437474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDX3kYqtkgT8gjT881coc+VQe++F81JR7Bece5BHg7Q=; b=Y+KJQhAEuyqpceo0oqLii1yze9C/W8dMmtFmNbe9V/XyOSUHhOeTP1sskeQNqzjd1LvgKz W8a4t94m4EbRynqpS5S1Q1f0ogOm3aDx2ymy/00RjOBFDtnYIyzgwT8ZS2RDUvO8QjqmVa 0JsDGFPqdZEHs/hX2QVC+TcTh7xF/63PSPbH+Pzy4vywaivh9CIwY6Y2ZNlss6pj4dJJo6 NurM3itLtS1OG1CXZIg39ZcXVHNaLAM9+yuEks4Oo6E9eqXbWhNMPDmjZjcIH3N3wj9y6P LBKZFOsRBDGNT+z8oTDNircOml3SxsG6X7vThV7K2C6jnrM0hF7t+Vqyofio8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlF8y3Zr5zZ5W; Thu, 23 May 2024 04:11: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 44N4BETS009285; Thu, 23 May 2024 04:11:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N4BEIC009282; Thu, 23 May 2024 04:11:14 GMT (envelope-from git) Date: Thu, 23 May 2024 04:11:14 GMT Message-Id: <202405230411.44N4BEIC009282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang <zlei@FreeBSD.org> Subject: git: d76ef58d566c - main - freebsd-update: Correctly check if pkg(8) is present List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d76ef58d566ccf203b21a1c8fea55985f355d4d2 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d76ef58d566ccf203b21a1c8fea55985f355d4d2 commit d76ef58d566ccf203b21a1c8fea55985f355d4d2 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-05-23 04:10:17 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-05-23 04:10:17 +0000 freebsd-update: Correctly check if pkg(8) is present On systems without pkg(8) installed, `command -v pkg` will return success and falsely report that pkg(8) is present. Fix that by checking via the `pkg -N` form. This is missing from the final revision of D39695. Reported by: delphij Reviewed by: fernape, delphij Fixes: bc0c6c9cf3a9 freebsd-update: Add check for kernel modules Differential Revision: https://reviews.freebsd.org/D45292 --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index fb9924ee60eb..1456601edf26 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -667,7 +667,7 @@ upgrade_check_kmod_ports() { local report local w - if ! command -v pkg >/dev/null; then + if ! pkg -N 2>/dev/null; then echo "Skipping kernel modules check. pkg(8) not present." return fi From nobody Thu May 23 06:08:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlHmK0Tc3z5HDQC; Thu, 23 May 2024 06:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlHmJ6qXbz4T6L; Thu, 23 May 2024 06:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716444513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3Hd8gO5XLmQT/kVXQNHYpHU9sWfkahYjeQaX8wj3Ek=; b=BHg3KfhQDelkyjllc6ATcXU1yHfg2K6naFzIB0dAWOxNI6rOIxNpms6XZEUsY4ack3Xt4U 4+xljqMJPysoK7pT3p09AXri+9EjHYRyJ3wTWVvK7/eVgplbM77neuHYbrBsmBQv4z7C9K YGDq8Dl9J6NUIh2TiDz0jWBOex7ioWp96GaqrM4E07a9xZYI5+6AeWll6Ln5H8yqw9tdQ5 16yqqrTAY3QeLIZI+4na4HKBlSL4Oi/TyYj3IjajFTFI2N92QFmaf16wHxmMGWUa1hg2+L S5wzQT293TrEeccM3t6VvlqDMXb0t1zFde+mwEwfee65F+YFycU5G+qqagjvfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716444513; a=rsa-sha256; cv=none; b=e8FCZ6R+G/IpmEAwf3RtCD1ImaHLnf6Rp1db0RSzPzZQzOo4YphNMXdFKqZQVlfuf+Oucj VsW6V/0+oPTJvtpIIsqPNlk39B0bQ1QpcM/Ha7d9KsvBMmuGb6rXTJZmATqLsMBRY+MSOq q2rGj5TecUtywEuBjUowJ7BZct3qYQdJZHmtWYxpgJPmuqv4zyvQwu7teNcNPDkANMk3dP LJnUU70CLr4soPxuucCFLcyV/xlW+9CBkwWEp0/M++vicfCbzjE/IdjAsGIosF9KMd/y58 L8FfEUxemzIlg+8NgloE01kyFESvUqwAWtch1SMawfOkmmT7Y1KY4kkrYgVGPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716444513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3Hd8gO5XLmQT/kVXQNHYpHU9sWfkahYjeQaX8wj3Ek=; b=EvlEboG0fFzlY9rSiCvKNgIzIrPYGvft9AMRDRLGrliag9lGth3Suqe7niKw7k5Kjmfd94 tKqC3AyKbDSYKGI9D0kXj5ITVcBa1FWbbtd9gb7KTbevR1AS4pn6WnBs2P6M7i1Q6C7KqV y0Cds30DoiXmhzGEMbD7JGlPRxVMeZlG8EmAihSbGRsnp3vyOESy4AP/5jdmMH45zMaBLN FYclzndeNbrIl5QywbcUjUOPVB4/eKd3sV8Ujzv4LTqow8I4/Y6px8a+mA7o5WQ5kMOTyA y0lf4jlzj3wbGRZaXluESaJB6ufLUniEn7oEKOJhY8eBxB27sUOkh9Qqg8pe6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlHmJ6P8pzdGx; Thu, 23 May 2024 06:08: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 44N68WFr000244; Thu, 23 May 2024 06:08:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N68WUV000241; Thu, 23 May 2024 06:08:32 GMT (envelope-from git) Date: Thu, 23 May 2024 06:08:32 GMT Message-Id: <202405230608.44N68WUV000241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek <pjd@FreeBSD.org> Subject: git: 56a8aca83ab5 - main - Stop treating size 0 as unknown size in vnode_create_vobject(). List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56a8aca83ab5a93af05f4c8c3a358b71a8392af8 Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=56a8aca83ab5a93af05f4c8c3a358b71a8392af8 commit 56a8aca83ab5a93af05f4c8c3a358b71a8392af8 Author: Pawel Jakub Dawidek <pjd@FreeBSD.org> AuthorDate: 2024-05-19 01:08:41 +0000 Commit: Pawel Jakub Dawidek <pjd@FreeBSD.org> CommitDate: 2024-05-23 06:08:14 +0000 Stop treating size 0 as unknown size in vnode_create_vobject(). Whenever file is created, the vnode_create_vobject() function will try to determine its size by calling vn_getsize_locked() as size 0 is ambigious: it means either the file size is 0 or the file size is unknown. Introduce special value for the size argument: VNODE_NO_SIZE. Only when it is given, the vnode_create_vobject() will try to obtain file's size on its own. Introduce dedicated vnode_disk_create_vobject() for use by g_vfs_open(), so we don't have to call vn_isdisk() in the common case (for regular files). Handle the case of mediasize==0 in g_vfs_open(). Reviewed by: alc, kib, markj, olce Approved by: oshogbo (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D45244 --- sys/fs/ext2fs/ext2_vfsops.c | 2 +- sys/fs/fuse/fuse_node.c | 2 +- sys/fs/fuse/fuse_vfsops.c | 2 +- sys/geom/geom_vfs.c | 11 ++++++++++- sys/sys/vnode.h | 7 +++++++ sys/vm/vnode_pager.c | 45 +++++++++++++++++++++++++++++++-------------- 6 files changed, 51 insertions(+), 18 deletions(-) diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index bffbf4546f37..9e7a03fffd71 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -1345,7 +1345,7 @@ ext2_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) return (ESTALE); } *vpp = nvp; - vnode_create_vobject(*vpp, 0, curthread); + vnode_create_vobject(*vpp, ip->i_size, curthread); return (0); } diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 777519450954..0a24d0da4fac 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -354,7 +354,7 @@ void fuse_vnode_open(struct vnode *vp, int32_t fuse_open_flags, struct thread *td) { if (vnode_vtype(vp) == VREG) - vnode_create_vobject(vp, 0, td); + vnode_create_vobject(vp, VNODE_NO_SIZE, td); } int diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index e088f92bf5bf..e60c9aa80cfa 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -286,7 +286,7 @@ fuse_vfsop_fhtovp(struct mount *mp, struct fid *fhp, int flags, return (ESTALE); } *vpp = nvp; - vnode_create_vobject(*vpp, 0, curthread); + vnode_create_vobject(*vpp, VNODE_NO_SIZE, curthread); return (0); } diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index 87b2fea21baa..d9e9a6c82da1 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -292,7 +292,16 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr g_wither_geom(gp, ENXIO); return (error); } - vnode_create_vobject(vp, pp->mediasize, curthread); + /* + * Mediasize might not be set until first access (see g_disk_access()), + * That's why we check it here and not earlier. + */ + if (pp->mediasize == 0) { + (void)g_access(cp, -1, -wr, -wr); + g_wither_geom(gp, ENXIO); + return (ENXIO); + } + vnode_create_disk_vobject(vp, pp->mediasize, curthread); *cpp = cp; cp->private = vp; cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 987cf995f606..dc926d7a9c9e 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1081,7 +1081,14 @@ vrefcnt(struct vnode *vp) vref(vp); \ } while (0) +/* + * The caller doesn't know the file size and vnode_create_vobject() should + * determine the size on its own. + */ +#define VNODE_NO_SIZE ((off_t)-1) + int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td); +int vnode_create_disk_vobject(struct vnode *vp, off_t size, struct thread *td); void vnode_destroy_vobject(struct vnode *vp); extern struct vop_vector fifo_specops; diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index d32fec845043..98b905f27c4a 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -146,27 +146,22 @@ vnode_pager_init(void *dummy) SYSINIT(vnode_pager, SI_SUB_CPU, SI_ORDER_ANY, vnode_pager_init, NULL); /* Create the VM system backing object for this vnode */ -int -vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) +static int +vnode_create_vobject_any(struct vnode *vp, off_t isize, struct thread *td) { vm_object_t object; - vm_ooffset_t size = isize; + vm_ooffset_t size; bool last; - if (!vn_isdisk(vp) && vn_canvmio(vp) == FALSE) - return (0); - object = vp->v_object; if (object != NULL) return (0); - if (size == 0) { - if (vn_isdisk(vp)) { - size = IDX_TO_OFF(INT_MAX); - } else { - if (vn_getsize_locked(vp, &size, td->td_ucred) != 0) - return (0); - } + if (isize == VNODE_NO_SIZE) { + if (vn_getsize_locked(vp, &size, td->td_ucred) != 0) + return (0); + } else { + size = isize; } object = vnode_pager_alloc(vp, size, 0, 0, td->td_ucred); @@ -182,11 +177,33 @@ vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) if (last) vrele(vp); - KASSERT(vp->v_object != NULL, ("vnode_create_vobject: NULL object")); + VNASSERT(vp->v_object != NULL, vp, ("%s: NULL object", __func__)); return (0); } +int +vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) +{ + VNASSERT(!vn_isdisk(vp), vp, ("%s: disk vnode", __func__)); + VNASSERT(isize == VNODE_NO_SIZE || isize >= 0, vp, + ("%s: invalid size (%jd)", __func__, (intmax_t)isize)); + + if (!vn_canvmio(vp)) + return (0); + + return (vnode_create_vobject_any(vp, isize, td)); +} + +int +vnode_create_disk_vobject(struct vnode *vp, off_t isize, struct thread *td) +{ + VNASSERT(isize > 0, vp, ("%s: invalid size (%jd)", __func__, + (intmax_t)isize)); + + return (vnode_create_vobject_any(vp, isize, td)); +} + void vnode_destroy_vobject(struct vnode *vp) { From nobody Thu May 23 10:10:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlP7M4Z8mz5LNVC; Thu, 23 May 2024 10:10: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 4VlP7M3tSdz4rwc; Thu, 23 May 2024 10:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716459023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=08K+4GXzFUjgeZZDsIAGWnLmZeVmxtMeMxHL7qP7M4k=; b=GSUITfbTq1EeYOmRYyjsD7f7dQdpOARTy7d5s/vm1VZu80xQjyuBEMDYS/dbp2fW5HNTcA w4L8ZjunJMnHAWsLGxc193xPQkv0ayKtWQnKwmrVIDIB8mw7IDwZkyuSPF5fOcCw/sTqDL 6Mmxlbew6DSWLtHiSZXw/raSYaCfDxLN5VO1Ab/JuhRscDBQgxfsZeqCq7hA3JGUNhs9le s/Rx032U5YLDp9UjA7VmsaR+pJpdqqezOWZWITD1PAJigiShgHC5kkdqDH3qrjheFoLxif Yg5akgv6B1rYFEnXmAaoePcKBUN92po+OtkyJBTcGky3PnOO7xm9UaOELXJELw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716459023; a=rsa-sha256; cv=none; b=ffzqlVLGD9ZUW7XGhJe7f0mLD6UwOs8ZAUYPYv6kb/mYfQ+j+F0Gs4dhZVZHX88q8g669f M5fQxmcNWuNS5asAS900MoQua/oRytO/+sStIuV5ze/qZXy44sV/FuztZD9v9N8tB0Nb0Z nwpI4Mdl0XCqfsZkX8dOIb79pD2dPcIkaKsOzQ+CuwGLOmW/DpFfgXm+y7Hsa5xX3HyUNX LkOiFpUBVu8NvMD5J25u5OP7nBjcKW8EHLSufRj2rm+e1rP3etDbzJ3BZYIOd2Vr1Fx7bD 0wrYxS7Q9FdIJuzd2r6Q6gf6jYC8+/LcPNEXZyCcfSujiM97LmCojgzTgJqOIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716459023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=08K+4GXzFUjgeZZDsIAGWnLmZeVmxtMeMxHL7qP7M4k=; b=wDeE15nxZ4ru43yWPEK2fikg7QcnrPXXeCRnuZF6pgREfeWEqcQjz5Z2hOMQ6Oy3MSJP19 g/eXiXFoqIPgkCaby/MtQA7fl1qiec5twtw4TytHD18ZyqDWWsCojzeQSXjoyWSbq4yjin ZMeRCGvG+Ri3zWykKdNqcnaudAv/Jfj+XZILGH5zCDXEuhAPo7E3wVUnjPIYl9RytYtheQ weAp2tcY2zQky27FoEYzhRsaZjVBK2G4fizNId3bZZkd9bCUGvInrlAkUn5xrVhoyJ/bTQ X2/azSCsualpqW9BM7pq3upHcQeFQlQYreedm5KvKKzG3xCEv0qHAePbISKWrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlP7M3M8PzlQf; Thu, 23 May 2024 10:10: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 44NAANsx014159; Thu, 23 May 2024 10:10:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NAANuM014156; Thu, 23 May 2024 10:10:23 GMT (envelope-from git) Date: Thu, 23 May 2024 10:10:23 GMT Message-Id: <202405231010.44NAANuM014156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: 61b07f8aa528 - main - MAC/do: allow to call setuid if real user id is 0 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61b07f8aa52844b21637ac264ea134c1aef48cb7 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=61b07f8aa52844b21637ac264ea134c1aef48cb7 commit 61b07f8aa52844b21637ac264ea134c1aef48cb7 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-23 10:09:11 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-23 10:09:11 +0000 MAC/do: allow to call setuid if real user id is 0 This fixed sshd not able to call restore_uid when MAC/do policy is loaded --- sys/security/mac_do/mac_do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 8685954b7db6..507e64ea0175 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -489,7 +489,7 @@ check_setuid(struct ucred *cred, uid_t uid) if (do_enabled == 0) return (0); - if (cred->cr_uid == uid || cred->cr_uid == 0) + if (cred->cr_uid == uid || cred->cr_uid == 0 || cred->cr_ruid == 0) return (0); if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) From nobody Thu May 23 12:10:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlRpH3SGHz5Lb68; Thu, 23 May 2024 12:10:47 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlRpG73Jwz44Qj; Thu, 23 May 2024 12:10:46 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.18.1/8.18.1) with ESMTP id 44NCAetO057666; Thu, 23 May 2024 07:10:40 -0500 (CDT) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1716466240; bh=3QNc7kbajhGmI2iL6yiiMcI8k6pHYBOx02IZbVtgsU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bDZsDmQBeDkC7S4ArjiF65AS5aVR4QXiu/q5r8ytVhoH2ChTA7jyG8kW8MZiPo11v yo9zSpdguhvCp3v21qN3yjRvtQpzVtdvS4XfG3B63h6c+u0FUbez8hJSrHrZNt0i+8 DVFkSK4mZ89ArrR1dpWjFzbiS1k4oLrmNXpQgtyiasxxpephADihIw9qC2rkZiHCJ2 s7+Ixi/MCjtpboDXti3D24eaYz3ZVmqdk3JWt2WHM99Iw3bllXIavppalqYhg2dTBT iJ7bAqfkoyt694D9eZjms2rZPIIHtZ/OxbnrU2HQd0JBZ3oO5I5ewS0zUSrmMo9lmN dOxxSjIK/WfJQ== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id 344sG0AyT2ZA4QAAs/W3XQ (envelope-from <mike@karels.net>); Thu, 23 May 2024 07:10:40 -0500 From: Mike Karels <mike@karels.net> To: Baptiste Daroussin <bapt@freebsd.org>, Michael Osipov <michaelo@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Date: Thu, 23 May 2024 07:10:39 -0500 X-Mailer: MailMate (1.14r6030) Message-ID: <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> In-Reply-To: <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] X-Rspamd-Queue-Id: 4VlRpG73Jwz44Qj On 22 May 2024, at 10:07, Baptiste Daroussin wrote: > On Fri 03 May 07:40, Michael Osipov wrote: >> The branch main has been updated by michaelo: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Daa48259f337100e79933d66= 0fec8856371f761ed >> >> commit aa48259f337100e79933d660fec8856371f761ed >> Author: Michael Osipov <michaelo@FreeBSD.org> >> AuthorDate: 2024-04-15 11:05:17 +0000 >> Commit: Michael Osipov <michaelo@FreeBSD.org> >> CommitDate: 2024-05-03 07:38:55 +0000 >> >> periodic.conf: remove long deprecated security_daily_compat_var() >> >> This function is documented to be gone in after 11. Time to remove= this >> compat shim. >> >> PR: 275296 >> Reviewed by: jrm (mentor) >> MFC after: 1 month >> Differential Revision: https://reviews.freebsd.org/D44796 > > this broke pkg's periodic script, I would have appreciated a heads up t= o give me > time to prepare a release compatible prior this commit. > > This also breaks some ports. > > Bapt This produces almost a dozen failure messages in the daily security email= =2E Given that the deprecated function was still in use, it should not be rem= oved. Michael, please revert this. Mike From nobody Thu May 23 12:34:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlSKX4GTfz5LdNt; Thu, 23 May 2024 12:34:24 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlSKX3nH5z46g1; Thu, 23 May 2024 12:34:24 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716467664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KyWQ/AfJ5ZSrpuX1fPR9x7QLdQdP5rU7fM00II+8cdo=; b=Yy6+H/7ThawCEs3fgTTL7snK2TT6XTa0DQv2zbEAGIdcwSH5z+tnBOaJG9JM850K7i8nkJ 9B1/j3ASbTxb4FBJvs7QGn+z8DpmrpP0z8QuxmNpmeAUAY3kGdgt7DUERJ6tk4zfMM5Lbq bS8mIHq+GySiAx33TLY9K5SDmAAZG/RjYCAuL08GDEOel4Nll0EIyHmoT0yfmOe3c6JoGU z3fM4jtXI5u+o6Dys4nXyI8BN35RtUnGi3zCh6dlf+Ksk4deJfldDDd/wj9L4aUfA4dt6B CeOcrr6Be6g2jKjkOktpxG9VHAdHwqUcV9aUvo1w4pA0M1j744lcsSw4XAaYhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716467664; a=rsa-sha256; cv=none; b=rAjAaNMTZH4/4lmYS4Ucv/LpSfxgzQ8K0jC5jbwWOTPwwAAVjDDW7EcbLBuxyfPvxiLP2H aBc5lReVXRknWZHhzIeG1TfTBuoj6fmt+jgFwW429Fk9ea7KvNbLooUNNYeIAyuQcyqajm z8YaehqGK+hvRGMgi2BEsaWuCkQCutWYCDY73veuRTad/YakDXz/1XMABpwEB6P7myFuK0 YmBxp7GJUF6FOXyABFpt/tN3iOpsYKXsXGIZfoByRO6oXigEYo+WhniS+RiuEg2DqtvNFL 5ntkZgBCWPXV/Dqr+sAj68nrn/TtBGjwD127aAms3yIbBhKCm8B2kGlO5/Fdmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716467664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KyWQ/AfJ5ZSrpuX1fPR9x7QLdQdP5rU7fM00II+8cdo=; b=ZCvuwk6jon3D13XWPt58FETbyTjVuaRDwdKX0HOgM/TohUoFpD58essS1ABUa4XhQ4CzCm X/aEfthRzm5bCxwSDm2/JFCVsBUKvkS5AByfAyU49gBR3LdNTwPs/ISoBLVjw4U/7fZ0Ly 0k240pMPzXb7rvFNUc+WMXL5hBQxsiW/M4bZvwBysQqV5i90pR66+jnBTjJT6zNHizHs0i kf53tjE6B014bctjcjUfd+srCXSJrEcpRsx6HZAuy6oUpDdAzqi7wklpmEA7rXYu/JC/7o 9mp1qEoFpYK0WvVrJmOVjSrNaC5L/2Pcwf9luW4B78X0pA50iwpDkHrb1DNohg== Received: from [192.168.1.23] (unknown [147.161.168.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: michaelo/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlSKW52Lpz1QZ9; Thu, 23 May 2024 12:34:23 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) Message-ID: <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> Date: Thu, 23 May 2024 14:34:21 +0200 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Thunderbird Daily Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() To: Mike Karels <mike@karels.net>, Baptiste Daroussin <bapt@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> Content-Language: en-US From: Michael Osipov <michaelo@FreeBSD.org> In-Reply-To: <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-05-23 14:10, Mike Karels wrote: > On 22 May 2024, at 10:07, Baptiste Daroussin wrote: > >> On Fri 03 May 07:40, Michael Osipov wrote: >>> The branch main has been updated by michaelo: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed >>> >>> commit aa48259f337100e79933d660fec8856371f761ed >>> Author: Michael Osipov <michaelo@FreeBSD.org> >>> AuthorDate: 2024-04-15 11:05:17 +0000 >>> Commit: Michael Osipov <michaelo@FreeBSD.org> >>> CommitDate: 2024-05-03 07:38:55 +0000 >>> >>> periodic.conf: remove long deprecated security_daily_compat_var() >>> >>> This function is documented to be gone in after 11. Time to remove this >>> compat shim. >>> >>> PR: 275296 >>> Reviewed by: jrm (mentor) >>> MFC after: 1 month >>> Differential Revision: https://reviews.freebsd.org/D44796 >> >> this broke pkg's periodic script, I would have appreciated a heads up to give me >> time to prepare a release compatible prior this commit. >> >> This also breaks some ports. >> >> Bapt > > This produces almost a dozen failure messages in the daily security email. > Given that the deprecated function was still in use, it should not be removed. > Michael, please revert this. Salut Baptiste, Hi Mike, this is surprising that is it still in use although clear marked as deprecated after 11. Though, Baptiste has pushed a new pkg release yesterday [1] and only main is affected, do you still prefer to revert this commit (for now)? @bapt, can you name the affected ports and report a PR, so we can track them? Michael [1] https://github.com/freebsd/pkg/releases/tag/1.21.3 From nobody Thu May 23 15:14:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlWtq2qDpz5Ltkk; Thu, 23 May 2024 15:14:59 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlWtq1z88z4TBx; Thu, 23 May 2024 15:14:59 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716477299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cPG0YVyvlfMNDbseTC5COIF9T94GZgpLfyBvo+doSNI=; b=AfJ+/rsIxbQ/30kt6uznNhb3xfH6VHJx7y9+gUv3QMbtsVvNzo1OA+gz1A0ffYvHVCG+oe NaY6TuP3Hx+YJ0Bgobt1DcOKOK8LvviL9eIbA+TkWeaGfZuERcNslvkhfabRb+Zrka+fiM lsVvVfJtOTLFrScoGzD6UkU0IzpzwCcsLwN1XtUxFR3kkPCIxHiki8GynNxWDTlejSbY8i wGtYPUDxjKDEHI96KSTrtBmE42q8WvxfiqxzGwy64NKTLUssMm8atSA/OkrnHqTaT57Xa8 gnpjpiuv4j0h6KGLR1nCY+ehucxEO4tn5wDYFahBq/eQucgBX4ZW2Nm/7wLVWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716477299; a=rsa-sha256; cv=none; b=qTu/MfQmWjzGjg8w3ERP7Wb/jXQMrmFnvt3kXVrY1eO2nM312lcc4AE420M44O29sar3/M 5qsCGRzfoU4cqdujcmfB3g9NEGlWK4gbZD6MdfHFPG+PrMz0aloEYIvlPo7bPgjRg60rpu 5UIFZ1QOKEUyQNdHPB29+R4oHICuIzoUtkucuaM7OhFpcW9e2VtAyRkS8RvyH/NJNiweaX Qhre4jG+iiE49pcebnvsE3DSJGYqILM4cpgREiwBhpGBEezWNpmlqSModSfaHpIYNCa7XB ETPzYnuNycAgEsCGHM7eTzor1AQw2qZjkbqvxn5wB85jM0pogcsT6PMcDHVc3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716477299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cPG0YVyvlfMNDbseTC5COIF9T94GZgpLfyBvo+doSNI=; b=sysLlyG7x/jhMc3lZO89rfBL7pzgxBjFMwfQr5byvnbDLHdKApp4QGQBxMgAyD+LqgQUT4 N7r6eY58Xi64kwmnfZWACAGYFxypeD2btR49N4gaOn/bE7kRP6w7CR8XT7NcCwGopGT9bU uF5Vndfc96jQNaebde3S0DKphX48IpFjy1h42NiQs3hseqhqciDuaCroFYkZpXkZLrCWx1 RX78x18iPjguVCLn/Uyx6ln4sBeO+iV5hR3y7+KaV9VCM3NnB1IBmrHfhw4wtQIJm9UBk+ nH1NZaT5S9YQXZBzAmXNh2zbahXkkDznmDsxUVjAn8+wqgXnJPhp7RxnLxEvCQ== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlWtq0p8LzG91; Thu, 23 May 2024 15:14:59 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id C69CD11D69C; Thu, 23 May 2024 17:14:56 +0200 (CEST) Date: Thu, 23 May 2024 17:14:56 +0200 From: Baptiste Daroussin <bapt@freebsd.org> To: Michael Osipov <michaelo@freebsd.org> Cc: Mike Karels <mike@karels.net>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Message-ID: <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> On Thu 23 May 14:34, Michael Osipov wrote: > On 2024-05-23 14:10, Mike Karels wrote: > > On 22 May 2024, at 10:07, Baptiste Daroussin wrote: > > > > > On Fri 03 May 07:40, Michael Osipov wrote: > > > > The branch main has been updated by michaelo: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed > > > > > > > > commit aa48259f337100e79933d660fec8856371f761ed > > > > Author: Michael Osipov <michaelo@FreeBSD.org> > > > > AuthorDate: 2024-04-15 11:05:17 +0000 > > > > Commit: Michael Osipov <michaelo@FreeBSD.org> > > > > CommitDate: 2024-05-03 07:38:55 +0000 > > > > > > > > periodic.conf: remove long deprecated security_daily_compat_var() > > > > > > > > This function is documented to be gone in after 11. Time to remove this > > > > compat shim. > > > > > > > > PR: 275296 > > > > Reviewed by: jrm (mentor) > > > > MFC after: 1 month > > > > Differential Revision: https://reviews.freebsd.org/D44796 > > > > > > this broke pkg's periodic script, I would have appreciated a heads up to give me > > > time to prepare a release compatible prior this commit. > > > > > > This also breaks some ports. > > > > > > Bapt > > > > This produces almost a dozen failure messages in the daily security email. > > Given that the deprecated function was still in use, it should not be removed. > > Michael, please revert this. > > Salut Baptiste, > Hi Mike, > > this is surprising that is it still in use although clear marked as > deprecated after 11. Though, Baptiste has pushed a new pkg release yesterday > [1] and only main is affected, do you still prefer to revert this commit > (for now)? > > @bapt, can you name the affected ports and report a PR, so we can track > them? > This was in use beside the deprecation, because pkg for one is supposed to support as many version of freebsd as possible so we had to keep the deprecation notice. I have released a new version of pkg without it and merged that version in quarterly branches, so even if it gets MFCed we should be safe. I was scared more ports where keeping for the same reason the deprecated code, I span the ports tree itself and found one port which I fixed straight away, I also did a deep analysis of the any port which plist contains etc/periodic, I extracted all their sources and I found nothing. so I think we are safe now. I don't think we should revert. Best regards, Bapt From nobody Thu May 23 16:05:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlY1m72ZZz5KVWx; Thu, 23 May 2024 16:06:04 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlY1m4NcNz4ZQZ; Thu, 23 May 2024 16:06:04 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.18.1/8.18.1) with ESMTP id 44NG61QV058851; Thu, 23 May 2024 11:06:01 -0500 (CDT) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1716480361; bh=zw+V+cycE0Ib9mZ2M8d/0AKLRwVuUsAwi6n+t9dGmLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qzg/G9gkbHLwH6xIPy6SP+a4rMMmk51+W4ns5RjOMWMcCmZYQviqcRpxQy/tQgCVr uhZvaZozn59pKf9jpLRf0T3YNRrTyDI85BsCueJAuMnEVMPH+hHQwdLOoK+9zUESWw RnGU9vI61LjSLrybY5HiRAFfB4MxyEgPVGr5Fb5tw3J8vRR/QHd6Qey24yzW9U36++ zKjwtEQkE4rPpOIP+NTo0KNuBiBNdpVwhqfoY+1lg1WGeoVkAVsEVh7uv/ozh9h1/2 c9frucS5iKeNp4WF6QrjXvb737quytxZRkT36zk4BxYCPx41EqgoJ25rpgV5e0KCg0 cOvCbtSzVDX7g== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id loGzHmlpT2bh5QAAs/W3XQ (envelope-from <mike@karels.net>); Thu, 23 May 2024 11:06:01 -0500 From: Mike Karels <mike@karels.net> To: Baptiste Daroussin <bapt@freebsd.org> Cc: Michael Osipov <michaelo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Date: Thu, 23 May 2024 11:05:57 -0500 X-Mailer: MailMate (1.14r6030) Message-ID: <1AE302C8-5EED-4644-8900-6D8B91326183@karels.net> In-Reply-To: <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] X-Rspamd-Queue-Id: 4VlY1m4NcNz4ZQZ On 23 May 2024, at 10:14, Baptiste Daroussin wrote: > On Thu 23 May 14:34, Michael Osipov wrote: >> On 2024-05-23 14:10, Mike Karels wrote: >>> On 22 May 2024, at 10:07, Baptiste Daroussin wrote: >>> >>>> On Fri 03 May 07:40, Michael Osipov wrote: >>>>> The branch main has been updated by michaelo: >>>>> >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Daa48259f337100e79933= d660fec8856371f761ed >>>>> >>>>> commit aa48259f337100e79933d660fec8856371f761ed >>>>> Author: Michael Osipov <michaelo@FreeBSD.org> >>>>> AuthorDate: 2024-04-15 11:05:17 +0000 >>>>> Commit: Michael Osipov <michaelo@FreeBSD.org> >>>>> CommitDate: 2024-05-03 07:38:55 +0000 >>>>> >>>>> periodic.conf: remove long deprecated security_daily_compat_va= r() >>>>> >>>>> This function is documented to be gone in after 11. Time to re= move this >>>>> compat shim. >>>>> >>>>> PR: 275296 >>>>> Reviewed by: jrm (mentor) >>>>> MFC after: 1 month >>>>> Differential Revision: https://reviews.freebsd.org/D44796 >>>> >>>> this broke pkg's periodic script, I would have appreciated a heads u= p to give me >>>> time to prepare a release compatible prior this commit. >>>> >>>> This also breaks some ports. >>>> >>>> Bapt >>> >>> This produces almost a dozen failure messages in the daily security e= mail. >>> Given that the deprecated function was still in use, it should not be= removed. >>> Michael, please revert this. >> >> Salut Baptiste, >> Hi Mike, >> >> this is surprising that is it still in use although clear marked as >> deprecated after 11. Though, Baptiste has pushed a new pkg release yes= terday >> [1] and only main is affected, do you still prefer to revert this comm= it >> (for now)? >> >> @bapt, can you name the affected ports and report a PR, so we can trac= k >> them? >> > > This was in use beside the deprecation, because pkg for one is supposed= to > support as many version of freebsd as possible so we had to keep the de= precation > notice. > > I have released a new version of pkg without it and merged that version= in > quarterly branches, so even if it gets MFCed we should be safe. > > I was scared more ports where keeping for the same reason the deprecate= d code, I > span the ports tree itself and found one port which I fixed straight aw= ay, I > also did a deep analysis of the any port which plist contains etc/perio= dic, > I extracted all their sources and I found nothing. > > so I think we are safe now. I don't think we should revert. > > Best regards, > Bapt OK, I'll withdraw my request to revert if we're confident that there are = no stragglers. Mike From nobody Thu May 23 16:16:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYFX2GQxz5KX5S; Thu, 23 May 2024 16:16: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 4VlYFX0TqQz4clZ; Thu, 23 May 2024 16:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716480976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XU1lK19iFYMafu0ccyWQjHsS1eBZUBgh51hG2H4xLH4=; b=dd94EQu8gDDVeL49ybjxYhLoxAxOhrBeFrHJsp+hDMOGU5t86YOGVu971KJQzRxa4vTT2j UBLYjI029uBSJb5Llw4nSlg5GRUSh0qqDZCuQEjFCaC3SGMhYDZIP+UWfwc+ohNRqcWRbD mYqcY+BhaTAbYagwnguxy8YrNwytnbgzt2HPxSKaUmnuHyhcjuTV8BOr0+1L1P5Yy9j3lv Jy1cFH9daDzKHJj/lrOTqK/PyPUTHNrnr5Kj6bMA6mPnX3WtidpqYKPFpzjNEySHjW0qzY c90MGaiADpgTDS0bWzADWvrlwQt7MrsOY7pK/R99kaRuG//v1BTBlvw4R1VA4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716480976; a=rsa-sha256; cv=none; b=uu7LoBN6zhD6sDuMxXbvJJEIs+fc6d5W7Bj0Eq+ZTAaqeeg/sRq+WCmakrOFMwkSHz+PlK UcxdxTvz8zOLhue+iqg4w8/kTrSKIveqVX7uA9z7ggBvgIPNBvjztTKlNJhoGeAMlzuZqI 6991zeaNT/CIM34nu5MKcMvRLUDzXvVqmqdwO0ttfeAurFXic8ydbyWTHVEKLU9HIQf4RD i7gPFrh87MTDURmTGQgeBrHBWta6Ehajzp9fku5JfGKgUHK3FH7C7QInY5Wun1DOLBHaqm AB7FVeqkixxxe8l4joMr3s21l8hkbyNV2VhxYWOsTYY/MQqaCPHpZHT8HaBEZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716480976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XU1lK19iFYMafu0ccyWQjHsS1eBZUBgh51hG2H4xLH4=; b=UwlGaAYcT663H1KPO6+b23ru9crlT5ZqX8XIZb9bR74sIbkPGI7frWPigITdM8JuJmpD3e IHgsJjNtLr/mmAXb84qB255KbBJs5lTa+CRlL+Fj1HeBfRQpBQxBFuuHcpgc3Zg2mHAuvW Q2dd9ssuQcVLdo3eBdqorM3IFJrhFgsg2fC7NhUTUUBfGWR7Lkf/oSeHCA50ZExj2lbgFn MvRmzPEdJQcTw7V41nJ8iCCN73jy2AqhIBashTqkoZbirgry2faiA5YeQq5o5iaCcyIcWP DswmJ26AJnlQ/qiUi4XnN2koI5vOTf0o1ADXQSnri0IhgmzeENiDlk441B4IEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlYFW74Y9zwdY; Thu, 23 May 2024 16:16: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 44NGGFMv030231; Thu, 23 May 2024 16:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGGFXA030228; Thu, 23 May 2024 16:16:15 GMT (envelope-from git) Date: Thu, 23 May 2024 16:16:15 GMT Message-Id: <202405231616.44NGGFXA030228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis <brooks@FreeBSD.org> Subject: git: fb9013f21521 - main - pcm: centralize 32-bit ioctl compat List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb9013f215211f013eccc54786f299e39a1f8773 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fb9013f215211f013eccc54786f299e39a1f8773 commit fb9013f215211f013eccc54786f299e39a1f8773 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-05-23 16:14:36 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-05-23 16:15:09 +0000 pcm: centralize 32-bit ioctl compat Move all handlng of struct sndstioc_nv_arg(32) to sndstat_ioctl() and make the functions that actually do the work take a buffer and size or size pointer. The 32-bit compat work is minimal so just inline it. Remove checks that we've got a 32-bit process for 32-bit ioctls. We don't check that default ioctls are from 64-bit processes on 64-bit systems. Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D45307 --- sys/dev/sound/pcm/sndstat.c | 95 ++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 66 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 6880ce383ba4..6670a1e43aac 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -45,9 +45,6 @@ #include <sys/nv.h> #include <sys/dnv.h> #include <sys/sx.h> -#ifdef COMPAT_FREEBSD32 -#include <sys/sysent.h> -#endif #include <dev/sound/pcm/sound.h> #include <dev/sound/pcm/pcm.h> @@ -622,10 +619,9 @@ sndstat_refresh_devs(struct sndstat_file *pf) } static int -sndstat_get_devs(struct sndstat_file *pf, caddr_t data) +sndstat_get_devs(struct sndstat_file *pf, void *arg_buf, size_t *arg_nbytes) { int err; - struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data; SNDSTAT_LOCK(); sx_xlock(&pf->lock); @@ -664,22 +660,22 @@ sndstat_get_devs(struct sndstat_file *pf, caddr_t data) SNDSTAT_UNLOCK(); - if (!arg->nbytes) { - arg->nbytes = pf->devs_nbytes; + if (*arg_nbytes == 0) { + *arg_nbytes = pf->devs_nbytes; err = 0; goto done; } - if (arg->nbytes < pf->devs_nbytes) { - arg->nbytes = 0; + if (*arg_nbytes < pf->devs_nbytes) { + *arg_nbytes = 0; err = 0; goto done; } - err = copyout(pf->devs_nvlbuf, arg->buf, pf->devs_nbytes); + err = copyout(pf->devs_nvlbuf, arg_buf, pf->devs_nbytes); if (err) goto done; - arg->nbytes = pf->devs_nbytes; + *arg_nbytes = pf->devs_nbytes; free(pf->devs_nvlbuf, M_NVLIST); pf->devs_nvlbuf = NULL; @@ -850,25 +846,24 @@ sndstat_dsp_unpack_nvlist(const nvlist_t *nvlist, struct sndstat_userdev *ud) } static int -sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data) +sndstat_add_user_devs(struct sndstat_file *pf, void *nvlbuf, size_t nbytes) { int err; nvlist_t *nvl = NULL; const nvlist_t * const *dsps; size_t i, ndsps; - struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data; if ((pf->fflags & FWRITE) == 0) { err = EPERM; goto done; } - if (arg->nbytes > SNDST_UNVLBUF_MAX) { + if (nbytes > SNDST_UNVLBUF_MAX) { err = ENOMEM; goto done; } - err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl); + err = sndstat_unpack_user_nvlbuf(nvlbuf, nbytes, &nvl); if (err != 0) goto done; @@ -914,52 +909,17 @@ sndstat_flush_user_devs(struct sndstat_file *pf) return (0); } -#ifdef COMPAT_FREEBSD32 -static int -compat_sndstat_get_devs32(struct sndstat_file *pf, caddr_t data) -{ - struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data; - struct sndstioc_nv_arg arg; - int err; - - arg.buf = (void *)(uintptr_t)arg32->buf; - arg.nbytes = arg32->nbytes; - - err = sndstat_get_devs(pf, (caddr_t)&arg); - if (err == 0) { - arg32->buf = (uint32_t)(uintptr_t)arg.buf; - arg32->nbytes = arg.nbytes; - } - - return (err); -} - -static int -compat_sndstat_add_user_devs32(struct sndstat_file *pf, caddr_t data) -{ - struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data; - struct sndstioc_nv_arg arg; - int err; - - arg.buf = (void *)(uintptr_t)arg32->buf; - arg.nbytes = arg32->nbytes; - - err = sndstat_add_user_devs(pf, (caddr_t)&arg); - if (err == 0) { - arg32->buf = (uint32_t)(uintptr_t)arg.buf; - arg32->nbytes = arg.nbytes; - } - - return (err); -} -#endif - static int sndstat_ioctl( struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { int err; struct sndstat_file *pf; + struct sndstioc_nv_arg *arg; +#ifdef COMPAT_FREEBSD32 + struct sndstioc_nv_arg32 *arg32; + size_t nbytes; +#endif err = devfs_get_cdevpriv((void **)&pf); if (err != 0) @@ -967,27 +927,30 @@ sndstat_ioctl( switch (cmd) { case SNDSTIOC_GET_DEVS: - err = sndstat_get_devs(pf, data); + arg = (struct sndstioc_nv_arg *)data; + err = sndstat_get_devs(pf, arg->buf, &arg->nbytes); break; #ifdef COMPAT_FREEBSD32 case SNDSTIOC_GET_DEVS32: - if (!SV_CURPROC_FLAG(SV_ILP32)) { - err = ENODEV; - break; + arg32 = (struct sndstioc_nv_arg32 *)data; + nbytes = arg32->nbytes; + err = sndstat_get_devs(pf, (void *)(uintptr_t)arg32->buf, + &nbytes); + if (err == 0) { + KASSERT(nbytes < UINT_MAX, ("impossibly many bytes")); + arg32->nbytes = nbytes; } - err = compat_sndstat_get_devs32(pf, data); break; #endif case SNDSTIOC_ADD_USER_DEVS: - err = sndstat_add_user_devs(pf, data); + arg = (struct sndstioc_nv_arg *)data; + err = sndstat_add_user_devs(pf, arg->buf, arg->nbytes); break; #ifdef COMPAT_FREEBSD32 case SNDSTIOC_ADD_USER_DEVS32: - if (!SV_CURPROC_FLAG(SV_ILP32)) { - err = ENODEV; - break; - } - err = compat_sndstat_add_user_devs32(pf, data); + arg32 = (struct sndstioc_nv_arg32 *)data; + err = sndstat_add_user_devs(pf, (void *)(uintptr_t)arg32->buf, + arg32->nbytes); break; #endif case SNDSTIOC_REFRESH_DEVS: From nobody Thu May 23 16:22:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYNd4Y2Jz5KXcY; Thu, 23 May 2024 16:22: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 4VlYNd40hFz4fJm; Thu, 23 May 2024 16:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvX8d2iVHlJyORuw97Ps6lSRYaD8QW/4KKkFzB5Or+A=; b=yW2ZQM2Ifc4SDJgCOaOJk4FHDZz/Ty9DgTsy7g4OgYj/7ZkGUK6lpgtaCQzePvGTxzJfRb TPuJvmfijIPhP2Y7k0nKX2tfFnz3m0mKmVj0daJxbLTNuQ0Kuf34+36QsmQKt5PL+HcmyQ a8mmp8vlByvUB5W5okMHJ32+QXjFMSFu6YWNN7DTxAefWput7xOXKQKjuGtHia6KOdU4x8 2cCjxIW9xkvAHJzUQ39V4C7QR0TcyxUD03mZC20sIg5dl8AYqOF/BXm9sFPo6k2pSrQ8sf X6hMfsnQuHzDwpIfhTU/Yr5IS0gLGIt70RSKMN8FV8vnFosdzKKvVGpPnwBGeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481345; a=rsa-sha256; cv=none; b=WCSei6bfVfUsqu85g+QDuFc7XkrADCiSMN1ygvpaYj/kwS+9mQ7+7xt3jpBUbNE/wEjgu1 X1dWGCmO/UNngsrSgNNAt1ASqctpKH/SxjkrLyhYM8AhPhgCiRSoQBV2ErPr4/0Pyn1XP3 BfQRom1qp3wUgB0JFTndXsjMJhh04+GVDA4W2d1lUapvfYbvXcE4RksRdoySRYTEki0aED k2m2uo2N1FXlOrCmG9nnSAqD7aPcGeFxQcyFaZWzNM4F2qETpVvYwiIwURXcy28vgcDq1J p9KsjP4IfHuWu8w5zldzgFTDVf19plclbivLi6UO8U74VN1rbFxcik7ceiXA9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvX8d2iVHlJyORuw97Ps6lSRYaD8QW/4KKkFzB5Or+A=; b=TzB/FH3zgUfIMohviSPLY19/VGmbi1J8/NGykJws6jxX18uOcVqJ56gvifCJUouMpja4A8 OHQvKkGrstvTsYvReThiiBLCCwvWbDMXrDKuC1F5AHCjTyrcgLsRJ0nCLZ6zAoADHAdt5I 8Hpfwaph4EtCxd1THp42U5KBQus5T8IFUi+sve2T4tJ60pLLdRfx0uI621CPr2Z2fwpJNR mq88qJ+UzMO6gRMsQc9GPbhgwHDNBTokGRkRFpHt8b1qkTCyrqV9ELTPhTBM2UAZ1WIPlk SS5GyMAyijo+BKJeWokDhQoKAkV/djpj2ViodAYInTmdjCBH0HpHZzxCeePoBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlYNd3cXqzwnC; Thu, 23 May 2024 16:22: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 44NGMPYf045994; Thu, 23 May 2024 16:22:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGMPx0045991; Thu, 23 May 2024 16:22:25 GMT (envelope-from git) Date: Thu, 23 May 2024 16:22:25 GMT Message-Id: <202405231622.44NGMPx0045991@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin <mav@FreeBSD.org> Subject: git: 49086aa35d98 - main - Fix scn_queue races on very old pools List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49086aa35d987b78dbc3c9ec94814fe338e07164 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=49086aa35d987b78dbc3c9ec94814fe338e07164 commit 49086aa35d987b78dbc3c9ec94814fe338e07164 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2024-05-23 16:20:37 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-05-23 16:20:37 +0000 Fix scn_queue races on very old pools Code for pools before version 11 uses dmu_objset_find_dp() to scan for children datasets/clones. It calls enqueue_clones_cb() and enqueue_cb() callbacks in parallel from multiple taskq threads. It ends up bad for scan_ds_queue_insert(), corrupting scn_queue AVL-tree. Fix it by introducing a mutex to protect those two scan_ds_queue_insert() calls. All other calls are done from the sync thread and so serialized. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16162 PR: 278414 --- sys/contrib/openzfs/include/sys/dsl_scan.h | 1 + sys/contrib/openzfs/module/zfs/dsl_scan.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/contrib/openzfs/include/sys/dsl_scan.h b/sys/contrib/openzfs/include/sys/dsl_scan.h index 2e3452e5ebaa..f32f59a2bedf 100644 --- a/sys/contrib/openzfs/include/sys/dsl_scan.h +++ b/sys/contrib/openzfs/include/sys/dsl_scan.h @@ -173,6 +173,7 @@ typedef struct dsl_scan { dsl_scan_phys_t scn_phys; /* on disk representation of scan */ dsl_scan_phys_t scn_phys_cached; avl_tree_t scn_queue; /* queue of datasets to scan */ + kmutex_t scn_queue_lock; /* serializes scn_queue inserts */ uint64_t scn_queues_pending; /* outstanding data to issue */ /* members needed for syncing error scrub status to disk */ dsl_errorscrub_phys_t errorscrub_phys; diff --git a/sys/contrib/openzfs/module/zfs/dsl_scan.c b/sys/contrib/openzfs/module/zfs/dsl_scan.c index 55e89b89f06a..085cfd3c5691 100644 --- a/sys/contrib/openzfs/module/zfs/dsl_scan.c +++ b/sys/contrib/openzfs/module/zfs/dsl_scan.c @@ -491,6 +491,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); + mutex_init(&scn->scn_queue_lock, NULL, MUTEX_DEFAULT, NULL); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, sizeof (scan_prefetch_issue_ctx_t), offsetof(scan_prefetch_issue_ctx_t, spic_avl_node)); @@ -646,6 +647,7 @@ dsl_scan_fini(dsl_pool_t *dp) scan_ds_queue_clear(scn); avl_destroy(&scn->scn_queue); + mutex_destroy(&scn->scn_queue_lock); scan_ds_prefetch_queue_clear(scn); avl_destroy(&scn->scn_prefetch_queue); @@ -2723,8 +2725,10 @@ enqueue_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) return (err); ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } @@ -2915,8 +2919,10 @@ enqueue_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } From nobody Thu May 23 16:27:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYW10bvrz5KYhN; Thu, 23 May 2024 16:27: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 4VlYW05s5wz4h07; Thu, 23 May 2024 16:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bblVp0tyK6WXCdxKolsz0e4+L6AOuiSZ5gTcjF5/u6Y=; b=RsSh8FGDEFp6GV4MyO4So5Ach7OOM8ATtbvF9b2rEpzk85OcUslFbKJZn/4bvpfDJ07/Si yYzDpLhgbijTTXp2mNpBT8V2litbuKVTyznvun5WDVK1XhyRf7cWiHLOoRDFK+IIR/bp6S OnKWCUCfPgLorRYzG+xRr5A95Giv7RcTMFcHVv0CUje0kM0crtQu3MLmM97OYs20qKZSSl eo0tiAdbT6PIKRmk9682IR2/l/98IBKQuWNFTHQw8e8ElVYEASli4JKHm1l6mLwFSoOXUg fPxno6EbBtNnv8NRc017GUwD+lJ2AxNI9F0bIOQ1fFvZ7UqtsrwadbRJ952DXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481676; a=rsa-sha256; cv=none; b=n/y4519aV/uRlkNvsNPjul/0JQRE9R8qCNXdGXqThYPsL1kxyV6wRNWYRS5LylI8gAAMdH iYfNAR9eIGOpph41d2rr8MK+IDw8OnmisJ33roTsTq09G6PivPRBWQ/UpRpC/rFr8E8s7H Vo1geuQVn4G1gMhR8iQtp/ElO0Ja6Sr2fs6nxzwyl80gN/9TKEu2zYzTqka6E3AUsTSLEq Ka8Nf9iWzDcuw5RvYRA0zZF+Wdp3IwonqkOCTNLFpXNYfPVtf+1QREOJeLFXB0Rg/2j+MK c+FzTqMvFKuavKUjiRbDMQJHyAv04dm9oqGEK8XO6uWAj9gqyPe7wijAPmclzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bblVp0tyK6WXCdxKolsz0e4+L6AOuiSZ5gTcjF5/u6Y=; b=LMqYid9CfXG7eoDvu9SfWM61nOazPOjNtgaP94UGIZN1iF77gSdZqoIN1RQgi30HBczJJi bLn07NQk+Jd1dWil6dEgTYNZSwKMrbR5YiUDunW5ABw4i+GFqDOhtQE+Zn1/pHZ6EWXaqJ WfX9pr4m+WFn/kyKaC/2M8liWjtiekyEm/GBYiua8ksyfeKW2n9/wm9HyL4RBhsDW0X54+ RYIl4vTvEZuPbT5hWhwPueR5Bx1STMLiiU6z3FSUfybfFIuSR3W2d6uqdgDSz66XGUxAKI /ubs+x7Nf51vl/zBadBSJ7C9FK1E6r2c9L9JSTypCRhjc2zg6qavpODdgM2I2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlYW04ktLzxCH; Thu, 23 May 2024 16:27: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 44NGRuSf047862; Thu, 23 May 2024 16:27:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGRuAO047859; Thu, 23 May 2024 16:27:56 GMT (envelope-from git) Date: Thu, 23 May 2024 16:27:56 GMT Message-Id: <202405231627.44NGRuAO047859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis <brooks@FreeBSD.org> Subject: git: 6729e8a40bd9 - main - libpmc: remove tautological assert List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6729e8a40bd9b15c2790bc96c58817493de4f6f0 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6729e8a40bd9b15c2790bc96c58817493de4f6f0 commit 6729e8a40bd9b15c2790bc96c58817493de4f6f0 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-05-23 16:26:24 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-05-23 16:27:37 +0000 libpmc: remove tautological assert gcc13 whines about this assert than an unsigned integer is >= 0. Reviewed by: luporl Fixes: b48a2770d48b9 powerpc64: add Power8 and Power9 PMCs Differential Revision: https://reviews.freebsd.org/D45232 --- lib/libpmc/libpmc_pmu_util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index fa2e76e8d026..74a93ae963d7 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -622,7 +622,6 @@ pmc_pmu_pmcallocate_md(const char *event_name, struct pmc_op_pmcallocate *pm) if (pmu_parse_event(&ped, pe->event)) return (ENOENT); - assert(ped.ped_event >= 0); pm->pm_ev = idx; pm->pm_md.pm_event = ped.ped_event; pm->pm_class = PMC_CLASS_POWER8; From nobody Thu May 23 16:27:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYW21ZKLz5KYYH; Thu, 23 May 2024 16:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYW15lyHz4h3y; Thu, 23 May 2024 16:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0nI7Ce9byCPIdMrUQSdfyBQIQUBBcF162Sggb0/X44=; b=XtgFsW1Tytt1GFTIYsTYP1JEbXIokoW+u3j/rGl+ZupsKrnJ+50ZuVtX+ebiu9yAqefgrX ZzVy18zbPKmpnivdYyXaFf4HZRFZHE0kww7kqQyist5nTGxqJLYd0i1DQTHDQPXfPVYygZ 3Z37rMDu7PfNQ0PEAmVyGCZeIx0QAWitjLymMNuGTWQ6tmh7izT9SZdDhWylxHE9FF+7My MJFxdq/jVn7ctkOqsXpurZ17pVj9Da1wdst4p2paboqscM72DQu3lgRFlzuhHHd9RDmZ/f 1vPB4W2CdTUTj7YjN0FFLpmtVW5y9gmbhccX2M7RgRrDZCiKpyAjTj0ZqNPydg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481677; a=rsa-sha256; cv=none; b=AyIwEePnkZtUlLlZuUeZxRmNZXjakYvGQwZeTNyLQe689PQ6KMHL9hIQ66eBbCykuzA6c9 CF4xA4tNAeGdUB7gGfA7yDp3K76teoHlBBgEz9D2NVDsAJ9sqh+3aUmUy8qgufYt5luiNo YRUqx4Ijow3Cj+T1yOo3gZXQV0BlRErsVlJa1su9BTrpPB4wtbnKkK2bxjoh0wL3B/Btgb S4FM6dl5riWC5M6BhgS7Kg49C+PFOW2ZpBuiVUK2QHZ0LsgBZvcYYGNSZJzH4HeqgJq5kP qZHRkTaofUIoNhy/3cn5AjOmChWiyGoISAGzK6pEkfGXJg5ZAYZjcHtd4gLT8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0nI7Ce9byCPIdMrUQSdfyBQIQUBBcF162Sggb0/X44=; b=RMCs1zggWsVxpZP2xkeaVVadK4dvnRcXmNmnlp7WhQAMuubK051xsIPwR3c+cXNLrIn2nN uU9PeWfg5gI6eT4KPOKN2PIL0XuDaZo4I0uzk5K3oC1mc9dZwyjeoCNp7VgIdGVHY87CaB C8Jkk3oziMsBeUxe280OnKi6socsNWf5S6mW3H/CtWFde+YN4B7HpZmRb/AdeI1owEVPGY vkfsJ9OX4+H0rA4g5I4nc4jxNN97LGeIimY2450a64pAt2K1jTgwPkD1PoGxjEjO3BR34b ezw6hI/6bvemVlQkXhMmI4wXwVzXUcvbHLaWLayYCM2feokFs/jJMbRlS5FsRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlYW15MG8zx2R; Thu, 23 May 2024 16:27: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 44NGRv15047910; Thu, 23 May 2024 16:27:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGRvcM047908; Thu, 23 May 2024 16:27:57 GMT (envelope-from git) Date: Thu, 23 May 2024 16:27:57 GMT Message-Id: <202405231627.44NGRvcM047908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis <brooks@FreeBSD.org> Subject: git: fcc5fa091ebb - main - libcompiler_rt: gcc13 doesn't support _Float16 on arm List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcc5fa091ebb89db48d8fbda9b74c25bd44357b8 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fcc5fa091ebb89db48d8fbda9b74c25bd44357b8 commit fcc5fa091ebb89db48d8fbda9b74c25bd44357b8 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-05-23 16:26:51 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-05-23 16:27:37 +0000 libcompiler_rt: gcc13 doesn't support _Float16 on arm Don't set CRT_COMMON_F16_ARCH for arm as it's not supported by gcc13. Differential Revision: https://reviews.freebsd.org/D45234 --- lib/libcompiler_rt/Makefile.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 6fb13cb12305..bdb6b93e6fda 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -233,7 +233,6 @@ SRCF+= comparesf2 # Helper to reduce complexity of _Float16 and __bf16 statements below. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || \ (${MACHINE_CPUARCH} == "i386" && !empty(MACHINE_CPU:Msse2)) CRT_COMMON_F16_ARCH=t .endif @@ -243,7 +242,8 @@ CRT_COMMON_F16_ARCH=t # versions. # .if ((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000) && \ - (defined(CRT_COMMON_F16_ARCH) || ${MACHINE_CPUARCH} == "riscv")) || \ + (defined(CRT_COMMON_F16_ARCH) || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "riscv")) || \ ((${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120000) && \ (defined(CRT_COMMON_F16_ARCH))) CFLAGS+= -DCOMPILER_RT_HAS_FLOAT16 From nobody Thu May 23 16:32:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYcP4Ss0z5KYrC; Thu, 23 May 2024 16:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYcP3XQsz4k9L; Thu, 23 May 2024 16:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dPBRC/ujUBmTqUSbArup7lnv0EgEZFRaeLCTPA6IuU=; b=TG3/L3DMKjRu80JHl+h2GMGfoyYT80FKJa32245DxKlaodnhcfK05+gdxuzjWTi7wpS+FT aO7YzSzgLvQDd5jLxv52YuMUpTOPvWEV9J5kFM/DE3PdEOAwDXgPj0iG58lrScqT7SMcDg jgqZHJqNJOt9jhcgIjh6fN5Xr6IwO8lXwnuZSUHdNs1F6qND82PL8wHtyqZeDdcs78FhEz q29Z0Xty77Wk9/CBpzxbfSQMQbgMXz0LSqD45vgL6OriYNyUTeppqqetazCMC1RNw44VyR hRZtxKHPOoWvAXof3EpXHpaNR9VgWkrg371+uT3Ts1UdR8dAS2JRhCDtT+Bqgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481957; a=rsa-sha256; cv=none; b=JD75qWAVuuJD8LIf9WDTr0xu0ewUfpxa7nayPxH93ZPvbMC1qiZrHj5YryprXDcExKQAGQ pv54/7EjPq8lezjYj40U/oYLhKBOASzGnF13yfYdmTKGDy4gxnMWyH7LngWnGJrEdhkMr0 AYM7Ko+/FjcsziYlVa6MAc6ttfvpKxiEtHT+C7PLdWp6W49cQBQLd+EDQHreQZRgWRKsXe i8PaRXi8yjfYmjUZbHYUTlQ+RYHV6wVwVpifgrHfk0Ze1rGWJumaIy7oPpKVMLvG+M7oD1 zijZX0tjVLuY2Z96V1j5J1YNzpwPQMlVWD7NjEB/x2nwTGdviLdsTI7bpjHltQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dPBRC/ujUBmTqUSbArup7lnv0EgEZFRaeLCTPA6IuU=; b=qMSYMiIjM4f2Cwn0klUJdnBMPWrTrduLkh1vk9IhHFkoc1RNinsH9GBc1pLKq9t4KfgVeF aE6kw8WbSzK4xe+erny+So62xVL33cZo8nL5AEtlrQ+iwd0CVcEh23xGE7g32CkPLKeerX TjPs30j4kAN/eS8VGXCS6gn4at75CGlqk/5MqvLjkpQZ8tgJenL6wywfcwhtyyfH6mMVN7 i2UyNhXcCrI1LkmHTqu0vFIet+kpbk/7ywjCmdYH/n6DamN/NhK1YbF3980eTzFCQCSFKO cYDWHtlauXF8HMZGQEjFAP/IyXF2qZ9dZ93l5zfY6sL30r3CFnpG/AFfz6AqAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlYcP382wzxX9; Thu, 23 May 2024 16:32:37 +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 44NGWbpd063536; Thu, 23 May 2024 16:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGWbPq063533; Thu, 23 May 2024 16:32:37 GMT (envelope-from git) Date: Thu, 23 May 2024 16:32:37 GMT Message-Id: <202405231632.44NGWbPq063533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 2ce32ab21a59 - main - Fix "version introduced" in two manual pages List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ce32ab21a5961dd9405cde8d985da9d0a664276 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ce32ab21a5961dd9405cde8d985da9d0a664276 commit 2ce32ab21a5961dd9405cde8d985da9d0a664276 Author: Tom Hukins <tom@FreeBSD.org> AuthorDate: 2024-05-22 12:32:03 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:30:32 +0000 Fix "version introduced" in two manual pages Signed-off-by: Tom Hukins <tom@FreeBSD.org> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1252 --- lib/libc/gen/exec.3 | 2 +- usr.bin/posixmqcontrol/posixmqcontrol.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index 8f866e5ab321..ce289ebf502a 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -344,7 +344,7 @@ function first appeared in The .Fn execvpe function first appeared in -.Fx 15.0 . +.Fx 14.1 . .Sh BUGS The type of the .Fa argv diff --git a/usr.bin/posixmqcontrol/posixmqcontrol.1 b/usr.bin/posixmqcontrol/posixmqcontrol.1 index 67ddbfd5eaf0..ec7059b90235 100644 --- a/usr.bin/posixmqcontrol/posixmqcontrol.1 +++ b/usr.bin/posixmqcontrol/posixmqcontrol.1 @@ -172,7 +172,7 @@ info reports a worst-case estimate for QSIZE. The .Nm command appeared in -.Fx 15.0 . +.Fx 14.1 . .Sh AUTHORS The .Nm From nobody Thu May 23 16:36:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYjC3BQZz5KZT9; Thu, 23 May 2024 16:36: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 4VlYjC2Sbgz4klN; Thu, 23 May 2024 16:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7raieI5cCBuCXcXcmXZHINYBhWRcVmGhBGAgWzWtAdo=; b=wF35UNtj4TasEbdbEOFhEpS9m/skb2k82KGr6CBkh4HdE0vGbb1jP4sla1QYKyvmn0eieG /zj4P1k8KTzqgjzNPkyWOuuxV15DL1acQfcw8Fzm5f+5EBM/Vr+r9bNKbE8PF0GKQVvh6S EKbYE7CMEglplHctcspqKxVFmStVToDqM5dOk7uDVkmhKZEe83TNg5F/aRkRXNRzXJA9JF isQbSYjUzHTPbwjYTj/2zThRQswT0n0KzwBrDnlNcyGRNHPPdp5BtR9XpHJyyxFDHU/79g m4oJPSFYkR8HEpCuQQR47PwWzT0KjzF2rAWNVnxs1ZSQANgPZ6c1kIioMSBfSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716482207; a=rsa-sha256; cv=none; b=vi1ObNRYsuyKFXGXExlxVhzaJudxeNVD4lO6rk4A2ma+opDrAvOZXEXqVW2YWuzzGkCpLO UdZF0XCk6NjD4oPzzNjv02SgeLPM2h4IlAU/ieqx0EhmIqjWEwI4AK01SlCm9JXMvQ6XiN FJkxkZ7tVMS11urzMlqW6S5t97NRipHUTu3jFRj9EQvroYWD/LyUe/4/PVkQptEYyyDj9w ElucNISTU+iU/On2c+rO7R755lflBDc6x1cSQmtmkAhuSpqjnKA0GlS3HhgQ0CCNxQ4Q52 Jk4EUcRaqKe93MNLsewL2jfrtVTJGqRzBEvaIYlE+hWVMuMivDGjO9igJvQq5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7raieI5cCBuCXcXcmXZHINYBhWRcVmGhBGAgWzWtAdo=; b=UsfQLnJMnd4yUKs+dt49TCYjcliTSuDI2FNqGjdnvVn9z82PLh0L9K5M5olGnYcA4CUeGg 0w537WYhMzCqxSAecgx1Vlx83cnRGXT6vQcdwh/rGhZZwK9csheQVGsVRSl7ZWOu37NPOV /E6pNyjSuENY5gcRSy72cgs1u0C9RL221Kce4AnCYVSuRsjRb+SHBnt70of/nSwKFhP0lD iyabDEcxwjLGAbyi0IHLq8DDFm17PU0HvykUOmAGlthnVP9qLrlLlwfxz+NYnxgOpaWM5U Erd2NE80WERjc+j1+12zNHqxgoh6lgbD5KqKSD6lxIfybnW0VB5HWcow5jqL+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlYjC23qNzxXC; Thu, 23 May 2024 16:36: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 44NGalMg064323; Thu, 23 May 2024 16:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGal6h064320; Thu, 23 May 2024 16:36:47 GMT (envelope-from git) Date: Thu, 23 May 2024 16:36:47 GMT Message-Id: <202405231636.44NGal6h064320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 2c9f8518de51 - main - etherswitch.4: Remove non-existent manual pages List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c9f8518de512f7776413d092111c7ae999379b6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c9f8518de512f7776413d092111c7ae999379b6 commit 2c9f8518de512f7776413d092111c7ae999379b6 Author: Tom Hukins <tom@FreeBSD.org> AuthorDate: 2024-05-23 14:06:01 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:35:28 +0000 etherswitch.4: Remove non-existent manual pages Signed-off-by: Tom Hukins <tom@FreeBSD.org> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1253 --- share/man/man4/etherswitch.4 | 3 --- 1 file changed, 3 deletions(-) diff --git a/share/man/man4/etherswitch.4 b/share/man/man4/etherswitch.4 index aeb5e484e7cf..8ec1715e4248 100644 --- a/share/man/man4/etherswitch.4 +++ b/share/man/man4/etherswitch.4 @@ -50,12 +50,9 @@ device nodes .Sh SEE ALSO .Xr arswitch 4 , .Xr iicbus 4 , -.Xr ip17x 4 , -.Xr rtl8366rb 4 , .Xr e6060sw 4 , .Xr adm6996fc 4 , .Xr ksz8995ma 4 , -.Xr ukswitch 4 , .Xr etherswitchcfg 8 .Sh HISTORY The From nobody Thu May 23 16:36:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYjD6Q55z5KZNK; Thu, 23 May 2024 16:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYjD3RJkz4kj8; Thu, 23 May 2024 16:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/gAUxjmC/0sKJyMPFIVa/EfdfqglgbVzw7zLuj1ZUk=; b=jwxIIhI6XwMaXwA/Qlj45Ia7tomqaKwEfEfIcSetfqlrL/F1LOi5vcwuKXtor9g7z+3XCk 9JX8vrOMFePDdHsNDjgzTIgh/S4AE/iA3QwXcf44pZ+dSwVglktFToUxqzpJgrOV6kDZ1m lrZVQxnlwhZOL5Bsm4dnoxL5WlkYvKZrv92Zmy/v9+llcf2Tf4PpFNQIiN682SnZcgkF9W ymnjKLpyou1QB1JUQm9OM6N+zy4knZXk6iQoVplpTyU1RiA7l8RHOhEMr/j32784kuFIin hYruk7N+LE+mFcuyekF1l4nXP3N77yYh8pARyPiROmSGr8ynHUiwHDFQWMEA+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716482208; a=rsa-sha256; cv=none; b=vAvDj9EcWH9zb1QoddvENxMKMpu7XuR8bEcB/OVlzCGiqjRNYemmp5p1c+ce4o3kBduemR bFQLEYILprQJJOxka8bXyY75WwCG94K8J4B2kP6Dg9DQwPZxT8IqGfxnV4TEM+8b7VJiXp W5R68aPYP7w32aI6mOEQtuwLB/4XAMWSKtuK2ezsMkQhk63TBOYSXzR8/gRAmD16N1Yg74 vwsfZfdKTR1kR8JzQH6lCC+qoD16ikzt5YrV+n4fbuFilExSIKMpfoJdJtMqspS2fqQkba zddo3bKCdfmU/1pe5lZmK4DCzwjBaiJ/SP9CkmsPWAhgBxFoiesLoB47Rm25UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/gAUxjmC/0sKJyMPFIVa/EfdfqglgbVzw7zLuj1ZUk=; b=AulD8SFCrAUlnsKkC63loTALD2iwS46ZLfNBFtrrQhT5WjxMufjS9UCjWJb7OAc6aeOQds dW92u80Xf3NwNvSZvQrjv45b2yYs8p852M864RJYMQT3tM4Bys3QLMqwbLK3lNOyzl7KBS Opb1fDrRvD9mwxO+jKddvBNSu95T2OqnBa0A5cLyXtccPkbHbGT/cXB9I7CxbUbNnki/JX 8aTVaIP23Psopha2fp7ARncI5Npg9FCGHkD35OZYrxM/cdTWnJC7j3wDCWKbqKGU073xWF egzkGT6eMN1QX6Vqj2XXEcgWZUR8se+9bR0RADnV744fQ6sv3S9GSLK/bQbi/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlYjD33DdzxXD; Thu, 23 May 2024 16:36: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 44NGamqS064365; Thu, 23 May 2024 16:36:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGamAw064362; Thu, 23 May 2024 16:36:48 GMT (envelope-from git) Date: Thu, 23 May 2024 16:36:48 GMT Message-Id: <202405231636.44NGamAw064362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 083d14922431 - main - etherswitch.4: List manual pages alphabetically List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 083d1492243127fa4416be93807603ea6e0a8947 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=083d1492243127fa4416be93807603ea6e0a8947 commit 083d1492243127fa4416be93807603ea6e0a8947 Author: Tom Hukins <tom@FreeBSD.org> AuthorDate: 2024-05-23 14:07:27 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:35:29 +0000 etherswitch.4: List manual pages alphabetically Signed-off-by: Tom Hukins <tom@FreeBSD.org> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1253 --- share/man/man4/etherswitch.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/etherswitch.4 b/share/man/man4/etherswitch.4 index 8ec1715e4248..4813d7cce1e5 100644 --- a/share/man/man4/etherswitch.4 +++ b/share/man/man4/etherswitch.4 @@ -48,10 +48,10 @@ driver provides a framework for Ethernet switch devices. device nodes .El .Sh SEE ALSO +.Xr adm6996fc 4 , .Xr arswitch 4 , -.Xr iicbus 4 , .Xr e6060sw 4 , -.Xr adm6996fc 4 , +.Xr iicbus 4 , .Xr ksz8995ma 4 , .Xr etherswitchcfg 8 .Sh HISTORY From nobody Thu May 23 16:50:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlZ0g6Zb9z5KbVB; Thu, 23 May 2024 16:50: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 4VlZ0g671wz4mQF; Thu, 23 May 2024 16:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716483011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l6IqZW9T27zetQxZ2FcqC9cZr7Iy18zUYgU3qXQO1E0=; b=CpfjJhg0xrgBFqa8odkOPNEyC3azkzG2CpMR8f+p3OAwGspi12uqSbP2RPkp98XND9iHJU JUtoKkjpxzl0WXeRoAnbqpCARyZG6qTwskBK2tNuEJgb3y5qWYEBkwroSUic+sgz8OWt/e NJ3k0XnrFJaGToMNhmXavYVvsaKxBal5KRTP5Uc+Tct9R9oJJJVU2kFMv7Sj+JwDzunFRP ID+BPtP0yvgLRGqAjsSRax0Ms1ZzjPc4JLdggpUWLHfgwaNWTPVdMAgvWJPx7FMEr08Yhu E0eA9cFhKhMYoIR10h3PHt98A3pSlpoOFoZwESzW4z+GzuO50kH+asQqWiiY8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716483011; a=rsa-sha256; cv=none; b=Gssbc/3GeCD+CDZowrSvSGqCjiVbpgcJqERUvsMRjM0B4BPJ3sX6Y2C2qPfe1MZlUuJ3AU HTWdE+qiOiveFDvgvWFYzWnQo+RRI4G0vsqLxMwh5u26UtD04Sf8WppjUhxLsQupq5ZM3N Q5GTichjn/TI5WIWTbUkzhp8M/u4v4pPnmj46rritOrhkr9hSFd8tbHmNTRN2pkGXq9Z1h +9+tYCFwazuebpq63weXY3uxuu7rUfi/X5wvqswXmYwo7RqPyaLYJzbEzqDip9v5fMFsbZ ZWXIVKOv4FwtuQin+7otjgHe9mDqyP11WjdXsOAne8jwqhdyY/4kOvLfjsMvnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716483011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l6IqZW9T27zetQxZ2FcqC9cZr7Iy18zUYgU3qXQO1E0=; b=xBEBwah3vf6x2KD86+mOoAiY3zYx0uU5/xIp4TadKfdUM0YljR7TAR4lguCfR4P03fEuup xkSd7TadgEB93sINWE4W9OlBW23YEJMHw3rsgxEw7XX6fDmNPN+NRovgagXXzfdNfTgg/7 PnpOqJc0wMTGt3JOKqPdALfAIyyINB6AtSEmqkxIAHu3DyEYfsqbhDj7nf28S/wu3F6kVv 3NbOX3OK132epB4gHAtUrN0bvTLf5kj6SxeVTJI+hNcQjgroixiOENgOJ8KfjhR/ZECz3L A2xMEesS0zKy+NUA86QcETPhmRlj3f5kk8sxrU4EdZSf8SySau7lxRRO83KccQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlZ0g5knszxH1; Thu, 23 May 2024 16:50:11 +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 44NGoBsc086134; Thu, 23 May 2024 16:50:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGoBME086125; Thu, 23 May 2024 16:50:11 GMT (envelope-from git) Date: Thu, 23 May 2024 16:50:11 GMT Message-Id: <202405231650.44NGoBME086125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: be3631bc8d16 - main - option_survey.sh: Bump size to 5GB List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be3631bc8d1664aedb2b8538a75fe3ecbe7a1b57 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=be3631bc8d1664aedb2b8538a75fe3ecbe7a1b57 commit be3631bc8d1664aedb2b8538a75fe3ecbe7a1b57 Author: Michael Dexter <editor@callfortesting.org> AuthorDate: 2024-05-20 17:22:56 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:47:38 +0000 option_survey.sh: Bump size to 5GB Increase image size from 4G to 5G to accommodate growth in OS. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1251 --- tools/tools/build_option_survey/option_survey.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/build_option_survey/option_survey.sh b/tools/tools/build_option_survey/option_survey.sh index 46ce167c49d9..c787125c9acd 100644 --- a/tools/tools/build_option_survey/option_survey.sh +++ b/tools/tools/build_option_survey/option_survey.sh @@ -117,7 +117,7 @@ trap "umount ${MNT} || true; mdconfig -d -u $MDUNIT" 1 2 15 EXIT umount $MNT || true mdconfig -d -u $MDUNIT || true -dd if=/dev/zero of=${ODIR}/imgfile bs=1m count=4096 +dd if=/dev/zero of=${ODIR}/imgfile bs=1m count=5120 mdconfig -a -t vnode -f ${ODIR}/imgfile -u $MDUNIT # Build & install the reference world From nobody Thu May 23 17:29:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlZt94j4mz5Kghb; Thu, 23 May 2024 17:29:37 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlZt92RQ0z4q29; Thu, 23 May 2024 17:29:37 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716485377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R2iniBvMdCHogYerE1wKz6FukJHvAgYh4v8TOPNJw0E=; b=GWzG6/siVsZlJdI+P7tQg9HEps8zJb+BcLBOHjKfsHgCtOSMdHPt2zDPQjrG1ST6Ao1i5h YgKoU0HgQfqXpCqrwp0z5eoauFWaJKmVyj1Yg/JQyb/CPBS/sw7lpGgAnlz7w7SELN+i5O LW8WjPBLOJRnxRUZEqoS2n376e501VexC4a78IudFbQl4iCAQauVd7hrSp+hubCNTn9Upg MS687JrMTA3jzpwr9FGBDfS9/vaceBA7Qw5efn3nhuPbCF+RVev9nvcjHgN1pytIlt2YmD pPNvKSFfDTTuaHdyrCntm14ES4bhdWmDlqnWgjrghifdf5UxPDJIwBdbGUQz2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716485377; a=rsa-sha256; cv=none; b=npB566mA0GsS7koQBDfEQbwScKGQf/tVtG7To/pXejwnNcveYUEQTny9iZltxGgHo4cRYd Gs7yaCjSr0DZbMXgtMajRZmhPK5uJU0q3ydmx1iAdfrpJ/BGMrcgu6G2/NykfdE0w7lnX6 DV9LbqqoAG/wzCNQnXmDo25Cfj0ACX0SaLjvGwuF8ov+qbPR4jLjpeV821jNDeeNW1CKnQ i5ptavNl+wie3i0vKY767A9sH9IKnbeKse7NIRbaS4a2LUeLdHALWkk4+EbqmoJsurfwDs MH1vNxTyKGuN3eqPsD5c/mE7LbkxEIkDs4UUHr+OGwsMMozyGT6fgG/PcUCRpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716485377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R2iniBvMdCHogYerE1wKz6FukJHvAgYh4v8TOPNJw0E=; b=AoRigS7doWIAKsV4mc2nGW0A5y1vzeDPDlqH3whIX0VvtndaCJVRnXKI6DxxFGexwIf9ti gCDmWu12D/EYyqSZM13pwwn1XfLhZPhLO3krj+wkm59oYzZW/n6M86KPFIRp3PiuX0NMxR Hj1vAhm81KAklyG7t2RNhNP9Ap+g+1Jemq5Fm53wAbhRuFiPuyec5FW6rRkXFRxyyE6V5D H6tTq4zKhaogESF/v+tuJjC8YA6Ed0EYK/M1/asx07v0sC+yoJRpJ65i6N8wzHuTQEcOBv 0z1C4aNYTmATKooXrSxlO8Cr2pPObBEAYIL1XkKiqtNvCoOi4rYXPKMh/iGOdQ== Received: from [192.168.1.23] (unknown [147.161.168.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: michaelo/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlZt83dNRzHVj; Thu, 23 May 2024 17:29:36 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) Message-ID: <c0e90461-614f-4b00-9f14-28fa5677f3b7@FreeBSD.org> Date: Thu, 23 May 2024 19:29:35 +0200 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Thunderbird Daily Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Content-Language: en-US To: Mike Karels <mike@karels.net>, Baptiste Daroussin <bapt@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> <1AE302C8-5EED-4644-8900-6D8B91326183@karels.net> From: Michael Osipov <michaelo@FreeBSD.org> In-Reply-To: <1AE302C8-5EED-4644-8900-6D8B91326183@karels.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-05-23 18:05, Mike Karels wrote: > On 23 May 2024, at 10:14, Baptiste Daroussin wrote: > >> On Thu 23 May 14:34, Michael Osipov wrote: >>> On 2024-05-23 14:10, Mike Karels wrote: >>>> On 22 May 2024, at 10:07, Baptiste Daroussin wrote: >>>> >>>>> On Fri 03 May 07:40, Michael Osipov wrote: >>>>>> The branch main has been updated by michaelo: >>>>>> >>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed >>>>>> >>>>>> commit aa48259f337100e79933d660fec8856371f761ed >>>>>> Author: Michael Osipov <michaelo@FreeBSD.org> >>>>>> AuthorDate: 2024-04-15 11:05:17 +0000 >>>>>> Commit: Michael Osipov <michaelo@FreeBSD.org> >>>>>> CommitDate: 2024-05-03 07:38:55 +0000 >>>>>> >>>>>> periodic.conf: remove long deprecated security_daily_compat_var() >>>>>> >>>>>> This function is documented to be gone in after 11. Time to remove this >>>>>> compat shim. >>>>>> >>>>>> PR: 275296 >>>>>> Reviewed by: jrm (mentor) >>>>>> MFC after: 1 month >>>>>> Differential Revision: https://reviews.freebsd.org/D44796 >>>>> >>>>> this broke pkg's periodic script, I would have appreciated a heads up to give me >>>>> time to prepare a release compatible prior this commit. >>>>> >>>>> This also breaks some ports. >>>>> >>>>> Bapt >>>> >>>> This produces almost a dozen failure messages in the daily security email. >>>> Given that the deprecated function was still in use, it should not be removed. >>>> Michael, please revert this. >>> >>> Salut Baptiste, >>> Hi Mike, >>> >>> this is surprising that is it still in use although clear marked as >>> deprecated after 11. Though, Baptiste has pushed a new pkg release yesterday >>> [1] and only main is affected, do you still prefer to revert this commit >>> (for now)? >>> >>> @bapt, can you name the affected ports and report a PR, so we can track >>> them? >>> >> >> This was in use beside the deprecation, because pkg for one is supposed to >> support as many version of freebsd as possible so we had to keep the deprecation >> notice. >> >> I have released a new version of pkg without it and merged that version in >> quarterly branches, so even if it gets MFCed we should be safe. >> >> I was scared more ports where keeping for the same reason the deprecated code, I >> span the ports tree itself and found one port which I fixed straight away, I >> also did a deep analysis of the any port which plist contains etc/periodic, >> I extracted all their sources and I found nothing. >> >> so I think we are safe now. I don't think we should revert. >> >> Best regards, >> Bapt > > OK, I'll withdraw my request to revert if we're confident that there are no > stragglers. Alright, thank you folks. We'll keep as-is and MFC will still land no sooner than in June. Personal thanks to Baptiste because you picked up the problem so quickly! Michael From nobody Thu May 23 18:00:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlbYH1bLXz5L0BB; Thu, 23 May 2024 18:00: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 4VlbYH15vgz4sfK; Thu, 23 May 2024 18:00:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716487203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NViUAakX0jRhdEv4/qZEDLpbkPupuz7Ic8V/TP8gf7s=; b=p0Ah5mamYx+DMObnQPbujEpsNpr2cCZilMEJ10ze2Nce/+KMOswF9jQCcrEgonBB7RYrD8 ReFUKpUQu1TAkQhC11VkVNitiv6imisz6xp3iSeFJqt4joOaEjjWZhuM5hJq6sfSjre2KY gl0znP8AM4/Wwyv0mcotoH1rZoNvbnCvRB5mdy5b84sRfuVgxIU5ZQlku1NScu9KC4GqTR wpSlQeHCwl8bHEG4E5KznEG9VLcRLZPcbL6/ZlJzIi5CZyE92v7LsgtE5LsVw3TCUibKoY Zksw57iGdRhZ1jHsOXbwMxv9AaqbaruoQPRuaio+RPCcdTh2SLDVjXeg6/9zOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716487203; a=rsa-sha256; cv=none; b=pIzA5K/4qEVU+IxM6QHLNwuAi4fO+Zw+FWKCiBprldmIg9N69uh+WqR0q1cFYmvKh3nFS7 0UYKlKYKkkY5RUsNz5KiRo3rAte+1M/vemwrr4bvOe7rGaW+PyQeSwGm/Sm6cd01aCXMOz I9SSpb5vEZMdOax1wgU5DS3zGPBkzjUkMIiRea50sgGLKlaBW6aKxbSrdbmNLaPLNyVRDV /Fg56t7I4AbFOysoLlZQqPQDhKwh5iP19GYVp1iR1ZdRtZPpjOuLIcPoJJ8Nyhfvt11fry N23vRms3iuUKSTumGjbamYD4C6ViN47IpVbMao+g3IK8VlZPHwsSC8AzzD5Paw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716487203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NViUAakX0jRhdEv4/qZEDLpbkPupuz7Ic8V/TP8gf7s=; b=iphtHpmye4J9pdv3ZKsm9CeKOH5ow3kNj9XfcCKIXwZ4KnLItZKZ7/wkYO8O5iHVKlAraK lAZlnF6mOeMkk59coEPLzgpiqcE3lY7Dq23/4/aDpURU3pgu2pcVPBimEo5T5nLpvdZklJ xRXEGj0ymkA8LT/A9XmHMBnHyAxxuqH77g+svABAi930q/8g//w5mvXxbDGBCsSuB7jkLw QI3tOPMFPeYwNYQeABOWVvox3C3rpYTMYyZuTi3xOST4bdU0Mv/SSsiazHt5Wh7gNICcRu 6ITMoGHpVMsrWRxorwf/TzgKKtun2aTmOCTt+a7QLni2OhEABDAjqT0aqPDt7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlbYH0htlz10Br; Thu, 23 May 2024 18:00: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 44NI02hX002208; Thu, 23 May 2024 18:00:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NI02TZ002201; Thu, 23 May 2024 18:00:02 GMT (envelope-from git) Date: Thu, 23 May 2024 18:00:02 GMT Message-Id: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: a5f03413aade - main - ci: Redirect output for builds. List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5f03413aade8f69cf954162151da043d34dd1f5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a5f03413aade8f69cf954162151da043d34dd1f5 commit a5f03413aade8f69cf954162151da043d34dd1f5 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-23 17:37:01 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 17:59:40 +0000 ci: Redirect output for builds. This target is far too noisy to be at all useful. Save the output ala make universe in _. files. Also report where to find errors. Sponsored by: Netflix --- tests/ci/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 8892b0860260..fed66e5cc317 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -147,19 +147,31 @@ beforeclean: .PHONY clean: beforeclean .PHONY ci-buildworld: .PHONY - ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildworld + @echo "Building world for ${TARGET_ARCH}" + ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \ + ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} \ + buildworld > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ + (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) + ci-buildkernel: ci-buildworld-${TARGET_ARCH:tl} .PHONY - ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildkernel + @echo "Building kenrel for ${TARGET_ARCH"}" + ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \ + ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} \ + SRCCONF=${SRCCONF} buildkernel > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ + (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) ci-buildimage: ${QEMUTGT} ci-buildkernel-${TARGET_ARCH:tl} .PHONY + @echo "Building ci image for ${TARGET_ARCH"}" mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ QEMUSTATIC=${QEMUSTATIC} CITYPE=${CITYPE} \ ${RELEASEDIR}/scripts/mk-vmimage.sh \ -C ${RELEASEDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \ -i ${.OBJDIR}/ci.img -s ${VMSIZE} -f ${FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF} + -S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF} \ + > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ + (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) touch ${.TARGET} ci-setsmokevar: .PHONY From nobody Thu May 23 18:24:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlc5l08Xfz5L2jc; Thu, 23 May 2024 18:24:43 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlc5k3Y1pz4w5t; Thu, 23 May 2024 18:24:42 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0wkaGOsxKMG0zFtSJno3Xcu4e3lgtn3jnEk/AATyi1U=; b=ND5RkUKEISy/XuFxo4zgxcsq4oZtppmPrIA7vfScJWnlEfLa47I61eL9d2CTToj6Qw7WXv EUHNx0ZEVXdbY/Z12b+wsOdLevBjJKJE/ZWJtZW5mAdA0vWvMT0uHmnyTnzOY0A5a718Zd nGojRBbi4uQs3ASVWPptTMkKL8gh5cP0MSAU3neO9k7xCL5qyOOMBov81xbgXboKewdjDk 9CVczAq/T5WILowekmEQSrBdyejSo0KOjZqBX6WRtWDlUy1VRTJNwH6bIzPaKROE8BLE92 NG2tuqbNNNlpYOfdTyRL2ZscFQOveOmRt6tP+FHuCzneHGSKqC4gj/YSm9gh3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716488682; a=rsa-sha256; cv=none; b=DLux/LKOJ/H2MiCZtV3rn27GOMZPWu9qM+SZMela54IHNfZNTKwHTzazXRVlHQt2H+P5JM SyUHtg22G2RsfkXthOIG0I1IDJrlERlhFxYbTbBWUzD/WJaQxkh35zIc0pnUyAZaRftQ5V bmSPZA8s4a/LFs+ooyI5pcjhDtZXGRpHLUT5PBZsQysogP0VkOSoZjQWpGzviMJFGms+/Y 9fRpN8Fb+MhSugvPwHD8Eccq2SwiQ1vW4gHL4Sj2s5a++5BQJUbhtJw1sKhrJkLG5Ddvug ts8nHVwXJLwJl5TBv22KOqMzZ3kQKIDBSSadOA4E7NXvgv5Yn89zxLvpP662DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0wkaGOsxKMG0zFtSJno3Xcu4e3lgtn3jnEk/AATyi1U=; b=gLalBM62Ozica71PhQLny2qvO6GQ8auSfjZl/D3DPdcgIVVAlfCiRHB/QOekMR8YhJwOa2 lqSiHU31bkRIzSeZEca3zlT9UI8RwsB2sApTMFJppySp+uyhSqri/oWj1MS0CoV1k7C9U0 ZhjYvIZ8ypok7AMBkNuRBRMuZ+Tux5fCwpvd2FkdzaXEdu0I8/yf/ddITQVkHGVFTmj2RT Sw4HNM1rkfgIstmlMM/7bDIF45B4AJEaq0uaOELNZGE7M9VtpUis8ORZhulN2HULKjBMTR uuClUYNxnBt4fEQiw8XXdhkbY68OtpPLtxcRCxZ8wUX7NgX6AH6wRH2Lou3BMA== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vlc5k2zcYzKBf; Thu, 23 May 2024 18:24:42 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 74BB53C019B; Thu, 23 May 2024 18:24:41 +0000 (UTC) Date: Thu, 23 May 2024 18:24:41 +0000 From: Brooks Davis <brooks@freebsd.org> To: Warner Losh <imp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. Message-ID: <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a5f03413aade8f69cf954162151da043d34dd1f5 > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > Author: Warner Losh <imp@FreeBSD.org> > AuthorDate: 2024-05-23 17:37:01 +0000 > Commit: Warner Losh <imp@FreeBSD.org> > CommitDate: 2024-05-23 17:59:40 +0000 > > ci: Redirect output for builds. > > This target is far too noisy to be at all useful. Save the output ala > make universe in _. files. Also report where to find errors. If this target is intended to be run in a variety CI system then this won't work in practice as many have no way to preserve the contents of the files (jenkins does with sufficient configuration, but then you have to expose it to the world which is a security problem given its vulnerability history.) -- Brooks From nobody Thu May 23 18:28:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlcB96HDmz5L2cn; Thu, 23 May 2024 18:28: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 4VlcB94FHzz4wXy; Thu, 23 May 2024 18:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p648VWC2+v9BbWWQJAZZVcFQMyXLHGWAHEsMgiVJC7E=; b=uvzad7u78RTEjwgPFO/8jakt/HOvNagG9T4BY9Y65Gf26lES6jIUONncWiZog2yVODI1KR hg2X6VnuGIpq75Y3VmBCp9SpPzNuDm+/qQYL0OCeaPfMeu9mlSC/0MQTxtuAUeXumVeWSh nmEnOevZ+kUqFf3ZhWH/yntOahtdzr0GmQLfYNx4w1LWPR9jsdXD0FFzIjdBgspUyNJ2b1 cVoPENleLmsl0Rug47DM3hoxOGH2y1mQi9dSDiCNJN1FdwkFF2ZMAWcSmYiSS1eWbO8PMe Km5fgl416MGDFCkdo3kKfLbofdGcCCIh5HWwO0V5Iu2aScjXxWvbGU1mY7lAPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716488913; a=rsa-sha256; cv=none; b=fiE9m20hC5mHhZtFrWzo/hULObIwFTW5QwMcugU2FkbGPL+7vQAMuHwtk68Nz0GwuleRkX Jz+nLdgqBS/WfZjWpZ3Ns7OapSwqeVZNDbfkByu+Cl5r5EiTULTJmCzAVLr+wAM0rrAQnF NsPjSi+Om7fiPSNZSm9iXFaNfU4cW69guccPdGYHCABUWy6WNoVuzy3LK7ivVfCgXlrzb2 smRkaSqbUETGrt4UahvIChCTeKQnKnMdwUw04jVxVD9X/KTn5Q2c7wkghmqoffzXj7N9l0 o6Y5FXqGksfkKxA2l7YrEBgPXQ6s++nz0btiRspd659Pp5leHXTB9xh5VopSZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p648VWC2+v9BbWWQJAZZVcFQMyXLHGWAHEsMgiVJC7E=; b=L7gDMMvVAhBlZbaPFHKJp6AL0h/t6RL5qqvzcyqkJSuDSTaBRAEftvKHIvOdzdKXfbm0Io ld+JJnfHSESEGUHr8SlbJF81HeQjT4z8lwLQSHRpZZ9eBCxiR3xqof/VsAdEwaJCJzNBji J0OM+WMCBAtgFhxwi5LKAVqCjdHthiNm3fwE9xkDmHOPVMr156UH/4pxDNl5lNja6Zm7Ur sSkb/No2y2tsjFKuVEfbUsSfvVN63qLxRktEfydhvSax9/InkWjOE3fIrx2hu30VXDLkJl NeTaFefGXUhlPfIqE0x/DxhCccnD8o9vy3EE2pd7ZC17HdsDwGDXmccN2Jb4uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlcB93sG5z11Ff; Thu, 23 May 2024 18:28:33 +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 44NISXvH050494; Thu, 23 May 2024 18:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NISX2W050491; Thu, 23 May 2024 18:28:33 GMT (envelope-from git) Date: Thu, 23 May 2024 18:28:33 GMT Message-Id: <202405231828.44NISX2W050491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 3d7c8f088796 - main - cp: avoid a resource leak List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d7c8f088796ec6ceb1d54005657dee78fd01fbe Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3d7c8f088796ec6ceb1d54005657dee78fd01fbe commit 3d7c8f088796ec6ceb1d54005657dee78fd01fbe Author: Pierre Pronchery <pierre@freebsdfoundation.org> AuthorDate: 2024-05-16 14:19:44 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 18:04:43 +0000 cp: avoid a resource leak In copy_file(), make sure the from_fd file descriptor is closed even when the operation failed early. Reported by: Coverity Scan CID: 1545036 Sponsored by: The FreeBSD Foundation Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1238 --- bin/cp/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index d102fb076139..cfbb2022caaf 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -112,6 +112,8 @@ copy_file(const FTSENT *entp, int dne) if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) < 0 || fstat(from_fd, &sb) != 0) { warn("%s", entp->fts_path); + if (from_fd >= 0) + (void)close(from_fd); return (1); } /* @@ -124,6 +126,7 @@ copy_file(const FTSENT *entp, int dne) */ if ((sb.st_mode & S_IFMT) != (fs->st_mode & S_IFMT)) { warnx("%s: File changed", entp->fts_path); + (void)close(from_fd); return (1); } } From nobody Thu May 23 18:34:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlcJm432Hz5L31m for <dev-commits-src-main@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 18:34:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlcJm3Q8Qz4xHr for <dev-commits-src-main@freebsd.org>; Thu, 23 May 2024 18:34:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a6265d3ccf7so4914066b.0 for <dev-commits-src-main@freebsd.org>; Thu, 23 May 2024 11:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1716489255; x=1717094055; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+t8x8+ySGDw3i0zY3g4Nzwyq5f4sS4MuNHbQJdiArJI=; b=FonlwAsz/HfcKC3cb1LpWPfIKpCOGiwdryWaYeCA9sOAS50TINEz/0W9hStAdY5QAS HLZyQxYDVGOo+WwPoVqKKwjTccVfgjebPkBu23bGq+hV0bw3O5lsGScB3sAcghh/gafe Ny5lo4L9SSxthA+zOsW731Ep/EEMZg/DSQaRsovjhknNjwUFlVeMUY3iLxJD9SR3nQhy RjOGrCsjVomv2RZdeIqShL/Iaukn51bGUde/tKUZDa4MUYkrwpLhBlEE8WAKw1wbxUIV tteh3BuvK++WVTSRpeoRjG/92aQ29kTgXM7QFjxwnerAGjaOQdRWXgFRCQcKnPjUL8CC fKkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716489255; x=1717094055; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+t8x8+ySGDw3i0zY3g4Nzwyq5f4sS4MuNHbQJdiArJI=; b=ZtpnS7aCdkhbK8e/WJ/4RFIP4OpumIzWuCPKUiAE807joIKmwJ3hiU7IPDwZj1xTNc cwBQRkZ27FMm0fSVXq6l18GagaszcwOqwtGVfOnYw4he1T5BEnzNnOTuUdAlfbxiBHNS VhT1uhZOwJ3vVufF7ZLS/ILItZhZn6vAjcaFbeUCo9UQH0bi+QnRaydzG9XAVsTuYOxY phXdaSR/bQfiyxyYRByeA6NRAlwEdPBFjgXgQ6O7z+DsGr8PqQhkjt2ypAkYH9Fm2id3 Z0CcMLsTOWdLcSgnB0hl9vxI7456dKEFmy6Btl0QqbCHuRglPXyS15HKpYDxLwu25AFn S4Ew== X-Forwarded-Encrypted: i=1; AJvYcCViiX56kPhHd3Kb13doZMb8rbKhObOUJqdYaUn+viNj5OY1Q1hj44rAv15u+Vjjd52PjSaq1D6kqZY/7PWMhgupGruuJlq7uiQC+3OdUNAV5w== X-Gm-Message-State: AOJu0Yx011oN5Mpu1cr3iXurCv7O7RK/Nc3C1tG9USaxNgf2zqDAJCYi Eo3f2HjNAsfm0YyYLlRoyHDspdJ+vOEyz3AydVfVmt/PeiTbdwNz1klRqIaPDHFR0vD2BzpjxbH Hf+NHkhiNIfwVClyJVBBaB1QT/X4VieP7LqD1Vg== X-Google-Smtp-Source: AGHT+IGlBOo42yuxzzJaZFL+jNwTZ5foB21z1RxyZ6ClRwmGnddoELhiHl44AQQbrK542RZ+VdWAG6bh8QWSDdowupI= X-Received: by 2002:a17:906:280a:b0:a59:dd90:baeb with SMTP id a640c23a62f3a-a6264f0ef79mr10395366b.48.1716489255356; Thu, 23 May 2024 11:34:15 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> In-Reply-To: <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> From: Warner Losh <imp@bsdimp.com> Date: Thu, 23 May 2024 12:34:03 -0600 Message-ID: <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. To: Brooks Davis <brooks@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000053a7150619234c86" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VlcJm3Q8Qz4xHr --00000000000053a7150619234c86 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 12:24=E2=80=AFPM Brooks Davis <brooks@freebsd.org> = wrote: > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da04= 3d34dd1f5 > > > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > > Author: Warner Losh <imp@FreeBSD.org> > > AuthorDate: 2024-05-23 17:37:01 +0000 > > Commit: Warner Losh <imp@FreeBSD.org> > > CommitDate: 2024-05-23 17:59:40 +0000 > > > > ci: Redirect output for builds. > > > > This target is far too noisy to be at all useful. Save the output a= la > > make universe in _. files. Also report where to find errors. > > If this target is intended to be run in a variety CI system then this > won't work in practice as many have no way to preserve the contents of > the files (jenkins does with sufficient configuration, but then you > have to expose it to the world which is a security problem given its > vulnerability history.) > This is a developer tool to run CI before committing. It's not going to run in Jenkins. If we want that, it will have to be a different target. It's way too verbose otherwise to be a useful developer tool... so verbose as to not be at all useful. Warner --00000000000053a7150619234c86 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 23, 2024 at 12:24=E2=80= =AFPM Brooks Davis <<a href=3D"mailto:brooks@freebsd.org">brooks@freebsd= .org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex">On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote:<br> > The branch main has been updated by imp:<br> > <br> > URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade= 8f69cf954162151da043d34dd1f5" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da043d34dd1f5<= /a><br> > <br> > commit a5f03413aade8f69cf954162151da043d34dd1f5<br> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2024-05-23 17:37:01 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2024-05-23 17:59:40 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0ci: Redirect output for builds.<br> >=C2=A0 =C2=A0 =C2=A0<br> >=C2=A0 =C2=A0 =C2=A0This target is far too noisy to be at all useful. S= ave the output ala<br> >=C2=A0 =C2=A0 =C2=A0make universe in _. files. Also report where to fin= d errors.<br> <br> If this target is intended to be run in a variety CI system then this<br> won't work in practice as many have no way to preserve the contents of<= br> the files (jenkins does with sufficient configuration, but then you<br> have to expose it to the world which is a security problem given its<br> vulnerability history.)<br></blockquote><div><br></div><div>This is a devel= oper tool to run CI before committing. It's not going to run in Jenkins= . If we want that, it will have to be a different target. It's way too = verbose otherwise to be a useful developer tool... so verbose as to not be = at all useful.</div><div><br></div><div>Warner=C2=A0</div></div></div> --00000000000053a7150619234c86-- From nobody Thu May 23 18:41:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlcTF1snWz5L43T; Thu, 23 May 2024 18:41:37 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlcTD6znXz4yK3; Thu, 23 May 2024 18:41:36 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716489697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XytRKc8S+NZabV39bsoht2oFbjaMv4rpOv3bM9ba7L4=; b=jvmUHu5ofV7gRrvpAEMK4/P4EKAuQvWdMYbKCh7u9r8vo//pJAFGF9bsfauLb1tFBGAtDN N5PxfBDfGRO5azFQ9GS9qA7kJyVseXOLu4VQ/zwfrD55e+WbijZgPkO2oo2H+8P5v0HzW1 sCckn5lc43j0UiWSG/T1bSCOXZngZ7IGRlbIz7jD5Mb9ArfzHvjMpzR0exrzBZfofGPkLS 6R+Wj9iIxiT5Im31pm5dsIqIvH0gDLYLk+KQ9W7Mn+4f2fVH0ojtc/YIeZXnQmzJPxKeO+ qLGcZnp8dn/ecIPMs1XMOIWPrDM4SaghquIDt2XbPZ/8XIiupWlUrgQhvPZTow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716489697; a=rsa-sha256; cv=none; b=Z/be3ZKXJR50xTh5C9+I/A2s6bWFLLAIIK4VpciLSLiCaTO2OxQztZJnG/W/v9TVj8N/e+ Pdr3XmWa/Kq0DRyeIK0aFHpAx7keudKeXq8ntvvhWXDDWw53mM6OTUMJbJJdT91+HzOnrL NYd15keuthu4Vlbcmqzx1BcP27XejCln/KW7K7GFUasVBm8yPo5ddhzANVhFoTps8WojIE KW9dZgUxMMp+Q75/i59FkEPZ2vx5NtKQQH66j7K8XUdRYrQEkd1xvcE6D6kRB+mpOnH0u9 qlPnEMzcR532mWXxnvVxqGSmgAxgEN4im3jq66e3MldB8rg5PTLgodv4L5gaHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716489697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XytRKc8S+NZabV39bsoht2oFbjaMv4rpOv3bM9ba7L4=; b=R42zZmRXBtZsK66F4DdUjv7VaiGs4DAbnh73JvEpj8VJ94AmCY/zA0bxg0n7JYaMZ10IFt uyNGJyPKen4c9Ibzi/rwpv1zCKe03BzBs9P8nSjVOJxvA03yguHlKQ4ZfJEm4QyQxHjAvy hFJIobvyjFTpZyIYuGyLTl66T29jIz5TQF4GJ6C8STqExDdxEAIMtmYaX/orM41xTk+zBt EYOi4dQl2SEYIgtG/x1iW32vohgZOfTCXx+19TCHzOz77PCVThTgZXGt3JfZhYf4ZmKkAA y3y8xLFXR8NxpMmAcWvqddwsRGGui5bVd6YesRhDyaFU/joNt4F6gqbNU6Tc3w== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlcTD6VjfzKZX; Thu, 23 May 2024 18:41:36 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id AE7943C019B; Thu, 23 May 2024 18:41:36 +0000 (UTC) Date: Thu, 23 May 2024 18:41:36 +0000 From: Brooks Davis <brooks@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. Message-ID: <Zk-N4BNTQRcTZGOb@spindle.one-eyed-alien.net> References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> On Thu, May 23, 2024 at 12:34:03PM -0600, Warner Losh wrote: > On Thu, May 23, 2024 at 12:24???PM Brooks Davis <brooks@freebsd.org> wrote: > > > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > > > The branch main has been updated by imp: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=a5f03413aade8f69cf954162151da043d34dd1f5 > > > > > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > > > Author: Warner Losh <imp@FreeBSD.org> > > > AuthorDate: 2024-05-23 17:37:01 +0000 > > > Commit: Warner Losh <imp@FreeBSD.org> > > > CommitDate: 2024-05-23 17:59:40 +0000 > > > > > > ci: Redirect output for builds. > > > > > > This target is far too noisy to be at all useful. Save the output ala > > > make universe in _. files. Also report where to find errors. > > > > If this target is intended to be run in a variety CI system then this > > won't work in practice as many have no way to preserve the contents of > > the files (jenkins does with sufficient configuration, but then you > > have to expose it to the world which is a security problem given its > > vulnerability history.) > > > > This is a developer tool to run CI before committing. It's not going to run > in Jenkins. If we want that, it will have to be a different target. It's > way too verbose otherwise to be a useful developer tool... so verbose as to > not be at all useful. I think we have different take on the goal of the project that created this target. My read was that it would move the core CI functionality into the tree so developers could run exactly the same things jenkins does and thus debug issues more easily. For reference: https://freebsdfoundation.org/project/continuous-integration-enhancements/ -- Brooks From nobody Thu May 23 19:10:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vld7p0RDwz5L6dK; Thu, 23 May 2024 19:11:34 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vld7n5D7bz51MF; Thu, 23 May 2024 19:11:33 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108160.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44NHYKsQ001556; Thu, 23 May 2024 12:11:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h= cc:content-id:content-type:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=PPS1017; bh=4xGfFCY0vnzxq Z4y+ngGtVGz3VTSO6LEnFe8yDYR3iQ=; b=az9/1oax+PdD0odkjJs0R6eenibOE P7AAujvaMdRASiLOYVBQV7KfuxmOhdLXgKjhZB3/UEcKXXwb8NCebvVd2RAP01Mk v1oSyXyjvTSjEy2lgXrP2sOws7hQQt7qB22XmJqiKOVeOmLf2dT3xWyirjmQ4xob 2IQWnikHKcGacBjwR0aV6oPhQHKNTVWK5SXexsWT2ztFXAxv5elbxBh/bFWzj5SH cL81ULkKJ+f3wK+TVTUzdKyYm0KttaSYyQFkwAQgxV5whHUhiymYaXpI+dx8iA4l oXLU7DON3Rrmgss0zz7GtW+SCipMDjuidhGR8yS9y22aXthfxd2XIgk1A== Received: from sa9pr02cu001.outbound.protection.outlook.com (mail-southcentralusazlp17011010.outbound.protection.outlook.com [40.93.14.10]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 3yaaad06dh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 12:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CiwQToieVb2UHMaBfq6EAN/IMbOAoi+MPO0inr1JL5G9cMzDQYnEpOWxoQ+T0A08E0145RfAZbtBmX+L0cxfMDlayFrtTl1NzTi3VH6S/VB8iElRurSTKm2QmsMlqL0EI1BboXC5+U2E9lB8nCzhJEqxoUbW0Jrsy8oY6feQulXszZ0Ll2guw189v2FjGziD/Lc8yLtDHHBlwzeMVXg4xz8tvsALmuwhJJKE+qAYb/ap0Q1JZc5EDoam6D4/v/tee349g5jt/JzYPvZitPzvWpI/hOoNayGnXXD/vluWfufKenWga4V2RTjhTJCkkEkHzm+6nMbyNhLyN4SiWM/xVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4xGfFCY0vnzxqZ4y+ngGtVGz3VTSO6LEnFe8yDYR3iQ=; b=J91ClL59aV883f8AchotXT97i6SWbDL+zx3Tus6QVapNqoi9KgqzAf6XjGnvSYYEj3KO3z1vNBYM2VdehWMDZCg8klJfNkNncKwTYC/g8WPGGgtzSDLD3G0qWpFBiqTMqisw27YRhDYAE0Ydewuf4nj9NXCLRNwbdTQZxur928B6c/g4W0gD8wTUJSvq9YcwhLr0H/UBmhhcMn6dRywE392bm2vGV4Z267C8xaPAnQD7K67kfsIJdEuouQELssdBQlsvd3wk+//LctlxiukYcdHePap6FtAC1/JxWvGQrAzSOIQ7OJxPCK4rGFz6IPksCVicgm82rWmCBp9Y3Yk5dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.15) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4xGfFCY0vnzxqZ4y+ngGtVGz3VTSO6LEnFe8yDYR3iQ=; b=HL4dLYiycNeCuJWRjVQPG3z+msq69cDXO2VMTg0dfDvto0IFz1CP5nAoHpqrLv50LSvFiiP+CMZZOpaxx6bRPHWj8L+XyX1gB8l+ewuB2sGu8m+XedYtRB8WtIXFWY7ndTFUNiXCc9J5dQZhkzn+ncucLTkIQz35QCWMK6fCSro= Received: from CH0PR04CA0084.namprd04.prod.outlook.com (2603:10b6:610:74::29) by SJ0PR05MB7625.namprd05.prod.outlook.com (2603:10b6:a03:2ab::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.9; Thu, 23 May 2024 19:11:29 +0000 Received: from CH2PEPF0000013D.namprd02.prod.outlook.com (2603:10b6:610:74:cafe::3) by CH0PR04CA0084.outlook.office365.com (2603:10b6:610:74::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.22 via Frontend Transport; Thu, 23 May 2024 19:11:29 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.15) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.15 as permitted sender) Received: from p-exchfe-eqx-02.jnpr.net (66.129.239.15) by CH2PEPF0000013D.mail.protection.outlook.com (10.167.244.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.14 via Frontend Transport; Thu, 23 May 2024 19:11:29 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-02.jnpr.net (10.104.9.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 23 May 2024 14:11:28 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Thu, 23 May 2024 14:11:28 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 44NJBSPR000352; Thu, 23 May 2024 12:11:28 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id EAFB635DCA; Thu, 23 May 2024 12:10:24 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id E94F335EB6; Thu, 23 May 2024 12:10:24 -0700 (PDT) To: Warner Losh <imp@bsdimp.com> CC: Brooks Davis <brooks@freebsd.org>, Warner Losh <imp@freebsd.org>, <src-committers@freebsd.org>, <dev-commits-src-all@freebsd.org>, <dev-commits-src-main@freebsd.org>, <sjg@juniper.net> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. In-Reply-To: <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> Comments: In-reply-to: Warner Losh <imp@bsdimp.com> message dated "Thu, 23 May 2024 12:34:03 -0600." From: "Simon J. Gerraty" <sjg@juniper.net> X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.3 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <89103.1716491424.1@kaos.jnpr.net> Date: Thu, 23 May 2024 12:10:24 -0700 Message-ID: <90929.1716491424@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000013D:EE_|SJ0PR05MB7625:EE_ X-MS-Office365-Filtering-Correlation-Id: aac04713-e57d-40a3-2fc3-08dc7b5c268c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400017|36860700004|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?C5VUcl+j9G/r2b6PhyyroVqO+v2h/H2gppvqAWqEazrmkfKCeWIXz1oUg536?= =?us-ascii?Q?s80wkSkfzMPU6U+MTYXeY3A0/x8XV1MRRh8SDBeNUEl9XBm9cvlsnGqp7LoN?= =?us-ascii?Q?PUx5REvgJLFETdG40iW1gmwciOaKOMRTp2ShPKxIbIKWjpyN0rv3COP64CPy?= =?us-ascii?Q?CqMpz4CpIEHvZm2YGvuCPzUOy/IgLF4/YpSkS49s0I95RGTOcV1u1bolcv36?= =?us-ascii?Q?XvMGm13CdAzVcqEclf8ohl/QNJakugLwU5lG8uXGBSZty1ZRFgakRWLCAeAC?= =?us-ascii?Q?kncolAXxsKDB8FtoOwMKRuaouQn7+0LCTBc30c634L04n1qkd8VQPJWDTRVX?= =?us-ascii?Q?63kFSq5bMEo71Y6owzjrr0mhpDeTekYJxYFMf8eqlrpqSWv1X2VBdt1FEYjb?= =?us-ascii?Q?ZeDPuSrLlbbOL+qa74clKtnq5c0hGFs+p9kzXLY8rDQBGpki0//tRte+quIZ?= =?us-ascii?Q?Uykwvd6PScYYxkjAacNZI2M7nXaoSHi+EBJ/lB0ok3LmA1AKhsbNtHyQ6ABG?= =?us-ascii?Q?b6TsJHY5lvwCWp60JQi87dmsVu4S5zKKCzupBzenMvX4C4AjNBrvqLdf7LY2?= =?us-ascii?Q?LYpqOFxH1CAXAk6biWj+j+uuxWSzHHqw+7OmM8KwLok0m4S01T4Uiu3yNoir?= =?us-ascii?Q?zk26WTO5XWlOr/nlrXOuqad9LOgSyfQZmk/NhFZUcZqx7RIbrXhIm6QydcPC?= =?us-ascii?Q?vanlShInDRS+tc821SX+OTlj4nVZrXzJjSXxLZ/JYkzv25u+K0NVpVxUDJUj?= =?us-ascii?Q?8D2Wd5ALzQadL2WH+IqyDAma7pEtpi70r+f6arjYyL7PaE0K3Yfv94jCw1tH?= =?us-ascii?Q?10cgvqmkmOkyFFiQB4nS41kwxennhdDYWGVGKzQyJoldu4jNcYSJqVWKjD4U?= =?us-ascii?Q?BVpdAzoxlMMRIglA2q2NzfPerGgk2YjTvikZ5Y3uFHLI42XTGDGrgGT/7PXu?= =?us-ascii?Q?RGaAFluqhrxM1AXZQxylxhL9kpJsw3dh0UlQK1bwXzHbHNb3YsWJottHNrvw?= =?us-ascii?Q?JTosOElS0nfbRD5wVUNO3af/ZBZ3Yj8TLtGBG9lyP/YWvQqnsmUXml5rORAx?= =?us-ascii?Q?8R/JPrBf15BKkCuWAB5rvuAqBwdBUpUWqXREWnc9f7mZH3eUy8YYTS458MxA?= =?us-ascii?Q?MKEJ+lEppg1iA8n01seG4aaH0aJSeW3XfKhmBYcvZhs79WX8DRsAFkf3WtZs?= =?us-ascii?Q?R0F8uq8VKkdHKnuXm+kNGgzyzZlnCZRu8GBZArGPThF03/b5y5rtJrUEn12c?= =?us-ascii?Q?jqHA5gDAtfYlVVFSpoWtXR6d9RiicIlsFb+gpTRG9mtg/qDVzjMyRE8ASVgI?= =?us-ascii?Q?OcHLPnxnMEpf+ymuXxlrIqm+mBkaYHnF5LbAhqTIG2NAABC4CcSRBnGy57+J?= =?us-ascii?Q?8WGqPr3cMN+9LOxEkFqbPaX97r9Y?= X-Forefront-Antispam-Report: CIP:66.129.239.15;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-02.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(82310400017)(36860700004)(376005)(1800799015);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2024 19:11:29.2603 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aac04713-e57d-40a3-2fc3-08dc7b5c268c X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.15];Helo=[p-exchfe-eqx-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF0000013D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR05MB7625 X-Proofpoint-GUID: YYSVqHobDvCmZ4-DkqOajdyovLjGklrs X-Proofpoint-ORIG-GUID: YYSVqHobDvCmZ4-DkqOajdyovLjGklrs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-23_11,2024-05-23_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 mlxscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=578 malwarescore=0 priorityscore=1501 clxscore=1011 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405230132 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US] X-Rspamd-Queue-Id: 4Vld7n5D7bz51MF Warner Losh <imp@bsdimp.com> wrote: > > ci: Redirect output for builds. > > > > This target is far too noisy to be at all useful. Save the output ala > > make universe in _. files. Also report where to find errors. Could this issue be addressed by simply using -jobs ? eg. make ci-buildworld-jobs runs ci-buildworld with suitable -j arg and redirects output to ../ci-buildworld.log by default. From nobody Thu May 23 19:12:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vld8j1cwnz5L6mF; Thu, 23 May 2024 19:12: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 4Vld8j18JZz51bh; Thu, 23 May 2024 19:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716491541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDdiGNL7ywUi7FpbVcdoRZepmfFdgC0OoZvH/tzhjDA=; b=flLxUt1tFyULixClKeeesR0J38EYndJ9lzdYqe9zteHu0Lnvn6/zfj2WBkxRrJXcsUg1yC M3ZCQlM1YFtPoLRX7XuZpkl+xUkBDqD+HZ5sHFyHGMlqblzJRTZBRB/x16rhgnlOs5SPGo ZiRI2TtGZKLL0M2Cc0mbcl2yWC7OzZ4OCj/3/U+6WumvNmMxDZNWCAt51HHhrcZzBYqCBJ zBoJ/MfeLais7i6LwTqBQ5y54bGrke/NgZWasDYRcVT3UInzroJvRHDQ5XIL5G0a5e/IPj lxs+dASPaIBwdUpsuTQ+7ZDi98go695VLEshryD6WeoyIqMcB1VPzH39nWMSzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716491541; a=rsa-sha256; cv=none; b=sLEKgToVpMuSsIFOkFd9GTDYyeWVu3jR7FuA2cRCGbDeELgjxd74bJ6AHfFBL3UG91q5cb PBsiYUuPiCOvkQSUVTw344tkU4QOyyAiAJb4K67tAHWRXHwQfqZ+i02ZHoayZ7KGAICWjm jjHAJ0/mL44c9MSYzV+VopCtOnRR1NJIyCtRyUXeniNNXcrUSkkE3DChd0bkY5M1iMWgX4 FDWhOcqEK/E+sE0Qqao2ItfNNxReTOO3hK4gEdI77FvZdmGPphtTGG2CXwz2WA1XFqWIDO i0qQY+m2wOPa4m+IBvwfEDaTemtACCvlLbolOXlGQ2yN0WxKqgKYmMZ25IMIJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716491541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDdiGNL7ywUi7FpbVcdoRZepmfFdgC0OoZvH/tzhjDA=; b=Zy4eeXBxrsz4uhora+puoRtsjlbvlOKUPxz9yiMftN8XGlDocAKOYRc5eoIXVdVLvQKAeq VZlTvjex7ciOLQvESIbn+HUflbHmzaSjG2/Bdj2ocyf/DqEn7DnHOdm2HK/Zb5AA6z3woO pIX+tm96Q8Oby/jzNnS2VmfA1Wrz/3YdftwUau0na3vD1eqadeko5iRSgaU9D5OGeVCy07 tZGrEQD6Dx+Ya4SuwJFJ6SeYRXrLUurT4oas8eOL0/SvoyG0ko+/Fk/9rpnITqlCRRtWQC c946fxMKjRghv9yYOilSrihnQPTgO0eIzlMw5krhiSpO+ADNEyJAmlCE4jeC8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vld8j0m7zz12JJ; Thu, 23 May 2024 19:12: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 44NJCL2u032050; Thu, 23 May 2024 19:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJCLja032047; Thu, 23 May 2024 19:12:21 GMT (envelope-from git) Date: Thu, 23 May 2024 19:12:21 GMT Message-Id: <202405231912.44NJCLja032047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff <glebius@FreeBSD.org> Subject: git: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d37895849150e1646485068d12c3a8ff26809f9 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0d37895849150e1646485068d12c3a8ff26809f9 commit 0d37895849150e1646485068d12c3a8ff26809f9 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2024-05-23 19:11:54 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2024-05-23 19:11:54 +0000 ctl: use socket buffer mutexes in struct socket directly A mechanical change performed with sed(1) script: s/SOCKBUF_LOCK\(&so->so_rcv\)/SOCK_RECVBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_rcv\)/SOCK_RECVBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_rcv\)/SOCK_RECVBUF_MTX(so)/ s/SOCKBUF_LOCK\(&so->so_snd\)/SOCK_SENDBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_snd\)/SOCK_SENDBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_snd\)/SOCK_SENDBUF_MTX(so)/ Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D45190 --- sys/cam/ctl/ctl_ha.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c index 695006ed99e1..e94708028ee4 100644 --- a/sys/cam/ctl/ctl_ha.c +++ b/sys/cam/ctl/ctl_ha.c @@ -164,17 +164,17 @@ ctl_ha_close(struct ha_softc *softc) report = 1; } if (so) { - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); soupcall_clear(so, SO_RCV); while (softc->ha_receiving) { wakeup(&softc->ha_receiving); - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "ha_rx exit", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); soupcall_clear(so, SO_SND); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); softc->ha_so = NULL; if (softc->ha_connect) pause("reconnect", hz / 2); @@ -218,7 +218,7 @@ ctl_ha_rx_thread(void *arg) next = wire_hdr.length; else next = sizeof(wire_hdr); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); while (sbavail(&so->so_rcv) < next || softc->ha_disconnect) { if (softc->ha_connected == 0 || softc->ha_disconnect || so->so_error || @@ -226,10 +226,10 @@ ctl_ha_rx_thread(void *arg) goto errout; } so->so_rcv.sb_lowat = next; - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "-", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); if (wire_hdr.length == 0) { iov.iov_base = &wire_hdr; @@ -246,7 +246,7 @@ ctl_ha_rx_thread(void *arg) if (error != 0) { printf("%s: header receive error %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); goto errout; } } else { @@ -259,7 +259,7 @@ ctl_ha_rx_thread(void *arg) errout: softc->ha_receiving = 0; wakeup(&softc->ha_receiving); - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); ctl_ha_conn_wake(softc); kthread_exit(); } @@ -280,13 +280,13 @@ ctl_ha_send(struct ha_softc *softc) break; } } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); if (sbspace(&so->so_snd) < softc->ha_sending->m_pkthdr.len) { so->so_snd.sb_lowat = softc->ha_sending->m_pkthdr.len; - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); break; } - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error = sosend(softc->ha_so, NULL, NULL, softc->ha_sending, NULL, MSG_DONTWAIT, curthread); softc->ha_sending = NULL; @@ -309,14 +309,14 @@ ctl_ha_sock_setup(struct ha_softc *softc) if (error) printf("%s: soreserve failed %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); so->so_rcv.sb_lowat = sizeof(struct ha_msg_wire); soupcall_set(so, SO_RCV, ctl_ha_rupcall, softc); - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); so->so_snd.sb_lowat = sizeof(struct ha_msg_wire); soupcall_set(so, SO_SND, ctl_ha_supcall, softc); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); bzero(&opt, sizeof(struct sockopt)); opt.sopt_dir = SOPT_SET; From nobody Thu May 23 19:21:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldMD6rFbz5L7nK; Thu, 23 May 2024 19:21:28 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VldMD6Kwhz539f; Thu, 23 May 2024 19:21:28 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716492088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+qH60lC2f4arBa8mhwnm8nENDQYpQ9nxCIjUfgPZFNU=; b=fW/YHWKOLl/enCX/TofV7lOZvr1MN3/ffXTRVyvHIl94zA6YN//WbQw2Sej1tjiTodnI7I MF/pHoBn2mvp5OIPeCISQ636muuG+oSrg+2CsvUfHJMOgrKRUxbndlthBbftv7XwCE8ngy 3I98xipP4ZmBVeBZ2a8JXmuRjnoyVFt07qTEfdG++l9MMbccWuvhko1gz8JtWzuTFze7+T WLy5iBR61gvJfbBYEpoyHdBPUjUrew5To2qwJUIvsBO/7EnLsRoDmXH5pd1OBxVu1atkFK UxmnGlANTf+hyyJIg0cl+Hs9vRos8MOGYURenawN48qJvwDDEFdysYJchpc9eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716492088; a=rsa-sha256; cv=none; b=WL/a8ZfUO/b3YIkvzYWpplBi12qrpfno8bTddXblM+NkyFWl0XKIo27m5cZMH1KS8U+lfM raisN9y/1ly3pubNkYW1pMgsrxaHYT5wrJHIFw9o4vOQKDJwwgAIQWaFjcOfqWCA6SPko8 I8TxdXI8R1IFmQeUU86SNmOLGNgBfDlr0Rxl5D4wXbisCjEW3cgwAv/Vig5V71jeC+iDN6 aOD5SFtgYzdvHDOJ8NU6fvTE2qg8jp5r3r4CALxADMp2rHcNkhzoaWXrOO+IdiyfiLn9dk 6jZ/ptWmiNazOgH83oJIJ3ZmExHrnZrKUHfroR5Sha5kB2qIQvqEkJxO+sEFKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716492088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+qH60lC2f4arBa8mhwnm8nENDQYpQ9nxCIjUfgPZFNU=; b=df2+ppntazdz/z5JWZ4a6cMdcu39gV+LZA0j10Vna5yt02/aFPXLJEgM2jMKvJXMaqyprF ReY1dX4tcj7Q+hzl6e29WsV95NJPC6O88r+Rm9ogMJo2goVebSiQiHepJueJ7O0eqlPxV8 p7xOEuXkTigwdO/GLBHjVdmqcmZUh/c2/bq/m7Ei8Q46KFO1w2rWsC/zzNYHmLUx1zUeIu DmZ+3wGVZYLA6b4Kr6/EcrBt3l4My2mWCTmQN93JjqQHGlikDXdJnIvBYfu1gubWZ4YaVZ WcjiqqfUcOcJNa18sAfVxAn56JSNIPFhoIE2WStBRjgMCmVYwpuUaF0b3h577g== Received: from [192.168.1.10] (c-73-231-46-254.hsd1.ca.comcast.net [73.231.46.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VldMD2FR9zLRM; Thu, 23 May 2024 19:21:28 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.85.24051916 Date: Thu, 23 May 2024 12:21:23 -0700 Subject: Re: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly From: Ravi Pokala <rpokala@freebsd.org> To: Gleb Smirnoff <glebius@FreeBSD.org>, <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org> Message-ID: <1B513920-69CF-434E-B5A1-45960CB99246@panasas.com> Thread-Topic: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly Thread-Index: AQHarUYcTs2miEsRM02SSnaBkVpxjg== References: <202405231912.44NJCLja032047@gitrepo.freebsd.org> In-Reply-To: <202405231912.44NJCLja032047@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable Hi Gleb, Isn't this the exact opposite of the summary? This change *doesn't* use the= mutexes directly, it uses the wrappers to *avoid* using the mutexes directl= y. Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: <owner-src-committers@freebsd.org <mailto:owner-src-committers@freebs= d.org>> on behalf of Gleb Smirnoff <glebius@FreeBSD.org <mailto:glebius@Free= BSD.org>> Date: Thursday, May 23, 2024 at 12:12 To: <src-committers@FreeBSD.org <mailto:src-committers@FreeBSD.org>>, <dev-= commits-src-all@FreeBSD.org <mailto:dev-commits-src-all@FreeBSD.org>>, <dev-= commits-src-main@FreeBSD.org <mailto:dev-commits-src-main@FreeBSD.org>> Subject: git: 0d3789584915 - main - ctl: use socket buffer mutexes in struc= t socket directly The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3D0d37895849150e1646485068d12c3a= 8ff26809f9 <https://cgit.FreeBSD.org/src/commit/?id=3D0d37895849150e1646485068= d12c3a8ff26809f9> commit 0d37895849150e1646485068d12c3a8ff26809f9 Author: Gleb Smirnoff <glebius@FreeBSD.org <mailto:glebius@FreeBSD.org>> AuthorDate: 2024-05-23 19:11:54 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org <mailto:glebius@FreeBSD.org>> CommitDate: 2024-05-23 19:11:54 +0000 ctl: use socket buffer mutexes in struct socket directly A mechanical change performed with sed(1) script: s/SOCKBUF_LOCK\(&so->so_rcv\)/SOCK_RECVBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_rcv\)/SOCK_RECVBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_rcv\)/SOCK_RECVBUF_MTX(so)/ s/SOCKBUF_LOCK\(&so->so_snd\)/SOCK_SENDBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_snd\)/SOCK_SENDBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_snd\)/SOCK_SENDBUF_MTX(so)/ Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D45190 <https://reviews.= freebsd.org/D45190> --- sys/cam/ctl/ctl_ha.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c index 695006ed99e1..e94708028ee4 100644 --- a/sys/cam/ctl/ctl_ha.c +++ b/sys/cam/ctl/ctl_ha.c @@ -164,17 +164,17 @@ ctl_ha_close(struct ha_softc *softc) report =3D 1; } if (so) { - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); soupcall_clear(so, SO_RCV); while (softc->ha_receiving) { wakeup(&softc->ha_receiving); - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "ha_rx exit", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); soupcall_clear(so, SO_SND); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); softc->ha_so =3D NULL; if (softc->ha_connect) pause("reconnect", hz / 2); @@ -218,7 +218,7 @@ ctl_ha_rx_thread(void *arg) next =3D wire_hdr.length; else next =3D sizeof(wire_hdr); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); while (sbavail(&so->so_rcv) < next || softc->ha_disconnect) { if (softc->ha_connected =3D=3D 0 || softc->ha_disconnect || so->so_error || @@ -226,10 +226,10 @@ ctl_ha_rx_thread(void *arg) goto errout; } so->so_rcv.sb_lowat =3D next; - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "-", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); if (wire_hdr.length =3D=3D 0) { iov.iov_base =3D &wire_hdr; @@ -246,7 +246,7 @@ ctl_ha_rx_thread(void *arg) if (error !=3D 0) { printf("%s: header receive error %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); goto errout; } } else { @@ -259,7 +259,7 @@ ctl_ha_rx_thread(void *arg) errout: softc->ha_receiving =3D 0; wakeup(&softc->ha_receiving); - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); ctl_ha_conn_wake(softc); kthread_exit(); } @@ -280,13 +280,13 @@ ctl_ha_send(struct ha_softc *softc) break; } } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); if (sbspace(&so->so_snd) < softc->ha_sending->m_pkthdr.len) { so->so_snd.sb_lowat =3D softc->ha_sending->m_pkthdr.len; - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); break; } - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error =3D sosend(softc->ha_so, NULL, NULL, softc->ha_sending, NULL, MSG_DONTWAIT, curthread); softc->ha_sending =3D NULL; @@ -309,14 +309,14 @@ ctl_ha_sock_setup(struct ha_softc *softc) if (error) printf("%s: soreserve failed %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); so->so_rcv.sb_lowat =3D sizeof(struct ha_msg_wire); soupcall_set(so, SO_RCV, ctl_ha_rupcall, softc); - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); so->so_snd.sb_lowat =3D sizeof(struct ha_msg_wire); soupcall_set(so, SO_SND, ctl_ha_supcall, softc); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); bzero(&opt, sizeof(struct sockopt)); opt.sopt_dir =3D SOPT_SET; From nobody Thu May 23 19:42:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq26GKzz5L9TG; Thu, 23 May 2024 19:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq25pSFz559R; Thu, 23 May 2024 19:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jHZI9kAKdQAOHZNS5r26GziD5Jqv1PUdGHgA0OorRZc=; b=bV0JTTPM2wBigdK61iuyEhjnmd2zNexIXXiVqXmYgxIrH2dwHQiStAPokTNmP6ob18GjEA D7p0lCB5ai/7P8wMbHRZTi3uruSACb5rfYA3zQCYGGeQfp5BLyiP/DMBq1fUKxU85md4mO pmLUFoSW2so5HebOPnYmKXOJZs72Wa3gwhw690x44eFCfN+L49vYBp24iti0p90IMINXaE ZmMGIkpTDNEHaCDnz6GD5WsPKdjecI/w148adMv0hg8mfjowRjklWKxHVVBPrJw+hURAJv sSdYa74fOqIAyce49Z9QRZQB0rKWNaCEUyexseLVVg0EkGAyGhxMaV2easL2Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493326; a=rsa-sha256; cv=none; b=DpsZaadBt45Llep+8Lg4vo5kExtePaTPupE5dyAEHbCmNkQ5vCOmAwm0RvwDJXNg2f/SeG B1ihD0SM3NJ5vX/R4zUEdxLGlkhYES8O4tuqHxx3PxUg6HWmvDZC0FZom+VkPqQex7cYNp zZbhhtHLt8HFvE5/Xd4p/A0KhR6N5/fUR6it8kS2Mjav80e5sJ1yuFOwRBRxUleZHYn4G3 yjxiZgCTg376xdPm7fOUXW3EcTJ/kMbHSxAJvi6766pbi2RQ1WFBg5uK2uLvxgDeQr5WDS e/yaoj745u1xMdUuf5fLt5nhs/252nz4Ijwlr+MS/Re1w6W+mGUuP87E+NG+YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jHZI9kAKdQAOHZNS5r26GziD5Jqv1PUdGHgA0OorRZc=; b=Y7qhDsxODkmED5/iclHGmRKjzXvCf9xzUMqvQvxPxb0Onydlaiu581n//MQZUOcI3KAfhH 0zlbLCiM4OQ0QE/R/DwxEre1ZlpWfhCt7YsgkmQZsoQztphK55u4H+RNR0mRUxSVjrYZBa dM9bwSjWHdRPQCFIz/F0GmP1VZ9VqESnaSBjwlZpDi1fLJXHzoYImUaIoHq+uXHX86E7NJ iaB6/5DZcObfpC8yd0QHPrbp7yVd+4MYhmMfj2D3JxEtBsVSfH7Hc/sLjZ4vBr3A3rEagK 1huaDGpaOIyUKk+1q4Yec8+sUxBj88YNrh4zJIpFf9EgGJ6brl3veT+H04BnJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vldq25Nsbz1315; Thu, 23 May 2024 19:42:06 +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 44NJg6Xj082446; Thu, 23 May 2024 19:42:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJg6SA082443; Thu, 23 May 2024 19:42:06 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:06 GMT Message-Id: <202405231942.44NJg6SA082443@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: acb7a4deb21a - main - mqueue: Add sysctl for default_maxmsg & default_msgsize and fix descriptions List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acb7a4deb21a4cdfbb9bbf703b42a377450b9fdd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=acb7a4deb21a4cdfbb9bbf703b42a377450b9fdd commit acb7a4deb21a4cdfbb9bbf703b42a377450b9fdd Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-12 10:30:46 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:45 +0000 mqueue: Add sysctl for default_maxmsg & default_msgsize and fix descriptions Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/kern/uipc_mqueue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 7779d8877337..2efdfc9dd04c 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -200,14 +200,18 @@ static SYSCTL_NODE(_kern, OID_AUTO, mqueue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "POSIX real time message queue"); static int default_maxmsg = 10; +SYSCTL_INT(_kern_mqueue, OID_AUTO, default_maxmsg, CTLFLAG_RD, + &default_maxmsg, 0, "Default maximum messages in queue"); static int default_msgsize = 1024; +SYSCTL_INT(_kern_mqueue, OID_AUTO, default_msgsize, CTLFLAG_RD, + &default_msgsize, 0, "Default maximum message size"); static int maxmsg = 100; SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmsg, CTLFLAG_RW, - &maxmsg, 0, "Default maximum messages in queue"); + &maxmsg, 0, "maximum messages in queue"); static int maxmsgsize = 16384; SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmsgsize, CTLFLAG_RW, - &maxmsgsize, 0, "Default maximum message size"); + &maxmsgsize, 0, "maximum message size"); static int maxmq = 100; SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmq, CTLFLAG_RW, &maxmq, 0, "maximum message queues"); From nobody Thu May 23 19:42:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq409tnz5L9Qr; Thu, 23 May 2024 19:42: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 4Vldq36G76z552F; Thu, 23 May 2024 19:42:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wuCsOTIwVTzuUjnpjcnYctPWW72CpV68+9vn1s0RKZo=; b=EEU2Q4w6ohlDYLooYYxb5Up+Juxooxp/Rh8GM1H2jEqaij4OSiOidGgDSgDLC5GkQukve8 2dZUTVJLfM2/BFpxrfONPlHBPONsnsdSSeHxb4pmBzKTrvt/KnD5YXV0qlRlgs73nUyM7q 90hnKr8IEMiiTRlSJ/y2ggdvLRpt4tZdu1VQfWnxKVpDdZJiCNv9SNdxGz7h3u8L8vpioX KfPv9RwPh/3hFogjhifX6+rjx0e9HlfwElx6D2LOkbV+QQI0eeYHHMJum998/6hljL8fRP ZDhCQnG983cbd9GtG9QYFjsvuLvbbiLu9NJjyD95l2ole1NjTe95pufMr25G3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493327; a=rsa-sha256; cv=none; b=x+jFw/H8gEYc7JYJw2/WsJpUEjRvzOrOxMrBcUB7ZGrg6BzwDuvS89JB8eDazrUJ95gieZ asplXP/OKyAapQ7Z1E5noQ/Kuiz5o7d9Wr565fpY616mAGMABBLCrPO3wMzlB0i57pdBai wIDxItcXAPPbQ5LGgsd+X9G3JN9J/UsDI7Pe08ZrZDsRsxMxBuMOCK0OaxXuGAjNZ+ldGS uyDzQdMLxA3G1Kzcm5KJZkBVXg0s4b5d88Yn1//PrqlUAV8Q2qm2mTpuVen/IaOd5IjXa0 JIxwE0+4cPeitI+VjMkfoQZh6yiQl1E+rt1QJowhIh76d27c2GEz1nozhWhnYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wuCsOTIwVTzuUjnpjcnYctPWW72CpV68+9vn1s0RKZo=; b=csxXi6WWuQRoIdji3w34FL4FNatabR+e5Z5Z4PTyWpTO+L10Cb5P8mmQqssNgHHdKIiz9O FPoi6CLJU380kaQaVtSdJuFScNZHWo0+eV181yYvZoufBXMvrltmcZsyH+cr871qzkHEjA jepCfiFlq+e+A+pOs+srcUicRTKgyQbN9g+lu7WgB0gnUSsQVbsOB7LZK580G+kNm6txVT xHbX40QLfNwiX9TKkPOTP1Cobqv7XbtTth2Wb6+hIDrPg0iu8gfh08SO/CkBaFivqCG2X1 PvzJ3AArON9oRthQducECalSjVvIm8drYTgavzHoY02WPZldegS1NJWiIoIFyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vldq35syRz1317; Thu, 23 May 2024 19:42: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 44NJg7Kk082496; Thu, 23 May 2024 19:42:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJg7re082493; Thu, 23 May 2024 19:42:07 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:07 GMT Message-Id: <202405231942.44NJg7re082493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 04d3f8e5396e - main - linprocfs: Add support for proc/sys/fs/mqueue/* List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04d3f8e5396edbef0e1d97e9866813163b0c6381 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=04d3f8e5396edbef0e1d97e9866813163b0c6381 commit 04d3f8e5396edbef0e1d97e9866813163b0c6381 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-12 09:49:36 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:45 +0000 linprocfs: Add support for proc/sys/fs/mqueue/* Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/compat/linprocfs/linprocfs.c | 107 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 617eb122291c..c5b6ec9b32c1 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2220,6 +2220,97 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/sys/fs/mqueue/msg_default + */ +static int +linprocfs_domqueue_msg_default(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.default_maxmsg", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + +/* + * Filler function for proc/sys/fs/mqueue/msgsize_default + */ +static int +linprocfs_domqueue_msgsize_default(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.default_msgsize", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); + +} + +/* + * Filler function for proc/sys/fs/mqueue/msg_max + */ +static int +linprocfs_domqueue_msg_max(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmsg", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + +/* + * Filler function for proc/sys/fs/mqueue/msgsize_max + */ +static int +linprocfs_domqueue_msgsize_max(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmsgsize", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + +/* + * Filler function for proc/sys/fs/mqueue/queues_max + */ +static int +linprocfs_domqueue_queues_max(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmq", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + /* * Constructor */ @@ -2378,6 +2469,22 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(dir, "shm", &linprocfs_dosysvipc_shm, NULL, NULL, NULL, PFS_RD); + /* /proc/sys/fs/... */ + dir = pfs_create_dir(sys, "fs", NULL, NULL, NULL, 0); + + /* /proc/sys/fs/mqueue/... */ + dir = pfs_create_dir(dir, "mqueue", NULL, NULL, NULL, 0); + pfs_create_file(dir, "msg_default", &linprocfs_domqueue_msg_default, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msgsize_default", &linprocfs_domqueue_msgsize_default, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msg_max", &linprocfs_domqueue_msg_max, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msgsize_max", &linprocfs_domqueue_msgsize_max, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "queues_max", &linprocfs_domqueue_queues_max, + NULL, NULL, NULL, PFS_RD); + return (0); } From nobody Thu May 23 19:42:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq514Glz5L9tK; Thu, 23 May 2024 19:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq508fMz557H; Thu, 23 May 2024 19:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/sUBjn32/aqHZCVyXzL8t/wKJUfUaAO2mVXqLoMKov8=; b=JnaQMwBW2WdAIPzok+ubdtk5Vky5ds34McM0EkDJ9Zh2tWNsHU2WgqL5X5fb9sLne6+1lN GafulQq+cCtDO/bSaZfGh8rhI7a2rULRqFoe7xrxlg/KlsroCCTk4+GvUHUaJ1ho7rRsbK HZ+XAu5xweKYo1XxMkQtI++LomFk9jedlpBg7ot8mEcPMLvVevNrXqMK5j0n+NuG9HhxLt xEYu/a83ubnIcVzrVkYd/qMJl9n+5BppNlZan7FY7VSk1eNOreEeWxNzwPmZYLSOsOd90e KRd4JIEIwgTiGnBoKeMdulxf5eda+eQ/2HfV8bjyyF+N+/zs633kIsPN9yx2PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493329; a=rsa-sha256; cv=none; b=yko9mgr82HdUBVSSF2F2j4VciNSHCm8hIDJujRkl/TOhDWYrbfwFxIaESxpQ+lM/hy1xNg buIxPIU5XIKkMBMC5AfkmnJ4/Kecwg9++vpzQUuRy1KQmBaJtBAaqy/cK5uwu+ZY+gZG0R 7F1YMfD36kwFrvjZ3lsX+C4R4An1iq6GokvnnFdR1vnvNJ/GtiluRBAYRc6j21PUTWzwlS EJoXdlWet/7CYHDwjdU1qD5SN70a1ui3sQ8257ff1LBrBI0ano6oxh2m26jL1u/FfbjDQw 2z8ruTcHU94w422rWo9YVJCGqQdW5WrOTaHSMzbrLpTY0EQ3RfsoRZd9Si3a3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/sUBjn32/aqHZCVyXzL8t/wKJUfUaAO2mVXqLoMKov8=; b=HQe4PdNT4XMbqzLtUJXlf9Q5tdARe90JyQiIkjh5zNsckptPA6OGUg4/qeY73cFHPZskjG zz2TeoRrYFMPntSrIJcZh922Vl6ZG85PjYqkZzKOjv4CRyyAjlysuRhQkAwY8+GO/N5X8T yX+6RDFJCP4ZKo+XD26Q/7+4JtUgsj9MHsM9cWuApOO4C2kMj+arWu85uvNuYCv2rJeLfO pL/DJ6PMgj8Sduj3kWTLxB9lHi5pB+y6Ja3UdJUA+laeJI+ENzPgy1rw/cg15NM+nO0mPx u9WVCiXiAaTMvv9vXm/6/H+5Vj5+tgzDKoxxWKuD06AexD2XeEuzaNgF912GPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vldq46v5Yz131B; Thu, 23 May 2024 19:42: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 44NJg8oO082553; Thu, 23 May 2024 19:42:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJg84L082550; Thu, 23 May 2024 19:42:08 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:08 GMT Message-Id: <202405231942.44NJg84L082550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: ddbfb544c6c9 - main - mqueuefs: Relax restriction that path must begin with a slash List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddbfb544c6c9726ae97bcaf105d11dec8b292877 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddbfb544c6c9726ae97bcaf105d11dec8b292877 commit ddbfb544c6c9726ae97bcaf105d11dec8b292877 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-15 20:56:15 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 mqueuefs: Relax restriction that path must begin with a slash This is needed to support Linux implementation which discards the leading slash when calling mq_open(2) Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- lib/libsys/mq_open.2 | 4 ++-- sys/kern/uipc_mqueue.c | 34 ++++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/lib/libsys/mq_open.2 b/lib/libsys/mq_open.2 index 484fe95432da..4800ab18de59 100644 --- a/lib/libsys/mq_open.2 +++ b/lib/libsys/mq_open.2 @@ -35,7 +35,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd September 26, 2023 +.Dd May 15, 2024 .Dt MQ_OPEN 2 .Os .Sh NAME @@ -322,7 +322,7 @@ Support for POSIX message queues first appeared in .Sh BUGS This implementation places strict requirements on the value of .Fa name : -it must begin with a slash +it may begin with a slash .Pq Ql / and contain no other slash characters. .Pp diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 2efdfc9dd04c..9276c918565f 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2007,7 +2007,7 @@ static int kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, const struct mq_attr *attr) { - char path[MQFS_NAMELEN + 1]; + char *path, pathbuf[MQFS_NAMELEN + 1]; struct mqfs_node *pn; struct pwddesc *pdp; struct file *fp; @@ -2027,32 +2027,37 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, return (EINVAL); } + path = pathbuf; error = copyinstr(upath, path, MQFS_NAMELEN + 1, NULL); if (error) return (error); /* - * The first character of name must be a slash (/) character + * The first character of name may be a slash (/) character * and the remaining characters of name cannot include any slash * characters. */ len = strlen(path); - if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL) + if (len < 2 || strchr(path + 1, '/') != NULL) return (EINVAL); + if (path[0] == '/') { + path++; + len--; + } /* * "." and ".." are magic directories, populated on the fly, and cannot * be opened as queues. */ - if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0) + if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0) return (EINVAL); - AUDIT_ARG_UPATH1_CANON(path); + AUDIT_ARG_UPATH1_CANON(pathbuf); error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) return (error); sx_xlock(&mqfs_data.mi_lock); - pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred); + pn = mqfs_search(mqfs_data.mi_root, path, len, td->td_ucred); if (pn == NULL) { if (!(flags & O_CREAT)) { error = ENOENT; @@ -2062,7 +2067,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, error = ENFILE; } else { pn = mqfs_create_file(mqfs_data.mi_root, - path + 1, len - 1, td->td_ucred, + path, len, td->td_ucred, cmode); if (pn == NULL) { error = ENOSPC; @@ -2134,23 +2139,28 @@ sys_kmq_open(struct thread *td, struct kmq_open_args *uap) int sys_kmq_unlink(struct thread *td, struct kmq_unlink_args *uap) { - char path[MQFS_NAMELEN+1]; + char *path, pathbuf[MQFS_NAMELEN + 1]; struct mqfs_node *pn; int error, len; + path = pathbuf; error = copyinstr(uap->path, path, MQFS_NAMELEN + 1, NULL); if (error) return (error); len = strlen(path); - if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL) + if (len < 2 || strchr(path + 1, '/') != NULL) return (EINVAL); - if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0) + if (path[0] == '/') { + path++; + len--; + } + if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0) return (EINVAL); - AUDIT_ARG_UPATH1_CANON(path); + AUDIT_ARG_UPATH1_CANON(pathbuf); sx_xlock(&mqfs_data.mi_lock); - pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred); + pn = mqfs_search(mqfs_data.mi_root, path, len, td->td_ucred); if (pn != NULL) error = do_unlink(pn, td->td_ucred); else From nobody Thu May 23 19:42:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq64KFsz5L9tM; Thu, 23 May 2024 19:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq61Bq3z559t; Thu, 23 May 2024 19:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQk63XVGbeSeUAvWYUvsUbrg6z2AjLAmw7XjnI2iNGE=; b=dkz1JdSyRuLRM3jb6qvl2D/DJxsedGnixVcAltLngL59zCYEep9Ty39/HuhGskXbik8awM jfo8p3rgSdhm/K8DNyZzVOtFHKotm5QhhMUIqFIpVe8HDfeZSuf21e6V5lQznKvXKBd9hC WTT6pVANAfyTgKXDP+u6UzniT1Rp4mYkYmfXQv1dsdyc5L38tJdQN9rNve1Q2KAjaZH0Z+ KNb8IGySgF8YWDRcJLhXhIBBaOhsIefuHFY88BTepZF1dTnFEjf7g5dHDCUCZI1TnFWrdt INPelJLQmETMwxGYp1yOHQQ37ODRR2RGdekOMvw1FsSYXgJHXU7O5P73q/N12w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493330; a=rsa-sha256; cv=none; b=gq3ZNVdohUyHbm35HkM/S2hbEaZmLSeG4KT0LVXReGGzai/b93nh2x0Be/vU5NNBRCkhfb acPC40PlszcjVNhLbGpenieefH0GGyHzoVcYBkE05Cuy96LDJdE6ntfFGFs4PjwihluFws PKPOfXzF1bR1b5Cj8tlrYuoOt14sOn5MOwePPWTjyXMUM/80YYTalaa773e3CbUA0goT8l Z/pZhLKfzmcgm1it5zUbItf7UDecXwS8hKrcpzW5qYjCEBgR/o+b9GZAnPxopnv+VSFEZy HyGtd32zpmQXABydKfNZ2y4GeFykYxrepVoPI/W0u4yW2dnfrL8tFh1xXGMcDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQk63XVGbeSeUAvWYUvsUbrg6z2AjLAmw7XjnI2iNGE=; b=QUjZDZsLizJJ962CjoNjrpGtNhh1niJNLYL010LFR572fPjOtBqTHqbyEIAgIuHGb4kmgH 8lOnMHj3dWdHroJj+HJ1yXo0fTpRRc1zGKlMICHCGXdBgWhTd71uvdYJuVGZeyyqX2mwEE V8Uw/k69y75LOA7+e/fch+mI0174ZIDRaKrEH4aMjdoejG9p82oBMER7/5GsfdZOIqEzyb 3CldJ58X2vRd8r68AUbZUVe2eufhgGQYQXLyXHm2bI8slbjxDhDA9ZjEHU6W4Sg3fPIBly BN/+4k+X2GlkeFQLU535zCv1aPqwLC/juPKUkA0FrPI83/hdoJ439k9ibVtQrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vldq60nTqz12Sy; Thu, 23 May 2024 19:42: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 44NJgA3A082595; Thu, 23 May 2024 19:42:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgAKW082592; Thu, 23 May 2024 19:42:10 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:10 GMT Message-Id: <202405231942.44NJgAKW082592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 427db2c45eb3 - main - linux: Fix linux_mq_notify_args & linux_timer_create_args List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 427db2c45eb3a6e362e0ce2804dd9abd2e6909a4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=427db2c45eb3a6e362e0ce2804dd9abd2e6909a4 commit 427db2c45eb3a6e362e0ce2804dd9abd2e6909a4 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-15 21:09:38 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Fix linux_mq_notify_args & linux_timer_create_args Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/amd64/linux/syscalls.master | 4 ++-- sys/amd64/linux32/syscalls.master | 4 ++-- sys/arm64/linux/syscalls.master | 4 ++-- sys/i386/linux/syscalls.master | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 10084b53a1e1..fd08c9b0279d 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -1296,7 +1296,7 @@ 222 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1428,7 +1428,7 @@ 244 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp, ); } 245 AUE_NULL STD { diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 6b40a89db66d..92d5f09c423f 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -1402,7 +1402,7 @@ 259 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1538,7 +1538,7 @@ 281 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp ); } 282 AUE_NULL STD { diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index 61c7499d57b3..79c04c398e00 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -661,7 +661,7 @@ 107 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1107,7 +1107,7 @@ 184 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp ); } 185 AUE_NULL STD { diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index d0ba99861153..958336be0f08 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -1420,7 +1420,7 @@ 259 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1554,7 +1554,7 @@ 281 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp ); } 282 AUE_NULL STD { From nobody Thu May 23 19:42:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq72vSWz5L9fK; Thu, 23 May 2024 19:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq72LKxz54xj; Thu, 23 May 2024 19:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vzuiyiHsT6KuQ7TJYiT7c/xHQvEoKvCDs/nJ0DFSQG8=; b=PSs/sCE46Vw/lClv6Vs5XLR8rfccpwWd3X5TqptQ2jNhrvUqs1iubiKkN8+Ud+9jK2g8Z0 uMhg0+IZYntNfII9+ZE0BkA6ij3PTAzybGLCEjobLtkS+IWOL6TimudD1QDsiLriyV5OKu sZe10OQyuWbl9Dl0JMoCYHd2sY4ZGGEXW67C0doeA2jGHbsYrmhSqKq/mao3UmLSUf9oa7 xRODK3CFduYVmtj7y8r+V6Xp5SbpqFZ/FkBMTeLOLoVYJJkfrihThTAwu921dGNScGtd2L no9pSuqwbSrBQIAwHPOHtYVIDbESYzoSHq+ZZ4MdDh/QqPaRU0sWsKi1dyrW4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493331; a=rsa-sha256; cv=none; b=c1n3LyN5FFKRBLWgYPM7lXvsWaybxliLLjf1nxt+/Ta1+P8a08PoD5cro/jUL2sLHl2c9R BHQZg6yAvmgwC5dOP2lS5OeqSm5HwsGj6VprjD/gZGmUEWgmTBY1wClHQ3rKOLmoXpjAKR wCqJI/GDoqcIknIgaA1Ij8TZkHsu2UNvnbg5hsZpmf9tU+L+Q3XA2j6FCPC07QofVu8EUY B6B5eBaPnNriTYd5fFoVYuTF15HJmWZc3Wy7ytfpJfZDoMXku/LllVWeQYbqz3RkNcW5Hf ISF9H04IwvMaC+FZnQzu1f24RVxjYGAL+tWnnUQ+hYnzrIewAoH3Gls0PR5iEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vzuiyiHsT6KuQ7TJYiT7c/xHQvEoKvCDs/nJ0DFSQG8=; b=Sl6urNaYIsyryp1xES/rR0g3c0R/WLhYzEQoJLLRESvFGi9YkfNFYZBszrjkBdtwmfFEOF t76i5958pgNK5Im+Ku1+mgzmMqn5VKv5/KOcXI/lTUWBFQGBlYhq9A4L85XrnyDyPZ8H+B twaWrulic1jU+65uWSCDJbqEmxOgsFg/lPlrSTUgjP8el0BGukdy9pXqaN6WIDQGTZPsOy xYM01k3NscJt00wUBIiRGWv1A5R6yCLya8zWjj8fIEoAIEJ1z34ccdslv83jSP8pUoNR4z ez+dAygL2uC2bXVfDOqNbUXt1WgZbPrj5lvCJ9OpCn0SenH1WaFiQKwCZQlH/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vldq71jv1z13GX; Thu, 23 May 2024 19:42:11 +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 44NJgBOk082631; Thu, 23 May 2024 19:42:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgB2W082628; Thu, 23 May 2024 19:42:11 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:11 GMT Message-Id: <202405231942.44NJgB2W082628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 9c7b1bf27122 - main - linux: Export linux_common_openflags() List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c7b1bf27122f975ea70c81931d48b751f8a1bfa Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9c7b1bf27122f975ea70c81931d48b751f8a1bfa commit 9c7b1bf27122f975ea70c81931d48b751f8a1bfa Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:08:24 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Export linux_common_openflags() Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/compat/linux/linux_file.c | 2 +- sys/compat/linux/linux_file.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 1279490ae8be..5f510004c684 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -104,7 +104,7 @@ linux_creat(struct thread *td, struct linux_creat_args *args) } #endif -static int +int linux_common_openflags(int l_flags) { int bsd_flags; diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index ce9feca154ed..2e56942b0f40 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -197,6 +197,7 @@ struct l_file_handle { }; int linux_enobufs2eagain(struct thread *, int, int); +int linux_common_openflags(int); #endif /* From nobody Thu May 23 19:42:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq8404tz5L9fL; Thu, 23 May 2024 19:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq82kdsz54y5; Thu, 23 May 2024 19:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=89afMdWuQmy8o1ixs8h0tPwdB82A81dFH3qpf26kolo=; b=REoKMnH8wdIOIssDhWtC5Wxv12ziiWT86HkFmQlXZDAiCUOFYjsTNcMr74+n2RdS5j8VCU oygW8g4BUpSOylNkK/6IJiSzRZ/31pncfWaxAs+ondgVRsngpYYRgQ3bvtP+CtOcSIBq6r 9cog6K8oJsuIkgooVMHwnTXMZ1vbuN4zLkSRBYRVd0RCi5ia+IceWDprBUvrfBtyy7/JSQ MovZjoGgupBcdkwBZUqMWYJCtpLF0hsjNu0WQULEXRjdXxpbDK3ZnZrHwd8b76Lg+XUTtk 2Jxq3IyX7YIXcNa1msyPhCuR7oSCkftSZkvog7hi+BJVwumbG3LNitMTi4Cfdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493332; a=rsa-sha256; cv=none; b=e8psJA4F61UY5o8iHUa1bOulWq1l2jVDHQvUnNMvc0uGd1/xTd55LZTXeE8G3bW9ER/sK7 mKYEvJwCLeVT3UrGD4qdZ2PxySVRzp/slwlK1f3OxFLewjJTLecYv8I4jyxFNE/NbG5cNA TLZxjDeCWputqKTYHPOLl+P3sESRaLXbTZGcSZjdMUf1n8yxED3SdP5kOF9PnRFKqjKbgx JZxTsCfjDGr8eW5ocvIIF+SH716pyiOzGdY46uYM8UHL+VbTZ5nImX/SmrW0Y7WR5Bh63O 2kUxxbjjz0rCx3E8NCUuTzqt6KyDP1Kpsu+Yzu7TelNxSlaWSKQKSFe4N4Yvjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=89afMdWuQmy8o1ixs8h0tPwdB82A81dFH3qpf26kolo=; b=xyRYdrpEuUaNybtM291JHEBcZSUGEZfQ2HWAK1En6JoISc+ljARd11mTvQB07aR47HqoqK 6XS9k1b6DTVLSGGRFIjtlLpBxS4xonaOY+PuNCstx9v4C5mRxgtTwcNILnZsuKrKOn5ukQ XZu/8PdznxBW38bsQopPRPN4XkZdCmuf4uxjPOQ8aszpPk7mAGB/YkoIB0UHsZX4h4YXdx fFlHTJ+ZRwLOwc1aypurzcFJbrOMNua6jrEvfoL95FTwbgaMT18IaE85BJZ9pRfU5kOo8M Dzc2RUQqs/p+DC7I/ieYmAHQsIqwT3U95/J7VD+9re8HT6j5LwDcRCFfWx1qzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vldq82L85z13GY; Thu, 23 May 2024 19:42:12 +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 44NJgCtu082672; Thu, 23 May 2024 19:42:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgCAI082669; Thu, 23 May 2024 19:42:12 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:12 GMT Message-Id: <202405231942.44NJgCAI082669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 86e43b5def1b - main - linux: Export linux_convert_l_sigevent List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86e43b5def1bc1c94d40b809ab8c8ff0259735ff Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=86e43b5def1bc1c94d40b809ab8c8ff0259735ff commit 86e43b5def1bc1c94d40b809ab8c8ff0259735ff Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:29:03 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Export linux_convert_l_sigevent Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/compat/linux/linux_time.h | 1 + sys/compat/linux/linux_timer.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_time.h b/sys/compat/linux/linux_time.h index d99684db1cbf..bb23105f4f23 100644 --- a/sys/compat/linux/linux_time.h +++ b/sys/compat/linux/linux_time.h @@ -137,6 +137,7 @@ int linux_to_native_itimerspec64(struct itimerspec *, struct l_itimerspec64 *); #endif +int linux_convert_l_sigevent(const struct l_sigevent *l_sig, struct sigevent *sig); int linux_to_native_timerflags(int *, int); #endif /* _LINUX_TIME_H */ diff --git a/sys/compat/linux/linux_timer.c b/sys/compat/linux/linux_timer.c index 2188006ec38f..ed9133359302 100644 --- a/sys/compat/linux/linux_timer.c +++ b/sys/compat/linux/linux_timer.c @@ -43,8 +43,8 @@ #endif #include <compat/linux/linux_time.h> -static int -linux_convert_l_sigevent(struct l_sigevent *l_sig, struct sigevent *sig) +int +linux_convert_l_sigevent(const struct l_sigevent *l_sig, struct sigevent *sig) { CP(*l_sig, *sig, sigev_notify); From nobody Thu May 23 19:42:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq960n8z5L9TM; Thu, 23 May 2024 19:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq93RLXz55Q3; Thu, 23 May 2024 19:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FIL8E/0gOsibB6bUvKofQc5PKWAJWQy7dFZwG0m3Mk=; b=RSON6QUFvgp+l6mI83PvmrdQpH1Pqxj+1wmc/qLulaHQRuzjRsBEVs55WbgBlWRfQql7Ph C+yMX10v88ch6BTOu+OASPo1wTv2JLvcv4SdBo3oNfv88KMPNLwUGoQ3jKw9ekdA0UwvmY pbdfGb6byzAaUyGxiYH+Y8TeWt16lIUdvoT6hpQIxJpRZsnzAEatwdq+c4RnXaCD2RUKdn W30fsr0fXG/EqY5w4XRD9gJ/aGbWXTLGxfaGYJVTf1YBxvTp/KiriutUl6lIajuKlGUDfO SgvsJm7nOFl/0FD9Gm20XmNNLIHX/L+8nYMdJ1VPE73gd7bqccVChuJfM4NaGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493333; a=rsa-sha256; cv=none; b=XPR1808xznKmNvi2Z/JXhEGHue64xRvAkUCHcOQYMWehbVZhFl7JPsUyyHPbDsPScNdStA z5r6yHInjv3E2t/JOQb420o0zBTpzQahag4bN5HAAnYBG6toX+QH15yaIIjJCoQTfFIT7j G7zL8ZLR64gMZhVZhRxuGBui7cw2ITKffmUK2tLmkGdPdhaWZK7v+nXQzLUwHSII6cU/P0 iEMzFSRWH+VkrmnVfSaRD7IEwDW173pVk4VsWe5YmVYHs2mpQi9jjusvk5+lXV8QsncGB5 DRoWzy5IbZ60AykaaJe+UXR6GyFW8bDGPYuSmsuwiUeB3grx/t7QfMf7HhU8XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FIL8E/0gOsibB6bUvKofQc5PKWAJWQy7dFZwG0m3Mk=; b=BoOPKvYEXbwjpXQl0+J5uKnqWbCWzOjqhKpkvBV1HvTpMvI5pO8PgpUasfIMc1BzkWOnxT myVVEITk7u5UijmGUblrcLBQnYX4XBsit6SblSSVFCVyeem5pib23bS6mwq9QcsoEqJoT7 fIvx6w8u+35I0ReKUT8e8mMCmC+e9czUHiL9BbhYHnERQh6HW3btB1VdeGf6NBj/5aifAp wr3yTX5W6t61GnbU75+ehuP3/6BfEztsQGuGrSrz/mKHkVNlSxXbYnNcEVSSAD7FEjGryn rQ4UamhKJt9rrcZhscXJalFSWZ3zHPFvx+IAuLOs5wzHi+EN+mtZH1dXqj7eNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vldq933MKz13Gb; Thu, 23 May 2024 19:42: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 44NJgDNf082732; Thu, 23 May 2024 19:42:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgDk4082729; Thu, 23 May 2024 19:42:13 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:13 GMT Message-Id: <202405231942.44NJgDk4082729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 289b2d6a7980 - main - mqueue: Export some functions to be used by Linuxulator List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 289b2d6a79801f44adc787728cfc8219d39ec076 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=289b2d6a79801f44adc787728cfc8219d39ec076 commit 289b2d6a79801f44adc787728cfc8219d39ec076 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:31:16 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 mqueue: Export some functions to be used by Linuxulator Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/kern/uipc_mqueue.c | 6 +++--- sys/sys/mqueue.h | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 9276c918565f..b48abf8788f6 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2003,7 +2003,7 @@ notifier_remove(struct proc *p, struct mqueue *mq, int fd) PROC_UNLOCK(p); } -static int +int kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, const struct mq_attr *attr) { @@ -2223,7 +2223,7 @@ getmq_write(struct thread *td, int fd, struct file **fpp, fpp, ppn, pmq); } -static int +int kern_kmq_setattr(struct thread *td, int mqd, const struct mq_attr *attr, struct mq_attr *oattr) { @@ -2329,7 +2329,7 @@ out: return (error); } -static int +int kern_kmq_notify(struct thread *td, int mqd, struct sigevent *sigev) { struct filedesc *fdp; diff --git a/sys/sys/mqueue.h b/sys/sys/mqueue.h index 50f6681ce218..78f34c197c7e 100644 --- a/sys/sys/mqueue.h +++ b/sys/sys/mqueue.h @@ -38,8 +38,14 @@ struct mq_attr { }; #ifdef _KERNEL +struct sigevent; struct thread; struct file; extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); +int kern_kmq_notify(struct thread *, int, struct sigevent *); +int kern_kmq_open(struct thread *, const char *, int, mode_t, + const struct mq_attr *); +int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, + struct mq_attr *); #endif #endif From nobody Thu May 23 19:42:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqB5Trlz5L9Ww; Thu, 23 May 2024 19:42: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 4VldqB4Nyqz55FD; Thu, 23 May 2024 19:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjOcFcyzPaPEQgMvKqgfX0eZwOfDd6OW6oYEMe5fYZA=; b=ulDUYAzzdMy21JggiFsLovBNROeMuRkErkoO2HnpdbwyjaWy5MuDZh2zbI8q5GxH+9d+LR G26r/WbSebl/YUbXwC0HBo2AGR5j04tlp768O/paBYHE0sB9PCwHrKKhpMrg9IrbHW6PNE 6SlKWIh1HMJedDeZA/R1lyRjTN96q5rNjsFDqyhtbs+c4CRKCl4AaiBg/3mZs6z/0xNIaX vB4TTGY1lfeumAypcYMDjA5OgccWTdz14cSR6qDwLeS2jsoC052ZVZU0VJmQ0bRDQ7YYeI DthhlxhZfzlcLCxAy3OGnbP6lrByuCe1Yxo0t4O+wuHgrsboAAlqqAiT7Srb3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493334; a=rsa-sha256; cv=none; b=rOKaYGLshaHTQ0xOsLCCeQm98q+Woi04K/WnpcB42+fih2vxUAjnKFJyVQVHMH5QKH6dmr 58sUEp3MeRcoaJKIy6bjGubRnp3YiSeN1+U6t7gKSaR0UM6iVHyx/8fP7ZQWytmQ+wqOSc QWLDiK/v/R8Eibuffl27jm1ayVIGGdpoM0UEEGNwfON6eddafFuScxYpzYxu60ibLR1wEP 1wTkoxU9ltjjcjD6jJKhUaSSkagO8nJdEGiZS1E0YZwrPAAeVYSrkNy7hmHw3AWl2YSx1Y EfPHG1S4I927qG1Ps+VCt6a/91jJIPF1CXahied6f3uopUdmxeu16nTImML6gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjOcFcyzPaPEQgMvKqgfX0eZwOfDd6OW6oYEMe5fYZA=; b=czCCluWScahBnUzXPzG5R10Yx/VslAwEcZOpilaPUECD/sN2zkUZtDScbXi6bFQqcVEglr l/CaUP7po3aOpNrweCw2EZI2lc/W8bXt7U3/HUr96Abqu1Fp18WYo9JFUqYkz74L0Mv1gG Mj+PPbXq1qt7Ja0bzmK+kbcr2BqOvzIzyNgWfoCtbhyA+sGeXWLduMkqZrBVEcBuUIrbyK eMiO/SSnDRGc92gRNmUcikmstYggDHyP9rUaUCBJi8xm3OcVu/wZ/9amzCSu7JZd88C+oo kYv4LTESt2B0qSWugGNksMQd5COw/oNJMn0DykcpHV7SfBN0LdoOF+GeUDXTEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VldqB41KRz12qG; Thu, 23 May 2024 19:42: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 44NJgEx6082774; Thu, 23 May 2024 19:42:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgEQC082771; Thu, 23 May 2024 19:42:14 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:14 GMT Message-Id: <202405231942.44NJgEQC082771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: e30621d58fa1 - main - mqueue: Introduce kern_kmq_timedreceive & kern_kmq_timedsend List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e30621d58fa10d82f3d4a89bb6b5572e2517b024 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e30621d58fa10d82f3d4a89bb6b5572e2517b024 commit e30621d58fa10d82f3d4a89bb6b5572e2517b024 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-18 15:19:39 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 mqueue: Introduce kern_kmq_timedreceive & kern_kmq_timedsend Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/kern/uipc_mqueue.c | 106 ++++++++++++++++++++++++------------------------- sys/sys/mqueue.h | 6 --- sys/sys/syscallsubr.h | 10 +++++ 3 files changed, 63 insertions(+), 59 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index b48abf8788f6..c0948d40c47b 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2275,58 +2275,77 @@ sys_kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) } int -sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap) +kern_kmq_timedreceive(struct thread *td, int mqd, char *msg_ptr, + size_t msg_len, unsigned int *msg_prio, const struct timespec *abs_timeout) { struct mqueue *mq; struct file *fp; + int error, waitok; + + AUDIT_ARG_FD(mqd); + error = getmq_read(td, mqd, &fp, NULL, &mq); + if (error != 0) + return (error); + waitok = (fp->f_flag & O_NONBLOCK) == 0; + error = mqueue_receive(mq, msg_ptr, msg_len, msg_prio, waitok, + abs_timeout); + fdrop(fp, td); + return (error); +} + +int +sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap) +{ struct timespec *abs_timeout, ets; int error; - int waitok; - AUDIT_ARG_FD(uap->mqd); - error = getmq_read(td, uap->mqd, &fp, NULL, &mq); - if (error) - return (error); if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets, sizeof(ets)); if (error != 0) - goto out; + return (error); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedreceive(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int -sys_kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap) +kern_kmq_timedsend(struct thread *td, int mqd, const char *msg_ptr, + size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout) { struct mqueue *mq; struct file *fp; - struct timespec *abs_timeout, ets; int error, waitok; - AUDIT_ARG_FD(uap->mqd); - error = getmq_write(td, uap->mqd, &fp, NULL, &mq); - if (error) + AUDIT_ARG_FD(mqd); + error = getmq_write(td, mqd, &fp, NULL, &mq); + if (error != 0) return (error); + waitok = (fp->f_flag & O_NONBLOCK) == 0; + error = mqueue_send(mq, msg_ptr, msg_len, msg_prio, waitok, + abs_timeout); + fdrop(fp, td); + return (error); +} + +int +sys_kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap) +{ + struct timespec *abs_timeout, ets; + int error; + if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets, sizeof(ets)); if (error != 0) - goto out; + return (error); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedsend(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int @@ -2801,63 +2820,44 @@ int freebsd32_kmq_timedsend(struct thread *td, struct freebsd32_kmq_timedsend_args *uap) { - struct mqueue *mq; - struct file *fp; struct timespec32 ets32; struct timespec *abs_timeout, ets; int error; - int waitok; - AUDIT_ARG_FD(uap->mqd); - error = getmq_write(td, uap->mqd, &fp, NULL, &mq); - if (error) - return (error); if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); if (error != 0) - goto out; + return (error); CP(ets32, ets, tv_sec); CP(ets32, ets, tv_nsec); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedsend(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int freebsd32_kmq_timedreceive(struct thread *td, struct freebsd32_kmq_timedreceive_args *uap) { - struct mqueue *mq; - struct file *fp; struct timespec32 ets32; struct timespec *abs_timeout, ets; - int error, waitok; + int error; - AUDIT_ARG_FD(uap->mqd); - error = getmq_read(td, uap->mqd, &fp, NULL, &mq); - if (error) - return (error); if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); if (error != 0) - goto out; + return (error); CP(ets32, ets, tv_sec); CP(ets32, ets, tv_nsec); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedreceive(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int diff --git a/sys/sys/mqueue.h b/sys/sys/mqueue.h index 78f34c197c7e..50f6681ce218 100644 --- a/sys/sys/mqueue.h +++ b/sys/sys/mqueue.h @@ -38,14 +38,8 @@ struct mq_attr { }; #ifdef _KERNEL -struct sigevent; struct thread; struct file; extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); -int kern_kmq_notify(struct thread *, int, struct sigevent *); -int kern_kmq_open(struct thread *, const char *, int, mode_t, - const struct mq_attr *); -int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, - struct mq_attr *); #endif #endif diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 6652619287ad..8ac3f55596e6 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -49,6 +49,7 @@ struct kevent_copyops; struct kld_file_stat; struct ksiginfo; struct mbuf; +struct mq_attr; struct msghdr; struct msqid_ds; struct pollfd; @@ -385,6 +386,15 @@ int kern_writev(struct thread *td, int fd, struct uio *auio); int kern_socketpair(struct thread *td, int domain, int type, int protocol, int *rsv); int kern_unmount(struct thread *td, const char *path, int flags); +int kern_kmq_notify(struct thread *, int, struct sigevent *); +int kern_kmq_open(struct thread *, const char *, int, mode_t, + const struct mq_attr *); +int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, + struct mq_attr *); +int kern_kmq_timedreceive(struct thread *, int, char *, + size_t, unsigned int *, const struct timespec *); +int kern_kmq_timedsend(struct thread *td, int, const char *, + size_t, unsigned int, const struct timespec *); /* flags for kern_sigaction */ #define KSA_OSIGSET 0x0001 /* uses osigact_t */ From nobody Thu May 23 19:42:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqD0Jlkz5L9R1; Thu, 23 May 2024 19:42: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 4VldqC4tPSz55Vx; Thu, 23 May 2024 19:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6/0oavsWMItGCsgtit3DY70gIOSFtqrIgoOAscdAHEM=; b=WvQlfuvMyV5ylZx5mJlqV33xYBLG1AAB+YlihtQLzVMqzgplToIaeI+2pwR5BrEMsK7xGL 9qc/g+ch1aV65pi+n9qgQEAsv1BN3x2fba6lmx+O779gTz9l8o1GCRWG5MVltt8PuiS5RK HwKwY7omoQtW8Kn2NhES/nlWi8AiCNCqN0+ugjxysB/5YXrKcVy+8e3Odk1sVaPCDeKZ6f 1x70mMI3ePFipU6zvSVgLmjTYIyCvMAwqoDfeBW6DYOAw3Ru3UYhZ+Q1I4EzADZ8SHHYt8 zMD3PnHAOYlOXufktFje9yg+XN8JsbvOdw1yZVeoQABmu2nx6ftbHcK5xD4+2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493335; a=rsa-sha256; cv=none; b=JMeML5zlI4uXO2mCRWqCFOt1++HqHhngv3os8twJIAYkahCjSgYhuN3EqXQxeiLMJY73Ds DjXG42XBgwtEVuCOAsfkzleKGWXLGpHi7uTE2sni+Fg3ghAR7OXma9vnp8mIJK1rZzqRU2 mUvgJ+X9fjS37LqqIeV2oWIdZeDgyPmwW59+EwunnigUax6MHak+uaXbARJbyF9xnfJ2XT 8tiaFyY1SD0RAkDXZ2DMHGA0sTiT4vHw6hF6G34ToQ6XY54ufn15H9OV80jOueaW735YAs eG3EArYHXDyVdCy0G4H25RZHqY5KzJxURPh9Xb0UiuXSLJo6cKNXSc05lOvX2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6/0oavsWMItGCsgtit3DY70gIOSFtqrIgoOAscdAHEM=; b=Bkw/YlgyBiXXKqjfvGWiNv1XYWwZo66PTw/e4K7rb2NJ8awU9K6I/lFUrl+n8yqMKdurdt fLhXT7J110yQrcnJPDwgf1Ng22MqTLZ9fjV68FecPiWfaHnNeiQe1SjwjmCZO3QC7sWEVf 3bp353IDPJNXHipQetyk8wU03Lnjs++6Y2WGKdnGfATRbBTpMmc8n5lG9G01v5pETQ5Iuf LHOShr3LSIJf/Nq4sH0e9acKRg0pL0VqzrtLOjn/8Pav4Ybl7tmpTmbYLj2feweex5zWbm ne9IqNUSdT7Lk4IFkJjQSrooMO/Yf554kFngYk9Pb8zc9d29QkndqDC+t+B2lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VldqC4SBgz12kw; Thu, 23 May 2024 19:42: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 44NJgFA2082817; Thu, 23 May 2024 19:42:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgFKq082814; Thu, 23 May 2024 19:42:15 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:15 GMT Message-Id: <202405231942.44NJgFKq082814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 97add684f530 - main - linux: Support POSIX message queues List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97add684f5306ebf93be238a0340597ba1898d0e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=97add684f5306ebf93be238a0340597ba1898d0e commit 97add684f5306ebf93be238a0340597ba1898d0e Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:31:49 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Support POSIX message queues Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/amd64/linux/linux_dummy_machdep.c | 6 -- sys/amd64/linux32/linux32_dummy_machdep.c | 6 -- sys/arm64/linux/linux_dummy_machdep.c | 6 -- sys/compat/linux/linux_misc.c | 124 ++++++++++++++++++++++++++++++ sys/i386/linux/linux_machdep.c | 61 --------------- 5 files changed, 124 insertions(+), 79 deletions(-) diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c index 759586d9f1fc..53bdb8099578 100644 --- a/sys/amd64/linux/linux_dummy_machdep.c +++ b/sys/amd64/linux/linux_dummy_machdep.c @@ -56,12 +56,6 @@ DUMMY(io_destroy); DUMMY(io_getevents); DUMMY(io_submit); DUMMY(io_cancel); -DUMMY(mq_open); -DUMMY(mq_unlink); -DUMMY(mq_timedsend); -DUMMY(mq_timedreceive); -DUMMY(mq_notify); -DUMMY(mq_getsetattr); DUMMY(readahead); DUMMY(restart_syscall); /* Linux 3.15: */ diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index c2206c81c528..1476d39b9c35 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -55,12 +55,6 @@ DUMMY(olduname); DUMMY(uname); DUMMY(bdflush); DUMMY(ptrace); -DUMMY(mq_open); -DUMMY(mq_unlink); -DUMMY(mq_timedsend); -DUMMY(mq_timedreceive); -DUMMY(mq_notify); -DUMMY(mq_getsetattr); /* Linux 4.11: */ DUMMY(arch_prctl); /* Linux 5.0: */ diff --git a/sys/arm64/linux/linux_dummy_machdep.c b/sys/arm64/linux/linux_dummy_machdep.c index a7a7795f573d..5ff6bfafe2d6 100644 --- a/sys/arm64/linux/linux_dummy_machdep.c +++ b/sys/arm64/linux/linux_dummy_machdep.c @@ -42,10 +42,4 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); * Before adding new stubs to this file, please check if a stub can be added to * the machine-independent code in sys/compat/linux/linux_dummy.c. */ -DUMMY(mq_open); -DUMMY(mq_unlink); -DUMMY(mq_timedsend); -DUMMY(mq_timedreceive); -DUMMY(mq_notify); -DUMMY(mq_getsetattr); DUMMY(kexec_file_load); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 9b8ab193f2bd..14c36669efc8 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -29,6 +29,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_posix.h" + #include <sys/param.h> #include <sys/fcntl.h> #include <sys/jail.h> @@ -36,6 +38,7 @@ #include <sys/limits.h> #include <sys/lock.h> #include <sys/msgbuf.h> +#include <sys/mqueue.h> #include <sys/mutex.h> #include <sys/poll.h> #include <sys/priv.h> @@ -2963,3 +2966,124 @@ linux_ioprio_set(struct thread *td, struct linux_ioprio_set_args *args) } return (error); } + +/* The only flag is O_NONBLOCK */ +#define B2L_MQ_FLAGS(bflags) ((bflags) != 0 ? LINUX_O_NONBLOCK : 0) +#define L2B_MQ_FLAGS(lflags) ((lflags) != 0 ? O_NONBLOCK : 0) + +int +linux_mq_open(struct thread *td, struct linux_mq_open_args *args) +{ + struct mq_attr attr; + int error, flags; + + flags = linux_common_openflags(args->oflag); + if ((flags & O_ACCMODE) == O_ACCMODE || (flags & O_EXEC) != 0) + return (EINVAL); + flags = FFLAGS(flags); + if ((flags & O_CREAT) != 0 && args->attr != NULL) { + error = copyin(args->attr, &attr, sizeof(attr)); + if (error != 0) + return (error); + attr.mq_flags = L2B_MQ_FLAGS(attr.mq_flags); + } + + return (kern_kmq_open(td, args->name, flags, args->mode, + args->attr != NULL ? &attr : NULL)); +} + +int +linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args) +{ + struct kmq_unlink_args bsd_args = { + .path = PTRIN(args->name) + }; + + return (sys_kmq_unlink(td, &bsd_args)); +} + +int +linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args) +{ + struct timespec ts, *abs_timeout; + int error; + + if (args->abs_timeout == NULL) + abs_timeout = NULL; + else { + error = linux_get_timespec(&ts, args->abs_timeout); + if (error != 0) + return (error); + abs_timeout = &ts; + } + + return (kern_kmq_timedsend(td, args->mqd, PTRIN(args->msg_ptr), + args->msg_len, args->msg_prio, abs_timeout)); +} + +int +linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args) +{ + struct timespec ts, *abs_timeout; + int error; + + if (args->abs_timeout == NULL) + abs_timeout = NULL; + else { + error = linux_get_timespec(&ts, args->abs_timeout); + if (error != 0) + return (error); + abs_timeout = &ts; + } + + return (kern_kmq_timedreceive(td, args->mqd, PTRIN(args->msg_ptr), + args->msg_len, args->msg_prio, abs_timeout)); +} + +int +linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args) +{ + struct sigevent ev, *evp; + struct l_sigevent l_ev; + int error; + + if (args->sevp == NULL) + evp = NULL; + else { + error = copyin(args->sevp, &l_ev, sizeof(l_ev)); + if (error != 0) + return (error); + error = linux_convert_l_sigevent(&l_ev, &ev); + if (error != 0) + return (error); + evp = &ev; + } + + return (kern_kmq_notify(td, args->mqd, evp)); +} + +int +linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) +{ + struct mq_attr attr, oattr; + int error; + + if (args->attr != NULL) { + error = copyin(args->attr, &attr, sizeof(attr)); + if (error != 0) + return (error); + attr.mq_flags = L2B_MQ_FLAGS(attr.mq_flags); + } + + error = kern_kmq_setattr(td, args->mqd, args->attr != NULL ? &attr : NULL, + &oattr); + if (error == 0 && args->oattr != NULL) { + oattr.mq_flags = B2L_MQ_FLAGS(oattr.mq_flags); + bzero(oattr.__reserved, sizeof(oattr.__reserved)); + error = copyout(&oattr, args->oattr, sizeof(oattr)); + } + + return (error); +} + +MODULE_DEPEND(linux, mqueuefs, 1, 1, 1); diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index b5d42dc22162..0e056aadb4b5 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -592,67 +592,6 @@ linux_get_thread_area(struct thread *td, struct linux_get_thread_area_args *args return (0); } -/* XXX: this wont work with module - convert it */ -int -linux_mq_open(struct thread *td, struct linux_mq_open_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_open(td, (struct kmq_open_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_unlink(td, (struct kmq_unlink_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_timedsend(td, (struct kmq_timedsend_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_notify(td, (struct kmq_notify_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_setattr(td, (struct kmq_setattr_args *)args)); -#else - return (ENOSYS); -#endif -} - void bsd_to_linux_regset(const struct reg *b_reg, struct linux_pt_regset *l_regset) From nobody Thu May 23 19:42:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqF16PYz5L9b6; Thu, 23 May 2024 19:42: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 4VldqD5zx6z55Qq; Thu, 23 May 2024 19:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CZfpfOcqj2wYU20Hqfjl87D8IPng2DeWjr22XdV8m/k=; b=fzCxcvcBCoWGTNXJlGRRJOpiq6iqU0jt68iMoon4Gb401/wDD2307YFHHzGrlKBytrl4k3 tr07ODAxzJvEmIlcxwuM/pHjGXc5vpbub0Vj84egnaeWhCuATgSTIQG4UR09OA7fdxa60X PstDUaDwU5IiIXyljN27RdyO9djPRX7ZDRhIcTlHVrOFY6BXnelfQghG5z3UU5vZ4HAW+R 5hmZkY/sbmpOPRhBbb+anrutWRYMtwlRIhuzQltdYMVl7ReWrRrftSgTTgc35ikQQUtaoA iOoRxuAXTUT8KCWi27h6UAG3z1el7dX7+1UH8PhO3e4sAYWRY537LL9crHL5HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493336; a=rsa-sha256; cv=none; b=b/QwTSsgWyWneHlvTC+guR7+UFwobyY2JR7YmnCqZ+re54KxXUPx+oQHCrf5wyeajiH8mF qJi2388QLEGnRMbzUb4srfDse5I2CKNgTuaHc2eCu3z6LGSYvhsmJ9GUvG0/6kvET95gPl 3uxUQsdAyGZX/ioC5K31+0XB+9O0cdpP+woCyrNuXEbC7JiWmNBpZSV/pJ3SKbB0oGpZ1J n7UJ3ZtTXAvWVekLCvMF0ikqy/1CJwJQ1v/OCSvrDYE3yV/bmrbejYVu1ubtDy6z82cIgL N4K8vXh2HcQNgQlRprtllPaS1xt7srGiPsDOVlCfGZrPgvoIE6naZkTsWJoy+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CZfpfOcqj2wYU20Hqfjl87D8IPng2DeWjr22XdV8m/k=; b=vH4QcFk0wUujwMkQR9t8jqIhAvjJXdYztytvh/J6VqBrO8LnOGYGHa6ROPoiuG/0yigWKd i5R2bpwAIowG+hAIvd3GFGFoCX4vWm5dMC7wzs9mHet/Pak040Q1As/tZHA//prXUqphDZ 80320zknhsJT3w56ZqIjM9F4RGIe9PHoTqHvPxoiNiH7/5xz2PirVWfbMB9DDmhn+icDdT VDFeCJwxHktwlK34mLdaIx1X5f6WH7lTdV8BMG9U7QZZDWsOEix/Djwb/WCzH17/oS3VZJ dzL8wLY6ga4oFEPjGsE5ZkN2ZulDGrQqrLc8MOvNZdP3fgVyk89KeSw6KV8ZPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VldqD5bwbz13Gd; Thu, 23 May 2024 19:42: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 44NJgGM0082865; Thu, 23 May 2024 19:42:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgGSc082862; Thu, 23 May 2024 19:42:16 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:16 GMT Message-Id: <202405231942.44NJgGSc082862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 9a9677ec1cbf - main - linux: Update linux manpage to mention mqueuefs List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a9677ec1cbf46a86a032d18e790aa0fedc82e28 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a9677ec1cbf46a86a032d18e790aa0fedc82e28 commit 9a9677ec1cbf46a86a032d18e790aa0fedc82e28 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-19 09:37:12 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:47 +0000 linux: Update linux manpage to mention mqueuefs Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- share/man/man4/linux.4 | 6 +++++- sys/compat/linux/linux_misc.c | 2 -- sys/sys/syscallsubr.h | 18 +++++++++--------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/share/man/man4/linux.4 b/share/man/man4/linux.4 index a50e1513ba43..212dd2526f3f 100644 --- a/share/man/man4/linux.4 +++ b/share/man/man4/linux.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 9, 2022 +.Dd May 19, 2024 .Dt LINUX 4 .Os .Sh NAME @@ -162,6 +162,9 @@ file descriptor file system mounted with the .Cm linrdlnk option, see .Xr fdescfs 4 +.It Pa /compat/linux/dev/mqueue +symbolic link to a mqueuefs mount, see +.Xr mqueuefs 4 .It Pa /compat/linux/dev/shm in-memory file system, see .Xr tmpfs 4 @@ -177,6 +180,7 @@ Linux kernel objects file system, see .Xr fdescfs 4 , .Xr linprocfs 4 , .Xr linsysfs 4 , +.Xr mqueuefs 4 , .Xr pty 4 , .Xr tmpfs 4 , .Xr elf 5 diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 14c36669efc8..aa6c3923067f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -29,8 +29,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_posix.h" - #include <sys/param.h> #include <sys/fcntl.h> #include <sys/jail.h> diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 8ac3f55596e6..2e0a362f90ad 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -213,6 +213,15 @@ int kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps); int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); +int kern_kmq_notify(struct thread *, int, struct sigevent *); +int kern_kmq_open(struct thread *, const char *, int, mode_t, + const struct mq_attr *); +int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, + struct mq_attr *); +int kern_kmq_timedreceive(struct thread *, int, char *, + size_t, unsigned int *, const struct timespec *); +int kern_kmq_timedsend(struct thread *td, int, const char *, + size_t, unsigned int, const struct timespec *); int kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, const char *path2, enum uio_seg segflg, int flag); int kern_listen(struct thread *td, int s, int backlog); @@ -386,15 +395,6 @@ int kern_writev(struct thread *td, int fd, struct uio *auio); int kern_socketpair(struct thread *td, int domain, int type, int protocol, int *rsv); int kern_unmount(struct thread *td, const char *path, int flags); -int kern_kmq_notify(struct thread *, int, struct sigevent *); -int kern_kmq_open(struct thread *, const char *, int, mode_t, - const struct mq_attr *); -int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, - struct mq_attr *); -int kern_kmq_timedreceive(struct thread *, int, char *, - size_t, unsigned int *, const struct timespec *); -int kern_kmq_timedsend(struct thread *td, int, const char *, - size_t, unsigned int, const struct timespec *); /* flags for kern_sigaction */ #define KSA_OSIGSET 0x0001 /* uses osigact_t */ From nobody Thu May 23 19:42:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqG2kCRz5L9X9; Thu, 23 May 2024 19:42:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VldqF6wJBz55Cb; Thu, 23 May 2024 19:42:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoNp6BCRwce401HbekPJOJDGHAA5VhD9aTkTiHDBq+A=; b=FSRPZIKfZ7iPD5JnUg203ys2eKQKqE7vC0W3GmaolgnRD8LHZaA2YY/hqOjTfARfk3U29T i5EcyAiI2w2E+EQOhwXADSAN796d8STPD8WAo6oKF1SBnKD+gLSb1PqsosonBZ6XHAI13w gquGHjBFGDL5dJQTiwBBBQ+EyBaxT0ONOomUrn5OCeTTJdYUOnEaKhR44V6Py7oxFOIrww l7PXZmQ/GsIhgom+z5ba4/mYln9s6/M0cJ9/yzH7jDQiLkW8dZlR82ZotgHeGeZyuTU0l1 jNdAah5ysNua323y0g4x8P+0vrrP3eD4B9ayXt0LiIESP0qwXojtjCdGVw8G4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493338; a=rsa-sha256; cv=none; b=yS478VpqG7JHCHSnn5wgKw+f6qxRjF1kdfypnS4oLxEwsm7VRiuj4mBU7x/EBH+YlBZ3sp qJ3KJvz4qpBtTeOIJDbZTjqWfh43XSCZRx5c7zhFS3a7ssLqn+hXA+uZsCKeN3QqrxWsfb 8wCAyd0gijPSoHc4jw8PlJ8IJAixAIVK+8r7VacnIjcTNVRvlr5dbcMEa1uAGlfanDuytH Ez3MiRDMeBP8JFrVOO6flatANFL63ZPCH7gQ7q767C8e512/xG65bIiBXE1lg0tH4Xzdq8 jBurN0gJql084xk7XaM3wpNn094Tq9moGrRDiDGcA9xKOOKqXyIbv3M3si74TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoNp6BCRwce401HbekPJOJDGHAA5VhD9aTkTiHDBq+A=; b=ZF114dPBnkOu34oaRBDcGzM57AM9jChkUMJG6cJ+KvMtIYIvDChSn0FcrwiTgsOuiQvpYI 7CkH3Da+al3cCeBamtavp7Ck8hGNzwqvpzjdP1cK20R1fxCnD6+36K42egNQG0rMo4UX5v 8BjjurotlxTBWsYPkESp3PgL/RD8dt5/gaj70xLBjbEVm/T+mACGqV41yxs/f4cJNKVwZc b07Kl70UGNO7G7q9JyBTIjpuSThf40BeKCKotATVsPdtJDBC5DaD8nxM8s19ilXYL8Y3Lv XvUhhdZJ5yizdEF9iZyfVAh3QkzYg+0pY4Co8IF2otjNXpJX7cbtN+HA41Rmiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VldqF6Xq4z12ky; Thu, 23 May 2024 19:42: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 44NJgHuO082917; Thu, 23 May 2024 19:42:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgHNf082914; Thu, 23 May 2024 19:42:17 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:17 GMT Message-Id: <202405231942.44NJgHNf082914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: bedbaee805cc - main - syscalls: Regen for Linux emulator additions List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bedbaee805ccb22d723d01ea60c24913f8a9d515 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bedbaee805ccb22d723d01ea60c24913f8a9d515 commit bedbaee805ccb22d723d01ea60c24913f8a9d515 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-23 18:54:03 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:47 +0000 syscalls: Regen for Linux emulator additions --- sys/amd64/linux/linux_proto.h | 4 ++-- sys/amd64/linux/linux_systrace_args.c | 8 ++++---- sys/amd64/linux32/linux32_proto.h | 4 ++-- sys/amd64/linux32/linux32_systrace_args.c | 8 ++++---- sys/arm64/linux/linux_proto.h | 4 ++-- sys/arm64/linux/linux_systrace_args.c | 8 ++++---- sys/i386/linux/linux_proto.h | 4 ++-- sys/i386/linux/linux_systrace_args.c | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 065c82d7db50..15e1dfc1a444 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -780,7 +780,7 @@ struct linux_fadvise64_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_settime_args { @@ -875,7 +875,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 8a350eeda6c0..0126fdf7aa5a 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -1676,7 +1676,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 222: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -1849,7 +1849,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 244: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -5484,7 +5484,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -5769,7 +5769,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 59bb85e742db..ab0edd99df42 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -846,7 +846,7 @@ struct linux_set_tid_address_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_settime_args { @@ -944,7 +944,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 994f80b92d81..a37de1d753dd 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -1791,7 +1791,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 259: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -1967,7 +1967,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 281: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -6151,7 +6151,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -6445,7 +6445,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 1a5335af05b1..ae3d8569df58 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -459,7 +459,7 @@ struct linux_delete_module_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_gettime_args { @@ -701,7 +701,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 151d46238d1c..73b3bf107486 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -848,7 +848,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 107: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -1445,7 +1445,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 184: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -3848,7 +3848,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -4792,7 +4792,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index f894310b01c5..aa2dfbb68745 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -846,7 +846,7 @@ struct linux_set_tid_address_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_settime_args { @@ -942,7 +942,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 70036d227707..4ec9ca460802 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -1828,7 +1828,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 259: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -2002,7 +2002,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 281: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -6225,7 +6225,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -6513,7 +6513,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; From nobody Thu May 23 20:04:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfJb4FRcz5LCx3; Thu, 23 May 2024 20:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfJb3dZVz3wyF; Thu, 23 May 2024 20:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716494655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NCuTtKmSHVnOpwkZTdqpVDqp9oSpUAqC6UAu/xEmSU0=; b=Tx9JKaVF0Wc4p0Mq/pYhLrCdx/+qITnKk/gfpVQSL01IycDmdINOYRTvta2Og8p8WyCXGx 3wanHtXvoJ1JSvr+foVzaDQH8U1Cg5e6hoktzG4JA+PYkLj332AaHGwnj2LS9ddIgW2fg5 Ss5KbYfH9cVWkLF0zOYJMX7f7Hc3UlGuvD9aN45CVgYnotlzhVMGWZJyTCFpPin2M+8NO6 KXPn3zldyn5byBTB+TEllBQxltvATsxAut8lYBE60iqXw165+nUi/4EXc5W7RL0ScranSd Wu5X+0VHOddvPE0azdO914+c+irHvrwjvBbtg5PNE05WPzo8xEsHi1vnvdAeSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716494655; a=rsa-sha256; cv=none; b=hlhyHu5VTYHKJOlpqXjI8sTQHMVv389MDtakC0GDh2BIM/+qvMW/NOETbseQLoV21mihfG MvbiaslMg7gokh3o2srYFHGW9Hqc9AxKQqhO0+c+XAB3GGSE4itJ12Wax1uazlO441VvE7 JoJ34vMyF8K6Lotw8Xy0VdWNo+Si7lx45KNjuURv6VOfbcgSv6vmxCAFYB1eBLDaY7x9M1 e29AZ2CMMUzYvHeVSCrtdHGqX6eoXY/WAV0dH+g/he+eeGu2pHkX7r7I/qMhjTZSqa4JpX yNQDZOULKxpRP9KwcmvFcvYIqru5OiiRw4b7pRA1pTA0w4Xxr/sr+6skgRNbRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716494655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NCuTtKmSHVnOpwkZTdqpVDqp9oSpUAqC6UAu/xEmSU0=; b=A0PNN7AlOzz06ZQO8jZ4+xygvI8+6m2cmCqUgW+mNTYRFZNcxaYFTs//pOrDKcIaIMrZhw bmCac3XRyOQkkpIGCoh1uXvaekM7KNcsDMVqWQnR/KhGCzkJYJcmQT3gJwU/DwDgza8rZp LKcfa6iLkv0yDJaaDASbbDzz1lU5UHyx/K5khKUFB5hdY6Gim+m8SwC01IMBfGwSmqh924 fB7EJvhffFDjKhxcnz/t9EHzsu4SGsnBC7WOlzxSqAcIUfjFl9LX6oe7GEJ6/eJ/n3/ic2 Tpsc78A0CkUkMFWKQQlzvSiwjHyG6jIuA4Uytk+NyHSiwfeAKOyzfvBQpG0hYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlfJb3FD5z13Wp; Thu, 23 May 2024 20:04: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 44NK4FnZ021453; Thu, 23 May 2024 20:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NK4Fjx021450; Thu, 23 May 2024 20:04:15 GMT (envelope-from git) Date: Thu, 23 May 2024 20:04:15 GMT Message-Id: <202405232004.44NK4Fjx021450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 2356b60be702 - main - arp(8): allow -i with -s List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2356b60be7024b10ddc4361fc22f96205b55fbbb Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2356b60be7024b10ddc4361fc22f96205b55fbbb commit 2356b60be7024b10ddc4361fc22f96205b55fbbb Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-05 18:21:06 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:02:57 +0000 arp(8): allow -i with -s arp(8) usually disallows adding a static ARP entry for an IP address which is not configured on a local interface. Change this to allow such ARP entries to be added if '-i' is provided to specify the interface the ARP entry relates to. Due to limitations in the kernel lltable, this still requires that a host route exists for the target address, but allows static ARP entries to be configured to proxy ARP for, e.g., local jails which use an IPv4 address with a /32 route. Reviewed by: imp, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1220 --- usr.sbin/arp/arp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index e5b94ca053e1..8cd18d875820 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -144,7 +144,7 @@ main(int argc, char *argv[]) if (!func) func = F_GET; if (opts.rifname) { - if (func != F_GET && !(func == F_DELETE && opts.aflag)) + if (func != F_GET && func != F_SET && !(func == F_DELETE && opts.aflag)) xo_errx(1, "-i not applicable to this operation"); if ((opts.rifindex = if_nametoindex(opts.rifname)) == 0) { if (errno == ENXIO) @@ -375,7 +375,7 @@ set(int argc, char **argv) } } #ifndef WITHOUT_NETLINK - return (set_nl(0, dst, &sdl_m, host)); + return (set_nl(opts.rifindex, dst, &sdl_m, host)); #else return (set_rtsock(dst, &sdl_m, host)); #endif From nobody Thu May 23 20:14:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfXL1vBTz5LF8L; Thu, 23 May 2024 20:14: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 4VlfXK71QGz40Rs; Thu, 23 May 2024 20:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEbRIKjE2LTQ3inizDz7rOcXkH9Z1CqhzILQSlP/+Ro=; b=xYX3plvYu+yofqUCLvUFBt6uUasGzHlIv/EtVhKp7pOXSEBKYy3DbPa9eSbxJgRWrsSsz0 FZgmYXPojGa97MBVP5/CLQ+YlfwxRFj4mHc0z0S6ols0PJfxl0hflMc+nMPr0CjHK9p7vV PLWPQ3sAFh+4V0yuMU6P+9OyhjsA85LTMAF+zL/juiT+7uimHfqXUOPaeId9MQAOhOWP90 uz8HpMqnWpYtI6c36ErpRyv4LYo9ArvI83geh1kOR9AMjwZj5XE53/BJG9fBFfbWyYvfqZ +w248ToxIcbLLLOCLHZZsWKXeEYOTLRlUrFFl/x14e2obRV28OLG1yjlhUgjAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495266; a=rsa-sha256; cv=none; b=TxDlP0eyM0MgLirwBDkYrtMMb2DX2MelVgUqYB9adyDmS1dFYE9uKX4VoXlndx39tL+UGF 3nVj/csEGf0qDneQ9V46UnKHc8rSdygPYETAb9+bGEiFinpw2DnG5LhuH+vhA0LfKZQWN+ YMlv5bfNmN5nsVLWEPmXU3pWba9cFNR4XkWTqDDDgxAEoxeP2LImiJxkaid8Yql4QlRkt4 queLltbCEEFJxE7wixdEYUwltuyWLlAac8QymGRuHJFrkLfl2lIVWxslJ3caf12TJm4f1j lNNkDm2Ty7LGm2vuMDnQ4j+FiRgS4chniq6r86NcQlUxNCqtE1UVm7ufcqeKjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEbRIKjE2LTQ3inizDz7rOcXkH9Z1CqhzILQSlP/+Ro=; b=ny7ZuTs4GFdVI58IkI3HZ4odn9Zu0HaMfyfnoaAotoQB2z5rDIU0GV9I4A6VMV8zUhozER BhwaNGq+pflGOv31Fttc5mms3Tls87JuQZMw90XESjQGWAk9leI9SsEKYK75b83g1uPxSk q75gRaj4SxwP4juBMRlFW+9kr1ticKeXQwGM4prnGcO6jeT23MjOSCv/uymNZDjjFKFeYL /Q/Ig9m+Zgf1n6dMn2VXOuN0z5aLANIVQ8UUHNGRaIk1DJX2YPBmOjPy9fDui+vs4ReJkz 3AS7PpODRHy6mBe7wiTXlnI16Q5LI6XRV5SDoxMFmDIKtFkC72OhDhCsLZHMfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlfXK6RvWz140Z; Thu, 23 May 2024 20:14: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 44NKEPhU037993; Thu, 23 May 2024 20:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKEJ1l037976; Thu, 23 May 2024 20:14:19 GMT (envelope-from git) Date: Thu, 23 May 2024 20:14:19 GMT Message-Id: <202405232014.44NKEJ1l037976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" <sjg@FreeBSD.org> Subject: git: 9d3df31ec06f - main - Merge bmake-20240520 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d3df31ec06fe91c5c67da464f11408474d57174 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9d3df31ec06fe91c5c67da464f11408474d57174 commit 9d3df31ec06fe91c5c67da464f11408474d57174 Merge: 2356b60be702 29efb3dcaedd Author: Simon J. Gerraty <sjg@FreeBSD.org> AuthorDate: 2024-05-23 20:11:02 +0000 Commit: Simon J. Gerraty <sjg@FreeBSD.org> CommitDate: 2024-05-23 20:12:43 +0000 Merge bmake-20240520 Merge commit '29efb3dcaedd9cbabc6f96f35545baf2c8b28501' contrib/bmake/ChangeLog | 15 +++++++++ contrib/bmake/VERSION | 2 +- contrib/bmake/dir.c | 51 ++++++++++++++++++++++++++----- contrib/bmake/dir.h | 3 +- contrib/bmake/getopt.c | 6 ++-- contrib/bmake/main.c | 6 ++-- contrib/bmake/parse.c | 6 ++-- contrib/bmake/unit-tests/deptgt-phony.exp | 2 +- usr.bin/bmake/Makefile.config | 2 +- 9 files changed, 71 insertions(+), 22 deletions(-) diff --cc usr.bin/bmake/Makefile.config index 55bc4a4370ca,000000000000..e62d207b70ac mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,28 -1,0 +1,28 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# things set by configure + - _MAKE_VERSION?=20240508 ++_MAKE_VERSION?=20240520 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc +MAKE_OS?= +DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk + +EGREP = egrep +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H +LDFLAGS+= +LIBOBJS+= ${LIBOBJDIR}stresep$U.o +LDADD+= +USE_META?= yes +USE_FILEMON?= dev +FILEMON_H?= /usr/include/dev/filemon/filemon.h +BMAKE_PATH_MAX?= 1024 +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} From nobody Thu May 23 20:20:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfgR0sWMz5LFRY; Thu, 23 May 2024 20:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfgQ6cfwz41S9; Thu, 23 May 2024 20:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8PICA2kQ1BwVjl0xlbt6DOhohJqKCv3yd56o2SgNQ8=; b=SN6fOLMETp72rxq+SxeL3xHcgEN1pfQe2u5h8I4P0sFl1TGHGkLE14P+CaqNAdWQn5avCR IbnsTNWx6OhtpVtoxZ2I6zgkqs7g8mrrAtld1ouPeSZcRUnS9HCyZIu+2bRz/KiE1usar7 up11ptuL/7EJRQPIlVtl4uEzpZ19et2UndsI+skwToAmEksOKXIACN4+KxoSfI7QjsEQNk wS411Sum4dy/yusCDXVIgBXHpmxsnLNpjZMR9BWL4VgEEPGx6XXgWy02qBqJsHTmZ+RgRu Vk5mIF4pg4lW/SrAQAAjPS/34u7uoQNLDffPK9oVgPT9FvlGbrQbukbxFp0QfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495634; a=rsa-sha256; cv=none; b=FVYHMRFvDY3I/upyP5qB0BhCAEMT+E6OfiElkL5JLaUl9CiI5EzcsZafojHdRBlYg/3yJP JsEFxWE4jXTD0YG/T45UJ7yu1UFkuUq8bNLg0bEbFf2uvNmC9iaJ+R/sZ607YpmMXXsmr7 f71+mxeqJ+L70aTuXJh+XwMdDLm2MYmt3HC1imT7p+I67k0FdXszs/c/a64o4Qbo47CbwF FAYnRt6nNxRr9A0Y3qSPTF5we728MfbBhCXHMnL+6NmSsWqWMwM8tLeYCBB/EcK/saupDh 2mIvnXP7N9pRE3lhzYPMZHzvDWIAds2qiMIgIgNNk6Rac+s0Y3Z4VjOwijKM8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8PICA2kQ1BwVjl0xlbt6DOhohJqKCv3yd56o2SgNQ8=; b=IZKx/BxYduYpvmR9fKHpfBuQzeKpWrV90rdmue1RWjDuLGmD73o669t+YQD5IAJ9wtgNcd SeyaUWTF3OBGiUqSRm5Tj83XjDjf2XdRyivVh3yfWzuslq2DeD/2/aAST6rAdZfE9tvcWa CsyPv9xO9SCqiKC2tKaTvrP47sYuLxdPwxZUJc7U59hXaBEZcodj/wfD048ujufzTVB+oL AXLUnzeekqayOIztdKVbPPiaS5UaPp7+fhkLVznMeqgDNYiRTbcF9Kmi2uT4izcb4DbRhl CVE7Owhghie14qv4RMcNgqtHfCoMRxZBTBXn1caeu19rsc6Cr552JJGAjsj7ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlfgQ6CYQz13Zv; Thu, 23 May 2024 20:20:34 +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 44NKKYOa047446; Thu, 23 May 2024 20:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKKYmE047443; Thu, 23 May 2024 20:20:34 GMT (envelope-from git) Date: Thu, 23 May 2024 20:20:34 GMT Message-Id: <202405232020.44NKKYmE047443@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: fe136aecc2a0 - main - tcp: improve inp locking in setsockopt List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4 commit fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-23 20:14:27 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-23 20:19:12 +0000 tcp: improve inp locking in setsockopt Ensure that the inp is not dropped when starting a stack switch. While there, clean-up the code by using INP_WLOCK_RECHECK, which also re-assigns tp. Reviewed by: glebius MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45241 --- sys/netinet/tcp_usrreq.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 3e705181d5e8..9e0a702a6c0f 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1709,11 +1709,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) default: return (error); } - INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } + INP_WLOCK_RECHECK(inp); } else if (sopt->sopt_name == TCP_FUNCTION_BLK) { /* * Protect the TCP option TCP_FUNCTION_BLK so @@ -1728,8 +1724,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) if (error) return (error); - INP_WLOCK(inp); - tp = intotcpcb(inp); + INP_WLOCK_RECHECK(inp); blk = find_and_ref_tcp_functions(&fsn); if (blk == NULL) { From nobody Thu May 23 20:34:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlfzc5d3Fz5LGcr; Thu, 23 May 2024 20:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlfzc3C7Vz42jc; Thu, 23 May 2024 20:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3lRTy/nLiHr4/ejClGylKX2z0/Beax0q4aSQji1mTQ=; b=g/PioiHMyoXY/Xlxbbxkmp3qkIexz1zzmxjF7SCFs/8dS1izUyYo5Hzu0AVq8afHNpcker mHA+pmn6NAKk6eTACniitYYyUBtYXcscpZ1y6KvZt394Z0bZ6pHdeI+cBk7mCcgtWBaySw Uy0/ngkvaR39FjZD2aAcujLzpGtZEYHFsrogxBG4XgVOVRSmxdvO7JIElNWVEtxFC7s0j4 4MnNfLu3I18qTmnQJ8dz5mPki5S/P9Ho9hCfyaAXDvqkFgAJ1sa6XrFmqthhnXP1AYTdji 4tPl73KuOqu4hxb8NO5PkbENGLLPB5K518crPpeoKzGmnuK+wvbvc/MyzKuxfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496476; a=rsa-sha256; cv=none; b=SHipn/Otq9rZkcjWqD2a1O4dwO3fkSVOR6E4r2ELdcUHuyOwqUfhhYyGAHPwZIxgiqlXJn mcR1QlQ+aRG6omtuBtFkYCW/fcxJKPPzyZWXgurS3BVqYe3l/5QqD2DUnEwlYyKq5ZkJLA wmICR0MQ84acFmVhZ5Ekj1nA0V5YMmLQ7hA6UFfdRqu3bj36u2SJPPNV6mLAML5h3NweIY iWCS5BR0j4WE7vgK97/jkAiAXUB1DRqGNVKkFvMEnj6hNZ/zsPB4GgvQQynxQkTtOx8tRJ gLH01fmZYLpTfUo0m2LZ29oFOyleHQiGUroQiHgEF58hVyBfkamnmtyfPyZoSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3lRTy/nLiHr4/ejClGylKX2z0/Beax0q4aSQji1mTQ=; b=ktJNtb+QwEdtMpHWqzlS7C0bjtth/nwWUwZjUy0YBqG5qkc0j8tkeZtGtHZMSrCH91rq9H TUQi7gdxQi98Smd3EbgmRDlotxFJWYdlQa69X3Z984+3l0IbnloPltXW76gfUhpn1XxuN7 TrgT5hpm7OKYsCMX+5ziFKKybejW6xoAOuU9NJ3sgBvavr37afoWAw2MCF2XajgWCot/fa hH/GQomuKXgpHpEZV4hcUfKA4vDFDqOPxEXoLf8+FK9C8asJcvKjvMzB8xe6ZJBbhkUyCJ XytIZHlmyVLykwAkmpcqpmp6OxyF7yKGSBArPW3Wjp3ZMBPQMcilR5LdSJPJIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vlfzc2jCXz141g; Thu, 23 May 2024 20:34:36 +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 44NKYa9s072227; Thu, 23 May 2024 20:34:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKYa5M072224; Thu, 23 May 2024 20:34:36 GMT (envelope-from git) Date: Thu, 23 May 2024 20:34:36 GMT Message-Id: <202405232034.44NKYa5M072224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 87bf0aaba8f1 - main - Remove COMPAT_FREEBSD4/5/6/7/9 from MINIMAL and FIRECRACKER kernel configurations List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87bf0aaba8f1bd743d4df24ae422dd8075260d45 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=87bf0aaba8f1bd743d4df24ae422dd8075260d45 commit 87bf0aaba8f1bd743d4df24ae422dd8075260d45 Author: Henrich Hartzer <henrichhartzer@tuta.io> AuthorDate: 2024-05-10 23:03:14 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:30:57 +0000 Remove COMPAT_FREEBSD4/5/6/7/9 from MINIMAL and FIRECRACKER kernel configurations FIRECRACKER is not a legacy config, so remove the really old FreeBSD versions from it. MINIMAL has a similar history, and limited target audience which has little to no overlap with really old binaries. Either of these is really easy to get additional binary compat with the include directive, so balance things better. Leave GENERIC alone. PR: 231768 Signed-off-by: Henrich Hartzer <henrichhartzer@tuta.io> Reviewed by: imp (MINIMAL), cperciva (FIRECRACKER) Pull Request: https://github.com/freebsd/freebsd-src/pull/1228 --- sys/amd64/conf/FIRECRACKER | 5 ----- sys/amd64/conf/MINIMAL | 5 ----- sys/i386/conf/MINIMAL | 5 ----- 3 files changed, 15 deletions(-) diff --git a/sys/amd64/conf/FIRECRACKER b/sys/amd64/conf/FIRECRACKER index b8ea17ee4a78..a36fb974c24e 100644 --- a/sys/amd64/conf/FIRECRACKER +++ b/sys/amd64/conf/FIRECRACKER @@ -57,11 +57,6 @@ options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options EFIRT # EFI Runtime Services support options COMPAT_FREEBSD32 # Compatible with i386 binaries -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 191b88daca14..0baf6d6431de 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -49,11 +49,6 @@ options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD32 # Compatible with i386 binaries -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 73277c7a3cee..2a06eb84bff8 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -54,11 +54,6 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options GEOM_LABEL # Provides labelization -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 From nobody Thu May 23 20:41:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlg7s39qTz5LHnV; Thu, 23 May 2024 20:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlg7s2PK4z4490; Thu, 23 May 2024 20:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4oHxsZNZFFilJTcxsJ/5LKZ7HocGmKfO5x9Na+Ci+Xg=; b=fg6+IPQJDpEUSEYXE2aK/ECW/KCpI00YOcsntzsiHDV89oqUJ5ec5MpWdaUj1+ZeDUjJ/l XXrko9RJDqNC44H0oBRcetzbCN/5SVTQMQuR2aSa4ZXgngOeCjja4UVf0nTAaQbAIzG0q/ UK4jGRHW9A5UpeqcGFVxvqF1H/9RYPbjY7aS8S2o9BLn3Q/khRuQ2in5EvdaDHHyh5Bg3d 4EwnMYYa0FB/MV/7GVFAysAj49J6AcEy+rMQPnYoOKmQB5NGlNkVNreMjq7Cs5+QNk3but vdgT7NAN1jidbKkLGx2QFwlkOYu8jlE40jpTihQr7u1DOmXaHFu7UzqG6oMXzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496905; a=rsa-sha256; cv=none; b=S26FjCw6etnKBix3Yd0j57MzBeAcsUIi1ZLzpXeDbJ0ZJ7VViLih+pKAm3FAY90KHIqtUe yXpSd5icZ2zQ8/zWy3JauHRSmlea6AAZgh77tK4h7F8s8uJApqb2lI8nxLvF9LOxlVmOtV SazQJhkaGsuOdbBLU0UGbbpvOONRdNi432mJPJO6uxo9dpSd0MvjEA19nE5JegJNejHypq QyGuiqarAMjdMeHQ+Alr7pD1BDCT6O3jJg+eb0FNmGaxsHJfAR/5wBQ872QLjgY6dF38rI IV35FEazCs7DQeM5nAlaEtXGPwR1Y8Iaiof4zVNaiPvFUOowtX/Vm918271ChA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4oHxsZNZFFilJTcxsJ/5LKZ7HocGmKfO5x9Na+Ci+Xg=; b=hvtJqieguwHNYIC6GrvUtq25hWfohcUQh++I0NUD40RYi0uWXWm9zX3XmciD1r+BW5XjT0 6cwcS4nkdg2TEnpiusAsvJ01dBw7FsYJu2L0WhpBwb/KFy67JdUbqlCoUV5ILdQe4TZx21 UgwYckyt65wE6fAAKFQvtNcFAqpI1O7gv5/i4fFDWrnDiGIXvOXKMvlQRawzP0In5kKRGN ueXte0zfgHGMiK55iJgCH9py7rvkefTrTZEA/+8gHKyZiy/SrjVDCASQ6vgv+FXZaFBtnC txOwLPEq9mUosh/6iojzU8GTR+xXS9uHRqWAhL1+LyqLyiuRqTShh/24R6ULdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vlg7s20f0z14GY; Thu, 23 May 2024 20:41: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 44NKfj7A085860; Thu, 23 May 2024 20:41:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKfjcL085845; Thu, 23 May 2024 20:41:45 GMT (envelope-from git) Date: Thu, 23 May 2024 20:41:45 GMT Message-Id: <202405232041.44NKfjcL085845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 1e8eb413f6c8 - main - netinet/icmp6: add PREF64 definitions (RFC 8781) List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e8eb413f6c8b0d7c44b9779f59fd1d33d2e6ac8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e8eb413f6c8b0d7c44b9779f59fd1d33d2e6ac8 commit 1e8eb413f6c8b0d7c44b9779f59fd1d33d2e6ac8 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-04-26 21:33:13 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:40:11 +0000 netinet/icmp6: add PREF64 definitions (RFC 8781) Reviewed by: imp, glebius (prior suggetions done) Pull Request: https://github.com/freebsd/freebsd-src/pull/1206 --- sys/netinet/icmp6.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 4368fd2a0fcf..05f4737e8fd9 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -307,7 +307,8 @@ struct nd_opt_hdr { /* Neighbor discovery option header */ #define ND_OPT_ROUTE_INFO 24 /* RFC 4191 */ #define ND_OPT_RDNSS 25 /* RFC 6106 */ #define ND_OPT_DNSSL 31 /* RFC 6106 */ -#define ND_OPT_MAX 31 +#define ND_OPT_PREF64 38 /* RFC 8781 */ +#define ND_OPT_MAX 38 struct nd_opt_prefix_info { /* prefix information */ u_int8_t nd_opt_pi_type; @@ -373,6 +374,14 @@ struct nd_opt_dnssl { /* DNSSL option (RFC 6106) */ /* followed by list of DNS search domains */ } __packed; +struct nd_opt_pref64 { /* PREF64 option (RFC 8781) */ + u_int8_t nd_opt_pref64_type; + u_int8_t nd_opt_pref64_len; + /* bits 0-12 are the SL, bits 13-15 are the PLC */ + u_int16_t nd_opt_pref64_sl_plc; + char nd_opt_prefix[12]; +} __packed; + /* * icmp6 namelookup */ From nobody Thu May 23 20:41:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlg7t46Bjz5LHZ5; Thu, 23 May 2024 20:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlg7t3Ds4z4491; Thu, 23 May 2024 20:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kIWulHpCH6fNrBL5RwBAbW6oG2xq1rNxxO/UELeL04=; b=kqZg9WHVb8lh+aQhLQFBuDYb+P3W+E5gu6kuSlVdQmBmV/xlMzg4FCsJhuiLzthDOEXxU8 Tjdk1nwqxC/Ge59hL8vKb9LrmnXjyb/hrII3KmVuZ3EycuvF583wat9Rgb+sKudy2lP3kN yZTwrxN3yfBiXBPYGrB2ZKYJR0B36XVU3RdRUGA/c2YTY3KJUma0gIxItHjvLxEXV2PzWj 8KOYfROQX/b4kD49+4ChVpoPTYN6weTygwylzwlcAx+ZFqN9//P47PP0Cg5U4UM/ojlQb0 SwQmXkFZ+YgZQt3ST14X44F5jYU203stxF0xFLHvv0xICxxrzvzGCwZmVW4L+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496906; a=rsa-sha256; cv=none; b=mCOvyQeqidSu6JQEPbRj/XTCjE3zZ01rw0YObNJZnjzSz1GlgPTGNAKIrowdJD/MCzUppV Ft4DGlwuIsytu8MFWOgZhEu0OtGYwPszPGvaoJe0PEa2oKFiDS0Aw8mKcLfcYP/NwvhxAh 5pDJ3iylZDhIFpr8pgNnYSD11mMSIyE7eT6ISB4GoCWvHOhZ453qnRD9jMde8bvu2B5zv8 NkDWKxCKszLRD1Dx1LR1xhviYSoaV68hb1JSheWsLg9Bu66YCX7XjvriMQKrmbg5E9rAQy Se0pm98/I8peoZFllcSUml9WEBeMd4RkaNuNUAofdLc02HGSctVLpDJ2gjiXEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kIWulHpCH6fNrBL5RwBAbW6oG2xq1rNxxO/UELeL04=; b=IYEHRrI1cnTavlLmP2Ln9TfQtDlW/1eCl3cQupwzKxcZULMLxM7o2VLNxypv7F4whQMQOI DsUnC2HdChAOvGnoxSflDMN1xTFGgenOzkiWQgab1ifctIzusPuatqMCAh/u437d5m5nCb h+o0zHRZvPWmbJDvQ13B0jnXoofBz2tb0O3qaqe5C/dFy7MBMnnmn6uxWdChM51kY7Vlb9 A7USWDvB2XTogC8CdxnWFHx6rW8q91MTh/PCr/Zmb1hy5cbE4O1K3vfT9gNjBGUtKtOvfW 5XijR38eULRRZ2CvO1ypvZi5rtlsoCT9Fnc6VHrETc51iNEBC5Sr9QcgzM6SAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vlg7t2X8Yz14VJ; Thu, 23 May 2024 20:41: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 44NKfkjH087176; Thu, 23 May 2024 20:41:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKfktd087161; Thu, 23 May 2024 20:41:46 GMT (envelope-from git) Date: Thu, 23 May 2024 20:41:46 GMT Message-Id: <202405232041.44NKfktd087161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 77f06c476c8c - main - rtadvd(8): support PREF64 (RFC 8781) List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77f06c476c8cb8700bd1c154a4f4314d51286378 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=77f06c476c8cb8700bd1c154a4f4314d51286378 commit 77f06c476c8cb8700bd1c154a4f4314d51286378 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-04-26 21:41:37 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:40:48 +0000 rtadvd(8): support PREF64 (RFC 8781) PREF64 allows a router to advertise the network's NAT64 prefix, allowing clients to auto-configure CLAT. This makes it possible to deploy IPv6-only or IPv6-mostly client access networks without the need for DNS64. Reviewed by: imp, glebius (prior suggetions done) Pull Request: https://github.com/freebsd/freebsd-src/pull/1206 --- usr.sbin/rtadvd/config.c | 68 +++++++++++++++++++++++++++++++++++++++++++ usr.sbin/rtadvd/rtadvd.conf.5 | 18 ++++++++++++ usr.sbin/rtadvd/rtadvd.h | 11 +++++++ 3 files changed, 97 insertions(+) diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index bd990c58b36a..1b37d53c8b91 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -912,6 +912,58 @@ getconfig_free_dns: } free(dns); } + + /* + * handle pref64 + */ + rai->rai_pref64.p64_enabled = false; + + if ((addr = (char *)agetstr("pref64", &bp))) { + if (inet_pton(AF_INET6, addr, &rai->rai_pref64.p64_prefix) != 1) { + syslog(LOG_ERR, "<%s> inet_pton failed for %s", + __func__, addr); + } else { + rai->rai_pref64.p64_enabled = true; + + switch (val64 = agetnum("pref64len")) { + case -1: + case 96: + rai->rai_pref64.p64_plc = 0; + break; + case 64: + rai->rai_pref64.p64_plc = 1; + break; + case 56: + rai->rai_pref64.p64_plc = 2; + break; + case 48: + rai->rai_pref64.p64_plc = 3; + break; + case 40: + rai->rai_pref64.p64_plc = 4; + break; + case 32: + rai->rai_pref64.p64_plc = 5; + break; + default: + syslog(LOG_ERR, "prefix length %" PRIi64 + "on %s is invalid; disabling PREF64", + val64, ifi->ifi_ifname); + rai->rai_pref64.p64_enabled = 0; + break; + } + + /* This logic is from RFC 8781 section 4.1. */ + val64 = agetnum("pref64lifetime"); + if (val64 == -1) + val64 = rai->rai_lifetime * 3; + if (val64 > 65528) + val64 = 65528; + val64 = (val64 + 7) / 8; + rai->rai_pref64.p64_sl = (uint16_t) (uint64_t) val64; + } + } + /* construct the sending packet */ make_packet(rai); @@ -1334,6 +1386,7 @@ make_packet(struct rainfo *rai) struct rdnss *rdn; struct nd_opt_dnssl *ndopt_dnssl; struct dnssl *dns; + struct nd_opt_pref64 *ndopt_pref64; size_t len; struct prefix *pfx; struct ifinfo *ifi; @@ -1355,6 +1408,8 @@ make_packet(struct rainfo *rai) packlen += sizeof(struct nd_opt_prefix_info) * rai->rai_pfxs; if (rai->rai_linkmtu) packlen += sizeof(struct nd_opt_mtu); + if (rai->rai_pref64.p64_enabled) + packlen += sizeof(struct nd_opt_pref64); TAILQ_FOREACH(rti, &rai->rai_route, rti_next) packlen += sizeof(struct nd_opt_route_info) + @@ -1435,6 +1490,19 @@ make_packet(struct rainfo *rai) buf += sizeof(struct nd_opt_mtu); } + if (rai->rai_pref64.p64_enabled) { + ndopt_pref64 = (struct nd_opt_pref64 *)buf; + ndopt_pref64->nd_opt_pref64_type = ND_OPT_PREF64; + ndopt_pref64->nd_opt_pref64_len = 2; + ndopt_pref64->nd_opt_pref64_sl_plc = + (htons(rai->rai_pref64.p64_sl << 3)) | + htons((rai->rai_pref64.p64_plc & 0x7)); + memcpy(&ndopt_pref64->nd_opt_prefix[0], + &rai->rai_pref64.p64_prefix, + sizeof(ndopt_pref64->nd_opt_prefix)); + buf += sizeof(struct nd_opt_pref64); + } + TAILQ_FOREACH(pfx, &rai->rai_prefix, pfx_next) { uint32_t vltime, pltime; struct timespec now; diff --git a/usr.sbin/rtadvd/rtadvd.conf.5 b/usr.sbin/rtadvd/rtadvd.conf.5 index 6824d2a5578b..8158d09f99cf 100644 --- a/usr.sbin/rtadvd/rtadvd.conf.5 +++ b/usr.sbin/rtadvd/rtadvd.conf.5 @@ -428,6 +428,24 @@ DNS search list entries. The default value is 3/2 of the interval time. .El .Pp +The following items are for PREF64 discovery +.Pq RFC 8781 , +which will advertise the network's NAT64 prefix to clients. +These items are optional. +.Bl -tag -width indent +.It Cm \&pref64 +(str) The prefix to advertise in the PREF64 option. +.It Cm \&pref64len +(num) The length of the PREF64 prefix. +This must be 96, 64, 56, 48, 40, or 32. +If not specified, the default is 96. +.It Cm \&pref64lifetime +(num) The prefix lifetime to advertise in the PREF64 option. +This should be at least as long as the RA lifetime, but cannot be greater +than 65528. +If not specified, the default is the RA lifetime, or 65528, whichever is lower. +.El +.Pp You can also refer one line from another by using .Cm tc capability. diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h index eb7746733c6e..597fb2f47f0d 100644 --- a/usr.sbin/rtadvd/rtadvd.h +++ b/usr.sbin/rtadvd/rtadvd.h @@ -32,6 +32,8 @@ * SUCH DAMAGE. */ +#include <stdbool.h> + #define ELM_MALLOC(p,error_action) \ do { \ p = malloc(sizeof(*p)); \ @@ -148,6 +150,14 @@ struct rdnss { uint32_t rd_ltime; /* number of seconds valid */ }; +struct pref64 { + TAILQ_ENTRY(pref64) p64_next; + bool p64_enabled; + uint16_t p64_plc; /* prefix length code */ + uint16_t p64_sl; /* scaled lifetime */ + struct in6_addr p64_prefix; +}; + /* * The maximum length of a domain name in a DNS search list is calculated * by a domain name + length fields per 63 octets + a zero octet at @@ -217,6 +227,7 @@ struct rainfo { /* actual RA packet data and its length */ size_t rai_ra_datalen; char *rai_ra_data; + struct pref64 rai_pref64; /* PREF64 option */ /* info about soliciter */ TAILQ_HEAD(, soliciter) rai_soliciter; /* recent solication source */ From nobody Thu May 23 20:41:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlg7v6ZXbz5LHlC; Thu, 23 May 2024 20:41: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 4Vlg7v3yZfz43nR; Thu, 23 May 2024 20:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7t0wz/58KqyhnmryxkADnvavol7nEEjeQWZ+XydqV4=; b=xUZw0QluVkG7FEZsZP5TQKXtdWJQVC+sgv8wPsfxzT7+riuzzPJ+as/h6T9vihSnPjSbat oO+dDJbxszhLRiRcvy/WfRvTDtfiraXv0ft+49xeBHbidxmW/nR9GVOWpg95X89IubGnxW tl3SfZlo6NR5EKaJ0C1KrQuBSGpuolzmxZHvbeXaARbAe3oX4cSlMETq1oAv0JqQkoPStD fzgh4HVp1ltLqPGZsI7kEFi+fLe+il2jisvi0PvyeFSe1iH0npn1I1PAzhSmGm2MXnugyp tn28X23aZEa0TanT4kw5ss57jKBgpjFa7T033sN0y6oSPrmh/zQrgEuuK931kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496907; a=rsa-sha256; cv=none; b=kKSAaZ3wGwwBS4NWkfcWTFNxC13AkKdSrhfxxerh8K9vzE9aVF+gA/nBNxsEF9dOQGSpUA dm8oecJxDwTy+jk1/NCY8HBJzK0msQPK9QliIaENayAwZ9dWeVZeRLbjp4NFW6Iykmo8q5 s6wcZcKdIYHSrzSOcZ75i3c6ExlLFvNrLt3Ikiv1inyaNhNTzvbe4x7dF7wW57A9HKZKcY k9KOzr5av8pcsjlXEtPaXmU7WV7NEQg2P7i5ECwAJ7ZChXCtKe9dRFMCZfHzFKDiqKpi9z 8Qu20As9OCjq4Hptoz+kYb0o3ZByCu76VKWmtz9eXJ7GHqvtNcnxR5IMf1k8FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7t0wz/58KqyhnmryxkADnvavol7nEEjeQWZ+XydqV4=; b=s4UlBs9KFXREBlmNgM9Q/7jLbQPzZ843GPtCFiFYNwYtGorNaAza1QtvVC3fAJLUfBsTJk apE3i72H0ZfCCFPm/lBVkn84G5hyvDXxCv28n1GdQbzFJaSL8s7eNTNfX0CNfK+IPOmCtK mFvfiAUwtFJdNOd4DagJqGU4PXV+njUSD+4B/GUFkJgNntQ5QDsCYcEo8231FR35HOJgMg wXS9DiEmMGIM2818ei+alWMylPNhM0Y1u7ixA27+SWq7PGlhaIY7rSOio6zEmjTb70qS+Z 28BRoh1bwgE8KtBMXM0QQF6FpsFzoMpuw2cBLNEhfHIcefvKURY2iqz30EuTeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vlg7v3Z1Gz14GZ; Thu, 23 May 2024 20:41: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 44NKflPe087322; Thu, 23 May 2024 20:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKflSc087319; Thu, 23 May 2024 20:41:47 GMT (envelope-from git) Date: Thu, 23 May 2024 20:41:47 GMT Message-Id: <202405232041.44NKflSc087319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 4b75afe885d4 - main - sys/netinet/icmp6.h: use C99 uintX_t constants for new PREF64 struct List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b75afe885d4510ee2bd83be21ac78ca9a2f02cd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4b75afe885d4510ee2bd83be21ac78ca9a2f02cd commit 4b75afe885d4510ee2bd83be21ac78ca9a2f02cd Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-14 23:45:47 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:40:48 +0000 sys/netinet/icmp6.h: use C99 uintX_t constants for new PREF64 struct Reviewed by: imp, glebius (prior suggetions done) Pull Request: https://github.com/freebsd/freebsd-src/pull/1206 --- sys/netinet/icmp6.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 05f4737e8fd9..0bccba3754b0 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -63,6 +63,8 @@ #ifndef _NETINET_ICMP6_H_ #define _NETINET_ICMP6_H_ +#include <stdint.h> + #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct icmp6_hdr) */ @@ -375,10 +377,10 @@ struct nd_opt_dnssl { /* DNSSL option (RFC 6106) */ } __packed; struct nd_opt_pref64 { /* PREF64 option (RFC 8781) */ - u_int8_t nd_opt_pref64_type; - u_int8_t nd_opt_pref64_len; + uint8_t nd_opt_pref64_type; + uint8_t nd_opt_pref64_len; /* bits 0-12 are the SL, bits 13-15 are the PLC */ - u_int16_t nd_opt_pref64_sl_plc; + uint16_t nd_opt_pref64_sl_plc; char nd_opt_prefix[12]; } __packed; From nobody Thu May 23 21:05:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlggT1MGfz5LKct; Thu, 23 May 2024 21:05: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 4VlggT0qdDz46Qm; Thu, 23 May 2024 21:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DG0PUbahQ/gPM3lY6XlLszA9VQbx+bPjboBb7rRPjG8=; b=Bs74uUthmkCg2712w4nkRTe+xWg7Uul2SjafEOvXZzUYrltf+9OjzqI9A65HOYR7wbBE4Q CRE95pZU7E33PMk3EFiXWWPCNqGaQ07DAeeUMLv/J2Ptnfa4bHtRFDfclP4FJBQgyltm55 8Dc3PAzPTeI0qnfp6eKJK8Cm5yy9lBAAtyDlKtD4ZftzTiAOVmSqGptYbwjnajzevu3/kD PJajfd8F99x3Qexvhyj0msZbUcNII1LMi1uoX6UJJ7Bc1zeKQSqq+K198ayijpZomXTul4 WbN2avtTDwS0Gk9m2jZ4FQvYsJnw3ql7IJO+aSw1dB8ruBTSniiy8ZyUTBKqvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716498341; a=rsa-sha256; cv=none; b=FfuRVLFmALYy7SPj0KLgmCiIOgL/VDn3g+AArN/SekAAGguVReDy7dt5gLdq3yyWNU9sno E6YBWq5HhBJjH5uNKwZR19QCFa+VjYABL/H7HJhUNF+w/BldRWCiQ/NjIDYS1EgbHUQo/b V/UHd7m0rIryLSh0R88fpKdQ6nUPrtzl3zqa9JUaq5lloxcXC9niBoVaYeIyCH+IpXAfk0 FCy2gbbMaNntbMkOc6ZlQcY2V7IzfwiShWJf5u8SzljpqhjkTPie5OrwNfZV7TwgsYcmlC KTavPB0utTRUsM4RsX14VIZBnc9K/Yxxmz+Di81GOlJxQUwSrU0N6KesnHJQSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DG0PUbahQ/gPM3lY6XlLszA9VQbx+bPjboBb7rRPjG8=; b=K28Rx57y0+sbX9M7RhWBSLdfpQ9cWlutZ/xwlhy87uCSBKUopVF6o69O7A6Sf9k3x6QVsI 7znq23FLCImNtbiL+RcMVZa+3gFoZeQ36Mcr3iEB5m556NSf9ogCazHOrYKngyQ+G2jq0l sVee+NCc8FGqBp3E26fJWy5fpMGDuaaKDikif0k6J1OTDOwKAPbSYxUn3JUo+n3icls94c bK35TYD5GkR32TANGtOB8Agrk6edxyOr83B+KThL+KndQcSwcXchp+voo/oqt8/UnXSHy7 8fVIo+icZWrPK3ZoFWKGDxrSqJ5NR4JWoKcnR+nb4eKztp4LRAop/kFwpYSNcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlggT0Qzdz14pd; Thu, 23 May 2024 21:05: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 44NL5eWJ023754; Thu, 23 May 2024 21:05:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NL5eaE023751; Thu, 23 May 2024 21:05:40 GMT (envelope-from git) Date: Thu, 23 May 2024 21:05:40 GMT Message-Id: <202405232105.44NL5eaE023751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert <cy@FreeBSD.org> Subject: git: 380ee9b3c0c5 - main - sys/netinet/icmp6.h: Fix build List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 380ee9b3c0c54680ac26dbd80ea812671052fae2 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=380ee9b3c0c54680ac26dbd80ea812671052fae2 commit 380ee9b3c0c54680ac26dbd80ea812671052fae2 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2024-05-23 21:02:06 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2024-05-23 21:03:55 +0000 sys/netinet/icmp6.h: Fix build Fix stdint.h file not found. Fixes: 4b75afe885d4 --- sys/netinet/icmp6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 0bccba3754b0..9de8daaa3390 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -63,7 +63,7 @@ #ifndef _NETINET_ICMP6_H_ #define _NETINET_ICMP6_H_ -#include <stdint.h> +#include <sys/stdint.h> #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct icmp6_hdr) */ From nobody Thu May 23 21:11:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlgpC6xwTz5LKwV; Thu, 23 May 2024 21:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlgpC6Fplz474g; Thu, 23 May 2024 21:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZramZ3Da6SyJ6lPa14iX74yw0L8qM60msFx71Dv/nyw=; b=pQGhf5oE0XOqEbkSFwdAq4igsCFfn/cnl5o6HYMeuNp0v1r7tLqBWffZMfOrSkmYKRRqqb nqlCVJYOIMEWqvhgVHk9Zb45jhAUEc5hAwdFwX02nvFOIlQ2fWhiq6yZlfdtBks3hrDu+4 Sur9DYs8HO+YtyOw6cjlCRC/bZLGPNEiq0dztrxVbaFbR0zp/JDzJmfA4R4WFrLPNoBRMm PKuRdpmZErWiEeJunnIuW9dUvKY7WZCKp8nnOURNrFWio+Ws+NgZjHqbbD4HjNx7xLNmAF NWnym01s6MJV9WNYrBxZhZY4/6GOTxNRpSEVq9fvwz4vEfqeGg7yaur1VEWs3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716498691; a=rsa-sha256; cv=none; b=AVMEOnuaxs/pu24axEvIZlHE2+MkHVWmvdsNuU8foqpFFSSDdHAOG7DmAZygSGU7zHG9LZ z8sJBBFFctAZyhXYpsmi4zrJ04oF6wsrppxZo7m8otIjGqjFIw4QVzHDOvXCvaQl8t+AsU CFHHLA0upJkQ0LvIQdfy0chlVuhpY8Zkg2aWlMlQcR6J/wuboWGMuw4AYnBCAvEqkAlMRZ IT3gPeglzcIfW1RYqgBK9tjDpuSP7+0exToEX5WwZNPBJzML7s7FApFHCBXe0gCu943jBj pJZ1qEk3eVn6pNuMbNqzbrhGu9kDkqJJOy5i+ydyGsV+y7IHxLAzIFCTWcrT5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZramZ3Da6SyJ6lPa14iX74yw0L8qM60msFx71Dv/nyw=; b=uDqJ4dCmuZ8Z+dpVRtQsWMOZmsu+RI109IWActI3o3q1j8YJjCfZ+/SKoixSX/9XrOL2Y9 hOlGiRdaSVplMoq+r3t410qGQ+O6rxihs2xKsY524AjmdItzuaIw7F335vEmJm8uQKQZ0o NTniHS0hoGU/o0aD4ry9DH/ZHwTlXqs7hN/GSh3EQPwAojQuxkfnb67F8m4nB3R4JK89Du mSkneINowayp3ntD5/2k19SnirROcCCVIUuyyXr3xQxwCKIEpnA+fypUVsa4YvlldWmVrY jCV9Z89F34nLzdiIlJtCg96Yo9hBmIzbDNU6cQo0+O3ekOpll0ShftuP5p8abw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlgpC5rwyz14b0; Thu, 23 May 2024 21:11:31 +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 44NLBVlq034102; Thu, 23 May 2024 21:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NLBVSK034097; Thu, 23 May 2024 21:11:31 GMT (envelope-from git) Date: Thu, 23 May 2024 21:11:31 GMT Message-Id: <202405232111.44NLBVSK034097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 674956e19979 - main - sys/netinet/cc: Switch from deprecated random() to prng32() List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 674956e1997954e8478e68080061c0530b081515 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=674956e1997954e8478e68080061c0530b081515 commit 674956e1997954e8478e68080061c0530b081515 Author: Henrich Hartzer <henrichhartzer@tuta.io> AuthorDate: 2024-04-10 21:53:02 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 21:10:09 +0000 sys/netinet/cc: Switch from deprecated random() to prng32() Related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277655 Signed-off-by: henrichhartzer@tuta.io Reviewed by: imp, mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1162 --- sys/netinet/cc/cc_cdg.c | 8 +++++--- sys/netinet/cc/cc_chd.c | 9 +++++---- sys/netinet/cc/cc_hd.c | 7 ++++--- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sys/netinet/cc/cc_cdg.c b/sys/netinet/cc/cc_cdg.c index 1e9236f878d4..7ec9e8ca3ccc 100644 --- a/sys/netinet/cc/cc_cdg.c +++ b/sys/netinet/cc/cc_cdg.c @@ -57,6 +57,7 @@ #include <sys/malloc.h> #include <sys/module.h> #include <sys/queue.h> +#include <sys/prng.h> #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/sysctl.h> @@ -507,7 +508,8 @@ cdg_cong_signal(struct cc_var *ccv, ccsignal_t signal_type) static inline int prob_backoff(long qtrend) { - int backoff, idx, p; + int backoff, idx; + uint32_t p; backoff = (qtrend > ((MAXGRAD * V_cdg_exp_backoff_scale) << D_P_E)); @@ -519,8 +521,8 @@ prob_backoff(long qtrend) idx = qtrend; /* Backoff probability proportional to rate of queue growth. */ - p = (INT_MAX / (1 << EXP_PREC)) * probexp[idx]; - backoff = (random() < p); + p = (UINT32_MAX / (1 << EXP_PREC)) * probexp[idx]; + backoff = (prng32() < p); } return (backoff); diff --git a/sys/netinet/cc/cc_chd.c b/sys/netinet/cc/cc_chd.c index 52048a7c05ae..92fcf68c41f1 100644 --- a/sys/netinet/cc/cc_chd.c +++ b/sys/netinet/cc/cc_chd.c @@ -58,6 +58,7 @@ #include <sys/limits.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/prng.h> #include <sys/queue.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -85,8 +86,8 @@ */ #define CC_CHD_DELAY 0x02000000 -/* Largest possible number returned by random(). */ -#define RANDOM_MAX INT_MAX +/* Largest possible number returned by prng32(). */ +#define RANDOM_MAX UINT32_MAX static void chd_ack_received(struct cc_var *ccv, ccsignal_t ack_type); static void chd_cb_destroy(struct cc_var *ccv); @@ -159,9 +160,9 @@ chd_window_decrease(struct cc_var *ccv) static __inline int should_backoff(int qdly, int maxqdly, struct chd *chd_data) { - unsigned long p, rand; + uint32_t rand, p; - rand = random(); + rand = prng32(); if (qdly < V_chd_qthresh) { chd_data->loss_compete = 0; diff --git a/sys/netinet/cc/cc_hd.c b/sys/netinet/cc/cc_hd.c index 82486563f97e..def1580d8ffb 100644 --- a/sys/netinet/cc/cc_hd.c +++ b/sys/netinet/cc/cc_hd.c @@ -59,6 +59,7 @@ #include <sys/limits.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/prng.h> #include <sys/queue.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -77,8 +78,8 @@ #include <netinet/khelp/h_ertt.h> -/* Largest possible number returned by random(). */ -#define RANDOM_MAX INT_MAX +/* Largest possible number returned by prng32(). */ +#define RANDOM_MAX UINT32_MAX static void hd_ack_received(struct cc_var *ccv, ccsignal_t ack_type); static int hd_mod_init(void); @@ -128,7 +129,7 @@ should_backoff(int qdly, int maxqdly) p = (RANDOM_MAX / 100) * V_hd_pmax; } - return (random() < p); + return (prng32() < p); } /* From nobody Thu May 23 21:32:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlhHF3YZfz5LNDR for <dev-commits-src-main@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 21:33:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlhHF0mdXz49Cp for <dev-commits-src-main@freebsd.org>; Thu, 23 May 2024 21:33:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a5a5cce2ce6so1074802766b.3 for <dev-commits-src-main@freebsd.org>; Thu, 23 May 2024 14:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1716499991; x=1717104791; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4oXjtGuMMopfym7B2P+Mcemt3QmJZ+9qmURhj7KilKI=; b=kC1qA8GbGnb/IXqszYgZoWQGSvwIVLLTyuuzR8fovQzTT4gDCT8qOvSrVBlA5/yXCN XNiz5NEjMjfWIQ8RMNbt8zSSlfilMRg3Cq0hpJix2FMpZAh5NQAWSTIDldscKOaaO29l Ud5AWjT2eRGx+eLQw939PXOvvLq4/ByXflVwnvcPFEIXRCHFVITNGmvU1lQiBSf+qPK4 YhY66IClsaXTLSH2fusW/643kUUiz3SBJldliUEWklWTkQPJqDdbObO9bQ+Aitgig7/Y VMlJveBLdgbUTKc01o1woSPXi4orv/FQsGxRzNKujrwqx9CVFeNQFXGco7DSak91mtxL coRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716499991; x=1717104791; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4oXjtGuMMopfym7B2P+Mcemt3QmJZ+9qmURhj7KilKI=; b=kGQpNv0qftLfnU3hKTE7wUkOb77KThdrNrdIQNsIw+qhuqA+ktaBSf3H66ylx9/vv/ W9boO5wwwMx7lYU6pz7Y0+U+QOxQ/+foViPZ8IBxrn91FzYYEkOTp6EAuHrpU3kFZlvb 4bzCuBUO820BVlS2bkUBRaxVEAmf77ERQf8xg7MSUbHaK48P0Fs8ewyTLMDlFw8z0XP7 YCMAAtZqRzAA2sEs/YT6JmmOeLaX/OTIkmE00wQeMfoQ/GTs30xVGkcBC28gCKhyo2S3 +tFxygRJ1XCOjjxo+8pLx2+8a3KQncKe2WglWM1gd+3a56SwR2BENWGG3f2i7wLVns8j R7rg== X-Forwarded-Encrypted: i=1; AJvYcCWnFGLihXhbKaVEHvpRSm/oPTZ4MiTv68b31HDwU2Ym7Z0Whl8Uj4PLxjVkwkJIFo+xujl6Rj9q+JFiMxbzplNla6II9tufUhdh0wpJxae9fA== X-Gm-Message-State: AOJu0YxJqX38WrBOzi5RSJuRAOJ8kVmlVkDY8AYmDaqryXsv+/XSfPlJ GSa7zFwDfXLxNzGNvLLEpT1BOTeyJpgfXKGqNlkJQhxdXtGkugLKzCEtZ131rYpttc1y2WN8CbA 4DAM0Q0BLmVIPNeAeL33jyWhAAfWWgCJc9+CTAw== X-Google-Smtp-Source: AGHT+IFgvXyOJlpZ00yPrMFZLl6uloymiLtw3VxlVlxnvlYdleQgx10qS92XUn2M3+5ESCkhUvbQesLFDq6gwEPdj6M= X-Received: by 2002:a17:906:2b82:b0:a59:c3bb:b83b with SMTP id a640c23a62f3a-a62641b1bbfmr27836366b.1.1716499990792; Thu, 23 May 2024 14:33:10 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> <Zk-N4BNTQRcTZGOb@spindle.one-eyed-alien.net> In-Reply-To: <Zk-N4BNTQRcTZGOb@spindle.one-eyed-alien.net> From: Warner Losh <imp@bsdimp.com> Date: Thu, 23 May 2024 15:32:59 -0600 Message-ID: <CANCZdfp6LyiZkw1fxT5wo5K9s8U6D6Xj0oHYVrJNW9=WERUF+g@mail.gmail.com> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. To: Brooks Davis <brooks@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000356b0f061925cc64" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VlhHF0mdXz49Cp --000000000000356b0f061925cc64 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 12:41=E2=80=AFPM Brooks Davis <brooks@freebsd.org> = wrote: > On Thu, May 23, 2024 at 12:34:03PM -0600, Warner Losh wrote: > > On Thu, May 23, 2024 at 12:24???PM Brooks Davis <brooks@freebsd.org> > wrote: > > > > > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da04= 3d34dd1f5 > > > > > > > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > > > > Author: Warner Losh <imp@FreeBSD.org> > > > > AuthorDate: 2024-05-23 17:37:01 +0000 > > > > Commit: Warner Losh <imp@FreeBSD.org> > > > > CommitDate: 2024-05-23 17:59:40 +0000 > > > > > > > > ci: Redirect output for builds. > > > > > > > > This target is far too noisy to be at all useful. Save the > output ala > > > > make universe in _. files. Also report where to find errors. > > > > > > If this target is intended to be run in a variety CI system then this > > > won't work in practice as many have no way to preserve the contents o= f > > > the files (jenkins does with sufficient configuration, but then you > > > have to expose it to the world which is a security problem given its > > > vulnerability history.) > > > > > > > This is a developer tool to run CI before committing. It's not going to > run > > in Jenkins. If we want that, it will have to be a different target. It'= s > > way too verbose otherwise to be a useful developer tool... so verbose a= s > to > > not be at all useful. > > I think we have different take on the goal of the project that created > this target. My read was that it would move the core CI functionality > into the tree so developers could run exactly the same things jenkins > does and thus debug issues more easily. > > For reference: > https://freebsdfoundation.org/project/continuous-integration-enhancements= / Yea, I'd helped write the proposal and so maybe my perspective on this is skewing things. The goal was to run the various things that jenkins will run so you'll know whether or not you'll break Jenkins. I'm happy to revert and just go back to using make tinderbox w/o trying to do a smoke boot for landing pull requests. Warner --000000000000356b0f061925cc64 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 23, 2024 at 12:41=E2=80= =AFPM Brooks Davis <<a href=3D"mailto:brooks@freebsd.org">brooks@freebsd= .org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex">On Thu, May 23, 2024 at 12:34:03PM -0600, Warner Losh wrote:<br> > On Thu, May 23, 2024 at 12:24???PM Brooks Davis <<a href=3D"mailto:= brooks@freebsd.org" target=3D"_blank">brooks@freebsd.org</a>> wrote:<br> > <br> > > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote:<br> > > > The branch main has been updated by imp:<br> > > ><br> > > > URL:<br> > > <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade= 8f69cf954162151da043d34dd1f5" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da043d34dd1f5<= /a><br> > > ><br> > > > commit a5f03413aade8f69cf954162151da043d34dd1f5<br> > > > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;<br> > > > AuthorDate: 2024-05-23 17:37:01 +0000<br> > > > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;<br> > > > CommitDate: 2024-05-23 17:59:40 +0000<br> > > ><br> > > >=C2=A0 =C2=A0 =C2=A0ci: Redirect output for builds.<br> > > ><br> > > >=C2=A0 =C2=A0 =C2=A0This target is far too noisy to be at all= useful. Save the output ala<br> > > >=C2=A0 =C2=A0 =C2=A0make universe in _. files. Also report wh= ere to find errors.<br> > ><br> > > If this target is intended to be run in a variety CI system then = this<br> > > won't work in practice as many have no way to preserve the co= ntents of<br> > > the files (jenkins does with sufficient configuration, but then y= ou<br> > > have to expose it to the world which is a security problem given = its<br> > > vulnerability history.)<br> > ><br> > <br> > This is a developer tool to run CI before committing. It's not goi= ng to run<br> > in Jenkins. If we want that, it will have to be a different target. It= 's<br> > way too verbose otherwise to be a useful developer tool... so verbose = as to<br> > not be at all useful.<br> <br> I think we have different take on the goal of the project that created<br> this target.=C2=A0 My read was that it would move the core CI functionality= <br> into the tree so developers could run exactly the same things jenkins<br> does and thus debug issues more easily.<br> <br> For reference:<br> <a href=3D"https://freebsdfoundation.org/project/continuous-integration-enh= ancements/" rel=3D"noreferrer" target=3D"_blank">https://freebsdfoundation.= org/project/continuous-integration-enhancements/</a></blockquote><div><br><= /div><div>Yea, I'd helped write the proposal and so maybe my perspectiv= e on this is</div><div>skewing things. The goal was to run the various thin= gs that jenkins will run so</div><div>you'll know whether or not you= 9;ll break Jenkins. I'm happy to revert and just=C2=A0</div><div>go bac= k to using make tinderbox w/o trying to do a smoke boot for landing pull</d= iv><div>requests.</div><div><br></div><div>Warner</div></div></div> --000000000000356b0f061925cc64-- From nobody Thu May 23 21:33:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlhJ31fX8z5LNDd for <dev-commits-src-main@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 21:33:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlhJ26GsWz49t2 for <dev-commits-src-main@freebsd.org>; Thu, 23 May 2024 21:33:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a6266fff501so18699566b.1 for <dev-commits-src-main@freebsd.org>; Thu, 23 May 2024 14:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1716500032; x=1717104832; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8cM8Cj2SS2VLfJU+U0/tthNKeKrNIid1P9WuVRK1wi8=; b=orZkwNj0Wthrfla556qWICrY8HXTcEAphJgvGBAl5tY7N3ClNGrcCAXmNIyciDgk0y RWdb1rVcB5BROm9ZKrV3/LvPUJ7cWxCN3VnuP2ecYU3xM0MGThKiMjcQfEgx8DqKL8uJ UrDzxiN2MHjLm1UFVtIMtrMGoM16xzHr6hHvnIblzhqAfdGbQN6cT4SvANf5AoZDaIuZ yJmNGQzKFBc4d77whrcRpYx8GdLkjnGc9JIWrzIMUU1XeJa1Qtt3BNmLOv6Vtrf3i4Yg CSgXbpDAAmURd4f7dJVA1Du1dABnhkBTv+US34CoeFkbEtx001E0SgwgYbWJ5uxhAMAe 91QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716500032; x=1717104832; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8cM8Cj2SS2VLfJU+U0/tthNKeKrNIid1P9WuVRK1wi8=; b=rGUhqF78G9wDGyI4vE67N0i9Wek3ZXcSX4uywvSbXlggoOE+rnq/tFChk9xCSwFCQT mv/6f8VT1/EfZisoPzfQFxXmRQ2EFx9yx9JsvEYBZssK8OsDpZ1RRYTsAglG2UNGqGB7 Om5hY2i4TLA5pxAqloebNnuBriUqRLvpZQnKGA5hFVcqHkfqpm2YwEWmVUH4CmwQ6qzw 04ounGbsc5YzsarTMLYFpdT3n19ZJd9EshPN3NKBv7hCl2mLalcwSdcB2jLfhh+eIznY SeIZBu1ycMM9L+1rV39gmP+XZam9/SIi0HVU3tja9MSeBjgYrZNCTSm9bhM1dlUp59mL Zwkg== X-Forwarded-Encrypted: i=1; AJvYcCXyKhdYa6plRrorefLVazZsf4UicjKWjir0vGbtqxMZmDCKorn2hlZHi4xzekigqd80XrgtsUE24PFV0hLdEKGOs8u6jAo3A6TdJeyQB6AzEQ== X-Gm-Message-State: AOJu0YwqdSDdBYYBLmjDQQDqh0noaVfPH6vd3ELyqM0U2SOCOIkNdWF4 L//ktZ1BgYxI0FnA6Y4XWeElI/AXp7cZ198oHczpTbuWaQeZ7YCNUyT3Yp+jz77jNNicr2EMl+l TugJ0YYNbJdsVQ10SE7xiUGpNVYhiAPnuhZ7AjVKuU7uUPAtFig4= X-Google-Smtp-Source: AGHT+IEKIT1TuJhzs1ikB2mVmOTWHRf0dWBXst4Ad7XV1nK2OkhuSl+iYZGQnVtErtTB9Kdq/F3EdVtQFuJ7CAiFNVU= X-Received: by 2002:a17:906:c55:b0:a59:c3a5:4df6 with SMTP id a640c23a62f3a-a62642d471amr29780166b.29.1716500031845; Thu, 23 May 2024 14:33:51 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> <90929.1716491424@kaos.jnpr.net> In-Reply-To: <90929.1716491424@kaos.jnpr.net> From: Warner Losh <imp@bsdimp.com> Date: Thu, 23 May 2024 15:33:40 -0600 Message-ID: <CANCZdfpqboVq_04NV0fPVxn=+AzSh+eqBgSTOtTAH5KpgOJwnw@mail.gmail.com> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. To: "Simon J. Gerraty" <sjg@juniper.net> Cc: Brooks Davis <brooks@freebsd.org>, Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a7ef86061925ceab" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VlhJ26GsWz49t2 --000000000000a7ef86061925ceab Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 1:11=E2=80=AFPM Simon J. Gerraty <sjg@juniper.net> = wrote: > Warner Losh <imp@bsdimp.com> wrote: > > > ci: Redirect output for builds. > > > > > > This target is far too noisy to be at all useful. Save the output > ala > > > make universe in _. files. Also report where to find errors. > > Could this issue be addressed by simply using -jobs ? > eg. > > make ci-buildworld-jobs > > runs ci-buildworld with suitable -j arg and redirects output to > ../ci-buildworld.log by default. > Likely. If I've put my foot in it, then I'm happy to back off. Warner --000000000000a7ef86061925ceab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 23, 2024 at 1:11=E2=80=AF= PM Simon J. Gerraty <<a href=3D"mailto:sjg@juniper.net">sjg@juniper.net<= /a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0= px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">W= arner Losh <<a href=3D"mailto:imp@bsdimp.com" target=3D"_blank">imp@bsdi= mp.com</a>> wrote:<br> > >=C2=A0 =C2=A0 =C2=A0ci: Redirect output for builds.<br> > ><br> > >=C2=A0 =C2=A0 =C2=A0This target is far too noisy to be at all usef= ul. Save the output ala<br> > >=C2=A0 =C2=A0 =C2=A0make universe in _. files. Also report where t= o find errors.<br> <br> Could this issue be addressed by simply using -jobs ?<br> eg.<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 make ci-buildworld-jobs<br> <br> runs ci-buildworld with suitable -j arg and redirects output to<br> ../ci-buildworld.log by default.<br></blockquote><div><br></div><div>Likely= . If I've put my foot in it, then I'm happy to back off.=C2=A0</div= ><div><br></div><div>Warner</div></div></div> --000000000000a7ef86061925ceab-- From nobody Thu May 23 22:28:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VljVm61N8z5LSpJ; Thu, 23 May 2024 22:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VljVm5Wmpz4Lvj; Thu, 23 May 2024 22:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716503296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgVUSl78hSgterQdTj19I6ijd4qUEbOodaJMzaWrF3Q=; b=Obuuk0O/WvXRLDJXphAbCIl4E3UEUlz5++C6CHUyjdgHC4Gso5uTOxcTcKEF1yjJ3MZvSS dml34wLvH1FH19Dr6LK9tImXqHIx+iXk4pmMEgFLpvr2ndc7QOHvbW26JXr5ymZRZffqf3 2ttBU+KVVjKNwbQKihC9HWzf/WPtvq8rWX3msnYwrtXaqXxLEC3a6z3WSRjaY9yPgAVKV7 KjRXdfKMm4nGyTZCGOebatxVo8pn9fogJN79hhI5gEru6zm7flDWWQ8J6wlGfi+VvuLFdj ejAWU7zKyB19nS68/gw3SiSlLfCbRxmhMvwvniut+mtKRQMegb2DiiLy+ityMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716503296; a=rsa-sha256; cv=none; b=H/f33TZP2fAP4lEOv6XjYd03SgcXxawD2mY5Abz98EsjyIV9mFEZGLyCk3z+/V8R9o12hS TLAPlnNRUKDpQFDVRRp5zBJ/oZdHqFTG4Y2je8xrebIU/mG863mXfT7C5VpOqTuUCMCVle +0ZqiJEl/TxlRbdBRF4kAtaPA8A1tWpIKJINx34TfUzeUZFC5ya/g2v7jYx0iWyK0JjU3h nbgJJ9AuoQS0y3RvARJPfcfC/VZvojYAFyXJgtx6Jpz27xidKvreRETr+8DUNk/JiOeqLi 8FSqqlZkBSChYvqcVbY4PmiNmaPcb6IK7XfxM+KwGuLUWDjp7YGTiyuOJot8JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716503296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgVUSl78hSgterQdTj19I6ijd4qUEbOodaJMzaWrF3Q=; b=BYzpDorverh0zT0osdqALLF8xEG9k+dlMEboSRmN6eGdC31inUKoujcPzhHTwFp/uBdxV4 rGAGuaxeK9EeYnh2/5ByZFe0tW0jE2Dqb+V38BT/T1Z71UPu1vAScT2DXCqCdAEZd1NbeI OQv23yql3OQ0rkfxUeFpHLvdRqPsIz27PWgujo95n2F2ZqSoRkXxp348NNQ+ytAdN58DSH dvKMFnrMDO6wy8QvKJmPPI+8d8bcQjmrCcTqedig62yPUw1CygGJm2om0RFrUJpxOu38ej UvHCPDuk4hUFcpoFp3nqWD/d+cKnnuUKzIc818PGTzOTTAOTNj3jnojQnQCq6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VljVm56Lrz176J; Thu, 23 May 2024 22:28: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 44NMSG2A059045; Thu, 23 May 2024 22:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NMSG7L059042; Thu, 23 May 2024 22:28:16 GMT (envelope-from git) Date: Thu, 23 May 2024 22:28:16 GMT Message-Id: <202405232228.44NMSG7L059042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: d33f5a0afa54 - main - fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d33f5a0afa54be7f18775f6506f015c7f79a6a5f Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d33f5a0afa54be7f18775f6506f015c7f79a6a5f commit d33f5a0afa54be7f18775f6506f015c7f79a6a5f Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-04-23 01:10:07 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-23 22:26:59 +0000 fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925, QCA ath1xk, and add Intel iwlwifi IDs. Rather than using a package per driver add fine(r) grained flavors even though it is a lot more likely to break in certain cases. For Intel we need a great level of detail to match PCI IDs so also pass the full pciconf -l line to into the pci_* files as "$2" to have access to these. This lines up with ports commit 80f50c9eb66d. Sponsored by: The FreeBSD Foundation Reviewed by: manu (earlier version) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44918 --- usr.sbin/fwget/pci/Makefile | 1 + usr.sbin/fwget/pci/pci | 2 +- usr.sbin/fwget/pci/pci_network_intel | 437 ++++++++++++++++++++++++++++++++ usr.sbin/fwget/pci/pci_network_mediatek | 53 ++-- usr.sbin/fwget/pci/pci_network_qca | 62 +++-- usr.sbin/fwget/pci/pci_network_realtek | 46 +++- 6 files changed, 539 insertions(+), 62 deletions(-) diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile index 66b3901e4a91..6c500dae6df6 100644 --- a/usr.sbin/fwget/pci/Makefile +++ b/usr.sbin/fwget/pci/Makefile @@ -1,6 +1,7 @@ PACKAGE= fwget SCRIPTS=pci \ + pci_network_intel \ pci_network_mediatek \ pci_network_qca \ pci_network_realtek \ diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci index 6a66049842e2..fbdfa0001c5c 100644 --- a/usr.sbin/fwget/pci/pci +++ b/usr.sbin/fwget/pci/pci @@ -107,7 +107,7 @@ pci_search_packages() fi . ${LIBEXEC_PATH}/pci_${class}_${vendor} - pci_${class}_${vendor} ${device} + pci_${class}_${vendor} ${device} "${fulldevice}" done IFS=${oldifs} } diff --git a/usr.sbin/fwget/pci/pci_network_intel b/usr.sbin/fwget/pci/pci_network_intel new file mode 100644 index 000000000000..cf8c52075db3 --- /dev/null +++ b/usr.sbin/fwget/pci/pci_network_intel @@ -0,0 +1,437 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +# Some iwlwifi chipsets are detected by other means and we cannot replicate +# the full logic here. +# Currently we also filter out all those which do have a wildcard device ID +# as well as all for those which exists no firmware (yet). + +# iwlwifi (dynamic) +pci_network_intel_iwlwifi() +{ + + local idstr=$(echo $2 | sed 's,.*\ device=\(0x[0-9a-z]*\) subvendor=\(0x[0-9a-z]*\) subdevice=\(0x[0-9a-z]*\),\1/\2/\3,') + + case "${idstr}" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh } + ### >>> + + # 7000 + 0x08b1/*/0x4a6c) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a6e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x402a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x406a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x446a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x486e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4870) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc02a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc06a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc760) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x426a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc26a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2050) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2150) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5c10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5f10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9e10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x500a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x502a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x900a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5002) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5090) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5100) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5102) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5190) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5412) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5490) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5590) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9112) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x520a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5202) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5290) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5302) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + + # 8000 + 0x24f3/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x01f0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0004) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x10b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0044) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0250) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xb0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x1030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x8030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x9030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xc030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xd030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f5/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f6/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e01) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e02) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x10d0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9074) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + + # 9000 + 0x9df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x30dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x31dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271c/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x2526/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0xa370/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + + # 22000 + 0x02f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1653) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1654) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + + # ax210 + 0x7a70/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1673) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1674) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x2020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2729/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + + # bz + 0x272b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x272d/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x2727/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x7740/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0xa840/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + + # sc + 0x6e70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xd340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe440/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + + ### <<< + + esac +} + +pci_network_intel() +{ + + for _drv in iwlwifi; do + pci_network_intel_${_drv} "$1" "$2" + case $? in + 1) break ;; + esac + done +} diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 5e4d2af9eb26..3ed6c8b95b47 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -25,45 +29,38 @@ # SUCH DAMAGE. # -# mt7915 -pci_network_mediatek_mt7915() +pci_network_mediatek_mt76() { - # awk 'BEGIN { x = 0; } { if (/mt7915_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7915) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } + ### >>> -# mt7921 -pci_network_mediatek_mt7921() -{ + 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - # awk 'BEGIN { x = 0; } { if (/mt7921_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7961) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0608) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} - -# mt7996 -pci_network_mediatek_mt7996() -{ - - # awk 'BEGIN { x = 0; } { if (/mt7996_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7990) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; + ### <<< esac } pci_network_mediatek() { - for _drv in mt7915 mt7921 mt7996; do + for _drv in mt76; do pci_network_mediatek_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_qca b/usr.sbin/fwget/pci/pci_network_qca index cf33e0d87239..a97d29ef1135 100644 --- a/usr.sbin/fwget/pci/pci_network_qca +++ b/usr.sbin/fwget/pci/pci_network_qca @@ -29,18 +29,27 @@ pci_network_qca_ath10k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath10k-kmod\"; return 1 ;;\n", tolower($3) }' hw.h - # We ignore the ubiquity entry for now. case "$1" in - 0x003c) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0041) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x003e) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0040) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0056) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0046) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0050) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x003c) addpkg "wifi-firmware-ath10k-kmod-qca988x_hw20"; return 1 ;; + 0x003e) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21" + addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + return 1 ;; + 0x0040) addpkg "wifi-firmware-ath10k-kmod-qca99x0_hw20"; return 1 ;; + 0x0041) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21"; return 1 ;; + 0x0042) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + addpkg "wifi-firmware-ath10k-kmod-qca9377_hw10" + return 1 ;; + 0x0046) addpkg "wifi-firmware-ath10k-kmod-qca9984_hw10"; return 1 ;; + 0x0050) addpkg "wifi-firmware-ath10k-kmod-qca9887_hw10"; return 1 ;; + 0x0056) addpkg "wifi-firmware-ath10k-kmod-qca9888_hw20"; return 1 ;; + + ### <<< esac } @@ -48,31 +57,42 @@ pci_network_qca_ath10k() pci_network_qca_ath11k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath11k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1101) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1104) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1103) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1101) addpkg "wifi-firmware-ath11k-kmod-qca6390_hw20"; return 1 ;; + 0x1103) addpkg "wifi-firmware-ath11k-kmod-wcn6855_hw20"; return 1 ;; + 0x1104) addpkg "wifi-firmware-ath11k-kmod-qcn9074_hw10"; return 1 ;; + + ### <<< esac } # ath12k pci_network_qca_ath12k() { - # No ath12k firmware package yet - return 0 - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath12k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1109) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; - 0x1107) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1107) addpkg "wifi-firmware-ath12k-kmod-wcn7850_hw20"; return 1 ;; + + ### <<< esac } pci_network_qca() { - for _drv in ath10k ath11k; do + for _drv in ath10k ath11k ath12k; do pci_network_qca_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_realtek b/usr.sbin/fwget/pci/pci_network_realtek index 795d9d4a6e0a..d70470b65244 100644 --- a/usr.sbin/fwget/pci/pci_network_realtek +++ b/usr.sbin/fwget/pci/pci_network_realtek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -29,14 +33,21 @@ pci_network_realtek_rtw88() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw88-kmod\"; return 1 ;;\n", tolower($2) }' *.c case "$1" in - 0xd723) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc82f) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh } + ### >>> + + 0xd723) addpkg "wifi-firmware-rtw88-kmod-rtw8723d"; return 1 ;; + 0xb821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xc821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xb822) addpkg "wifi-firmware-rtw88-kmod-rtw8822b"; return 1 ;; + 0xc822) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + 0xc82f) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + + ### <<< esac } @@ -44,11 +55,22 @@ pci_network_realtek_rtw88() pci_network_realtek_rtw89() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw89-kmod\"; return 1 ;;\n", tolower($2) }' *.c - case "$1" in - 0x8852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xa85a) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xc852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; + case "$1" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh } + ### >>> + + 0xb851) addpkg "wifi-firmware-rtw89-kmod-rtw8851b"; return 1 ;; + 0x8852) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xa85a) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xb852) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xb85b) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xc852) addpkg "wifi-firmware-rtw89-kmod-rtw8852c"; return 1 ;; + 0x8922) addpkg "wifi-firmware-rtw89-kmod-rtw8922a"; return 1 ;; + + ### <<< esac } From nobody Thu May 23 23:46:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VllDj2gsKz5Lbdm; Thu, 23 May 2024 23:46: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 4VllDj24qgz4TZr; Thu, 23 May 2024 23:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716507973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6bko5/PeaOj6QpLAX2nsIBnlmcZ9IjA+Poj4XjoDpac=; b=RVD5fj1R6J6LHosPZOA9RC5OA0+a3nOxnGltdZZKneCjha6lS1UwGhU7e08QbbJ190KOXA eocDpSGXsKdL3RQV2X+S2ToBsTFAmF82UpLO1pvzwYF9HM7itIes/bPTKK3lz+aCgDOQ5D lklkkgPa96ulT1LQHIQ+IUeuSL/U3CFYADdaq/hZhGtyhxDGS79pdXIkvTKL0qIsjpOlyQ n1FzJEmJrwhXN8i5FJ8yZjsSR3h8udw4nVgLvCoNq7Bn4uFbSC4b1/riD92a3nM0CZ26JV 715sZqKEjYVyWK6fHKYytOE2iS7m5MMajTmF5VbZL6Nu0I9XH99FxLRt8n9V4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716507973; a=rsa-sha256; cv=none; b=pvY8DOtWl98McyQx7eNdYsB0fkpxGs/bMlueHmhl6OeJaNFyQ4aOOXnlqi+73CGf3GxZ8R daJ7qsABkDzRh0jcvL1gIL3wfy7txR3y6k97I+2UXTCH3D1CMky7KmHtu4KS+fwwo/ZKpI NpV5f7IOM15PRpGnTLXxZxpeRQT3vaARtEj3UeHc13KLPfqKfDM7na97RQtt8TLvr+gDjK jUU4uGNIGpGTfqOCWR7PuuI7BvIsjJQm2KN0vizGX+eSRteysW8+Mg4dAWDHF7J8oEyR8A 60IxEgz4LTRa9EcIn2wR5bcf07oHaxSxsx8Rmewr2M0wGhuDQ4DJ4/Sm+QGP7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716507973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6bko5/PeaOj6QpLAX2nsIBnlmcZ9IjA+Poj4XjoDpac=; b=sdUxgfNlQvFwoPWcrVaSR7egbkW6tX4Tz32NuN8hqs9MtIoe1rHeyIHDo/g9CwpIb9C6mz EDH80KkUc3iOaA+uBUSPhMnr4WIzuZXqr/fqot/g5K9W+YcY9b1QKXuPGEJU4SHI7vPCSi tsKmb5FtXD1JPwcjDyNvK6EULo4CUIeC96IjqF9Bk7s9/dS67X96R6nRg1S61rKxVEPiiJ fWfFtaghm1XGoxLbvvKyzfCRFxRJon+HipR0AJiKtJxQjMdjrrPICIkQCwPBUVEjHAr++1 Yf9sAxZNnqjM0hGet0DNTFmmI5kYNLwy1XGl+ANbwEK2vx8AO8bNrXpoDm+A/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VllDj1Xf6z18nQ; Thu, 23 May 2024 23:46: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 44NNkDsU092943; Thu, 23 May 2024 23:46:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NNkD4m092940; Thu, 23 May 2024 23:46:13 GMT (envelope-from git) Date: Thu, 23 May 2024 23:46:13 GMT Message-Id: <202405232346.44NNkD4m092940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: 45bce6fa306f - main - LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=45bce6fa306fc3a211949f63c9bbb7932fe5a3bd commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-02-18 21:07:08 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-23 23:43:29 +0000 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls Lock the two TX MO downcalls into driver/firmware in lkpi_80211_txq_tx_one() to make sure they cannot happen in the middle of other (net80211 triggered) updates calling down into the driver/firmware. Sponsored by: The FreeBSD Foundation (commit) MFC after: 3 days Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43966 --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 72b39e840bfd..03b36e6526bd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3769,7 +3769,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif LKPI_80211_LTXQ_UNLOCK(ltxq); + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + LKPI_80211_LHW_UNLOCK(lhw); return; ops_tx: @@ -3782,7 +3784,9 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_tx(hw, &control, skb); + LKPI_80211_LHW_UNLOCK(lhw); } static void From nobody Thu May 23 23:58:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VllVw4Nmyz5LcLb; Thu, 23 May 2024 23:58:32 +0000 (UTC) (envelope-from lexi@le-fay.org) Received: from fuchsia.eden.le-Fay.ORG (fuchsia.eden.le-fay.org [81.187.47.195]) by mx1.freebsd.org (Postfix) with ESMTP id 4VllVv6H4jz4VdM; Thu, 23 May 2024 23:58:31 +0000 (UTC) (envelope-from lexi@le-fay.org) Authentication-Results: mx1.freebsd.org; none Received: from iris.eden.le-Fay.ORG (unknown [IPv6:fd12:8247:3:1::7]) by fuchsia.eden.le-Fay.ORG (Postfix) with ESMTP id 3132C2D379; Thu, 23 May 2024 23:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=le-fay.org; s=fuchsia; t=1716508704; bh=Ya9BIac/brBHZJwfKEGsRD7H6LI4l5SjIkCfhq+Uoo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=rbCYRLlehrS0XEK1DvWIRxlNItcZ88SNwNjA0epzv+ca146eNk4eocwINg0IqM1sr c3xrfPZCJnZ10rj7FdenhcHJnBmHA2FWj9q3bZ2/PUL0t0B3aGw6quV770mvgdmhQy S0SQ0pNLZ63xxDQja1CdnIlykwRdkiveH3h0HIuo= Received: from ilythia.eden.le-fay.org (ilythia.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by iris.eden.le-Fay.ORG (Postfix) with ESMTPSA id 75EB62C04D7; Fri, 24 May 2024 00:58:23 +0100 (BST) Date: Fri, 24 May 2024 00:58:23 +0100 From: Lexi Winter <lexi@le-fay.org> To: Cy Schubert <cy@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, imp@freebsd.org Subject: Re: git: 380ee9b3c0c5 - main - sys/netinet/icmp6.h: Fix build Message-ID: <Zk_YHyGpFk7osH5E@ilythia.eden.le-fay.org> References: <202405232105.44NL5eaE023751@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="34tPE2G4rq7AmsaW" Content-Disposition: inline In-Reply-To: <202405232105.44NL5eaE023751@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20712, ipnet:81.187.0.0/16, country:GB] X-Rspamd-Queue-Id: 4VllVv6H4jz4VdM --34tPE2G4rq7AmsaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cy Schubert: > -#include <stdint.h> > +#include <sys/stdint.h> sorry, that's my fault: i had already fixed this locally but apparently forgot to push the change into the GitHub PR before it was merged. i'm not sure why the GH CI tooling didn't pick this up though. --34tPE2G4rq7AmsaW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmZP2BwACgkQDHqbqZ41 x5m4Pwv/QblcCkECro55Ywgl9Fl4z6/S82XtItcnYH81I+VFVOVuW0IviQPl2/kZ 8pGKQYinXhoDV6gAHhWg3K3IrBT0yjJTZItKhV8NHM2mX3iEYjtHH/BZ8p2nkJAs eycNyW0YuOZ1MGfbEbdIS+toqZ0u1l6r6KCrgv4lEnBqHntt6fb0XDncOUZYXI1V IYemmgRjga4Q0UJGFUgdUVjRsVJlXWAR5BEPWuIYoeP9KjAgNm1mYZF8KqHbz5bD bY3U33yfvUuV+8uC7p9ubqjvBuloqRNEiH/RL46HZA/y0zLxVGZismxS7+RfIeq+ Vw87J/U2MH9vYTJEWiLtqO7zpnG3GmkBPTXLQI9UVdOtYEeDd5ldb7xhJ4hfuNWD B0Hc1nLzjbi8bpT959TQ/yaEDGsQCoV4mkBz16Xv8q32UTepRZ8qo8T7G7N/o+IU X0qe4CgqSCo70ohGreOeSmQuI+WE+nHVrUbvem2zQX7pNJDKa72ozlt76TFMNqKg xcy3wtQA =H8EL -----END PGP SIGNATURE----- --34tPE2G4rq7AmsaW-- From nobody Fri May 24 00:02:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllb0536rz5Lch0; Fri, 24 May 2024 00:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllb04XX3z4WHw; Fri, 24 May 2024 00:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716508924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ToXFb6AWpSjfpXpcRn+BZWQwHQZV0mwx7vgvCKWxs=; b=QQOmVESWrLP357NzyYxb6SPuoKuhc4AzQfLwPyg8GIrsw9o3LV3H1XEispfVWOwq731P9W ofS0QQnFmvNoGcjRACyApx+u+/1sfXHWIncbI/8cSe+ZNXytzilAxr/BJmqeYa9MzkxiBZ 1Xh54KbU8vZEmxZ+MH2As7cOVMA1sa/26zWWzIn0yD6BUqGk84/TsxSok+ORMlP5iTTd2N aog+b7n/J7GvV2XKp8Tsb2O3GOoDOn7/t9rthvjD5bP4K5FMmLz7k3prRRRY4Xf1snTbce 0xW/JsdciaWsXefi/XG0VJ9x61L6pJakArgDRbsls4/Ixd4L16eiqJCOF3zrng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716508924; a=rsa-sha256; cv=none; b=Q0/3z1LvCXuwasqJTdeVpplfAzgrHTEbhlKCSepCeIGy5U2K0qRUFVKmMhtuy+O0jgfAuj 3e9h4KsR7j/e95mnYs+zjgPifELodiH1AGP3eglP0nvPZRBuFYkW7ZEaX7m8VWfqGrH7mG BccDvrxuPSoY6GwTuxCBq1/CGvvP4c1jGD3lnSxvh3EDZPQKFAYXGQfqnoNFHJ4H+EFrGP R9fxRwXOmXoQFn4SC8xIgUTPpH3/Axbaznup1GiUOeMyqE8BZc1ud+W1tko34V52X9DjPY fqLSq/VzQHRcH/R6E/Dy7tgN6St8vuJWYSNdOl9gy3RlOTwJYZPKeRe74yTpCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716508924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ToXFb6AWpSjfpXpcRn+BZWQwHQZV0mwx7vgvCKWxs=; b=QrcbF3X7K4B1nk4xHM12cU9jVfKD7H2ljpnQx+CXTWf4cItYCrE3KwLPvXDj312t4cxQiK XvERY2vuMZ99nObgYbECmJufAxMjGnvIu2pw4mHu4oT5Xprv/aMho6ZPLiPCfqj0l8nPpw 4QWnZvEK7lBXWURZ3F8ZVWTYRYZhILZZFo+kQyMnk+rcmIMzDVqcHBWVEfYospxbpXcRt8 WBR/UdphJA0YID0ZeSKAxrAjeS/5IKfFdXBzhPhfYjw3hMQ8fyBZP+1ZQq8BkZ8ZmTsktK aEmft9QXKL9HbkVog3h1saMxHnTmhssQ1ItRSxsDENjdW6CEELzkVBVdyQaTAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vllb047sDz198P; Fri, 24 May 2024 00:02:04 +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 44O024Ix026676; Fri, 24 May 2024 00:02:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O0243G026673; Fri, 24 May 2024 00:02:04 GMT (envelope-from git) Date: Fri, 24 May 2024 00:02:04 GMT Message-Id: <202405240002.44O0243G026673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: d31ed58b9f93 - main - Modernize DVD package set in preparation for 14.1 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d31ed58b9f9360cecd9acfbd12999190edca6e56 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d31ed58b9f9360cecd9acfbd12999190edca6e56 commit d31ed58b9f9360cecd9acfbd12999190edca6e56 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2024-05-20 17:42:49 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:01:59 +0000 Modernize DVD package set in preparation for 14.1 Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old and unlikely to be useful without other linux packages being installed), ports-mgmt/portmaster (now largely obsolete and discouraged in favour of using pkg and binary packages) and x11-drivers/xf86-video-vmware (questionably useful). Replace devel/git with devel/git@lite (sufficient for most purposes), and adjust the "ensure the ports exist to sanitize the list" code to ignore the @lite part when checking that /usr/ports/devel/git exists. Add sysutils/seatd and x11-wm/sway for wayland support. MFC after: 1 minute Differential Revision: https://reviews.freebsd.org/D45278 --- release/scripts/pkg-stage.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 551876eca8c6..5742f84b0258 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -12,9 +12,7 @@ export ROOTDIR="$PWD/dvd" export PKGCMD="/usr/sbin/pkg -d --rootdir ${ROOTDIR}" export PORTSDIR="${PORTSDIR:-/usr/ports}" -_DVD_PACKAGES="archivers/unzip -devel/git -emulators/linux_base-c7 +_DVD_PACKAGES="devel/git@lite graphics/drm-kmod graphics/drm-510-kmod graphics/drm-515-kmod @@ -22,19 +20,19 @@ misc/freebsd-doc-all net/mpd5 net/rsync ports-mgmt/pkg -ports-mgmt/portmaster shells/bash shells/zsh security/sudo sysutils/screen +sysutils/seatd sysutils/tmux www/firefox www/links -x11-drivers/xf86-video-vmware x11/gnome x11/kde5 x11/sddm -x11/xorg" +x11/xorg +x11-wm/sway" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f ${PORTSDIR}/Makefile ]; then @@ -61,10 +59,10 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "${PORTSDIR}/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P%%@*}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else - echo "*** Skipping nonexistent port: ${_P}" + echo "*** Skipping nonexistent port: ${_P%%@*}" fi done From nobody Fri May 24 00:03:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllcx0T6Bz5LcyK; Fri, 24 May 2024 00:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllcw741Fz4WVd; Fri, 24 May 2024 00:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4tCN+LUXo9A3Ct7cHTM5qKvaSCIN5nTRMjg3nJZdw7U=; b=ehF9z8y6oHw+5DHqGTfLNEfh35Q5KgXhLSZTobcTjWwYASWFkmoXVwi5O4K9rj8n9M1qaX ijdgap1hQCkPZrt1YBK67vpXDzVITT6ypf7nwz4SEXkV7V1iorkNtCplnZPxlpyyLNWOcg vQ3YG3mIT67KDG882FASb5BM/dTJepzyQK2ZfgeZiTuHJJ197d+BruGXNLkht945A0U57A +vJnzIwH1HKiQgskUCfnLvtTNGcD2sLeO6IP5cfyL9qKdOVOCu+VeiIBdKC/dOvZSoGLsW PVfasei8qpNuCmwPn5UYsHtvGFnZMe+1H8LakRD9WmztM3wkj+9KVoTxMPKnSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716509025; a=rsa-sha256; cv=none; b=y3t756PfIL2N1cXYhaMSYb/Eas5NnP44EXtQ+Pod3YX3CyOD6BhGoSy2Wv2bzdXkXOn0jo z61MZXKLL9RfGgWhFiZLHJarA53XRf6vKqg4sez5++3/dHkzYwqL+BxoM/FKOYt5D7FLD7 9UUNfePXLdLcS6igqMgfwgf7fwSTAnJArYg8zfRG08m239ZNJIaJlEVQ2K8m+7QJAOXqjv szUpjcPHdtb1c6oIQcZxU1LbSLvyMSFiDK9i69uClAuyNna/6xH3uViI6qoECX1IilnpYd 0WhHWf7IDaJMmCaReRv+ymFrocRdBaSHBtrkk5Hzil+aL7O6xwx7DlyVHOJP7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4tCN+LUXo9A3Ct7cHTM5qKvaSCIN5nTRMjg3nJZdw7U=; b=uBwLn+JnIZ3cmKPHoKLgpTTAP5tT7cxodtdLhwJMvCm1PLJ0G/n3nkhV6KBdwY9WciOJ7d +wj6MxkM94aQ24TI0Xd3dwS4p/xJZOTmKGvmEdZ2ZRh2YbL34HMjnFLeoDaoznv1nirM4u NqhzbIfY1et2wwVIfwOYkXuhmYKp16tqONvPDjCiZryKT4TX0b0HeyBkQ8FJwT39nU8avT qs0KneWBCX09LckDQDuSqwvR9B7BBWDe96QazpvegN0ZIToLO3n77Vt4aq0szluzApYcfd N/VgJxJSiFVHMx8fq6JF8aBx53Y9FRbPkpdAAwzrM58LAfD7H2c5Qd+K9q7KCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vllcw6gPdz19M1; Fri, 24 May 2024 00:03: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 44O03iU2027057; Fri, 24 May 2024 00:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O03iG4027054; Fri, 24 May 2024 00:03:44 GMT (envelope-from git) Date: Fri, 24 May 2024 00:03:44 GMT Message-Id: <202405240003.44O03iG4027054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: f81c0904f736 - main - Add rtw88 firmware to DVD package set List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f81c0904f736249bd43a95e92370483383233449 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f81c0904f736249bd43a95e92370483383233449 commit f81c0904f736249bd43a95e92370483383233449 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2024-05-24 00:02:40 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:02:40 +0000 Add rtw88 firmware to DVD package set Add net/wifi-firmware-rtw88-kmod since it is no longer included in the base system on 15.x. (It is present in 14.x, so this change will not be MFCed.) --- release/scripts/pkg-stage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 5742f84b0258..a887173aa858 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -19,6 +19,7 @@ graphics/drm-515-kmod misc/freebsd-doc-all net/mpd5 net/rsync +net/wifi-firmware-rtw88-kmod ports-mgmt/pkg shells/bash shells/zsh From nobody Fri May 24 00:10:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VllmG0nLdz5LdBb; Fri, 24 May 2024 00:10:06 +0000 (UTC) (envelope-from lexi@le-fay.org) Received: from fuchsia.eden.le-Fay.ORG (fuchsia.eden.le-fay.org [81.187.47.195]) by mx1.freebsd.org (Postfix) with ESMTP id 4VllmF2GFpz4XgV; Fri, 24 May 2024 00:10:05 +0000 (UTC) (envelope-from lexi@le-fay.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=le-fay.org header.s=fuchsia header.b="w/J4OOr3"; dmarc=none; spf=pass (mx1.freebsd.org: domain of lexi@le-fay.org designates 81.187.47.195 as permitted sender) smtp.mailfrom=lexi@le-fay.org Received: from iris.eden.le-Fay.ORG (unknown [IPv6:fd12:8247:3:1::7]) by fuchsia.eden.le-Fay.ORG (Postfix) with ESMTP id CD9B62D482; Fri, 24 May 2024 00:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=le-fay.org; s=fuchsia; t=1716509404; bh=aI+9KzA7GLk5ltMtcuvxLqBbgfRFx/uJ+eCDcPhEC8o=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=w/J4OOr32CtVs4GRwhnDNMFdAwa86pvq6zFGIq0w94EGY93FKNESIomc/sI3va37U Xof99xWbVR4guHANuqruY2/4JfwO3l74XptDFpKXfGZ3MW+OsVXEbx0Fkr8yWw8q1Y un2YXtv0+9zYYNkjdl91TPaiSDzwyk0UtEVBmqfg= Received: from ilythia.eden.le-fay.org (ilythia.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by iris.eden.le-Fay.ORG (Postfix) with ESMTPSA id 51A132C04D7; Fri, 24 May 2024 01:10:04 +0100 (BST) Date: Fri, 24 May 2024 01:10:04 +0100 From: Lexi Winter <lexi@le-fay.org> To: Brooks Davis <brooks@freebsd.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk_a3GLevuNFS680@ilythia.eden.le-fay.org> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UlbVc3+SPPOOXNrd" Content-Disposition: inline In-Reply-To: <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.50 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_DKIM_ALLOW(-0.20)[le-fay.org:s=fuchsia]; R_SPF_ALLOW(-0.20)[+ip4:81.187.47.195]; RCVD_NO_TLS_LAST(0.10)[]; MISSING_XM_UA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:20712, ipnet:81.187.0.0/16, country:GB]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DWL_DNSWL_NONE(0.00)[le-fay.org:dkim]; ARC_NA(0.00)[]; DMARC_NA(0.00)[le-fay.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[le-fay.org:+] X-Rspamd-Queue-Id: 4VllmF2GFpz4XgV --UlbVc3+SPPOOXNrd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Brooks Davis: > This is more or less standard practice for generated files. These > commits are of basically no interest. to be clear, i'm certainly not expecting a detailed commit message for things like this. my only concern is that when viewing the commit log for all of src/, or for src/sys/ or whatever, they look like this: 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf LinuxKPI: add kvmemdup() 69b6c4a6ec6654978628ccd48edce46f00ac3e96 LinuxKPI: 802.11: fix for_each_sta_active_link() 408957613bc065c4444812c3ae276ace03697ebd Regen 6b7e4254a29e3228a7273622556b60416e300509 capsicum: allow rfork(2) in capability mode c80c104cbd52db994c0f2757bd1c6d014744022c glabel.8: Describe cases related to permissions / existing mounts the other commits make it clear what they touch (LinuxKPI, capsicum, ...) so i can ignore those if that's not what i'm looking for, but 'Regen' is not very informative there. if it just included the filename it would immediately be much more helpful. --UlbVc3+SPPOOXNrd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmZP2tkACgkQDHqbqZ41 x5mPLQwAjTzt7nJVgTbpdqIjOb4ZKKELh8bwM2LG/LB56EmxnG7Sy6GoBQzICxfs C//cbIs846FyfQwpH2m0rdnfQPrfl5PGTdWW+j54otAxAXUNkuRn4wPiinGDimFD SwwdJZ6Vncyk54OOJKCNF/9XiKFUnM3gzEADQu7ZDsI49iVf76+0FJJXbouK8st8 i3DnwGqFAT/6MpxlgtWdojCJA85wYbedTuY7DDN6YtKiPGHzCaAlOD8Ahf78wZJ7 Xrut+peieLSkKZueN0fFBl6IGXBU7JRfjY86zJF67nXkB2scmYTtEUhr95n+3mBi oXgSF7T1P4mCEHNgSnU7Sj4bCmjn3FfWSzlz9ohUCpn7CrsOSVZSDXnfbKLncqQ0 7fcTyqsNVaXKQ3Yk6U8YgcT5FKKxBgruuos4JLQb2sgeexRswlSGWKeNy8V+xhUE FQykxeh5/vMSWYy0Gd0YHJWD38w4RICYNjv8Ar6cfzaTgw7iJNwshtjbeZGKjm0+ zMdHgu0s =+AHw -----END PGP SIGNATURE----- --UlbVc3+SPPOOXNrd-- From nobody Fri May 24 00:22:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlm2n5Tljz5LfMx; Fri, 24 May 2024 00:22:41 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlm2n4sQtz4Zpt; Fri, 24 May 2024 00:22:41 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716510161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lbXxwucuYKAmRmdJCRFNwrJ1t/rMYkn+ZPxG+11T8n4=; b=a5XsjunAO0iBlf+nEzFiqr7tDI7T+zzKnr0X180bP6wbXVbEIo18BdlbCYAO6WkY5+bE3N Kp7aoDhiJ7/vuv5pjX5xoJDO8o6Vi5hfKsD9bGnJxMQ5kW4tr220VDM0HTxTBUkGjVXYpE efGd4b3g5QS2msD+UisJrtk1CalXLUJ/lulW1/n4w20pXb/FaRLRscQ8hjIRbsRC5NQkYR 77MV0fWgMZIPJKLO3B2h3ZCLWldAAPKGkCO/8Ep8kNlnPVtb+T/r5B9c1uy1esVbP11etg fruOshdZte2pA9ka1aZEouoX7+hyAIW0tfjCtScYIVFQOneFDbAAOgvZEtKyiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716510161; a=rsa-sha256; cv=none; b=dXr8ntkGXT/CxfCiK/GzTMaHg/MHIxPQduYZOHdEKy0mtUCBvW3ISsMa9vTnPZZ4KbC2vo 3EddZBWqXOzyVhZsBcWrcqJp424zTCusNfCwGE+B9UlPrW5gI+nWmXghoN4+Z5L3GPbA8n FvUymh2SJK0MccAOcrDZ9MeUFTF6+pzHuSXaJv4do5d1e3c6Y5FYXj9LX3csCpLEQZ+jBN G2nFTqz5kVtUbw9VZLoa9d2B32j8B5G0XiQmvxDZUDUaZpd85HkSZk7U0C1tHcOQD2TvQc qDMx8uluw/q6mcU+KampRToJNEitodmXdlI64pJuyf+5W+XpvH/zCqjsIZ4muw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716510161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lbXxwucuYKAmRmdJCRFNwrJ1t/rMYkn+ZPxG+11T8n4=; b=WVpkABGIgczLnxXvRItl0BKGD5pJ4SK12VYURQSH4NCM/zYzLyls0titNX2kVfCQdqafrm 1NUI4XPPjRLZxqk6s9//1Y7GU5dFxspEAzF8Wz0jpv9q7mwfSIYU5Sm5gUhSjWoCTLmWhK ezkoSpQgOr/JMaUgNbb83CXuNaIk3OcjNNVgDVLm62LK1P6JR3Mz1jprD5vp0dpf7ZAAX+ mGWFBt2gUyh5wUTLYbv6JCien3zX0+NCDd3U+Lmo+Ujds8xnSDK6cGe4seGzMIypBNhO7K AZDFcdWZprU4BCj0MHwQGmgQoMnwWLH6WWVbRxl1nzBuQSErrbZmUWFQEpAoag== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vlm2n4HNSzRkm; Fri, 24 May 2024 00:22:41 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D59F13C019B; Fri, 24 May 2024 00:22:40 +0000 (UTC) Date: Fri, 24 May 2024 00:22:40 +0000 From: Brooks Davis <brooks@freebsd.org> To: Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk_d0AkjfcwjDmoV@spindle.one-eyed-alien.net> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> <Zk_a3GLevuNFS680@ilythia.eden.le-fay.org> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <Zk_a3GLevuNFS680@ilythia.eden.le-fay.org> On Fri, May 24, 2024 at 01:10:04AM +0100, Lexi Winter wrote: > Brooks Davis: > > This is more or less standard practice for generated files. These > > commits are of basically no interest. > > to be clear, i'm certainly not expecting a detailed commit message for > things like this. my only concern is that when viewing the commit log > for all of src/, or for src/sys/ or whatever, they look like this: > > 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf LinuxKPI: add kvmemdup() > 69b6c4a6ec6654978628ccd48edce46f00ac3e96 LinuxKPI: 802.11: fix for_each_sta_active_link() > 408957613bc065c4444812c3ae276ace03697ebd Regen > 6b7e4254a29e3228a7273622556b60416e300509 capsicum: allow rfork(2) in capability mode > c80c104cbd52db994c0f2757bd1c6d014744022c glabel.8: Describe cases related to permissions / existing mounts > > the other commits make it clear what they touch (LinuxKPI, capsicum, > ...) so i can ignore those if that's not what i'm looking for, but > 'Regen' is not very informative there. if it just included the filename > it would immediately be much more helpful. It should probably contains "sysent: ". It's pretty rare that one file is touched (usually that's an error). -- Brooks From nobody Fri May 24 02:03:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlpHB17rzz5LMKt; Fri, 24 May 2024 02:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlpHB0dhfz4hMt; Fri, 24 May 2024 02:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716516214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FebYLscS2ULzbrtGIqrjS/AQmk5fBNkgECfVLuGx+qA=; b=STgAxl6APoBsdASD669B/727A1t1hqengQMKM0n7fVwt3wlYriHFKUxhIK7vdqJw3wE4Bo 7uctflSDAnlN3OYB+h/im6uhse9s6bPcaH/4CUjm1j/Jozix0HP81tJ0KL/PYR+Q6r4LDo wCcOUWXTVuHhStOML7a+1xG7gMcok566DCQpCowqWHRoe043rCs9D1A9NcVRAQIbuTVFkK KQCU+9Tnooazhau9jRNoDlpj9s1iFFHgwXm9Gy1eQlt8njYzZ0JYvj2g6wVoYna173EEJ9 KCJ6rTO0/RMB//XMRejyC+fzzV78GLwrluAlNqOwsxLmhSMTbbe5HFXxSGwzXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716516214; a=rsa-sha256; cv=none; b=vMJ+XbP7a8n2L3UbfQnyyn5k0sCvt+s6S2Bv233GioCAGtPoxGMoudWS1T7vHEZ3GpR55N MUjAyo3E3gt6MKEAvapLTAy2/DpsARYoW34gWQueHUZkUFBZQGWGHCzlA1Z3gpWHzS+rH9 f78/aME8AbA8JS8XwhLUDre4B3tP6iW/SpsctiOKl2HfqKbtP/UpuNt++EWcHKr8q68Jnx pBsPpTYZgma1BFUUdcscR0Z2ciLuaymlSj+xki1qkidFSntePbSJv7lGYXOtNP2qRvw8qK jUDxQUBunX/3DMeEvHupGl5hC+ZTs0oP0vsexeZyHqPiJGa38nX3jFNKNM+E5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716516214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FebYLscS2ULzbrtGIqrjS/AQmk5fBNkgECfVLuGx+qA=; b=fi3dd70yjnPUyVJnEs52/N39dMccv3jRLnsFlQuDmhTQWw8S3eD3fzWjsD125oI4vt9Vbl ykaNOjF/2z+MENV/XktrTnQrZdC2mJ/KzmgBtj0MEV4y6KOhEBJ0OzGvgcH5Swsv2p1apR EryUa54hYvTqoYsSJfPWbfUMTuXN2/huRJ3irPcGUiL3+cxPFNUlC/aWuUEvlfKsgghzeX HTkwEP4504AG1njQwuCBofIAMIO5TwyCpW3mSRMEWAd9ocdCxcaI1RmOjoOWrbK40U6bFA WSVinX1JdhBpLijjGWUx7NFjWAa89NuKuI/CVuLaUl39a5N8QborMhCyP92XxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VlpHB0FLDzDht; Fri, 24 May 2024 02:03:34 +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 44O23XjE028945; Fri, 24 May 2024 02:03:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O23X3M028942; Fri, 24 May 2024 02:03:33 GMT (envelope-from git) Date: Fri, 24 May 2024 02:03:33 GMT Message-Id: <202405240203.44O23X3M028942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 59aa64914aeb - main - cross: Move Solaris API64 defines to common List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59aa64914aeb1b2cccc0d4fc39ead2ee159a1e5b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=59aa64914aeb1b2cccc0d4fc39ead2ee159a1e5b commit 59aa64914aeb1b2cccc0d4fc39ead2ee159a1e5b Author: Val Packett <val@packett.cool> AuthorDate: 2024-05-23 21:49:53 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 02:03:18 +0000 cross: Move Solaris API64 defines to common off64_t is needed for both Linux (musl) and MacOS, so move them to the common area. Somehow glibc provides the definition, but defining it doesn't hurt and hels in the musl case. Reviewed by: allanjude, jrtc27 Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 --- tools/build/cross-build/include/common/sys/_types.h | 3 +++ tools/build/cross-build/include/mac/sys/_types.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/build/cross-build/include/common/sys/_types.h b/tools/build/cross-build/include/common/sys/_types.h index 650edc8080d0..408f0537d1e6 100644 --- a/tools/build/cross-build/include/common/sys/_types.h +++ b/tools/build/cross-build/include/common/sys/_types.h @@ -45,3 +45,6 @@ * Neither GLibc nor macOS define __va_list but many FreeBSD headers require it. */ typedef __builtin_va_list __va_list; + +/* Needed for opensolaris compat. */ +typedef __int64_t off64_t; diff --git a/tools/build/cross-build/include/mac/sys/_types.h b/tools/build/cross-build/include/mac/sys/_types.h index 5ca37580b85a..8d39fc39f087 100644 --- a/tools/build/cross-build/include/mac/sys/_types.h +++ b/tools/build/cross-build/include/mac/sys/_types.h @@ -41,5 +41,3 @@ * __darwin_ct_rune_t exists. */ typedef __darwin_ct_rune_t __ct_rune_t; -/* Needed for opensolaris compat. */ -typedef __int64_t off64_t; From nobody Fri May 24 13:55:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm64r3T28z5L4CH; Fri, 24 May 2024 13:55: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 4Vm64r2hdLz4hLR; Fri, 24 May 2024 13:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mw1VrOa4vZ8sNIJx6GA8HMotbzeh9MRVDdBRSzhFOSM=; b=LXmYqhsQwfQxX/9hFz5/iPpdmmDyhpodcHcpL+uktiFabP/sygb7zCXQRK4kE3R5XOakPX M3VG1MO/KbuGJHc7FHm41/ApRrLPbXl6ssIxT4HEzdbR/gq8d5Q870GtUlQx7f+tXhbVrG 1xPUk2TStDQJ7kjxqwkGMpLaktC+j7N0YgTuX03FHhzEGwtH4lLQLHwJbwOCx4xUSB797N j8w61/9LKDwD2DcSy50rIrPmKbHADHtHMrIxrApNYKWwvL3vfNg/I4V+PmlZ2vRIY9eaHk 7eFzlUjaZ0ljzIvNZ2UXcEDiBb0dwlMtWI+r3DrT37uMnYSAmE2KSIqpm/gy0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716558940; a=rsa-sha256; cv=none; b=MhsclatTIsoOqOLOYBgsv0noUWImOpK3VKdDzou+xz0HYnRwHBwaRy9S1DU9Dw3idqF/+m cPAnnllQmPHRvQBMGI3SY/tNw7fQzXs29vHWYlX+XhAx90Vu8fPnf5OqPYBRwVMgRBtyIk UmhEnQxrU74mK4hbOO1EVtbNHBzKwfYlPbBdrc/3pyuaQO+DGqlToIgoQqfQWh0ReDYJjD am9J9L0pOYB10wqD/SgAnUuB48YMf6xJ37Pi57mtk5Ma/gJ9fK9u1gDM2OMSwclJwK37CI yEiPM1nPtZby/mltgM2UXP6WNEFFQO9PebS0Q0PwnWsN1hoF8j2R2ukrZZhNHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mw1VrOa4vZ8sNIJx6GA8HMotbzeh9MRVDdBRSzhFOSM=; b=pjH9lgKP3sJjgelLFoqYbFxxCTZAh8OzvdaakXbmRJ0fjEnK3rs3rVwWXWMGsrIl2p+cmd bKhJBA/snVvDrb2YlSZniLClx0H2+a3DLPVWA1pKudMNlam2UBsz2o26t5rbgAk6AlmYrA v+PH08424GpHG3iRE008zL2EVugYSb7djnBf6BHGa4h7su1He5NzCy2meW6cDOZpkBHPsH MV+CsmaNDuxAr1Xo3Z8tFwBiasr+bIu9kbEwaqp1BeXaR5nmvaj9MRiHdlJAx43jge+aKF Fv0X17rWjr1cKRpVy/KIbN1EzGLLyBQ+YazTw2T0fc5fjTjP0P/Tk4sx804ltA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm64r29sPzbtG; Fri, 24 May 2024 13:55: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 44ODteGg028763; Fri, 24 May 2024 13:55:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ODteOY028760; Fri, 24 May 2024 13:55:40 GMT (envelope-from git) Date: Fri, 24 May 2024 13:55:40 GMT Message-Id: <202405241355.44ODteOY028760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne <mhorne@FreeBSD.org> Subject: git: b5e17840de65 - main - arm64, riscv: removed unused struct pv_addr List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5e17840de65ff196b2398211b68ce96d6919f2c Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e17840de65ff196b2398211b68ce96d6919f2c commit b5e17840de65ff196b2398211b68ce96d6919f2c Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-05-24 13:53:14 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-05-24 13:55:24 +0000 arm64, riscv: removed unused struct pv_addr No functional change. Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45322 --- sys/arm64/include/pmap.h | 10 ---------- sys/riscv/include/pmap.h | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index d69924080610..d604f705e596 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -71,16 +71,6 @@ struct md_page { vm_memattr_t pv_memattr; }; -/* - * This structure is used to hold a virtual<->physical address - * association and is used mostly by bootstrap code - */ -struct pv_addr { - SLIST_ENTRY(pv_addr) pv_list; - vm_offset_t pv_va; - vm_paddr_t pv_pa; -}; - enum pmap_stage { PM_INVALID, PM_STAGE1, diff --git a/sys/riscv/include/pmap.h b/sys/riscv/include/pmap.h index d65935c4ce7f..e10cbacb6e1f 100644 --- a/sys/riscv/include/pmap.h +++ b/sys/riscv/include/pmap.h @@ -67,16 +67,6 @@ struct md_page { vm_memattr_t pv_memattr; }; -/* - * This structure is used to hold a virtual<->physical address - * association and is used mostly by bootstrap code - */ -struct pv_addr { - SLIST_ENTRY(pv_addr) pv_list; - vm_offset_t pv_va; - vm_paddr_t pv_pa; -}; - struct pmap { struct mtx pm_mtx; struct pmap_statistics pm_stats; /* pmap statictics */ From nobody Fri May 24 13:55:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm64s3xPJz5L4CJ; Fri, 24 May 2024 13:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm64s3Jh7z4h2C; Fri, 24 May 2024 13:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXXxcdgu8rO6g4XLQIiU6C0UY45y3Nn0YcIhrH3oK78=; b=iEchAyo8EA1b/i+lh/b3DzZKxdAtesPowH314IofAQSlNe8THyON7ufQaxe/e9xB9Toonx 7seJKR9piHSPZGEcgbNpFOROfvGlhSYBqH0VHB9ROc5k4HOnp+drcKDv/J4o2c5b/iW5/+ +JzxMSvwU8uNL5L4xjQXSs3CPyg7BMkjJHF1/BubSDiUKAZcfoxs1Oumis0SJ27inN26/j IogscCZjE9dTjEUl2opo+C3nl8TCHFuKiFG0tXTXDKJBgAqWbg56I6BEL9BFFN/7v++zFA YDAK9rkoi9nLPwEyESihCz7zXz0/dwCoEpHai3LV1j1OvhMheaz9WwRcw+ZZxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716558941; a=rsa-sha256; cv=none; b=e9vfz0WYRpjhBo6XCempI4UEuFHYCMkUTMJQI4JVP6Q9aglLIw76aH+dczhHRaOj7wQgqV RNJE7U+baqY23Go5aOyE2dJdkwGRWW9n9IaY+cRqxspHGr8fqr3RM/e+8Gzz1TvpluS2ei 88LzHdgGhx/bGqYqhPK9WFODNU+SPAlUD2Bp9vitDem0WunzEFY5d1aIwp7xNSHU+ojPQg K1R73L+FB2BEz+8LUNplSbgp6+YI7WFFq/g95pPZztjGruCaONWCMkHQFjnDQilMIb4YQe TBDstG31o+kD1KY0AZFOvEWo9s6KH2MDQcReHmxqS3Y0LoGlfR8zv24LedE3IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXXxcdgu8rO6g4XLQIiU6C0UY45y3Nn0YcIhrH3oK78=; b=ex4MSawt7cZVhdICKIWX4nH1DHH9JI0UjUfQBGVbJ+OhOUnD5dEkkVu78z3mA6puW+DaLA kZ0XVpBSeGKUDW+mAYwwM4LMYGVqpXw6rkbS0RG5GHWFNiP/JWZmt+KFJHSisXOEJ4zPj5 csbZZ8gxx9EeRnXMoKgkFvWcK1IGYbCJH52mIvSJzX3P5DX7rZ9v2Xgs4bIcHD2RkZAnv8 RfeR7PyhEQCRbU3AcwkePajaG10gBIaHyMkA47xvsReY0bQQw7F0jx/+JHNeZcMX0I6He7 SrH81+MTCBiGq/ZAfSTv10O1e7NcErNRKRcA33u/9yCA2YyqLxzusswvZu4JvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm64s2tJJzbwj; Fri, 24 May 2024 13:55: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 44ODtfBx028807; Fri, 24 May 2024 13:55:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ODtfQJ028804; Fri, 24 May 2024 13:55:41 GMT (envelope-from git) Date: Fri, 24 May 2024 13:55:41 GMT Message-Id: <202405241355.44ODtfQJ028804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne <mhorne@FreeBSD.org> Subject: git: 1d3c23676de3 - main - arm64, riscv: remove unused declaration List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d3c23676de33762fd7fc2e3d890fd14738d3ee6 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1d3c23676de33762fd7fc2e3d890fd14738d3ee6 commit 1d3c23676de33762fd7fc2e3d890fd14738d3ee6 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-05-24 13:53:43 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-05-24 13:55:24 +0000 arm64, riscv: remove unused declaration It is inherited from arm, where the global exists and is used. No functional change. Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45323 --- sys/arm64/include/vmparam.h | 1 - sys/riscv/include/vmparam.h | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 83c55913f56e..ffa5a538504a 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -301,7 +301,6 @@ extern vm_paddr_t dmap_phys_base; extern vm_paddr_t dmap_phys_max; extern vm_offset_t dmap_max_addr; -extern vm_offset_t vm_max_kernel_address; #endif diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index 18fd6a28308b..d2014654b691 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -240,7 +240,6 @@ extern vm_paddr_t dmap_phys_base; extern vm_paddr_t dmap_phys_max; extern vm_offset_t dmap_max_addr; -extern vm_offset_t vm_max_kernel_address; extern vm_offset_t init_pt_va; #endif From nobody Fri May 24 15:40:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q120c7z5LGty; Fri, 24 May 2024 15:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Q10YbTz4vhN; Fri, 24 May 2024 15:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayPTQTo/gMW3p6aN6X1ZxmfGZq3ra0/H0K0E7rAqgqA=; b=Je1FMxWl+sES0Eqbq6xd2JQjvsWPTOSNdjDF4myrQ19d+Hld4qi8XloR4epECwfUvRBlx/ aIDTFh5bLkkaD/xPuiCoRl2VfPNuTUGi9drq1+SXj3zuqdysHj7EjCXF4DY6cEuzGWZ/IN vkXoGd2jYSdgujMOWPsNND/C9Yc6UT7X2w1Ko4jgfuSMXfYvjOdntrgp+NhyzPd7VfPL8s S17gfSFHjfA9hOWN12NgTCKe2B9AftClOT0Sig0rFfcVIXX7bDuebMUd7dHtR4s8+iCJZP 6HDJw59iryap/KpDX4+q4WDYke35yfV3FB6RGYECXKyEgLy8/M1n1DQsDeTBMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565241; a=rsa-sha256; cv=none; b=uD7G+2CcthwTjhxQkUoCdqrI3uF8JA8ST8feo/dPFgq2hOin+foMPTcPtza2RE09R56fFC PN3rRozmyygB97uyOasl74M+9JAPdDPQH7RIzPkEv9gUm2xNTEu2r9NlxnnSmeziTOTl49 8Gs3tK+PIb0Jra0WhBmyLYW3RWmax11w7sRcZVwDY+mAqtLAMeJiVaCIjxPh6mSrnccMOV cUt4hN4kvMlbjwVFDnHwh0/W2rSd+H2dAOhl763FHbRnCsJRCh9qFv9sRcR/lCHgPlD14I V7Z4He0HAzfZcI/nxqRtIMmtPwUZRXGBZM9NoauBDiGFEBbEH8Y2Z4ix2qG6PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayPTQTo/gMW3p6aN6X1ZxmfGZq3ra0/H0K0E7rAqgqA=; b=dXsM10ZR9Z2MakW2Nr4MEDo5cRxIcrtBH99wlG8VGQbtheWiM8HX4sF17J94lCLX+R6E99 VvUEQnOWt5aGAT5rz8zaiGmcpW1BE9RNJkMPJM58QFC3jonlHCjr+j2W5A+5VBRgFMp2kg gPF4UVAwGQ576MVmPeiotdK/Q3bdvJXfNchYWJ+7vyTU/eQB5MTw1wF5B84HuyVTLUXP8a qepL7giVnnirWY1UMOmnPEJ2i19Ha4DHp4b27bjaOTg2C4TRHzQdnRHEdAR3GutSV8xGsa OsHYCkU+Sm0hxXJMyJq6dRkJBuTCxHkPS717B/8Es/bonNsPTQHz8Wp9I2nW5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm8Q109jHzfXD; Fri, 24 May 2024 15:40: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 44OFeeIQ012157; Fri, 24 May 2024 15:40:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFeeU0012154; Fri, 24 May 2024 15:40:40 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:40 GMT Message-Id: <202405241540.44OFeeU0012154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 32f40fc9837d - main - geom: Add counts for enomem and pausing List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32f40fc9837daee8e3cb59ae17a28fba4d1c76cf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=32f40fc9837daee8e3cb59ae17a28fba4d1c76cf commit 32f40fc9837daee8e3cb59ae17a28fba4d1c76cf Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:31:15 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:31:15 +0000 geom: Add counts for enomem and pausing Add counts for the number of requests that complete with the ENOMEM as kern.geom.nomem_count and the number of times we pause the g_down thread to let the system recover as kern.geom.pause_count. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45309 --- sys/geom/geom_io.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index ddd469d909a0..25b3908e5fb5 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -75,6 +75,9 @@ static int g_io_transient_map_bio(struct bio *bp); static struct g_bioq g_bio_run_down; static struct g_bioq g_bio_run_up; +static u_long nomem_count; +static u_long pause_count; + /* * Pace is a hint that we've had some trouble recently allocating * bios, so we should back off trying to send I/O down the stack @@ -701,6 +704,7 @@ g_io_deliver(struct bio *bp, int error) if (bootverbose) printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name); + atomic_add_long(&nomem_count, 1); /* Rare event, but no locks held */ bp->bio_children = 0; bp->bio_inbed = 0; bp->bio_driver1 = NULL; @@ -734,6 +738,12 @@ int inflight_transient_maps; SYSCTL_INT(_kern_geom, OID_AUTO, inflight_transient_maps, CTLFLAG_RD, &inflight_transient_maps, 0, "Current count of the active transient maps"); +SYSCTL_ULONG(_kern_geom, OID_AUTO, nomem_count, CTLFLAG_RD, + &nomem_count, 0, + "Total count of requests completed with status of ENOMEM"); +SYSCTL_ULONG(_kern_geom, OID_AUTO, pause_count, CTLFLAG_RD, + &pause_count, 0, + "Total count of requests stalled due to low memory in g_down"); static int g_io_transient_map_bio(struct bio *bp) @@ -822,6 +832,7 @@ g_io_schedule_down(struct thread *tp __unused) * for that I/O. */ CTR0(KTR_GEOM, "g_down pacing self"); + pause_count++; /* g_down has only one thread */ pause("g_down", min(hz/1000, 1)); pace = 0; } From nobody Fri May 24 15:40:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q21fmgz5LHB3; Fri, 24 May 2024 15:40: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 4Vm8Q217xLz4vvd; Fri, 24 May 2024 15:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5GephaTSaysz20CG7aL0oE19QCWCXm+wq+mStM/r3U=; b=xIwM5NUg3aB5iXRZTqLl+CPzF40svxkuouWBebHWJN34z/8j2/iv8Vw+NhDex3HMmtIun5 vwBiDIMXeS5FeQGh8SJYdAnIyvfqyF0XdIBCKnCNDjCPNz683h6kb/OWlsDNFJrlUH/K0v u2QwRQVT4HRnXHOlv6Bm/7rhT+Qf37Xn3GEjFpnritOMI+vUfuDN11ZDPpQ0PXz5mOqar9 X0TdAMeiKhwUVDLYxuu//S99G2Q5bTMHo8HjQGPD1n+FR14NdN983K9uviTkMvGwQ3nKec tyb/NURK57VJpRmtka/yY7Q0GKU6TuAsm3fhWMV1rtNq7jYVTEW2CkAZBWhDKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565242; a=rsa-sha256; cv=none; b=JhyOV4JLp6462rYaLz+766wjeOWRX17ePSUsIzYSuyffEv0plJkIb6fepoHNR5E2YD8DCU UyfWrGeuuin2aB21+LsLPzaic5GI7QU+GAg+eDD7oqc7ilqjrPV2CLpq0GUaArWbJeg+OZ z8umsqibR1vrhLPda7pCkYr80w4DeHYOlR6z2rlJQhl1EMQS4/rhaB9+LlNqYfVfnP9wDN +IkiBf+nk0g+qUlmq5RpuvwZuQpwPPeqI36vHSc9eCwCTi8hhW2KU0OYei4UVeC3Ouaghk CEGV4rVh9PFb48aY3gyBaw16q5s+o1/njGPs+576AqgeZvuI0mTYL3N3ts7Ehw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5GephaTSaysz20CG7aL0oE19QCWCXm+wq+mStM/r3U=; b=jUHRT2G4bDjKGsaabid6g9Y7Fu1mNJgOmnH3sZ5lEStmAm+6+JqfwnQyLvI4xleCCowGrz 3tjLDCW7e3bDnBusXlQuCXcz93N666YjY6pJdQjOyWQO9ahWlt0cRnKIX60JOJeLzYLrNI ihvJHIQc2AGDky93PBarMrRjvmHIP7sgmJ8+RdYWXyJkCMSHvD0LH0oFwtL2XHBU1DToSM /nbRgNRMRhjopepAqkFtPhlHCba9RRa/PDB5moxMJBMqPIoSRwjBZuTtfO2U7rsuGjhSGa /46u8YqWdaLMqqioZyJyUFyhARlMJEzt3Tr+gZ5yo9GhJcjUyl8QqAuymOxcNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm8Q20lzDzf6p; Fri, 24 May 2024 15:40: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 44OFegP7012223; Fri, 24 May 2024 15:40:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFeg8m012220; Fri, 24 May 2024 15:40:42 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:42 GMT Message-Id: <202405241540.44OFeg8m012220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 6d83b381860b - main - geom_io: Shift to pause_sbt to eliminate bogus min and update comment. List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d83b381860bd8a1ea2043e26bdf2cf2ed640a38 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d83b381860bd8a1ea2043e26bdf2cf2ed640a38 commit 6d83b381860bd8a1ea2043e26bdf2cf2ed640a38 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:31:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:31:55 +0000 geom_io: Shift to pause_sbt to eliminate bogus min and update comment. Update to eliminate bogus min to ensure 0 was never passed to pause. Instead, requrest 1ms with an 'infinite' precision, which defaults to whatever the underlying time counter can do. This should ensure we run fairly quickly to start processing done events, while still giving a small pause for the system to catch its breath. This rate limiter still is less than ideal, and this commit doesn't change that. It should really have no functional change: it just uses a better interface to express the desired sleep. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45316 --- sys/geom/geom_io.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 25b3908e5fb5..02c8ed9f2bae 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -809,20 +809,17 @@ g_io_schedule_down(struct thread *tp __unused) biotrack(bp, __func__); if (pace != 0) { /* - * There has been at least one memory allocation - * failure since the last I/O completed. Pause 1ms to - * give the system a chance to free up memory. We only - * do this once because a large number of allocations - * can fail in the direct dispatch case and there's no - * relationship between the number of these failures and - * the length of the outage. If there's still an outage, - * we'll pause again and again until it's - * resolved. Older versions paused longer and once per - * allocation failure. This was OK for a single threaded - * g_down, but with direct dispatch would lead to max of - * 10 IOPs for minutes at a time when transient memory - * issues prevented allocation for a batch of requests - * from the upper layers. + * There has been at least one memory allocation failure + * since the last I/O completed. Pause 1ms to give the + * system a chance to free up memory. Pause time is not + * scaled to the number of I/O failures since they tend + * to cluster and the number is not predictive of how + * long a pause is needed. + * + * Older versions had a longer pause, which limited the + * IOPS to 10, which prolonged memory shortages that could + * be alleviated by I/O completing since it eliminated + * direct dispatch as well. * * XXX This pacing is really lame. It needs to be solved * by other methods. This is OK only because the worst @@ -833,7 +830,7 @@ g_io_schedule_down(struct thread *tp __unused) */ CTR0(KTR_GEOM, "g_down pacing self"); pause_count++; /* g_down has only one thread */ - pause("g_down", min(hz/1000, 1)); + pause_sbt("g_down", SBT_1MS, 0, 0); pace = 0; } CTR2(KTR_GEOM, "g_down processing bp %p provider %s", bp, From nobody Fri May 24 15:40:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q36gN0z5LH7S; Fri, 24 May 2024 15:40: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 4Vm8Q32K4Wz4vkX; Fri, 24 May 2024 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbfG8UrFbwaa2L3NLmcgDP1Rle+TQthwRv+7m8MZFwg=; b=uSQH+UoWGA/Q6S/sTG5Zw8zGmjKEIGwcs3ouvI5X3NDif+SV/LYCIzNCoMiqhCAlGoaob4 A1M+Ofdpr1CI8GpmGr4H0RLmrtODmZhQS4GQlQrB1VbzXYsYZmZnz46jlpF1t8ZKwoPhDc CloKjt4VWQ0+Z51oFVsvHqZZ2d9qFeWP82qH54ewWkXRpTDzHBsY3cN2klnzNQ51VNhTph QROXyIU1EEjPwVhPpH/iC8/6Uw7Mdm/jlPChnEkE2AduHBig+Y04xdQJLsKFoy5Hh18B+3 pY3TaArGqUJGvSYmw1sKbfCPEJEMY30VuMcDhm/pBpG8c1hOyrcOsn+NUu8Tuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565243; a=rsa-sha256; cv=none; b=trpWg0Pm9UHAPTBoHyTge8scM9wNX9uuax8Mz6MMOFdQzppmAjob85SXmz96p4mzhasvCQ aHUq9a7/MU5XL9ZWPicOVq/gv2pzN6zTakej7e78Z8+3xosu9bOk7XInbbB0WpA+DNNRAM nEFeJjpFF07Etp/EnUWOXyf7PMjq78mDAN01Wi9SzBAYFvto8c5oLoL3yetph3YadBEISZ QNvfSlI0sUksNJ4j2zwKH7L1+bg8CCmxeFT7iGBTy0KxN8kkzb72Tf6UcU/cxEhwlmk7Gp Q3qDQ0p/D5o2iHDFIYxqvJ6rTXYT/1cjayqg81yNnlLRl2fvluhqirK2ZUlb3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbfG8UrFbwaa2L3NLmcgDP1Rle+TQthwRv+7m8MZFwg=; b=yICYV5yPZlLoIH8npmNn3d4LBECkDZOyMf8Va3GRw7A8PvwBGQIeaxaE0pt8c+uIRxLp+1 sYLFTlOWp7IVDffxcfEX51bzUz0sHSiCex5+4i/lUB4UIP2C9luB0+zFm78MrjApaBRn5k HNiXJTvbpIIjHN6jcpegNxKMBptkQYv4M5+oEozgh60VVJOgVKE0K/Jg9vAveUbK/jcm5n QwKrprRNN3+EfKvQnT4o2+wBN/cZsU9q+FGP+kEvRASQejSQYaeiiDfeeim+7zfbzltDQy b2zE+6Gw83A90I9zADfaWN+fZVoVz6FLVFGWnyi39VVgpoJwFUV33kBqKtG2Sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm8Q31tnmzf8l; Fri, 24 May 2024 15:40: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 44OFehCT012280; Fri, 24 May 2024 15:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFeh1d012277; Fri, 24 May 2024 15:40:43 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:43 GMT Message-Id: <202405241540.44OFeh1d012277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 99c14fb99ffc - main - cam: Drop periph lock when completing I/O with ENOMEM status List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99c14fb99ffc8fd601ad15bbe54a54fac8f4f203 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=99c14fb99ffc8fd601ad15bbe54a54fac8f4f203 commit 99c14fb99ffc8fd601ad15bbe54a54fac8f4f203 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:32:04 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:32:04 +0000 cam: Drop periph lock when completing I/O with ENOMEM status When biofinish calls g_io_deliver with an error of ENOMEM, that kicks off the slowdown protocol, forcing I/O to go through g_down rather than be directly dispatch. One of the side effects is that the I/O is resubmitted, so the start routines get called recursively, leading to a recursive lock panic. Rather than make the periph lock recursive, drop and reacquire the lock around such calls to biofinish. For nda, this happens only when we can't allocate space to construct a TRIM. For ada and da, this is only for certain ZONE operations. Sponsored by: Netflix Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D45310 --- sys/cam/ata/ata_da.c | 9 +++++++++ sys/cam/nvme/nvme_da.c | 10 ++++++++++ sys/cam/scsi/scsi_da.c | 11 ++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index d4a591943307..6e008cfc8d22 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -2518,7 +2518,16 @@ adastart(struct cam_periph *periph, union ccb *start_ccb) error = ada_zone_cmd(periph, start_ccb, bp, &queue_ccb); if ((error != 0) || (queue_ccb == 0)) { + /* + * g_io_deliver will recurisvely call start + * routine for ENOMEM, so drop the periph + * lock to allow that recursion. + */ + if (error == ENOMEM) + cam_periph_unlock(periph); biofinish(bp, NULL, error); + if (error == ENOMEM) + cam_periph_lock(periph); xpt_release_ccb(start_ccb); return; } diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 3f6cf8702870..41c552e2780a 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -1077,7 +1077,17 @@ ndastart(struct cam_periph *periph, union ccb *start_ccb) trim = malloc(sizeof(*trim), M_NVMEDA, M_ZERO | M_NOWAIT); if (trim == NULL) { + /* + * We have to drop the periph lock when + * returning ENOMEM. g_io_deliver treats these + * request differently and will recursively call + * the start routine which causes us to get into + * ndastrategy with the periph lock held, + * leading to a panic when its acquired again. + */ + cam_periph_unlock(periph); biofinish(bp, NULL, ENOMEM); + cam_periph_lock(periph); xpt_release_ccb(start_ccb); ndaschedule(periph); return; diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 0daaff9229b0..59745231bca5 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -3455,10 +3455,19 @@ more: queue_ccb = 0; - error = da_zone_cmd(periph, start_ccb, bp,&queue_ccb); + error = da_zone_cmd(periph, start_ccb, bp, &queue_ccb); if ((error != 0) || (queue_ccb == 0)) { + /* + * g_io_deliver will recurisvely call start + * routine for ENOMEM, so drop the periph + * lock to allow that recursion. + */ + if (error == ENOMEM) + cam_periph_unlock(periph); biofinish(bp, NULL, error); + if (error == ENOMEM) + cam_periph_lock(periph); xpt_release_ccb(start_ccb); return; } From nobody Fri May 24 15:40:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q45ssCz5LH4j; Fri, 24 May 2024 15:40: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 4Vm8Q4358hz3whh; Fri, 24 May 2024 15:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCbKW/8cknsYxDNB+HW+mQBNPzZM4rRyn/FPMbRjU00=; b=WOiRPCgRireVM6aubO1/MbJ45oV8ibeddJEKGouxfDvDngJpBeOZxll5XJoqmfZixa+f8v UHbKHaNbAIKIlEcfDu5bEamxqEXxy7p2oYrIl2c2msASb6yfl3gVltkKHFlphfRjJyJPtw FeJrZSG7vdj23ql7UpWVQZifLBngo2oh/Ylq6CogJidJciIvbqUjh20fs32sMv2gMI+Uey 2REYProDQdu5+pC6I6M3ps5WC/MLpTsrXZ63v62M2qJBiUCPRPapkvxEahpu+i1/q8SyoB MVx8EFcIkacpx/ybiCwFyocbQR4IfV+dGKwGPMoRxvC1yBgE1UvCvfhPQtDlmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565244; a=rsa-sha256; cv=none; b=fiVYpoWGhaScrJFR/3nXWu4fcjGYVMpxwj1raB1nTHtZhGBjuH3tlrCpH1D1mwh5H9HoxT tYquPuZwEgbSclDdWHqD/tdu+q9f+ycK6MU/aD5i5WdDdUHLYJdU2JmDBvKnRCYf8OO4aK kDaNb5f4gtakG4wUl7tohfMI0l6OAiEdFKdKobCTgFHy1r2RLOUiHdKIXwHBSZb6iexxh7 pDMJ+jqO/1E3Fw4lzKF0CSRspNh1eHdLtrPYLh9/PpIPbdTjMwAT1GSL0EnKPvd7DK/r3O drqJIqcgmqLgYTFroI11nJxfSkTIcDR1cHOb94UeESk6zz2SfSX6YGgxkx9gsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCbKW/8cknsYxDNB+HW+mQBNPzZM4rRyn/FPMbRjU00=; b=TjzGnawZuBncU0MjamgW8A/q88cAX4Irvv3A6Kb49w830Qy1F8zu3MnCYxIpkxlVHRSS7z m1ywZUaJt6mZSGjBssymXJTY2MLsFn6zNs5F//pmADtB0eXo49aM42tFO6+r1Z0OycTkGM x+iQyOEqOZhNXOyGcxipktSJG24C1QTDYa5ykLuA9m6RkJ5UqjSb9oofsr1r86ra4Qz0fU tRrGI/hErTHvNs8eWJFvOos+BBlFzkL9uOqCtEgqJFRmPmWxQIK4Vow020WFv8ClMvTw/d 77xz1N20W291u6F0SPIysUdkTwnTOQhwa8Z2CfWdIe4N8QW+zBa9YBCyq0OAEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm8Q42f0Yzf8n; Fri, 24 May 2024 15:40: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 44OFei8w012326; Fri, 24 May 2024 15:40:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFei0I012323; Fri, 24 May 2024 15:40:44 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:44 GMT Message-Id: <202405241540.44OFei0I012323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: d09ee08f106d - main - nvme: Count number of alginment splits List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d09ee08f106ddabeb02affc7e9dcfea8c154a57d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d09ee08f106ddabeb02affc7e9dcfea8c154a57d commit d09ee08f106ddabeb02affc7e9dcfea8c154a57d Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:32:47 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:32:47 +0000 nvme: Count number of alginment splits When possible, we split up I/Os to NVMe drives that advertise a preferred alignment. Add a counter for this. Sponsored by: Netflix Reviewed by: chuck, mav Differential Revision: https://reviews.freebsd.org/D45311 --- sys/dev/nvme/nvme_ctrlr.c | 5 +++++ sys/dev/nvme/nvme_ns.c | 1 + sys/dev/nvme/nvme_private.h | 4 ++++ sys/dev/nvme/nvme_sysctl.c | 5 +++++ 4 files changed, 15 insertions(+) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 00e619bfdc46..d9bd1fce2864 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1442,6 +1442,8 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) ctrlr->enable_aborts = 0; TUNABLE_INT_FETCH("hw.nvme.enable_aborts", &ctrlr->enable_aborts); + ctrlr->alignment_splits = counter_u64_alloc(M_WAITOK); + /* Cap transfers by the maximum addressable by page-sized PRP (4KB pages -> 2MB). */ ctrlr->max_xfer_size = MIN(maxphys, (ctrlr->page_size / 8 * ctrlr->page_size)); if (nvme_ctrlr_construct_admin_qpair(ctrlr) != 0) @@ -1560,6 +1562,9 @@ noadminq: ctrlr->resource_id, ctrlr->resource); nores: + if (ctrlr->alignment_splits) + counter_u64_free(ctrlr->alignment_splits); + mtx_destroy(&ctrlr->lock); } diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index e494b8cd857a..201cf9188c1e 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -428,6 +428,7 @@ nvme_ns_split_bio(struct nvme_namespace *ns, struct bio *bp, if (child_bios == NULL) return (ENOMEM); + counter_u64_add(ns->ctrlr->alignment_splits, 1); for (i = 0; i < num_bios; i++) { child = child_bios[i]; err = nvme_ns_bio_process(ns, child, nvme_bio_child_done); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 69141add4e48..8415819ca20b 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -32,6 +32,7 @@ #include <sys/param.h> #include <sys/bio.h> #include <sys/bus.h> +#include <sys/counter.h> #include <sys/kernel.h> #include <sys/lock.h> #include <sys/malloc.h> @@ -317,6 +318,9 @@ struct nvme_controller { bus_dmamap_t hmb_desc_map; struct nvme_hmb_desc *hmb_desc_vaddr; uint64_t hmb_desc_paddr; + + /* Statistics */ + counter_u64_t alignment_splits; }; #define nvme_mmio_offsetof(reg) \ diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index d6452a2e5492..447f48e0bdd5 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -30,6 +30,7 @@ #include "opt_nvme.h" #include <sys/param.h> +#include <sys/systm.h> #include <sys/bus.h> #include <sys/sysctl.h> @@ -419,4 +420,8 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) nvme_sysctl_initialize_queue(&ctrlr->ioq[i], ctrlr_ctx, que_tree); } + + SYSCTL_ADD_COUNTER_U64(ctrlr_ctx, ctrlr_list, OID_AUTO, "alignment_splits", + CTLFLAG_RD, &ctrlr->alignment_splits, + "Number of times we split the I/O alignment for drives with preferred alignment"); } From nobody Fri May 24 15:43:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Th0H5Wz5LHqv; Fri, 24 May 2024 15:43:52 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Tg6mFNz3yHS; Fri, 24 May 2024 15:43:51 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/pbbCIZ0wS57HGXKb0z2dc02ep+kZYmVz7tMIl8yoNo=; b=ikKq2upobeHACI3BFbJmYDtvSlCkd5noMDTE0LVLqThy/VLe1b7u0LFQ5PVu6q16KiuMn8 fcQnqIVbF3sJIRoOzgcHy3cgN7iGOQhrpRq9op9+ML1moiABFSzsSnyMg95GhybKIbrJRR bX9nboJKA2On9n++7H7hZ2+0Evo8HIyiaAaUrQ/fs2c4tlgKk5eezKoTxlfQfsMqA2veYa HHYMqvBOn+dZPS3EpIqRzDDY1jEqVMgTFdyPNhmYO++IkoCfwTrCG28nbpaa3AinDO/DLA IPidR5xoC088AZbXSh4OHDFCeodMIsCbnn6R0EcZMkixT7otozrvy2FMSNz+ZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565431; a=rsa-sha256; cv=none; b=DwRty+054ZNmqyGOzB+9s8ZHdIx9dO4c5idMkCM3xETPFw8FCQnDcfmgMenxpinkRACM+X HPXnjHDz4VvUTkgcZk/g5TDyJG9aYraWsmyM4XBxmmF4HPo0LmGdR10NdQo5+U0u3/6uFf Fgxj9i/UZcjWiSzo1bQtzFF1g5+5bkcEGHQy5csSPc1MCE5crJVw6zFos5CA6EYkcxqUiM IM4zEafucVLgb0EEhYU4rrFMW4roDRWMx8Qo0PgGQI1Hfp8fLgzg1e4fyOx+fWr8ZsqXVl Sa20Gple17zhamiArPVYz7j906gK6ksEFkA9uE3dic1wXiYKz7owQGhLoeq8rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/pbbCIZ0wS57HGXKb0z2dc02ep+kZYmVz7tMIl8yoNo=; b=ZqIVnyFG/fVnHkXjqOxurNGqkiKX6nNgURYyJtw0K9Edywl9jQDbGNpgzTtjVMTlWy3QfS /aXwSoXhKCSz2VqRwpQOY8K9JRtUj5ydNLkHFqDD+xE3hjkbny0YcCbZAUlJCEZrYK5Tkn I68s/P/oyCVtXdkRWM5QjRDBSGT/s08FgBJdfSJ8k1RjuYo2/6xV2phvEjwmi4YN+FamRZ Uo5VT5ATbZasZpvZ4JQPDIfNAJ7ooih1BQi5QZ7AXP2CnNBVlSrxGo2sTrY8y/D6kAb+VT eeDdqDyq9MqMaMgRrPZEsbCaCZdeLxi3dX+J7rKGaqWjVUyqqEoZXmvvfAT+Rw== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vm8Tg1t37z10rF; Fri, 24 May 2024 15:43:51 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 24 May 2024 08:43:47 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: Ravi Pokala <rpokala@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly Message-ID: <ZlC1s6Bbz_hBYeIz@cell.glebi.us> References: <202405231912.44NJCLja032047@gitrepo.freebsd.org> <1B513920-69CF-434E-B5A1-45960CB99246@panasas.com> List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1B513920-69CF-434E-B5A1-45960CB99246@panasas.com> On Thu, May 23, 2024 at 12:21:23PM -0700, Ravi Pokala wrote: R> Hi Gleb, R> R> Isn't this the exact opposite of the summary? This change *doesn't* use the mutexes directly, it uses the wrappers to *avoid* using the mutexes directly. SOCKBUF_LOCK(&so->so_rcv) locks via pointer in the buffer to the socket. SOCK_RECVBUF_LOCK(so) locks directly in the socket. -- Gleb Smirnoff From nobody Fri May 24 15:56:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8m10cbsz5LJf5; Fri, 24 May 2024 15:56: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 4Vm8m0736cz40q0; Fri, 24 May 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=1716566177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4EXqIzMLDaND6jJsrQosN1raS8+XwutO+Nuvin01S0=; b=Sn8qgpxGG/YEY8RxEc8RNnI1reIqE9DVa/PuJ5ebcUgEv8Trw3UhjuoyKzNa1Zbg2Pev/R wr7oVDSuOC3xhQdpazeaOTFTF2+Vl9JApEZbsO6tBvGONqtksd1lOIBjR0fRowBqfijGH7 1BOHWZ9wmm66sla53FVxx7VlLFu4q5SojJHG2sDUKVamc0i3gbQA7aLKEY9JlkWhpHnYmx jAKhANiw/FshC+L3qAlOC7Vb71iGdXf07N0C8bDafdWWJKcczk03hnlqNsYkLg7zgGHk1T xNOpdDhrFtf7gwrsZia12e1Sf4sJ90f7zDnFS1nOXiKKANrIo5p7rPgMZvJbGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716566177; a=rsa-sha256; cv=none; b=DJqNDrZVFPJ7IF6n9WiI5g8PwcMpoRSn3yYXchQXl80v2QHXlvji6pmhg0x+v3MkYRy+mQ K10TocJJqGtBIRP/MTdpuC6kij+OQtqxudGeaaRCkW4imzl/r7tdAgT3n3G4+HoSR25iDR UDQ1+gGz6Jg5bo/wneZ2dBgKawFeZvvocP6hCLKn/XBL/dYA8RwZSXNv9u2yL8VLC4XWGT Kh999r14RrQxccUQVQEPcEeFv918VGcxmxU5XX1bYiO1zrxQG/vlcATsakVRd8EuPb2ehz m9fk+125aGGzuzG+zElvIZUoJJ7RgC5ujqSXsW0hF2tur0L8hs+ExAeNuhvVOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4EXqIzMLDaND6jJsrQosN1raS8+XwutO+Nuvin01S0=; b=x4Qog8eIHDVDq83rJniUAvCupTU5b3J1Z/eIV0+d3wxmdG87lnRYRxd5TU6MuvgJMahI84 tkazclv4V+GAXZMuMSdH3dpPzZAPboU69ItHdWLxzrOhiJNvSwbdZrdl3U6zbb7oLtNw52 qwL1TSxbfesznmnE5RwXnvQMGX3FHyeGhffRjMHnkBcnqGK2NibJGuyPLFGQ6EyefeUkb9 Ol8DQiXTDWQiaBoazYOG/+Rv7hLylECoLPm4kPdpD+I+F/QITkJUN7JIFSBl/rvJKRP98a CbUly3/ZqhAtxpB4BovzYDaPncAC+8u3zQYGzS5JaYSgoizmqUOYeZhGSdNcnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm8m06bsCzfsv; Fri, 24 May 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 44OFuGhR037620; Fri, 24 May 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 44OFuGAe037617; Fri, 24 May 2024 15:56:16 GMT (envelope-from git) Date: Fri, 24 May 2024 15:56:16 GMT Message-Id: <202405241556.44OFuGAe037617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby <rlibby@FreeBSD.org> Subject: git: a216e311a70c - main - vm_pageout_scan_inactive: take a lock break List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a216e311a70cc87a5646f4306e36c60a51706699 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a216e311a70cc87a5646f4306e36c60a51706699 commit a216e311a70cc87a5646f4306e36c60a51706699 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-05-24 15:52:58 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-05-24 15:52:58 +0000 vm_pageout_scan_inactive: take a lock break In vm_pageout_scan_inactive, release the object lock when we go to refill the scan batch queue so that someone else has a chance to acquire it. This improves access latency to the object when the pagedaemon is processing many consecutive pages from a single object, and also in any case avoids a hiccup during refill for the last touched object. Reviewed by: alc, markj (previous version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45288 --- sys/vm/vm_pageout.c | 16 +++++++++++++++- sys/vm/vm_pagequeue.h | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 8e9555c678c9..61f02eeb2f11 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1451,7 +1451,21 @@ vm_pageout_scan_inactive(struct vm_domain *vmd, int page_shortage) pq = &vmd->vmd_pagequeues[PQ_INACTIVE]; vm_pagequeue_lock(pq); vm_pageout_init_scan(&ss, pq, marker, NULL, pq->pq_cnt); - while (page_shortage > 0 && (m = vm_pageout_next(&ss, true)) != NULL) { + while (page_shortage > 0) { + /* + * If we need to refill the scan batch queue, release any + * optimistically held object lock. This gives someone else a + * chance to grab the lock, and also avoids holding it while we + * do unrelated work. + */ + if (object != NULL && vm_batchqueue_empty(&ss.bq)) { + VM_OBJECT_WUNLOCK(object); + object = NULL; + } + + m = vm_pageout_next(&ss, true); + if (m == NULL) + break; KASSERT((m->flags & PG_MARKER) == 0, ("marker page %p was dequeued", m)); diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h index 1fa80e718b71..7e133ec947b4 100644 --- a/sys/vm/vm_pagequeue.h +++ b/sys/vm/vm_pagequeue.h @@ -354,6 +354,12 @@ vm_batchqueue_init(struct vm_batchqueue *bq) bq->bq_cnt = 0; } +static inline bool +vm_batchqueue_empty(const struct vm_batchqueue *bq) +{ + return (bq->bq_cnt == 0); +} + static inline int vm_batchqueue_insert(struct vm_batchqueue *bq, vm_page_t m) { From nobody Fri May 24 15:59:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8qY3ZdBz5LK1q; Fri, 24 May 2024 15:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8qY3PSmz41SS; Fri, 24 May 2024 15:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/B6Hug5JCxYt8f9Qc90T7V1Lcbir0IZeXzdnxmNZ3w=; b=y1x44/QECnULmNryHPI8KYR3TeRt1px4vcKZG8zPprlii/A1GRFdkwHjiyx6CVmfE8d0Bi 56Ty3aj8l7lTvVowUAQRhgbMm1L2X4ETFAuz98svdJMBA081vnz7BDo/KluX2DpXKY4KoD wRcjAJU7aHmBtQIpDqczGfNNZW3twvkBPADEj1S32Sw8RmaLW9Q5ianLKw9NbQm/N6QPFu IDHF1osuDbmdFMlqti4wyHJmnjx36ZpIxKxz9Zf8zh8PlTDNYt6RS6R9fLLfp1Bi996y7f Rb/6u9SppzfzCgSVNQ9RKByshBWmVh/56xZNsfRG/T9CmCt2R05vaXOfdDCr4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716566361; a=rsa-sha256; cv=none; b=FNQSNcsMPBWHoCXX1+ud4/LLninyN0asFd0AWk0SZYUd5CqwMFL6UcJiL5pDLGv0yzQk/P 9ZiplWsydIZ03pX/P1Rx1lGyHEFyJSHU4VONKejTHKEJix3ljuZScKSD2qbNrtBIEftlL1 QsNnEMRRS1DJa9Fmzl9a26elQfhCE7TqqMEzHpvtrbuXnZWiz2k1C3vqFqEmFTIENkdq7J Ru4FhAwg/jSJoLOOqHZxQ9/a+rcsD/qeGWnxOvUOlwprm68iH8zpyuqkHAznlTY+X/xkox JJmhi1XHBzGueZfbHeMzKBf1z2XLQQsdT9wBbZOlnhZ1/MwYeSh/3s9os+dFUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/B6Hug5JCxYt8f9Qc90T7V1Lcbir0IZeXzdnxmNZ3w=; b=WJKj2/8Ipv7RDH16iI8hypnWAYV8/7bDq+2bXU3V8sFiyS3ZcvrEjCPHw/DOhY64qiSAe1 LV/ikHOw/WDjX0ZQAZ4ZBHjgP8KDDkwswV85za6TnQhm/hFz+Izm0YyFAi9BnDx2C1lYwH oPTV+GNjMhyA0SOcDQrHDo7Hfx7EFi8Qyo54H0m+RyNtcGZTU4yTCbmSOWDAsJj7cbfe1M y6yioIXWA/Rlcmaso8QUBsBc78vfRWwFwcpT2tirqOLXlU5uF1tK3aWztczZuRh6zlcs84 whC9y9iX+DP7DrtgsIwjzcaUyDvvHp4GmLJlzPBcTfkq2XuqPXAw3IAN+Fd49A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm8qY30X8zfqX; Fri, 24 May 2024 15:59: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 44OFxL6p038342; Fri, 24 May 2024 15:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFxHbI038322; Fri, 24 May 2024 15:59:17 GMT (envelope-from git) Date: Fri, 24 May 2024 15:59:17 GMT Message-Id: <202405241559.44OFxHbI038322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric <dim@FreeBSD.org> Subject: git: 3a0793336edf - main - Merge llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a0793336edfc21cb6d4c8c5c5d7f1665f3e6c5a Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3a0793336edfc21cb6d4c8c5c5d7f1665f3e6c5a commit 3a0793336edfc21cb6d4c8c5c5d7f1665f3e6c5a Merge: a216e311a70c c6bcacc7c9d8 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-05-24 15:51:19 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-05-24 15:58:04 +0000 Merge llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67. PR: 276104 MFC after: 3 days .../clang/lib/CodeGen/CodeGenModule.cpp | 14 +++++ .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 3 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 7 ++- .../clang/lib/Format/WhitespaceManager.cpp | 2 +- .../clang/lib/Interpreter/IncrementalParser.cpp | 24 ++++++-- .../clang/lib/Interpreter/IncrementalParser.h | 5 ++ .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 25 +++++++-- contrib/llvm-project/libcxx/src/atomic.cpp | 16 +++++- contrib/llvm-project/libcxx/src/chrono.cpp | 4 +- contrib/llvm-project/lld/ELF/Relocations.cpp | 5 +- .../llvm/include/llvm/CodeGen/MachineFrameInfo.h | 7 +++ .../llvm/lib/Analysis/InstructionSimplify.cpp | 4 ++ .../lib/CodeGen/InterleavedLoadCombinePass.cpp | 3 + .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 +- .../Target/AArch64/AArch64Arm64ECCallLowering.cpp | 16 ++++-- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 3 +- .../AArch64/GISel/AArch64GlobalISelUtils.cpp | 6 ++ .../Target/AArch64/GISel/AArch64LegalizerInfo.cpp | 1 + .../AArch64/GISel/AArch64RegisterBankInfo.cpp | 5 +- .../llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 2 +- .../llvm/lib/Target/AMDGPU/SIInstrInfo.h | 11 ++++ .../llvm/lib/Target/AMDGPU/SOPInstructions.td | 2 +- .../llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp | 57 ++++++------------- .../Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp | 8 +-- .../Target/RISCV/MCTargetDesc/RISCVELFStreamer.h | 1 - .../lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp | 2 - .../RISCV/MCTargetDesc/RISCVTargetStreamer.cpp | 5 ++ .../RISCV/MCTargetDesc/RISCVTargetStreamer.h | 5 ++ .../llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 32 +++++++++-- .../lib/Target/RISCV/RISCVExpandPseudoInsts.cpp | 5 +- .../llvm/lib/Target/RISCV/RISCVFeatures.td | 5 ++ .../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 9 ++- .../llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp | 65 +++++++++++++--------- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 6 +- .../llvm/lib/Target/X86/X86InstrAVX512.td | 42 +++++++------- .../llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 7 ++- .../llvm/lib/Transforms/IPO/GlobalOpt.cpp | 3 + .../Transforms/InstCombine/InstCombineSelect.cpp | 14 ++++- .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 21 +------ lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 46 files changed, 316 insertions(+), 169 deletions(-) diff --cc lib/clang/include/VCSVersion.inc index c4bb0df4e3a5,000000000000..941c98e43c9a mode 100644,000000..100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@@ -1,8 -1,0 +1,8 @@@ - #define LLVM_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define LLVM_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" + - #define CLANG_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define CLANG_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" + - #define LLDB_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define LLDB_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --cc lib/clang/include/clang/Basic/Version.inc index c243016c5f73,000000000000..405ee341dfcd mode 100644,000000..100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@@ -1,8 -1,0 +1,8 @@@ - #define CLANG_VERSION 18.1.5 - #define CLANG_VERSION_STRING "18.1.5" ++#define CLANG_VERSION 18.1.6 ++#define CLANG_VERSION_STRING "18.1.6" +#define CLANG_VERSION_MAJOR 18 +#define CLANG_VERSION_MAJOR_STRING "18" +#define CLANG_VERSION_MINOR 1 - #define CLANG_VERSION_PATCHLEVEL 5 ++#define CLANG_VERSION_PATCHLEVEL 6 + +#define CLANG_VENDOR "FreeBSD " diff --cc lib/clang/include/lld/Common/Version.inc index 8b21c19f95ba,000000000000..1de090a4b4d0 mode 100644,000000..100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@@ -1,4 -1,0 +1,4 @@@ +// Local identifier in __FreeBSD_version style +#define LLD_FREEBSD_VERSION 1500000 + - #define LLD_VERSION_STRING "18.1.5 (FreeBSD llvmorg-18.1.5-0-g617a15a9eac9-" __XSTRING(LLD_FREEBSD_VERSION) ")" ++#define LLD_VERSION_STRING "18.1.6 (FreeBSD llvmorg-18.1.6-0-g1118c2e05e67-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --cc lib/clang/include/lldb/Version/Version.inc index 0e86bd2e01ba,000000000000..c693f099ccff mode 100644,000000..100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@@ -1,6 -1,0 +1,6 @@@ - #define LLDB_VERSION 18.1.5 - #define LLDB_VERSION_STRING "18.1.5" ++#define LLDB_VERSION 18.1.6 ++#define LLDB_VERSION_STRING "18.1.6" +#define LLDB_VERSION_MAJOR 18 +#define LLDB_VERSION_MINOR 1 - #define LLDB_VERSION_PATCH 5 ++#define LLDB_VERSION_PATCH 6 +/* #undef LLDB_FULL_VERSION_STRING */ diff --cc lib/clang/include/llvm/Config/config.h index 0760c0b17a87,000000000000..65e903427a83 mode 100644,000000..100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@@ -1,378 -1,0 +1,378 @@@ +#ifndef CONFIG_H +#define CONFIG_H + +// Include this header only under the llvm source tree. +// This is a private header. + +/* Exported configuration */ +#include "llvm/Config/llvm-config.h" + +/* Bug report URL. */ +#define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" + +/* Define to 1 to enable backtraces, and to 0 otherwise. */ +#define ENABLE_BACKTRACES 1 + +/* Define to 1 to enable crash overrides, and to 0 otherwise. */ +#define ENABLE_CRASH_OVERRIDES 1 + +/* Define to 1 to enable crash memory dumps, and to 0 otherwise. */ +#define LLVM_ENABLE_CRASH_DUMPS 0 + +/* Define to 1 to prefer forward slashes on Windows, and to 0 prefer + backslashes. */ +#define LLVM_WINDOWS_PREFER_FORWARD_SLASH 0 + +/* Define to 1 if you have the `backtrace' function. */ +#define HAVE_BACKTRACE TRUE + +#define BACKTRACE_HEADER <execinfo.h> + +/* Define to 1 if you have the <CrashReporterClient.h> header file. */ +/* #undef HAVE_CRASHREPORTERCLIENT_H */ + +/* can use __crashreporter_info__ */ +#if defined(__APPLE__) +#define HAVE_CRASHREPORTER_INFO 1 +#else +#define HAVE_CRASHREPORTER_INFO 0 +#endif + +/* Define to 1 if you have the declaration of `arc4random', and to 0 if you + don't. */ +#define HAVE_DECL_ARC4RANDOM 1 + +/* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you + don't. */ +#define HAVE_DECL_FE_ALL_EXCEPT 1 + +/* Define to 1 if you have the declaration of `FE_INEXACT', and to 0 if you + don't. */ +#define HAVE_DECL_FE_INEXACT 1 + +/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_S 0 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if dlopen() is available on this platform. */ +#define HAVE_DLOPEN 1 + +/* Define if dladdr() is available on this platform. */ +#define HAVE_DLADDR 1 + +#if !defined(__arm__) || defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__) +/* Define to 1 if we can register EH frames on this platform. */ +#define HAVE_REGISTER_FRAME 1 + +/* Define to 1 if we can deregister EH frames on this platform. */ +#define HAVE_DEREGISTER_FRAME 1 +#endif // !arm || USING_SJLJ_EXCEPTIONS || ARM_DWARF_EH_ + +/* Define if __unw_add_dynamic_fde() is available on this platform. */ +/* #undef HAVE_UNW_ADD_DYNAMIC_FDE */ + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the <fenv.h> header file. */ +#define HAVE_FENV_H 1 + +/* Define if libffi is available on this platform. */ +/* #undef HAVE_FFI_CALL */ + +/* Define to 1 if you have the <ffi/ffi.h> header file. */ +/* #undef HAVE_FFI_FFI_H */ + +/* Define to 1 if you have the <ffi.h> header file. */ +/* #undef HAVE_FFI_H */ + +/* Define to 1 if you have the `futimens' function. */ +#define HAVE_FUTIMENS 1 + +/* Define to 1 if you have the `futimes' function. */ +#define HAVE_FUTIMES 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the `isatty' function. */ +#define HAVE_ISATTY 1 + +/* Define to 1 if you have the `edit' library (-ledit). */ +#define HAVE_LIBEDIT TRUE + +/* Define to 1 if you have the `pfm' library (-lpfm). */ +/* #undef HAVE_LIBPFM */ + +/* Define to 1 if the `perf_branch_entry' struct has field cycles. */ +/* #undef LIBPFM_HAS_FIELD_CYCLES */ + +/* Define to 1 if you have the `psapi' library (-lpsapi). */ +/* #undef HAVE_LIBPSAPI */ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the `pthread_getname_np' function. */ +#define HAVE_PTHREAD_GETNAME_NP 1 + +/* Define to 1 if you have the `pthread_setname_np' function. */ +#define HAVE_PTHREAD_SETNAME_NP 1 + +/* Define to 1 if you have the <link.h> header file. */ +#if __has_include(<link.h>) +#define HAVE_LINK_H 1 +#else +#define HAVE_LINK_H 0 +#endif + +/* Define to 1 if you have the <mach/mach.h> header file. */ +#if __has_include(<mach/mach.h>) +#define HAVE_MACH_MACH_H 1 +#endif + +/* Define to 1 if you have the `mallctl' function. */ +#if defined(__FreeBSD__) +#define HAVE_MALLCTL 1 +#endif + +/* Define to 1 if you have the `mallinfo' function. */ +#if defined(__linux__) +#define HAVE_MALLINFO 1 +#endif + +/* Define to 1 if you have the `mallinfo2' function. */ +/* #undef HAVE_MALLINFO2 */ + +/* Define to 1 if you have the <malloc/malloc.h> header file. */ +#if __has_include(<malloc/malloc.h>) +#define HAVE_MALLOC_MALLOC_H 1 +#endif + +/* Define to 1 if you have the `malloc_zone_statistics' function. */ +#if defined(__APPLE__) +#define HAVE_MALLOC_ZONE_STATISTICS 1 +#endif + +/* Define to 1 if you have the `posix_spawn' function. */ +#define HAVE_POSIX_SPAWN 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the <pthread.h> header file. */ +#define HAVE_PTHREAD_H 1 + +/* Have pthread_mutex_lock */ +#define HAVE_PTHREAD_MUTEX_LOCK 1 + +/* Have pthread_rwlock_init */ +#define HAVE_PTHREAD_RWLOCK_INIT 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `sigaltstack' function. */ +#define HAVE_SIGALTSTACK 1 + +/* Define to 1 if you have the <signal.h> header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/resource.h> header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if stat struct has st_mtimespec member .*/ +#if !defined(__linux__) +#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 +#endif + +/* Define to 1 if stat struct has st_mtim member. */ +#if !defined(__APPLE__) +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +#endif + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if the setupterm() function is supported this platform. */ +#if defined(__FreeBSD__) +/* + * This is only needed for terminalHasColors(). When disabled LLVM falls back + * to checking a list of TERM prefixes which is sufficient for a bootstrap tool. + */ +#define LLVM_ENABLE_TERMINFO TRUE +#endif + +/* Define to 1 if you have the <termios.h> header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the <valgrind/valgrind.h> header file. */ +/* #undef HAVE_VALGRIND_VALGRIND_H */ + +/* Have host's _alloca */ +/* #undef HAVE__ALLOCA */ + +/* Define to 1 if you have the `_chsize_s' function. */ +/* #undef HAVE__CHSIZE_S */ + +/* Define to 1 if you have the `_Unwind_Backtrace' function. */ +#define HAVE__UNWIND_BACKTRACE 1 + +/* Have host's __alloca */ +/* #undef HAVE___ALLOCA */ + +/* Have host's __ashldi3 */ +/* #undef HAVE___ASHLDI3 */ + +/* Have host's __ashrdi3 */ +/* #undef HAVE___ASHRDI3 */ + +/* Have host's __chkstk */ +/* #undef HAVE___CHKSTK */ + +/* Have host's __chkstk_ms */ +/* #undef HAVE___CHKSTK_MS */ + +/* Have host's __cmpdi2 */ +/* #undef HAVE___CMPDI2 */ + +/* Have host's __divdi3 */ +/* #undef HAVE___DIVDI3 */ + +/* Have host's __fixdfdi */ +/* #undef HAVE___FIXDFDI */ + +/* Have host's __fixsfdi */ +/* #undef HAVE___FIXSFDI */ + +/* Have host's __floatdidf */ +/* #undef HAVE___FLOATDIDF */ + +/* Have host's __lshrdi3 */ +/* #undef HAVE___LSHRDI3 */ + +/* Have host's __main */ +/* #undef HAVE___MAIN */ + +/* Have host's __moddi3 */ +/* #undef HAVE___MODDI3 */ + +/* Have host's __udivdi3 */ +/* #undef HAVE___UDIVDI3 */ + +/* Have host's __umoddi3 */ +/* #undef HAVE___UMODDI3 */ + +/* Have host's ___chkstk */ +/* #undef HAVE____CHKSTK */ + +/* Have host's ___chkstk_ms */ +/* #undef HAVE____CHKSTK_MS */ + +/* Linker version detected at compile time. */ +/* #undef HOST_LINK_VERSION */ + +/* Define if overriding target triple is enabled */ +/* #undef LLVM_TARGET_TRIPLE_ENV */ + +/* Whether tools show host and target info when invoked with --version */ +#define LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO 1 + +/* Define if libxml2 is supported on this platform. */ +/* #undef LLVM_ENABLE_LIBXML2 */ + +/* Define to the extension used for shared libraries, say, ".so". */ +#if defined(__APPLE__) +#define LTDL_SHLIB_EXT ".dylib" +#else +#define LTDL_SHLIB_EXT ".so" +#endif + +/* Define to the extension used for plugin libraries, say, ".so". */ +#if defined(__APPLE__) +#define LLVM_PLUGIN_EXT ".dylib" +#else +#define LLVM_PLUGIN_EXT ".so" +#endif + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freebsd.org/submit/" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "LLVM" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "LLVM 18.1.5" ++#define PACKAGE_STRING "LLVM 18.1.6" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "18.1.5" ++#define PACKAGE_VERSION "18.1.6" + +/* Define to the vendor of this package. */ +/* #undef PACKAGE_VENDOR */ + +/* Define to a function implementing stricmp */ +/* #undef stricmp */ + +/* Define to a function implementing strdup */ +/* #undef strdup */ + +/* Whether GlobalISel rule coverage is being collected */ +#define LLVM_GISEL_COV_ENABLED 0 + +/* Define to the default GlobalISel coverage file prefix */ +/* #undef LLVM_GISEL_COV_PREFIX */ + +/* Whether Timers signpost passes in Xcode Instruments */ +#if defined(__APPLE__) +#define LLVM_SUPPORT_XCODE_SIGNPOSTS 1 +#else +#define LLVM_SUPPORT_XCODE_SIGNPOSTS 0 +#endif + +/* #undef HAVE_PROC_PID_RUSAGE */ + +#define HAVE_BUILTIN_THREAD_POINTER 1 + +#endif diff --cc lib/clang/include/llvm/Config/llvm-config.h index 049529efdd7f,000000000000..372a69017f79 mode 100644,000000..100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@@ -1,229 -1,0 +1,229 @@@ +/*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/ +/* */ +/* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ +/* Exceptions. */ +/* See https://llvm.org/LICENSE.txt for license information. */ +/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ +/* */ +/*===----------------------------------------------------------------------===*/ + +/* This file enumerates variables from the LLVM configuration so that they + can be in exported headers and won't override package specific directives. + This is a C header that can be included in the llvm-c headers. */ + +#ifndef LLVM_CONFIG_H +#define LLVM_CONFIG_H + +/* Define if LLVM_ENABLE_DUMP is enabled */ +/* #undef LLVM_ENABLE_DUMP */ + +/* Target triple LLVM will generate code for by default */ +/* Doesn't use `cmakedefine` because it is allowed to be empty. */ +/* #undef LLVM_DEFAULT_TARGET_TRIPLE */ + +/* Define if threads enabled */ +#define LLVM_ENABLE_THREADS 1 + +/* Has gcc/MSVC atomic intrinsics */ +#define LLVM_HAS_ATOMICS 1 + +/* Host triple LLVM will be executed on */ +/* #undef LLVM_HOST_TRIPLE */ + +/* LLVM architecture name for the native architecture, if available */ +/* #undef LLVM_NATIVE_ARCH */ + +/* LLVM name for the native AsmParser init function, if available */ +/* #undef LLVM_NATIVE_ASMPARSER */ + +/* LLVM name for the native AsmPrinter init function, if available */ +/* #undef LLVM_NATIVE_ASMPRINTER */ + +/* LLVM name for the native Disassembler init function, if available */ +/* #undef LLVM_NATIVE_DISASSEMBLER */ + +/* LLVM name for the native Target init function, if available */ +/* #undef LLVM_NATIVE_TARGET */ + +/* LLVM name for the native TargetInfo init function, if available */ +/* #undef LLVM_NATIVE_TARGETINFO */ + +/* LLVM name for the native target MC init function, if available */ +/* #undef LLVM_NATIVE_TARGETMC */ + +/* LLVM name for the native target MCA init function, if available */ +/* #undef LLVM_NATIVE_TARGETMCA */ + +/* Define if the AArch64 target is built in */ +#ifdef LLVM_TARGET_ENABLE_AARCH64 +#define LLVM_HAS_AARCH64_TARGET 1 +#else +#define LLVM_HAS_AARCH64_TARGET 0 +#endif + +/* Define if the AMDGPU target is built in */ +#define LLVM_HAS_AMDGPU_TARGET 0 + +/* Define if the ARC target is built in */ +#define LLVM_HAS_ARC_TARGET 0 + +/* Define if the ARM target is built in */ +#ifdef LLVM_TARGET_ENABLE_ARM +#define LLVM_HAS_ARM_TARGET 1 +#else +#define LLVM_HAS_ARM_TARGET 0 +#endif + +/* Define if the AVR target is built in */ +#define LLVM_HAS_AVR_TARGET 0 + +/* Define if the BPF target is built in */ +#ifdef LLVM_TARGET_ENABLE_BPF +#define LLVM_HAS_BPF_TARGET 1 +#else +#define LLVM_HAS_BPF_TARGET 0 +#endif + +/* Define if the CSKY target is built in */ +#define LLVM_HAS_CSKY_TARGET 0 + +/* Define if the DirectX target is built in */ +#define LLVM_HAS_DIRECTX_TARGET 0 + +/* Define if the Hexagon target is built in */ +#define LLVM_HAS_HEXAGON_TARGET 0 + +/* Define if the Lanai target is built in */ +#define LLVM_HAS_LANAI_TARGET 0 + +/* Define if the LoongArch target is built in */ +#define LLVM_HAS_LOONGARCH_TARGET 0 + +/* Define if the M68k target is built in */ +#define LLVM_HAS_M68K_TARGET 0 + +/* Define if the Mips target is built in */ +#ifdef LLVM_TARGET_ENABLE_MIPS +#define LLVM_HAS_MIPS_TARGET 1 +#else +#define LLVM_HAS_MIPS_TARGET 0 +#endif + +/* Define if the MSP430 target is built in */ +#define LLVM_HAS_MSP430_TARGET 0 + +/* Define if the NVPTX target is built in */ +#define LLVM_HAS_NVPTX_TARGET 0 + +/* Define if the PowerPC target is built in */ +#ifdef LLVM_TARGET_ENABLE_POWERPC +#define LLVM_HAS_POWERPC_TARGET 1 +#else +#define LLVM_HAS_POWERPC_TARGET 0 +#endif + +/* Define if the RISCV target is built in */ +#ifdef LLVM_TARGET_ENABLE_RISCV +#define LLVM_HAS_RISCV_TARGET 1 +#else +#define LLVM_HAS_RISCV_TARGET 0 +#endif + +/* Define if the Sparc target is built in */ +#define LLVM_HAS_SPARC_TARGET 0 + +/* Define if the SPIRV target is built in */ +#define LLVM_HAS_SPIRV_TARGET 0 + +/* Define if the SystemZ target is built in */ +#define LLVM_HAS_SYSTEMZ_TARGET 0 + +/* Define if the VE target is built in */ +#define LLVM_HAS_VE_TARGET 0 + +/* Define if the WebAssembly target is built in */ +#define LLVM_HAS_WEBASSEMBLY_TARGET 0 + +/* Define if the X86 target is built in */ +#ifdef LLVM_TARGET_ENABLE_X86 +#define LLVM_HAS_X86_TARGET 1 +#else +#define LLVM_HAS_X86_TARGET 0 +#endif + +/* Define if the XCore target is built in */ +#define LLVM_HAS_XCORE_TARGET 0 + +/* Define if the Xtensa target is built in */ +#define LLVM_HAS_XTENSA_TARGET 0 + +/* Define if this is Unixish platform */ +#define LLVM_ON_UNIX 1 + +/* Define if we have the Intel JIT API runtime support library */ +#define LLVM_USE_INTEL_JITEVENTS 0 + +/* Define if we have the oprofile JIT-support library */ +#define LLVM_USE_OPROFILE 0 + +/* Define if we have the perf JIT-support library */ +#define LLVM_USE_PERF 0 + +/* Major version of the LLVM API */ +#define LLVM_VERSION_MAJOR 18 + +/* Minor version of the LLVM API */ +#define LLVM_VERSION_MINOR 1 + +/* Patch version of the LLVM API */ - #define LLVM_VERSION_PATCH 5 ++#define LLVM_VERSION_PATCH 6 + +/* LLVM version string */ - #define LLVM_VERSION_STRING "18.1.5" ++#define LLVM_VERSION_STRING "18.1.6" + +/* Whether LLVM records statistics for use with GetStatistics(), + * PrintStatistics() or PrintStatisticsJSON() + */ +#define LLVM_FORCE_ENABLE_STATS 0 + +/* Define if we have z3 and want to build it */ +/* #undef LLVM_WITH_Z3 */ + +/* Define if we have curl and want to use it */ +/* #undef LLVM_ENABLE_CURL */ + +/* Define if we have cpp-httplib and want to use it */ +/* #undef LLVM_ENABLE_HTTPLIB */ + +/* Define if zlib compression is available */ +#define LLVM_ENABLE_ZLIB 1 + +/* Define if zstd compression is available */ +#define LLVM_ENABLE_ZSTD 1 + +/* Define if LLVM is using tflite */ +/* #undef LLVM_HAVE_TFLITE */ + +/* Define to 1 if you have the <sysexits.h> header file. */ +#define HAVE_SYSEXITS_H 1 + +/* Define if building libLLVM shared library */ +/* #undef LLVM_BUILD_LLVM_DYLIB */ + +/* Define if building LLVM with BUILD_SHARED_LIBS */ +/* #undef LLVM_BUILD_SHARED_LIBS */ + +/* Define if building LLVM with LLVM_FORCE_USE_OLD_TOOLCHAIN_LIBS */ +/* #undef LLVM_FORCE_USE_OLD_TOOLCHAIN */ + +/* Define if llvm_unreachable should be optimized with undefined behavior + * in non assert builds */ +#define LLVM_UNREACHABLE_OPTIMIZE 1 + +/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */ +#define LLVM_ENABLE_DIA_SDK 0 + +/* Define if plugins enabled */ +/* #undef LLVM_ENABLE_PLUGINS */ + +#endif diff --cc lib/clang/include/llvm/Support/VCSRevision.h index 433b2b53b8fe,000000000000..9c8ecebe02de mode 100644,000000..100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@@ -1,2 -1,0 +1,2 @@@ - #define LLVM_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define LLVM_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Fri May 24 20:48:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmHDg1j2Fz5LvcK; Fri, 24 May 2024 20:48: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 4VmHDg18zkz4YGh; Fri, 24 May 2024 20:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716583683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBDwmhP4UhBqmkPyV2DmBKWQgFzjIBUXONw3KBewr1Q=; b=gXbFSejfbWWP4jAmkJ7dk8m6HMLd0d6w6KubbeT74bOl2nL3tgSYA0R6qIpeRQQn7bL8FC WqpiKZc5woalm6zDaae8I0a3caZgIGl5QggXcOuPDME2lE9eJsIvMaLS5wcLzPB5HMliBk HvvcQ5HHNRiUlYFTWAXWdxDr/RM/C6SUBf0pruxga8ggnixIjmpccW4+e8uaDWkKhqUXBq PXGM4nQZoPGMzZevo+4LObg8ChSOnFrqwLqIQ9G153HgbP/mDwagTCfS3kqx20o4ppgIHm dM5Zrgrj86DeNrFRtqduYzxy7mIPcCHQXF6DXdUHkI2wss35dWEvnNurD10BjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716583683; a=rsa-sha256; cv=none; b=OXkTVLyI+YrpabR+riFDyoPFjFVqNL4uIciRgm6Ze2TmjicLspS9iHfxRlo4neB+jF5BVY JqlrIQL0cwdgw0mb9wfw95SF+F2WO1Pe326l1kzRjeVxXNQZuRxzuLwNtMajLuLgBsShEB T0qaL63lTwPAyfemFsbHNppbngoD/g7maGbFzuCaMJdW1g8WELaqCzJ1GoVFrUlmN2weM2 Cl89NmvMUe5WyzrjkpDUhYZzbYTJcmetElbOYLINuoyiXYC1PxkcTP8ax9ec+rQLJrDLtv seGTO3IgQx9KQxvZknku1DY73k2uVR10N4pEKAJ+GSjj4D3g4zLin6KFy5ugYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716583683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBDwmhP4UhBqmkPyV2DmBKWQgFzjIBUXONw3KBewr1Q=; b=aOEmPhXda0dtcyHT8FV3ZfOJ4dZ4NWQItkHAO0V174LFACJqqTY2CvZGLp0o8h5c9CUM4h k23Va4CplimpTJsJkB+sPXcnrAZBzqplnl5yo184HAmoL3TZB3WUxAO/rBRCYuXi0cwojA BBK06GSlppRWFP0LCEtz4LJm+Rk68dVB+08+8uj3NEiA+cvQCqX8jyhXO1GhkvsSg34zJu srk60Q7U8SfNs+OBMMmwGtlgGqhhQ7MgDUvC/TTdJKGB0onBNcUyK/I28yih1awG0/KmYt Orn7Q3DydaACcmsSnUG+ALmM+gq0Y0FxlFzu9pUoHfdXIOlrWpaghjNI70DkXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmHDg0f1Jznsd; Fri, 24 May 2024 20:48: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 44OKm2Np030557; Fri, 24 May 2024 20:48:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OKm267030554; Fri, 24 May 2024 20:48:02 GMT (envelope-from git) Date: Fri, 24 May 2024 20:48:02 GMT Message-Id: <202405242048.44OKm267030554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: 61639bb3fc5a - main - libc: move NIS xdr_* symbols from rpc's to yp's Symbol.map List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61639bb3fc5abe0bb7b096e643b51c30703ac432 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=61639bb3fc5abe0bb7b096e643b51c30703ac432 commit 61639bb3fc5abe0bb7b096e643b51c30703ac432 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-24 17:27:29 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-24 20:47:37 +0000 libc: move NIS xdr_* symbols from rpc's to yp's Symbol.map To fix WITHOUT_NIS build. Building yp_xdr.c is gated by MK_NIS. PR: 279270 Reported by: peterj Reported by: matteo Reported by: Michael Dexter's Build Option Survey run Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45347 --- lib/libc/rpc/Symbol.map | 31 ------------------------------- lib/libc/yp/Symbol.map | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map index 5bf364f28d81..e4fecb83ec66 100644 --- a/lib/libc/rpc/Symbol.map +++ b/lib/libc/rpc/Symbol.map @@ -8,37 +8,6 @@ FBSD_1.0 { xdr_desargs; xdr_desresp; - /* From yp_xdr.c (generated by rpcgen - include/rpcsvc/yp.x) */ - xdr_domainname; - xdr_keydat; - xdr_mapname; - xdr_peername; - xdr_valdat; - xdr_ypbind_binding; - xdr_ypbind_resp; - xdr_ypbind_resptype; - xdr_ypbind_setdom; - xdr_ypmap_parms; - xdr_ypmaplist; - xdr_yppush_status; - xdr_yppushresp_xfr; - xdr_ypreq_key; - xdr_ypreq_nokey; - xdr_ypreq_xfr; - xdr_ypreqtype; - xdr_yprequest; - xdr_ypresp_all; - xdr_ypresp_key_val; - xdr_ypresp_maplist; - xdr_ypresp_master; - xdr_ypresp_order; - xdr_ypresp_val; - xdr_ypresp_xfr; - xdr_ypresponse; - xdr_ypresptype; - xdr_ypstat; - xdr_ypxfrstat; - authdes_seccreate; authdes_pk_seccreate; authnone_create; diff --git a/lib/libc/yp/Symbol.map b/lib/libc/yp/Symbol.map index fff2b2e60e39..f50beed7be31 100644 --- a/lib/libc/yp/Symbol.map +++ b/lib/libc/yp/Symbol.map @@ -18,4 +18,36 @@ FBSD_1.0 { yperr_string; ypprot_err; _yp_check; + + /* From yp_xdr.c (generated by rpcgen - include/rpcsvc/yp.x) */ + xdr_domainname; + xdr_keydat; + xdr_mapname; + xdr_peername; + xdr_valdat; + xdr_ypbind_binding; + xdr_ypbind_resp; + xdr_ypbind_resptype; + xdr_ypbind_setdom; + xdr_ypmap_parms; + xdr_ypmaplist; + xdr_yppush_status; + xdr_yppushresp_xfr; + xdr_ypreq_key; + xdr_ypreq_nokey; + xdr_ypreq_xfr; + xdr_ypreqtype; + xdr_yprequest; + xdr_ypresp_all; + xdr_ypresp_key_val; + xdr_ypresp_maplist; + xdr_ypresp_master; + xdr_ypresp_order; + xdr_ypresp_val; + xdr_ypresp_xfr; + xdr_ypresponse; + xdr_ypresptype; + xdr_ypstat; + xdr_ypxfrstat; + }; From nobody Fri May 24 23:55:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmMP40Jq4z5LYYp; Fri, 24 May 2024 23:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmMP363Wjz4snX; Fri, 24 May 2024 23:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716594935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEZsWcM//4A6MTk1VT6ukuq4Z997D4xErQc0FvBlNnw=; b=JIw1ZTiIoz/2qScZucW3Jviyce2ldyMSQQACN+exFrXPbmk1tZG93LdXjcMFLN7ZcKR2Fj vToFcyqeFFSi3zSdmziBPshIPG5ZdDrZRKc6ADYqeu1pGdYxPXGPyXggb8MDKR0nat1s+y PLYJQUPyOBpRQxUY1ugklqatDMQ7QRrY3bpKTR+8i04fxrY8b6xqILwgjd1qpXfu9xHTGK a2MHYF1yy3v8WkXcqsgIfM45dJubnthyUBPJq/jhKhoxhc9cZaSyze5vc+UlIcvUJhNmv2 rzwn8E0WV1l7qqJNGUQYVP3b7PiiNqiPRRb8+aXQIKQyPmwyJU6kPdpBq6P1fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716594935; a=rsa-sha256; cv=none; b=vRyS1Eig0OVkmVDnPgtlKrNJPZ8nsVNOyJFNsa4Xd5iv7Oyb/pnkWtgPbAjS4knghwhNvp rhPrJcLrbNhOCO7DWuQ8YZD4A/NlSeDhUWBtktys+JaCB6mCLUKJQUcoq86lQNrZGRy5Kk 1yB4NIlRDqPh9FsaPM8BdRvKP0b4YZVBYM+HvzS4xxEnZugwMyjrW4QhdyNtW8nfEkagjS Zt3ntnoGmyRTCCJRo70DgMJjvAUFAPuGTOFk8Eae8J6SlMTMho1F+ziLHJxlXD9S6fHuSs Tey9ICvJI/N/z8QVYRifYWL75ikJO+9r/a94Q7UIjdM5SE0LqJ2++Ieo5R+TMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716594935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEZsWcM//4A6MTk1VT6ukuq4Z997D4xErQc0FvBlNnw=; b=gfGfJAgnFYP0eWLkdaGt+pJ3vouTmJApyyb2HS/AiUVGM+iixQbjO5iz7Bi5OCoOj+N+2r b91U5iCF6YlJTLU25Sp6A59rB37AugVB99Z2/lnHR8x6hrFdE8BorXB3xVEedkLVrTBRL7 +YR7G4eXLEBzkvFlwesRgyZA56mAaN1I0Ef2X0zmTwUv0T3TjdKvIEZ5jwjRUat+n/N+1U W2aYTOHpcQoYngyqSpuzEgaF10myPvc+bDT3tG9OJgZ8s9jYD/MyAX/u2qOdgqNFdQhQYU Jy0BYn7ulAJv5t6iFo4e7FL+cOpAdFsPFDhEQ5fPsIPVGMXIX93CnAwbDab8yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmMP35YVQztn6; Fri, 24 May 2024 23:55:35 +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 44ONtZ2G049989; Fri, 24 May 2024 23:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ONtZal049986; Fri, 24 May 2024 23:55:35 GMT (envelope-from git) Date: Fri, 24 May 2024 23:55:35 GMT Message-Id: <202405242355.44ONtZal049986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: f52481f3b8a3 - main - vt(4): add note about sc/UEFI incompatibility List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f52481f3b8a377e336ecba1b5150023a344ec189 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f52481f3b8a377e336ecba1b5150023a344ec189 commit f52481f3b8a377e336ecba1b5150023a344ec189 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-24 21:45:14 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-24 23:55:10 +0000 vt(4): add note about sc/UEFI incompatibility syscons is not compatible with UEFI boot. This is noted in syscons(4), but not mentioned in vt(4) where the kern.vty tunable (used to select vt or sc) is documented. Add a note so that if someone reads vt(4) but not sc(4) they are not surprised by having no usable console. PR: 276206 Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45357 --- share/man/man4/vt.4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index ed4da98df673..45e6c0ceb979 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 8, 2023 +.Dd May 24, 2024 .Dt "VT" 4 .Os .Sh NAME @@ -220,6 +220,11 @@ The kernel uses .Nm when this value is not set. +Note that +.Ql sc +is not compatible with +.Xr UEFI 8 +boot. .It Va kern.vt.color. Ns Ar colornum Ns Va .rgb Set this value to override default palette entry for color .Pa colornum From nobody Sat May 25 04:18:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTDV6VtDz5M4Mq; Sat, 25 May 2024 04:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmTDV5WWQz4DR2; Sat, 25 May 2024 04:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716610714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8v1eREaCVd7SyQWuxkCVtqcHV0wgPEHAuAZGwrs2K3E=; b=hLKDqzB4Sc8pFYQbAcZprLUeqIxHuFvsYyLhRakT2RtLTKsHgHY4doRCjjAokAs+Z7kJil aKS3XeJfK7me+wZvz2YNoB6SIOhgO8pDLZOpdJzYMACxvkmMKODZlILcDBVZ9uxEmdLatK QcdxtNFVjDTqO+rkf6QXw7hG2EClp88/mMLvi+nJJtNcEY3qmipmXWlVxyK6ihjdyVWjcF cL0n0R6WfzTcB/K5GwKYJORk3fDzbbyOrONOG+b4IFhrDLUxDpxuYFWfP8yj4JYMoMe0rm tnKP38CgJp7/4Ar7Uh8YvlNkLdJFNLGJKrE4qXVOzH2/0U2Fa0/EOd160SagjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716610714; a=rsa-sha256; cv=none; b=VtrrQgWX+SNIeKD0pzAgglCBxMf2/MBVzBZvVSntVYnIl+OQEMLE8rRTkSEEQRQ7DCad2E z8Ddk/9Qimd4r1++Wm7KzlYiTOHaURCHn+k/88KpBB/AtG2sNjzzu4VsGj3FZbWUu70vy8 JRaOdOvTPeugPWhhbWNGnkqschtl4eM8xGcSqpKnJLsM6s8wC3KP0Bb/tJPY//AQLu7J38 8t+S52ob2jprMrMNKHm92VSAKv1q0xd4r36WB/GLZA8t9ASFZQ8rt4VurWhxe8Da+HS+Z8 Hd368n+GR3pcqnM1CDuwVet325zkXfsvB1pwVxIqOPgQHrGlS4+vx1kNHDFeiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716610714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8v1eREaCVd7SyQWuxkCVtqcHV0wgPEHAuAZGwrs2K3E=; b=jGSSca1iQOtucu8NPld2tH4Eyqf1+khQhlW53nSGdS79rIN24w+MVA8OHf9FKfUYsinWW9 UD2KBzjsMa9PEcLh2jlW8h8OQxdbKA+kKNxWL9Ibuw7bB8t71lVCZCK/RZgkzbzdS7NLzi b7uxj/3RJkUrex9zVf1qyyWJa6u60B8+IfAz5Ntyd6EvlS/zgVcOWONE8YIDLhek1NRTDu TxFDOSQj8FeZk7pkJ7Hlw/XWJlkJc1cPrF76tJXds5onhNe/RXbM2H4g43Kk185AthI2rH qC1Gj9BN/aARvVbI0MNhKfUIvWTL+pl1TQXDhuamiaiHoMOPHGqBHAD0uXMbdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmTDV57csz12CC; Sat, 25 May 2024 04:18:34 +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 44P4IYDE094873; Sat, 25 May 2024 04:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4IYOM094870; Sat, 25 May 2024 04:18:34 GMT (envelope-from git) Date: Sat, 25 May 2024 04:18:34 GMT Message-Id: <202405250418.44P4IYOM094870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 0cc8506c5124 - main - dhclient: remove unused primary_address List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cc8506c512481cf08af70c1c726062debbd70b1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0cc8506c512481cf08af70c1c726062debbd70b1 commit 0cc8506c512481cf08af70c1c726062debbd70b1 Author: Franco Fichtner <franco@opnsense.org> AuthorDate: 2024-05-24 15:55:59 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:17:08 +0000 dhclient: remove unused primary_address Its last use was removed in 396c7521364. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1257 Differential Revsiion: https://reviews.freebsd.org/D42717 --- sbin/dhclient/dhcpd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 399b5c1ecf6c..a80c5bd8f23e 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -199,7 +199,6 @@ struct client_state { struct interface_info { struct interface_info *next; struct hardware hw_address; - struct in_addr primary_address; char name[IFNAMSIZ]; int rfdesc; int wfdesc; From nobody Sat May 25 04:25:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTN63hL8z5M4rB; Sat, 25 May 2024 04:25: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 4VmTN62q37z4F5s; Sat, 25 May 2024 04:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUS4iE4dOXZZOn9rQKJuVf9LURb2Ke3t36fXKlGYpGw=; b=fzsf14ukn1Kmt2peVMZkusGczt2hbgBiJKkljTTuQ8wZOEesMzKAsuI2/XpFrh4cUs8dBJ uCaCLtKAwNSWHdOgbCo4+forfeJgYBMi1dAdlyNNT+edJ1/25JB7OzaS9aaK2qNlX4Qg3M g3YZOhNu2WsRBY1FKpj4clkKbzSaj79wYXE/1/WBPkptrv86JGirICYmuvmUIbQd1YSEMY s9nNHvmsSWsksldt3woNyTsL9mWruoMs+pWE+fN42x/PLxeRjejsLRFF14KtLi1+pYYnbi xqHyvUzd/mY09yHyV7Wce9+6q1UpBwsh+xvYd8Zoo9Jh4yJmMAubWWF/jxUfsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716611110; a=rsa-sha256; cv=none; b=LdG/tF3WbkiK1oWmr6J4rV8GdCir6LeMx4pyjaXebOcxvsGgX4Guw0O0oNMF1h67+7pR9z idhurywws1A10EgZLfOsErOzRg7JRwt2MrKPdfjRWMqqTTf5QYX9Bu8nqBx79zl28be3yR rD+GKhnTLAHGRbcwyJgRMCxZYQDAq9r6mvOwCb4HjnGYCxDdlH0ufkVQVrbLnLe0ME5F+k o46toqYKTQaTmUHrASF0vI/5ephZbyUwbYipYR30U2ODfctbmmhrToxjy/WjKt37efs8k9 yQwUIxFBPnRPugu+n2Px7YVQSenGEnMuimJh39mATv4Pg8Yp7YR8yLMQkM5DhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUS4iE4dOXZZOn9rQKJuVf9LURb2Ke3t36fXKlGYpGw=; b=kZIkWmsZXF4EpgKeY0AYSf+UBpMg5bC1eLANm0KqLvDCG8U0LQ7UElk5rGyfimTsrLQXsj gzqqaUqG0T9p001DYMcFkW+XgtWBw+nhx9Mp1N0xik1u5tbJHznUicF83cyLeulKZafpMy 3pW/YVU4/ZZUVao0dcJdpVni6vCYRghToMvUyAYaYwXGRflOgzwIEbYOI6zWnaTCr9Z0oE zatswviUEeBkMgm395poLbIosVn6Gkqb4QDwoMuTHLOhCRr+7SjPn47U0TnGIXUTda3+EK Rik71GZtsUzuxEvCBZupWUg8V2wdSuUEbqMZ8xDO8BOdtmlqSunCJzIh4ciB3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmTN62QXVz12bC; Sat, 25 May 2024 04:25: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 44P4PA6J010789; Sat, 25 May 2024 04:25:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4PA62010786; Sat, 25 May 2024 04:25:10 GMT (envelope-from git) Date: Sat, 25 May 2024 04:25:10 GMT Message-Id: <202405250425.44P4PA62010786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 0e2ce866278b - main - ipfw: don't build the module if INET not in kernel List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e2ce866278bdaf0764db4578f5793283dd9afa4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e2ce866278bdaf0764db4578f5793283dd9afa4 commit 0e2ce866278bdaf0764db4578f5793283dd9afa4 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-24 00:32:49 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:21:24 +0000 ipfw: don't build the module if INET not in kernel Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1255 --- sys/modules/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index ad274e7f7b47..54108097fe1d 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -490,7 +490,7 @@ _sctp= sctp _if_stf= if_stf .endif -.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) +.if (${KERN_OPTS:MINET} && ${MK_INET_SUPPORT} != "no") || defined(ALL_MODULES) _if_me= if_me _ipfw= ipfw .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) From nobody Sat May 25 04:25:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTN74dHLz5M5GS; Sat, 25 May 2024 04:25: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 4VmTN73STbz4FPj; Sat, 25 May 2024 04:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZ6dRAgEM+9AJntKIbEfZXyIWFVnrow6KA+CtLzHcN4=; b=DlKD9aEGN47gWCiaIlxwlBP8d4DPJJMh6kmzx7s9MARU8Vxtx85pk5PKSA816YUUBc+lbu 9kYleGrb6UZYhKHwEbt4zAi7tdAjJUayOOwzpjWi58fEXsijRdLAHNXmZ9UxsSxtI6o0CA D4clqPFQZ0oM8BVd04YyY5VoxPaJKRj4eJXsS/KP5cjWPXWPXHoEo4uAGdDCT9k0NCGM0K BubKWzzmq2xDFAO9C9N78Dzm0mz3VdP1PMmNDK0fIqJJUwfOla9t3yWljCEb0kZ5zExdRq kmBz4iXsUzeoMuvy+dVUrjX2M/aAl01ql1kY1FMwBaDs8sBdHijIJ1MuOntxXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716611111; a=rsa-sha256; cv=none; b=pfv1o0VaJ5bQxW2KKlSWZvItMeSsib/LJolu837b7iz1mzAe6Tz1YSt8hteyvgyj++4tqB lHmpO3tokw8WO+iqXPuP+PqVTeKvrAq7TpufG5c/+jgL67ZXBqmCdd4gw8ezZs4kzrDZq0 OCG9/ZvG4XccUfWdRJ9ss8WMT/Z6PMSo1LwlAl4R/Jrk6r/uvBVJzyqRq4dYr1hHB0skTV YjO9xXTzKsE0xZaka5kK3JuisnXmR1Yhb9tPyaSAah4G44VS6JBXXKLmOzOExDmRmXBCjE 5YHapTYeOqPNakGzRqEGPc74fzpPpVdme8NSy6VP+CgIs6xT3ePl5HEiQ0srTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZ6dRAgEM+9AJntKIbEfZXyIWFVnrow6KA+CtLzHcN4=; b=Qm1Y+SMdzwwAoq3/WQTzpeROzWlYHKUQpT4sXOAUwXd1dcYeObZwR8eUab6MyLbWHzV7C8 bWIK5/Jm5nOSUFfcPsp0qapN1A8lojbzmoTK82bK9LRqX2gH5w8/ZcJGHmT6E+fV0d9AQr TTkIeUqUa36XBmrCqiAx137v/u5O4WHvvzGrQemvn4zpA9JynysYq986508MbVrxXewA7m CCgIC3k4+Uy7fhuvpFEYO9kFRD7DopuyQOrbw8f3ic1wZSDlFMdYeRIr3P+9hQKZV1jdFS ubTxzauil8/2sqeNG9+2/7iJVPG/epRMWOtjLYOFgVurVgoaVNdVgtOnF9vb3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmTN734rdz12Z4; Sat, 25 May 2024 04:25:11 +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 44P4PB1K010829; Sat, 25 May 2024 04:25:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4PB4N010826; Sat, 25 May 2024 04:25:11 GMT (envelope-from git) Date: Sat, 25 May 2024 04:25:11 GMT Message-Id: <202405250425.44P4PB4N010826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: bfd248f59de3 - main - sys/amd64/conf/LINT-NOINET{6,}: don't set WITHOUT_INET{6,}_SUPPORT List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bfd248f59de39715b28a469bcba39427a42a5383 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bfd248f59de39715b28a469bcba39427a42a5383 commit bfd248f59de39715b28a469bcba39427a42a5383 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-24 00:14:11 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:21:25 +0000 sys/amd64/conf/LINT-NOINET{6,}: don't set WITHOUT_INET{6,}_SUPPORT Previously, it was necessary to set WITHOUT_INET_SUPPORT when building the kernel without INET, and WITHOUT_INET6_SUPPORT when building the kernel without INET6, or else the modules build would fail. The LINT-NOINET and LINT-NOINET6 configs did this using makeoptions. After recent changes, this is no longer required, so remove these makeoptions. This avoids masking potential future build issues when these aren't set. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1255 --- sys/amd64/conf/LINT-NOINET | 3 --- sys/amd64/conf/LINT-NOINET6 | 1 - 2 files changed, 4 deletions(-) diff --git a/sys/amd64/conf/LINT-NOINET b/sys/amd64/conf/LINT-NOINET index 3f2246001b72..f5e704f6c071 100644 --- a/sys/amd64/conf/LINT-NOINET +++ b/sys/amd64/conf/LINT-NOINET @@ -1,7 +1,4 @@ include LINT ident LINT-NOINET -makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT=" nooptions INET -nodevice gre -nodevice netmap diff --git a/sys/amd64/conf/LINT-NOINET6 b/sys/amd64/conf/LINT-NOINET6 index e314ad1b01ec..041916883277 100644 --- a/sys/amd64/conf/LINT-NOINET6 +++ b/sys/amd64/conf/LINT-NOINET6 @@ -1,5 +1,4 @@ include LINT ident LINT-NOINET6 -makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT=" nooptions INET6 From nobody Sat May 25 04:35:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTbk69Nlz5M67q; Sat, 25 May 2024 04:35: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 4VmTbk1HCfz4GQH; Sat, 25 May 2024 04:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huZwXcrh4ivBbRr3XBTbFz0rRk61nx4wCOJwV/kQ7oM=; b=GPy1iISvs60hC1xDA+nOQNFIROOtGtvxVrTBpgr2UdylXUlxunpMLxuC5ZU4r/cEqUEMAd cVSJkdiOfiaTVlWLW+SER5XAPq6XhOlGyjOQS5rnwzkMZW611S6lAHz7jpXiPKeslp6Sdc GWXc5RfY9MKcZmbQzeRMRXWvTzZBCy09vi6OgDFjYVkVT9ITVXUAuvMBEEu/gPdOcdXCoI 9LNLQgcHWO6GvB4Z0biaO6Vy8AV4oms0hr2acTOVBQG9aYnozDX1k7f6MUII5PxONdLzPi xPT1J6PCyO82zuwrgonAL0yK/PIPn1bhSdrhA9H/7xd8+OJAT2lfNyr03nz/6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716611714; a=rsa-sha256; cv=none; b=NSBeqtKIuycPSqr9LR92PJZvJr3aBvkQ82I/Oc6Q603a7ypeTvUF+X08aNV/lUsvh0Qdj6 rTufDeQEF9sxjMsJ7x+zWkYXBbIe+5RuXmwO+Y+Plh4/hBDY7w2+XsdyV99voMNSyszVdl RiF7TR+OmE/W6UpW2JJ2c3YN+Ho6OmyZf80Uhi9DM56U9rhX8sBGaIPEZ579KmAWgrxMC+ UzhIElnPFaCRZKhhFqmu6zl07GRgqMasJEp13+iFbcUOxpQP7XLPC/XffUBeiLtvy4HHee Xni9uBBdYV1g8Y59IzrInvO6smdrJsaKUFBy427cwL3wdMbZ+k6NrvozBIct0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huZwXcrh4ivBbRr3XBTbFz0rRk61nx4wCOJwV/kQ7oM=; b=tomMc5UEzBlXS/HKCASURXnaKNZW3F3qBS6n9fbQ8yl7idVFNob5f4SR7ALomnjeT8B7gE dvCMrNmGnqXoh3nRY8tXRvoErnHqBp0mexFuE++rzlh5e3POJicjU8OqTTsB+B3TCeilbV L/AiON4tBtz4hbg285Wtm11XSW9aZJ1mtYb44K0pd6ObGvfjGb0ezHg9w4j8Dlmg5IYIfq iOxPN3mGQgMWjKGFtxuWq0ZcDu7dO6rhW73GqWpDYIrxBHW3dVW2sOWv7VOspEf18BNEtG BiuFSA2vQTUVzKBtnf4fkp1YUwZa5LJqIvluclW8EdqQ1wed1tHPv5hnO+LG2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmTbk0tybz13BF; Sat, 25 May 2024 04:35: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 44P4ZEdp027213; Sat, 25 May 2024 04:35:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4ZEXm027210; Sat, 25 May 2024 04:35:14 GMT (envelope-from git) Date: Sat, 25 May 2024 04:35:14 GMT Message-Id: <202405250435.44P4ZEXm027210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: ff92493a4f65 - main - netlink: Fix C++ compile errors List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff92493a4f6504c49a6c84ec65053f493ff5d708 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ff92493a4f6504c49a6c84ec65053f493ff5d708 commit ff92493a4f6504c49a6c84ec65053f493ff5d708 Author: cnbatch <cnbatch@gmail.com> AuthorDate: 2024-05-17 13:09:44 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:31:42 +0000 netlink: Fix C++ compile errors Allow these files to be included in C++ programs with careful casting to the proper type, like C++ wants (and in a way that also works for C). MFC After: 1 week Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1245 --- sys/netlink/netlink_snl.h | 33 +++++++++++++++++---------------- sys/netlink/netlink_snl_route.h | 2 +- sys/netlink/netlink_snl_route_parsers.h | 10 +++++----- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 7550800bb0f7..7151f6221fca 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -63,7 +63,7 @@ #define _NLA_END(_start, _len) ((char *)(_start) + (_len)) #define NLA_FOREACH(_attr, _start, _len) \ - for (_attr = (_start); \ + for (_attr = (struct nlattr *)(_start); \ ((char *)_attr < _NLA_END(_start, _len)) && \ ((char *)NLA_NEXT(_attr) <= _NLA_END(_start, _len)); \ _attr = NLA_NEXT(_attr)) @@ -80,7 +80,7 @@ struct linear_buffer { static inline struct linear_buffer * lb_init(uint32_t size) { - struct linear_buffer *lb = calloc(1, size); + struct linear_buffer *lb = (struct linear_buffer *)calloc(1, size); if (lb != NULL) { lb->base = (char *)(lb + 1); @@ -102,7 +102,7 @@ lb_allocz(struct linear_buffer *lb, int len) len = roundup2(len, alignof(__max_align_t)); if (lb->offset + len > lb->size) return (NULL); - void *data = (void *)(lb->base + lb->offset); + char *data = (lb->base + lb->offset); lb->offset += len; return (data); } @@ -275,7 +275,7 @@ snl_init(struct snl_state *ss, int netlink_family) } ss->bufsize = rcvbuf; - ss->buf = malloc(ss->bufsize); + ss->buf = (char *)malloc(ss->bufsize); if (ss->buf == NULL) { snl_free(ss); return (false); @@ -495,7 +495,8 @@ snl_parse_header(struct snl_state *ss, void *hdr, int len, struct nlattr *nla_head; /* Extract fields first (if any) */ - snl_parse_fields(ss, hdr, parser->in_hdr_size, parser->fp, parser->fp_size, target); + snl_parse_fields(ss, (struct nlmsghdr *)hdr, parser->in_hdr_size, + parser->fp, parser->fp_size, target); nla_head = (struct nlattr *)(void *)((char *)hdr + parser->in_hdr_size); bool result = snl_parse_attrs_raw(ss, nla_head, len - parser->in_hdr_size, @@ -639,7 +640,7 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla, { int maxlen = NLA_DATA_LEN(nla); - char *buf = snl_allocz(ss, maxlen + 1); + char *buf = (char *)snl_allocz(ss, maxlen + 1); if (buf == NULL) return (false); buf[maxlen] = '\0'; @@ -656,7 +657,7 @@ snl_attr_copy_string(struct snl_state *ss, struct nlattr *nla, char *tmp; if (snl_attr_get_string(ss, nla, NULL, &tmp)) { - strlcpy(target, tmp, (size_t)arg); + strlcpy((char *)target, tmp, (size_t)arg); return (true); } return (false); @@ -669,7 +670,7 @@ snl_attr_dup_string(struct snl_state *ss __unused, struct nlattr *nla, size_t maxlen = NLA_DATA_LEN(nla); if (strnlen((char *)NLA_DATA(nla), maxlen) < maxlen) { - char *buf = snl_allocz(ss, maxlen); + char *buf = (char *)snl_allocz(ss, maxlen); if (buf == NULL) return (false); memcpy(buf, NLA_DATA(nla), maxlen); @@ -698,14 +699,14 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla, uint32_t start_size, const void *arg, void *target) { const struct snl_hdr_parser *p = (const struct snl_hdr_parser *)arg; - struct snl_parray *array = target; + struct snl_parray *array = (struct snl_parray *)target; struct nlattr *nla; uint32_t count = 0, size = start_size; if (p->out_size == 0) return (false); - array->items = snl_allocz(ss, size * sizeof(void *)); + array->items = (void **)snl_allocz(ss, size * sizeof(void *)); if (array->items == NULL) return (false); @@ -735,7 +736,7 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla, if (count == size) { uint32_t new_size = size * 2; - void **new_array = snl_allocz(ss, new_size *sizeof(void *)); + void **new_array = (void **)snl_allocz(ss, new_size *sizeof(void *)); memcpy(new_array, array->items, size * sizeof(void *)); array->items = new_array; @@ -848,7 +849,7 @@ static const struct snl_attr_parser _nla_p_bitset[] = { static inline bool _cb_p_bitset(struct snl_state *ss __unused, void *_target) { - struct snl_attr_bitset *target = _target; + struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target; uint32_t sz_bytes = _roundup2(target->nla_bitset_size, 32) / 8; @@ -884,7 +885,7 @@ snl_attr_get_bitset_c(struct snl_state *ss, struct nlattr *nla, const void *arg __unused, void *_target) { const struct snl_hdr_parser *p = &_nla_bitset_parser; - struct snl_attr_bitset *target = _target; + struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target; /* Assumes target points to the beginning of the structure */ if (!snl_parse_header(ss, NLA_DATA(nla), NLA_DATA_LEN(nla), p, _target)) @@ -1004,7 +1005,7 @@ parse_cmsg(struct snl_state *ss, const struct msghdr *msg, struct snl_msg_info * int len = cmsg->cmsg_len - ((char *)data - (char *)cmsg); const struct snl_hdr_parser *ps = &snl_msg_info_parser; - return (snl_parse_attrs_raw(ss, data, len, ps->np, ps->np_size, attrs)); + return (snl_parse_attrs_raw(ss, (struct nlattr *)data, len, ps->np, ps->np_size, attrs)); } return (false); @@ -1046,7 +1047,7 @@ static inline void snl_init_writer(struct snl_state *ss, struct snl_writer *nw) { nw->size = SNL_WRITER_BUFFER_SIZE; - nw->base = snl_allocz(ss, nw->size); + nw->base = (char *)snl_allocz(ss, nw->size); if (nw->base == NULL) { nw->error = true; nw->size = 0; @@ -1084,7 +1085,7 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) nw->hdr = (struct nlmsghdr *) (void *)((char *)new_base + hdr_off); } - nw->base = new_base; + nw->base = (char *)new_base; } return (true); diff --git a/sys/netlink/netlink_snl_route.h b/sys/netlink/netlink_snl_route.h index 619e769b1496..62055b2db417 100644 --- a/sys/netlink/netlink_snl_route.h +++ b/sys/netlink/netlink_snl_route.h @@ -100,7 +100,7 @@ snl_attr_get_ip(struct snl_state *ss, struct nlattr *nla, static inline struct sockaddr * parse_rta_via(struct snl_state *ss, struct rtattr *rta, int *perror) { - struct rtvia *via = NL_RTA_DATA(rta); + struct rtvia *via = (struct rtvia *)NL_RTA_DATA(rta); switch (via->rtvia_family) { case AF_INET: diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h index 7e4bcad4010b..256edfec297d 100644 --- a/sys/netlink/netlink_snl_route_parsers.h +++ b/sys/netlink/netlink_snl_route_parsers.h @@ -78,7 +78,7 @@ static const struct snl_field_parser _fp_p_mp_nh[] = { static inline bool _cb_p_mp_nh(struct snl_state *ss __unused, void *_target) { - struct rta_mpath_nh *target = _target; + struct rta_mpath_nh *target = (struct rta_mpath_nh *)_target; finalize_sockaddr(target->gw, target->ifindex); return (true); @@ -158,7 +158,7 @@ static const struct snl_field_parser _fp_p_route[] = { static inline bool _cb_p_route(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_route *target = _target; + struct snl_parsed_route *target = (struct snl_parsed_route *)_target; finalize_sockaddr(target->rta_dst, target->rta_oif); finalize_sockaddr(target->rta_gw, target->rta_oif); @@ -277,7 +277,7 @@ static struct snl_field_parser _fp_p_neigh_s[] = { static inline bool _cb_p_neigh(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_neigh *target = _target; + struct snl_parsed_neigh *target = (struct snl_parsed_neigh *)_target; finalize_sockaddr(target->nda_dst, target->nda_ifindex); return (true); @@ -326,7 +326,7 @@ static const struct snl_field_parser _fp_p_addr_s[] = { static inline bool _cb_p_addr(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_addr *target = _target; + struct snl_parsed_addr *target = (struct snl_parsed_addr *)_target; finalize_sockaddr(target->ifa_address, target->ifa_index); finalize_sockaddr(target->ifa_local, target->ifa_index); @@ -379,7 +379,7 @@ static const struct snl_attr_parser _nla_p_nh[] = { static inline bool _cb_p_nh(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_nhop *target = _target; + struct snl_parsed_nhop *target = (struct snl_parsed_nhop *)_target; finalize_sockaddr(target->nha_gw, target->nha_oif); return (true); From nobody Sat May 25 05:32:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmVsb5sJDz5MBSK; Sat, 25 May 2024 05: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 4VmVsb5XW8z4LxK; Sat, 25 May 2024 05: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=1716615139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3D2eX+F36+IpEXuyzNucn136ZpZcbn3pOw1XDFI8wys=; b=AFAFiYjrptn0TWK0wk0R309qXkarGqnAc+5vgEDWUaQ2pjMgSREiplnnA8I8mPifzmWV85 NTdEYdPJrqgbijpNM8qN0CsiQPkBhJZ9l0D+1Sj5wKZcTj2FdZhG0eLcMFBd+JH9utuANu nVnfCQclicKxzWIgU45HC8h/qzOL/DDyqAX98fwQdKvQwdXT9GVHnPQU6xa51a+JWbHXC6 bOPn2HLyINlw7gYourp8cy674kZX8+nX+sB/UH7/UFjrZUtD0Rdap4kfds1jFHh8jkVYVU wMpCCF0/wVg3LNh6Fded9SQ2PlHpeJKh+kaKYcMxvwALJY2cBQOaBy6F7A9gOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716615139; a=rsa-sha256; cv=none; b=os1worP+La2qrK0jiP0aaHUQWU7TeOIqO0RVQjJzfWC+d+Yu9CLEYMXr7R9WqDP4//2zMl aq7NEBKGXLjOnsL9Elj9+nASaqpJfPcmrRIlP10jYHWNGqkd+K6GVm1LJSUu1UJUeCRL0r sz/h1BLoUoe+wzTS9agOtk7DQaj+RobhdcgIzMhdF9fGZVtGiK+vzqSofssNsyIsgHUWZH NtzPY8kyHn8tVhvIdWhQFUAn6N6RL1IzZIKhHTSZPu4NOjwLJ4qLjPDQo3MQ0JQE5qg3sy uYHDoH+BhHfO6NPgosZZs2TFIRgKJhOXaOKd7JQiOokT0xUiwN/hDrE5ydrTVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716615139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3D2eX+F36+IpEXuyzNucn136ZpZcbn3pOw1XDFI8wys=; b=gIoIKqBwoKfD1NXZwr7x7DykQgzUOGwosXjCGPifvxxp9TBhFSwDoxTB5iNlJYFfxuq8e7 +/H99amBo2xy0OQNSpaS4cdlcFXOwPttxs6p9SOQl4Bz4TyZFiisny64jog5SFzobkclCx 8w2cBYp1Mxp6gqWQA7oN0ju/GJCWbl8b7p0+QUDkSL/napMsyEX/1q7t5q4jx89ofoRsZ9 GjMlY9vpQykdfaD7UZyaSpq5CmAoulo2eoB63ggi6SrZWiJCj0RJ8E61ycsyPi0M1T4d07 arCKSfzx67ngEq3cHcPtelqVUS7OsA4FkRGXPMlEqXWlkdgfs1suM0QJLA7KVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmVsb58Qyz140P; Sat, 25 May 2024 05: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 44P5WJgg028918; Sat, 25 May 2024 05: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 44P5WJRs028915; Sat, 25 May 2024 05:32:19 GMT (envelope-from git) Date: Sat, 25 May 2024 05:32:19 GMT Message-Id: <202405250532.44P5WJRs028915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 40d951bc5932 - main - x86/iommu: extract useful utilities into x86_iommu.c List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40d951bc5932deb87635f5c1780a6706d0c7c012 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=40d951bc5932deb87635f5c1780a6706d0c7c012 commit 40d951bc5932deb87635f5c1780a6706d0c7c012 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-25 00:47:26 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-25 05:32:01 +0000 x86/iommu: extract useful utilities into x86_iommu.c related to the page tables page allocation and mapping. Sponsored by: The FreeBSD Foundation Sponsored by: Advanced Micro Devices (AMD) MFC after: 1 week --- sys/conf/files.x86 | 1 + sys/x86/include/iommu.h | 1 + sys/x86/iommu/intel_ctx.c | 25 +++---- sys/x86/iommu/intel_dmar.h | 9 +-- sys/x86/iommu/intel_drv.c | 7 +- sys/x86/iommu/intel_fault.c | 1 + sys/x86/iommu/intel_idpgtbl.c | 77 ++++++++++---------- sys/x86/iommu/intel_intrmap.c | 3 +- sys/x86/iommu/intel_qi.c | 3 +- sys/x86/iommu/intel_quirks.c | 1 + sys/x86/iommu/intel_reg.h | 15 +--- sys/x86/iommu/intel_utils.c | 128 +++------------------------------ sys/x86/iommu/iommu_utils.c | 164 ++++++++++++++++++++++++++++++++++++++++++ sys/x86/iommu/x86_iommu.h | 62 ++++++++++++++++ 14 files changed, 302 insertions(+), 195 deletions(-) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 9439a46ce347..de698e82c823 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -352,6 +352,7 @@ x86/iommu/intel_intrmap.c optional acpi iommu pci x86/iommu/intel_qi.c optional acpi iommu pci x86/iommu/intel_quirks.c optional acpi iommu pci x86/iommu/intel_utils.c optional acpi iommu pci +x86/iommu/iommu_utils.c optional acpi iommu pci x86/isa/atrtc.c standard x86/isa/clock.c standard x86/isa/isa.c optional isa diff --git a/sys/x86/include/iommu.h b/sys/x86/include/iommu.h index a95480b53acc..98c6661aa8e3 100644 --- a/sys/x86/include/iommu.h +++ b/sys/x86/include/iommu.h @@ -7,6 +7,7 @@ #include <x86/include/busdma_impl.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> #endif /* !_MACHINE_IOMMU_H_ */ diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 49c87cf0b39f..baee0109e5a9 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -65,6 +65,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> static MALLOC_DEFINE(M_DMAR_CTX, "dmar_ctx", "Intel DMAR Context"); @@ -84,7 +85,7 @@ dmar_ensure_ctx_page(struct dmar_unit *dmar, int bus) /* * Allocated context page must be linked. */ - ctxm = dmar_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_NOALLOC); + ctxm = iommu_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_NOALLOC); if (ctxm != NULL) return; @@ -95,14 +96,14 @@ dmar_ensure_ctx_page(struct dmar_unit *dmar, int bus) * threads are equal. */ TD_PREP_PINNED_ASSERT; - ctxm = dmar_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_ZERO | + ctxm = iommu_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_ZERO | IOMMU_PGF_WAITOK); - re = dmar_map_pgtbl(dmar->ctx_obj, 0, IOMMU_PGF_NOALLOC, &sf); + re = iommu_map_pgtbl(dmar->ctx_obj, 0, IOMMU_PGF_NOALLOC, &sf); re += bus; dmar_pte_store(&re->r1, DMAR_ROOT_R1_P | (DMAR_ROOT_R1_CTP_MASK & VM_PAGE_TO_PHYS(ctxm))); dmar_flush_root_to_ram(dmar, re); - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); TD_PINNED_ASSERT; } @@ -114,7 +115,7 @@ dmar_map_ctx_entry(struct dmar_ctx *ctx, struct sf_buf **sfp) dmar = CTX2DMAR(ctx); - ctxp = dmar_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid), + ctxp = iommu_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid), IOMMU_PGF_NOALLOC | IOMMU_PGF_WAITOK, sfp); ctxp += ctx->context.rid & 0xff; return (ctxp); @@ -186,7 +187,7 @@ ctx_id_entry_init(struct dmar_ctx *ctx, dmar_ctx_entry_t *ctxp, bool move, ("ctx %p non-null pgtbl_obj", ctx)); ctx_root = NULL; } else { - ctx_root = dmar_pgalloc(domain->pgtbl_obj, 0, + ctx_root = iommu_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_NOALLOC); } @@ -272,7 +273,7 @@ domain_init_rmrr(struct dmar_domain *domain, device_t dev, int bus, "region (%jx, %jx) corrected\n", domain->iodom.iommu->unit, start, end); } - entry->end += DMAR_PAGE_SIZE * 0x20; + entry->end += IOMMU_PAGE_SIZE * 0x20; } size = OFF_TO_IDX(entry->end - entry->start); ma = malloc(sizeof(vm_page_t) * size, M_TEMP, M_WAITOK); @@ -601,9 +602,9 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid, func, rid, domain->domain, domain->mgaw, domain->agaw, id_mapped ? "id" : "re"); } - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); } else { - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); dmar_domain_destroy(domain1); /* Nothing needs to be done to destroy ctx1. */ free(ctx1, M_DMAR_CTX); @@ -703,7 +704,7 @@ dmar_move_ctx_to_domain(struct dmar_domain *domain, struct dmar_ctx *ctx) ctx->context.domain = &domain->iodom; dmar_ctx_link(ctx); ctx_id_entry_init(ctx, ctxp, true, PCI_BUSMAX + 100); - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); error = dmar_flush_for_ctx_entry(dmar, true); /* If flush failed, rolling back would not work as well. */ printf("dmar%d rid %x domain %d->%d %s-mapped\n", @@ -787,7 +788,7 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx) if (ctx->refs > 1) { ctx->refs--; DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); TD_PINNED_ASSERT; return; } @@ -809,7 +810,7 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx) else dmar_inv_iotlb_glob(dmar); } - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); domain = CTX2DOM(ctx); dmar_ctx_unlink(ctx); free(ctx->context.tag, M_DMAR_CTX); diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index e20144094c80..8289478aed19 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -238,16 +238,11 @@ iommu_gaddr_t pglvl_page_size(int total_pglvl, int lvl); iommu_gaddr_t domain_page_size(struct dmar_domain *domain, int lvl); int calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size, iommu_gaddr_t *isizep); -struct vm_page *dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags); -void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags); -void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, - struct sf_buf **sf); -void dmar_unmap_pgtbl(struct sf_buf *sf); int dmar_load_root_entry_ptr(struct dmar_unit *unit); int dmar_inv_ctx_glob(struct dmar_unit *unit); int dmar_inv_iotlb_glob(struct dmar_unit *unit); int dmar_flush_write_bufs(struct dmar_unit *unit); -void dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst); +void dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst); void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst); void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst); int dmar_disable_protected_regions(struct dmar_unit *unit); @@ -315,9 +310,7 @@ void dmar_quirks_pre_use(struct iommu_unit *dmar); int dmar_init_irt(struct dmar_unit *unit); void dmar_fini_irt(struct dmar_unit *unit); -extern iommu_haddr_t dmar_high; extern int haw; -extern int dmar_tbl_pagecnt; extern int dmar_batch_coalesce; extern int dmar_rmrr_enable; diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 7346162d1502..9a2fedf90b6a 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -67,6 +67,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> #ifdef DEV_APIC @@ -179,9 +180,9 @@ dmar_identify(driver_t *driver, device_t parent) return; haw = dmartbl->Width + 1; if ((1ULL << (haw + 1)) > BUS_SPACE_MAXADDR) - dmar_high = BUS_SPACE_MAXADDR; + iommu_high = BUS_SPACE_MAXADDR; else - dmar_high = 1ULL << (haw + 1); + iommu_high = 1ULL << (haw + 1); if (bootverbose) { printf("DMAR HAW=%d flags=<%b>\n", dmartbl->Width, (unsigned)dmartbl->Flags, @@ -490,7 +491,7 @@ dmar_attach(device_t dev) * address translation after the required invalidations are * done. */ - dmar_pgalloc(unit->ctx_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO); + iommu_pgalloc(unit->ctx_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO); DMAR_LOCK(unit); error = dmar_load_root_entry_ptr(unit); if (error != 0) { diff --git a/sys/x86/iommu/intel_fault.c b/sys/x86/iommu/intel_fault.c index e275304c8d51..59b482720cf1 100644 --- a/sys/x86/iommu/intel_fault.c +++ b/sys/x86/iommu/intel_fault.c @@ -54,6 +54,7 @@ #include <x86/include/busdma_impl.h> #include <x86/iommu/intel_reg.h> #include <dev/iommu/busdma_iommu.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> /* diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 929f8656d1eb..157afaec75ef 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -63,6 +63,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> static int domain_unmap_buf_locked(struct dmar_domain *domain, @@ -108,7 +109,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, iommu_gaddr_t addr) { vm_page_t m1; - dmar_pte_t *pte; + iommu_pte_t *pte; struct sf_buf *sf; iommu_gaddr_t f, pg_sz; vm_pindex_t base; @@ -117,28 +118,28 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, VM_OBJECT_ASSERT_LOCKED(tbl->pgtbl_obj); if (addr >= tbl->maxaddr) return; - (void)dmar_pgalloc(tbl->pgtbl_obj, idx, IOMMU_PGF_OBJL | + (void)iommu_pgalloc(tbl->pgtbl_obj, idx, IOMMU_PGF_OBJL | IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO); - base = idx * DMAR_NPTEPG + 1; /* Index of the first child page of idx */ + base = idx * IOMMU_NPTEPG + 1; /* Index of the first child page of idx */ pg_sz = pglvl_page_size(tbl->pglvl, lvl); if (lvl != tbl->leaf) { - for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) + for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) domain_idmap_nextlvl(tbl, lvl + 1, base + i, f); } VM_OBJECT_WUNLOCK(tbl->pgtbl_obj); - pte = dmar_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf); + pte = iommu_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf); if (lvl == tbl->leaf) { - for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) { + for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) { if (f >= tbl->maxaddr) break; pte[i].pte = (DMAR_PTE_ADDR_MASK & f) | DMAR_PTE_R | DMAR_PTE_W; } } else { - for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) { + for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) { if (f >= tbl->maxaddr) break; - m1 = dmar_pgalloc(tbl->pgtbl_obj, base + i, + m1 = iommu_pgalloc(tbl->pgtbl_obj, base + i, IOMMU_PGF_NOALLOC); KASSERT(m1 != NULL, ("lost page table page")); pte[i].pte = (DMAR_PTE_ADDR_MASK & @@ -146,7 +147,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, } } /* domain_get_idmap_pgtbl flushes CPU cache if needed. */ - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); VM_OBJECT_WLOCK(tbl->pgtbl_obj); } @@ -300,7 +301,7 @@ put_idmap_pgtbl(vm_object_t obj) rmobj = tbl->pgtbl_obj; if (rmobj->ref_count == 1) { LIST_REMOVE(tbl, link); - atomic_subtract_int(&dmar_tbl_pagecnt, + atomic_subtract_int(&iommu_tbl_pagecnt, rmobj->resident_page_count); vm_object_deallocate(rmobj); free(tbl, M_DMAR_IDPGTBL); @@ -322,9 +323,9 @@ static int domain_pgtbl_pte_off(struct dmar_domain *domain, iommu_gaddr_t base, int lvl) { - base >>= DMAR_PAGE_SHIFT + (domain->pglvl - lvl - 1) * - DMAR_NPTEPGSHIFT; - return (base & DMAR_PTEMASK); + base >>= IOMMU_PAGE_SHIFT + (domain->pglvl - lvl - 1) * + IOMMU_NPTEPGSHIFT; + return (base & IOMMU_PTEMASK); } /* @@ -343,18 +344,18 @@ domain_pgtbl_get_pindex(struct dmar_domain *domain, iommu_gaddr_t base, int lvl) for (pidx = idx = 0, i = 0; i < lvl; i++, pidx = idx) { idx = domain_pgtbl_pte_off(domain, base, i) + - pidx * DMAR_NPTEPG + 1; + pidx * IOMMU_NPTEPG + 1; } return (idx); } -static dmar_pte_t * +static iommu_pte_t * domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, vm_pindex_t *idxp, struct sf_buf **sf) { vm_page_t m; struct sf_buf *sfp; - dmar_pte_t *pte, *ptep; + iommu_pte_t *pte, *ptep; vm_pindex_t idx, idx1; DMAR_DOMAIN_ASSERT_PGLOCKED(domain); @@ -362,13 +363,13 @@ domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, idx = domain_pgtbl_get_pindex(domain, base, lvl); if (*sf != NULL && idx == *idxp) { - pte = (dmar_pte_t *)sf_buf_kva(*sf); + pte = (iommu_pte_t *)sf_buf_kva(*sf); } else { if (*sf != NULL) - dmar_unmap_pgtbl(*sf); + iommu_unmap_pgtbl(*sf); *idxp = idx; retry: - pte = dmar_map_pgtbl(domain->pgtbl_obj, idx, flags, sf); + pte = iommu_map_pgtbl(domain->pgtbl_obj, idx, flags, sf); if (pte == NULL) { KASSERT(lvl > 0, ("lost root page table page %p", domain)); @@ -377,7 +378,7 @@ retry: * it and create a pte in the preceeding page level * to reference the allocated page table page. */ - m = dmar_pgalloc(domain->pgtbl_obj, idx, flags | + m = iommu_pgalloc(domain->pgtbl_obj, idx, flags | IOMMU_PGF_ZERO); if (m == NULL) return (NULL); @@ -398,7 +399,7 @@ retry: KASSERT(m->pindex != 0, ("loosing root page %p", domain)); m->ref_count--; - dmar_pgfree(domain->pgtbl_obj, m->pindex, + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); return (NULL); } @@ -407,7 +408,7 @@ retry: dmar_flush_pte_to_ram(domain->dmar, ptep); sf_buf_page(sfp)->ref_count += 1; m->ref_count--; - dmar_unmap_pgtbl(sfp); + iommu_unmap_pgtbl(sfp); /* Only executed once. */ goto retry; } @@ -420,7 +421,7 @@ static int domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags) { - dmar_pte_t *pte; + iommu_pte_t *pte; struct sf_buf *sf; iommu_gaddr_t pg_sz, base1; vm_pindex_t pi, c, idx, run_sz; @@ -437,7 +438,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, pi += run_sz) { for (lvl = 0, c = 0, superpage = false;; lvl++) { pg_sz = domain_page_size(domain, lvl); - run_sz = pg_sz >> DMAR_PAGE_SHIFT; + run_sz = pg_sz >> IOMMU_PAGE_SHIFT; if (lvl == domain->pglvl - 1) break; /* @@ -476,7 +477,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, KASSERT((flags & IOMMU_PGF_WAITOK) == 0, ("failed waitable pte alloc %p", domain)); if (sf != NULL) - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); domain_unmap_buf_locked(domain, base1, base - base1, flags); TD_PINNED_ASSERT; @@ -488,7 +489,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, sf_buf_page(sf)->ref_count += 1; } if (sf != NULL) - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); TD_PINNED_ASSERT; return (0); } @@ -512,10 +513,10 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, KASSERT((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) == 0, ("modifying idmap pagetable domain %p", domain)); - KASSERT((base & DMAR_PAGE_MASK) == 0, + KASSERT((base & IOMMU_PAGE_MASK) == 0, ("non-aligned base %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); - KASSERT((size & DMAR_PAGE_MASK) == 0, + KASSERT((size & IOMMU_PAGE_MASK) == 0, ("non-aligned size %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); KASSERT(size > 0, ("zero size %p %jx %jx", domain, (uintmax_t)base, @@ -562,7 +563,7 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, } static void domain_unmap_clear_pte(struct dmar_domain *domain, - iommu_gaddr_t base, int lvl, int flags, dmar_pte_t *pte, + iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_fs); static void @@ -570,7 +571,7 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags) { struct sf_buf *sf; - dmar_pte_t *pde; + iommu_pte_t *pde; vm_pindex_t idx; sf = NULL; @@ -580,7 +581,7 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, static void domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, - int flags, dmar_pte_t *pte, struct sf_buf **sf, bool free_sf) + int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_sf) { vm_page_t m; @@ -588,7 +589,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, dmar_flush_pte_to_ram(domain->dmar, pte); m = sf_buf_page(*sf); if (free_sf) { - dmar_unmap_pgtbl(*sf); + iommu_unmap_pgtbl(*sf); *sf = NULL; } m->ref_count--; @@ -600,7 +601,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, KASSERT(m->pindex != 0, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); - dmar_pgfree(domain->pgtbl_obj, m->pindex, flags); + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); domain_free_pgtbl_pde(domain, base, lvl - 1, flags); } @@ -611,7 +612,7 @@ static int domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, int flags) { - dmar_pte_t *pte; + iommu_pte_t *pte; struct sf_buf *sf; vm_pindex_t idx; iommu_gaddr_t pg_sz; @@ -623,10 +624,10 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, KASSERT((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) == 0, ("modifying idmap pagetable domain %p", domain)); - KASSERT((base & DMAR_PAGE_MASK) == 0, + KASSERT((base & IOMMU_PAGE_MASK) == 0, ("non-aligned base %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); - KASSERT((size & DMAR_PAGE_MASK) == 0, + KASSERT((size & IOMMU_PAGE_MASK) == 0, ("non-aligned size %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); KASSERT(base < (1ULL << domain->agaw), @@ -669,7 +670,7 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); } if (sf != NULL) - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); /* * See 11.1 Write Buffer Flushing for an explanation why RWBF * can be ignored there. @@ -705,7 +706,7 @@ domain_alloc_pgtbl(struct dmar_domain *domain) domain->pgtbl_obj = vm_pager_allocate(OBJT_PHYS, NULL, IDX_TO_OFF(pglvl_max_pages(domain->pglvl)), 0, 0, NULL); DMAR_DOMAIN_PGLOCK(domain); - m = dmar_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK | + m = iommu_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO | IOMMU_PGF_OBJL); /* No implicit free of the top level page table page. */ m->ref_count = 1; diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index 09271a6f6cc9..035de24a2d4e 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -54,6 +54,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> #include <x86/iommu/iommu_intrmap.h> @@ -340,7 +341,7 @@ dmar_init_irt(struct dmar_unit *unit) } unit->irte_cnt = clp2(num_io_irqs); unit->irt = kmem_alloc_contig(unit->irte_cnt * sizeof(dmar_irte_t), - M_ZERO | M_WAITOK, 0, dmar_high, PAGE_SIZE, 0, + M_ZERO | M_WAITOK, 0, iommu_high, PAGE_SIZE, 0, DMAR_IS_COHERENT(unit) ? VM_MEMATTR_DEFAULT : VM_MEMATTR_UNCACHEABLE); if (unit->irt == NULL) diff --git a/sys/x86/iommu/intel_qi.c b/sys/x86/iommu/intel_qi.c index 37e2bf211e32..590cbac9bcbd 100644 --- a/sys/x86/iommu/intel_qi.c +++ b/sys/x86/iommu/intel_qi.c @@ -55,6 +55,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> static bool @@ -501,7 +502,7 @@ dmar_init_qi(struct dmar_unit *unit) /* The invalidation queue reads by DMARs are always coherent. */ unit->inv_queue = kmem_alloc_contig(unit->inv_queue_size, M_WAITOK | - M_ZERO, 0, dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + M_ZERO, 0, iommu_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); unit->inv_waitd_seq_hw_phys = pmap_kextract( (vm_offset_t)&unit->inv_waitd_seq_hw); diff --git a/sys/x86/iommu/intel_quirks.c b/sys/x86/iommu/intel_quirks.c index cccb503b6047..fd5c522d588d 100644 --- a/sys/x86/iommu/intel_quirks.c +++ b/sys/x86/iommu/intel_quirks.c @@ -58,6 +58,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> typedef void (*dmar_quirk_cpu_fun)(struct dmar_unit *); diff --git a/sys/x86/iommu/intel_reg.h b/sys/x86/iommu/intel_reg.h index 26a18ff94890..0fafcce7accf 100644 --- a/sys/x86/iommu/intel_reg.h +++ b/sys/x86/iommu/intel_reg.h @@ -31,16 +31,6 @@ #ifndef __X86_IOMMU_INTEL_REG_H #define __X86_IOMMU_INTEL_REG_H -#define DMAR_PAGE_SIZE PAGE_SIZE -#define DMAR_PAGE_MASK (DMAR_PAGE_SIZE - 1) -#define DMAR_PAGE_SHIFT PAGE_SHIFT -#define DMAR_NPTEPG (DMAR_PAGE_SIZE / sizeof(dmar_pte_t)) -#define DMAR_NPTEPGSHIFT 9 -#define DMAR_PTEMASK (DMAR_NPTEPG - 1) - -#define IOMMU_PAGE_SIZE DMAR_PAGE_SIZE -#define IOMMU_PAGE_MASK DMAR_PAGE_MASK - typedef struct dmar_root_entry { uint64_t r1; uint64_t r2; @@ -49,7 +39,7 @@ typedef struct dmar_root_entry { #define DMAR_ROOT_R1_CTP_MASK 0xfffffffffffff000 /* Mask for Context-Entry Table Pointer */ -#define DMAR_CTX_CNT (DMAR_PAGE_SIZE / sizeof(dmar_root_entry_t)) +#define DMAR_CTX_CNT (IOMMU_PAGE_SIZE / sizeof(dmar_root_entry_t)) typedef struct dmar_ctx_entry { uint64_t ctx1; @@ -73,9 +63,6 @@ typedef struct dmar_ctx_entry { #define DMAR_CTX2_DID(x) ((x) << 8) /* Domain Identifier */ #define DMAR_CTX2_GET_DID(ctx2) (((ctx2) & DMAR_CTX2_DID_MASK) >> 8) -typedef struct dmar_pte { - uint64_t pte; -} dmar_pte_t; #define DMAR_PTE_R 1 /* Read */ #define DMAR_PTE_W (1 << 1) /* Write */ #define DMAR_PTE_SP (1 << 7) /* Super Page */ diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index 4d680cc7d9e8..356b8d5e6436 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -63,6 +63,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> u_int @@ -182,7 +183,7 @@ pglvl_max_pages(int pglvl) int i; for (res = 0, i = pglvl; i > 0; i--) { - res *= DMAR_NPTEPG; + res *= IOMMU_NPTEPG; res++; } return (res); @@ -213,12 +214,12 @@ pglvl_page_size(int total_pglvl, int lvl) { int rlvl; static const iommu_gaddr_t pg_sz[] = { - (iommu_gaddr_t)DMAR_PAGE_SIZE, - (iommu_gaddr_t)DMAR_PAGE_SIZE << DMAR_NPTEPGSHIFT, - (iommu_gaddr_t)DMAR_PAGE_SIZE << (2 * DMAR_NPTEPGSHIFT), - (iommu_gaddr_t)DMAR_PAGE_SIZE << (3 * DMAR_NPTEPGSHIFT), - (iommu_gaddr_t)DMAR_PAGE_SIZE << (4 * DMAR_NPTEPGSHIFT), - (iommu_gaddr_t)DMAR_PAGE_SIZE << (5 * DMAR_NPTEPGSHIFT) + (iommu_gaddr_t)IOMMU_PAGE_SIZE, + (iommu_gaddr_t)IOMMU_PAGE_SIZE << IOMMU_NPTEPGSHIFT, + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (2 * IOMMU_NPTEPGSHIFT), + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (3 * IOMMU_NPTEPGSHIFT), + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (4 * IOMMU_NPTEPGSHIFT), + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (5 * IOMMU_NPTEPGSHIFT), }; KASSERT(lvl >= 0 && lvl < total_pglvl, @@ -243,7 +244,7 @@ calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size, int am; for (am = DMAR_CAP_MAMV(unit->hw_cap);; am--) { - isize = 1ULL << (am + DMAR_PAGE_SHIFT); + isize = 1ULL << (am + IOMMU_PAGE_SHIFT); if ((base & (isize - 1)) == 0 && size >= isize) break; if (am == 0) @@ -253,113 +254,9 @@ calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size, return (am); } -iommu_haddr_t dmar_high; int haw; int dmar_tbl_pagecnt; -vm_page_t -dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags) -{ - vm_page_t m; - int zeroed, aflags; - - zeroed = (flags & IOMMU_PGF_ZERO) != 0 ? VM_ALLOC_ZERO : 0; - aflags = zeroed | VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | VM_ALLOC_NODUMP | - ((flags & IOMMU_PGF_WAITOK) != 0 ? VM_ALLOC_WAITFAIL : - VM_ALLOC_NOWAIT); - for (;;) { - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WLOCK(obj); - m = vm_page_lookup(obj, idx); - if ((flags & IOMMU_PGF_NOALLOC) != 0 || m != NULL) { - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - break; - } - m = vm_page_alloc_contig(obj, idx, aflags, 1, 0, - dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - if (m != NULL) { - if (zeroed && (m->flags & PG_ZERO) == 0) - pmap_zero_page(m); - atomic_add_int(&dmar_tbl_pagecnt, 1); - break; - } - if ((flags & IOMMU_PGF_WAITOK) == 0) - break; - } - return (m); -} - -void -dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) -{ - vm_page_t m; - - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WLOCK(obj); - m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT); - if (m != NULL) { - vm_page_free(m); - atomic_subtract_int(&dmar_tbl_pagecnt, 1); - } - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); -} - -void * -dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, - struct sf_buf **sf) -{ - vm_page_t m; - bool allocated; - - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WLOCK(obj); - m = vm_page_lookup(obj, idx); - if (m == NULL && (flags & IOMMU_PGF_ALLOC) != 0) { - m = dmar_pgalloc(obj, idx, flags | IOMMU_PGF_OBJL); - allocated = true; - } else - allocated = false; - if (m == NULL) { - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - return (NULL); - } - /* Sleepable allocations cannot fail. */ - if ((flags & IOMMU_PGF_WAITOK) != 0) - VM_OBJECT_WUNLOCK(obj); - sched_pin(); - *sf = sf_buf_alloc(m, SFB_CPUPRIVATE | ((flags & IOMMU_PGF_WAITOK) - == 0 ? SFB_NOWAIT : 0)); - if (*sf == NULL) { - sched_unpin(); - if (allocated) { - VM_OBJECT_ASSERT_WLOCKED(obj); - dmar_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL); - } - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - return (NULL); - } - if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == - (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) - VM_OBJECT_WLOCK(obj); - else if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == 0) - VM_OBJECT_WUNLOCK(obj); - return ((void *)sf_buf_kva(*sf)); -} - -void -dmar_unmap_pgtbl(struct sf_buf *sf) -{ - - sf_buf_free(sf); - sched_unpin(); -} - static void dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) { @@ -374,7 +271,7 @@ dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) } void -dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst) +dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst) { dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); @@ -686,11 +583,6 @@ dmar_timeout_sysctl(SYSCTL_HANDLER_ARGS) return (error); } -static SYSCTL_NODE(_hw_iommu, OID_AUTO, dmar, CTLFLAG_RD | CTLFLAG_MPSAFE, - NULL, ""); -SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, tbl_pagecnt, CTLFLAG_RD, - &dmar_tbl_pagecnt, 0, - "Count of pages used for DMAR pagetables"); SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, batch_coalesce, CTLFLAG_RWTUN, &dmar_batch_coalesce, 0, "Number of qi batches between interrupt"); diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c new file mode 100644 index 000000000000..ffea1cc1a190 --- /dev/null +++ b/sys/x86/iommu/iommu_utils.c @@ -0,0 +1,164 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2013, 2014 The FreeBSD Foundation + * + * This software was developed by Konstantin Belousov <kib@FreeBSD.org> + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/memdesc.h> +#include <sys/mutex.h> +#include <sys/sf_buf.h> +#include <sys/sysctl.h> +#include <sys/proc.h> +#include <sys/sched.h> +#include <sys/rwlock.h> +#include <sys/taskqueue.h> +#include <sys/tree.h> +#include <vm/vm.h> +#include <vm/vm_page.h> +#include <vm/vm_object.h> +#include <dev/pci/pcireg.h> +#include <machine/atomic.h> +#include <machine/bus.h> +#include <machine/cpu.h> +#include <x86/include/busdma_impl.h> +#include <dev/iommu/busdma_iommu.h> +#include <dev/iommu/iommu.h> +#include <x86/iommu/x86_iommu.h> + +vm_page_t +iommu_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags) +{ + vm_page_t m; + int zeroed, aflags; + + zeroed = (flags & IOMMU_PGF_ZERO) != 0 ? VM_ALLOC_ZERO : 0; + aflags = zeroed | VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | VM_ALLOC_NODUMP | + ((flags & IOMMU_PGF_WAITOK) != 0 ? VM_ALLOC_WAITFAIL : + VM_ALLOC_NOWAIT); + for (;;) { + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WLOCK(obj); + m = vm_page_lookup(obj, idx); + if ((flags & IOMMU_PGF_NOALLOC) != 0 || m != NULL) { + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + break; + } + m = vm_page_alloc_contig(obj, idx, aflags, 1, 0, + iommu_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + if (m != NULL) { + if (zeroed && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + atomic_add_int(&iommu_tbl_pagecnt, 1); + break; + } + if ((flags & IOMMU_PGF_WAITOK) == 0) + break; + } + return (m); +} + +void +iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) +{ + vm_page_t m; + + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WLOCK(obj); + m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT); + if (m != NULL) { + vm_page_free(m); + atomic_subtract_int(&iommu_tbl_pagecnt, 1); + } + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); +} + +void * +iommu_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, + struct sf_buf **sf) +{ + vm_page_t m; + bool allocated; + + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WLOCK(obj); + m = vm_page_lookup(obj, idx); + if (m == NULL && (flags & IOMMU_PGF_ALLOC) != 0) { + m = iommu_pgalloc(obj, idx, flags | IOMMU_PGF_OBJL); + allocated = true; + } else + allocated = false; + if (m == NULL) { + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + return (NULL); + } + /* Sleepable allocations cannot fail. */ + if ((flags & IOMMU_PGF_WAITOK) != 0) + VM_OBJECT_WUNLOCK(obj); + sched_pin(); + *sf = sf_buf_alloc(m, SFB_CPUPRIVATE | ((flags & IOMMU_PGF_WAITOK) + == 0 ? SFB_NOWAIT : 0)); + if (*sf == NULL) { + sched_unpin(); + if (allocated) { + VM_OBJECT_ASSERT_WLOCKED(obj); + iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL); + } + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + return (NULL); + } + if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == + (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) + VM_OBJECT_WLOCK(obj); + else if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == 0) + VM_OBJECT_WUNLOCK(obj); + return ((void *)sf_buf_kva(*sf)); +} + +void +iommu_unmap_pgtbl(struct sf_buf *sf) +{ + + sf_buf_free(sf); + sched_unpin(); +} + +iommu_haddr_t iommu_high; +int iommu_tbl_pagecnt; + +SYSCTL_NODE(_hw_iommu, OID_AUTO, dmar, CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, ""); +SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, tbl_pagecnt, CTLFLAG_RD, + &iommu_tbl_pagecnt, 0, + "Count of pages used for DMAR pagetables"); diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h new file mode 100644 index 000000000000..3789586f1eaf --- /dev/null +++ b/sys/x86/iommu/x86_iommu.h @@ -0,0 +1,62 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2013-2015 The FreeBSD Foundation *** 58 LINES SKIPPED *** From nobody Sat May 25 08:30:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmZqh21P9z5L1T3; Sat, 25 May 2024 08:30: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 4VmZqh042nz4dXy; Sat, 25 May 2024 08:30:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716625856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zv5kUpnPcZVI9RP13B9Wl/WwuCAKILpVihHlihw583k=; b=y3M1nULVzA9fi6Hx7H5P6vdjyI81AFFtyZDisAIKkf/7vcp3NVbZ3bDsvBq4QYKphcxvlX vOThO7TgJVhZbCg9u+mRhxMJVwYfmZDvK5L2qXUmyfHTR7fYq228d+qkhrfwcRxRa4fDrI CLY+KryR7Dkw9EzCWqSQi7pPGzgpa+NbLxiVg4yo6hsmLhSFiQ8/g4YVTJUOXo+zYSgSoR I+/nYrO9QgtjJ3r+u3q16nHGwi3uxMxqiA0G8xXHuV8MVfjC58bpxYJ9SoZZJEfci9vuG9 ddv0bcRT8DtuOZDq1sjBcGKU4JAgC6lBqG6VgellUZ4n2oxfgymsj4Qd6UrlIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716625856; a=rsa-sha256; cv=none; b=X8cXg+t3FV/Oy0YTtNcKN9oSvSza89wR48DLuBw8I9x0svS+fIENuM1sA+qWlLnnoIYrBg nDfDBBa07culeHoKpPIu4LdQFskSJMYkYJUdjQNV1Hcomy9seIu4e6g+IQDPOMEiftD35D l8uLIdgtSXJFC6lhR87SJvZyIMnDgCfsz9GFwzkzM4TTqesa73iV1tjjdmIcQ+FtP5a8FZ pXOkSy+fU1h2gyNIZU6St2MFBrTaVWfSJvLFr05A5J7B1TkZzX6j3wRXaCLWtHhbmjAIb/ vVUM62p3gV3Jy5zY3dP+BzJnaRxyJqT1HYzXAmPaQZ2qP2/jqtScvpD/C78jzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716625856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zv5kUpnPcZVI9RP13B9Wl/WwuCAKILpVihHlihw583k=; b=JJRRuWqvPvaY9dB0UL8ysGLJu5vHvslargwj2vlg1GflPTt24M3nzAO0puyWQQaHqcbSS/ awQ1bS+aJQTSJYKM3aqwAdjkVAZTKQg3PascxNffYm/8d4hJXYouOEqW69PhRdIdo69sQf fJqxy1czBmh7PWTv5FhIRP96KObyYpJZ+O/LsZjhgXjNBP0jNLNKZqj+C33hET/dB6sXAf kryvDGlquB+WGSWsxJOU4whGVS5cJg9ULwaN3tVFjtWxO10Rww0dtOj4H2xIYR1F4KB+Wx 723nvPlmOf0PzBVbcEw7PxsawD7f1icqPthN0sOuw+0zsiCSgIQLEcGl1VUfUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmZqg6nSgz18sf; Sat, 25 May 2024 08:30: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 44P8Utmc027663; Sat, 25 May 2024 08:30:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P8Utfg027660; Sat, 25 May 2024 08:30:55 GMT (envelope-from git) Date: Sat, 25 May 2024 08:30:55 GMT Message-Id: <202405250830.44P8Utfg027660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: 02d15215cef2 - main - tcp: improve blackhole support List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02d15215cef2a28f1865e6ad5b19f18af1398b8b Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=02d15215cef2a28f1865e6ad5b19f18af1398b8b commit 02d15215cef2a28f1865e6ad5b19f18af1398b8b Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-24 04:59:13 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-24 04:59:13 +0000 tcp: improve blackhole support There are two improvements to the TCP blackhole support: (1) If net.inet.tcp.blackhole is set to 2, also sent no RST whenever a segment is received on an existing closed socket or if there is a port mismatch when using UDP encapsulation. (2) If net.inet.tcp.blackhole is set to 3, no RST segment is sent in response to incoming segments on closed sockets or in response to unexpected segments on listening sockets. Thanks to gallatin@ for suggesting such an improvement. Reviewed by: gallatin MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45304 --- share/man/man4/blackhole.4 | 10 +++++++--- sys/netinet/tcp_input.c | 43 +++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 090f330a6ed8..bb955fd4497d 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd May 22, 2024 +.Dd May 25, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -21,7 +21,7 @@ MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connectio attempts .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" -.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2" +.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" .Cd sysctl net.inet.tcp.blackhole_local Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole_local Ns Op = Ns Brq "0 | 1" @@ -30,7 +30,8 @@ The .Nm .Xr sysctl 8 MIB is used to control system behaviour when connection requests -are received on SCTP, TCP, or UDP ports where there is no socket listening. +are received on SCTP, TCP, or UDP ports where there is no socket listening +or unexpected packets are received on listening sockets. .Pp The blackhole behaviour is useful to slow down an attacker who is port-scanning a system in an attempt to detect vulnerable services. @@ -61,6 +62,9 @@ is merely dropped, and no RST is sent, making the system appear as a blackhole. By setting the MIB value to two, any segment arriving on a closed port is dropped without returning a RST. +Setting the MIB value to three, any segment arriving on a closed port +or an unexpected segment on a listening port is dropped without sending a +RST in reply. This provides some degree of protection against stealth port scans. .Ss UDP Enabling blackhole behaviour turns off the sending diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 56327bd99cd7..08ff84039c90 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -915,23 +915,6 @@ findpcb: log(LOG_INFO, "%s; %s: Connection attempt " "to closed port\n", s, __func__); } - /* - * When blackholing do not respond with a RST but - * completely ignore the segment and drop it. - */ - if (((V_blackhole == 1 && (thflags & TH_SYN)) || - V_blackhole == 2) && (V_blackhole_local || ( -#ifdef INET6 - isipv6 ? !in6_localaddr(&ip6->ip6_src) : -#endif -#ifdef INET - !in_localip(ip->ip_src) -#else - true -#endif - ))) - goto dropunlock; - rstreason = BANDLIM_RST_CLOSEDPORT; goto dropwithreset; } @@ -1410,15 +1393,27 @@ tfo_socket_result: return (IPPROTO_DONE); dropwithreset: + /* + * When blackholing do not respond with a RST but + * completely ignore the segment and drop it. + */ + if (((rstreason == BANDLIM_RST_OPENPORT && V_blackhole == 3) || + (rstreason == BANDLIM_RST_CLOSEDPORT && + ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) && + (V_blackhole_local || ( +#ifdef INET6 + isipv6 ? !in6_localaddr(&ip6->ip6_src) : +#endif +#ifdef INET + !in_localip(ip->ip_src) +#else + true +#endif + ))) + goto dropunlock; TCP_PROBE5(receive, NULL, tp, m, tp, th); - - if (inp != NULL) { - tcp_dropwithreset(m, th, tp, tlen, rstreason); - INP_UNLOCK(inp); - } else - tcp_dropwithreset(m, th, NULL, tlen, rstreason); + tcp_dropwithreset(m, th, tp, tlen, rstreason); m = NULL; /* mbuf chain got consumed. */ - goto drop; dropunlock: if (m != NULL) From nobody Sat May 25 15:00:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmlTb3Gjgz5LjPK; Sat, 25 May 2024 15:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmlTZ6y4Rz4GWd; Sat, 25 May 2024 15:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716649251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XUkSZQna7xGTrN/eV3jcDatKOw4UPJLJOP4FPB8NLIM=; b=G+K4xN2nqAIaKDCtnGTpIj0WSBUCgFJ8Xl0UUQmSR3NrBtHN8o3szerSFjZZqglVr0hR+b TM1evuK0uNLqTu1lb4hYCUcwGwpxgFsLcPKjoM2WLc/HcllpfKzG5bVXuCCAysxUn39XEg 1NV4Df9X7ytFjMRQbCJitJuY3EqacqZQ+g6Nlgz73lxAPsKpDTIsz1nmP62yMlOiVFCSiE sctdzP0XEvYegYPLnHAxAj4ur9Mbh/3HkdaMZqn8VogKtekWsLTm+Qn8ZXeReaVPTjBvR1 xEPKeskjPP6FjvN9EfdOAutjYW2SJvy4douQznpre5nGfcyHz03D0PBdzaOj/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716649251; a=rsa-sha256; cv=none; b=nUSP+z5lw9NErmXkkRi6dA9GBfcNg+OIBPrlJ2R3rFjHv+IprJjSlGpxNSaxPYEjE6Zh+u 5g6N31+BmeLUKgM5ZVDvS6KMOsX1uGXaxZfyFD27qval9hIZO5U7ATXfIzqpUmUjZ3iz4s StOw2ipqJ08WthcN22Js+jEZIhOOIrn5QNxoNl3e/fPGhg86v+RtUTE2KDki1kHWXxcq/K MJgzZv70/sSx89jogGrhWuBfTeYR65SppjodHUEfRD+G+KGzfwV2WgatEFyQmOjCIeT1X2 M7or8O2yzmSTQ4P+oDvIOy/IA6QTpoOxHX8otOh/y89kQyqCXKIYgxlVd+Uy/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716649251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XUkSZQna7xGTrN/eV3jcDatKOw4UPJLJOP4FPB8NLIM=; b=xCrfHGWdM1NrzvJdUo9wvjC/Z42Pi/QMMOInENJsWg50q3+iPG6oY9a4CpSkszf0He3fJ5 tnx4h3oT6P0rb3eqkNj14Hbu9M8x+Qd23HZiBqLdDte80d/SAp90BrJrDDSFX4AIcdJOe2 Mk1K7h2PznoUorKsW48dini7XWoU2Nf8XZsIOqDwjuuh1C2x/+oFIgOSCzs+u2lkIO01g2 yDZ4zVyM7s1G/WBMYgod2d4wMy5O4OTlM/0P+t4fH7YMQVjCJ5DVFEcqPxryKDbeB5dfsS 4BSvl/UH29RJfi+XBPGN7rXX6s7/VY0leZBv4HvL9haoBVVCf92aOJTCXLWvig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmlTZ6HL3zLrM; Sat, 25 May 2024 15:00: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 44PF0oss084076; Sat, 25 May 2024 15:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PF0odb084073; Sat, 25 May 2024 15:00:50 GMT (envelope-from git) Date: Sat, 25 May 2024 15:00:50 GMT Message-Id: <202405251500.44PF0odb084073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: 9b1de7e4844d - main - vt/sc: retire logic to select vt(4) by default for UEFI boot List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b1de7e4844d951a7d7335cbde75a86a2380e220 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9b1de7e4844d951a7d7335cbde75a86a2380e220 commit 9b1de7e4844d951a7d7335cbde75a86a2380e220 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-24 21:36:09 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-25 15:00:35 +0000 vt/sc: retire logic to select vt(4) by default for UEFI boot We previously defaulted to using sc(4) with a special case to prefer vt(4) when booted via UEFI. As vt(4) is now always the default we can simplify this. Reviewed by: imp, kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45356 --- sys/amd64/amd64/machdep.c | 9 --------- sys/kern/kern_cons.c | 18 ------------------ sys/sys/cons.h | 1 - 3 files changed, 28 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c8539b7b189d..c509dcc2f7dd 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1464,15 +1464,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) r_idt.rd_base = (long) idt; lidt(&r_idt); - /* - * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) - * transition). - * Once bootblocks have updated, we can test directly for - * efi_systbl != NULL here... - */ - if (efi_boot) - vty_set_preferred(VTY_VT); - TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable); TUNABLE_INT_FETCH("machdep.mitigations.ibrs.disable", &hw_ibrs_disable); diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 040aa3932a1a..2ab86d5905a9 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -737,7 +737,6 @@ sysbeep(int pitch __unused, sbintime_t duration __unused) /* * Temporary support for sc(4) to vt(4) transition. */ -static unsigned vty_prefer; static char vty_name[16]; SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, vty_name, 0, "Console vty driver"); @@ -762,10 +761,6 @@ vty_enabled(unsigned vty) break; } #endif - if (vty_prefer != 0) { - vty_selected = vty_prefer; - break; - } #if defined(DEV_VT) vty_selected = VTY_VT; #elif defined(DEV_SC) @@ -780,16 +775,3 @@ vty_enabled(unsigned vty) } return ((vty_selected & vty) != 0); } - -void -vty_set_preferred(unsigned vty) -{ - - vty_prefer = vty; -#if !defined(DEV_SC) - vty_prefer &= ~VTY_SC; -#endif -#if !defined(DEV_VT) - vty_prefer &= ~VTY_VT; -#endif -} diff --git a/sys/sys/cons.h b/sys/sys/cons.h index 78df26858376..c7110a7c8c17 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -145,7 +145,6 @@ int constty_clear(struct tty *tp); #define VTY_SC 0x01 #define VTY_VT 0x02 int vty_enabled(unsigned int); -void vty_set_preferred(unsigned int); #endif /* _KERNEL */ From nobody Sat May 25 17:25:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vmph833V1z5LDtY; Sat, 25 May 2024 17:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vmph82NCqz4V3s; Sat, 25 May 2024 17:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d0pWZosFQV1+zHG0ptnlb5++2Q0fKvrtLej6T0RzEa8=; b=Dgd9/RR0cbuGpC7Z2xuMKzYetmKApu7sExEIA9AEaQdv9lm6YKj3L5f561vlIKZpVnWuLa GqODqH1K5k0ErodueMA8HJasP1yJR2itr3TeeMsnk+fGkNJLKDaWAqgXZ0hrXQc6LNG/Vi wsktBZ0fi3a6jSVixFR9tolCZ6W0kRMEfeN/2SXVKuWC1JZnZ/N2fAgy7ez4mhKddtQtFR ToKI998J/6IkA93w9FbXVB4/2ZEbDekB18UfP6xBHgRboyOUj0DBj4/VdB+V9WCiyKWfnH 9rvRKMNdRR4EIFo9+4jvAkqW3fzdVoP8W/r5SUn0tRFQXhXC3WjiMD88wpsjpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716657912; a=rsa-sha256; cv=none; b=vEhQQRoZZfJ3qqFO0PBChAD+nEdiZ4kGTFEbBqyLS3n2IqzdNUvGSus9x1rxywzLPMO9Oe YF4nhLO8pOGtEmZNSKAZ1jpRUOmmAEuNKwbiXJ56jxURdpJJXAhHeZS0bcbHW129W1l4Ar TvIjCe/i61kN85x9h82GWaulQSex8/44snqJYnXaovsrdAPOELkS2JbehIyBpVmzjVveHZ sicLuspjDti0Pz6LGyDf0sBuycFuGd/AlDiwNGZkCII6dkAIAIabYj2tjNJ0Z6195tgtKX fNThck7rnfLzol13T7bpXLPqlJonTWFS4y+44raQ3RJ7h5EpCl6p/tp3KyLGwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d0pWZosFQV1+zHG0ptnlb5++2Q0fKvrtLej6T0RzEa8=; b=mwBmn/Uoy/+5UDnvmz4akmS0SdBihvZe2sCkioLWGibTNVMCFsx+hoSrChRe1g9v49XrUJ 6KyS6JmdMD5MK4MiOkUunmRdCo3xwXgaLUQCKkgr5r/pL3YNVxacdPvZ1atRJuVPZTw7Lq Htf4uD+utA0l24r21gdWW8g3YFwmYDLAO1VrYRJJqclcSrBktHj6YDynVp/YcS6AVdo+He xrnrYHoNfEhsHBwAF134pUxfXr7DR0LmauKDV+xR2ioh1MeleOYMbGKzc/gYDCysxGdT1H KTW4gOpSh0Ticx3LzU+VgWKw4pcSROxomf0ceJyE+hkioMOQ+/3Qxe6onVg2wQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vmph81rWSzQqF; Sat, 25 May 2024 17:25:12 +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 44PHPCuw026647; Sat, 25 May 2024 17:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHPCSK026644; Sat, 25 May 2024 17:25:12 GMT (envelope-from git) Date: Sat, 25 May 2024 17:25:12 GMT Message-Id: <202405251725.44PHPCSK026644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= <bnovkov@FreeBSD.org> Subject: git: da76d349b6b1 - main - uma: Deduplicate uma_small_alloc List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da76d349b6b104f4e70562304c800a0793dea18d Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=da76d349b6b104f4e70562304c800a0793dea18d commit da76d349b6b104f4e70562304c800a0793dea18d Author: Bojan Novković <bnovkov@FreeBSD.org> AuthorDate: 2024-05-03 16:48:18 +0000 Commit: Bojan Novković <bnovkov@FreeBSD.org> CommitDate: 2024-05-25 17:24:46 +0000 uma: Deduplicate uma_small_alloc This commit refactors the UMA small alloc code and removes most UMA machine-dependent code. The existing machine-dependent uma_small_alloc code is almost identical across all architectures, except for powerpc where using the direct map addresses involved extra steps in some cases. The MI/MD split was replaced by a default uma_small_alloc implementation that can be overridden by architecture-specific code by defining the UMA_MD_SMALL_ALLOC symbol. Furthermore, UMA_USE_DMAP was introduced to replace most UMA_MD_SMALL_ALLOC uses. Reviewed by: markj, kib Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45084 --- sys/amd64/amd64/uma_machdep.c | 71 ------------------------------------------- sys/amd64/include/vmparam.h | 6 ++-- sys/arm64/arm64/uma_machdep.c | 69 ----------------------------------------- sys/arm64/include/vmparam.h | 2 +- sys/conf/files.amd64 | 1 - sys/conf/files.arm64 | 1 - sys/conf/files.riscv | 1 - sys/kern/subr_vmem.c | 6 ++-- sys/powerpc/include/vmparam.h | 6 ++-- sys/riscv/include/vmparam.h | 2 +- sys/riscv/riscv/uma_machdep.c | 68 ----------------------------------------- sys/vm/uma_core.c | 43 ++++++++++++++++++++++++-- sys/vm/vm_map.c | 8 ++--- sys/vm/vm_radix.c | 2 +- 14 files changed, 57 insertions(+), 229 deletions(-) diff --git a/sys/amd64/amd64/uma_machdep.c b/sys/amd64/amd64/uma_machdep.c deleted file mode 100644 index f83f0674cc4e..000000000000 --- a/sys/amd64/amd64/uma_machdep.c +++ /dev/null @@ -1,71 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/malloc.h> -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/vm_page.h> -#include <vm/vm_phys.h> -#include <vm/vm_dumpset.h> -#include <vm/uma.h> -#include <vm/uma_int.h> -#include <machine/md_var.h> - -void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, - int wait) -{ - vm_page_t m; - vm_paddr_t pa; - void *va; - - *flags = UMA_SLAB_PRIV; - m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | - VM_ALLOC_WIRED); - if (m == NULL) - return (NULL); - pa = m->phys_addr; - if ((wait & M_NODUMP) == 0) - dump_add_page(pa); - va = (void *)PHYS_TO_DMAP(pa); - return (va); -} - -void -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) -{ - vm_page_t m; - vm_paddr_t pa; - - pa = DMAP_TO_PHYS((vm_offset_t)mem); - dump_drop_page(pa); - m = PHYS_TO_VM_PAGE(pa); - vm_page_unwire_noq(m); - vm_page_free(m); -} diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index bff9bf840036..e5155a7c7d47 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -72,12 +72,12 @@ #endif /* - * We provide a machine specific single page allocator through the use - * of the direct mapped segment. This uses 2MB pages for reduced + * We provide a single page allocator through the use of the + * direct mapped segment. This uses 2MB pages for reduced * TLB pressure. */ #if !defined(KASAN) && !defined(KMSAN) -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #endif /* diff --git a/sys/arm64/arm64/uma_machdep.c b/sys/arm64/arm64/uma_machdep.c deleted file mode 100644 index f942248d4dcd..000000000000 --- a/sys/arm64/arm64/uma_machdep.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/malloc.h> -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/vm_page.h> -#include <vm/vm_phys.h> -#include <vm/vm_dumpset.h> -#include <vm/uma.h> -#include <vm/uma_int.h> -#include <machine/machdep.h> - -void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, - int wait) -{ - vm_page_t m; - vm_paddr_t pa; - void *va; - - *flags = UMA_SLAB_PRIV; - m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | - VM_ALLOC_WIRED); - if (m == NULL) - return (NULL); - pa = m->phys_addr; - if ((wait & M_NODUMP) == 0) - dump_add_page(pa); - va = (void *)PHYS_TO_DMAP(pa); - return (va); -} - -void -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) -{ - vm_page_t m; - vm_paddr_t pa; - - pa = DMAP_TO_PHYS((vm_offset_t)mem); - dump_drop_page(pa); - m = PHYS_TO_VM_PAGE(pa); - vm_page_unwire_noq(m); - vm_page_free(m); -} diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index ffa5a538504a..0dcd02d63938 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -293,7 +293,7 @@ #endif #if !defined(KASAN) && !defined(KMSAN) -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #endif #ifndef LOCORE diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 18dec5ed47b0..add27418ce08 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -92,7 +92,6 @@ amd64/amd64/support.S standard amd64/amd64/sys_machdep.c standard amd64/amd64/trap.c standard amd64/amd64/uio_machdep.c standard -amd64/amd64/uma_machdep.c standard amd64/amd64/vm_machdep.c standard amd64/pci/pci_cfgreg.c optional pci cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index a3d4fc09da89..8139a7af8ed3 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -78,7 +78,6 @@ arm64/arm64/swtch.S standard arm64/arm64/sys_machdep.c standard arm64/arm64/trap.c standard arm64/arm64/uio_machdep.c standard -arm64/arm64/uma_machdep.c standard arm64/arm64/undefined.c standard arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack \ compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*}" diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index be7ae2b40a08..49c8ddd0c516 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -67,7 +67,6 @@ riscv/riscv/sys_machdep.c standard riscv/riscv/trap.c standard riscv/riscv/timer.c standard riscv/riscv/uio_machdep.c standard -riscv/riscv/uma_machdep.c standard riscv/riscv/unwind.c optional ddb | kdtrace_hooks | stack riscv/riscv/vm_machdep.c standard diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index 1c9a8a5be979..a706d944dc3f 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -624,14 +624,14 @@ qc_drain(vmem_t *vm) uma_zone_reclaim(vm->vm_qcache[i].qc_cache, UMA_RECLAIM_DRAIN); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP static struct mtx_padalign __exclusive_cache_line vmem_bt_lock; /* * vmem_bt_alloc: Allocate a new page of boundary tags. * - * On architectures with uma_small_alloc there is no recursion; no address + * On architectures with UMA_USE_DMAP there is no recursion; no address * space need be allocated to allocate boundary tags. For the others, we * must handle recursion. Boundary tags are necessary to allocate new * boundary tags. @@ -707,7 +707,7 @@ vmem_startup(void) vmem_bt_zone = uma_zcreate("vmem btag", sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP mtx_init(&vmem_bt_lock, "btag lock", NULL, MTX_DEF); uma_prealloc(vmem_bt_zone, BT_MAXALLOC); /* diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index 89982a618bc7..250da8298610 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -111,6 +111,8 @@ #define KERNBASE 0x00100100 /* start of kernel virtual */ +#define UMA_MD_SMALL_ALLOC + #ifdef AIM #ifndef __powerpc64__ #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNEL_SR << ADDR_SR_SHFT) @@ -122,13 +124,13 @@ * Use the direct-mapped BAT registers for UMA small allocs. This * takes pressure off the small amount of available KVA. */ -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #else /* Book-E */ /* Use the direct map for UMA small allocs on powerpc64. */ #ifdef __powerpc64__ -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #else #define VM_MIN_KERNEL_ADDRESS 0xc0000000 #define VM_MAX_KERNEL_ADDRESS 0xffffefff diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index d2014654b691..5711bc8c347e 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -234,7 +234,7 @@ #define VM_INITIAL_PAGEIN 16 #endif -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #ifndef LOCORE extern vm_paddr_t dmap_phys_base; diff --git a/sys/riscv/riscv/uma_machdep.c b/sys/riscv/riscv/uma_machdep.c deleted file mode 100644 index 54e0d25800f6..000000000000 --- a/sys/riscv/riscv/uma_machdep.c +++ /dev/null @@ -1,68 +0,0 @@ -/*- - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/malloc.h> -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/vm_page.h> -#include <vm/vm_phys.h> -#include <vm/vm_dumpset.h> -#include <vm/uma.h> -#include <vm/uma_int.h> - -void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, - int wait) -{ - vm_page_t m; - vm_paddr_t pa; - void *va; - - *flags = UMA_SLAB_PRIV; - m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | - VM_ALLOC_WIRED); - if (m == NULL) - return (NULL); - pa = m->phys_addr; - if ((wait & M_NODUMP) == 0) - dump_add_page(pa); - va = (void *)PHYS_TO_DMAP(pa); - return (va); -} - -void -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) -{ - vm_page_t m; - vm_paddr_t pa; - - pa = DMAP_TO_PHYS((vm_offset_t)mem); - dump_drop_page(pa); - m = PHYS_TO_VM_PAGE(pa); - vm_page_unwire_noq(m); - vm_page_free(m); -} diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index d185f12448ee..f9b6e18899c6 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2079,6 +2079,28 @@ contig_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag, bytes, wait, 0, ~(vm_paddr_t)0, 1, 0, VM_MEMATTR_DEFAULT)); } +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) +void * +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *flags, + int wait) +{ + vm_page_t m; + vm_paddr_t pa; + void *va; + + *flags = UMA_SLAB_PRIV; + m = vm_page_alloc_noobj_domain(domain, + malloc2vm_flags(wait) | VM_ALLOC_WIRED); + if (m == NULL) + return (NULL); + pa = m->phys_addr; + if ((wait & M_NODUMP) == 0) + dump_add_page(pa); + va = (void *)PHYS_TO_DMAP(pa); + return (va); +} +#endif + /* * Frees a number of pages to the system * @@ -2141,6 +2163,21 @@ pcpu_page_free(void *mem, vm_size_t size, uint8_t flags) kva_free(sva, size); } +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) +void +uma_small_free(void *mem, vm_size_t size, uint8_t flags) +{ + vm_page_t m; + vm_paddr_t pa; + + pa = DMAP_TO_PHYS((vm_offset_t)mem); + dump_drop_page(pa); + m = PHYS_TO_VM_PAGE(pa); + vm_page_unwire_noq(m); + vm_page_free(m); +} +#endif + /* * Zero fill initializer * @@ -3154,7 +3191,7 @@ uma_startup1(vm_offset_t virtual_avail) smr_init(); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP extern void vm_radix_reserve_kva(void); #endif @@ -3174,7 +3211,7 @@ uma_startup2(void) vm_map_unlock(kernel_map); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP /* Set up radix zone to use noobj_alloc. */ vm_radix_reserve_kva(); #endif @@ -5171,7 +5208,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count) pages = howmany(count, keg->uk_ipers) * keg->uk_ppera; -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP if (keg->uk_ppera > 1) { #else if (1) { diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 3111dda6e99d..3c7afcb6642f 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -172,7 +172,7 @@ static void vm_map_wire_entry_failure(vm_map_t map, vm_map_entry_t entry, start = end; \ } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP /* * Allocate a new slab for kernel map entries. The kernel map may be locked or @@ -264,7 +264,7 @@ vm_map_startup(void) kmapentzone = uma_zcreate("KMAP ENTRY", sizeof(struct vm_map_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOBUCKET); -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP /* Reserve an extra map entry for use when replenishing the reserve. */ uma_zone_reserve(kmapentzone, KMAPENT_RESERVE + 1); uma_prealloc(kmapentzone, KMAPENT_RESERVE + 1); @@ -660,7 +660,7 @@ _vm_map_unlock(vm_map_t map, const char *file, int line) VM_MAP_UNLOCK_CONSISTENT(map); if (map->system_map) { -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP if (map == kernel_map && (map->flags & MAP_REPLENISH) != 0) { uma_prealloc(kmapentzone, 1); map->flags &= ~MAP_REPLENISH; @@ -937,7 +937,7 @@ vm_map_entry_create(vm_map_t map) { vm_map_entry_t new_entry; -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP if (map == kernel_map) { VM_MAP_ASSERT_LOCKED(map); diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index cfc5a82eacc8..13f9d36194ab 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -82,7 +82,7 @@ vm_radix_node_free(struct pctrie *ptree, void *node) uma_zfree_smr(vm_radix_node_zone, node); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP void vm_radix_reserve_kva(void); /* * Reserve the KVA necessary to satisfy the node allocation. From nobody Sat May 25 17:25:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vmph957tGz5LDTn; Sat, 25 May 2024 17:25: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 4Vmph93QFjz4V1j; Sat, 25 May 2024 17:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjx72SWzHu/MKRjAR0YMIe2eAgbSGoSG6Hr890+/g6U=; b=k1ywi9ugHcGoVgsvyJhDqQEklMMsSKMuUx2OSxbg7Ra6w8ci8Mz2YSxV+T4/UZBV5GQ4ba mqKo5TccfTR0SdS/pH4gynJztVjsyVO77txKlv4PkstejTHDkgvrfljlh8Eg52Ya9K8OTN c+0OWfD7Plp00+30iSwbbM1zo5cAwALNrgJLNw8vEsnAVw/6puJglI1Z4Es254UGh24NMa PWodTL7SdBT5S9cE+EJ+Ma4gsnL+sDWRUKV+w9g4j2GeAi4CtI5HKjoOSJAj4A12hAU/Go Nwaeqsg7afphU08ztE4vr3cg147W05HKCzTGjArIhMeLAnDwFt5KkzDTxXSqLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716657913; a=rsa-sha256; cv=none; b=pqcPGHGP2E4ofq+dwQrC2XAphcZDIcm3jAevln7etTJwXuL2D0CNuN+tbJLlw/SLV31hvC mhSFt9XXwoNLMD3ndfrMZcrZEp/J6KLFslcTPlqRFP6ZuO6U94nzLND8S5AzAKzIMDdKtk he7KLsegceCpP4ULnPy2B1H+BRqPUa2R9hxOvvtmS0oRAWc9PqzaSRHFFgNRTP3xp1BhPn 87UCiU/HPx0DDJbrKQw2uVcU0Cq2I8vJ3oPVF2RPW2gSG8p5yrqMRVSGHP9fE/degy3qQQ hrpbyDvFQ3qyGU4lvPHRis3dVwQZfmqlFhKtu6yz4GM87zKWniqiopci5pgUBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjx72SWzHu/MKRjAR0YMIe2eAgbSGoSG6Hr890+/g6U=; b=AHQiv9TnnluiE2g6tk4aGOKU57E2UMFKMFG1qhM7ok4o9PRgemm8+YDPhnqpwrBZrSwiwv 07h9FwT5a0+9E7cMp3A7/Tz7Jn6uA9E1MhpeXwvLgsTF0opzHFZZBzDVF+v0gZ2CM6HLs5 ITcTcWvH0MY7wf+c0ZHR7U6iRFFIQ2Su03oJ5+3nYDAFOOO9uODA6zPA8oCFdA+E59GQfm Fj7A0LQ1eDM2PAptYBO1lKnRhrihbGSGU/wybe7SBi0k7KeIG+m2K00aSL2FTvDDfEWyPB SGyqCbALhH4efcFiOoEP7fda9OYhEmAtquGCZjbbhEYFdFT+IMgvs92mQjEHdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vmph92xvjzQdC; Sat, 25 May 2024 17:25: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 44PHPDIu026695; Sat, 25 May 2024 17:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHPD4f026692; Sat, 25 May 2024 17:25:13 GMT (envelope-from git) Date: Sat, 25 May 2024 17:25:13 GMT Message-Id: <202405251725.44PHPD4f026692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= <bnovkov@FreeBSD.org> Subject: git: 0a44b8a56d23 - main - vm: Simplify startup page dumping conditional List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a44b8a56d23e24b05471ddb038b7dd30b149efe Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=0a44b8a56d23e24b05471ddb038b7dd30b149efe commit 0a44b8a56d23e24b05471ddb038b7dd30b149efe Author: Bojan Novković <bnovkov@FreeBSD.org> AuthorDate: 2024-05-03 17:53:56 +0000 Commit: Bojan Novković <bnovkov@FreeBSD.org> CommitDate: 2024-05-25 17:24:55 +0000 vm: Simplify startup page dumping conditional This commit introduces the MINIDUMP_STARTUP_PAGE_TRACKING symbol and uses it to simplify several instances of a complex preprocessor conditional for adding pages allocated when bootstraping the kernel to minidumps. Reviewed by: markj, mhorne Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45085 --- sys/amd64/include/vmparam.h | 3 ++- sys/arm/include/vmparam.h | 1 + sys/arm64/include/vmparam.h | 1 + sys/i386/include/vmparam.h | 1 + sys/powerpc/include/vmparam.h | 2 ++ sys/riscv/include/vmparam.h | 1 + sys/vm/uma_core.c | 6 ++---- sys/vm/vm_page.c | 12 +++++------- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index e5155a7c7d47..93c2648e8fac 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -294,7 +294,8 @@ /* * Need a page dump array for minidump. */ -#define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 4ad42cfbe16b..15807923cefb 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -200,5 +200,6 @@ extern vm_offset_t vm_max_kernel_address; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 0 #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 0dcd02d63938..0e93e4026d4a 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -317,6 +317,7 @@ extern vm_offset_t dmap_max_addr; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #endif /* !_MACHINE_VMPARAM_H_ */ diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h index 0d9734ae3830..6f8885a539c3 100644 --- a/sys/i386/include/vmparam.h +++ b/sys/i386/include/vmparam.h @@ -246,5 +246,6 @@ * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 0 #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index 250da8298610..a612acbef239 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -308,11 +308,13 @@ extern int vm_level_0_order; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #else /* * No minidump with 32-bit powerpc. */ #define MINIDUMP_PAGE_TRACKING 0 +#define MINIDUMP_STARTUP_PAGE_TRACKING 0 #endif #define PMAP_HAS_DMAP (hw_direct_map) diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index 5711bc8c347e..5092977d0669 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -257,5 +257,6 @@ extern vm_offset_t init_pt_va; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #endif /* !_MACHINE_VMPARAM_H_ */ diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index f9b6e18899c6..59066eb96ae9 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1890,8 +1890,7 @@ startup_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag, pa = VM_PAGE_TO_PHYS(m); for (i = 0; i < pages; i++, pa += PAGE_SIZE) { -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING if ((wait & M_NODUMP) == 0) dump_add_page(pa); #endif @@ -1918,8 +1917,7 @@ startup_free(void *mem, vm_size_t bytes) if (va >= bootstart && va + bytes <= bootmem) pmap_remove(kernel_pmap, va, va + bytes); for (; bytes != 0; bytes -= PAGE_SIZE, m++) { -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING dump_drop_page(VM_PAGE_TO_PHYS(m)); #endif vm_page_unwire_noq(m); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4429ec067673..9ba31cb9e1b3 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -620,11 +620,7 @@ vm_page_startup(vm_offset_t vaddr) vm_page_dump = (void *)(uintptr_t)pmap_map(&vaddr, new_end, new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); bzero((void *)vm_page_dump, vm_page_dump_size); -#else - (void)last_pa; -#endif -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_STARTUP_PAGE_TRACKING /* * Include the UMA bootstrap pages, witness pages and vm_page_dump * in a crash dump. When pmap_map() uses the direct map, they are @@ -632,6 +628,9 @@ vm_page_startup(vm_offset_t vaddr) */ for (pa = new_end; pa < end; pa += PAGE_SIZE) dump_add_page(pa); +#endif +#else + (void)last_pa; #endif phys_avail[biggestone + 1] = new_end; #ifdef __amd64__ @@ -728,8 +727,7 @@ vm_page_startup(vm_offset_t vaddr) */ new_end = vm_reserv_startup(&vaddr, new_end); #endif -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING /* * Include vm_page_array and vm_reserv_array in a crash dump. */ From nobody Sat May 25 17:58:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmqR43RKHz5LJ2k; Sat, 25 May 2024 17:58: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 4VmqR42wtmz4XR9; Sat, 25 May 2024 17:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716659936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXs7LUHppWxKmf+/TQ5dXQfzqfUz2PlDLGqHmvCRthM=; b=g2WJyobuDpwQoByhXvkFVc3WiGIt/ityn/gsNFIyqLoiylrsLpvTncbHVJZ+VWosUu9Upz KQ79mrGrIZJr8rg5TKD+ttEn5Q/jI13kGR0s7pP/Zw+0pvTN6CDgE5yhd3dX+55YlnCs77 mIwFznRKipyX+cVzOMQ0UOFsP6TfPnFc0dfcDOxls7tA+ul/4pWp14u3yPYP+dt0DrX/qW qI9dO8wT/dzspiB9L8e2JwcWmHMKS5PH8PHEXTakQHjvM3zSIoTXn4Zu7EpUO/7KV1OqyP UVkZZZFmg2ZFLAr3MsTcztOJ71THd9gUqqunm07wqTh01Z4J3/rp3l5CgCElLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716659936; a=rsa-sha256; cv=none; b=XWRg2Beh9arE1/ohY35RhtB3ElSxplA956N2AEwNDjWefVYzt2NUYo7APREwYDRbU5qd2L kfR2aH8Uq1z34+GyRU3/5k/MM9ok8+00TvMXb1kTNAZSUWxM66+fpAJ0lM6twPP3JKBU0/ rSPNqTAk/95e9SAyyIzd4+BwKCXxouKEwYjJEVjwKLH+3FmX96asMuM48h6c4cnt9tpOwK /ue0KZ6OhkSENYgxBPmze5ktKSTJ+wZLqGRMz+djC40aQVeZV0/KiFfGUmx4vl6Cr3Wgzn 5Ww+FB/XP2dD2nUfgliiFtGowCJcu0nM8s2Qc1cEeo1KEQT1zXZElPNCZcWFDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716659936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXs7LUHppWxKmf+/TQ5dXQfzqfUz2PlDLGqHmvCRthM=; b=CVkjiWTr0WJHr6azPklGuWWK27rRuizENUiWxby9FUlpR8CiQ6EMOOaIKKK0Gr0uV8zmP+ Yjlsn2IdYXn4U3bFW2O13soK9cIvS2JxOJGF351TFRXkuMUXlshxfYSYcrbqUmUeYhgnzg 6lYWO/5UaQDCOdIYbXe5yXQi/66OakasI61MOX/K9zwan8in4QdoWe5GaLckPC2BYw/wWM ov/r5RyTO6R45eerUxhdzpd6yeJpQnRHjkJY95s5a8Eda6SEZ23YITuiQGfeoqOLrYm1U1 y+EM/EPHe3aypgziFFgiuwrn1NN/kktKdAeKdEHKkonrQXTY/21wEzK+SsZcfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmqR42GP9zRSl; Sat, 25 May 2024 17:58: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 44PHwumd077508; Sat, 25 May 2024 17:58:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHwuRw077506; Sat, 25 May 2024 17:58:56 GMT (envelope-from git) Date: Sat, 25 May 2024 17:58:56 GMT Message-Id: <202405251758.44PHwuRw077506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: df9de82f54d1 - main - tcp: fix sending RST after second inp lookup List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df9de82f54d13aa077889349e15d9bf7794a1e6f Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=df9de82f54d13aa077889349e15d9bf7794a1e6f commit df9de82f54d13aa077889349e15d9bf7794a1e6f Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-25 17:46:33 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-25 17:58:48 +0000 tcp: fix sending RST after second inp lookup When we first find an inp, we set also the tp. If then a second lookup is necessary, the inp is recomputed. If this fails, the tp is not cleared, which resulted in failing KASSERT. Therefore, clear the tp when staring the inp lookup procedure. Reported by: Jenkins Fixes: 02d15215cef2 ("tcp: improve blackhole support") MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 08ff84039c90..7faa815fc1ac 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -833,6 +833,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) ((thflags & (TH_ACK|TH_SYN)) == TH_SYN ? INPLOOKUP_RLOCKPCB : INPLOOKUP_WLOCKPCB); findpcb: + tp = NULL; #ifdef INET6 if (isipv6 && fwd_tag != NULL) { struct sockaddr_in6 *next_hop6; From nobody Sat May 25 18:02:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmqWg3902z5LJ52; Sat, 25 May 2024 18:02: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 4VmqWg2j3zz4Y2P; Sat, 25 May 2024 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716660175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mL/a52VOhwYItYUoHZ+2U0hKLZPWxUIZJRLAWAdhq+Y=; b=XxDMzT8ISI9xP1LWEXmPNrZ43RYGfnjUCIZaWtOBVoMI6+LOvKRM3Pta629hoiSLtftywu WxT1/98i0TQDiy8k2/uSDKx0H0RMNWIpt4JrqsrS/c4AFOdeLIeGQjhRZsnMGSczH/MFHG 4t8GAyZaz6lPLTTHOpCwcZ8ZDKBgJhhjr2VitnFVpAeHUWuXiJwMT6D0TKIzfMBs6Chvmv igbSlQt4m/rcWx0JLkMIIZ2kjhhvjcbr1QIE8RW4UMe4XeRgQeEGGxyqQyRvmfaloJzklg fSEAYCGDSDw6bsexFVgrkbiaE0QWe7JhskXJqjMBiOJWyfIPGgo/wNdW/AQ6Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716660175; a=rsa-sha256; cv=none; b=WSBXCRIee5aQhFpfaM35Aaa0QJat+y9MQWFrsxQeoWg4hauNzfGiuKxf9bfE5cLwzLdFJC yW5vAc08SypzqiL28MFjAOK0k0lH76iPiEScRkKoENCJx3xij+0hzMFcZb+x3AzMM0Ev0h qZHvxV4ENuc0RpSOZhL42+ezigchRQaKZMY0qukKTFcImzl0AnuViOF5Jd/4kWjQfP3MI7 nM3eb5jb3vIGzjW6zmw1vsMDs/OPhrKjcjtFd+XVZWW5Miu2rxPbmHUokqXtdlz1okj+tA 5UdAQnEOhCh4gBckPKprJZdC/Yusj7KcfzFEIFysq6lQfKf1AqaUtdPocA2y8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716660175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mL/a52VOhwYItYUoHZ+2U0hKLZPWxUIZJRLAWAdhq+Y=; b=YDnAiX8SnHZ0BHfmaaSsNU8+zhJ8isI+47FE9JesPRZX3ydo7qB8+ZZevgVzlPBDMCsqGU e7sgkERQZ+h162FGioDRceGMMiHlz0bNVJALHwaDpMnN8oU7oWEApkhX5TDyJx4/w8x3cN +OE9LtKnpdUeoELs3Y76EGJQc0wMKv3lW/bjNUJdZ9KLEW6q7l8Zk55iMUCLdG/P7JX/oj UzCMaYa84asYqrTae1c39CpdzW4ayM/M+i6rYcE4DRscBe+BtKdQUmjSo3u1DnpxOFA9rg 7v2FpbUavEsANqTRj37a1+KEWfSdATl3wsqhKq/A/IQkOWnNh8KOfJ7iHioKJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmqWg2JMczQfh; Sat, 25 May 2024 18:02: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 44PI2tsQ095395; Sat, 25 May 2024 18:02:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PI2tQv095393; Sat, 25 May 2024 18:02:55 GMT (envelope-from git) Date: Sat, 25 May 2024 18:02:55 GMT Message-Id: <202405251802.44PI2tQv095393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: b128bedfb95c - main - mptutil: correct man page date List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b128bedfb95c1fefe10e3375b07e200eff8c3664 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b128bedfb95c1fefe10e3375b07e200eff8c3664 commit b128bedfb95c1fefe10e3375b07e200eff8c3664 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-25 18:00:54 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-25 18:02:36 +0000 mptutil: correct man page date PR: 279201 Fixes: 9a49a3792940 ("mptutil: document that disabled/enab...") Sponsored by: The FreeBSD Foundation --- usr.sbin/mptutil/mptutil.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mptutil/mptutil.8 b/usr.sbin/mptutil/mptutil.8 index 47eb9e43d2b9..1aeaafbfa12e 100644 --- a/usr.sbin/mptutil/mptutil.8 +++ b/usr.sbin/mptutil/mptutil.8 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 24, 2024 +.Dd May 24, 2023 .Dt MPTUTIL 8 .Os .Sh NAME From nobody Sat May 25 18:27:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vmr4528nzz5LLnj; Sat, 25 May 2024 18:27:33 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mx-out-02.fh-muenster.de (mx-out-02.fh-muenster.de [212.201.120.206]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mx.fh-muenster.de", Issuer "GEANT OV RSA CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vmr446R56z4cqX; Sat, 25 May 2024 18:27:32 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Authentication-Results: mx1.freebsd.org; none Received: from mail-director-01.fh-muenster.de (mail-director-01.fh-muenster.de [185.149.215.227]) by mx-out-02.fh-muenster.de (Postfix) with ESMTPS id 66B56E0453; Sat, 25 May 2024 20:27:30 +0200 (CEST) Received: from smtpclient.apple (ip4d15f54e.dynamic.kabel-deutschland.de [77.21.245.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: tuexen) by mail-director-01.fh-muenster.de (Postfix) with ESMTPSA id EB1EC1A0048; Sat, 25 May 2024 20:27:29 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63"; protocol="application/pkcs7-signature"; micalg=sha-256 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: git: da76d349b6b1 - main - uma: Deduplicate uma_small_alloc From: tuexen@fh-muenster.de In-Reply-To: <202405251725.44PHPCSK026644@gitrepo.freebsd.org> Date: Sat, 25 May 2024 20:27:29 +0200 Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Content-Transfer-Encoding: quoted-printable Message-Id: <CEE600C9-BA44-4852-8537-EB70F299AA67@fh-muenster.de> References: <202405251725.44PHPCSK026644@gitrepo.freebsd.org> To: =?utf-8?Q?Bojan_Novkovi=C4=87?= <bnovkov@freebsd.org> X-Mailer: Apple Mail (2.3774.600.62) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:212.201.0.0/16, country:DE] X-Rspamd-Queue-Id: 4Vmr446R56z4cqX --Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 25. May 2024, at 19:25, Bojan Novkovi=C4=87 <bnovkov@freebsd.org> = wrote: >=20 > The branch main has been updated by bnovkov: With this commit, my arm64 VM (VMWare Fusion) stops booting right after printing the line WARNING: WITNESS option enabled, expect reduced performance. Same when doing a verbose boot. Best regards Michael >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dda76d349b6b104f4e70562304c800a07= 93dea18d >=20 > commit da76d349b6b104f4e70562304c800a0793dea18d > Author: Bojan Novkovi=C4=87 <bnovkov@FreeBSD.org> > AuthorDate: 2024-05-03 16:48:18 +0000 > Commit: Bojan Novkovi=C4=87 <bnovkov@FreeBSD.org> > CommitDate: 2024-05-25 17:24:46 +0000 >=20 > uma: Deduplicate uma_small_alloc >=20 > This commit refactors the UMA small alloc code and > removes most UMA machine-dependent code. > The existing machine-dependent uma_small_alloc code is almost = identical > across all architectures, except for powerpc where using the direct > map addresses involved extra steps in some cases. >=20 > The MI/MD split was replaced by a default uma_small_alloc > implementation that can be overridden by architecture-specific code = by > defining the UMA_MD_SMALL_ALLOC symbol. Furthermore, UMA_USE_DMAP = was > introduced to replace most UMA_MD_SMALL_ALLOC uses. >=20 > Reviewed by: markj, kib > Approved by: markj (mentor) > Differential Revision: https://reviews.freebsd.org/D45084 > --- > sys/amd64/amd64/uma_machdep.c | 71 = ------------------------------------------- > sys/amd64/include/vmparam.h | 6 ++-- > sys/arm64/arm64/uma_machdep.c | 69 = ----------------------------------------- > sys/arm64/include/vmparam.h | 2 +- > sys/conf/files.amd64 | 1 - > sys/conf/files.arm64 | 1 - > sys/conf/files.riscv | 1 - > sys/kern/subr_vmem.c | 6 ++-- > sys/powerpc/include/vmparam.h | 6 ++-- > sys/riscv/include/vmparam.h | 2 +- > sys/riscv/riscv/uma_machdep.c | 68 = ----------------------------------------- > sys/vm/uma_core.c | 43 ++++++++++++++++++++++++-- > sys/vm/vm_map.c | 8 ++--- > sys/vm/vm_radix.c | 2 +- > 14 files changed, 57 insertions(+), 229 deletions(-) >=20 > diff --git a/sys/amd64/amd64/uma_machdep.c = b/sys/amd64/amd64/uma_machdep.c > deleted file mode 100644 > index f83f0674cc4e..000000000000 > --- a/sys/amd64/amd64/uma_machdep.c > +++ /dev/null > @@ -1,71 +0,0 @@ > -/*- > - * SPDX-License-Identifier: BSD-2-Clause > - * > - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 1. Redistributions of source code must retain the above copyright > - * notice, this list of conditions and the following disclaimer. > - * 2. Redistributions in binary form must reproduce the above = copyright > - * notice, this list of conditions and the following disclaimer in = the > - * documentation and/or other materials provided with the = distribution. > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > - * SUCH DAMAGE. > - */ > - > -#include <sys/param.h> > -#include <sys/malloc.h> > -#include <vm/vm.h> > -#include <vm/vm_param.h> > -#include <vm/vm_page.h> > -#include <vm/vm_phys.h> > -#include <vm/vm_dumpset.h> > -#include <vm/uma.h> > -#include <vm/uma_int.h> > -#include <machine/md_var.h> > - > -void * > -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, = u_int8_t *flags, > - int wait) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - void *va; > - > - *flags =3D UMA_SLAB_PRIV; > - m =3D vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | > - VM_ALLOC_WIRED); > - if (m =3D=3D NULL) > - return (NULL); > - pa =3D m->phys_addr; > - if ((wait & M_NODUMP) =3D=3D 0) > - dump_add_page(pa); > - va =3D (void *)PHYS_TO_DMAP(pa); > - return (va); > -} > - > -void > -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - > - pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > - dump_drop_page(pa); > - m =3D PHYS_TO_VM_PAGE(pa); > - vm_page_unwire_noq(m); > - vm_page_free(m); > -} > diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h > index bff9bf840036..e5155a7c7d47 100644 > --- a/sys/amd64/include/vmparam.h > +++ b/sys/amd64/include/vmparam.h > @@ -72,12 +72,12 @@ > #endif >=20 > /* > - * We provide a machine specific single page allocator through the = use > - * of the direct mapped segment. This uses 2MB pages for reduced > + * We provide a single page allocator through the use of the > + * direct mapped segment. This uses 2MB pages for reduced > * TLB pressure. > */ > #if !defined(KASAN) && !defined(KMSAN) > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP > #endif >=20 > /* > diff --git a/sys/arm64/arm64/uma_machdep.c = b/sys/arm64/arm64/uma_machdep.c > deleted file mode 100644 > index f942248d4dcd..000000000000 > --- a/sys/arm64/arm64/uma_machdep.c > +++ /dev/null > @@ -1,69 +0,0 @@ > -/*- > - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 1. Redistributions of source code must retain the above copyright > - * notice, this list of conditions and the following disclaimer. > - * 2. Redistributions in binary form must reproduce the above = copyright > - * notice, this list of conditions and the following disclaimer in = the > - * documentation and/or other materials provided with the = distribution. > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > - * SUCH DAMAGE. > - */ > - > -#include <sys/param.h> > -#include <sys/malloc.h> > -#include <vm/vm.h> > -#include <vm/vm_param.h> > -#include <vm/vm_page.h> > -#include <vm/vm_phys.h> > -#include <vm/vm_dumpset.h> > -#include <vm/uma.h> > -#include <vm/uma_int.h> > -#include <machine/machdep.h> > - > -void * > -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, = u_int8_t *flags, > - int wait) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - void *va; > - > - *flags =3D UMA_SLAB_PRIV; > - m =3D vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | > - VM_ALLOC_WIRED); > - if (m =3D=3D NULL) > - return (NULL); > - pa =3D m->phys_addr; > - if ((wait & M_NODUMP) =3D=3D 0) > - dump_add_page(pa); > - va =3D (void *)PHYS_TO_DMAP(pa); > - return (va); > -} > - > -void > -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - > - pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > - dump_drop_page(pa); > - m =3D PHYS_TO_VM_PAGE(pa); > - vm_page_unwire_noq(m); > - vm_page_free(m); > -} > diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h > index ffa5a538504a..0dcd02d63938 100644 > --- a/sys/arm64/include/vmparam.h > +++ b/sys/arm64/include/vmparam.h > @@ -293,7 +293,7 @@ > #endif >=20 > #if !defined(KASAN) && !defined(KMSAN) > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP > #endif >=20 > #ifndef LOCORE > diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 > index 18dec5ed47b0..add27418ce08 100644 > --- a/sys/conf/files.amd64 > +++ b/sys/conf/files.amd64 > @@ -92,7 +92,6 @@ amd64/amd64/support.S standard > amd64/amd64/sys_machdep.c standard > amd64/amd64/trap.c standard > amd64/amd64/uio_machdep.c standard > -amd64/amd64/uma_machdep.c standard > amd64/amd64/vm_machdep.c standard > amd64/pci/pci_cfgreg.c optional pci > cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with = "${DTRACE_S}" > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > index a3d4fc09da89..8139a7af8ed3 100644 > --- a/sys/conf/files.arm64 > +++ b/sys/conf/files.arm64 > @@ -78,7 +78,6 @@ arm64/arm64/swtch.S standard > arm64/arm64/sys_machdep.c standard > arm64/arm64/trap.c standard > arm64/arm64/uio_machdep.c standard > -arm64/arm64/uma_machdep.c standard > arm64/arm64/undefined.c standard > arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack \ > compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*}" > diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv > index be7ae2b40a08..49c8ddd0c516 100644 > --- a/sys/conf/files.riscv > +++ b/sys/conf/files.riscv > @@ -67,7 +67,6 @@ riscv/riscv/sys_machdep.c standard > riscv/riscv/trap.c standard > riscv/riscv/timer.c standard > riscv/riscv/uio_machdep.c standard > -riscv/riscv/uma_machdep.c standard > riscv/riscv/unwind.c optional ddb | kdtrace_hooks | stack > riscv/riscv/vm_machdep.c standard >=20 > diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c > index 1c9a8a5be979..a706d944dc3f 100644 > --- a/sys/kern/subr_vmem.c > +++ b/sys/kern/subr_vmem.c > @@ -624,14 +624,14 @@ qc_drain(vmem_t *vm) > uma_zone_reclaim(vm->vm_qcache[i].qc_cache, UMA_RECLAIM_DRAIN); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP >=20 > static struct mtx_padalign __exclusive_cache_line vmem_bt_lock; >=20 > /* > * vmem_bt_alloc: Allocate a new page of boundary tags. > * > - * On architectures with uma_small_alloc there is no recursion; no = address > + * On architectures with UMA_USE_DMAP there is no recursion; no = address > * space need be allocated to allocate boundary tags. For the others, = we > * must handle recursion. Boundary tags are necessary to allocate new > * boundary tags. > @@ -707,7 +707,7 @@ vmem_startup(void) > vmem_bt_zone =3D uma_zcreate("vmem btag", > sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, > UMA_ALIGN_PTR, UMA_ZONE_VM); > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > mtx_init(&vmem_bt_lock, "btag lock", NULL, MTX_DEF); > uma_prealloc(vmem_bt_zone, BT_MAXALLOC); > /* > diff --git a/sys/powerpc/include/vmparam.h = b/sys/powerpc/include/vmparam.h > index 89982a618bc7..250da8298610 100644 > --- a/sys/powerpc/include/vmparam.h > +++ b/sys/powerpc/include/vmparam.h > @@ -111,6 +111,8 @@ >=20 > #define KERNBASE 0x00100100 /* start of kernel virtual */ >=20 > +#define UMA_MD_SMALL_ALLOC > + > #ifdef AIM > #ifndef __powerpc64__ > #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNEL_SR << ADDR_SR_SHFT) > @@ -122,13 +124,13 @@ > * Use the direct-mapped BAT registers for UMA small allocs. This > * takes pressure off the small amount of available KVA. > */ > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP >=20 > #else /* Book-E */ >=20 > /* Use the direct map for UMA small allocs on powerpc64. */ > #ifdef __powerpc64__ > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP > #else > #define VM_MIN_KERNEL_ADDRESS 0xc0000000 > #define VM_MAX_KERNEL_ADDRESS 0xffffefff > diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h > index d2014654b691..5711bc8c347e 100644 > --- a/sys/riscv/include/vmparam.h > +++ b/sys/riscv/include/vmparam.h > @@ -234,7 +234,7 @@ > #define VM_INITIAL_PAGEIN 16 > #endif >=20 > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP >=20 > #ifndef LOCORE > extern vm_paddr_t dmap_phys_base; > diff --git a/sys/riscv/riscv/uma_machdep.c = b/sys/riscv/riscv/uma_machdep.c > deleted file mode 100644 > index 54e0d25800f6..000000000000 > --- a/sys/riscv/riscv/uma_machdep.c > +++ /dev/null > @@ -1,68 +0,0 @@ > -/*- > - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 1. Redistributions of source code must retain the above copyright > - * notice, this list of conditions and the following disclaimer. > - * 2. Redistributions in binary form must reproduce the above = copyright > - * notice, this list of conditions and the following disclaimer in = the > - * documentation and/or other materials provided with the = distribution. > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > - * SUCH DAMAGE. > - */ > - > -#include <sys/param.h> > -#include <sys/malloc.h> > -#include <vm/vm.h> > -#include <vm/vm_param.h> > -#include <vm/vm_page.h> > -#include <vm/vm_phys.h> > -#include <vm/vm_dumpset.h> > -#include <vm/uma.h> > -#include <vm/uma_int.h> > - > -void * > -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, = u_int8_t *flags, > - int wait) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - void *va; > - > - *flags =3D UMA_SLAB_PRIV; > - m =3D vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | > - VM_ALLOC_WIRED); > - if (m =3D=3D NULL) > - return (NULL); > - pa =3D m->phys_addr; > - if ((wait & M_NODUMP) =3D=3D 0) > - dump_add_page(pa); > - va =3D (void *)PHYS_TO_DMAP(pa); > - return (va); > -} > - > -void > -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - > - pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > - dump_drop_page(pa); > - m =3D PHYS_TO_VM_PAGE(pa); > - vm_page_unwire_noq(m); > - vm_page_free(m); > -} > diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c > index d185f12448ee..f9b6e18899c6 100644 > --- a/sys/vm/uma_core.c > +++ b/sys/vm/uma_core.c > @@ -2079,6 +2079,28 @@ contig_alloc(uma_zone_t zone, vm_size_t bytes, = int domain, uint8_t *pflag, > bytes, wait, 0, ~(vm_paddr_t)0, 1, 0, VM_MEMATTR_DEFAULT)); > } >=20 > +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) > +void * > +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t = *flags, > + int wait) > +{ > + vm_page_t m; > + vm_paddr_t pa; > + void *va; > + > + *flags =3D UMA_SLAB_PRIV; > + m =3D vm_page_alloc_noobj_domain(domain, > + malloc2vm_flags(wait) | VM_ALLOC_WIRED); > + if (m =3D=3D NULL) > + return (NULL); > + pa =3D m->phys_addr; > + if ((wait & M_NODUMP) =3D=3D 0) > + dump_add_page(pa); > + va =3D (void *)PHYS_TO_DMAP(pa); > + return (va); > +} > +#endif > + > /* > * Frees a number of pages to the system > * > @@ -2141,6 +2163,21 @@ pcpu_page_free(void *mem, vm_size_t size, = uint8_t flags) > kva_free(sva, size); > } >=20 > +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) > +void > +uma_small_free(void *mem, vm_size_t size, uint8_t flags) > +{ > + vm_page_t m; > + vm_paddr_t pa; > + > + pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > + dump_drop_page(pa); > + m =3D PHYS_TO_VM_PAGE(pa); > + vm_page_unwire_noq(m); > + vm_page_free(m); > +} > +#endif > + > /* > * Zero fill initializer > * > @@ -3154,7 +3191,7 @@ uma_startup1(vm_offset_t virtual_avail) > smr_init(); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > extern void vm_radix_reserve_kva(void); > #endif >=20 > @@ -3174,7 +3211,7 @@ uma_startup2(void) > vm_map_unlock(kernel_map); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > /* Set up radix zone to use noobj_alloc. */ > vm_radix_reserve_kva(); > #endif > @@ -5171,7 +5208,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count) >=20 > pages =3D howmany(count, keg->uk_ipers) * keg->uk_ppera; >=20 > -#ifdef UMA_MD_SMALL_ALLOC > +#ifdef UMA_USE_DMAP > if (keg->uk_ppera > 1) { > #else > if (1) { > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > index 3111dda6e99d..3c7afcb6642f 100644 > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -172,7 +172,7 @@ static void vm_map_wire_entry_failure(vm_map_t = map, vm_map_entry_t entry, > start =3D end; \ > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP >=20 > /* > * Allocate a new slab for kernel map entries. The kernel map may be = locked or > @@ -264,7 +264,7 @@ vm_map_startup(void) > kmapentzone =3D uma_zcreate("KMAP ENTRY", sizeof(struct vm_map_entry), > NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, > UMA_ZONE_VM | UMA_ZONE_NOBUCKET); > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > /* Reserve an extra map entry for use when replenishing the reserve. = */ > uma_zone_reserve(kmapentzone, KMAPENT_RESERVE + 1); > uma_prealloc(kmapentzone, KMAPENT_RESERVE + 1); > @@ -660,7 +660,7 @@ _vm_map_unlock(vm_map_t map, const char *file, int = line) >=20 > VM_MAP_UNLOCK_CONSISTENT(map); > if (map->system_map) { > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > if (map =3D=3D kernel_map && (map->flags & MAP_REPLENISH) !=3D 0) { > uma_prealloc(kmapentzone, 1); > map->flags &=3D ~MAP_REPLENISH; > @@ -937,7 +937,7 @@ vm_map_entry_create(vm_map_t map) > { > vm_map_entry_t new_entry; >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > if (map =3D=3D kernel_map) { > VM_MAP_ASSERT_LOCKED(map); >=20 > diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c > index cfc5a82eacc8..13f9d36194ab 100644 > --- a/sys/vm/vm_radix.c > +++ b/sys/vm/vm_radix.c > @@ -82,7 +82,7 @@ vm_radix_node_free(struct pctrie *ptree, void *node) > uma_zfree_smr(vm_radix_node_zone, node); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > void vm_radix_reserve_kva(void); > /* > * Reserve the KVA necessary to satisfy the node allocation. --Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCEfMw ggUSMIID+qADAgECAgkA4wvV+K8l2YEwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAkRFMSsw KQYDVQQKDCJULVN5c3RlbXMgRW50ZXJwcmlzZSBTZXJ2aWNlcyBHbWJIMR8wHQYDVQQLDBZULVN5 c3RlbXMgVHJ1c3QgQ2VudGVyMSUwIwYDVQQDDBxULVRlbGVTZWMgR2xvYmFsUm9vdCBDbGFzcyAy MB4XDTE2MDIyMjEzMzgyMloXDTMxMDIyMjIzNTk1OVowgZUxCzAJBgNVBAYTAkRFMUUwQwYDVQQK EzxWZXJlaW4genVyIEZvZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMg ZS4gVi4xEDAOBgNVBAsTB0RGTi1QS0kxLTArBgNVBAMTJERGTi1WZXJlaW4gQ2VydGlmaWNhdGlv biBBdXRob3JpdHkgMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMtg1/9moUHN0vqH l4pzq5lN6mc5WqFggEcVToyVsuXPztNXS43O+FZsFVV2B+pG/cgDRWM+cNSrVICxI5y+NyipCf8F XRgPxJiZN7Mg9mZ4F4fCnQ7MSjLnFp2uDo0peQcAIFTcFV9Kltd4tjTTwXS1nem/wHdN6r1ZB+Ba L2w8pQDcNb1lDY9/Mm3yWmpLYgHurDg0WUU2SQXaeMpqbVvAgWsRzNI8qIv4cRrKO+KA3Ra0Z3qL NupOkSk9s1FcragMvp0049ENF4N1xDkesJQLEvHVaY4l9Lg9K7/AjsMeO6W/VRCrKq4Xl14zzsjz 9AkH4wKGMUZrAcUQDBHHWekCAwEAAaOCAXQwggFwMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU k+PYMiba1fFKpZFK4OpL4qIMz+EwHwYDVR0jBBgwFoAUv1kgNgB5oKAia4zV8mHSuCzLgkowEgYD VR0TAQH/BAgwBgEB/wIBAjAzBgNVHSAELDAqMA8GDSsGAQQBga0hgiwBAQQwDQYLKwYBBAGBrSGC LB4wCAYGZ4EMAQICMEwGA1UdHwRFMEMwQaA/oD2GO2h0dHA6Ly9wa2kwMzM2LnRlbGVzZWMuZGUv cmwvVGVsZVNlY19HbG9iYWxSb290X0NsYXNzXzIuY3JsMIGGBggrBgEFBQcBAQR6MHgwLAYIKwYB BQUHMAGGIGh0dHA6Ly9vY3NwMDMzNi50ZWxlc2VjLmRlL29jc3ByMEgGCCsGAQUFBzAChjxodHRw Oi8vcGtpMDMzNi50ZWxlc2VjLmRlL2NydC9UZWxlU2VjX0dsb2JhbFJvb3RfQ2xhc3NfMi5jZXIw DQYJKoZIhvcNAQELBQADggEBAIcL/z4Cm2XIVi3WO5qYi3FP2ropqiH5Ri71sqQPrhE4eTizDnS6 dl2e6BiClmLbTDPo3flq3zK9LExHYFV/53RrtCyD2HlrtrdNUAtmB7Xts5et6u5/MOaZ/SLick0+ hFvu+c+Z6n/XUjkurJgARH5pO7917tALOxrN5fcPImxHhPalR6D90Bo0fa3SPXez7vTXTf/D6OWS T1k+kEcQSrCFWMBvf/iu7QhCnh7U3xQuTY+8npTD5+32GPg8SecmqKc22CzeIs2LgtjZeOJVEqM7 h0S2EQvVDFKvaYwPBt/QolOLV5h7z/0HJPT8vcP9SpIClxvyt7bPZYoaorVyGTkwggWsMIIElKAD AgECAgcbY7rQHiw9MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYDVQQGEwJERTFFMEMGA1UEChM8VmVy ZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYu MRAwDgYDVQQLEwdERk4tUEtJMS0wKwYDVQQDEyRERk4tVmVyZWluIENlcnRpZmljYXRpb24gQXV0 aG9yaXR5IDIwHhcNMTYwNTI0MTEzODQwWhcNMzEwMjIyMjM1OTU5WjCBjTELMAkGA1UEBhMCREUx RTBDBgNVBAoMPFZlcmVpbiB6dXIgRm9lcmRlcnVuZyBlaW5lcyBEZXV0c2NoZW4gRm9yc2NodW5n c25ldHplcyBlLiBWLjEQMA4GA1UECwwHREZOLVBLSTElMCMGA1UEAwwcREZOLVZlcmVpbiBHbG9i YWwgSXNzdWluZyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ07eRxH3h+Gy8Zp 1xCeOdfZojDbchwFfylfS2jxrRnWTOFrG7ELf6Gr4HuLi9gtzm6IOhDuV+UefwRRNuu6cG1joL6W LkDh0YNMZj0cZGnlm6Stcq5oOVGHecwX064vXWNxSzl660Knl5BpBb+Q/6RAcL0D57+eGIgfn5mI TQ5HjUhfZZkQ0tkqSe3BuS0dnxLLFdM/fx5ULzquk1enfnjK1UriGuXtQX1TX8izKvWKMKztFwUk P7agCwf9TRqaA1KgNpzeJIdl5Of6x5ZzJBTN0OgbaJ4YWa52fvfRCng8h0uwN89Tyjo4EPPLR22M ZD08WkVKusqAfLjz56dMTM0CAwEAAaOCAgUwggIBMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYDVR0P AQH/BAQDAgEGMCkGA1UdIAQiMCAwDQYLKwYBBAGBrSGCLB4wDwYNKwYBBAGBrSGCLAEBBDAdBgNV HQ4EFgQUazqYi/nyU4na4K2yMh4JH+iqO3QwHwYDVR0jBBgwFoAUk+PYMiba1fFKpZFK4OpL4qIM z+EwgY8GA1UdHwSBhzCBhDBAoD6gPIY6aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9v dC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDBAoD6gPIY6aHR0cDovL2NkcDIucGNhLmRmbi5kZS9n bG9iYWwtcm9vdC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDCB3QYIKwYBBQUHAQEEgdAwgc0wMwYI KwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2ZXIvT0NTUDBKBggrBgEF BQcwAoY+aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1nMi1jYS9wdWIvY2FjZXJ0 L2NhY2VydC5jcnQwSgYIKwYBBQUHMAKGPmh0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZ2xvYmFsLXJv b3QtZzItY2EvcHViL2NhY2VydC9jYWNlcnQuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQCBeEWkTqR/ DlXwCbFqPnjMaDWpHPOVnj/z+N9rOHeJLI21rT7H8pTNoAauusyosa0zCLYkhmI2THhuUPDVbmCN T1IxQ5dGdfBi5G5mUcFCMWdQ5UnnOR7Ln8qGSN4IFP8VSytmm6A4nwDO/afr0X9XLchMX9wQEZc+ lgQCXISoKTlslPwQkgZ7nu7YRrQbtQMMONncsKk/cQYLsgMHM8KNSGMlJTx6e1du94oFOO+4oK4v 9NsH1VuEGMGpuEvObJAaguS5Pfp38dIfMwK/U+d2+dwmJUFvL6Yb+qQTkPp8ftkLYF3sv8pBoGH7 EUkp2KgtdRXYShjqFu9VNCIaE40GMIIHKTCCBhGgAwIBAgIMJrRClNKRzetB0jc/MA0GCSqGSIb3 DQEBCwUAMIGNMQswCQYDVQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVp bmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUw IwYDVQQDDBxERk4tVmVyZWluIEdsb2JhbCBJc3N1aW5nIENBMB4XDTIyMDUzMDEzMjIxNVoXDTI1 MDUyOTEzMjIxNVowgcQxCzAJBgNVBAYTAkRFMRwwGgYDVQQIDBNOb3JkcmhlaW4tV2VzdGZhbGVu MREwDwYDVQQHDAhNdWVuc3RlcjEUMBIGA1UECgwLRkggTXVlbnN0ZXIxMjAwBgNVBAsMKUZhY2hi ZXJlaWNoIEVsZWt0cm90ZWNobmlrIHVuZCBJbmZvcm1hdGlrMQ8wDQYDVQQEDAZUdWV4ZW4xEDAO BgNVBCoMB01pY2hhZWwxFzAVBgNVBAMMDk1pY2hhZWwgVHVleGVuMIICIjANBgkqhkiG9w0BAQEF AAOCAg8AMIICCgKCAgEA2QZ7Uheto325SEnX2BTxBvYnz7u/BVmzxKlogaR4K0MA8ZcfNIdQkiJU efjL6imq21BSFsr/tXcODFZmPrvx9aIxjntCxmEFr7qFaw3e3mUIxJyj5n6BxjzZ/hyJte8LBDbj zj+e8WPUzXmYbSxtrh9kgw8NMx3+bo3Hslic+PkKEGx9JJp2I2TEs88xD0rHC2Ljwcfk6bS9jC+/ BAuY/TsbJoq+8d64DYSLGiIYbvMMuxM2C8BlpHLIOLx2FaH+uMqdH2dLVvCacZJ9YzHvvZY8O2nQ OBFCG1UMpX5YLHN8g/t02a+IBt+oe97JMdJ/kZsPjolI98dcRdzz0hTXZql2xvp6zlocm9iGTRcv dCSxy+0x4CIZD1EkVX9zCPGpzdTXnrU+zvnz14Uq3Wbfl3GiVgK0Avr1enfZepruAxAy7KGIm2zi /qY3XSkN8fvWJmYnomOjCRjaPtqS/azmnyeodsxlVhqQKbES65u/PbOXjOlhiYAvemS0IbK4iR76 3iSmkpwSNpJt6BCtFJN+w3Y8tztCP66KPPC1Fri1oj27KPaf04J66MkSjlQdpI7POS6lDyN7X2Hw tgZKRVA94h/JvZp4ld7mTzXTEW2tdO5azPILsL9xOYjSS5VIyUFF4MoxSbfZtXWaZFsMC1fXDNNL uRDrISotdwADuU75Fe0CAwEAAaOCAk4wggJKMD4GA1UdIAQ3MDUwDwYNKwYBBAGBrSGCLAEBBDAQ Bg4rBgEEAYGtIYIsAQEECjAQBg4rBgEEAYGtIYIsAgEECjAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE AwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwHQYDVR0OBBYEFFDbROYIxDr3fvlX tkXqx7T8lihxMB8GA1UdIwQYMBaAFGs6mIv58lOJ2uCtsjIeCR/oqjt0MCAGA1UdEQQZMBeBFXR1 ZXhlbkBmaC1tdWVuc3Rlci5kZTCBjQYDVR0fBIGFMIGCMD+gPaA7hjlodHRwOi8vY2RwMS5wY2Eu ZGZuLmRlL2Rmbi1jYS1nbG9iYWwtZzIvcHViL2NybC9jYWNybC5jcmwwP6A9oDuGOWh0dHA6Ly9j ZHAyLnBjYS5kZm4uZGUvZGZuLWNhLWdsb2JhbC1nMi9wdWIvY3JsL2NhY3JsLmNybDCB2wYIKwYB BQUHAQEEgc4wgcswMwYIKwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2 ZXIvT0NTUDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDEucGNhLmRmbi5kZS9kZm4tY2EtZ2xvYmFs LWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDIucGNhLmRm bi5kZS9kZm4tY2EtZ2xvYmFsLWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDANBgkqhkiG9w0BAQsF AAOCAQEALubmL854icQMxKxOxQK+deXTjC6CLYnUDwB8MvnDC+BSeh3tUHT37fSgsK1ShNUSNJX0 YF0VYLfZ6+lPyaFYLArVrAIHqvDiVURaulB9NA+3gck/VSuRz4ILYBy61XbcGQQ8Wx+g6TcqsjsF oOhqEBycj5QuITj+EFmX8nvfo0dJtVa2OPDk1N9beLfQBcLhspJ/nv0pKhpNWv5YETG26YqYfsC7 FA/ZNGvRcoOPkjkDhBTtG+qq9DDD75XtGEBZhYXbnG15tn4/UV07B+UyK4/cqQSA+My5FML3YsQw EYrV9klVD/mLMOdZV5+95xt7O8IdYeHrBapVlhANH5bFazGCBJ0wggSZAgEBMIGeMIGNMQswCQYD VQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBG b3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUwIwYDVQQDDBxERk4tVmVy ZWluIEdsb2JhbCBJc3N1aW5nIENBAgwmtEKU0pHN60HSNz8wDQYJYIZIAWUDBAIBBQCgggHPMBgG CSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTI0MDUyNTE4MjcyOVowLwYJ KoZIhvcNAQkEMSIEIILojSQPANYry+cIzINsG7NUXj0vtI4ouU7w+NklPELfMIGvBgkrBgEEAYI3 EAQxgaEwgZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZvZXJkZXJ1bmcg ZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsMB0RGTi1QS0kx JTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3rQdI3PzCBsQYL KoZIhvcNAQkQAgsxgaGggZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZv ZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsM B0RGTi1QS0kxJTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3r QdI3PzANBgkqhkiG9w0BAQsFAASCAgCNAoZrQUSWvokvjyCmnvEMcZo9uT2WanD5FVHosrTOpPIn ROotVrPSM+XoqX0UnEso86Uh4qe62xEjlclscEl9dZcR82AocPuKywtXr9ZlxaFKNF8A2yXd0QVr ALiCYM5lXag8bNmyGTvqDNMjpwqNMqEM+NZ/DhH/NkoLyfRTv7MWxjlPplh0QmPK/74fD2R8b4H3 +eob5rHRAt2SGDb3R44e4gmC/4HHg1wsqEdx84d5El9Y4fpDBP4jnzXieQYEGWUQ0OVjN9huSHFs EP+3K4G3eow7FPeTLxOLB7gG1NW0v62/FUrJL6JAY1XaVK92aolXLjjm4/cnAIf0vOZmCOFX85k/ vQt0x4UWCWcm369J6AESJharDBubJj5kxvobNEwi2P2b6VKgOitCVL1ZpvAMrdOYa6FmLzRfZMO0 9wNE00t98IL21PKUkXiI4cbLKETpdLSat6UFS/VlmWhuDyfc9lbRzbKa0S6c7/SCcyQQA5TEoJYe xmxTISrWhIPdpjG2Tk/PTwk6NcZEQ7RSsLEU/K3s25FoBKGOgdkN5Y95v+4Taldut5xCvVkUBnNX KI7fXbH3vmd+tl3tPXBLdpn17rgDog08WD1hntWOUfWDCG1PyKXrtsMpMRb/KUL4Z+YlsiuAJhFP gQbjanrHPXWdmIcVEzBfCNdLtunfhwAAAAAAAA== --Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63-- From nobody Sat May 25 20:18:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmtWb6kn8z5LY8X; Sat, 25 May 2024 20:18: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 4VmtWb3vsgz4qY1; Sat, 25 May 2024 20:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716668283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bWukvAPs5fAdlwwI83k5GBk0VRbBYJAF2q+qhdHmk8=; b=aZ2JcLSK5Z4acJNsETbU3TZ3O+EoeNZM4/n77K3XTzizZMHZwExyKJWGUrH0l3zJnHt8Eh UGs7o3eFKmyzLcmtQbq16iERyKsR9b80UZ4x+zZiyJiSer9EPs8fZNbystHMCGre3bQpgM woTB4+kv/rXboQPj8T6dTMF5YNp2sXbQUhfLZjBJQTeRSoBWZXsTpZgYz+eFtbiyVPbx7y jVU/IYSoqrDui/mZt/Y+8EDh68SJuGpuYbbZqMPb4Oyn7V901djZv9ZPzkHN7Kh4x4Hqw4 QtiQXnfZYphIEjNUGfjhwvDTEk9FlNxlAEa+0k1pj0KOIF2cXAqNddP9pRSYUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716668283; a=rsa-sha256; cv=none; b=mmtRvUwRtADV05ouKOmDPd+RBcYZ4/T0MLp2c/5d1dF+xaT3T8psptItUTrp0wcGjtuINE 2GSju9ijOnKA/XIrklKSGvJ4rdT3iandS2yLQg4szwkwpqxF7CGXtdDJbZst7cjypxxiUc JHrMuWBPG/KMZOTDsbt3Rm6wfjXvdr+DBf9dTu2GveK2R2oxkN3nVM2mcq8g+SbpT7nP2L nUvoCpGW0rZih8P2yNAy9cIpbG6/09Wic3nad9aoJageA3w7S0Y9k6OjjJT1aOhoPASs7g MthUHviBGQxc3QkU0RQhE7Cd6dXHg2I81rOjawmV1jgmQIJMOzk/oIEHzrMnqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716668283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bWukvAPs5fAdlwwI83k5GBk0VRbBYJAF2q+qhdHmk8=; b=wKmtLus0AYRXgYAar7SrGJn8geITvwIe1jrXbwW0RVIvAEc7Vd1HAwt6J0AYqyWi48QgG9 FhfU43ogLroLfDDDuLWywm3CHjLbN/TdmFx2hrUAFqCe+QI1RJZFCiE6x1RrhUcl58mGbX BlctrdjqY2EZ5Gh8MD39se+yi3hq9h6RxDf7zwApqwlcsba9HRql69IoR+wNedibemrM3+ yKP5W1IQfZEAFoSV/QqHOv60HWHZGmYh8C7XvoicBIIbNqvQl0tMf6T5nwy9L7dIQwJ0lp ZIY6puL6ppEV/A9eCcVTRUqGCI23lz5KA9DuN0x1iFc5NfOLq8o+qKP1aE7fzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmtWb3D5ZzWBD; Sat, 25 May 2024 20:18: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 44PKI3NS015679; Sat, 25 May 2024 20:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PKI3L3015676; Sat, 25 May 2024 20:18:03 GMT (envelope-from git) Date: Sat, 25 May 2024 20:18:03 GMT Message-Id: <202405252018.44PKI3L3015676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric <dim@FreeBSD.org> Subject: git: cadd2ca21765 - main - Merge commit d0be944aa511 from llvm-project (by Simon Pilgrim): List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cadd2ca21765ebcb95b77ec94977b4e74e1edc1b Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cadd2ca21765ebcb95b77ec94977b4e74e1edc1b commit cadd2ca21765ebcb95b77ec94977b4e74e1edc1b Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-05-25 17:52:15 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-05-25 19:12:29 +0000 Merge commit d0be944aa511 from llvm-project (by Simon Pilgrim): [X86] Add slow div64 tuning flag to Nehalem target (#91129) This appears to have been missed because later cpus don't inherit from Nehalem tuning much. Noticed while cleaning up for #90985 Merge commit 8b400de79eff from llvm-project (by Simon Pilgrim): [X86] Enable TuningSlowDivide64 on Barcelona/Bobcat/Bulldozer/Ryzen Families (#91277) Despite most AMD cpus having a lower latency for i64 divisions that converge early, we are still better off testing for values representable as i32 and performing a i32 division if possible. All AMD cpus appear to have been missed when we added the "idivq-to-divl" attribute - this patch now matches Intel cpu behaviour (and the x86-64/v2/3/4 levels). Unfortunately the difference in code scheduling means I've had to stop using the update_llc_test_checks script and just use old-fashioned CHECK-DAG checks for divl/divq pairs. Fixes #90985 This fixes possibly worse runtime performance on AMD Zen hardware, when using -march=znver4 (or any other znver), as opposed to -march=x86-64-v4 or the baseline -march=x86-64. A similar fix is applied for Nehalem. PR: 278908 MFC after: 3 days --- contrib/llvm-project/llvm/lib/Target/X86/X86.td | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86.td b/contrib/llvm-project/llvm/lib/Target/X86/X86.td index e89ddcc570c9..1aff5f9fad97 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86.td @@ -867,6 +867,7 @@ def ProcessorFeatures { // Nehalem list<SubtargetFeature> NHMFeatures = X86_64V2Features; list<SubtargetFeature> NHMTuning = [TuningMacroFusion, + TuningSlowDivide64, TuningInsertVZEROUPPER, TuningNoDomainDelayMov]; @@ -1336,6 +1337,7 @@ def ProcessorFeatures { FeatureCMOV, FeatureX86_64]; list<SubtargetFeature> BarcelonaTuning = [TuningFastScalarShiftMasks, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER]; @@ -1358,6 +1360,7 @@ def ProcessorFeatures { list<SubtargetFeature> BtVer1Tuning = [TuningFast15ByteNOP, TuningFastScalarShiftMasks, TuningFastVectorShiftMasks, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER]; @@ -1380,6 +1383,7 @@ def ProcessorFeatures { TuningFastVectorShiftMasks, TuningFastMOVBE, TuningSBBDepBreaking, + TuningSlowDivide64, TuningSlowSHLD]; list<SubtargetFeature> BtVer2Features = !listconcat(BtVer1Features, BtVer2AdditionalFeatures); @@ -1404,6 +1408,7 @@ def ProcessorFeatures { FeatureLWP, FeatureLAHFSAHF64]; list<SubtargetFeature> BdVer1Tuning = [TuningSlowSHLD, + TuningSlowDivide64, TuningFast11ByteNOP, TuningFastScalarShiftMasks, TuningBranchFusion, @@ -1483,6 +1488,7 @@ def ProcessorFeatures { TuningFastScalarShiftMasks, TuningFastVariablePerLaneShuffle, TuningFastMOVBE, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER, From nobody Sun May 26 05:51:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vn7Fm3WTYz4flRy; Sun, 26 May 2024 05:51: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 4Vn7Fm2sZWz4nk2; Sun, 26 May 2024 05:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716702716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ja/VOWPNmzcO9+NOevzVXM3H48cbrc4YysxjBDk5zpk=; b=rftFMf38AhlFfC41PeatWxd93dq+R/QcFABiHXfMPQ46LABabBiZlWjqm2rOBPn+0pUaVA njkCz186yFQ4/tMt+2yL6dlOWuaKoJO60Ds6EcuaTMoV2q7A5Gu8f98wmTJFjzGulU6JWc I2KB+uvxYhZr0GV+bA8KM9gRSj/P1GTENyENR88NQiuVYOPUjf/cdeukS9MQMH2OJvdrd0 0jLVPFFu8LZJGqqvE+cVn7DEN71zeHs3Rn1h1cpRyydHhhEwTT6BsD0sRw4gev8RkMyffc XlsYgNcIwQa3yMqGsOLFPoAijUQflEeePNdhOTDujlCyQpIYO3r2ABB7WjNHLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716702716; a=rsa-sha256; cv=none; b=fhnw9+ukQHyWlMpF4fbPMqB/nTOLYYv5qJkUfu7C/9+oFVZnRMSFA4srARDTbK4VvczFWL obD+Z6/ktmD6j87LVj+YEXs/7pp0I2zJ6d4Hggl1Am/ejrtz+w8IrFPydgcrLxGnckLhAm m5vzsalYD9Vz0z9ZRpSMFdgEYWifj33bf1ovJ4RWXMSGNRO63HPuB0LMRIdh8lWnXRvBHS nlZQxw3ZZWt+YKiW4HRnQ8Ybh6Pg87Qji8tqLkDAx1ZHBPvOIhy7gPpgjqHoTHT6h6BcLc 87PqCFPz79EDnfZX2uDk6J+BQZ/joYPNDK/i3KoxV2zzxvGki72pXB4AXeGlkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716702716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ja/VOWPNmzcO9+NOevzVXM3H48cbrc4YysxjBDk5zpk=; b=mYsD8VOdywTF7Yi4EhfITU9RKmQUhdDCJFiplZij59c2pCu3Qp3on0creOr5k5gyGCEhfu 9i2q8fvaqnLH6G2xNKB0kM8BaZxdqdtQRxD6/UMFUqvV0v9JGAF0H+l47Maoc697eNjEKY FwkLEEcOJtRT8d4yxPGnIxkHSefiUg6828Sd7A0RIJVmL8ENCSFasYKY5+5x9rz8qE5NMl 3CXGkBn2x1jXk3cFj2eRafA2pYt4y/GRoYTkx//ApVS8wx9MryLI4P/j6/1KXtd0+h3S5F /X5L+ApdEuGra6Vol2aSkIlamxrtG9XxQKLmasr8oMwotitehQyUpS2unh/B7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vn7Fm2T5Hznf8; Sun, 26 May 2024 05:51: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 44Q5puGh092326; Sun, 26 May 2024 05:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44Q5pu57092323; Sun, 26 May 2024 05:51:56 GMT (envelope-from git) Date: Sun, 26 May 2024 05:51:56 GMT Message-Id: <202405260551.44Q5pu57092323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider <wosch@FreeBSD.org> Subject: git: 73eb53813fe3 - main - man(1) needs to check for .so files not only in the first line PR: 279182 List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73eb53813fe3a2245edbeb670902e4bb9d41e288 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=73eb53813fe3a2245edbeb670902e4bb9d41e288 commit 73eb53813fe3a2245edbeb670902e4bb9d41e288 Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2024-05-26 05:48:40 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2024-05-26 05:48:40 +0000 man(1) needs to check for .so files not only in the first line PR: 279182 Some manual pages have a copyright notice or commit id before including other files with the .so macro. We need to skip comments and empty lines at the beginning of the manpage while checking for the first .so macro. MFC after: 1 week --- usr.bin/man/man.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index af638527f497..24a0464689cc 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -322,7 +322,7 @@ man_check_for_so() { # We need to loop to accommodate multiple .so directives. while true do - line=$($cattool "$manpage" 2>/dev/null | head -n1) + line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$') case "$line" in .so*) trim "${line#.so}" decho "$manpage includes $tstr" From nobody Sun May 26 14:28:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnLjD4swYz5LXvQ; Sun, 26 May 2024 14:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnLjD3tw4z4ljh; Sun, 26 May 2024 14:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716733680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I7QGSlRt9dOAxhoyUH3dO1r4Ng1GBnw6ropMeyOYgQI=; b=ccbJQ1clf1WCh/8nq9gJnvejZHQegPlF8x1Bfa6xkjUGHuonxN/xwYArens2ra1wLuUSMQ 4O+9yieU5qX/0uVI5CXyxuAce1nh0vTOPFwxlElKNXg+B7ePArEiRGUPrVaGHnn9Zurbwn vEDDJ9RMlGnKZqs15CD9JcozNf7uo1ijAESc/zZ9HZxPOepZSXiVHs++H1Cwi+819RSNay rPcKGCLD/pDU1L3yR2AtwgSWHeIlCC+fDzLWZpCdlqo+00iVUiIgqbupmEhtC0VsgydY0T OcEtihVigeswemj/R2Rtd3shUIkI2r8BlGKtBxNwGf+Ms9W5PKwwbB2HsrCSmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716733680; a=rsa-sha256; cv=none; b=roehgo17RJE0QGCy00xVt7UFzkliEILKdXVLvxkHLLFo/YxfT9FtPGIY2c4aomFsrB0+6E miw2QyP3yhrJ9ugk8kxKE72ynRgdCZTaifwjMSyyy9fl41sqkdvhD4rwzX+BNLLAkv+tk1 Dx3bJPfkc3mQW6B2vDtMmkxHk9StMf+62N+5scwsSFHCOIOWxSjaJNXoU0zVEjvr9zQDu7 osU8YFFrD1xG4Mjgl38pTTYlLp8Lb5DyBkx/sKoDIirmJ9AqAKyhcJqwHZW90BWJsb46v3 9Q5wTG7FYJm45a7ubYuvlCeFg7QZ2MVI3zFm4upkH7F1Db1VEEocY6G1p9ewEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716733680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I7QGSlRt9dOAxhoyUH3dO1r4Ng1GBnw6ropMeyOYgQI=; b=U8khUGMBPE3zunfpbkevxGiS/3k7kJW6PQCUpdwzAGMTDAnDFGJV+zAnSU+LETWoRNsuk2 vpbB++8REDhRdhwpwSfy4vUKVcaUEeIMQlrBxFnLc5wV4ltgGF4OJIF/XYMDs7wj8/+Gd3 fMEniOTSfbJsowahm+xWB+cn3suNxu4Dwr4jvirQBHkYRczmto3frbXmVqIsHd0MMNf9qh geO3yoOHhjl2Eamyr37+M5pW19zauJBY52z9748niDHIghqQA+tzjcXAROfclJes/wUE/b HvNRN9Hpu36M9ykfcnQUM2mq+zsC7O8wHuexwydFSd+zNXY7MdAB+1ev5zlQnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnLjD3VgJz13y8; Sun, 26 May 2024 14:28:00 +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 44QES0uY056434; Sun, 26 May 2024 14:28:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QES0Nk056431; Sun, 26 May 2024 14:28:00 GMT (envelope-from git) Date: Sun, 26 May 2024 14:28:00 GMT Message-Id: <202405261428.44QES0Nk056431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= <bnovkov@FreeBSD.org> Subject: git: d25ed6504383 - main - uma: Fix improper uses of UMA_MD_SMALL_ALLOC List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d25ed6504383e15b7eb6d04876b70548fffc9690 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=d25ed6504383e15b7eb6d04876b70548fffc9690 commit d25ed6504383e15b7eb6d04876b70548fffc9690 Author: Bojan Novković <bnovkov@FreeBSD.org> AuthorDate: 2024-05-26 07:54:45 +0000 Commit: Bojan Novković <bnovkov@FreeBSD.org> CommitDate: 2024-05-26 05:27:37 +0000 uma: Fix improper uses of UMA_MD_SMALL_ALLOC UMA_MD_SMALL_ALLOC was recently replaced by UMA_USE_DMAP, but da76d349b6b1 missed some improper uses of the old symbol. This change makes sure that UMA_USE_DMAP is used properly in code that selects uma_small_alloc. Fixes: da76d349b6b1 Reported by: eduardo, rlibby Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45368 --- sys/vm/uma_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 59066eb96ae9..516ac2c2965a 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2523,7 +2523,7 @@ keg_ctor(void *mem, int size, void *udata, int flags) * If we haven't booted yet we need allocations to go through the * startup cache until the vm is ready. */ -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP if (keg->uk_ppera == 1) keg->uk_allocf = uma_small_alloc; else @@ -2536,7 +2536,7 @@ keg_ctor(void *mem, int size, void *udata, int flags) keg->uk_allocf = contig_alloc; else keg->uk_allocf = page_alloc; -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP if (keg->uk_ppera == 1) keg->uk_freef = uma_small_free; else @@ -5221,7 +5221,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count) keg->uk_kva = kva; keg->uk_offset = 0; zone->uz_max_items = pages * keg->uk_ipers; -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP keg->uk_allocf = (keg->uk_ppera > 1) ? noobj_alloc : uma_small_alloc; #else keg->uk_allocf = noobj_alloc; From nobody Sun May 26 15:05:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnMXB6thvz5Lc1K; Sun, 26 May 2024 15:05: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 4VnMXB5zWmz4ptq; Sun, 26 May 2024 15:05:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716735914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vsvRtnSYoLMa7piYs7Et8fdxXyjj5IUWOOJA/jq6/Hc=; b=RW6pnCuFi8HJPNGFaJPR+BlOSlsqOFbPiKU6bkOS4SFFbFhc261+vW5D/bLBXG/3h+fSpe h+lxUmj/Ce8qAsChHwRNCdXXBowFp7oCDgzzYLEt4j6rLvXfJzypUL9Yp3GFQOX/CUYFbE qgUEmo2F6fuK7ihgA8HGQAXCVHl7YqxjQl+XD7qzb7kSuZzXUAoPfjGMVZEtCcn0A8stm0 7kajKU6XL3pTgYMDBiyYB6eJ3jh4Qg6kplc8uwiPsccqZFO8itC402tBQjCkomEWSxnhZt jFtodTdf58PUHDU7x69WUpQFjKvP9ZKla7L6L9yfML1nS9yvG1Hu/AYePALJrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716735914; a=rsa-sha256; cv=none; b=hqm8x10mdpMgFOiblvhtOMZV52YI+Ogp58Ol6kBE7cWtqEBKYrO0Q9q7oFro1R04mYAdZD tqHXb3FepPxk4ICXbVUM4LksvlRxQ3brpkO/9n3TxoZWsEs0C8RvlsJKmYAUiahuLxCMRS xiVhiTA6Gq7we6Gu0YKi9Re0aPSKyt+uZ/aU8hZagImSLUfX7TQqzMNJoq94KvkzWEQagu lgeWiR/AXo2XsS6S+62/TgFrPgJ7+WyG8w8KN//XtILzUtXK3HCr/ZL5/TY2aTsxxvwPwu D/0GE6H6aZcUDFmU5qytWXr0Uy79y54ri2o0e9HIGg7jynVAnJy+GNMbwkyu3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716735914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vsvRtnSYoLMa7piYs7Et8fdxXyjj5IUWOOJA/jq6/Hc=; b=gEUpb7tZv8dVTWfSWOFWFla28wEg/GBFMrhIGOrnujLLFC+W71Qa8odlv6W01l3lx3DMGP aGmY+aAJn2g7gCLc4r2JZ/rTsjec6447wuFQC/Zjvqt8QjilpJpRefpIj7ozP8E9H0ekkx lJNjioOppCgT7YqDU019IugI1bJbeGvBshrIZU10CGGQugHADMNWksdp/tjH6NffmFxACO M+lj3rfgeYbmM8o3lFP+kLXITABHHf4X54LPpG6HL70umLfYEVl9yBmBdPWYjfW9Wl1wyE MihKkAqzaaq6fsTArq46fIKgW+rFKWFdJeS4JvUJYwCPOnBS78Eqw4+AzAb1Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnMXB5GnBz14Zn; Sun, 26 May 2024 15:05: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 44QF5Evu023908; Sun, 26 May 2024 15:05:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QF5Eid023905; Sun, 26 May 2024 15:05:14 GMT (envelope-from git) Date: Sun, 26 May 2024 15:05:14 GMT Message-Id: <202405261505.44QF5Eid023905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem <rmacklem@FreeBSD.org> Subject: git: c68db4608ef6 - main - Revert "nfscl: Do not do readahead for directories" List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c68db4608ef63534a001b55de80995e1c3442d2a Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c68db4608ef63534a001b55de80995e1c3442d2a commit c68db4608ef63534a001b55de80995e1c3442d2a Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2024-05-26 15:02:30 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2024-05-26 15:02:30 +0000 Revert "nfscl: Do not do readahead for directories" The PR reported hangs that were avoided when this commit was reverted. Since it was only a cleanup, revert it. The LORs in the PR need further investigation, since I think readahead only hides the problem. PR: 279138 This reverts commit fbe965591f8a0a32c805a279a2505d4c20d22d26. --- sys/fs/nfsclient/nfs_clbio.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index fe2ed0dff0dd..e181bf593e23 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -679,6 +679,36 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) goto out; } + /* + * If not eof and read aheads are enabled, start one. + * (You need the current block first, so that you have the + * directory offset cookie of the next block.) + */ + NFSLOCKNODE(np); + if (nmp->nm_readahead > 0 && ncl_bioread_dora(vp) && + (bp->b_flags & B_INVAL) == 0 && + (np->n_direofoffset == 0 || + (lbn + 1) * NFS_DIRBLKSIZ < np->n_direofoffset) && + incore(&vp->v_bufobj, lbn + 1) == NULL) { + NFSUNLOCKNODE(np); + rabp = nfs_getcacheblk(vp, lbn + 1, NFS_DIRBLKSIZ, td); + if (rabp) { + if ((rabp->b_flags & (B_CACHE|B_DELWRI)) == 0) { + rabp->b_flags |= B_ASYNC; + rabp->b_iocmd = BIO_READ; + vfs_busy_pages(rabp, 0); + if (ncl_asyncio(nmp, rabp, cred, td)) { + rabp->b_flags |= B_INVAL; + rabp->b_ioflags |= BIO_ERROR; + vfs_unbusy_pages(rabp); + brelse(rabp); + } + } else { + brelse(rabp); + } + } + NFSLOCKNODE(np); + } /* * Unlike VREG files, whos buffer size ( bp->b_bcount ) is * chopped for the EOF condition, we cannot tell how large @@ -691,7 +721,6 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) * in np->n_direofoffset and chop it off as an extra step * right here. */ - NFSLOCKNODE(np); n = lmin(uio->uio_resid, NFS_DIRBLKSIZ - bp->b_resid - on); if (np->n_direofoffset && n > np->n_direofoffset - uio->uio_offset) n = np->n_direofoffset - uio->uio_offset; From nobody Sun May 26 17:36:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQv76sMkz5LPZH; Sun, 26 May 2024 17:36:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnQv75wZFz5312; Sun, 26 May 2024 17:36:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APBMqQrNTPamIMGOvIm3QaLECAn9wbbXlrGFR5K/aXA=; b=pbdXaejEoKPUcAMqbwvcoJMxLA7rKxi9tzwCm5LR6rY1d0GFhPLo7OVRmVBXbOpSCp0N7I 431ADtyBU8DGIuH0lfHHtKp4s5aLKyxwxThggvXqJ1sc/uEkntnqGL1l/NohPaa5Ykmjem obtopdjY2j73TJ1GIggBY0p/uxcoFGkmdpYOzGlwLG0HSxhcFo8+TcDXXbW1we/GG7rjsP YRRQe/YeHE3fS8KnaMO+uIam1ggm/ALKgniJV81J8WJsJcH4kn/i9mYgLgs00osqB8zPpG 5IE2/zccmsWEekySkwMFsqZZRdNDS7s64SmbLTiqZR4xxD2tlmFz/th+tlAiNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745011; a=rsa-sha256; cv=none; b=j1fyuanykBftSsHakBquLorouRPwooHSNjz8wHM4U/JQMfOz/xD14amhPW/advctheTsLU 0/JlqU7AA9k/t5H9aRpPRC1924R36O6nQH18BXqq1+a9ZXn8B/vvMae+h/cvpyAA9FaWzh KPzjavry21WOGlFJh9IhUBMDH14YNQDJaa2BMqNUAFdV3Wc8kCYyzgXHr6qqxD5462uMow 8diQKog//fw6tjVXw5Bzh9WCzBIGudQpKLiQyOtpl4LYIhyCUdiHXZJ3Qf3FOSRo0ccTsO 280aHGFP54L+NeT4YzO8DlIR0E/JL0v5hmSqtIcxHsXLYVcmj9Fb9Mprm/AiiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APBMqQrNTPamIMGOvIm3QaLECAn9wbbXlrGFR5K/aXA=; b=Bvxw43ZjmZo3IaYWY+WIRD1qfvMBnVT/J/0+wCaA3AQL5t1Zq2Gki9MSKWHfjc9WoSN2JJ 1MhMWPnPHmGhZUpdyPVVbrkh5Kk1F0kqbyG1z5obfE5VUt2qyvlwba3poXiraiirkbFntl EiVTB26wtqXRjjFUqRM29xD7nRMJxJpTuoqaLJp5ouCAEbkh3OZpZzCOQwNRFz/im4ewK3 rHKi0Nx/VxFCHUX52NRtCDSbpxI/TQfbOirYMWRn0lsjQ7ALL51A5lflm9s8jIbJuIWNfl Sb8RfAqprBbdqMPDIV/Wbz6X8qZ0h6uIvYDTlJRQ+qxM7TBV5BunNnt1NI1PUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQv75LhVz18S0; Sun, 26 May 2024 17:36:51 +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 44QHapQZ076129; Sun, 26 May 2024 17:36:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHapIO076126; Sun, 26 May 2024 17:36:51 GMT (envelope-from git) Date: Sun, 26 May 2024 17:36:51 GMT Message-Id: <202405261736.44QHapIO076126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby <rlibby@FreeBSD.org> Subject: git: 6bd3f23a2a82 - main - tmpfs_node_init: use MTX_NEW on lock from uninitialized memory List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bd3f23a2a828350b23350b0b183754f6f9c8d08 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=6bd3f23a2a828350b23350b0b183754f6f9c8d08 commit 6bd3f23a2a828350b23350b0b183754f6f9c8d08 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-05-26 17:20:52 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-05-26 17:20:52 +0000 tmpfs_node_init: use MTX_NEW on lock from uninitialized memory Reported by: netchild Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45364 --- sys/fs/tmpfs/tmpfs_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 53781202b066..3f74c383a171 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -349,7 +349,7 @@ tmpfs_node_init(void *mem, int size, int flags) node = mem; node->tn_id = 0; - mtx_init(&node->tn_interlock, "tmpfsni", NULL, MTX_DEF); + mtx_init(&node->tn_interlock, "tmpfsni", NULL, MTX_DEF | MTX_NEW); node->tn_gen = arc4random(); return (0); } From nobody Sun May 26 17:36:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQv91Gs5z5LPZq; Sun, 26 May 2024 17:36: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 4VnQv86Rm3z52kn; Sun, 26 May 2024 17:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HeRZ3mQ7uRNb0IeGW6UtxwD3JiFDC1g2SaCnFtOZSI8=; b=yCW8DTwvHoDMEMUFAsuI7nSCa4ewldO3O9Dq2bilNUqelhPu/CowA9uTjGLJnGfS1oijt5 hlMwbs41kMkDtMsrsVdAXbNLbdc/cZFQyjZKYAl/s5c4+Js4F4/Onea+JvJa5JkvOMQqLm Boglh9KCt7IXdpFRG1eMrPT+sfiLqdpo7qXQ9TmoXL15TewUqhmTvaI0ih1+F7JU8NSVrc s0Kq7QothyGf5Gl+SxE/PsK6B4osCKkgBSP8nlm99m5M/yMxnKeE6SxJka/+iVO5q/dXng Qx8P6c2TAJxH4FdY1B1V2hPj++5xayOKAtxflZDrqxyeIcVN/kDa2MkkKvOMzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745012; a=rsa-sha256; cv=none; b=KS2Lx3RIRPEy1LDa5n8ico6npgeTIc2N/x5tdMDBpz+zWGuD5jEoNu7rPtGzymiaz3XW58 KHMBrSveED3gLROpKfkZ/1VtuY4seNKnuGt91IewMurD3sdoJqUT8iF8O9UhXWnzvsnmkL IoIp1ScOcXEJOEusrHtR1bMRyIGXs9yGViDt5oFRWnxgQ/+tYJK1hLTb8q2iNJuGs7Sl71 Sd3RUEokLhbVbqOh2UHYUXq03kbsUYlLsa1G8EItDW4qpeHqCXcyDfXkId9k++dCYq4pcO PTE92G8CgJkrTlKQOY+WXOkLhvXZkTNK1hCOMuOT94N9aTWnJlkT1rMM/7KWJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HeRZ3mQ7uRNb0IeGW6UtxwD3JiFDC1g2SaCnFtOZSI8=; b=GtqFZyW520W3gVXUQMs79Qj3SLJxsbAmRymumi4NCuTJRDOK9d2KYoJKWUp6gCNP+/o5oj YgSAOrGrk8lzSRnDNvi2JjZhsLEHukML4CjMZ84RwHk734xTgBqzEVuWio0MXFxfX33q7a upSHT5Y7J6IVQoF+uFQWXWPxLCBXuMWjotWEIg/IsIrfoYUefreEcoWypLN8DFC+QIAS3R ttj1sM8AsMhG443qUUDWg+kFrFoSP1sIrFGLlqAarNLrRMNaYaJgplUQuSp5uGJhPPwgpK k4WRZXj9BeQvu6ZBDfvnw0/y2KVj9msdaG3TIwWxFNxZs1tzr2S4TRCujwKRhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQv863Cjz18S1; Sun, 26 May 2024 17:36: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 44QHaqws076174; Sun, 26 May 2024 17:36:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHaqqX076171; Sun, 26 May 2024 17:36:52 GMT (envelope-from git) Date: Sun, 26 May 2024 17:36:52 GMT Message-Id: <202405261736.44QHaqqX076171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby <rlibby@FreeBSD.org> Subject: git: 9c975a0d90f1 - main - pbuf_ctor(): Stop using LK_NOWAIT, use LK_NOWITNESS List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c975a0d90f1ee5259e53bebb48f9d7a5c2dd376 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=9c975a0d90f1ee5259e53bebb48f9d7a5c2dd376 commit 9c975a0d90f1ee5259e53bebb48f9d7a5c2dd376 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-05-26 17:20:52 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-05-26 17:20:52 +0000 pbuf_ctor(): Stop using LK_NOWAIT, use LK_NOWITNESS The LK_NOWAIT was added to suppress a witness warning, but LK_NOWITNESS is more what we mean. This makes pbuf_ctor() more consistent with buf_alloc(), although, unlike buf_alloc(), for pbuf there should not be any danger of a wild locker relying on the type stability of the buf to attempt a lock. That is, this is essentially cosmetic. Relevant history: - 531f8cfea06b Use dedicated lock name for pbufs - 5875b94c7493 buf_alloc(): lock the buffer with LK_NOWAIT - c9e023541aef pbuf_ctor(): lock the buffer with LK_NOWAIT - 1fb00c8f1060 buf_alloc(): Stop using LK_NOWAIT, use LK_NOWITNESS Reviewed by: rew, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45360 --- sys/vm/vm_pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index 3550d5a6fac1..4da046ece50c 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -470,7 +470,7 @@ pbuf_ctor(void *mem, int size, void *arg, int flags) bp->b_ioflags = 0; bp->b_iodone = NULL; bp->b_error = 0; - BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL); + BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWITNESS, NULL); return (0); } From nobody Sun May 26 17:40:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQz83z8Vz5LPwB; Sun, 26 May 2024 17:40: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 4VnQz81hsVz53vC; Sun, 26 May 2024 17:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rN9zgSxZG4WHlL1gkvfEAjeAWe0xYmjRuSGBVLIWyLs=; b=M5j+52Od5219cKWWJJFRhoPBkFpd28vSOJykkZznoA8kijbPTlYrGsX7DZ9xi1EPCAQhYd w2a57AKpNkckW7shdIAsLgZh0BMAktPuVBSzxC2cF4lby3iOZN3syCTIBuHTgs9q5pPe/q Azmosv0h3AFiNkYENGd5QtQT8Yyw0tydsZOc5S4Rzj58urnKSJCqa2W7Wp4Fni+yfhVcTg u7UGS4uQGwT/M7HR4wA0aE3BC3pLu1YIQBMZ1CtDsUmMDF0WnoOCLpU8rv70AT2bO+hUSg IgSfpFLSstpVpvuPihNB21R6RKMnEair3fAeuphVI5YcoakYe/V+4vQxsSH1NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745220; a=rsa-sha256; cv=none; b=aZPiTEYDZvu2gtq+qrACIWm1Hpabqw6KAnd+L6L6HjnfSOMTY0KYXQeM+KXH3TxJ1aKPsG gLV/lvJHF4e9NwmvNG6ALx9/EgEKwXxb9nprmq96YAi++RDhc2JQn/lo7gU+zOzmTBiBnX kcIO74Oturi2tUY20/K0nQRUvk1iIdKmKqsWvmcswXU9NwCxiyxGtMbgjwiqCdUHi+OJjX qkc6CTScGLHEU3Ha+DAkSprY35dRXKTdRAEY3yHbZlURgVtXO/DT2rUUFK8iB2G9jBgaG4 9MPigVdjEs179sL+VI7D2M34Nf6zzbKD4FmE8R0LOJHwyCkVxYMHcofVjrZRPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rN9zgSxZG4WHlL1gkvfEAjeAWe0xYmjRuSGBVLIWyLs=; b=wgDwsTzzlkCY9TyE9v8StITEgM+Ra/gmnPAShmh85pHBg6r1VGifl1kVNVD3ApQdBwMOMX bfclDiAH+y8piESBGGvOkst3rrKCwrMLiQQcrXMn6mdrI50NH/Ltapbv/aPP2aJLYD8rww /s+TFOgWBhJi8OsmDXi/ikK+E4puuAiUKm5Th6HC2PmxQU0MkbiwN5ejTKkaTRBN8ZYu6H iJTppg2MQtHIXMQO1RvsBe6JrrA5pj9BlLMSiZnXMW9O2sBN3cFnAd7KaDnshqE9erjITe ms95xHLL3R66rODWQrhTc7Qouv8LNQMw66YD0my1iBOSyQ9jcR5Jkz4NQnav2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQz81GkGz18h2; Sun, 26 May 2024 17:40: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 44QHeKxi085313; Sun, 26 May 2024 17:40:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHeKV8085310; Sun, 26 May 2024 17:40:20 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:20 GMT Message-Id: <202405261740.44QHeKV8085310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 364c014d9ba0 - main - cross-tools: fts has different types for cmp routine List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 364c014d9ba052758f32d2e3e1b0c297c64ac730 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=364c014d9ba052758f32d2e3e1b0c297c64ac730 commit 364c014d9ba052758f32d2e3e1b0c297c64ac730 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-26 17:38:30 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-26 17:38:30 +0000 cross-tools: fts has different types for cmp routine fts has different types for its compare rotuine. Other systems, not 4.4BSD based, have a non-const version. Before we tested against __GLIBC__, but now we test against __linux__ because that's Linux's API and musl doesn't define __GLIBC__. In addition, link against libftl on this platform since musl doesn't include ftl routines in libc, but rather in libftl. Co-authored-by: Val Packett <val@packett.cool> Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45349 --- contrib/mandoc/config.h | 2 +- lib/libpmc/pmu-events/jevents.c | 2 +- tools/build/mk/Makefile.boot | 4 ++++ usr.sbin/kldxref/kldxref.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/mandoc/config.h b/contrib/mandoc/config.h index 91957717b3fc..ea6d70042670 100644 --- a/contrib/mandoc/config.h +++ b/contrib/mandoc/config.h @@ -13,7 +13,7 @@ #define HAVE_ENDIAN 0 #define HAVE_ERR 1 #define HAVE_FTS 1 -#if defined(__GLIBC__) || defined(__APPLE__) +#if defined(__linux__) || defined(__APPLE__) #define HAVE_FTS_COMPARE_CONST 0 #else #define HAVE_FTS_COMPARE_CONST 1 diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c index 7059b31da2ba..628ed26c6f9d 100644 --- a/lib/libpmc/pmu-events/jevents.c +++ b/lib/libpmc/pmu-events/jevents.c @@ -1355,7 +1355,7 @@ err_out: #include <fts.h> static int -#if defined(__GLIBC__) || defined(__APPLE__) +#if defined(__linux__) || defined(__APPLE__) fts_compare(const FTSENT **a, const FTSENT **b) #else fts_compare(const FTSENT * const *a, const FTSENT * const *b) diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot index 9f63a7499592..b8a5c7780948 100644 --- a/tools/build/mk/Makefile.boot +++ b/tools/build/mk/Makefile.boot @@ -50,6 +50,10 @@ CFLAGS+= -I${SRCTOP}/tools/build/cross-build/include/linux CFLAGS+= -D_GNU_SOURCE=1 # Needed for sem_init, etc. on Linux (used by usr.bin/sort) LDADD+= -pthread +.if exists(/usr/lib/libfts.so) || exists(/usr/lib/libfts.a) || exists(/lib/libfts.so) || exists(/lib/libfts.a) +# Needed for fts_open, etc. on musl (used by usr.bin/grep) +LDADD+= -lfts +.endif .elif ${.MAKE.OS} == "Darwin" CFLAGS+= -D_DARWIN_C_SOURCE=1 diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index c88769ce1824..122551940ac7 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -745,7 +745,7 @@ usage(void) } static int -#if defined(__GLIBC__) || defined(__APPLE__) +#if defined(__linux__) || defined(__APPLE__) compare(const FTSENT **a, const FTSENT **b) #else compare(const FTSENT *const *a, const FTSENT *const *b) From nobody Sun May 26 17:40:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQz9414Fz5LQBh; Sun, 26 May 2024 17:40: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 4VnQz92g94z53pV; Sun, 26 May 2024 17:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzbKRGL0DNIMN4qRtZhMSroCSWtYhFjPfv9ZAJHWz4g=; b=lAkYpAyz42OnrpQw9FMl8tuKwUiIVbZ6MhEhg8lkvrjB5oQh6zdXmx5eEADFZYyB8n/tvV z8RPQ3R7bJWymQpT2OGDBaZd1I3Vd8EMzhIepqrdo9T548O6Z0/c14e7EEV1qqUMDfoECf RUqGodVDaEZ1+D27P1QNCzGWJM/PKfgkZTMdoSUdy1L5qxAbC4tYlTSe2bZa0shLv7Ut96 Zr0e7nYhAwtAnl4G61DgNsutiD1305tnbu3ez25LkYTpwOL4f8DrJlRQtkpsRAO8iG1B/g 65aQ7YaIFtQ0MOnjwgnrKay0cGKEUXyxzRHXgsF7Ub45iwCFLiYus2sfrTmyjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745221; a=rsa-sha256; cv=none; b=KaIg3szv5Km+WB8naO+rL8D6jNcsTBMfm8kFSlElBFpgX9edhC84yFN2knhOXfQNdHCLoi sVBFTCPmjdi3cpK0DpcJjTL+5XJCYqWXBhc4KUHexxFbZKF1DO2AmGxsLUoFePKrvB8vAb JEPA/D4NH/F5tRfbgp/z0H5EzsuNgog6W720nMS7Lay++JhlX72WlVqzvROowG1V2J16eP yGnqhNn/sGXdeiTpn2QNAOlIlaJuLnMqb+gqRFw6n7kA2wEGi2Lznq+ZVdE9znBN5BPWGX gd++JgOOYZI0yZnciCySQazNsHzujntKqDz8tsIjmYL0uwtXqbJBeY2Gld6Drg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzbKRGL0DNIMN4qRtZhMSroCSWtYhFjPfv9ZAJHWz4g=; b=XlzxWC9Frc6gUfLvRViYIVPUI+uCQOsGk0xomJEgyBQIeBLytI7mMPV/8AZ7Oyz69Mc/vu KPAF1TUTNWOBpsryrxwF6YgkJ0Ot4Wtn798DjJZJcFHk9M+NJEC453IWK2MxjQ4Th7gPvP xnn3PpLhI/dG++gGtsDAuo5e+Uv3cmadGEi1jj1AaX5VwVi0ezmFzwsnCd1vmUDyNeAjag yLIJiaVMqD4sr0eGra2DXgRhrKuB9DMAIgyeCgY+Y7sOGTismkrzowZJQk5d/TEeeFaK5C pZDfJEVGLQjcK6na3EHj5BoIAENbIgCaG65GW3wI6XiD0O20e9OOM3pdYdu3Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQz92G5Gz18yX; Sun, 26 May 2024 17:40: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 44QHeL86085363; Sun, 26 May 2024 17:40:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHeLRO085360; Sun, 26 May 2024 17:40:21 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:21 GMT Message-Id: <202405261740.44QHeLRO085360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 917c0541e4cc - main - cross-tools: Document a rather bizarre looking construct List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd commit 917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-26 17:38:46 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-26 17:38:46 +0000 cross-tools: Document a rather bizarre looking construct On Linux, stddef.h will define __size_t to something when size_t is defined. On FreeBSD, __size_t is an actual typedef which we need for other parts of the system. If __size_t isn't defined, that tells us we need to define the fallback __size_t typedef (if it is defined, then we can't easily redefine it without issues because glob.h will define it to something different than stddef.h defines it). Add a comment to this effect. Sponsored by: Netflix Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45350 --- tools/build/cross-build/include/linux/sys/types.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/build/cross-build/include/linux/sys/types.h b/tools/build/cross-build/include/linux/sys/types.h index 770b3057f8a8..222560167a71 100644 --- a/tools/build/cross-build/include/linux/sys/types.h +++ b/tools/build/cross-build/include/linux/sys/types.h @@ -37,6 +37,13 @@ #include_next <sys/types.h> +/* + * stddef.h for both gcc and clang will define __size_t when size_t has + * been defined (except on *BSD where it doesn't touch __size_t). So if + * we're building on Linux, we know that if that's not defined, we have + * to typedef __size_t for FreeBSD's use of __size_t in places to work + * during bootstrapping. + */ #ifndef __size_t typedef __SIZE_TYPE__ __size_t; #endif From nobody Sun May 26 17:40:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQzB5mh2z5LQ4Q; Sun, 26 May 2024 17:40: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 4VnQzB3jVVz542c; Sun, 26 May 2024 17:40:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFjbCwt1bhpI0i5oius/I2vsNkza42q/rN7mZOCyiZY=; b=nzxzhbAPp/u+hbk/WwyIlIKq/riru8na9ywtLamsHciunlNk9YELQ09P5WmFDZG6SzbJjx Kl0w+yCFyZog5O1sFo0CAtDbZReh8hnc3AzBqoxMg3maFiKPo0TLpTDpzhFdpamTj03tgL REwMvJaPpo2x22GMwbnyUmGup3q+0CPqnLkqXTcLMnWo4kshq0Jy8YQEF1rR2+7YP/EGYQ flSFhe1Z9h4mVeKUdJ+SQq3WSrnUAkfVDEVihRZLi9JNIrDL1KONyvIm4RntUi8TACv9K5 QsJKLlO0Rhy8/Jw0l8Z6z55oS6FyLQfCtzT9IGfEJP0rbrrRxDwUSK7vH3ModQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745222; a=rsa-sha256; cv=none; b=XyXQcq8+yK1XMj9dxowdRyDHVWsAQwGd25MnR0RmK5624NAWrB3jefz/0i4M3MEtXqQm6m VRht6nkzCDX3JA8rQqGuEWXaQSCpmb6XODFazgS94kHO+JJrfoxzrqjneL/4UAEnnwCQdc jPNx6DUP/63YQv3KSMzvrsE6H6ErkrVJEmIKIIX/yln9YsrbPipoxWLVqp1WDB5PZf/I7s peq9Wqh1uPDmQgsSjjJnwY8+13NBQhjxYvPnplEC8bUTjMptLWXFQdutz1mNj/r1B87d5W EqdHlshEVXQT+LkGvcOWmSVUZnpDfpXKNjtYzhVvpsItpAor6DE/5uuBIYe/1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFjbCwt1bhpI0i5oius/I2vsNkza42q/rN7mZOCyiZY=; b=O/LqzHA1Ut5ca2ki/Lks5EgfoC9J9O7Bkwvo5Cm0d8aN0d39NutDxxxkWTZA3BvWeNhSmJ /x+Bix3SUMfFRaH2XAZEh5Br2vLx8QNOc5Ltg3oYEmql2xi6XSInMo2jhiGbbfkJvCl2q7 l9qVH0MeUMtBX+ZxbDJPLjTvn5redt4Y1YnOa61QD8G4wsFx6ujrCOgrbMXxyysLLy/pLI AXxFqdpcTG5TEdWRtuifKtkmpHWZzIoxH+vpZwhnYcgEXwdF9BmZwQ8NYoi+ppKOyFti+c duVFK3A8E1IDDAQkOW0WNOymHYHBPMsrYjEYXGPZWdyckD/y9GJ2Wshybqw0Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQzB3GlGz18yY; Sun, 26 May 2024 17:40: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 44QHeMb1085412; Sun, 26 May 2024 17:40:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHeMia085409; Sun, 26 May 2024 17:40:22 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:22 GMT Message-Id: <202405261740.44QHeMia085409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 4300e053618f - main - build: Include sys/cdefs.h in our fcntl.h shim List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4300e053618fc4ef54eaaf6229d747489e44fe99 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4300e053618fc4ef54eaaf6229d747489e44fe99 commit 4300e053618fc4ef54eaaf6229d747489e44fe99 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-26 17:38:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-26 17:38:55 +0000 build: Include sys/cdefs.h in our fcntl.h shim On Linux with musl, sys/cdefs.h isn't included with fcntl.h, so when we use __BEGIN_DECL and __END_DECL in this file, it fails. There's no harm in unconditionally including sys/cdefs.h here, so do that to avoid encoding exactly where it is or isn't needed so we don't have to know too much about the internal state of other libc implementations. Co-authored-by: Val Packett <val@packett.cool> Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45351 --- tools/build/fcntl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/build/fcntl.h b/tools/build/fcntl.h index 6aaf3eef2804..f59f5f7fb20a 100644 --- a/tools/build/fcntl.h +++ b/tools/build/fcntl.h @@ -29,6 +29,13 @@ #include_next <fcntl.h> +/* + * On FreeBSD fcntl.h indirectly brings in cdefs.h. On Linux with musl, it does + * not. Unconditionally inlude it here since there's no harm in including it + * multiple times since we use __BEGIN_DECLS and __END_DECLS from it below. + */ +#include <sys/cdefs.h> + struct spacectl_range { off_t r_offset; off_t r_len; From nobody Sun May 26 17:40:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQzC56xdz5LQ4R; Sun, 26 May 2024 17:40: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 4VnQzC3vQPz53q2; Sun, 26 May 2024 17:40:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnXWn2ah2ke77PJB5xbKK7VpxroPLC+Fi4mYctIwC30=; b=NKweAukaQMuDzZGzcP/cNYmjl19Vau/9ZIkL4Mis8+t18cSR1HKlTHN7rLT2WwwUBgADSl 3XPjtkQh04PJxJzuSXQKc6isiYWuO2ZNLiwAuNG/d77qpCrFVUwJwgMkBEiM6M96p973KK 79KSPvhvIZ8pViU77Q56+SC0gShlT4eqzlTwEPCQvL0DeJXmYH84Ctgvunwf9Pptut+sYi Rh2+8fBx+G1B49Leg3SVxwp0drQyhNebUWygeOc9MY5klV2W/mIkmpnFSjI97brgu9NzDx X4U410tBE1S639ZcyUV0uH9kNk6JEjWxVPzHRuzkQVYbN9WQ+sZZashEm3GKwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745223; a=rsa-sha256; cv=none; b=m+vQxkYjb/Z5jU2kHohjKJqnaD4ESG2ZDdEeoNq2RlwAjmNPGcyu/zhs0zKunPvOrn0LI8 h7UU71T56yguE4NsGLu/1fNqgR/nFLxEKw7/bVeOkpwntWLkfDga3Ou4j1mHFHjU4dXDF3 U0joh33TS3mQp2FTrmtHAywPoAmAqQHx6xQLnwfU9E9LTxfB7k1+KYwmc58wuaOHlpnhcP eMDCrZMcskpA3JYTyZfX/3rhcx8oGpdi9SRX+uHGExQ07YgZu0weMP1LM6C4x8JvVPSGyd xrCWNfG2IplrhgbzhIe7NLx6rOQx4D1jIEq7LP12jkxDmIBXidWXhQRAxMeALA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnXWn2ah2ke77PJB5xbKK7VpxroPLC+Fi4mYctIwC30=; b=xBtzCgfq5pxKJElWh/TmBzKOk0OCvGdK/GP1DspG4zCLWJtBHckFIQo3LyEkakRksg9ThB z6hxbMstmLapPBcfgMLjhgmhQ4G7P6j50TQdo0vJi9nhadu2vVFdwGZ4gqMPsAdUrhKLBJ 2CCExmEyn7WYznkzmJ1AS6z9MnwEt+kNOFrV/B8VyTD/hLkObQGiKhNWkjpA3ENRa9dQ7Q 7RWgVWky9ImeGuMWFGcIKWe3OJDDwHExufBjIeahYu0YZ98CVHVLw62ugwpA5MX6NVbznf aYXA7ZhXTtRzrr2AJk1w5g35uW9RoEZJwJm5UXoReB8PBY4NP+RmjkG/lVRyRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQzC3WbYz18h3; Sun, 26 May 2024 17:40: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 44QHeN8e085460; Sun, 26 May 2024 17:40:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHeNa0085457; Sun, 26 May 2024 17:40:23 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:23 GMT Message-Id: <202405261740.44QHeNa0085457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 76efd90ab093 - main - cross-build: Include sys/types.h from sys/param.h List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76efd90ab093244634b0e6db450f1b0cca0b3263 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=76efd90ab093244634b0e6db450f1b0cca0b3263 commit 76efd90ab093244634b0e6db450f1b0cca0b3263 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-26 17:39:02 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-26 17:39:02 +0000 cross-build: Include sys/types.h from sys/param.h FreeBSD has a style(9) enforced assumption that sys/param.h includes sys/types.h. However, Linux under musl doesn't do this so go ahead and explicitly include it here. It won't hurt on the glibc systems, and helps musl. Co-authored-by: Val Packett <val@packett.cool> Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45352 --- tools/build/cross-build/include/linux/sys/param.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/cross-build/include/linux/sys/param.h b/tools/build/cross-build/include/linux/sys/param.h index 33679d39ed49..3b29b9ef8430 100644 --- a/tools/build/cross-build/include/linux/sys/param.h +++ b/tools/build/cross-build/include/linux/sys/param.h @@ -45,3 +45,5 @@ * let's use 32 since that will work across all systems */ #define MAXLOGNAME 33 /* max login name length (incl. NUL) */ + +#include <sys/types.h> From nobody Sun May 26 17:40:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQzD5vQHz5LQ9M; Sun, 26 May 2024 17:40:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnQzD5FRCz545G; Sun, 26 May 2024 17:40:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5pI2eC19G/evICpfoV0YsndkjMtrk23OdJw19DWTX8=; b=lSy1iq3BY5qxmm6NbmaGVisDjCFa/XYnE//ykmcuCU28YiCDPfr3KuWXFBBxXBcEuwe2CN mJp1f08lCSzor+/qDAMtbDEPphh/PdNsJLWJCspzA0BJpHCK8w3EppirB8Wu+e8e7pvOce 5DuatgRKlHIchm5+X+mkO24uAFyVdnTXRF4FWRFuxvFzlsEj3/rrmADnj/ktHoF8sjHj7p CQ0QWWTK2liFAUcio+Rp3STYEy1muNFhB0pgFhgzNbP8HeI56Yxeoy/yRL9mvAncVnto40 YSnDMbdeMehED8wDRrBliZwU2aOX+rJv2OC04Wqfeg6t3OejJ8DZu7XTyTQhgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745224; a=rsa-sha256; cv=none; b=tI/qq4oR6QgwkkRtrsu9iIWwpptCG5iXMC6HBX95lsOEuUEA7r5/qint7FX4t71PCg89GR fyfVUS3/9VSRKYXDWnlL0kB8gqVpnY6X//T0jyxE7orysCsixCOyD7aYx1D9tms7dYu59E a2SDG2HsXk5wLJ0jqrngb623uG+qbhMxqo7xKPvMmIc+iOd1b3z/ZxzSipJMn5n1xBLgwd 619vLuvyxDlfWd1t4x8+nZigPBatkgybFEtVcbGzL+WB5yCPkI6e3yyOYA7bZUfRqbXUls +0q6R16hsdJ4HpnKnPwilcQm/UuNH8d7hj69pf0yq8FitZx+8QBtwllbKzKM9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5pI2eC19G/evICpfoV0YsndkjMtrk23OdJw19DWTX8=; b=sRLDn0yD7DyInDEjxVJn6Hjxque3A7mMf+MnnQIDeg98jmYwhUW/w0YZrYFdmt6vHy/BM6 f8Y3faO6/+J8W0aZId0M1hlpxZHXVTEQiWDKTYmf99tWFbUnbeGjQ9UfEb0NkyUC/mBIzQ jBuDVMpi+qjFSaEYLk1l/+WDxsaumjs/aRocOBGN/01ooIKKdI/yIamuC6GmfEZHh7H5y3 HmzVzvzI2HsJMDrVxqOMVHsl/lcxDxhbQl6FsXroX4vHkc82MGyXuAjDdnHAwlXvHA3CHP 2GT3CZBiehSMO8sM2QATB5RH/bBIpKy/SWO77DwOmzB+8RrVikLULPu+v1jTJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQzD4sMsz18wC; Sun, 26 May 2024 17:40: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 44QHeOYB085512; Sun, 26 May 2024 17:40:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHeO5X085509; Sun, 26 May 2024 17:40:24 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:24 GMT Message-Id: <202405261740.44QHeO5X085509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 27326f895e5f - main - cross-build: string.h uses mode_t, so we need sys/types.h List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27326f895e5f16e58c9d619b9bd5742949ccb3c5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=27326f895e5f16e58c9d619b9bd5742949ccb3c5 commit 27326f895e5f16e58c9d619b9bd5742949ccb3c5 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-26 17:39:10 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-26 17:39:10 +0000 cross-build: string.h uses mode_t, so we need sys/types.h string.h defines strmode with a mode_t argument. POSIX states that one must include sys/types.h to get mode_t, so do that here. This makes musl happier. We know that sys/types.h will include sys/cdefs.h, so just replace the latter with the former. Co-authored-by: Val Packett <val@packett.cool> Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45353 --- tools/build/cross-build/include/linux/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/cross-build/include/linux/string.h b/tools/build/cross-build/include/linux/string.h index 8fac9e0fe083..b6d2fe488d40 100644 --- a/tools/build/cross-build/include/linux/string.h +++ b/tools/build/cross-build/include/linux/string.h @@ -44,7 +44,7 @@ */ #include <stdlib.h> -#include <sys/cdefs.h> +#include <sys/types.h> __BEGIN_DECLS #if !defined(__GLIBC__) || \ From nobody Sun May 26 17:40:25 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQzG1dyYz5LQBr; Sun, 26 May 2024 17:40: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 4VnQzF6Rw0z53sb; Sun, 26 May 2024 17:40:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+MKWmMp6qLapy3NpWECdhq/czwUsH2gTIp/U0nCF8KQ=; b=Mcwz80yuGOi/dfxVuqgXaxUPftDR/73MYWNnjTnTUy2XXYQwmJM2lHTL/VvvZsrAkc+raH nehmWhKnm9d9lk9jgxRTnlYxRTMaD/umbVeHgpbfGr0QUBbhDP9FbYHfeXLZyMwA4NRc12 5rYHtV9j8d/ArXMHTz2CgJIFRnRAt+5g8G04H/QLqvo7tz/YYnLteRnye2P9ajmvmiQ7aO I33CzifK+/D+oHntEZP0D/qfV3UKiP/aQK82jH7N6sNtEthOkkgKXajhDhfAWmuUa7YSE/ oKAU0DJxD2tDjVZEe9+rTI9EcrDOCpb3Xyw+9vIqemOw2tHUpmYl1bicLE82dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745225; a=rsa-sha256; cv=none; b=VLb5XT15N5uYBDM0LOYSj5cBg4gtxDos0uusEN1wWqkBJ64jVPY7N6fhmbcSY/0f/yh1jw RIc2oXBBRF7s8nUdCqp6wsn7Gw7IR48OeoWiiAwmaNkH0DlDZ+Ti0wNd9K3uGrAi3HUark 8SzhBlDhQECN43orJfP1e1LJlE/DklJJ0ak/IJ/Y8NfJJOCLhOvH6qNDFjpCwdNyUVNT0L pnNLi5as7Pz/KTo1WTJQej9kdfKRnDTcF3iWaE7Kp2mDsVAQmjgBCuQyTuIqMbsfXJdxGJ EI6i/nZAm4ZzseMDx5ZZGPxp/V+vZRwQF5IXLhcDc4c/EN2QDO/X2XyDkyOsMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+MKWmMp6qLapy3NpWECdhq/czwUsH2gTIp/U0nCF8KQ=; b=JfRAjaobUyVfHQqV4lP4xPL8owXXVttYDt14MsG7iZtyPijjgNUko6Qf/622JsZuRbU27x h3lHKtm4XAVDYgojuvaDerYx7ofj5uU/lwj2rzwHUnGpPnCJVOR9uQzo4NyrOLOvv0fVpX 3Cp3+022+sTz/36CiQwWe2mmluKuzBZ/bc8vofq15qy2jzOvZ4iqEpwdUaMebAIe5Ph7MO rptkKH+bqozceZ+VdbxM+ADv6VDhNb6DZ1Z8owktp3J0tH+G2j5ut2m/2gJuIhr3PNyJjw V05TxL3MszuvNQ9mabdPKrZDv2Z3W1LVjjxopOqA1kUWZ7F/MWwVQiZo8tzJkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQzF5shJz18g0; Sun, 26 May 2024 17:40: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 44QHePSZ085558; Sun, 26 May 2024 17:40:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHePCC085555; Sun, 26 May 2024 17:40:25 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:25 GMT Message-Id: <202405261740.44QHePCC085555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 3c5f0da5106b - main - cross-build: Define __*int*_t and include sys/cdefs.h List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c5f0da5106bee21ab3726f608b5c377da92a733 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3c5f0da5106bee21ab3726f608b5c377da92a733 commit 3c5f0da5106bee21ab3726f608b5c377da92a733 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-26 17:39:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-26 17:39:18 +0000 cross-build: Define __*int*_t and include sys/cdefs.h FreeBSD assumes that sys/types.h includes sys/cdefs.h, so add it here. FreeBSD also needs __*int*_t defined for software we bootstrap (a lot of it). GLIBC defines these, but musl does not, so we have to define them here, even though it looks backwards. There's no good #define to key off of, so use !defined GLIBC since on Linux defacto there's only two libc implementations. Co-authored-by: Val Packett <val@packett.cool> Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45354 --- tools/build/cross-build/include/linux/sys/types.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/build/cross-build/include/linux/sys/types.h b/tools/build/cross-build/include/linux/sys/types.h index 222560167a71..2e09cbb62271 100644 --- a/tools/build/cross-build/include/linux/sys/types.h +++ b/tools/build/cross-build/include/linux/sys/types.h @@ -35,6 +35,27 @@ */ #pragma once +#include <sys/cdefs.h> /* FreeBSD source assumes sys/types.h includes this */ +/* + * MUSL doesn't define the __intXX_t that FreeBSD does, but many of our headers + * assume that will always be present. Define them here. We assume !defined + * __GLIBC__ is musl since musl doesn't have a define to key off of. Thesee + * typedefs look backwards, but it's not circular because MUSL never defines the + * __*int*_t. Also, we don't have to work in the kernel, so it's OK to include + * stdint.h here. + */ +#ifndef __GLIBC__ +#include <stdint.h> +typedef int64_t __int64_t; +typedef int32_t __int32_t; +typedef int16_t __int16_t; +typedef int8_t __int8_t; +typedef uint64_t __uint64_t; +typedef uint32_t __uint32_t; +typedef uint16_t __uint16_t; +typedef uint8_t __uint8_t; +#endif + #include_next <sys/types.h> /* From nobody Sun May 26 17:40:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQzH2bY8z5LQ4X; Sun, 26 May 2024 17:40: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 4VnQzH0JJlz547r; Sun, 26 May 2024 17:40:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCgCTBqFmwOX4F1mWKFLzbIjPNZM4yqEV75LD7ttT+Q=; b=KDVLXfkybHkO3F1kJM/a/K6Dtm20T4aQ4hVYc3kBik66KXQOXH/OR6z97QuwZ8IJ1LB4So 39XZSG6rsyjyooRJ+Vma8vkEWKFoHrdiLnCFPvARxDndnyuPzSSZurhVYwH7gkLoAS2HSs pSaqMWKhgc4Y05M9C8t0zai1CSahzpTm4EtbQz4KI0l754sGDafZZnjE1r09uj/0YfKGxI Jq6XD3SU/OJoqO/EcRVCBqUO3Dma/BNWx5IJfeJ5+NjZ3moa52Q+kQDZxemG6gUt1d1MOO Ff8XhMHFY+frvKMiGEcnRn2o+vfY20v8554f5WYDUYl9/fblrfGX4crqxhXoWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745227; a=rsa-sha256; cv=none; b=bAqi1mqL8+1WRWPkjPOtFerSn/yW+Lyl7lYq7xrGTmRHXf9KC9rs6nFrxERctYRiHCNtDr bRKO2TsnHW62XReH8XUQRN23Ib63uEPWlq55sCBAwxuMZwts8oeq3BuVew2cZlCLcIWEFW 8cn0399hDpkykXC0H/p0RtaEV+EjXjdfOuDPlInsSX8FWURRKMHdcRTfRdeOdfRj1ODNM0 I1HiwdW9tRDX04WIxd8erojXJaEe3coxRoTAtWoX5un6kyzVq1FDdfRoJtWDkPP1az0BFh ppnMPWTK7SUU7eRXb4Egai9vB75FGzDAIpSMbeWQla9wGEPAn49yE9fNLLtNUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCgCTBqFmwOX4F1mWKFLzbIjPNZM4yqEV75LD7ttT+Q=; b=Z1Zm7NxdE65zyhOqyk0qIGe7D5cgXs0sgkwA6RVhasHlZV64eJdV1WKA/2C3DZSEw+mL/u zAN9gJey4K5Tfi0cOr2wNIP10JRKMS9S3QTWlUxkIrSaHEN0aQP81aOA3bnsDqnXvG77Jk PXlgmLbBAErhbWpVXOgLto+XSDevPsE9y7t8Qblj+ArzyK4FK8Y/k24UhLfEicsu6jbj75 evRK5KZP6S1M8wNUOGlAoE00yODs4C3hMPBB2miJM/tQvwQwWiM4sxD+uK7LAiGY08Wrd9 EkrwIibt8/Nrp8jnBKW8twxl1kjwaP8Z636DYg804Y+QI8G5EDLbcMPArY9dTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQzG6x2kz18v1; Sun, 26 May 2024 17:40:26 +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 44QHeQQO085620; Sun, 26 May 2024 17:40:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHeQj5085617; Sun, 26 May 2024 17:40:26 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:26 GMT Message-Id: <202405261740.44QHeQj5085617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 0e03402139da - main - cross-build: This is not glibc specific, but Linux specific List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e03402139da0557e9ff41a06e3e4c152bed0ad7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e03402139da0557e9ff41a06e3e4c152bed0ad7 commit 0e03402139da0557e9ff41a06e3e4c152bed0ad7 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-26 17:39:27 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-26 17:39:27 +0000 cross-build: This is not glibc specific, but Linux specific Neither glibc nor musl define these interfaces, so provide them for all Linux builds. Sponsored by: Netflix Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45355 --- tools/build/cross-build/progname.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/cross-build/progname.c b/tools/build/cross-build/progname.c index 81467627f164..6d396dadb67a 100644 --- a/tools/build/cross-build/progname.c +++ b/tools/build/cross-build/progname.c @@ -36,7 +36,7 @@ #include <sys/cdefs.h> #include <stdlib.h> -#ifdef __GLIBC__ +#ifdef __linux__ extern const char *__progname; const char * getprogname(void) @@ -48,4 +48,4 @@ setprogname(const char *progname) { __progname = progname; } -#endif /* __GLIBC__ */ +#endif /* __linux__ */ From nobody Sun May 26 23:27:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnZgD6rkzz5M3mP; Sun, 26 May 2024 23:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnZgD6Mntz4ZCv; Sun, 26 May 2024 23:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716766024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E1FfMp8906veaC+Fmj/KtU787Oan/enhX9SGXyYkv3o=; b=IJRZ+ccMYyIiOE/CYq3a/rXFW5BzIAENv+G+ydYvj3nHhOSrHQz1tR0DN9kuODo1pBDRS+ +t9Y1XQvocD/QqN9ybtfRFOpPVajZse33Eq8FsnQFmRQZEpQGj8pjOghpbDNLITR3tGbSq 3ihjw/8QYAkMYFGGDM62dYjUBiKYJ3ZsjprhjWgCTB4xrTlD8cIxHbaR4O5B0w1aMYduuP WK5HdGHWvRyU9Df+zKwKal3QYnCt4XbQ6xfBji/qdfq3guPGMIuXdPdnmErqdco8obB1/o JEbYe4BbRwcivjNctXQjg91vQ2bH77itaxS2E5wg8inlDhWUmZ8xYf2FwRhWCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716766024; a=rsa-sha256; cv=none; b=qDtmnwF5i8+vo2W7L/aujiybvegCp7CctlE5nZKlE7RehQx2QY/kmOA/4cfrcNr/H5fMoN dO50RmR+FRF1Ftx6Qi+cNT0yEngewe74nS1awse0fZ/ui3sckI1i0/IVC1kPkWz/IXYe2c e5X4HrT43tk9bWQS7ZSOMnzdr+/bvVtjopluWXDETlYyMc6PUleISccxoX2JieTiqB4GVM i+ywTWpdA+wJdiPYlF8f83TD6xgb4yMfGIy07dt/wQSt8GVD3i/vpxDx8+q+PP4JWAxd80 c8hDNAMslIR5JBrAMt7JTpSRnIm7AAfpHXj0GH71VpsvWqEWKtcY5QTjw9zFhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716766024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E1FfMp8906veaC+Fmj/KtU787Oan/enhX9SGXyYkv3o=; b=GjKwEFmxZD7hjS7mQx3mEo581l/dZuqUiaHYGOMLfLqRQHCC+FmlJbJs0NMRVyQDHJFVyd lb0TBnaTIEpec6VJiH8IIeIZEBHm2rpL1B3eVkvxA+I4YQXAVjnH0M//nfyaLyhclvSOVJ zI5okKMYJmYos5VPtkd4yQmonYhCNr43+VG796EnXncDIYvoFLr4o4rAXX4mpFzhEY0vWK 1asrsVslMdssplWwei1Hzluu+mMO4tFr5z4ZfTs9DnWg4LVpiCTNgFAAXDsYRShW4sUtzd Se5FA+rOWb7ELAJsRTdiJ5uNdU4cKlDta8wFwA4uT2XksbKpj4Siado1mmKRGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnZgD5ykDzLNx; Sun, 26 May 2024 23:27:04 +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 44QNR4IW068581; Sun, 26 May 2024 23:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QNR4Fu068578; Sun, 26 May 2024 23:27:04 GMT (envelope-from git) Date: Sun, 26 May 2024 23:27:04 GMT Message-Id: <202405262327.44QNR4Fu068578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost <kp@FreeBSD.org> Subject: git: 76bc4a776fac - main - pfctl: use pfctl_add_rule_h() rather than pfctl_add_rule() List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: <mailto:dev-commits-src-main+help@freebsd.org> List-Post: <mailto:dev-commits-src-main@freebsd.org> List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76bc4a776facc73905eff5f70d52785de2100cac Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=76bc4a776facc73905eff5f70d52785de2100cac commit 76bc4a776facc73905eff5f70d52785de2100cac Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2024-05-26 21:06:12 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2024-05-26 21:06:43 +0000 pfctl: use pfctl_add_rule_h() rather than pfctl_add_rule() This ensures we use the handle opened with pfctl_open(), and also brings us closer to the ideal state where everything uses the handle rather than a file descriptor. --- sbin/pfctl/pfctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 19d05c415f02..1843ec5713d6 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2035,7 +2035,7 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth) if ((pf->opts & PF_OPT_NOACTION) == 0) { if (pfctl_add_pool(pf, &r->rpool, r->af)) return (1); - error = pfctl_add_rule(pf->dev, r, anchor, name, ticket, + error = pfctl_add_rule_h(pf->h, r, anchor, name, ticket, pf->paddr.ticket); switch (error) { case 0: