From nobody Sat Apr 29 16:31:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q7w3K0FzVz47xXZ; Sat, 29 Apr 2023 16:31: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 4Q7w3J6wbfz4Vnj; Sat, 29 Apr 2023 16:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682785901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IhThackHuBYqzzi20BuYIHypTD4XAfRHQuGHuXANoY8=; b=FIsNAcTQvRv3DgXe0VFP0fo9eWFQfYopczuj4PVKChNYN0Wy2ZMK12ce8fXZWXMYL4IjbG Q6wuBc+fZSgVsO2dhg9/PMDbikyv7toOJ6UVeUu/cZYC83HcoycAmxc2NyemtXSkxFeOG0 reP/yeAzMGVQ1BMCQgdiJmWu+VNI8ueTnRZDK9TRVkpb4QdVR+CBZJt057zNhQt9JowkNV jvK9GWpbJceNaxpSfTSBAQ7CLVj6jKgaWdz6OUUnh66GcdXFJO6GmO0gRCZG39ezuMoHWM z7uB3BsHX144QHCd22vCiiS91Ax2PCaaEgZEMwQG7NaFt19cCFhErPHi43eU3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682785901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IhThackHuBYqzzi20BuYIHypTD4XAfRHQuGHuXANoY8=; b=A8RMJobPpWVXDgsl9FUH6VcznTKlRsCelwsc/hutzMzmiCxUyC65pEybVpkspRWjejPRXK D5nFGbpas69Y9nxP34P0bUH3ifLYuPJRMYsxX5s8x8TCZrQ037I3tBguvN0XgFbIebCEB2 MqMbWvv//tohz99/HaXq6Txx6ib6gnZ0/iC8oc6dxcfEH+urzDgseC5JJKDsShV/F2VtgV KssLaCf9mZKa1TqtXGRApvCMhXvGrm6fIysRRgCWi8KVUHI9OFMcWacNcJ6B8VHv9YV4IL 8qgn7hHQLXrOrOr8PLMV8UpSeRXKvpFTtRYzgKaO1LSeg1xvEo9BUBfF0w3OOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682785901; a=rsa-sha256; cv=none; b=Nq69pKlnD+txocVvsZW7+hG7OrxENUrM+i/hek6mRL6q4kj4BKVGD5GtNHvX58i0Qql9Is EvA4EVxcQHADRM8QbS1H0jbtSeDNtm+y+qtssULX9VO+kEv0eQLyUv4uTnQZBd7XYIvIIp GiYUxSTCZzy8ATu9qs+/c+m2181/TWLxN+pirG0DkVdnl3e1B8Ck5D/gT9oZ25L5V1tRop Zg4gaUsnAbcA5hWUR8GN6nAit5f4S0LrwaIlXzADyLn9aoyT8F1FIfi2m+GHZsL+65/TgR LS6aFTKZj9ZDsLBQy3taRM5fIjsmOUthI3RRFluQjG2++5UPi/0YKR5lA+k5wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q7w3J609qzpN6; Sat, 29 Apr 2023 16:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33TGVepi050989; Sat, 29 Apr 2023 16:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33TGVew3050988; Sat, 29 Apr 2023 16:31:40 GMT (envelope-from git) Date: Sat, 29 Apr 2023 16:31:40 GMT Message-Id: <202304291631.33TGVew3050988@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: 61b95bcb4299 - main - wg: change module name to if_wg List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61b95bcb42993b24633b280791438266d78f2747 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=61b95bcb42993b24633b280791438266d78f2747 commit 61b95bcb42993b24633b280791438266d78f2747 Author: Kristof Provost AuthorDate: 2023-04-27 15:35:12 +0000 Commit: Kristof Provost CommitDate: 2023-04-29 16:30:24 +0000 wg: change module name to if_wg Other virtual interface drivers (e.g. if_gif, if_stf, if_ovpn) all start with if_. The wireguard file is also named if_wg, but the module name was 'wg'. Fix this inconsistency. Reported by: Christian McDonald Reviewed by: zlei, kevans Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39853 --- sys/dev/wg/if_wg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 6a99061cac54..d2403792cec8 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -3055,11 +3055,11 @@ wg_module_event_handler(module_t mod, int what, void *arg) } static moduledata_t wg_moduledata = { - wgname, + "if_wg", wg_module_event_handler, NULL }; -DECLARE_MODULE(wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY); -MODULE_VERSION(wg, WIREGUARD_VERSION); -MODULE_DEPEND(wg, crypto, 1, 1, 1); +DECLARE_MODULE(if_wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY); +MODULE_VERSION(if_wg, WIREGUARD_VERSION); +MODULE_DEPEND(if_wg, crypto, 1, 1, 1); From nobody Sun Apr 30 00:01:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q862X0gQBz48RLX; Sun, 30 Apr 2023 00:01: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 4Q862X0CXBz41kS; Sun, 30 Apr 2023 00:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dL+0iZ3GKlpofE31jDZ10FcFu2aYqxxNJMB63MkKXCY=; b=AK6b23LGmunnDbsnMn3Z+HRQm4GYfG69jiasBn8gbee8tUsEw4MbpBigBEJXOpnZjRMi5V zlXps5m/yD4IlONyb2G2xAtRJ5bLcFgAqEoKXKT91HtVyRE/gIgVM2XbdxmdHj8/uk4wpt A0+6zUili5qzsJUorhOXJctm+/pSSm7QjAPd8kkpVGxMtDOvqfcQIUvBNfEkRj/A5gLJ4S BQRtsBOCTky5GUvoETSohalUK6Db5cW2D54MKnHY/IeKSTCJYS0nr0s/GnH7JXlM9BxIyz WdGsAjxBFIXKj27bjMoSfu4+h7/OP+58RFzCanzAMaKLN/lTPyLue9zkDKsJSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dL+0iZ3GKlpofE31jDZ10FcFu2aYqxxNJMB63MkKXCY=; b=u1zWKVbDV9QAdxpciutBdGRhbexESAJkfo5W+sgtOsLhwsP9rzxZWEaTTxNIthCeLqoYUv PLW9+AiA3CRwHD/Oc6tpoXzZ+Mo8wb70a5A6xsIUUSaIrByECEJoCzL0aN1avkIyInIUa/ P/7K/KAwC5JBSgtGgza1EvEJnn4Y0FdkSJkvMNmefbjse2utYYcblTwiFISEtgi7U80mzE KJ5CbTM3KrR/IZSlv0LoHT+yOfzkz0+tFS/WIXIw7KLE7Ffi6cfogAVzupk32q0JBzwXm2 oc2moQbvzUaYyKQvDX0D/hT8R6fbg85yZ6Wza7j3ikSKsqhj2pryfN0nTRD0SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682812900; a=rsa-sha256; cv=none; b=WwNpn3YEEJSBOcogIVNCgXXVQFTQRdK734KDm1HQBjWzmg4iBtW0xNLjB9jRk+AytSjTw8 xKjfvpHSyv/YZor03/2BpWL/4fKLSUORMcyqRk+VwSQVNdYW5ApQH9p+X7TVn17jmsBzib ld8Ihgj0841bXaj7UNZQ7JwUnErK34HTyJc+R7TLk6QHXmHbtuiqCBA0wXGUNi7AGqYeA1 UTBFI9/yVa/2GXtqTZry2XPYuy9NS2XfdErbkpXJgTEvz5H88Fb+b1tLAzlWBo51mpJNZ+ QGQjPpUcpgjVjrHiYBgXlTXN5xDs9r7pNRYz/pcC3WFHfRv/jMDX7H81GQPZhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q862W6NR1z11xw; Sun, 30 Apr 2023 00:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U01dbP090362; Sun, 30 Apr 2023 00:01:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U01d2m090361; Sun, 30 Apr 2023 00:01:39 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:01:39 GMT Message-Id: <202304300001.33U01d2m090361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 04997e19e27b - main - Additional output from dumpfs(8). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04997e19e27b240f9fd253f3eb1053708ca99c51 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=04997e19e27b240f9fd253f3eb1053708ca99c51 commit 04997e19e27b240f9fd253f3eb1053708ca99c51 Author: Kirk McKusick AuthorDate: 2023-04-29 18:41:23 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:01:18 +0000 Additional output from dumpfs(8). Provide an additional line of output for the superblock giving the computed size of the cylinder group (CGSIZE macro) along with the details needed to calculate it. MFC after: 1 week --- sbin/dumpfs/dumpfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 4983645156ff..01b475a03fea 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -245,6 +245,8 @@ dumpfs(const char *name, int dosb) default: goto err; } + printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", + afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); printf("cgrotor\t%d\tfmod\t%d\tronly\t%d\tclean\t%d\n", From nobody Sun Apr 30 00:01:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q862Y51lyz48RPv; Sun, 30 Apr 2023 00:01: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 4Q862Y1QG8z42HL; Sun, 30 Apr 2023 00:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bPU1g2n7m3TnRqB6GtuoS0kywG2Qaj0CWF9lWUeh+C0=; b=kjKaInDHLXAdimH8aPBwjGbjXF9mmizWyhQYLBqOowOkBnnFAi1yTN7cIEqfWcE2jgbIeH iJ06Jl8gN3sZvbufUme+Bzhgo8AX36Tsi0mgQjQCbEYMkNoe0FJVizuI9Emjd4f+WT6vX5 euXp/VdmKrIalN/BnXxf4JGjrtyIQ0rymT/Q2OidVhh3wvMUZyt1MOb+E1sua36GsaWw3m PswLb6K8do6tR8I1XvkK9PZKiV5FS/EoaRC3rGLqSQPPqXfW3ZvMETX7ye1px7XHev9nY3 Kcglex6XPCoFq2Ianbp+R298aTHr4zUcHGb77hnFfs4tLejN8/0lNiEFdLBIEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bPU1g2n7m3TnRqB6GtuoS0kywG2Qaj0CWF9lWUeh+C0=; b=eUekc/hkfdtxcCuzO0zlpkyHQQFbtrjS5w6PW1zMtBqBbBAi/EmcTX6iRdGsDPDg178Odc eZ6QGwjyDe8KHgj8R1nf1AMWIG2RuYCb7wZOKqRzt6jATZaV3j9HeTpaZ2ssvyHKFRK65C KS8obzA3BXkU6sPW0EtikxLT0nhHNcVMU+XL/if9ZMFN8zjW5ltjp8tUZ48FLUfr++TTnb Q+S6h/kkir9lAkImy+kddiLlLquKv9yH078v9a1+SkWI9flPzLZEQlDkRiB758UU7Fn/B1 +JGSWIRmaDgeN63ZwIGltTi9wACf5zC4JFixMiK34xPG3CGtufTPahOdsAoKEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682812901; a=rsa-sha256; cv=none; b=xhkb0EB7IyRjyZbHA5F5Y1MAUrgsa0AQQtavbhbotR6OAGY+N1viUZNfofr12kr8ny+b8T TOTaM0lb7I3dHmO+92RbfPkbTbGJMmc5AW7f1DAFqQlohWi0M57lfmR5v1dMxBByLIbbn6 gqQO78zn3VReObq/m5kChfRd+08OPoYbmj12QXnr95GiZfR2Zl8+3aL9gcf7MHGnOdGkbv 6JpBbSGnt76TOxuolskcbP+MGYuZMwG0lte3mXQWnOyaX219ZLrtjZWFl0pcD8T9K0bsZf YKSweuEtHB+a+J9ZSAzRfpXDCC+ECB0B//HeNCmHDMv1WEIyfBKmROvtdFQHwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q862Y08j2z129s; Sun, 30 Apr 2023 00:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U01eQP090382; Sun, 30 Apr 2023 00:01:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U01e8L090381; Sun, 30 Apr 2023 00:01:40 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:01:40 GMT Message-Id: <202304300001.33U01e8L090381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: a2d1957bbcc8 - main - Updates to UFS/FFS superblock integrity checks when reading a superblock. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2d1957bbcc87b499526df8d99ec7e1ddd2193c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=a2d1957bbcc87b499526df8d99ec7e1ddd2193c0 commit a2d1957bbcc87b499526df8d99ec7e1ddd2193c0 Author: Kirk McKusick AuthorDate: 2023-04-29 18:52:27 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:01:18 +0000 Updates to UFS/FFS superblock integrity checks when reading a superblock. Check for an uninitialed (zero valued) fs_maxbsize and set it to its minimum valid size (fs_bsize). Uninitialed fs_maxbsize were left by older versions of makefs(8) and the superblock integrity checks fail when they are found. No legitimate superblocks should fail as a result of these changes. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/ufs/ffs/ffs_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index ba1d8c5c13c9..5b4ad96f4638 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -514,6 +514,9 @@ validate_sblock(struct fs *fs, int flags) %jd); FCHK(fs->fs_sbsize, >, SBLOCKSIZE, %jd); FCHK(fs->fs_sbsize, <, (signed)sizeof(struct fs), %jd); + /* fix for misconfigured filesystems */ + if (fs->fs_maxbsize == 0) + fs->fs_maxbsize = fs->fs_bsize; FCHK(fs->fs_maxbsize, <, fs->fs_bsize, %jd); FCHK(powerof2(fs->fs_maxbsize), ==, 0, %jd); FCHK(fs->fs_maxbsize, >, FS_MAXCONTIG * fs->fs_bsize, %jd); From nobody Sun Apr 30 00:01:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q862Z2b4sz48RbR; Sun, 30 Apr 2023 00:01: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 4Q862Z1n7Mz42C8; Sun, 30 Apr 2023 00:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0IHQCtGgcnNPfpll6FuQqIMY136Q5G1xsI3IVaooGQ=; b=egWeEjMWM1v73IBo9zmaJ0bbaWQPGy94ZRuH6I7qnAe0Z71mbshLuiBO0yEOpZwOzS1Acm B9pvJrnPWGkIoUzLRbt60tupGRdHaZkQtSdeVFOAdJsGg2ANsRuVM9LO5s4W7+y7fFOjFD 4daWEE0TPLNgECvV2NMJbgBjrMLPShAyPsc2luouhToTecHCRZ+Yj0k7V9z79NtDpDoElg cxFrL2D9MzTZc3S6EUAs+wSaEBNDvhS8PHl/oaT7bG08tKQEJEPHAiDrRBBW6UT1jXiFy5 e0JmLiFFFKfAvREdEtRySE1+E6R79BDghfGRRH4Qg/gsMX6yunLivS/K0FlPxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0IHQCtGgcnNPfpll6FuQqIMY136Q5G1xsI3IVaooGQ=; b=WF3Jn2ItwLlKBiWsIA7cGX/NSO3gAXBOyg3IV4TItRMTY1RwL0PHbBxH+RunHNZBT3W1dl 7FSqGAmgu8yXs0cH/STtILWT7XYpc0PndN1mIJ9zO4ZJRpo2rbk6H4yDAh7LYkyMHgFj6M mmyJEFhxhcxIKlMnHizr7qxIqf86FH1ipkrsouoSvCOCR42UYEhaIXfkrg7DVQA8kOuFTG Z4X/+PHrtfF1oDIec2blBt7QS+tbS+e0fu5v2aBPEzw95Jy7wqwqjSIxVCH1hxY500ifn7 UoR3Ndb7JAKIpTFiOZnXHlmiK0a5eQlVEd8/I6gv0qAUwlJvr7EMYA33p9QxpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682812902; a=rsa-sha256; cv=none; b=HyPkEPhJZhGT9jeTrb7OM09Gl7UP0dO7CnQlBftssTfjEw+bLg0xJCbkGjUM8StRHPhYKr LOonyXidOX7rMjPR+sFLSubV6F9jPtHXuE27boA//3H/lHK6dRZ/d2WN6FPlIBz1yvN1ey +kkA8qX/WV1Px/NElaWUgLEKIhREGs51ryxCN7HyM2qDC9IwlGX/T+9dZDI5rofGbvAqFl 74yVkA5wYT+dlGX+c6gbhakcxQJLtEVIM4e4jGIi+IpGMqCfz3nQmFO6BAj0wG0Ksp/OnW 9NpHPj6f9CJqEJN79JftQ8YHbOWEmxnQRaZqCGcocNRI/KSCymc9fWX46UqTmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q862Z0t2Lz12C0; Sun, 30 Apr 2023 00:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U01gx0090405; Sun, 30 Apr 2023 00:01:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U01gZS090404; Sun, 30 Apr 2023 00:01:42 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:01:42 GMT Message-Id: <202304300001.33U01gZS090404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 62dc21b10731 - main - Additional validity checking in newfs(8). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62dc21b10731bdba26dafeb51640c2048a3344a0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=62dc21b10731bdba26dafeb51640c2048a3344a0 commit 62dc21b10731bdba26dafeb51640c2048a3344a0 Author: Kirk McKusick AuthorDate: 2023-04-29 19:49:50 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:01:18 +0000 Additional validity checking in newfs(8). A check in the superblock validity code verifies that the computed size of the filesystem cylinder groups (CGSIZE macro) does not exceed the filesystem block size (fs_bsize). A report was received that a filesystem had been flagged as failing this check. We were unable to determine how the reported filesystem could have been created. This commit adds a check at the end of the newfs(8) command to verify that the the cylinder group size is valid. If an oversize cylinder group is found newfs(8) prints a diagnostic output and rebuilds the filesystem to make it compiliant. MFC after: 1 week --- sbin/newfs/mkfs.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 16508305aa57..5af121104821 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -332,6 +332,7 @@ restart: * can put into each cylinder group. If this is too big, we reduce * the density until it fits. */ +retry: maxinum = (((int64_t)(1)) << 32) - INOPB(&sblock); minfragsperinode = 1 + fssize / maxinum; if (density == 0) { @@ -666,6 +667,21 @@ restart: pp->p_frag = sblock.fs_frag; pp->p_cpg = sblock.fs_fpg; } + /* + * This should NOT happen. If it does complain loudly and + * take evasive action. + */ + if ((int32_t)CGSIZE(&sblock) > sblock.fs_bsize) { + printf("INTERNAL ERROR: ipg %d, fpg %d, contigsumsize %d, ", + sblock.fs_ipg, sblock.fs_fpg, sblock.fs_contigsumsize); + printf("old_cpg %d, size_cg %jd, CGSIZE %jd\n", + sblock.fs_old_cpg, sizeof(struct cg), CGSIZE(&sblock)); + printf("Please file a FreeBSD bug report and include this " + "output\n"); + maxblkspercg = fragstoblks(&sblock, sblock.fs_fpg) - 1; + density = 0; + goto retry; + } } /* From nobody Sun Apr 30 00:55:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q87FD2gphz48VPm; Sun, 30 Apr 2023 00:56: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 4Q87FD1m5gz46FN; Sun, 30 Apr 2023 00:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682816160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZY6Q4LyLNELuIyh4PCgEi6vBOpRsRnjuZZADpKMzqo=; b=Q3VpFmAa2qS+KZK2F02JPcOzkqL3iqwIsbu/DruY81qebL5OI3EpkrjrOCfW3hDfoeiZY9 yWbRgojru2XqykLkxePpc1Wli1XinqCBKrhZKZD9QagFtA6NWIKawJ+yfYgBw7KQrlVxvq //em6BmV+Cs34U5SeH80fl8IBAUkI4lLT/H5F9Gh4z9maAIUZr4HEkVo/Jucmj2GuXHfr9 D0dJNf6zU7ivDibH+ZSg8NVTDccyhlcMUCHq35sM8Nkg87WCiWBSWQrTvUwizJbbGXucRM Kv1W9lvJQtgF4bNyikKTAvTVjjHsZpxpD+cHUAbxXRGCV9+tYemJqeH9WkPK9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682816160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZY6Q4LyLNELuIyh4PCgEi6vBOpRsRnjuZZADpKMzqo=; b=TecT1JHEfrq7yD037HETC+r0t1+KYJZ3SZzi/dHmkbmgVB6dNKx7rVG7yEmFORpS8LuyXt lDeUr+gmxiHUa+Ch9F91jF+y1J8jnj3hD+vCznmeWMjGz190xGjLx6QEEzTR97roX/Obd9 A7mkUS0tscMsV5lWlF30R8jegg0cGsgJo6cjQw35txMENxvNfCBZvyVuxONv5swq9ldxEQ I+C6TWtkYRDFlSxmwIyF9bt9Aqo4MfKlkyr4FcyllLhz7SLUHv/mtFmoBBcfgeZM2XbUIV v3/8haWp1IT62DnKKWuqXJ/juyobnMA4OMvPALqCKBSWGiv9lSAFV3IUh8SQNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682816160; a=rsa-sha256; cv=none; b=c+EE5O5tG/IQMnpyuR2dAKi/f+9DAbzs6Dh1ppJ0nqTHUZfDydvkmOZ1z5xrc778ZIKdsk EZcev+ioXlOsh4uhU4IYY9INa4QeZ8Fm54/JO3N6ZaPUr+/8xn8acd2MarZ6Zwn02VLeZo DeQ8sck33K+2/LWvEaFDZDXrUdPWF8Y0ywXn6BpvhrtaFDIhTO3L0FbtYqY4QJrbxVPw7L YJToVYnN25WMFKUMLnoLlpjTofuRL7LV7mnIKoeg770kWhNvuH442cYMVikoR6Hbdrt4uY Q2ZvpUpVN8/A6NaMvSRAf4bdmDbUMQRT+V9f8G62wDBjWCeYfqPvY6oan3eH/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 4Q87FD0mMMz12rF; Sun, 30 Apr 2023 00:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U0txwk076744; Sun, 30 Apr 2023 00:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U0txC4076743; Sun, 30 Apr 2023 00:55:59 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:55:59 GMT Message-Id: <202304300055.33U0txC4076743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 6995e6b3237e - main - Fix printf format conflict List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=6995e6b3237e9be9ae6f68af13edd3db4b668ab8 commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 Author: Kirk McKusick AuthorDate: 2023-04-30 00:55:15 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:55:15 +0000 Fix printf format conflict MFC after: 1 week --- sbin/dumpfs/dumpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 01b475a03fea..743734660e57 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) default: goto err; } - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 02:16:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q892g23BYz48ZtZ for ; Sun, 30 Apr 2023 02:16:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q892g0QR9z4Cwc for ; Sun, 30 Apr 2023 02:16:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-2fc3f1d6f8cso679836f8f.3 for ; Sat, 29 Apr 2023 19:16:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682821016; x=1685413016; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oof+qWpibW/AjNWjoINt2ecWFd6efRdQ/bArsWA8EgA=; b=hebH8tTWsLifZzvkvzJHpI/gYiXNFi5Sax/QCPMZZq1FYdtvPUXHePqazn1xKg1GJc G6JhqcgOn78LORMMn3pl7o6OvaELvJ1myDLgKQ+9Msw3THz8U9tHNUg1u8R3s9WPXCtI 8Bgbsvr7vXduXEgfrr+HSzoJy1C5UGAqimqVtogyXT9ajb+FxuyuHLqZ7GLYgJbJUK2e WxHrV88w/nfMot+jIIVKb8COJfDaNoLKHyucoy+AwerkqDvPM/OrFoByIkGjcDwRWhon FwaTbmITWvJlypA4p+VyesS9ZQMTaMQQRnPiqK/bgy0awNAf5HdFh3n8NC48lNQ7RmPF OelA== X-Gm-Message-State: AC+VfDwM6riZrY4TN9Bb6B6k3ifdd6Obr76M7xqLa6SRUzwmsdqyOFcW ENtQDA3DjipblJn3rV6epyqBqg== X-Google-Smtp-Source: ACHHUZ7c4a2H+mgIXDeelVwOaiFbh0FsV+YX4DufLa1u3OLxjkYdZOoeHrHvQeLTopy1H5z7kuHz5g== X-Received: by 2002:adf:ef52:0:b0:306:b48:3fc4 with SMTP id c18-20020adfef52000000b003060b483fc4mr2103421wrp.31.1682821015709; Sat, 29 Apr 2023 19:16:55 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id r4-20020adfdc84000000b002f598008d50sm24754434wrj.34.2023.04.29.19.16.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Apr 2023 19:16:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict From: Jessica Clarke In-Reply-To: <202304300055.33U0txC4076743@gitrepo.freebsd.org> Date: Sun, 30 Apr 2023 03:16:54 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> To: Kirk McKusick X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q892g0QR9z4Cwc X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 30 Apr 2023, at 01:55, Kirk McKusick wrote: >=20 > The branch main has been updated by mckusick: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68af13edd3db= 4b668ab8 >=20 > commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 > Author: Kirk McKusick > AuthorDate: 2023-04-30 00:55:15 +0000 > Commit: Kirk McKusick > CommitDate: 2023-04-30 00:55:15 +0000 >=20 > Fix printf format conflict >=20 > MFC after: 1 week > --- > sbin/dumpfs/dumpfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > index 01b475a03fea..743734660e57 100644 > --- a/sbin/dumpfs/dumpfs.c > +++ b/sbin/dumpfs/dumpfs.c > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > default: > goto err; > } > - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", > + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); size_t is not an int on 64-bit architectures; you want %zu. Jess > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 02:54:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q89tQ0GtRz48cPN; Sun, 30 Apr 2023 02:54:54 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (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 4Q89tP2mz8z4Gq1; Sun, 30 Apr 2023 02:54:53 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-5286311be47so849002a12.1; Sat, 29 Apr 2023 19:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682823291; x=1685415291; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UpERznqrowvJ4z1hQBXe2PiA73AkM9nWSBZgldG9a+Q=; b=QyYSixHNi3GuvUyiYtGSMAjEdfdkoPfuWvMLqfiIJIaZkYqTYkLegf8iZZMgTmdSxS A6d4kg/BKTo0zAIWluQhFivJkfgb6nxgBg/ZNSy5mseEDF7xSCHrHD9GYu/2HMrljq80 msGUUylYfypOfbF6RmzKcZ8jyQIDREnvXfcqybjDGp6pd/8xz2/s71kWRjkpCoSop5sR 34Q9B8ehrt/98+PLYKxFz52+069tYbZi4Za2w0KDJLWtFEcz+G9sJWQ/fJMr07jpXvqU ZNOyAUbE7B8tfHyAVQ3nYiP5cXLr0aShTqjRPR/rwqYdOCUJHQXrErR1AF+IpOwhiXzY ggTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682823291; x=1685415291; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UpERznqrowvJ4z1hQBXe2PiA73AkM9nWSBZgldG9a+Q=; b=FQKmxHTAkWB9vy4blN9WCaC1mZEROTIqaRYl37tp6oXHRUnqW07Wgf3ioMmeagJY4R OM3hnD2bRJEDErFGCEi3nxkcVL5L6pOa+A8nLmSxmd/L7hWqW+pzwVmwY9XLYrnM6Nzb nxiYuvW7zFBOoVASIT7kC+ZfRectuMUHbK18WfrpuwDyD1aX23MAXIqIXotdG3FqHHmU 8vAQj1K8XHxd2UA7EtUqpa7J++gWjHjmF73exXNmdIUkVA37oPcUFhS3uHHN34l4mOw5 Yu9p14XIE+pJBuL4QvyHg8u8nr5FE0CHSIX7nndRnUUzi0Q71SQV2jGQohasxqHQ0Qh1 MLCg== X-Gm-Message-State: AC+VfDxcaxWtxCw1YtgkTxNqyiXpthPsl2R+/g06vDgZOZsNqKFOMGZO XAE+XRtsGi2jzgJGfqf5DNsUc0HJgLsKKxcnxPOX2LP4dQ== X-Google-Smtp-Source: ACHHUZ7dUbtoRRllptFUu0fFS+yHqFPkHyYK4DUEn9D+swu7erhbPObb1AHdlJ12ZqWXY6wAGMUQIVin6TmKfIs2cy0= X-Received: by 2002:a17:902:d482:b0:19f:8ad5:4331 with SMTP id c2-20020a170902d48200b0019f8ad54331mr12280553plg.38.1682823290612; Sat, 29 Apr 2023 19:54:50 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> In-Reply-To: From: Rick Macklem Date: Sat, 29 Apr 2023 19:54:41 -0700 Message-ID: Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict To: Jessica Clarke Cc: Kirk McKusick , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Q89tP2mz8z4Gq1 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Apr 29, 2023 at 7:17=E2=80=AFPM Jessica Clarke = wrote: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > > On 30 Apr 2023, at 01:55, Kirk McKusick wrote: > > > > The branch main has been updated by mckusick: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68af= 13edd3db4b668ab8 > > > > commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 > > Author: Kirk McKusick > > AuthorDate: 2023-04-30 00:55:15 +0000 > > Commit: Kirk McKusick > > CommitDate: 2023-04-30 00:55:15 +0000 > > > > Fix printf format conflict > > > > MFC after: 1 week > > --- > > sbin/dumpfs/dumpfs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > > index 01b475a03fea..743734660e57 100644 > > --- a/sbin/dumpfs/dumpfs.c > > +++ b/sbin/dumpfs/dumpfs.c > > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > > default: > > goto err; > > } > > - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", > > + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > > size_t is not an int on 64-bit architectures; you want %zu. Since size_t is 32 bits on some arches, don't you need to use %ju and (uintmax_t)sizeof(struct cg)? rick > > Jess > > > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); > > From nobody Sun Apr 30 02:55:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q89vG37v6z48ccg for ; Sun, 30 Apr 2023 02:55:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q89vF5K70z4HV5 for ; Sun, 30 Apr 2023 02:55:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.50 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3f1958d3a53so12130525e9.0 for ; Sat, 29 Apr 2023 19:55:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682823336; x=1685415336; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n4ZyMHXKp+0udcpaoV0CioTcSVB62bd3xZLxtR76/xg=; b=LI5XVAN3AYvQLqLqtb7i5Jrx9NW/xrhMat/Lhyt7+16N7i/1W7rkGuSPkhBUtoTLVq wnxFXRoZpUgfJ+ZWWBeIouhemXbcfYQUyeC+Bm2kYE9nsILZroMroG0PqNRUmMAYayRt rpgdwsZSdBqf3D7Rernk1ufcVjfUfcX1gWPisho/5p52AUARRS8crK76DsIzOg/+0f3P tSjKbnLNIGAwu1Z7sd61vWzE+yS9M7BxpQZsfNtJ1oN28QeL4AviGoH2lycXvx+wb534 bE7jhHRZT2+ydPJC+QsNMV6Xbm9sHpbuF9FJfQLcf7nMyzp6zVLu5Oxsk80rgS+4ej/M KwcA== X-Gm-Message-State: AC+VfDzQiYQMtMyALlEPRZUmmL1OQC/fymjMlRcgzMRJLqCQHWhaG5mm ESEjIWljQs8hSH+r4xNRsrFppw== X-Google-Smtp-Source: ACHHUZ6hs4HwIPL6iNx7fKT4fkBocyOhEEe+VJYf/N4gctrUTP+kydPsnXIk6+lqryiyZxoeFVIKDg== X-Received: by 2002:a1c:7312:0:b0:3f3:2e4e:c738 with SMTP id d18-20020a1c7312000000b003f32e4ec738mr2785833wmb.3.1682823335989; Sat, 29 Apr 2023 19:55:35 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k25-20020a05600c081900b003f17122587bsm31956419wmp.36.2023.04.29.19.55.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Apr 2023 19:55:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict From: Jessica Clarke In-Reply-To: Date: Sun, 30 Apr 2023 03:55:34 +0100 Cc: Kirk McKusick , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <164F1299-0F3D-424C-8A76-C0FD8239B31C@freebsd.org> References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> To: Rick Macklem X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spamd-Result: default: False [-1.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_LONG(-1.00)[-0.995]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_SHORT(-0.01)[-0.008]; FREEFALL_USER(0.00)[jrtc27]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.50:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.50:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4Q89vF5K70z4HV5 X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On 30 Apr 2023, at 03:54, Rick Macklem wrote: >=20 > On Sat, Apr 29, 2023 at 7:17=E2=80=AFPM Jessica Clarke = wrote: >>=20 >> CAUTION: This email originated from outside of the University of = Guelph. Do not click links or open attachments unless you recognize the = sender and know the content is safe. If in doubt, forward suspicious = emails to IThelp@uoguelph.ca. >>=20 >>=20 >> On 30 Apr 2023, at 01:55, Kirk McKusick wrote: >>>=20 >>> The branch main has been updated by mckusick: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68af13edd3db= 4b668ab8 >>>=20 >>> commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 >>> Author: Kirk McKusick >>> AuthorDate: 2023-04-30 00:55:15 +0000 >>> Commit: Kirk McKusick >>> CommitDate: 2023-04-30 00:55:15 +0000 >>>=20 >>> Fix printf format conflict >>>=20 >>> MFC after: 1 week >>> --- >>> sbin/dumpfs/dumpfs.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>=20 >>> diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c >>> index 01b475a03fea..743734660e57 100644 >>> --- a/sbin/dumpfs/dumpfs.c >>> +++ b/sbin/dumpfs/dumpfs.c >>> @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) >>> default: >>> goto err; >>> } >>> - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", >>> + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", >>> afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); >>=20 >> size_t is not an int on 64-bit architectures; you want %zu. > Since size_t is 32 bits on some arches, don't you need to use %ju > and (uintmax_t)sizeof(struct cg)? No. %zu is size_t by definition. That=E2=80=99s the point of its = existence. Jess > rick >=20 >>=20 >> Jess >>=20 >>> printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", >>> afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, = afs.fs_dblkno); From nobody Sun Apr 30 03:08:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8BBS2TS5z48d2g; Sun, 30 Apr 2023 03:08:48 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0: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 4Q8BBR1m0Fz4JW7; Sun, 30 Apr 2023 03:08:47 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1a6817adde4so14566135ad.0; Sat, 29 Apr 2023 20:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682824125; x=1685416125; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6fKDJ8nqdNbk865qkoXKits4Sz7VuX5ulhT9wmZ0qHg=; b=rW9kS/u+9QUETb9PW2sJ/Nr9F85e1jnvdT+/Mfxsj8VKdU0VzOUNu8nKTc6duxkFbY lm/E7/fiuduD20wXBUNPCokjn7pRdmhD/+sTgxaEgemBo9o45NtQD+xS5cR08GVecrND i8bWlFq/fOkxOX6HbItJgBzASIOdfFbUcsshr+tz1uayvnmespbdIaikF3AY/cJgiZzO 1xLTBWutMOy4k3QAFDYsHVE0jIH4s7TAA3UElCk0fc/yTktzoSkw1YfNAaTFomTzJluG oh4yqDSImLWZGSoG4Dw+oYROW5SEfdxCBNWL5B2HSHbUwdlRYX8cZLIsZ0bySttIXw7r g28A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682824125; x=1685416125; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6fKDJ8nqdNbk865qkoXKits4Sz7VuX5ulhT9wmZ0qHg=; b=l4hHTI8tbV6usJbNVGmOEutcfg4wiKcXCjmEMGGx5jXKlrgPFAz4wDgHyQWkEv1H3T 9eM0leIkpydS8Of0kUQOnNDUyMj/FBGj4ECZ8lplJo/FwNtaPWig+cfF2ilrx7i4hmnx gF8ULZGLhi6hbLyu/ieF7XdEfm+pCfa4+KutFd4SvBwrsmiCRnEbCKK4TuZZsl1esNrP hFL8Pa5kmQvSXkcTL5tKrZJ02voajAvKLvLavoBCoxVOCgn8nCn+703QrwXRVwpI28BZ OVHMtl8yRoJvdUq5suv+rVyGxSaWz97SmqNjehILSB+eMtlETtOWFOhkp59uGEjwTkEV EEKw== X-Gm-Message-State: AC+VfDzbSV8OpaObOc3o2M/pqReAMZIFFsiAQiAzH5cOVRksUqJJby7a e4EZmj7lHFAJYvQgfJ7ziPZj8YhpTuz2xerR50Evh/kbxQ== X-Google-Smtp-Source: ACHHUZ528jEZzcYEE9HZloKSYyS0tYLjkkoph50EWJbkwR/6+XdMJR/9cYprczAQvqAPt6eWJdsFh/4VZtIImIBxsFA= X-Received: by 2002:a17:902:d50c:b0:1a6:955c:6329 with SMTP id b12-20020a170902d50c00b001a6955c6329mr11662059plg.22.1682824125198; Sat, 29 Apr 2023 20:08:45 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> <164F1299-0F3D-424C-8A76-C0FD8239B31C@freebsd.org> In-Reply-To: <164F1299-0F3D-424C-8A76-C0FD8239B31C@freebsd.org> From: Rick Macklem Date: Sat, 29 Apr 2023 20:08:35 -0700 Message-ID: Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict To: Jessica Clarke Cc: Kirk McKusick , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Q8BBR1m0Fz4JW7 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Apr 29, 2023 at 7:55=E2=80=AFPM Jessica Clarke = wrote: > > On 30 Apr 2023, at 03:54, Rick Macklem wrote: > > > > On Sat, Apr 29, 2023 at 7:17=E2=80=AFPM Jessica Clarke wrote: > >> > >> CAUTION: This email originated from outside of the University of Guelp= h. Do not click links or open attachments unless you recognize the sender a= nd know the content is safe. If in doubt, forward suspicious emails to IThe= lp@uoguelph.ca. > >> > >> > >> On 30 Apr 2023, at 01:55, Kirk McKusick wrote: > >>> > >>> The branch main has been updated by mckusick: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68= af13edd3db4b668ab8 > >>> > >>> commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 > >>> Author: Kirk McKusick > >>> AuthorDate: 2023-04-30 00:55:15 +0000 > >>> Commit: Kirk McKusick > >>> CommitDate: 2023-04-30 00:55:15 +0000 > >>> > >>> Fix printf format conflict > >>> > >>> MFC after: 1 week > >>> --- > >>> sbin/dumpfs/dumpfs.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > >>> index 01b475a03fea..743734660e57 100644 > >>> --- a/sbin/dumpfs/dumpfs.c > >>> +++ b/sbin/dumpfs/dumpfs.c > >>> @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > >>> default: > >>> goto err; > >>> } > >>> - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", > >>> + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > >>> afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > >> > >> size_t is not an int on 64-bit architectures; you want %zu. > > Since size_t is 32 bits on some arches, don't you need to use %ju > > and (uintmax_t)sizeof(struct cg)? > > No. %zu is size_t by definition. That=E2=80=99s the point of its existenc= e. Yep, I see that in "man 3 printf". As they say, you learn something every d= ay. rick > > Jess > > > rick > > > >> > >> Jess > >> > >>> printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > >>> afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); > From nobody Sun Apr 30 05:07:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8DqH1g9cz48lxq; Sun, 30 Apr 2023 05:07: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 4Q8DqH12XJz3DqJ; Sun, 30 Apr 2023 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682831243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d72hv7jN7iJUEnHXplMOjBSGwK5RwtKTlq7ECqdNSw8=; b=L/K/Vn2GRIdqaYY5fEemoiUj0y2jTUUA+t3CitPo/LB8YYSIt982y0xqLqgBPvVIsCpM25 hWJIF7PjbTqk9WlAa5sHLIDRvv3GT+Fsixm3gWhngJ0tIGTTn++lPIvfacsU6Sn7w9rMEf Z9UGQ21R+hNmKkmhGCYaKVUk36HJTMuSxsrcuPhR1bcIhVyt6KHzTAHpLkdy6UGqwkroqU avVoKzVAjMcybmNIoPkrjRs+dSq+75a/sch5Vl1JfBszCzlgaVh6yY8wS2TEFYs31OkKtN HTvnVvZjHQUpRtynBUM3UgUcAfATrJnTIvzBe+sL9/qUdXuQEKA+2bZEXcKUDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682831243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d72hv7jN7iJUEnHXplMOjBSGwK5RwtKTlq7ECqdNSw8=; b=LQk1qFm+qMNltx9kt422nI+HPP/zvr6bkSi8zA5wYk6lfv/fkh9EYiCcXXTy3aKbojm/tm TwL4ZcF1qHAxrOHI5BvXuDobD1aqjWiyax3S8nkUcsFe5gG6gDjaVwpy/jMmcw5lpdzZVH noDPkK4rETa5Pf/HKGhh/FXwn8o3kibsgrb9PnAYc0bHu9xGdQOgTUllt6qBav/PhsQN3Q 9Cd/H1njA3t9sgaLZ+M3VsdpXpkTtXiWEE3JNmEtr5oOCGhV9K+wvvpp3rFQwYjbjk8K5u qLNo8/S53RQWqKzq8qOzynGQj3XNhCXiPuN8YBP+87WQr8TCscz1BNeIx+QBrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682831243; a=rsa-sha256; cv=none; b=o6s0B8zDkVywzCbu2k3jYcRQmoxaGwpQtGiuTsCdJNmLK59oW1iRncrwf+EVy+a7p/zrLy n/B1lHaXju6BZm0+4LGtEU4lcAPRVDk8dsws9ewjw/OSPJRjkZgwUf0Ha6lPWCK4WGxzUR E3U2XxsUyYR6pBmcnDWEhhpbY3kKelhJSyMYXa+s4p+bUqBdyLVhV7mr4Qvw9VXZNM6+Jc R8ucITS2kzXVdb8zr/NmAFR8DIyO86AOsUbHsRYYJhjkEuBS14SHxhNFqufIUcTrTwQJkf eZs1yd9iFeCtaR0QGyU1S9DMfJV5LUIR1RbBAyzy+z4ggOHyLLVKxoD1AOJWQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8DqH06SWz19GF; Sun, 30 Apr 2023 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U57MRC090663; Sun, 30 Apr 2023 05:07:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U57MZh090662; Sun, 30 Apr 2023 05:07:22 GMT (envelope-from git) Date: Sun, 30 Apr 2023 05:07:22 GMT Message-Id: <202304300507.33U57MZh090662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: e0e5bf4d6283 - main - freebsd-update: Mention 13.2-RELEASE in usage. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 commit e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 Author: Poul-Henning Kamp AuthorDate: 2023-04-30 05:06:56 +0000 Commit: Poul-Henning Kamp CommitDate: 2023-04-30 05:06:56 +0000 freebsd-update: Mention 13.2-RELEASE in usage. --- 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 4ef44d1ad000..03eefee75bbd 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -49,7 +49,7 @@ Options: case of an unfinished upgrade -j jail -- Operate on the given jail specified by jid or name -k KEY -- Trust an RSA key with SHA256 hash of KEY - -r release -- Target for upgrade (e.g., 11.1-RELEASE) + -r release -- Target for upgrade (e.g., 13.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address From eugen@grosbein.net Sun Apr 30 06:59:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HKN0k6Rz48sNh; Sun, 30 Apr 2023 07:00:07 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.3 with cipher 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 "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HKL6dQBz3hgs; Sun, 30 Apr 2023 07:00:06 +0000 (UTC) (envelope-from eugen@grosbein.net) Authentication-Results: mx1.freebsd.org; none Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.17.1/8.17.1) with ESMTPS id 33U6xuLN075031 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 30 Apr 2023 06:59:57 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: phk@FreeBSD.org Received: from [10.58.0.11] (dadvw [10.58.0.11] (may be forged)) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 33U6xtFZ066230 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sun, 30 Apr 2023 13:59:55 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: git: e0e5bf4d6283 - main - freebsd-update: Mention 13.2-RELEASE in usage. To: Poul-Henning Kamp , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304300507.33U57MZh090662@gitrepo.freebsd.org> From: Eugene Grosbein Message-ID: Date: Sun, 30 Apr 2023 13:59:51 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 In-Reply-To: <202304300507.33U57MZh090662@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT autolearn=disabled version=3.4.6 X-Spam-Report: * -0.0 SHORTCIRCUIT No description available. * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hz.grosbein.net X-Rspamd-Queue-Id: 4Q8HKL6dQBz3hgs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 30.04.2023 12:07, Poul-Henning Kamp wrote: > The branch main has been updated by phk: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 > > commit e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 > Author: Poul-Henning Kamp > AuthorDate: 2023-04-30 05:06:56 +0000 > Commit: Poul-Henning Kamp > CommitDate: 2023-04-30 05:06:56 +0000 > > freebsd-update: Mention 13.2-RELEASE in usage. > --- > 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 4ef44d1ad000..03eefee75bbd 100644 > --- a/usr.sbin/freebsd-update/freebsd-update.sh > +++ b/usr.sbin/freebsd-update/freebsd-update.sh > @@ -49,7 +49,7 @@ Options: > case of an unfinished upgrade > -j jail -- Operate on the given jail specified by jid or name > -k KEY -- Trust an RSA key with SHA256 hash of KEY > - -r release -- Target for upgrade (e.g., 11.1-RELEASE) > + -r release -- Target for upgrade (e.g., 13.2-RELEASE) > -s server -- Server from which to fetch updates > (default: update.FreeBSD.org) > -t address -- Mail output of cron command, if any, to address I took some historic data from https://www.freebsd.org/releases/ to make a table of release years: 9.2 2013 10.2 2015 11.2 2018 12.2 2020 13.2 2023 Note that formula (int)((year-1990)*2/5) gives exact major release number for .2 release and it uses integer arithmetic only. Given freebsd-update.sh is a shell script with $(( )) for integer arithmetic, we could automate the usage message for the future. From nobody Sun Apr 30 07:00:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HKz6zKyz48sVc; Sun, 30 Apr 2023 07:00: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 4Q8HKy4MVgz3jf2; Sun, 30 Apr 2023 07:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682838038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMEDAgTr2S4+8ZMyfx+yIB8rdTmWiLhpqHLt5AiXkgg=; b=vVU7ggDudaBugsTEU4OqEfv7lwAfndbZ3OrJFdRJX23XyciLwrRjGgT3FwEPxCHfcnN+TB WziXAmIXafHS/xPpAH+PV//dAGVnaCfKvTIK+t5g/gNOsLaDI/2arZPDQTJjd1v5GrZPKA cGmZNvT40HJ6lw65ys+9ivvWz+GTkyj8WaqgGbd+RxGBelvjNcp3WQX9f+CKPagKlks09h SEDP0fcM9bQ9005kUfFcP2t5tXHp02um4Oe6fkiVTjCDLvX31JbOH4lJ9MLDWTOT53Yn8B LLoBqBGVpPOhbw3Wni4xU1LQQRfXVVteBiMQY8HNdgvdS3zXxGFmv0foKRsZoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682838038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMEDAgTr2S4+8ZMyfx+yIB8rdTmWiLhpqHLt5AiXkgg=; b=gv6b3CYr0HBubwIeww/0TAI3+QISmu9J9R3FeouMS56PrzjGE7BT1+ecFsvmE92qKHwTUg HuqvgRMch/tm3PQkEGuyDKkXD0xz3uJ1V/CjmRvhkKIJWpNMqtRT+SnBS+9/EGn4yIb+8t 2SoyS5R8muBRa5s/6He3UrZzs2L88t3RvLbOn/TdbLb0vl5oGHzuwoZzPoS3838I9QMtWe VgOarmbhPLSLRCIaO1ZkYR7xXPo9U6rogCXzwyz3kXGaAdS+D6PRzyQIXmqlEneSe+wk6v ym3PmgFIIT180Bt8cFkxlB78o1tCBFdFUe9qLwiTTMFQRk3P2+LSh2sBF5LKPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682838038; a=rsa-sha256; cv=none; b=LeUl8U4CP+06uwYaX3OuTpQAraOr46yYXGcVJYsNQRA1qbHOUboEg+qpGc0IgvwsTFu7LG KUEggq0st0yFjuL/FH5kLuJZl/skM4EEBpM6yNG+W2h5hgAkrdhiUlYGrmSAxtBV95tnEG Fbjoak3uSKQHC+QzE7vWmM434z/yEQS7c6XedAmdZnN0vFORj35FhN81qUNNNLqFg5b/g7 64POx+TWJstsnSRlqeCTlGo91/H3NGmt5TdU9nwVN6goD+KIJLVzCRcB5Nz826UrJimwFO 7YTUtk1PrFRMoG7WG6GzpooFZKgDEFMqKS56Fxr8kljtmM17/W6NffpMV6lXMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HKy3RRMz1Cs4; Sun, 30 Apr 2023 07:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U70c1i082165; Sun, 30 Apr 2023 07:00:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U70cF9082164; Sun, 30 Apr 2023 07:00:38 GMT (envelope-from git) Date: Sun, 30 Apr 2023 07:00:38 GMT Message-Id: <202304300700.33U70cF9082164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 2e7797cd9bba - main - Yet another try to fix printf format conflict. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e7797cd9bba4fa82391b53a7dd7aac074baf716 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=2e7797cd9bba4fa82391b53a7dd7aac074baf716 commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716 Author: Kirk McKusick AuthorDate: 2023-04-30 06:59:45 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 07:00:23 +0000 Yet another try to fix printf format conflict. I find it very annoying that there is no FreeBSD infrastructure to determine failures across architectures other than to check in changes and then have Jenkins find them. Suggested by: Jessica Clarke MFC after: 1 week --- sbin/dumpfs/dumpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 743734660e57..a0767c39e6bf 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) default: goto err; } - printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", + printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%zu\n", afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 07:08:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HW94TN9z48sdC for ; Sun, 30 Apr 2023 07:08:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 4Q8HW92sRtz3pyV for ; Sun, 30 Apr 2023 07:08:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-3f195b164c4so7281085e9.1 for ; Sun, 30 Apr 2023 00:08:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682838516; x=1685430516; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gyb9Ne1GMyFbrT945dWJs4oM2gkhcF02/37+aES/MVo=; b=OqYnDQ9v40IIk3cIbh68VNISiNutgiqNKYGVRBDisgQE3I+P6Qfqry3bierCnW8AYD dQrdL+7KmJnSWN8iaeZ1NdqJHbO07ykAkInoBLPqIXMbmhySQW7dtF+szHOw2FDIpVIn DASbJo84Y1NdKv1FoWGpybEANNLGEE4lWt4bj0TNdym0THkiGpU5O7bvKkGoq2zHiEdr n4KwOIWIQ68Nw24JkUPQOHZiRDTbPHql3+9tP0qW2h2ccsy6ljN3xzDMKJLSrS3O3WZH 8heVJg6sMc/evVXTWKWJJDIQ8vCiNTkAC/eb/XgY56pmksmHlv6XE1F51bxq6b/+rYKY TJ0w== X-Gm-Message-State: AC+VfDy8UuvnGH5hg9ra4l28IXeJt0elGLNAzoJzWtBrHbsaEJeN2wkR cOxyrCWl2XxjBO/l+VP81HgwqA== X-Google-Smtp-Source: ACHHUZ4TBctWh9gWZZwsSCHQ0mmAtysSe/89i64BzjxceFpt5Gx/SeYuYg9fFB47D7hLdmshXvMnVw== X-Received: by 2002:a1c:f707:0:b0:3f1:93c8:4a79 with SMTP id v7-20020a1cf707000000b003f193c84a79mr7032926wmh.29.1682838515932; Sun, 30 Apr 2023 00:08:35 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id o4-20020a056000010400b002fa67f77c16sm25001764wrx.57.2023.04.30.00.08.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Apr 2023 00:08:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 2e7797cd9bba - main - Yet another try to fix printf format conflict. From: Jessica Clarke In-Reply-To: <202304300700.33U70cF9082164@gitrepo.freebsd.org> Date: Sun, 30 Apr 2023 08:08:34 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> References: <202304300700.33U70cF9082164@gitrepo.freebsd.org> To: Kirk McKusick X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q8HW92sRtz3pyV X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 30 Apr 2023, at 08:00, Kirk McKusick wrote: >=20 > The branch main has been updated by mckusick: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aac0= 74baf716 >=20 > commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716 > Author: Kirk McKusick > AuthorDate: 2023-04-30 06:59:45 +0000 > Commit: Kirk McKusick > CommitDate: 2023-04-30 07:00:23 +0000 >=20 > Yet another try to fix printf format conflict. >=20 > I find it very annoying that there is no FreeBSD infrastructure to > determine failures across architectures other than to check in > changes and then have Jenkins find them. That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See = build(7)) Jess > Suggested by: Jessica Clarke > MFC after: 1 week > --- > sbin/dumpfs/dumpfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > index 743734660e57..a0767c39e6bf 100644 > --- a/sbin/dumpfs/dumpfs.c > +++ b/sbin/dumpfs/dumpfs.c > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > default: > goto err; > } > - printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > + printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%zu\n", > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 09:45:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8M0X59t0z46ZlD; Sun, 30 Apr 2023 09:45: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 4Q8M0X3tz3z43rW; Sun, 30 Apr 2023 09:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682847948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cFdFDWr+URZBqhhggdOCHcBQzcUKGZAbj8az83dD6c=; b=o/XjwvpGWdYGt8jEfHK5+H/XqC+u0vdngaleKxL6mAtoO1Q4ry9ruOJHUL894xudAvr0OC NL00qvGQ57pX+iryIMBm+ZmYVJln04Bmx2E7xH+tQWz1+EE90hpghEZPo93TMPOCt5+3Q0 mn2nFUaVt3av+NaHpiMHOYOmom6naugrw9utY9lNRQvszAtGwF0THLiQkxIeSrsdGPiuJB eit0S4mhjcZZJBhq3G/XWL/wP61mxBLQ0Ic7BtYT05Bwv9zEvu3Pmedg6IpSekrOgmFoqJ Ay88rm01zZXECH0ybdTUc1dIDv9ONvDlF7x/LX2exVAfYq7bcQEeH9/btxa+OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682847948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cFdFDWr+URZBqhhggdOCHcBQzcUKGZAbj8az83dD6c=; b=QdOiMzFYc63ItTu/EctMBgl7mDilhLpibTtHO3xqRJ9q88dqZRSDtUzW0cwYMpugPVQ2Zw xIaW+35FsMrJJi8Lmlo/VQRsLsnV49pOBQzoIhRUU7SLTykPvbZS3PfjrHmRyUx9ZqH/5K jLhF15vMNR2ww5+WIWxo7Xls4pCKOvmW7p9ZtJT/K7hGiZX03kgBmLqcZ3SWTc/wgfg3wU 4dLSUVown41vl2ETGfyDyuK3HrxHmaKXgf3uAmbLH2Sn4I5MfRaJ+tkf4lbcOQr2+4DnVC aWVK+qfe1TVErhYJXsWtNN5So/gkCUOXn9EhsrfJWi418RaPRekZh3BWU7sPkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682847948; a=rsa-sha256; cv=none; b=cfKmiGBkins++ARUNjNV6H/3jfsHgONvBy11CF0i5LTZAnvRgx1YzJ0tkZ0MLlIRjGgOEa 9ZAZBVhkTJRoYR9HOEG9ooTFGxyqLxwEUQx11zcVc/yikxSejuXPjY73dszRfPIFV0pSth PadCwa0C6RjH0DB+DJjbn3z3AaM/AGnvUonpuD4thsDWbexYR3Qx/llvfxYuTj46I9zz4q Xm4qNjj2URoHJe+dxfpVnzn28aoyLJvGAA9Jjl9jNXkERm3o7M3kuNOZbbRlqD+ZiiwvK/ 5wKFSHQmW/Tm2TA+7Y+ZOTig6iFUUYNpKgbuEBPEy3CQ3iV/1wBLOGi2sRrUWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8M0X2yDnzJh7; Sun, 30 Apr 2023 09:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U9jmTo053454; Sun, 30 Apr 2023 09:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U9jmRb053453; Sun, 30 Apr 2023 09:45:48 GMT (envelope-from git) Date: Sun, 30 Apr 2023 09:45:48 GMT Message-Id: <202304300945.33U9jmRb053453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 1f0e13449bee - main - sctp: improve handling of stale cookie error causes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f0e13449beef3a983d9ed2faf4734075e4120d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1f0e13449beef3a983d9ed2faf4734075e4120d1 commit 1f0e13449beef3a983d9ed2faf4734075e4120d1 Author: Michael Tuexen AuthorDate: 2023-04-30 09:39:32 +0000 Commit: Michael Tuexen CommitDate: 2023-04-30 09:39:32 +0000 sctp: improve handling of stale cookie error causes * If a measure of staleness of 0 is reported, use the RTT instead. * Ensure that we always send a cookie preservative parameter by rounding up during the calculation. * If allowed, perform a round trip time measurement. * Clear the overall error counter, since the error cause also acts like an ACK. MFC after: 1 week --- sys/netinet/sctp_input.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index f01c1fe710e4..26abf4953164 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1133,26 +1133,47 @@ sctp_handle_error(struct sctp_chunkhdr *ch, */ if ((cause_length >= sizeof(struct sctp_error_stale_cookie)) && (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { + struct timeval now; struct sctp_error_stale_cookie *stale_cookie; + uint64_t stale_time; - stale_cookie = (struct sctp_error_stale_cookie *)cause; - /* stable_time is in usec, convert to msec. */ - asoc->cookie_preserve_req = ntohl(stale_cookie->stale_time) / 1000; - /* Double it to be more robust on RTX. */ - asoc->cookie_preserve_req *= 2; asoc->stale_cookie_count++; - if (asoc->stale_cookie_count > - asoc->max_init_times) { + if (asoc->stale_cookie_count > asoc->max_init_times) { sctp_abort_notification(stcb, false, true, 0, NULL, SCTP_SO_NOT_LOCKED); - /* now free the asoc */ (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); return (-1); } - /* blast back to INIT state */ + stale_cookie = (struct sctp_error_stale_cookie *)cause; + stale_time = ntohl(stale_cookie->stale_time); + if (stale_time == 0) { + /* Use an RTT as an approximation. */ + (void)SCTP_GETTIME_TIMEVAL(&now); + timevalsub(&now, &asoc->time_entered); + stale_time = (uint64_t)1000000 * (uint64_t)now.tv_sec + (uint64_t)now.tv_usec; + if (stale_time == 0) { + stale_time = 1; + } + } + /* + * stale_time is in usec, convert it to + * msec. Round upwards, to ensure that it is + * non-zero. + */ + stale_time = (stale_time + 999) / 1000; + /* Double it, to be more robust on RTX. */ + stale_time = 2 * stale_time; + asoc->cookie_preserve_req = (uint32_t)stale_time; + if (asoc->overall_error_count == 0) { + sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, + SCTP_RTT_FROM_NON_DATA); + } + asoc->overall_error_count = 0; + /* Blast back to INIT state */ sctp_toss_old_cookies(stcb, &stcb->asoc); - SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); sctp_stop_all_cookie_timers(stcb); + SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); + (void)SCTP_GETTIME_TIMEVAL(&asoc->time_entered); sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); } break; From nobody Sun Apr 30 13:21:59 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8RpG2vHQz47nvP for ; Sun, 30 Apr 2023 13:22:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 4Q8RpG1Jqbz3CQ0 for ; Sun, 30 Apr 2023 13:22:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-50bc3088b7aso886700a12.3 for ; Sun, 30 Apr 2023 06:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1682860933; x=1685452933; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WnfFLRJfb+vHl7Fa80ATV3sWMvXn495NuDC18xkVY+U=; b=5N8quyn8o2eiX0UU6FVw/OAuZHyzucf5pijy6wcGSneyKyp3EXH+cObi7rsZh00bmU jduvJdEsfSn/mUMwOj2qdEOULB+o2tnCNfoa3/5X/FqNBKhnc888s3atZrL2LkwoTXp4 InSQIF08KffTp+Hfhq6lgnfeOeRLR018ik6LGoCZQIekRovtH3OjSWYkzlOpyS14gMDg k5FXzXF40iX4WsLfC2utvvPYMZCuRDT6+KYuKw1AcrG3uFWCxhBsOkyyv/FfDyXm/PzM Lmu+lZU+kl0qGm+YMwPQAFxlR1Ort2mFtMfBB4IEg0hRysN9Cxm5aGdHlsUtSmmer5u6 UfQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682860933; x=1685452933; 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=WnfFLRJfb+vHl7Fa80ATV3sWMvXn495NuDC18xkVY+U=; b=ZM05+aZEdMcRCPUNGv0ItRh38uB8Nnw73LYI6P0fov3ljUjKnlFGnooXpDTUAQph3T YMvnJzrmfWSC8gLyMnmJ8UBY965dW7je/QEddMmNaKasiHUg1fE8MzQnldjnZn4jZMmz 5EV3QlbXClQdx0hCDGE9SRJr/rQ+hGKRpwHuCAEfm93oE6mi3TirpH0uY4/YblEqjdup FxDNLh3/94C9GzoURqmMkZ1bjmNsWGusUVKqSElTwSzyrN1/eccEImuV+Hv/ZVB1j+kh WIsmp1O/e2LzAaL1hOhX6n+LZpURxM2dPCvWly91m2bGwD2i2v3lnOytPD02kB75zX7o hGhg== X-Gm-Message-State: AC+VfDz7AhSzqPZ20kvZSkOmkkY/runnMV4Y6dMWAnaS5STkCQGOGqMs sDKii3brqRsiSxNPrw7r++hwa6Nnqp3fwCxoFcM5kSh3YOTi81k/ X-Google-Smtp-Source: ACHHUZ5Bj05G/1QMyZ+3bvwy8MPzPsFWslOUuiSzESCde4/gEsQULdrUgGckbVgea0rSaZ4MsBxIdZtlJS/zSIdl30A= X-Received: by 2002:a05:6402:1017:b0:504:ae37:77d0 with SMTP id c23-20020a056402101700b00504ae3777d0mr3344455edu.10.1682860932594; Sun, 30 Apr 2023 06:22:12 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202304300700.33U70cF9082164@gitrepo.freebsd.org> <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> In-Reply-To: <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> From: Warner Losh Date: Sun, 30 Apr 2023 07:21:59 -0600 Message-ID: Subject: Re: git: 2e7797cd9bba - main - Yet another try to fix printf format conflict. To: Jessica Clarke Cc: Kirk McKusick , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000001811e605fa8d98c7" X-Rspamd-Queue-Id: 4Q8RpG1Jqbz3CQ0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000001811e605fa8d98c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Apr 30, 2023, 1:08 AM Jessica Clarke wrote: > On 30 Apr 2023, at 08:00, Kirk McKusick wrote: > > > > The branch main has been updated by mckusick: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aac= 074baf716 > > > > commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716 > > Author: Kirk McKusick > > AuthorDate: 2023-04-30 06:59:45 +0000 > > Commit: Kirk McKusick > > CommitDate: 2023-04-30 07:00:23 +0000 > > > > Yet another try to fix printf format conflict. > > > > I find it very annoying that there is no FreeBSD infrastructure to > > determine failures across architectures other than to check in > > changes and then have Jenkins find them. > > That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See = build(7)) > There's other ways too. The long way is to 'make buildworld TARGET=3Di386' which will catch things like this. However, that can take a while... If you've done one of those in the past, there will be enough of a tree for the next trick to work: cd sbin/dumpfs make buildenv TARGET=3Di386 make # in a subshell exit This will also build things and see if you got the printf formatting right and is pretty quick. So of course I always do this before I commit.... the fix that the tinderbox tells me I broke (since I don't always remember that I've changed a printf in larger commits). it would be nice if clang had a magic flag to catch this.... Warner Jess > > > Suggested by: Jessica Clarke > > MFC after: 1 week > > --- > > sbin/dumpfs/dumpfs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > > index 743734660e57..a0767c39e6bf 100644 > > --- a/sbin/dumpfs/dumpfs.c > > +++ b/sbin/dumpfs/dumpfs.c > > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > > default: > > goto err; > > } > > - printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > > + printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%zu\n", > > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); > > --0000000000001811e605fa8d98c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Apr 30, 2023, 1:08 AM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 30 Apr 2023, at 08:00, Kirk McKusick <= ;mckusick@FreeBSD.org> wrote:
>
> The branch main has been updated by mckusick:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aa= c074baf716
>
> commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716
> Author:=C2=A0 =C2=A0 =C2=A0Kirk McKusick <mckusick@FreeBSD.org><= br> > AuthorDate: 2023-04-30 06:59:45 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Kirk McKusick <mckusick@FreeBSD.org><= br> > CommitDate: 2023-04-30 07:00:23 +0000
>
>=C2=A0 =C2=A0 Yet another try to fix printf format conflict.
>
>=C2=A0 =C2=A0 I find it very annoying that there is no FreeBSD infrastr= ucture to
>=C2=A0 =C2=A0 determine failures across architectures other than to che= ck in
>=C2=A0 =C2=A0 changes and then have Jenkins find them.

That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See bu= ild(7))

There's other ways too. The long way is to 'make buildworld = TARGET=3Di386' which will catch things like this. However, that can tak= e a while... If you've done one of those in the past, there will be eno= ugh of a tree for the next trick to work:

=
cd sbin/dumpfs
make buildenv TARGE= T=3Di386
make=C2=A0 =C2=A0 =C2=A0# in a subshell
exit

This will also build things and see if you got the printf formatting right= and is pretty quick.

So= of course I always do this before I commit.... the fix that the tinderbox = tells me I broke (since I don't always remember that I've changed a= printf in larger commits). it would be nice if clang had a magic flag to c= atch this....

Warner

=
Jess

>=C2=A0 =C2=A0 Suggested by: Jessica Clarke
>=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 1 week
> ---
> sbin/dumpfs/dumpfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
> index 743734660e57..a0767c39e6bf 100644
> --- a/sbin/dumpfs/dumpfs.c
> +++ b/sbin/dumpfs/dumpfs.c
> @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0default:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto err;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> -=C2=A0 =C2=A0 =C2=A0printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d= \n",
> +=C2=A0 =C2=A0 =C2=A0printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%= zu\n",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0afs.fs_old_cpg, sizeof(struct = cg), CGSIZE(&afs));
>=C2=A0 =C2=A0 =C2=A0 =C2=A0printf("sblkno\t%d\tcblkno\t%d\tiblkno\= t%d\tdblkno\t%d\n",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0afs.fs_sblkno, afs.fs_cblkno, = afs.fs_iblkno, afs.fs_dblkno);

--0000000000001811e605fa8d98c7-- From nobody Sun Apr 30 18:01:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8Z0F0d3Yz48692; Sun, 30 Apr 2023 18:01: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 4Q8Z0D6xqKz3mw9; Sun, 30 Apr 2023 18:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682877677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8ULNVfdIOsXmf/+zJLfjeaqXkWcQzmpdcogn3UIUNs=; b=y1tkqrFqhh1jW15PGS4tfkxfOTaGAPzMDJZEubnku7Z05iff1kKVPpBtbFXoszTJEfHfGt UYBZkddSEwhuNp0qFTWAm4Ia9Kw2DlTH0zKqK5smDVosSqSI4uyOZYrsqgRJ/JQ7VbV+4C 75BQDQrIls554pfS+b5F/kSWbZv0yKhCQwipytevhEfAWrYXRWCGR78XjQfndG5Z0gTPnI Q7EXTuYIVUn4P0y6B2AvQIYPri+592lp8QyDRZCo/rsl4FtDKr8uY5SiKxDBMRORECtvg2 rHFB7u5u2Z/Vm0eX1p/8Kwm+GntDVzb8oqnHVeruQfeUpAZkydRT6P8P+x3aag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682877677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8ULNVfdIOsXmf/+zJLfjeaqXkWcQzmpdcogn3UIUNs=; b=fLjGKS4i01EVc6zYd/zs7LsxQ/PDOleTQhO9pSOjsZxnzvpzGuzUNTmQsfjdpPnz5kPGn9 GgxXQmGQXCVFpYBxyiy80dG5Z0i6O3XyYE0S3oQ/X/PJEsSM0ym1gYWSGW1CJ2aFYwVYxb ZTVHx9fjjkikfeSiak3rsn0tetDAxjhE2u2GLdssNCtxEfsvW2AIqAUhA1hS66wNpC5Kj5 Oj3VgW+J8rtPXtyT0T9vwYqZ2oTlI/4ilT7zfYgdIs/wwAJXzmErqyb462AlOUxjkHt3eQ Odm1dgfKKzKAizzC/9n4Q4l4BxaQVSE9oxm9HUoILjqIGuRGHiGNtTyW3K43XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682877677; a=rsa-sha256; cv=none; b=So3DEaAumzrgpAuRDcWCPFtCzqexcXXXQemJI9MhXeef7WaPDI1p5sZghWwj3Oi7EqaAU1 arCjGdlBA8IXr2B/zw8kscu5lcI8QXyGF76q14WnZiuDMUIUXBGb5O1/Ld9YGMCffKf702 iWxJQiEk2j66Cmd6FO0ODw6gm7I83e6MUNfymq79eyWDV07FCMi8O9l0/RtFkVGKzVPLze 6u6vEWdfHae7ni0r9NslzogW6lLz5zl7Gz9nZUzNod5YFPh/OQdOLzfImj/FjrX49Tac0V f/hiM/gCjQMwWWGf4rYY9g33izSGozBriORNjRMRQMEKFS/JFOGaGF9rTRPAUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8Z0D61JCzYN5; Sun, 30 Apr 2023 18:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UI1G0Z071907; Sun, 30 Apr 2023 18:01:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UI1Gk7071906; Sun, 30 Apr 2023 18:01:16 GMT (envelope-from git) Date: Sun, 30 Apr 2023 18:01:16 GMT Message-Id: <202304301801.33UI1Gk7071906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: a50ef47c0a22 - main - newfs: fix up 32-bit compile List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a50ef47c0a22ca87cdbe669acbcbf999c72b8439 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a50ef47c0a22ca87cdbe669acbcbf999c72b8439 commit a50ef47c0a22ca87cdbe669acbcbf999c72b8439 Author: Mateusz Guzik AuthorDate: 2023-04-30 18:00:20 +0000 Commit: Mateusz Guzik CommitDate: 2023-04-30 18:00:20 +0000 newfs: fix up 32-bit compile Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/newfs/mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 5af121104821..d8580a789b1d 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -674,7 +674,7 @@ retry: if ((int32_t)CGSIZE(&sblock) > sblock.fs_bsize) { printf("INTERNAL ERROR: ipg %d, fpg %d, contigsumsize %d, ", sblock.fs_ipg, sblock.fs_fpg, sblock.fs_contigsumsize); - printf("old_cpg %d, size_cg %jd, CGSIZE %jd\n", + printf("old_cpg %d, size_cg %zu, CGSIZE %zu\n", sblock.fs_old_cpg, sizeof(struct cg), CGSIZE(&sblock)); printf("Please file a FreeBSD bug report and include this " "output\n"); From nobody Sun Apr 30 18:12:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8ZDq4kgDz486xQ; Sun, 30 Apr 2023 18:12: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 4Q8ZDq4CB6z3ns1; Sun, 30 Apr 2023 18:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682878331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ah1nyT1baNYCNyDEjTPDf2IOsYlSGFxpl+HrHhpyqwA=; b=OhxcYEKg2bSHTLFJWBtdyoX4BpuCRHOUGOerI/4AXSnes0a3GwS+UIMT4L2V6WkgYle2Yz yO4X9NM4+tbR/xDy5zMO8tJ/KNnQpl/izq5OclEuv/NMOCH1p973oJM+dP2PqDkNtaRENX 3BXxo9pDhI0IbyxqAw7damXsB7iEoQGXGloXlXU2VyaJrBoTxgSwgP+feTduXDYyHvOm41 wukhyECRwKM+11Zp4xWc7/JB63JcAlhmZ0hrHn4M25t8betl5ywITew62mbcwda9BWCnZ/ D3YuMev02IdPzhEqDw8ovVSiBTYMP8G3+8EayJIeIpYNnQOo6TkqVnpZ5FVgbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682878331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ah1nyT1baNYCNyDEjTPDf2IOsYlSGFxpl+HrHhpyqwA=; b=wf5OzyPW1yWsPnVAWmAwYTKSqk9SyGRf/Ct3jRz/7s9uOl533MfZyT8rTtSUp+KUuCX1BP 4NZFcydCbTcSCv5LdKbg/UDKhxN91a5nlVYHPmAwfars7RxKml4ud7XQmq4BAaUenRudkY vyiCj4NrqMguNYyWguh+0EJTcD2jwOAD2ORn9Jfjx7ThdFrjqdyplHit9tLGNvcUsqCUI/ IFdICGSDX1QiBxJrqi6se5Ei9Rdsx2k/qNVtVapX+3XxR/3dq92kiCA0aXaXcS2mmaulKt Vmf7G9irqeSi7p4XrAz2/YUBzZPTE7aslkd3kEf9m+zKBYXaxTAefEhA1uMj8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682878331; a=rsa-sha256; cv=none; b=hYR0XwS5/KG4wyDScBkP3liRKp0dV/ZZXnFQz6CC5NLvmMHcp8htY/FOBIs09iu3fsOlDj 14ZyB5y84gHHZ5Z6zkCyAskJJecEcIKaqYXJNkV80quk159HvD6Q6DJcrNt0FMcwDbnKgs 2lHgM8/+9MgvnIHRroxR2+kFB8iYMtHaa0X2u8aKllIE84Hhf6f1m5/svPxfNtIuenHMyi V3tiYNVjvS17p9UkAQ8+FtN/x0WFqdKLnzOprwiXw9X8qgFU7/moQJn6tZlFFvvj9Z/7Yk Px2EuJX0fwJApwU5AQmf/hKZLvFUWLgKobUT6ig/oafOS91k+v5dCi9K/gfJEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8ZDq3FvrzYfy; Sun, 30 Apr 2023 18:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UICB1v093314; Sun, 30 Apr 2023 18:12:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UICBUY093313; Sun, 30 Apr 2023 18:12:11 GMT (envelope-from git) Date: Sun, 30 Apr 2023 18:12:11 GMT Message-Id: <202304301812.33UICBUY093313@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: 6a23843a4a6f - main - libifconfig: fix carp key configuration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a23843a4a6f2dae95a2029358468b697072b8d2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6a23843a4a6f2dae95a2029358468b697072b8d2 commit 6a23843a4a6f2dae95a2029358468b697072b8d2 Author: Kristof Provost AuthorDate: 2023-04-28 16:18:55 +0000 Commit: Kristof Provost CommitDate: 2023-04-30 18:11:54 +0000 libifconfig: fix carp key configuration There were two issues with the carp key configuration in the new netlink code. The first is that userspace failed to actually pass the CARP_NL_KEY attribute to the kernel, so a key was never set. The second issue is that snl_attr_get_string() returns a pointer to the string inside the netlink message. It does not copy the string to the target buffer. That's somewhat inconvenient to work with in libifconfig where we have a static buffer for the key. Introduce snl_attr_copy_string() which can copy a string to a target buffer and uses the 'arg' parameter to pass the buffer size, so it doesn't accidentally exceed the available space. Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39874 --- lib/libifconfig/libifconfig_carp.c | 3 ++- sys/netlink/netlink_snl.h | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/libifconfig/libifconfig_carp.c b/lib/libifconfig/libifconfig_carp.c index 2b612f0ba51b..cb1a998b3a0c 100644 --- a/lib/libifconfig/libifconfig_carp.c +++ b/lib/libifconfig/libifconfig_carp.c @@ -55,7 +55,7 @@ static struct snl_attr_parser ap_carp_get[] = { { .type = CARP_NL_STATE, .off = _OUT(carpr_state), .cb = snl_attr_get_uint32 }, { .type = CARP_NL_ADVBASE, .off = _OUT(carpr_advbase), .cb = snl_attr_get_int32 }, { .type = CARP_NL_ADVSKEW, .off = _OUT(carpr_advskew), .cb = snl_attr_get_int32 }, - { .type = CARP_NL_KEY, .off = _OUT(carpr_key), .cb = snl_attr_get_string }, + { .type = CARP_NL_KEY, .off = _OUT(carpr_key), .cb = snl_attr_copy_string, .arg_u32 = CARP_KEY_LEN }, { .type = CARP_NL_ADDR, .off = _OUT(carpr_addr), .cb = snl_attr_get_in_addr }, { .type = CARP_NL_ADDR6, .off = _OUT(carpr_addr6), .cb = snl_attr_get_in6_addr }, }; @@ -176,6 +176,7 @@ ifconfig_carp_set_info(ifconfig_handle_t *h, const char *name, &carpr->carpr_addr); snl_add_msg_attr(&nw, CARP_NL_ADDR6, sizeof(carpr->carpr_addr6), &carpr->carpr_addr6); + snl_add_msg_attr_string(&nw, CARP_NL_KEY, carpr->carpr_key); hdr = snl_finalize_msg(&nw); if (hdr == NULL) { diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 4cb1b3e13abc..822cec9b4dc4 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -138,7 +138,12 @@ struct snl_attr_parser { uint16_t type; /* Attribute type */ uint16_t off; /* field offset in the target structure */ snl_parse_attr_f *cb; /* parser function to call */ - const void *arg; /* Optional argument parser */ + + /* Optional parser argument */ + union { + const void *arg; + const uint32_t arg_u32; + }; }; struct snl_hdr_parser { @@ -588,6 +593,19 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla, return (true); } +static inline bool +snl_attr_copy_string(struct snl_state *ss, struct nlattr *nla, + const void *arg, void *target) +{ + char *tmp; + + if (snl_attr_get_string(ss, nla, NULL, &tmp)) { + strlcpy(target, tmp, (size_t)arg); + return (true); + } + return (false); +} + static inline bool snl_attr_get_nested(struct snl_state *ss, struct nlattr *nla, const void *arg, void *target) { From nobody Sun Apr 30 18:28:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8Zbk04r9z488Hn; Sun, 30 Apr 2023 18:28: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 4Q8Zbj6zhGz3qQF; Sun, 30 Apr 2023 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=1682879313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKEw3uxKQld7x/uoWqqFskNp3mbVufz3lMY3HIY+am8=; b=Bt5Ba6pOYSZDDOtbKFpnlor0RaqZWbp6l3w30GDxrRyxe9lNr+WYSWbG/xiS5ICPWLBtjN IeU29fDX3tK8EwGb+V02VtWtbpyVOhRDpABaAjN9K6awqBQB8kGsX7OYHad4H0rOTBsXCE 9k832lYbRyr9nOmm37l71J/J6tLDRopgHdBY/kwUB44upKMV56gIXAMx5GbYYt6D9FhBHY GKFkOlfYTZcXKbM2xggfo/RqmizJGF5P6IEbvUELPmznfMqZKqIG2LARds0qecW+SXs51U hHlbbbn6wJBHH4VkfRsZITWN/qvzOzCoMfCVGSsmliG+RYTuyyLIyNCai5Fz2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682879313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKEw3uxKQld7x/uoWqqFskNp3mbVufz3lMY3HIY+am8=; b=qtkG3ReqFmY2yePTNxUyDHzHnTB4ql1Ox3H8FKwN0nT+MJSNRzwxCucb1nIhO8+RzttqNT ReqaiHSoy9XXHO6LOkDo+ZBfA789Uymb3spWBEpA2IhqnyEYXXIhcqpgcPVMCoQprmM5nm WTzK+JzgXvn+4lnw8sG9DcsBUJjd2kRDEEhSw6cUqI5Jf59YTbvCfxNgKY9AkfcKf1/LdE vvxf+tGDJOlpnr0xOfz3rJY7MO3UAeDjLffzsgE0vAaT3qZGwj5TrQrr3z8qab5Cs0C2gP 0MwVIl8TJ+mdzuV4TuO7Fe89J75KoKz8o3MYkEv0ooZJWC6r+hwHUQKScxnx4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682879313; a=rsa-sha256; cv=none; b=K5rZyYUDuPHyAaEaBcdzi0w/MlDGXAdHkZdmDjkfalPM4eC+rNZfW1zd+Wpyq8/WAcuA+j YMS0TIRoxFzQoueRw7I69A64UF8RU28km/gjtuJJuvMl2tndGjalYP1814t4/a8mtPD8m2 yIfvk0KLxlSwqwFCZfxgePUq/r4IZbxrUhsM3toeWi+BovD9ksGSISCxgYnsvPFCQjAVF1 ILGwYUsRR/es7ev8sMPnOMYYinvc9qY0eMQxfanyy6SLHWRqzHSTczIWdCYbqZSPI9v1tJ ZVC5Pt7t+/Cx48knntEGPrnoF8BM6O6BCDYg36oSVLIFDRU/ia6Bhojjuv3KBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8Zbj62tWzYt7; Sun, 30 Apr 2023 18:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UISXHX011122; Sun, 30 Apr 2023 18:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UISXB6011121; Sun, 30 Apr 2023 18:28:33 GMT (envelope-from git) Date: Sun, 30 Apr 2023 18:28:33 GMT Message-Id: <202304301828.33UISXB6011121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: 8c48f4c5377d - main - contrib/bc: import version 6.5.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c48f4c5377ddc3dc55388f181f23111145f7099 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=8c48f4c5377ddc3dc55388f181f23111145f7099 commit 8c48f4c5377ddc3dc55388f181f23111145f7099 Author: Stefan Eßer AuthorDate: 2023-04-30 17:53:26 +0000 Commit: Stefan Eßer CommitDate: 2023-04-30 18:28:21 +0000 contrib/bc: import version 6.5.0 This release that fixes an infinite loop bug in the (non-standard) extended math library functions root() and cbrt(), fixes a bug with BC_LINE_LENGTH=0, and adds the fib() function to the extended math library to calculate Fibonacci numbers. (cherry picked from commit 438a1101dc1f687928cdbe02cd7817a88a24f42f) MFC after: 3 days --- contrib/bc/NEWS.md | 6 + contrib/bc/gen/lib2.bc | 24 +++- contrib/bc/include/version.h | 2 +- contrib/bc/src/vm.c | 8 +- contrib/bc/tests/bc/all.txt | 1 + contrib/bc/tests/bc/fib.txt | 31 +++++ contrib/bc/tests/bc/fib_results.txt | 31 +++++ contrib/bc/tests/bc/scripts/all.txt | 1 + contrib/bc/tests/bc/scripts/cbrt.txt | 100 ++++++++++++++ contrib/bc/tests/bc/scripts/root.bc | 19 +++ contrib/bc/tests/bc/scripts/root.txt | 255 +++++++++++++++++++++++++++++++++++ contrib/bc/tests/extra_required.txt | 1 + contrib/bc/tests/script.sh | 2 +- 13 files changed, 473 insertions(+), 8 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 6dff6822fb16..44b17b060f5c 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,11 @@ # News +## 6.5.0 + +This is a production release that fixes an infinite loop bug in `root()` and +`cbrt()`, fixes a bug with `BC_LINE_LENGTH=0`, and adds the `fib()` function to +the extended math library to calculate Fibonacci numbers. + ## 6.4.0 This is a production release that fixes a `read()`/`?` bug and adds features to diff --git a/contrib/bc/gen/lib2.bc b/contrib/bc/gen/lib2.bc index 2811430d534e..ba3f76b1803a 100644 --- a/contrib/bc/gen/lib2.bc +++ b/contrib/bc/gen/lib2.bc @@ -93,6 +93,18 @@ define comb(n,r){ scale=s return f } +define fib(n){ + auto i,t,p,r + if(!n)return 0 + n=abs(n)$ + t=1 + for (i=1;i= UINT16_MAX) len = BC_NUM_PRINT_WIDTH; + len = (size_t) strtol(lenv, NULL, 10); + if (len != 0) + { + len -= 1; + if (len < 2 || len >= UINT16_MAX) len = BC_NUM_PRINT_WIDTH; + } } // Set the default. else len = BC_NUM_PRINT_WIDTH; diff --git a/contrib/bc/tests/bc/all.txt b/contrib/bc/tests/bc/all.txt index af5eaaa42fb7..3d0ea05ba7c0 100644 --- a/contrib/bc/tests/bc/all.txt +++ b/contrib/bc/tests/bc/all.txt @@ -34,6 +34,7 @@ arctangent sine cosine bessel +fib arrays misc misc1 diff --git a/contrib/bc/tests/bc/fib.txt b/contrib/bc/tests/bc/fib.txt new file mode 100644 index 000000000000..2fa2eea143ed --- /dev/null +++ b/contrib/bc/tests/bc/fib.txt @@ -0,0 +1,31 @@ +fib(0) +fib(1) +fib(2) +fib(3) +fib(4) +fib(5) +fib(6) +fib(7) +fib(8) +fib(9) +fib(10) +fib(11) +fib(12) +fib(13) +fib(14) +fib(15) +fib(16) +fib(17) +fib(18) +fib(19) +fib(20) +fib(21) +fib(22) +fib(23) +fib(24) +fib(25) +fib(26) +fib(27) +fib(28) +fib(29) +fib(30) diff --git a/contrib/bc/tests/bc/fib_results.txt b/contrib/bc/tests/bc/fib_results.txt new file mode 100644 index 000000000000..1837f6b7414f --- /dev/null +++ b/contrib/bc/tests/bc/fib_results.txt @@ -0,0 +1,31 @@ +0 +1 +1 +2 +3 +5 +8 +13 +21 +34 +55 +89 +144 +233 +377 +610 +987 +1597 +2584 +4181 +6765 +10946 +17711 +28657 +46368 +75025 +121393 +196418 +317811 +514229 +832040 diff --git a/contrib/bc/tests/bc/scripts/all.txt b/contrib/bc/tests/bc/scripts/all.txt index e2d2aa320c6f..a226bed54234 100644 --- a/contrib/bc/tests/bc/scripts/all.txt +++ b/contrib/bc/tests/bc/scripts/all.txt @@ -4,6 +4,7 @@ subtract.bc add.bc print.bc parse.bc +root.bc array.bc array2.bc atan.bc diff --git a/contrib/bc/tests/bc/scripts/cbrt.txt b/contrib/bc/tests/bc/scripts/cbrt.txt new file mode 100644 index 000000000000..bae7f3af0578 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/cbrt.txt @@ -0,0 +1,100 @@ +.464158883361277889241007635091 +.215443469003188372175929356651 +.100000000000000000000000000000 +.046415888336127788924100763509 +.021544346900318837217592935665 +.010000000000000000000000000000 +.004641588833612778892410076350 +.002154434690031883721759293566 +.001000000000000000000000000000 +.000464158883361277889241007635 +.000215443469003188372175929356 +.000100000000000000000000000000 +.000046415888336127788924100763 +.000021544346900318837217592935 +.000010000000000000000000000000 +.000004641588833612778892410076 +.000002154434690031883721759293 +.000001000000000000000000000000 +.000000464158883361277889241007 +.000000215443469003188372175929 +.000000100000000000000000000000 +.000000046415888336127788924100 +.000000021544346900318837217592 +.000000010000000000000000000000 +.000000004641588833612778892410 +.000000002154434690031883721759 +.000000001000000000000000000000 +.000000000464158883361277889241 +.000000000215443469003188372175 +.000000000100000000000000000000 +.000000000046415888336127788924 +.000000000021544346900318837217 +.000000000010000000000000000000 +.000000000004641588833612778892 +.000000000002154434690031883721 +.000000000001000000000000000000 +.000000000000464158883361277889 +.000000000000215443469003188372 +.000000000000100000000000000000 +.000000000000046415888336127788 +.000000000000021544346900318837 +.000000000000010000000000000000 +.000000000000004641588833612778 +.000000000000002154434690031883 +.000000000000001000000000000000 +.000000000000000464158883361277 +.000000000000000215443469003188 +.000000000000000100000000000000 +.000000000000000046415888336127 +.000000000000000021544346900318 +.000000000000000010000000000000 +.000000000000000004641588833612 +.000000000000000002154434690031 +.000000000000000001000000000000 +.000000000000000000464158883361 +.000000000000000000215443469003 +.000000000000000000100000000000 +.000000000000000000046415888336 +.000000000000000000021544346900 +.000000000000000000010000000000 +.000000000000000000004641588833 +.000000000000000000002154434690 +.000000000000000000001000000000 +.000000000000000000000464158883 +.000000000000000000000215443469 +.000000000000000000000100000000 +.000000000000000000000046415888 +.000000000000000000000021544346 +.000000000000000000000010000000 +.000000000000000000000004641588 +.000000000000000000000002154434 +.000000000000000000000001000000 +.000000000000000000000000464158 +.000000000000000000000000215443 +.000000000000000000000000100000 +.000000000000000000000000046415 +.000000000000000000000000021544 +.000000000000000000000000010000 +.000000000000000000000000004641 +.000000000000000000000000002154 +.000000000000000000000000001000 +.000000000000000000000000000464 +.000000000000000000000000000215 +.000000000000000000000000000100 +.000000000000000000000000000046 +.000000000000000000000000000021 +.000000000000000000000000000010 +.000000000000000000000000000004 +.000000000000000000000000000002 +.000000000000000000000000000001 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/bc/scripts/root.bc b/contrib/bc/tests/bc/scripts/root.bc new file mode 100644 index 000000000000..95210fe290e6 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/root.bc @@ -0,0 +1,19 @@ +scale = 30 + +s = 1 >> 1 + +for (i = 0; i < 100; ++i) +{ + cbrt(s) + s >>= 1 +} + +s = 1 >> 1 + +for (i = 0; i < 155; ++i) +{ + root(s, 5) + s >>= 1 +} + +halt diff --git a/contrib/bc/tests/bc/scripts/root.txt b/contrib/bc/tests/bc/scripts/root.txt new file mode 100644 index 000000000000..b720eb5de75f --- /dev/null +++ b/contrib/bc/tests/bc/scripts/root.txt @@ -0,0 +1,255 @@ +.464158883361277889241007635091 +.215443469003188372175929356651 +.100000000000000000000000000000 +.046415888336127788924100763509 +.021544346900318837217592935665 +.010000000000000000000000000000 +.004641588833612778892410076350 +.002154434690031883721759293566 +.001000000000000000000000000000 +.000464158883361277889241007635 +.000215443469003188372175929356 +.000100000000000000000000000000 +.000046415888336127788924100763 +.000021544346900318837217592935 +.000010000000000000000000000000 +.000004641588833612778892410076 +.000002154434690031883721759293 +.000001000000000000000000000000 +.000000464158883361277889241007 +.000000215443469003188372175929 +.000000100000000000000000000000 +.000000046415888336127788924100 +.000000021544346900318837217592 +.000000010000000000000000000000 +.000000004641588833612778892410 +.000000002154434690031883721759 +.000000001000000000000000000000 +.000000000464158883361277889241 +.000000000215443469003188372175 +.000000000100000000000000000000 +.000000000046415888336127788924 +.000000000021544346900318837217 +.000000000010000000000000000000 +.000000000004641588833612778892 +.000000000002154434690031883721 +.000000000001000000000000000000 +.000000000000464158883361277889 +.000000000000215443469003188372 +.000000000000100000000000000000 +.000000000000046415888336127788 +.000000000000021544346900318837 +.000000000000010000000000000000 +.000000000000004641588833612778 +.000000000000002154434690031883 +.000000000000001000000000000000 +.000000000000000464158883361277 +.000000000000000215443469003188 +.000000000000000100000000000000 +.000000000000000046415888336127 +.000000000000000021544346900318 +.000000000000000010000000000000 +.000000000000000004641588833612 +.000000000000000002154434690031 +.000000000000000001000000000000 +.000000000000000000464158883361 +.000000000000000000215443469003 +.000000000000000000100000000000 +.000000000000000000046415888336 +.000000000000000000021544346900 +.000000000000000000010000000000 +.000000000000000000004641588833 +.000000000000000000002154434690 +.000000000000000000001000000000 +.000000000000000000000464158883 +.000000000000000000000215443469 +.000000000000000000000100000000 +.000000000000000000000046415888 +.000000000000000000000021544346 +.000000000000000000000010000000 +.000000000000000000000004641588 +.000000000000000000000002154434 +.000000000000000000000001000000 +.000000000000000000000000464158 +.000000000000000000000000215443 +.000000000000000000000000100000 +.000000000000000000000000046415 +.000000000000000000000000021544 +.000000000000000000000000010000 +.000000000000000000000000004641 +.000000000000000000000000002154 +.000000000000000000000000001000 +.000000000000000000000000000464 +.000000000000000000000000000215 +.000000000000000000000000000100 +.000000000000000000000000000046 +.000000000000000000000000000021 +.000000000000000000000000000010 +.000000000000000000000000000004 +.000000000000000000000000000002 +.000000000000000000000000000001 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +.630957344480193249434360136622 +.398107170553497250770252305087 +.251188643150958011108503206779 +.158489319246111348520210137339 +.100000000000000000000000000000 +.063095734448019324943436013662 +.039810717055349725077025230508 +.025118864315095801110850320677 +.015848931924611134852021013733 +.010000000000000000000000000000 +.006309573444801932494343601366 +.003981071705534972507702523050 +.002511886431509580111085032067 +.001584893192461113485202101373 +.001000000000000000000000000000 +.000630957344480193249434360136 +.000398107170553497250770252305 +.000251188643150958011108503206 +.000158489319246111348520210137 +.000100000000000000000000000000 +.000063095734448019324943436013 +.000039810717055349725077025230 +.000025118864315095801110850320 +.000015848931924611134852021013 +.000010000000000000000000000000 +.000006309573444801932494343601 +.000003981071705534972507702523 +.000002511886431509580111085032 +.000001584893192461113485202101 +.000001000000000000000000000000 +.000000630957344480193249434360 +.000000398107170553497250770252 +.000000251188643150958011108503 +.000000158489319246111348520210 +.000000100000000000000000000000 +.000000063095734448019324943436 +.000000039810717055349725077025 +.000000025118864315095801110850 +.000000015848931924611134852021 +.000000010000000000000000000000 +.000000006309573444801932494343 +.000000003981071705534972507702 +.000000002511886431509580111085 +.000000001584893192461113485202 +.000000001000000000000000000000 +.000000000630957344480193249434 +.000000000398107170553497250770 +.000000000251188643150958011108 +.000000000158489319246111348520 +.000000000100000000000000000000 +.000000000063095734448019324943 +.000000000039810717055349725077 +.000000000025118864315095801110 +.000000000015848931924611134852 +.000000000010000000000000000000 +.000000000006309573444801932494 +.000000000003981071705534972507 +.000000000002511886431509580111 +.000000000001584893192461113485 +.000000000001000000000000000000 +.000000000000630957344480193249 +.000000000000398107170553497250 +.000000000000251188643150958011 +.000000000000158489319246111348 +.000000000000100000000000000000 +.000000000000063095734448019324 +.000000000000039810717055349725 +.000000000000025118864315095801 +.000000000000015848931924611134 +.000000000000010000000000000000 +.000000000000006309573444801932 +.000000000000003981071705534972 +.000000000000002511886431509580 +.000000000000001584893192461113 +.000000000000001000000000000000 +.000000000000000630957344480193 +.000000000000000398107170553497 +.000000000000000251188643150958 +.000000000000000158489319246111 +.000000000000000100000000000000 +.000000000000000063095734448019 +.000000000000000039810717055349 +.000000000000000025118864315095 +.000000000000000015848931924611 +.000000000000000010000000000000 +.000000000000000006309573444801 +.000000000000000003981071705534 +.000000000000000002511886431509 +.000000000000000001584893192461 +.000000000000000001000000000000 +.000000000000000000630957344480 +.000000000000000000398107170553 +.000000000000000000251188643150 +.000000000000000000158489319246 +.000000000000000000100000000000 +.000000000000000000063095734448 +.000000000000000000039810717055 +.000000000000000000025118864315 +.000000000000000000015848931924 +.000000000000000000010000000000 +.000000000000000000006309573444 +.000000000000000000003981071705 +.000000000000000000002511886431 +.000000000000000000001584893192 +.000000000000000000001000000000 +.000000000000000000000630957344 +.000000000000000000000398107170 +.000000000000000000000251188643 +.000000000000000000000158489319 +.000000000000000000000100000000 +.000000000000000000000063095734 +.000000000000000000000039810717 +.000000000000000000000025118864 +.000000000000000000000015848931 +.000000000000000000000010000000 +.000000000000000000000006309573 +.000000000000000000000003981071 +.000000000000000000000002511886 +.000000000000000000000001584893 +.000000000000000000000001000000 +.000000000000000000000000630957 +.000000000000000000000000398107 +.000000000000000000000000251188 +.000000000000000000000000158489 +.000000000000000000000000100000 +.000000000000000000000000063095 +.000000000000000000000000039810 +.000000000000000000000000025118 +.000000000000000000000000015848 +.000000000000000000000000010000 +.000000000000000000000000006309 +.000000000000000000000000003981 +.000000000000000000000000002511 +.000000000000000000000000001584 +.000000000000000000000000001000 +.000000000000000000000000000630 +.000000000000000000000000000398 +.000000000000000000000000000251 +.000000000000000000000000000158 +.000000000000000000000000000100 +.000000000000000000000000000063 +.000000000000000000000000000039 +.000000000000000000000000000025 +.000000000000000000000000000015 +.000000000000000000000000000010 +.000000000000000000000000000006 +.000000000000000000000000000003 +.000000000000000000000000000002 +.000000000000000000000000000001 +.000000000000000000000000000001 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/extra_required.txt b/contrib/bc/tests/extra_required.txt index e36d95a1305b..c498802ffaea 100644 --- a/contrib/bc/tests/extra_required.txt +++ b/contrib/bc/tests/extra_required.txt @@ -1,5 +1,6 @@ engineering lib2 +fib places rand scientific diff --git a/contrib/bc/tests/script.sh b/contrib/bc/tests/script.sh index 438af17c79c4..fef0c5290615 100755 --- a/contrib/bc/tests/script.sh +++ b/contrib/bc/tests/script.sh @@ -132,7 +132,7 @@ fi # Skip the tests that require extra math if we don't have it. if [ "$run_extra_tests" -eq 0 ]; then - if [ "$f" = "rand.bc" ]; then + if [ "$f" = "rand.bc" ] || [ "$f" = "root.bc" ]; then printf 'Skipping %s script: %s\n' "$d" "$f" exit 0 fi From nobody Sun Apr 30 20:26:52 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8dDD6FxRz48GdW; Sun, 30 Apr 2023 20:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8dDD5fPVz44dZ; Sun, 30 Apr 2023 20:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682886412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/tZpc3m2jZ3SMtGoxPcM3L9CqwMVW61IpD8h9FAGZg=; b=Emryr9IH0SB8OtKDEa6SwafKcIis277bZJFUs8JAmKoV9gYxsz45Jjo1433CtgQz33U0KU xK8CL2hdhvocR9GJ7h2PpRC0CN1pABggO3odTfRc1X8PBILDJAriGHQ0ipijmDY1xv0/zB hKtyOB5/P9NwPT50kxETpqE9j7tt0ubiK68xlUhDQ+71eoJoJW6h4Px36/WHtJlUbXJITu BpQmeV30/QDhExYzUEFF3oETW5ERvh6inFEXjn5NDuJB9qbSmWZdWU/h5cLxyDnKu/YXWK 0uRPZsyRpGYjsp7kFTfeY+WsNk9TwjUuzzUtQSeGHu6cHZtC0ChXy+OosSeq8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682886412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/tZpc3m2jZ3SMtGoxPcM3L9CqwMVW61IpD8h9FAGZg=; b=UE59X6DB4HdYoAqv5kyO03CFfrdCXzv46i/FL2CcLFErtvY+SyIbeyRodNDvYjbVuOpMMr wQDhdt2BbY7avjcYyQEXFD6FCTjy6QxU3i9XG57G5DNn7pg5C9Zb4VHOJzkKbqKcNoFqEy yVarCBchpIjgkY9KhOaLsffp8HkEp9aro5k37PuRnuYOlqTLhiXiXs2ypjhNUK9dyRit4F uVKgFt1xioODkEut3vTXZccO+SaSLrgFVQcxWsKN42xhazs0bdO4XkDJ84a7JHcIUH0pn6 4DSUfLUfAiiLgbYPsuNnmyoHDUsqZ/Zt7PGoXrMdnf0IVRIdB8egQ3p/4lT7KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682886412; a=rsa-sha256; cv=none; b=gv1Ak0Ml0jGgNyPi+FgjLxmUQDHIXF0Px5hrLUy8tRv6vnMgZWACk4/Jx9BhVrLUeuFcC4 JeUmmBkfRYR9u5uiTo3tfQL7sbZIrMpAmIsybmMVYjfa8Asn4d3PwIJ99d9lh67ZYgvCFF KPl1LG22quob+5kQbAYZWSFx0qW1U0ekxojss+vd7u79hZT8LOwLiZHA2AeYMW8SsdXym4 3y8xsWKgDvwvRcLJPkPmGkIQORQZxOq85RnHEiaWqqafs8hMRIdDQ48td9hfRqZTaaNc/j JOLqHUwVpeoB6XIgwLzuhUl+LdZKPMVx38hJt1hwZp1zl1kQTlTd8Y5LQz/ScQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8dDD4bzSzd4d; Sun, 30 Apr 2023 20:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UKQqF6009094; Sun, 30 Apr 2023 20:26:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UKQqwD009093; Sun, 30 Apr 2023 20:26:52 GMT (envelope-from git) Date: Sun, 30 Apr 2023 20:26:52 GMT Message-Id: <202304302026.33UKQqwD009093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 4824d7887259 - main - listen(2): improve administrator control over logging List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4824d788725987bccff53dec8c103cbac455b3ed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=4824d788725987bccff53dec8c103cbac455b3ed commit 4824d788725987bccff53dec8c103cbac455b3ed Author: Eugene Grosbein AuthorDate: 2023-04-30 20:14:30 +0000 Commit: Eugene Grosbein CommitDate: 2023-04-30 20:26:44 +0000 listen(2): improve administrator control over logging As documented in listen.2 manual page, the kernel emits a LOG_DEBUG syslog message if a socket listen queue overflows. For some appliances, it may be desirable to change the priority to some higher value like LOG_INFO while keeping other debugging suppressed. OTOH there are cases when such overflows are normal and expected. Then it may be desirable to suppress overflow logging altogether, so that dmesg buffer is not flooded over long run. In addition to existing sysctl kern.ipc.sooverinterval, introduce new sysctl kern.ipc.sooverprio that defaults to 7 (LOG_DEBUG) to preserve current behavior. It may be changed to any value in a range of 0..7 for corresponding priority or to -1 to suppress logging. Document it in the listen.2 manual page. MFC after: 1 month --- lib/libc/sys/listen.2 | 15 +++++++++++++-- sys/kern/uipc_socket.c | 13 ++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2 index 4d0962fd412c..076163548b72 100644 --- a/lib/libc/sys/listen.2 +++ b/lib/libc/sys/listen.2 @@ -28,7 +28,7 @@ .\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd April 14, 2020 +.Dd April 30, 2023 .Dt LISTEN 2 .Os .Sh NAME @@ -111,10 +111,20 @@ or less than zero is specified, is silently forced to .Va kern.ipc.soacceptqueue . .Pp -If the listen queue overflows, the kernel will emit a LOG_DEBUG syslog message. +If the listen queue overflows, the kernel will emit a syslog message +using default priority LOG_DEBUG (7). The .Xr sysctl 3 MIB variable +.Va kern.ipc.sooverprio +may be used to change this priority to any value in a range of 0..7 +(LOG_EMERG..LOG_DEBUG). +See +.Xr syslog 3 +for details. +It may be set to -1 to disable these messages. +.Pp +The variable .Va kern.ipc.sooverinterval specifies a per-socket limit on how often the kernel will emit these messages. .Sh INTERACTION WITH ACCEPT FILTERS @@ -164,6 +174,7 @@ The socket is not of a type that supports the operation .Xr connect 2 , .Xr socket 2 , .Xr sysctl 3 , +.Xr syslog 3 , .Xr sysctl 8 , .Xr accept_filter 9 .Sh HISTORY diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index f529f885d17c..eaff57d50d78 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -578,6 +578,10 @@ SYSCTL_INT(_regression, OID_AUTO, sonewconn_earlytest, CTLFLAG_RW, ®ression_sonewconn_earlytest, 0, "Perform early sonewconn limit test"); #endif +static int sooverprio = LOG_DEBUG; +SYSCTL_INT(_kern_ipc, OID_AUTO, sooverprio, CTLFLAG_RW, + &sooverprio, 0, "Log priority for listen socket overflows: 0..7 or -1 to disable"); + static struct timeval overinterval = { 60, 0 }; SYSCTL_TIMEVAL_SEC(_kern_ipc, OID_AUTO, sooverinterval, CTLFLAG_RW, &overinterval, @@ -617,7 +621,8 @@ solisten_clone(struct socket *head) if (over) { #endif head->sol_overcount++; - dolog = !!ratecheck(&head->sol_lastover, &overinterval); + dolog = (sooverprio >= 0) && + !!ratecheck(&head->sol_lastover, &overinterval); /* * If we're going to log, copy the overflow count and queue @@ -706,14 +711,16 @@ solisten_clone(struct socket *head) * sys/kern/sonewconn_overflow checks for it. */ if (head->so_cred == 0) { - log(LOG_DEBUG, "sonewconn: pcb %p (%s): " + log(LOG_PRI(sooverprio), + "sonewconn: pcb %p (%s): " "Listen queue overflow: %i already in " "queue awaiting acceptance (%d " "occurrences)\n", head->so_pcb, sbuf_data(&descrsb), qlen, overcount); } else { - log(LOG_DEBUG, "sonewconn: pcb %p (%s): " + log(LOG_PRI(sooverprio), + "sonewconn: pcb %p (%s): " "Listen queue overflow: " "%i already in queue awaiting acceptance " "(%d occurrences), euid %d, rgid %d, jail %s\n", From nobody Mon May 1 04:01:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8qKL2XVSz47k6N; Mon, 1 May 2023 04:01:58 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8qKK21y8z3RBy; Mon, 1 May 2023 04:01:57 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of byond.lenox@gmail.com designates 209.85.219.42 as permitted sender) smtp.mailfrom=byond.lenox@gmail.com; dmarc=none Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-61af33bdf1dso3103426d6.2; Sun, 30 Apr 2023 21:01:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682913715; x=1685505715; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SEtNwz/dw/MqjA1dPhaef+AK/Kg+mhLEjFM5l9cXumo=; b=A1BDoib4z1WMSaC8Q35aOxBtLHRLjC7AulCv8G7+GQdWlmCzEKCq99HMyD7wLWxUAc Czd+oMiypkKo6gEhGkKym7lxYIUw4fSvj3pQtz2L6Ii+ij/cA2SugLoyeFxUX554e8mn ZK2Ap4Cx1ZyBzALMih19H97PqOYebJeXHly+V65sZPYwG55Ycan9owFYc7XzDUwF5X1S h+nJCLLG6dssscURNobE9ZAHOis09p7hMbhHx31jFchpUKwSD4Fn5QU/CavVJkFTv87A /veoJkyNIYSLiA7rwTaVmIvvGw/P3ySSH4SKMqhhoeU2QAQyUPa+4d6/y0K7FUrs3thH N29A== X-Gm-Message-State: AC+VfDwkMsgIlD4UAq2z9StnXHX/DWCo/dTTvStCIo2JL89XQJ++am9A xvHfPB2SsfdL4QGaQg3fnN77YNYrJmc= X-Google-Smtp-Source: ACHHUZ7tFMGp4achLCstx3m4POK7XNKM5blXw2I3bnbDC9ivFqWeuH0cc9yaLVv/TsO/Mztf4NTxzQ== X-Received: by 2002:a05:6214:d4e:b0:5bf:ba9d:8726 with SMTP id 14-20020a0562140d4e00b005bfba9d8726mr22047094qvr.10.1682913715524; Sun, 30 Apr 2023 21:01:55 -0700 (PDT) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com. [209.85.219.49]) by smtp.gmail.com with ESMTPSA id b5-20020a0cf045000000b0061b5d3a61aesm16684qvl.9.2023.04.30.21.01.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Apr 2023 21:01:55 -0700 (PDT) Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-61af33bdf1dso3103396d6.2; Sun, 30 Apr 2023 21:01:55 -0700 (PDT) X-Received: by 2002:a05:6214:248f:b0:61a:5664:f8e9 with SMTP id gi15-20020a056214248f00b0061a5664f8e9mr5094664qvb.51.1682913714963; Sun, 30 Apr 2023 21:01:54 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202101100241.10A2fvtm057663@gitrepo.freebsd.org> In-Reply-To: <202101100241.10A2fvtm057663@gitrepo.freebsd.org> From: Kyle Evans Date: Sun, 30 Apr 2023 23:01:44 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 5844bd058aed - main - jobc: rework detection of orphaned groups. To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.77 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.94)[-0.941]; NEURAL_HAM_MEDIUM(-0.82)[-0.824]; FORGED_SENDER(0.30)[self@kyle-evans.net,byondlenox@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.42:from,209.85.219.49:received]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.42:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; R_DKIM_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; FROM_NEQ_ENVFROM(0.00)[self@kyle-evans.net,byondlenox@gmail.com]; DMARC_NA(0.00)[kyle-evans.net]; RCPT_COUNT_THREE(0.00)[4]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4Q8qKK21y8z3RBy X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Sat, Jan 9, 2021 at 8:43=E2=80=AFPM Konstantin Belousov wrote: > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D5844bd058aed6f3d0c8cbbddd6= aa95993ece0189 > > commit 5844bd058aed6f3d0c8cbbddd6aa95993ece0189 > Author: Konstantin Belousov > AuthorDate: 2020-12-29 00:41:56 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-01-10 02:41:20 +0000 > > jobc: rework detection of orphaned groups. > > Instead of trying to maintain pg_jobc counter on each process group > update (and sometimes before), just calculate the counter when needed= . > Still, for the benefit of the signal delivery code, explicitly mark > orphaned groups as such with the new process group flag. > > This way we prevent bugs in the corner cases where updates to the cou= nter > were missed due to complicated configuration of p_pptr/p_opptr/real_p= arent > (debugger). > > Since we need to iterate over all children of the process on exit, th= is > change mostly affects the process group entry and leave, where we nee= d > to iterate all process group members to detect orpaned status. > Hi, I have a question about the locking here... > [... snip ...] > @@ -678,43 +677,40 @@ jobc_reaper(struct proc *p) > } > > static struct proc * > -jobc_parent(struct proc *p) > +jobc_parent(struct proc *p, struct proc *p_exiting) > { > struct proc *pp; > > - sx_assert(&proctree_lock, SX_LOCKED); > + sx_assert(&proctree_lock, SA_LOCKED); > > pp =3D proc_realparent(p); > - if (pp->p_pptr =3D=3D NULL || > + if (pp->p_pptr =3D=3D NULL || pp =3D=3D p_exiting || > (pp->p_treeflag & P_TREE_GRPEXITED) =3D=3D 0) > return (pp); > return (jobc_reaper(pp)); > } > > -#ifdef INVARIANTS > -static void > -check_pgrp_jobc(struct pgrp *pgrp) > +static int > +pgrp_calc_jobc(struct pgrp *pgrp) > { > struct proc *q; > int cnt; > > - sx_assert(&proctree_lock, SX_LOCKED); > - PGRP_LOCK_ASSERT(pgrp, MA_NOTOWNED); > +#ifdef INVARIANTS > + if (!mtx_owned(&pgrp->pg_mtx)) > + sx_assert(&proctree_lock, SA_LOCKED); > +#endif > > cnt =3D 0; > - PGRP_LOCK(pgrp); > LIST_FOREACH(q, &pgrp->pg_members, p_pglist) { > if ((q->p_treeflag & P_TREE_GRPEXITED) !=3D 0 || > q->p_pptr =3D=3D NULL) > continue; > - if (isjobproc(jobc_parent(q), pgrp)) > + if (isjobproc(jobc_parent(q, NULL), pgrp)) > cnt++; > } > - KASSERT(pgrp->pg_jobc =3D=3D cnt, ("pgrp %d %p pg_jobc %d cnt %d"= , > - pgrp->pg_id, pgrp, pgrp->pg_jobc, cnt)); > - PGRP_UNLOCK(pgrp); > + return (cnt); > } > -#endif > > /* > * Move p to a process group > [... snip ...] So the proctree lock is sufficient for pgrp_calc_jobc() to provide a stable answer needed for everything fixjobc_kill() uses it for... > @@ -934,35 +827,46 @@ fixjobc_kill(struct proc *p) > p->p_treeflag |=3D P_TREE_GRPEXITED; > > /* > - * Check p's parent to see whether p qualifies its own process > - * group; if so, adjust count for p's process group. > + * Check if exiting p orphans its own group. > */ > - if (isjobproc(jobc_parent(p), pgrp)) > - pgadjustjobc(pgrp, false); > + pgrp =3D p->p_pgrp; > + if (isjobproc(jobc_parent(p, NULL), pgrp)) { > + PGRP_LOCK(pgrp); > + if (pgrp_calc_jobc(pgrp) =3D=3D 0) > + orphanpg(pgrp); > + PGRP_UNLOCK(pgrp); > + } > > /* > * Check this process' children to see whether they qualify > - * their process groups after reparenting to reaper. If so, > - * adjust counts for children's process groups. > + * their process groups after reparenting to reaper. > */ > LIST_FOREACH(q, &p->p_children, p_sibling) { > - if ((q->p_treeflag & P_TREE_ORPHANED) !=3D 0) > - continue; > - fixjobc_kill_q(p, q, true); > + pgrp =3D q->p_pgrp; > + PGRP_LOCK(pgrp); > + if (pgrp_calc_jobc(pgrp) =3D=3D 0) { > + /* > + * We want to handle exactly the children that > + * has p as realparent. Then, when calculating > + * jobc_parent for children, we should ignore > + * P_TREE_GRPEXITED flag already set on p. > + */ > + if (jobc_parent(q, p) =3D=3D p && isjobproc(p, pg= rp)) > + orphanpg(pgrp); > + } else > + pgrp->pg_flags &=3D ~PGRP_ORPHANED; > + PGRP_UNLOCK(pgrp); > } > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > - fixjobc_kill_q(p, q, true); > - LIST_FOREACH(q, &p->p_children, p_sibling) { > - if ((q->p_treeflag & P_TREE_ORPHANED) !=3D 0) > - continue; > - fixjobc_kill_q(p, q, false); > + LIST_FOREACH(q, &p->p_orphans, p_orphan) { > + pgrp =3D q->p_pgrp; > + PGRP_LOCK(pgrp); > + if (pgrp_calc_jobc(pgrp) =3D=3D 0) { > + if (isjobproc(p, pgrp)) > + orphanpg(pgrp); > + } else > + pgrp->pg_flags &=3D ~PGRP_ORPHANED; > + PGRP_UNLOCK(pgrp); > } > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > - fixjobc_kill_q(p, q, false); > - > -#ifdef INVARIANTS > - check_pgrp_jobc(pgrp); > -#endif > } > > void ... and I would imagine the proctree lock is sufficient for isjobproc/jobc_parent as well- is there any reason we can't/shouldn't just use atomic(9) for operations with pgrp->pg_flags and push all of the extra lock acquisitions into the orphanpg() cases? It seems like we could avoid taking any pgrp lock in the common case and at least mitigate that additional overhead from the exit() path. Thanks, Kyle Evans From nobody Mon May 1 06:32:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8tg412f4z47t6J; Mon, 1 May 2023 06:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8tg40bW6z3spf; Mon, 1 May 2023 06:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CopiNaixuDUM/7jPC8YFQFmSTxTAlEa/FQtC3RsnDZM=; b=ZRQphPXzicSzhb4hpWBcQYUrcb51O2SUXJM3WmOuyES0jdgkEhoJPP9Dzwq+WPD8aIKlqM 9GhSDq6tzpMXI8xPlGnEp2pxfFHQvB1efxG/0n+XZ6Vobqg7CFmVQyIxXPFPbItXqO7YoZ zYXtEIZ0/ivgirqgEO8DvwyRZKgjaXEF5deT4HS/kBT4NeaNoZ3xpEs8panovqIajM8WpS u0bLiGjIKeGwkA9LLdm8yV69Bq1y5IgBDgUT1WE+6xR6/m0CNyfbH44MFYVgPtSuqvNqVs Je6OHNdvv9oCCnSzYe9EE0n2F6goV9Dw/rz0XB1B7UfV1VdftprTYqrirDFsbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CopiNaixuDUM/7jPC8YFQFmSTxTAlEa/FQtC3RsnDZM=; b=edTrtgsG8vDVJ8sPJQGovkIhqwdD1Nrpxb4YbtuvmGrKl8QYFTaJw+itwhj/xyUom6lfqF mJ1wQn7V83wmls3fEzjxnpK+bqHMCste03nk7EjMu2FHEUJP7rYUDSXbjwP4fcjJ4V+1E6 1ni4+IdDUlEeDSJnfOZNYyYp+ybLds2Q5dc5I0zjrfxGBgdCxMER5kRp8nhbn0Bm0GEQMI 55VKJr/VzBgnPFCrB+S9lCLJgDRlAq83+TFDkd7ajObwYhg3YzUdNLrMxJ9QdvnDzLhgLy ByEzuiQ3AeaveRhQdQE70vIhjY6rxvpfjRHhrSn0GxczLTaWe88PMfm+Gd7Dmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682922752; a=rsa-sha256; cv=none; b=JXwPobfBdkhNehkrcaX41kqm2YdqZYkxw+auNs23RR7ENBxDnKcm4auhTJGccB5SV0+r1e jaQQ7E35UeYegOJdHdzbkTivBIBPMtoadlA4XYGEJThC8xHfrm2YGF/tXEvvKfrxa1FXio Au5MyfSBd+bTDSQpPfmV0Wr9iofMhAqMOM+T4LUiutr7FE9WEKA3PIdPzNLhVvtDZ2hprV G0XYNw80uCQ6yM256XqYcfEci63TC/E/yX2up9F/l+KPEktH/wwwmOgVLhos5ma/bZSK1l fY/rjLgrH33u0dR90YdNpXSod5Ua0OtYmTJv/jadh4jvw21gDYbfwkgaVvn6eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8tg36m0xzvq3; Mon, 1 May 2023 06:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416WVGj012729; Mon, 1 May 2023 06:32:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416WV6r012728; Mon, 1 May 2023 06:32:31 GMT (envelope-from git) Date: Mon, 1 May 2023 06:32:31 GMT Message-Id: <202305010632.3416WV6r012728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 3416e102c4e9 - main - arm: Remove TI code from GENERIC List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3416e102c4e978a394a604012dae1943c7300a1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3416e102c4e978a394a604012dae1943c7300a1e commit 3416e102c4e978a394a604012dae1943c7300a1e Author: Emmanuel Vadot AuthorDate: 2023-04-27 06:19:07 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-01 06:32:21 +0000 arm: Remove TI code from GENERIC TI support is in a sad state for years. We haven't been able to keep up with all the breaking changes that upstream do in the DTS. This requires a lot of new drivers to handle the new buses that they create and all the new clocks that they expose. Keep the code for now in case somebody is interested in reviving this platform but stop bloating GENERIC with code that don't work. Reviewed by: imp, mmel MFC after: never Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39843 --- sys/arm/conf/GENERIC | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 815fd2a1881e..fc4ce2ef146a 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -43,9 +43,6 @@ files "../mv/files.arm7" files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" files "../rockchip/files.rk32xx" -files "../ti/files.ti" -files "../ti/am335x/files.am335x" -files "../ti/omap4/files.omap4" files "../xilinx/files.zynq7" options SOC_ALLWINNER_A10 @@ -140,12 +137,6 @@ device bcm2835_bsc device fsliic # Freescale i2c/iic device icee # AT24Cxxx and compatible EEPROMs device sy8106a # SY8106A Buck Regulator -device ti_i2c -device am335x_pmic # AM335x Power Management IC (TPC65217) -device am335x_rtc # RTC support (power management only) -device twl # TI TWLX0X0/TPS659x0 Power Management -device twl_vreg # twl voltage regulation -device twl_clks # twl external clocks # i2c RTCs device ds1307 # Dallas DS1307 RTC and compatible @@ -173,12 +164,8 @@ device spibus device spigen device bcm2835_spi device mv_spi -device ti_spi device zy7_qspi # Xilinx Zynq QSPI controller -# ADC support -device ti_adc - # PWM device pwm @@ -186,7 +173,6 @@ device pwm # If we don't enable the watchdog driver, the BeagleBone could potentially # reboot automatically because the boot loader might have enabled the # watchdog. -device ti_wdt device imxwdt # Watchdog. WARNING: can't be disabled!!! device aw_wdog # Allwinner Watchdog @@ -229,7 +215,6 @@ device miibus device awg # 10/100/1000 integrated EMAC controller device cgem # Cadence GEM Gigabit Ethernet device -device cpsw # TI Common Platform Ethernet Switch (CPSW) device dwc # 10/100/1000 integrated GMAC controller device emac # 10/100 integrated EMAC controller device ffec # Freescale Fast Ethernet Controller @@ -251,21 +236,11 @@ device dwc_hdmi device imx6_hdmi device imx6_ipu -# TDA19988 HDMI Encoder -device tda19988 - # Pinmux device fdt_pinctrl -# TI Programmable Realtime Unit support -device ti_pruss - -# Mailbox support -device ti_mbox - # DMA controller device fslsdma -device ti_sdma device a10_dmac device a31_dmac @@ -303,6 +278,4 @@ makeoptions MODULES_EXTRA+="dtb/zynq" # SOC-specific modules makeoptions MODULES_EXTRA+="allwinner" -makeoptions MODULES_EXTRA+="arm_ti" makeoptions MODULES_EXTRA+="imx" - From nobody Mon May 1 06:32:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8tg55BPvz47t6N; Mon, 1 May 2023 06:32: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 4Q8tg51Wpxz3skY; Mon, 1 May 2023 06:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bifXbOxRfh+OlX43MGbPoGE1N3V/nkH7b+4TLsC5JA0=; b=nXMtECCuWWp3OwzUIMkT6p+OcyLoDQtKmPl5Rxl8hNtQq9B5Fk/Cm7p/qdKuT/dclJwNZZ sh7R+GeNf/jYQnsDTtgAM4mrCbr52vCXracTBbO2bDG87TdktWtB6OBZ/U9lyC/EwdvC0q mYKtpoj0AGGpA6j5UyB1VGIsHLlb2+lIm3V38DjNJViRWtrysbs384Pl5fPk5bZnaUldgN NTFjNHEjgOk2RtZ6h4TpbTTZR54v6xc1bQ0YjqUzZ3Z4q75pc3QVzzbf6draUJQ66ejCw7 8lQ3EpKio8WpmiP05QcVVkMl6ZgcD+dIM6ok8srNupYw26BhQo8vLTtMH3gqqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bifXbOxRfh+OlX43MGbPoGE1N3V/nkH7b+4TLsC5JA0=; b=p57txRSbjrexRxhB5FQujIJv+rm12QZTNKJvyjA+YbmucmjcXW4QHvZ8mF98ThmoSXAH6U SrAexNCSRQImSh5xFeK+YUJrTJOg8NlSuarMqQWKA0c3JZdrsD2xV90mbcYO1aiO5CnlVF 0MRjJmU1onCkVTkEflBLUcXbS0Ooqwow9eMDAGqEAGgNkUekYm7GZ4TVT6hncACoRF4BoK yPpqCOHlqa9t7hEYEY/fE2QXqKY6YkvYwsYE2g2dLcL1sm9iT28oceHI8B0IbLZEt1Qs6+ by36F+VxZfR3aSMJ9P36DWJnzlml9CyICBY8CEWs5mfL2rlLydwniE6Nv4Hy0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682922753; a=rsa-sha256; cv=none; b=LevqeNkilyuSXeD3/7AT9T68DduXxrO2+b/HiwmiOzUkhsMovJnRateoHChxB6i5yGIPps KbIsWs4zCMd2am88jbPxb/BlPKXorkkXaceGjF6kce2Y16xaeXkgpUXrB6Vos2Ca+J6MK6 Ad727Il+TgN2Jw+X8EgDKSUXxJSLvg7NNhPiQxOlj+32YnAsXKIsnu5pXBw6mUAlfDNpsw QZVGjzHAARuyoHB2n5T7BySihzNyugr5L+8Vtm13iOYJmlSRHLk0KvV9G8BzWPRAxrzdQq T29VzWOaGkr5MhnSWVScgegA4IiMwNNj3RsRhD13+aAHUgpYjr1OQFpaxHuIjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8tg50Lnhzw1y; Mon, 1 May 2023 06:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416WWpJ012761; Mon, 1 May 2023 06:32:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416WWxK012760; Mon, 1 May 2023 06:32:32 GMT (envelope-from git) Date: Mon, 1 May 2023 06:32:32 GMT Message-Id: <202305010632.3416WWxK012760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: ea9075959bf3 - main - armv7: release: Stop installing BBB u-boot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea9075959bf3a6e98d9638467500a690267f3947 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ea9075959bf3a6e98d9638467500a690267f3947 commit ea9075959bf3a6e98d9638467500a690267f3947 Author: Emmanuel Vadot AuthorDate: 2023-04-27 06:21:47 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-01 06:32:21 +0000 armv7: release: Stop installing BBB u-boot BBB code was removed from GENERIC kernel as it's not functional. Stop installing u-boot for a platform that we don't boot on. Reviewed by: imp, gjb Approved by: re@ (gjb) MFC after: never Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39844 --- release/arm/GENERICSD.conf | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/release/arm/GENERICSD.conf b/release/arm/GENERICSD.conf index 32b780d04385..2a0672db9bbd 100644 --- a/release/arm/GENERICSD.conf +++ b/release/arm/GENERICSD.conf @@ -6,13 +6,12 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 -EMBEDDEDPORTS="sysutils/u-boot-beaglebone sysutils/u-boot-rpi2 sysutils/rpi-firmware" +EMBEDDEDPORTS="sysutils/u-boot-rpi2 sysutils/rpi-firmware" FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="5120M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -BBB_UBOOT_DIR="/usr/local/share/u-boot/u-boot-beaglebone" RPI_UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" RPI_OL_DIR="${RPI_FIRMWARE_DIR}/overlays" @@ -49,20 +48,6 @@ arm_install_uboot_rpi2() { return 0 } -arm_install_uboot_bbb() { - FATMOUNT="${DESTDIR%${KERNEL}}/fat" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} cp -p ${BBB_UBOOT_DIR}/MLO ${FATMOUNT}/MLO - chroot ${CHROOTDIR} cp -p ${BBB_UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img - sync - umount_loop ${CHROOTDIR}/${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${FATMOUNT} - - return 0 -} - arm_install_uboot() { - arm_install_uboot_bbb arm_install_uboot_rpi2 } From nobody Mon May 1 06:33:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8th74S3kz47t6Y; Mon, 1 May 2023 06:33: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 4Q8th7437qz3tYr; Mon, 1 May 2023 06:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fq4Tcesdcj4Vp+jEwmY92OBq9sGlVSbpjkEhfLQemIA=; b=Wdgg0qMPvW2kPqVuxyEEOvBBtMBeGN8MoYtPuMnpwo1oTtF1oIWWtdHn5S0HcrIllJrKpV umeX7ZU0oAA+nK3FErI+oFdzKJVf78VL9s7/a4h5e7yheUSjc05YF5Az2gbFMiYG+V3qE7 a+DVtR83b1u5vADC272TuLXI4cVXJONHR8H3gSsUJG4GnMN4ZHG6ydbOcIsAdgcO8QBwz8 5Iwi15NYs3ig82GI9OC8DfWZc6glJy619JvYfziOemRkS2KBbEcUEOBj4CjnA4fg0JjU5J +WiR1PlYybpUYN0/0Vh/CLdR7JoCDTKSPRMHQSji13y8QFiGr6zMeIBaRdvElA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fq4Tcesdcj4Vp+jEwmY92OBq9sGlVSbpjkEhfLQemIA=; b=PbbnWn3SBF59x2+MBRa6bZdzU5txOTzBLKe3RNcV3Gu2wjU/NBWhgY9bSsErj1T5Ku+rYG VQUcenbOXuenXpvkgVSL0Qbu+KyZfRD0hNu4DaQmF9MCNWvW1S/7+jGyAHSgwnXf84s3uk CUsBdw9fnJ5dNqtqwCb4rfepPEpKxfm+Vl1vmnKoXPtGFk14Y2J0f77HzSY21t+oOxl/vt NI4OWZlRiINp8axXU4WrNhjAuJFT1jxB1SckpW+AfgIBTZt6GShaVm5XJLTndB5MWzqM4L 3HBD6DAs8iWzdEjyw+aSANuZUXWMpKTLFh2oHJTj1fyljoiWRpQrMmuuD38o8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682922807; a=rsa-sha256; cv=none; b=DwoZdbz8M+wOlZTLmpJtGzMS6TDr91413yfpsFPn1SdTFqeO4cygNnJ+LiKZfXCFT8FI5l l6dF1DhOa7OGf9EGOm7WOVCAhwXYNCA/FvB15NssDp8/s5RfuIltmgDdhHI8JkN4cHpTCC 5gMlGLGrJbBGvdEgJWCloOVnsZCQdC6w+icCe02WZnw+SjKXdk6c7l8K9nZaev+NzHjZJX sMbcDwOepAVj8I9aKahKr5xeD685Tjv04n5G3jJcaljOYtkKCMO1NvNAIsl74rc0xCO0j7 x6UAlVCr9Rqs/x2HU5RpKk6nfhrYg7ZWdPanWmhD5DYHLpgtYvi0jCeMfBP2HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8th735pwzvn3; Mon, 1 May 2023 06:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416XReB013078; Mon, 1 May 2023 06:33:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416XRFq013077; Mon, 1 May 2023 06:33:27 GMT (envelope-from git) Date: Mon, 1 May 2023 06:33:27 GMT Message-Id: <202305010633.3416XRFq013077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: d198b8774d2c - main - fwget: Introduce new utility List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d198b8774d2cfb6f140893e1c6236af9e97d1497 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d198b8774d2cfb6f140893e1c6236af9e97d1497 commit d198b8774d2cfb6f140893e1c6236af9e97d1497 Author: Emmanuel Vadot AuthorDate: 2023-04-26 05:46:20 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-01 06:32:59 +0000 fwget: Introduce new utility This script's goal is to check the system for peripherals that needs firmware and install the needed packages for them. For now it only support pci subsystem and only video classes for AMD and Intel GPUs. Reviewed by: bapt Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39825 --- etc/mtree/BSD.usr.dist | 2 + release/packages/Makefile.package | 2 + usr.sbin/Makefile | 1 + usr.sbin/fwget/Makefile | 7 ++ usr.sbin/fwget/fwget.8 | 64 +++++++++++++++++ usr.sbin/fwget/fwget.sh | 110 +++++++++++++++++++++++++++++ usr.sbin/fwget/pci/Makefile | 11 +++ usr.sbin/fwget/pci/pci | 84 ++++++++++++++++++++++ usr.sbin/fwget/pci/pci_video_amd | 139 +++++++++++++++++++++++++++++++++++++ usr.sbin/fwget/pci/pci_video_intel | 78 +++++++++++++++++++++ 10 files changed, 498 insertions(+) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 2e7c999124fd..9a6ede64fa73 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -152,6 +152,8 @@ .. dwatch .. + fwget + .. hyperv .. lpr diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 47e0ee1c224b..9bd2994c882a 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -64,6 +64,8 @@ ftp_COMMENT= FTP Utilities ftp_DESC= FTP Utilities ftpd_COMMENT= FTP Daemon ftpd_DESC= FTP Daemon +fwget_COMMENT= FWGET Utility +fwget_DESC= FWGET Utility games_COMMENT= Games games_DESC= Games gdb_COMMENT= GDB Utilities diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index fb707e515eaa..76e3a29bbfc9 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -28,6 +28,7 @@ SUBDIR= adduser \ fifolog \ fstyp \ fwcontrol \ + fwget \ getfmac \ getpmac \ gstat \ diff --git a/usr.sbin/fwget/Makefile b/usr.sbin/fwget/Makefile new file mode 100644 index 000000000000..1cdf0f18230d --- /dev/null +++ b/usr.sbin/fwget/Makefile @@ -0,0 +1,7 @@ +PACKAGE= fwget + +SCRIPTS= fwget +MAN= fwget.8 +SUBDIR= pci + +.include diff --git a/usr.sbin/fwget/fwget.8 b/usr.sbin/fwget/fwget.8 new file mode 100644 index 000000000000..71cee817b7e6 --- /dev/null +++ b/usr.sbin/fwget/fwget.8 @@ -0,0 +1,64 @@ +.\" Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd Apr 26, 2023 +.Dt FWGET 8 +.Os +.Sh NAME +.Nm fwget +.Nd Install firmwares for the running system +.Sh SYNOPSIS +.Nm +.Op Fl v +.Op Fl n +.Ar subsystem +.Sh DESCRIPTION +The +.Nm +utility can be used to install firmwares packaged needed for the running +system +.Pp +If not specified the +.Ar subsystem +argument will default to pci cards. +.Pp +The options are as follows: +.Bl -tag -width +.It Fl n +Dry run, only show needed packages +.It Fl v +Be more verbose +.El +.Sh SEE ALSO +.Xr firmware 9 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 14.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +utility and this manual page were written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org +for Beckhoff Automation GmbH & Co. KG . diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh new file mode 100644 index 000000000000..cd5ee7a7048c --- /dev/null +++ b/usr.sbin/fwget/fwget.sh @@ -0,0 +1,110 @@ +#!/bin/sh + +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +: ${LIBEXEC_PATH:="/usr/libexec/fwget"} + +usage() +{ + cat <&1 4>&2 +} + +log() +{ + echo $@ 1>&3 +} + +log_verbose() +{ + if [ "${VERBOSE}" = "n" ]; then + return + fi + + echo $@ 1>&3 +} + +DRY_RUN=n +VERBOSE=n + +log_start + +while [ $# -gt 0 ]; do + case $1 in + -n) + DRY_RUN=y + ;; + -v) + VERBOSE=y + ;; + *) + subsystems="${subsystems} $1" + ;; + esac + shift +done + +# Default searching PCI subsystem +if [ -z "${subsystems}" ]; then + subsystems="pci" +fi + +# Fail early on unsupported subsystem +for subsystem in ${subsystems}; do + if [ ! -f ${LIBEXEC_PATH}/${subsystem} ]; then + usage + fi + . ${LIBEXEC_PATH}/${subsystem} +done + +packages="" +for subsystem in ${subsystems}; do + package=$(${subsystem}_search_packages) + + packages="${packages} ${package}" +done + +echo "Needed packages: ${packages}" +if [ "${DRY_RUN}" = "y" ]; then + exit 0 +fi + +pkg install -q ${package} diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile new file mode 100644 index 000000000000..5cf3b0cd2ed9 --- /dev/null +++ b/usr.sbin/fwget/pci/Makefile @@ -0,0 +1,11 @@ +PACKAGE= fwget + +SCRIPTS=pci \ + pci_video_amd \ + pci_video_intel + +BINDIR= ${LIBEXECDIR}/fwget + +MAN= + +.include diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci new file mode 100644 index 000000000000..f97cb97d16fe --- /dev/null +++ b/usr.sbin/fwget/pci/pci @@ -0,0 +1,84 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +pci_get_class() +{ + local hexclass=$(echo $1 | sed 's/.*class=\(0x[0-9a-z]*\).*/\1/') + case "${hexclass}" in + 0x030000) + echo "video" + ;; + esac +} + +pci_get_vendor() +{ + local hexvendor=$(echo $1 | sed 's/.*\ vendor=\(0x[0-9a-z]*\).*/\1/') + + case "${hexvendor}" in + 0x8086) + echo "intel" + ;; + 0x1002) + echo "amd" + ;; + esac +} + +pci_get_device() +{ + local hexdevice=$(echo $1 | sed 's/.*\ device=\(0x[0-9a-z]*\).*/\1/') + + echo ${hexdevice} +} + +pci_search_packages() +{ + local IFS + + oldifs=$IFS + IFS=$'\n' + for fulldevice in $(pciconf -l); do + class=$(pci_get_class "${fulldevice}") + if [ -z "${class}" ]; then + continue + fi + vendor=$(pci_get_vendor "${fulldevice}") + if [ -z "${vendor}" ]; then + continue + fi + device=$(pci_get_device "${fulldevice}") + + log_verbose "Trying to match device ${device} in class ${class} and vendor ${vendor} with pci_${class}_${vendor}" 1>&3 + if [ ! -f ${LIBEXEC_PATH}/pci_${class}_${vendor} ]; then + continue + fi + . ${LIBEXEC_PATH}/pci_${class}_${vendor} + + pci_${class}_${vendor} ${device} + done + IFS=${oldifs} +} diff --git a/usr.sbin/fwget/pci/pci_video_amd b/usr.sbin/fwget/pci/pci_video_amd new file mode 100644 index 000000000000..79f79d4958db --- /dev/null +++ b/usr.sbin/fwget/pci/pci_video_amd @@ -0,0 +1,139 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +pci_video_amd() +{ + case "$1" in + 0x678*|0x679*) + echo "gpu-firmware-amd-kmod-tahiti" + ;; + 0x680*|0x681*) + echo "gpu-firmware-amd-kmod-pitcairn" + ;; + 0x660*|0x661*|0x662*|0x663*) + echo "gpu-firmware-amd-kmod-oland" + ;; + 0x682*|0x683*) + echo "gpu-firmware-amd-kmod-verde gpu-firmware-amd-kmod-si58" + ;; + 0x666*) + echo "gpu-firmware-amd-kmod-hainan" + ;; + 0x13*) + echo "gpu-firmware-amd-kmod-kaveri" + ;; + 0x664*|0x664*) + echo "gpu-firmware-amd-kmod-bonaire" + ;; + 0x67a*|0x67b*) + echo "gpu-firmware-amd-kmod-hawaii" + ;; + 0x983*) + echo "gpu-firmware-amd-kmod-kabini" + ;; + 0x985*) + echo "gpu-firmware-amd-kmod-mullins" + ;; + 0x690*) + echo "gpu-firmware-amd-kmod-topaz" + ;; + 0x692*|0x693*) + echo "gpu-firmware-amd-kmod-tonga" + ;; + 0x730*) + echo "gpu-firmware-amd-kmod-fiji" + ;; + 0x987*) + echo "gpu-firmware-amd-kmod-carrizo" + ;; + 0x98e4*) + echo "gpu-firmware-amd-kmod-stoney" + ;; + 0x67e*|0x67ff) + echo "gpu-firmware-amd-kmod-polaris11" + ;; + 0x67c*|0x67d*|0x6fdf) + echo "gpu-firmware-amd-kmod-polaris10" + ;; + 0x698*|0x699*) + echo "gpu-firmware-amd-kmod-polaris12" + ;; + 0x694*) + echo "gpu-firmware-amd-kmod-vegam" + ;; + 0x686*|0x687*) + echo "gpu-firmware-amd-kmod-vega10" + ;; + 0x69a*) + echo "gpu-firmware-amd-kmod-vega12" + ;; + 0x66a*) + echo "gpu-firmware-amd-kmod-vega20" + ;; + 0x15d*) + echo "gpu-firmware-amd-kmod-raven" + ;; + 0x738*|0x739*) + echo "gpu-firmware-amd-kmod-arcturus" + ;; + 0x731*) + echo "gpu-firmware-amd-kmod-navi10" + ;; + 0x734*) + echo "gpu-firmware-amd-kmod-navi14" + ;; + 0x15e7|0x1636|0x1638|0x164c) + echo "gpu-firmware-amd-kmod-renoir" + ;; + 0x736*) + echo "gpu-firmware-amd-kmod-navi12" + ;; + 0x73a*|0x73b*) + echo "gpu-firmware-amd-kmod-sienna-cichlid" + ;; + 0x163f) + echo "gpu-firmware-amd-kmod-vangogh" + ;; + 0x164d|0x1681) + echo "gpu-firmware-amd-kmod-yellow-carp" + ;; + 0x73c*|0x73d*) + echo "gpu-firmware-amd-kmod-navy-flounder" + ;; + 0x73e*|0x73f*) + echo "gpu-firmware-amd-kmod-dimgrey-cavefish" + ;; + 0x740*|0x741*) + echo "gpu-firmware-amd-kmod-aldebaran" + ;; + 0x13fe) + echo "gpu-firmware-amd-kmod-cyan-skillfish2" + ;; + 0x742*|0x743*) + echo "gpu-firmware-amd-kmod-beige-goby" + ;; + esac +} diff --git a/usr.sbin/fwget/pci/pci_video_intel b/usr.sbin/fwget/pci/pci_video_intel new file mode 100644 index 000000000000..9a20abcdb17a --- /dev/null +++ b/usr.sbin/fwget/pci/pci_video_intel @@ -0,0 +1,78 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +pci_video_intel() +{ + case "$1" in + # Skylake + 0x19*) + echo "gpu-firmware-intel-kmod-skylake" + ;; + # Broxton + 0x0a*|0x1a*|0x5a84|0x5a85) + echo "gpu-firmware-intel-kmod-broxton" + ;; + # Geminilake + 0x318*) + echo "gpu-firmware-intel-kmod-geminilake" + ;; + # Kabylake, Coffeelake and Cometlake + 0x59*|0x87*|0x9b*|0x3e*) + echo "gpu-firmware-intel-kmod-kabylake" + ;; + # Cannonlake + 0x5a*) + echo "gpu-firmware-intel-cannonlake" + ;; + # Icelake + 0x8a*) + echo "gpu-firmware-intel-icelake" + ;; + # Elkhartlake/Jasperlake + 0x45*|0x4e*) + echo "gpu-firmware-intel-elkhartlake" + ;; + # Tigerlake + 0x9a*) + echo "gpu-firmware-intel-tigerlake" + ;; + # Rocketlake (Uses tigerlake GuC/HuC firmware) + 0x4c*) + echo "gpu-firmware-intel-rocketlake gpu-firmware-intel-tigerlake" + ;; + # DG1 + 0x49*) + echo "gpu-firmware-intel-dg1" + ;; + # Alderlake (Uses tigerlake GuC/HuC firmware) + 0x46*) + echo "gpu-firmware-intel-alderlake gpu-firmware-intel-tigerlake" + ;; + *) + log "No package found for device $1" + ;; + esac +} From nobody Mon May 1 10:54:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q90TL5Pp9z48Ndh; Mon, 1 May 2023 10:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q90TL4cWpz4HmK; Mon, 1 May 2023 10:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682938470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGPsKGlozc2n/Cbekvlr0jUz8O3JkUg0yR9IgfpFSuE=; b=EYZCoDJhnt+O84/tPBybLFCia9zUMvaZ8SMorUm/4iBpf+UMu6cZ8A5Te782FjJv/4IJUh D54eN0PBM/N2koPB46KgC38i4/6+oWRbPl0x3g6xE+AjDiVpjnfBgb5AAIKpzJ11u64bC+ VDdcohVG8oY8o0pqAN28u0gxlS3bSaGPd0EO8Tgzee1ynG4hRXVb6uTwPOctXLc/NZBXRw 1vlEZ1ymkhocf7xaFEi90WbF3Z2I3I6RD7j7kZ1izQPObfcZIIuzUA4vlxMIqSRcKDcKUG isjKYYEmGGwZW2w6Vm57/ryZLXucc/vHwDAey4UZ6WC5xAW3Rf5aU+vgFCGW/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682938470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGPsKGlozc2n/Cbekvlr0jUz8O3JkUg0yR9IgfpFSuE=; b=JiaFdMFzE0ex8E3/b9uPHkGEvGlMW0V69Rc/bP5MvpMDQ5Y1Nw6bVs7wM389IKtISiHnXz wrHitP/2x4Z0zT3rJtWtLCATWpkGFGQvT9u4wjuXG4EeRJ9orfj70/J4HtXP9rHaq685b5 FHzZfUVew7687I6kCBB72Qu9/fJCJC49EKM6i86rY8zrhg1lPAaeKv+e2P8FyKTMaA9QG2 /lnShkwgJ1xGNupEkXxOt3uyS0UpVQ0UFWE6j4WzdaR+ViG1rmy0/RqeAb+2dhWMR4lZx7 jrdNwDsopov3E1vjRAb10Sjd2LeHfi7IrrkPYg0lCOtgHu8vxw8jyx6SYcvC5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682938470; a=rsa-sha256; cv=none; b=dUMiAhpQQDgxh3YPCIJtB+cunMfN6buNavBFqrSnzCKIFn3I0jAGs5ZR8I4FeRv4USAdOd BthCKlbC1GTpGa+n9jydExA5xRx2a87z//7qtTb0XNLstCcnApQ6b0q/cyI93Nr6W7NfCH 8s38BGAawP+xNa6CRKM0/HQeOeNK/GEFbAA1i9Cou9/BE/ichAcjdgiqe9zg/YBg2x3P7c kZPsp+NwoD8Q1pBai7SAZGobTU9trv6AulPnAsfhUIWbeGfy7tYcCmqFmvssUKrRNQWLQm A2KIHYVUrafDNp37DXaOM6SxzOJH3fci5IkPJfJw6dHh01/pbnzvGEDniRaGfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q90TL3j7lz136r; Mon, 1 May 2023 10:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341AsUd4041676; Mon, 1 May 2023 10:54:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341AsULQ041675; Mon, 1 May 2023 10:54:30 GMT (envelope-from git) Date: Mon, 1 May 2023 10:54:30 GMT Message-Id: <202305011054.341AsULQ041675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: b274854dd943 - main - stress2: Added a temporary fix for the UFS+SU "out of inodes" 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b274854dd943e66556ba2ecd7b6d3349b1cf8e6e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=b274854dd943e66556ba2ecd7b6d3349b1cf8e6e commit b274854dd943e66556ba2ecd7b6d3349b1cf8e6e Author: Peter Holm AuthorDate: 2023-05-01 10:52:42 +0000 Commit: Peter Holm CommitDate: 2023-05-01 10:52:42 +0000 stress2: Added a temporary fix for the UFS+SU "out of inodes" issue --- tools/test/stress2/misc/unionfs4.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/test/stress2/misc/unionfs4.sh b/tools/test/stress2/misc/unionfs4.sh index 2355005c1f8b..15ff314a980b 100755 --- a/tools/test/stress2/misc/unionfs4.sh +++ b/tools/test/stress2/misc/unionfs4.sh @@ -52,6 +52,8 @@ done mdconfig -a -t swap -s 2g -u $md1 mdconfig -a -t swap -s 2g -u $md2 +[ "$newfs_flags" = "-U" ] && + newfs_flags="-j" # "out of inodes" work around newfs $newfs_flags -n md$md1 > /dev/null newfs $newfs_flags -n md$md2 > /dev/null mount /dev/md$md1 $mp1 From nobody Mon May 1 11:49:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q91hw1LBfz48Rdt; Mon, 1 May 2023 11:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q91hv0xZ3z4NhD; Mon, 1 May 2023 11:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682941775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bSawNKCdu5KJUx/93j9FP+dgAr/Fm4S31YZrowCAPAg=; b=xu3KxObUNIIfqOjmMDFaeaIdSk1aXSbO2bxyuL3Kue7lxSS4LcozYSGu5a+6KdczR4tBkk lNi/EW0RokrNkYh8M76QafwrhMRmtwkXN8cAwMBpYzMW5hFRZ4qAe7cO47+jX+5YqQEP8O 4hvb5aRmU4V14S+3EbKUQfwasDF744Q5q0H9B4xyYWVj1NPcfs7DQETfX7LeZL/42m9JPe +LWo028bY05+dpTXJmga1/Ih8kIlCnP2Sh1SBdhzMVbSPVjbP142dybnRN+xhuhI1S3kRG yEuNwGDE3tK61kLE/5U4EOMPDNFT1whJ5ugB/64pp0thZi79ewGX7A5ht0SsTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682941775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bSawNKCdu5KJUx/93j9FP+dgAr/Fm4S31YZrowCAPAg=; b=GItW5TdPJWpw6j5+rPJaTvlkuZ6s/Gr9Y1SVtmdwyu3duOT/wlnDcxibh12s4vpF7bEWju B6tX9ZJECf+Kx/0JtM5UPEX0QAUjzZh7Jfxl4x0IWPbTbfNO2uq0G88pOjRqmo+Vju7ty1 mL5mzU+5IiNCuL79swVCxXgzMhxa3E/Qq72VJBtO5vRFt4/N62+w2xzCAJhUUQCCwyk8w/ b/goURoppGCyt8/d47UHfhuzhFbI0dQ/SudY4TBJeUmedhkyzWApZPiuHnuNq7rZLLq7Bk HWd849Cc50SK6zbUuj1vXyUISZIzrwqJQeTa5YBz6kpR8q9B3pF8WuJZeSoxFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682941775; a=rsa-sha256; cv=none; b=bp1Fqbcj46JT+inDCmvpHn+m2t3scZpYHRcN7kDhWVUhQh3v/7bhdea50MuWJ6FOVcfM8m 4pc5LFvBRKz4H0XU7zvPe7uIFbCXTt4VP6Olrejbktb945y4A8mWjJ2XNRR9kab/6b+RbB 4fIWV0meS0BWlKlRMr0qWxZideZTBzlUqPMiuvshfTYRvx7tDvmYELw3HSbTGxAZIPbUUM e76HTttgKRa2W4Fv+mhyVm6Mn6vZYM185wXzvlPsucbGzPzvkVe5ypomiidtQQWumHe0WZ 3Slo2P+to/sg0XYSGhPK6IMvyM7wzxP1b5t8OoLQUxA+vqsSsRoqx6GKTOgh+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 4Q91hv02W6z14Gy; Mon, 1 May 2023 11:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341BnY7o025362; Mon, 1 May 2023 11:49:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341BnY9k025361; Mon, 1 May 2023 11:49:34 GMT (envelope-from git) Date: Mon, 1 May 2023 11:49:34 GMT Message-Id: <202305011149.341BnY9k025361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: d502d3fc72f1 - main - opensm: Fix build with -Werror and -Wdate-time. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d502d3fc72f123f104cba3d1ad9135a7ef7cf78b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d502d3fc72f123f104cba3d1ad9135a7ef7cf78b commit d502d3fc72f123f104cba3d1ad9135a7ef7cf78b Author: Mina Galić AuthorDate: 2023-05-01 09:13:30 +0000 Commit: Hans Petter Selasky CommitDate: 2023-05-01 11:46:24 +0000 opensm: Fix build with -Werror and -Wdate-time. This fixes builds WITH_OFED_EXTRA=YES . PR: 270776 Pull Request: https://github.com/freebsd/freebsd-src/pull/715 MFC after: 1 week Sponsored by: NVIDIA Networking --- contrib/ofed/opensm/opensm/osm_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ofed/opensm/opensm/osm_console.c b/contrib/ofed/opensm/opensm/osm_console.c index 48ee2a4aa77e..1dfeeeaf0fbf 100644 --- a/contrib/ofed/opensm/opensm/osm_console.c +++ b/contrib/ofed/opensm/opensm/osm_console.c @@ -1652,7 +1652,7 @@ static void help_version(FILE * out, int detail) static void version_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) { - fprintf(out, "%s build %s %s\n", p_osm->osm_version, __DATE__, __TIME__); + fprintf(out, "%s\n", p_osm->osm_version); } /* more parse routines go here */ From nobody Mon May 1 11:49:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q91hw4LRqz48RW4; Mon, 1 May 2023 11:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q91hw1r7nz4NhF; Mon, 1 May 2023 11:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682941776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uSXdCcdSAOF49tYCl+xqLZnhyuILTrrvpkbDo93nd7o=; b=w0U42Rg36CJ8svCTzlMCi8+bmbeKjcqBn2Cov0F+oxfArpR5TrNulxw7OYG3+c2igALY5a FNaFuyUKVcCElzeMlTxpDYWOzPO2ERVHj7DVOIVb3lGmbzXD10txBFsLVVSi1DMEiyIk8W KU1lfL45mtLY6TfQpcSelDspNfckzRHJ9ND27ZQPw9d7wvagqOtvks7oSjLRTBzBN25VGx W/XKAtKnRd/QGc/KOBRys22BasAVTqIHZc16Qa5h6vQMmXNemO9za9OwBEF7S7hE7W1ovH XvZgznRj8zYZ3hFebZ+liWo5vPQ2Xli5wAu7TJfqOhjoITRxEfgJ8UyqURvyBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682941776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uSXdCcdSAOF49tYCl+xqLZnhyuILTrrvpkbDo93nd7o=; b=jKDB6ATFIe+7cIxa8qCEZ5w8JqxxQA9cTxWRnpSr1QuVxt12mt0otsTxBNRFNW6FVnIKgJ shdnWVaVYCjMZ3zItYQprt42S0zC4sLWYshiPmfa3PTxNvdTAn1waX/GBzVUTIjdiTZKHj zWPntTBzZT4hoSL/2yU8HB91ZysiKWtmpiygdPoEanUEWeo0zKugREyHG2FJ2AZ8HSmfjB pDX+n3IZk8VFmk2/XjRql7eFQydJKE4l+yXyGtabxUuzTrOIQf+V3hhNazFd+9T02deb1x EsyKFzz8YzBDUFDB2GL6FfxNRlY59V22My+GkQAAzD0xjPnUWmNgK/6mnlJ+Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682941776; a=rsa-sha256; cv=none; b=nXyFgFyc9fIkRoL0rA7Vk8JrO7nzsOAYpJE17sE/COYBF1poeH9ypEvL3CZsAEvzFTg/6w VrRG9+NKoP3G6LsIA5+Rju1dz+3RFp7QN4Ml0eBghm8g806FPzweKhN/h2CK1KWDa0jGjQ dBGZLEfGrbqjJhUpuBNRX0EVwnL/bB1cuN+s1HYZQMCPcF8sWLfyU+I1os4gOyIERDYhcq VBQDzQVvksQtwGdn3+WaN9oDoxPtZ1xePb6rimQFDN8oK+l1BC9IzcuOcyKQR+2iRlAadV mSkDFu/zRIyo1IuZPbPzgBty6iWJlVgORHRaoA4crQyBY0kkYRl1xPjmrFf80A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q91hw0wK7z143x; Mon, 1 May 2023 11:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341Bnaff025387; Mon, 1 May 2023 11:49:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341BnaDY025386; Mon, 1 May 2023 11:49:36 GMT (envelope-from git) Date: Mon, 1 May 2023 11:49:36 GMT Message-Id: <202305011149.341BnaDY025386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: a554ff467079 - main - libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a554ff467079c12f647d4bea46bbbc970bf68354 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a554ff467079c12f647d4bea46bbbc970bf68354 commit a554ff467079c12f647d4bea46bbbc970bf68354 Author: Hans Petter Selasky AuthorDate: 2023-05-01 11:48:20 +0000 Commit: Hans Petter Selasky CommitDate: 2023-05-01 11:48:20 +0000 libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table. To allow userspace utilities to use these devices. MFC after: 1 week Sponsored by: NVIDIA Networking --- contrib/ofed/libmlx5/mlx5.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/ofed/libmlx5/mlx5.c b/contrib/ofed/libmlx5/mlx5.c index 6577e07a4c4b..bc35ebe05cd9 100644 --- a/contrib/ofed/libmlx5/mlx5.c +++ b/contrib/ofed/libmlx5/mlx5.c @@ -81,8 +81,14 @@ static struct { HCA(MELLANOX, 4124), /* ConnectX-6 VF */ HCA(MELLANOX, 4125), /* ConnectX-6 DX */ HCA(MELLANOX, 4126), /* ConnectX family mlx5Gen Virtual Function */ + HCA(MELLANOX, 4127), /* ConnectX-6 LX */ + HCA(MELLANOX, 4129), /* ConnectX-7 */ + HCA(MELLANOX, 4131), /* ConnectX-8 */ HCA(MELLANOX, 41682), /* BlueField integrated ConnectX-5 network controller */ HCA(MELLANOX, 41683), /* BlueField integrated ConnectX-5 network controller VF */ + HCA(MELLANOX, 41686), /* BlueField-2 integrated ConnectX-6 Dx network controller */ + HCA(MELLANOX, 41692), /* BlueField-3 integrated ConnectX-7 network controller */ + HCA(MELLANOX, 41695), /* BlueField-4 integrated ConnectX-8 network controller */ }; uint32_t mlx5_debug_mask = 0; From nobody Mon May 1 14:09:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q94pt4xXqz48ZsY; Mon, 1 May 2023 14:09: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 4Q94pt4G43z3PGF; Mon, 1 May 2023 14:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjDwiRh8RloamFxaD8w+YDkk4wAOINhIZxHZtsg5oW0=; b=fXwu16WQ6Vplm1mgEL448JnJxcJ08XyKGAST72bDm+CTuy9nZGcH6OxH3gsPOvD0nKktQU WiFn4QWuvGk6Mb+8UtyjYHtQ7ODBFMqETnkzFFOP33y2sbrfdoSuyC05NXA9ikUbRM26sH DUkdwuEmGTYYpeOEJDBThXzuWThK27/SA4GfM7gVyybP2/29Ps2YPScjQiaFhMaphAu2KY UkBZNwn46aj87FmBYCuB5TBqKwgYjsG+QfXo1zLUm+UMpJXTBi8wOl9UB/2ehqewmoE/qU YS8uWwOhokPR5M3vPPcYIjf5ap2GgrATEcfR99sP491zNxUuynkBCb7Ddm+yLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjDwiRh8RloamFxaD8w+YDkk4wAOINhIZxHZtsg5oW0=; b=fvSdtjLeyi/RCloBTwnfRPMaKLExc/BwWPvalPrN7cN4cZky4JrIuJOyeI8Fmu901mmLon T3Kp5k+U+YkmOn9qv4RHqaAQ8XFj5sLHO8IhvANWVn5v0khmFzFXvN3qwM+nhYJ+ewTUJh Eq5hSnGa7ZPO6B0nnakGG03QC1CFrA86Ei7kvXh+Qf5aJumP4voA6SmDYsYoawkakNJFWc jW3HMS212srXF0kbep5f5LZB7Kj7kHTm4tFzwn4DP1rH9yz+HExBaklHkA4WN7asWQCemK ejT4c82w40qDEcwKJ1ob3fq6VRC2nDcCKyRY3Hwf4f2ZHQ2cGNnGIxJ8dJzYoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682950198; a=rsa-sha256; cv=none; b=eRGiqKUFQR+VJ2jRf6UGKPonAoOWo1x5N96CKJnxydfDo2FHIlcevcxje2hdztZ5OXlNrC VRjAV0tTvl2sV+PhqD6sfnfnE5HVmihW4tiAjL+Jp7I/MxkMluR8gYkyWuIYo9uoq91TDk H7h5hkezCdApFucEbFhmWJUcABUcPJ8i3no8eXqukro+DevMRHWO7bT6p84JrqHTq3lsuM IFfa8doyO1qHDUVPSnQLrGPR2VZ4hZR4vV52zrWi9jQV2Uf2udSA8xOSW3PJUxzUarM6ja Xtxpde9Lk5fNlkvQw61/xYs/6XKQp9LJOO/Pp4c+MGF0oNaOx9MqoZ7NyDoCXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q94pt3LRxz17SL; Mon, 1 May 2023 14:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341E9waw057674; Mon, 1 May 2023 14:09:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341E9wop057673; Mon, 1 May 2023 14:09:58 GMT (envelope-from git) Date: Mon, 1 May 2023 14:09:58 GMT Message-Id: <202305011409.341E9wop057673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 6a09a7f1e9a5 - main - netlink: always zero provided header buffers. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 commit 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 Author: Alexander V. Chernikov AuthorDate: 2023-05-01 14:07:33 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-05-01 14:09:47 +0000 netlink: always zero provided header buffers. Reported by: KMSAN MFC after: 3 days --- sys/netlink/netlink_message_writer.h | 1 + sys/netlink/route/neigh.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h index 57fc1bf342ea..92e43834efc7 100644 --- a/sys/netlink/netlink_message_writer.h +++ b/sys/netlink/netlink_message_writer.h @@ -225,6 +225,7 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz) void *data_ptr = &nw->data[nw->offset]; nw->offset += sz; + bzero(data_ptr, sz); return (data_ptr); } diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 807c125cc3f0..db72bc9bfd4e 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -156,12 +156,9 @@ dump_lle_locked(struct llentry *lle, void *arg) ndm = nlmsg_reserve_object(nw, struct ndmsg); ndm->ndm_family = wa->family; - ndm->ndm_pad1 = 0; - ndm->ndm_pad2 = 0; ndm->ndm_ifindex = wa->ifp->if_index; ndm->ndm_state = lle_state_to_nl_state(wa->family, lle); ndm->ndm_flags = lle_flags_to_nl_flags(lle); - ndm->ndm_type = 0; switch (wa->family) { #ifdef INET From nobody Mon May 1 14:16:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q94y01lJgz48bcF; Mon, 1 May 2023 14:16: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 4Q94y01CzTz3Q4K; Mon, 1 May 2023 14:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EMzxwqnznXN6yYeDNWoCw3sHWd86KjeIep24/QNu1UU=; b=Sb7wYMcT9Kgd6uBL9l1oskUQJ5mEvoHbd+J/MpBXTfqMFyVCDfT7i8xLm9A9jFe8qlZmyD qj9rMRvfJgXN8hVya4XEAHZ04zFHGC/FKxUMyiZvl4T9d0w12VRrGYHJTIIr38ZB4Smvkn PBV2oJJemHe25U/ouGwYyiKY3De8G7Q33gYhj7bVCv0iqX8lECjj9uUSdtKAz9YAwIJG6z DQGBO5YoBBCMIsmzKMVVHi2GPMXyX1lLGOYs6gHYkWveEk19JsVHt7lQOneCkSFrHFkZdK jlz6wRvLJGuyIx0Y0wUDRkZHl0uRb1N/lsRynfAMI6QSYLLENFeUAOzHBd5HyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EMzxwqnznXN6yYeDNWoCw3sHWd86KjeIep24/QNu1UU=; b=jVAQCv29YsiVcvZLfXf99z2zU6Qd0FqFvsD1aoEmM29ptXaT1pFpRbYLcgbEWoaramXfHi Ag25R4c8DdCqqwhjQEiN4ZAkIHvnq5I330vjrEqGyCQUehZ54yv36EpL3zezO0FHhSVzAb belg9YmTAoDraQYMNpiY4El7IEMg8IEvs0HEQ17k3oC3mtYbw7izWcFbUXlCJnHzvVcZro IH6PVTSYhyxM6DFiQoRMyhNtD8owiYOEk7Zf1KOjagXHMjdWf+AqPrxOSnvX4KzEdSi/dT 8NOEfL8QYY4nsIQ3W/QtIem8MSqfuAiT6FLdeEZSvyhv/GFtAL1RoNPvu3nYnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682950568; a=rsa-sha256; cv=none; b=r1NlrNG0ABBw9NuRdVILRbN/6Fdn3xWcUI9hKX44sP/qIoxV3La9z/R8BA8PbJO6oL75FA cXzIn0bflemctrS5F3xvnpaHyyrdKg3m/wT5VFVjsQCAbttksRTS1IYgrGgD0rlUwZVuKI JdiIeW/VEAVzRoHd5QSmNYr011E9L9XceHTYUMN9GCHIWFaXWgWAq4bNJzSHBgLMIoPQ6w uDNht6Pe7VffxTnao5YM+PFMsRUnty5cSdK71SNvhP+oNJdsTNvlO36Hpn89UTQZJ7xPeK 0QfejyLbHWUyeoNsjRbi7AEI9tAv2Jqous9GDyTb1VZ2S47jvmFP5/EWvZg/qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q94y001Cpz17sK; Mon, 1 May 2023 14:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EG7xw073567; Mon, 1 May 2023 14:16:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EG7me073566; Mon, 1 May 2023 14:16:07 GMT (envelope-from git) Date: Mon, 1 May 2023 14:16:07 GMT Message-Id: <202305011416.341EG7me073566@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: db0a2bfd0c6d - main - pf: reduce number of hashing operations when handling source nodes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db0a2bfd0c6df48ae1c5346198b97c83f746d219 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=db0a2bfd0c6df48ae1c5346198b97c83f746d219 commit db0a2bfd0c6df48ae1c5346198b97c83f746d219 Author: Kajetan Staszkiewicz AuthorDate: 2023-05-01 14:07:42 +0000 Commit: Kristof Provost CommitDate: 2023-05-01 14:15:30 +0000 pf: reduce number of hashing operations when handling source nodes Reduce number of hashing operations when handling source nodes by always having a pointer to the hash row mutex in the source node. Provide macros for handling and asserting the mutex. Calculate the hash only once in pf_find_src_node() and then use this hash in subsequent operations. Cherry-picked from development of D39880 Reviewed by: kp, mjg Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D39888 --- sys/net/pfvar.h | 39 ++++++++++++++++++++++++++++++++++- sys/netpfil/pf/pf.c | 55 ++++++++++++++++++++++++-------------------------- sys/netpfil/pf/pf_lb.c | 3 ++- 3 files changed, 66 insertions(+), 31 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index a82735f71c8c..c1550f2c30e6 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -375,6 +375,41 @@ struct pfi_dynaddr { #define PF_STATE_LOCK_ASSERT(s) do {} while (0) #endif /* INVARIANTS */ +#ifdef INVARIANTS +#define PF_SRC_NODE_LOCK(sn) \ + do { \ + struct pf_ksrc_node *_sn = (sn); \ + struct pf_srchash *_sh = &V_pf_srchash[ \ + pf_hashsrc(&_sn->addr, _sn->af)]; \ + MPASS(_sn->lock == &_sh->lock); \ + mtx_lock(_sn->lock); \ + } while (0) +#define PF_SRC_NODE_UNLOCK(sn) \ + do { \ + struct pf_ksrc_node *_sn = (sn); \ + struct pf_srchash *_sh = &V_pf_srchash[ \ + pf_hashsrc(&_sn->addr, _sn->af)]; \ + MPASS(_sn->lock == &_sh->lock); \ + mtx_unlock(_sn->lock); \ + } while (0) +#else +#define PF_SRC_NODE_LOCK(sn) mtx_lock((sn)->lock) +#define PF_SRC_NODE_UNLOCK(sn) mtx_unlock((sn)->lock) +#endif + +#ifdef INVARIANTS +#define PF_SRC_NODE_LOCK_ASSERT(sn) \ + do { \ + struct pf_ksrc_node *_sn = (sn); \ + struct pf_srchash *_sh = &V_pf_srchash[ \ + pf_hashsrc(&_sn->addr, _sn->af)]; \ + MPASS(_sn->lock == &_sh->lock); \ + PF_HASHROW_ASSERT(_sh); \ + } while (0) +#else /* !INVARIANTS */ +#define PF_SRC_NODE_LOCK_ASSERT(sn) do {} while (0) +#endif /* INVARIANTS */ + extern struct mtx_padalign pf_unlnkdrules_mtx; #define PF_UNLNKDRULES_LOCK() mtx_lock(&pf_unlnkdrules_mtx) #define PF_UNLNKDRULES_UNLOCK() mtx_unlock(&pf_unlnkdrules_mtx) @@ -845,6 +880,7 @@ struct pf_ksrc_node { u_int32_t expire; sa_family_t af; u_int8_t ruletype; + struct mtx *lock; }; #endif @@ -2120,7 +2156,8 @@ extern struct pf_kstate *pf_find_state_all(struct pf_state_key_cmp *, extern bool pf_find_state_all_exists(struct pf_state_key_cmp *, u_int); extern struct pf_ksrc_node *pf_find_src_node(struct pf_addr *, - struct pf_krule *, sa_family_t, int); + struct pf_krule *, sa_family_t, + struct pf_srchash **, bool); extern void pf_unlink_src_node(struct pf_ksrc_node *); extern u_int pf_free_src_nodes(struct pf_ksrc_node_list *); extern void pf_print_state(struct pf_kstate *); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a8da800dd814..e5f2a5ea57a0 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -683,6 +683,10 @@ pf_src_connlimit(struct pf_kstate **state) int bad = 0; PF_STATE_LOCK_ASSERT(*state); + /* + * XXXKS: The src node is accessed unlocked! + * PF_SRC_NODE_LOCK_ASSERT((*state)->src_node); + */ (*state)->src_node->conn++; (*state)->src.tcp_est = 1; @@ -827,25 +831,25 @@ pf_overload_task(void *v, int pending) */ struct pf_ksrc_node * pf_find_src_node(struct pf_addr *src, struct pf_krule *rule, sa_family_t af, - int returnlocked) + struct pf_srchash **sh, bool returnlocked) { - struct pf_srchash *sh; struct pf_ksrc_node *n; counter_u64_add(V_pf_status.scounters[SCNT_SRC_NODE_SEARCH], 1); - sh = &V_pf_srchash[pf_hashsrc(src, af)]; - PF_HASHROW_LOCK(sh); - LIST_FOREACH(n, &sh->nodes, entry) + *sh = &V_pf_srchash[pf_hashsrc(src, af)]; + PF_HASHROW_LOCK(*sh); + LIST_FOREACH(n, &(*sh)->nodes, entry) if (n->rule.ptr == rule && n->af == af && ((af == AF_INET && n->addr.v4.s_addr == src->v4.s_addr) || (af == AF_INET6 && bcmp(&n->addr, src, sizeof(*src)) == 0))) break; + if (n != NULL) { n->states++; - PF_HASHROW_UNLOCK(sh); - } else if (returnlocked == 0) - PF_HASHROW_UNLOCK(sh); + PF_HASHROW_UNLOCK(*sh); + } else if (returnlocked == false) + PF_HASHROW_UNLOCK(*sh); return (n); } @@ -865,17 +869,16 @@ static int pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, struct pf_addr *src, sa_family_t af) { + struct pf_srchash *sh = NULL; KASSERT((rule->rule_flag & PFRULE_SRCTRACK || rule->rpool.opts & PF_POOL_STICKYADDR), ("%s for non-tracking rule %p", __func__, rule)); if (*sn == NULL) - *sn = pf_find_src_node(src, rule, af, 1); + *sn = pf_find_src_node(src, rule, af, &sh, true); if (*sn == NULL) { - struct pf_srchash *sh = &V_pf_srchash[pf_hashsrc(src, af)]; - PF_HASHROW_ASSERT(sh); if (!rule->max_src_nodes || @@ -904,6 +907,9 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, rule->max_src_conn_rate.limit, rule->max_src_conn_rate.seconds); + MPASS((*sn)->lock == NULL); + (*sn)->lock = &sh->lock; + (*sn)->af = af; (*sn)->rule.ptr = rule; PF_ACPY(&(*sn)->addr, src, af); @@ -929,8 +935,8 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, void pf_unlink_src_node(struct pf_ksrc_node *src) { + PF_SRC_NODE_LOCK_ASSERT(src); - PF_HASHROW_ASSERT(&V_pf_srchash[pf_hashsrc(&src->addr, src->af)]); LIST_REMOVE(src, entry); if (src->rule.ptr) counter_u64_add(src->rule.ptr->src_nodes, -1); @@ -1982,7 +1988,6 @@ static void pf_src_tree_remove_state(struct pf_kstate *s) { struct pf_ksrc_node *sn; - struct pf_srchash *sh; uint32_t timeout; timeout = s->rule.ptr->timeout[PFTM_SRC_NODE] ? @@ -1991,21 +1996,19 @@ pf_src_tree_remove_state(struct pf_kstate *s) if (s->src_node != NULL) { sn = s->src_node; - sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(sn); if (s->src.tcp_est) --sn->conn; if (--sn->states == 0) sn->expire = time_uptime + timeout; - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(sn); } if (s->nat_src_node != s->src_node && s->nat_src_node != NULL) { sn = s->nat_src_node; - sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(sn); if (--sn->states == 0) sn->expire = time_uptime + timeout; - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(sn); } s->src_node = s->nat_src_node = NULL; } @@ -4805,31 +4808,25 @@ csfailed: uma_zfree(V_pf_state_key_z, nk); if (sn != NULL) { - struct pf_srchash *sh; - - sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(sn); if (--sn->states == 0 && sn->expire == 0) { pf_unlink_src_node(sn); uma_zfree(V_pf_sources_z, sn); counter_u64_add( V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); } - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(sn); } if (nsn != sn && nsn != NULL) { - struct pf_srchash *sh; - - sh = &V_pf_srchash[pf_hashsrc(&nsn->addr, nsn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(nsn); if (--nsn->states == 0 && nsn->expire == 0) { pf_unlink_src_node(nsn); uma_zfree(V_pf_sources_z, nsn); counter_u64_add( V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); } - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(nsn); } return (PF_DROP); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 186634edbd56..ca8593a1c37d 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -348,12 +348,13 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, { struct pf_kpool *rpool = &r->rpool; struct pf_addr *raddr = NULL, *rmask = NULL; + struct pf_srchash *sh = NULL; /* Try to find a src_node if none was given and this is a sticky-address rule. */ if (*sn == NULL && r->rpool.opts & PF_POOL_STICKYADDR && (r->rpool.opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) - *sn = pf_find_src_node(saddr, r, af, 0); + *sn = pf_find_src_node(saddr, r, af, &sh, false); /* If a src_node was found or explicitly given and it has a non-zero route address, use this address. A zeroed address is found if the From nobody Mon May 1 14:30:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95Gh287cz48c3y; Mon, 1 May 2023 14:30: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 4Q95Gh1Zw7z3Qwc; Mon, 1 May 2023 14:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TuguMgBHchX0FelwnzNdQsYfKFxSnAa5IQ/hjnB8zL4=; b=wNKuAiPKJ+bK4uzy1+k+ENA4vJCmtg16D1+gWS5aqCH6I/VuL2e4LDtrSa4POYzRw+hs73 74cO9CnAZa0SjXgRJNIitQZO3BDZ0PefWc9QeHjrTAsT+SlGlCisSzK18BXjyZ2Uqn/JTX FuLryih9Ue4FMWJQZkmchd2EU8egGgqurvxk85l0wutDmW3MWP2IAPcK93bSBV0Q/+wWuq R0GupO3+f6WdKerXivMDPseuw/u+tN3+GBY843TyC/rF8orzshfv26g0ez+FMp0lqsA7YS paHm56CgkRVoX+1t+RB02+w5YSf0vN/m0cwPM7ZZREbxR2sGqY/LU05mS83nTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TuguMgBHchX0FelwnzNdQsYfKFxSnAa5IQ/hjnB8zL4=; b=flws97EwH9QV1m1hPx6P79EyDgFysjXe5fD3TjFV7gVyl13ncZf+uWVrukHEGuj6egpJE+ DyKC5Ie0QeMdOfvc557tVHJqT9OISjBpK3A/a1JlmD3gKL41EZxHtI/Y8vXbqnUQOfbgyX PxyuaazgPNa1nWZuMdHWm5WjvTjVcMC1JVB4mfDW56mnI3dPGAEiUXpiQkuN/u7Y+6IJIq 2BQfaVSYH2LleEMAId9NnMxfdg3ynIXPbZ2iMJfeXxzgnzfbEDKAYFS82/librONaBQunL gsF81G2KkmEFq86ivdLjAhjeDfY64smhtso5Db16yUUhPG1XEqMTEh+7GLEJQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951436; a=rsa-sha256; cv=none; b=nfgqxOHY9ME7OTzlXvW8NgPK8h6e+6bN1M4BAHP90nnSOsRTX4+LlKLaDLlPDs042Q2tqq rj9oU7WjPnpNFd9/q2wxVPP1xxa0kiW7A+eGrPys6yx5gi2IrPW6z3oAxQWgSOnV+xgUHi rtT9VWV1nZELkScIRDGUmICesDQvwwrKeIJ4O8cFYDItWc/I5B7HDjtxYBaTtcmqp+pnKX tv3KrCZ5o7QrnkCoB3aMiOc9YEoleONbMJUkmgFUyEA9e5ED+76SehKoMmtvnKt1rRpsjE ZQ/j/cIJ0jDIi0dQPASQRxqXR73YVrOEWwiKXhXs3L70a3AC3qQAW+o9GJgw0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95Gh0gB6z17h4; Mon, 1 May 2023 14:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EUZZu099883; Mon, 1 May 2023 14:30:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EUZ1W099855; Mon, 1 May 2023 14:30:35 GMT (envelope-from git) Date: Mon, 1 May 2023 14:30:35 GMT Message-Id: <202305011430.341EUZ1W099855@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: 9c353fa4a940 - main - libc: Fix a documentation spelling mistake List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c353fa4a94018dd963182d19eaa5ed59726062f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9c353fa4a94018dd963182d19eaa5ed59726062f commit 9c353fa4a94018dd963182d19eaa5ed59726062f Author: Tom Hukins AuthorDate: 2023-03-29 13:38:12 +0000 Commit: Ed Maste CommitDate: 2023-05-01 14:30:15 +0000 libc: Fix a documentation spelling mistake Pull Request: https://github.com/freebsd/freebsd-src/pull/704 --- lib/libc/softfloat/timesoftfloat.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/softfloat/timesoftfloat.txt b/lib/libc/softfloat/timesoftfloat.txt index addc64740c6d..ae992f983c11 100644 --- a/lib/libc/softfloat/timesoftfloat.txt +++ b/lib/libc/softfloat/timesoftfloat.txt @@ -60,7 +60,7 @@ of usage is written. It is also possible to evaluate all machine functions in a single invocation as explained in the section _Function_Sets_ later in this document. -Ordinarily, a function's speed will be evaulated separately for each of +Ordinarily, a function's speed will be evaluated separately for each of the four rounding modes, one after the other. If the rounding mode is not supposed to have any affect on the results of a function--for instance, some operations do not require rounding--only the nearest/even rounding mode From nobody Mon May 1 14:30:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95Gj3338z48c6V; Mon, 1 May 2023 14:30: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 4Q95Gj2XtDz3RJq; Mon, 1 May 2023 14:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKIxs4ZRtThXAFonYvTFRR226sPeh7zU7vKrFaBcGyc=; b=FsWkBf9CoA0ICx0/7PFdLaIzX4jeIEnFZBPFEdWLJkwiRNlretZAJ2NjK4WB9Fqdijcefr fgcHDt4RLolRWLFh29aXTcr83zY1xTg5AdpKUGvIY/C60+WFEn5h77mGsrUbmjpqvgjUy5 fC7l2i+C8/bMlfIeS/JOKzvr/GQ6ORlOefCulw1iP9/Bqw/1vKH0Udw1fBXv7LEIVmHZ+i MJyP0hU0GpQ6DDQ5m+FSHwfgMHqTveQRAZK8dnMljt9lAjjqMYpLFVpqF6MDryMhI5T92A tDu5gMYyW3Vv8HuXJ4/oFLvFxvFrfHEXhfV8Mogq6sx9+7LuQiOz0IXX/I8qnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKIxs4ZRtThXAFonYvTFRR226sPeh7zU7vKrFaBcGyc=; b=VaOt62JZxhdVidLZm8iLxG9xoSvLHuYtbSodKcR0sFektwBN6eB6eA0C8Q8dDZONf7pgdu TB5YR8xjUV5UujVEapMTNKmGNcgF1C7EtFqcCo2owlKzHdcfC8GvDZL/VopoV7CkZws270 Hlw7pKaO4GwsNrTs6e25UqLl6GT0C9wJLNIE6uoNLsWYFLWPqcEOIXJYnbpKYB2D1XaaZL ZgDgK4AhfaOLjv3IfWNpUh1TKamvVADMBYBHqfzTBuKcTII90V7imJi2VxpGR+PyNCUJ7B vm+ulA9E71vO9IiR+lBH12yuL5hcs5ZmsNH70LH5kJDBm3agECKWwSPmZHUsnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951437; a=rsa-sha256; cv=none; b=cuBuRJOSdiK/DQzr/yQojrueAYeNRrWc4isaSAOEy8H0i5CXRhrokQJJ6xkhnwSndy7nqP Eo0kmbk5M5txxeX7o/lxZf4dTMGIFhxqj+fHnAxQycmAOJBaqOP6XJ3mBEW5zC70YLrnt0 sZ5nOXKRLC8bRHfn/O5d89LccOsxr2qp3uWfw5201fSKxW4qIXKOSHCb31IHcGRt+IFvNu fQFoaZFU7TyO03wYxUSBMkP/tm+VOpbv4Cb2JSl+F9CG7oER/ORaoy/eORkng/yBPMT1Oq Op9slhsRZSVYQ1batx0dSlG4WHYveMJw2sQD60SB66b8zSXURSGTY06WdDMFfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95Gj1dvlz1884; Mon, 1 May 2023 14:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EUb1m000324; Mon, 1 May 2023 14:30:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EUb0K000323; Mon, 1 May 2023 14:30:37 GMT (envelope-from git) Date: Mon, 1 May 2023 14:30:37 GMT Message-Id: <202305011430.341EUb0K000323@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: 7626863e1983 - main - pf: Fix a spelling mistake in a comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7626863e198384cada38c5f8dd2aaed20029553a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7626863e198384cada38c5f8dd2aaed20029553a commit 7626863e198384cada38c5f8dd2aaed20029553a Author: Tom Hukins AuthorDate: 2023-03-29 14:00:00 +0000 Commit: Ed Maste CommitDate: 2023-05-01 14:30:15 +0000 pf: Fix a spelling mistake in a comment Pull Request: https://github.com/freebsd/freebsd-src/pull/704 --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index c800d2048547..d5cea7d2a215 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2050,7 +2050,7 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) pf_pool_to_kpool(&rule->rpool, &krule->rpool); - /* Don't allow userspace to set evaulations, packets or bytes. */ + /* Don't allow userspace to set evaluations, packets or bytes. */ /* kif, anchor, overload_tbl are not copied over. */ krule->os_fingerprint = rule->os_fingerprint; From nobody Mon May 1 14:30:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95Gm6P7fz48c2L; Mon, 1 May 2023 14:30:40 +0000 (UTC) (envelope-from garga@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 4Q95Gm5cFTz3h6P; Mon, 1 May 2023 14:30:40 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951440; h=from:from:reply-to:subject: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=9fR9AZwin2BSDMTJITCZKzf++YtMmGyCaM1gnKEt7yA=; b=t5HPJBWWX1Vu2dBJ5sR1zbAiCA57a/qkHAdIZORpXStTmjnOnkcMwTbI3KrlRixtBYs6wl dngOpXPlW7pOsW+LDXxganz+ja3Fcxii2Tm2LM9QLgA/09Bga8lKW6Rsm0DPsKLZihCB27 JykFF8fKLZMc2QrWgdFgd57P+2afBUWhAWBcWEIm45TCv6tX1oKjmOOiXKWTOcJTkgOOJv PZ/tpCsv4t/7mOob3cqZPOv1LwSixrs1s8XSQZJJu9uC0GPUBDAENI5T5mP/AQiteULO2L vuEdVoB5911VyWUsfLkWIN//sAdakgts2NeNZneVLH9+UAQzxsH04ezQ92u/IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951440; h=from:from:reply-to:subject: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=9fR9AZwin2BSDMTJITCZKzf++YtMmGyCaM1gnKEt7yA=; b=wMGfXfqozIzFJ1OazD8j43oCWfNQ3PqkeRDDjED3TrtsHOQO3q7ElY0WXdegtZTLClAT8q EZHnIayL/4CibMa6LB/p9XqPT48igWJSX41aenis2ZT7LVGgXDn4kT/ke1RxXj1GccDvlk 1SGFPGKdBAnjJXqycZOPmnWvQOjuOWh/eSbLEvzDjb5iL/TTiNTcpFlsSDWnQ1/R5juoG5 digiv1YdoI0mI0Z23nFvap1xTBPzdHzO5WChVhH/JJuDCzPCQVoRKz8H0vXRW7G4051mTF aottvwqlS3NForztXy+M1wu1zpc3TcMg/Cj0CNoMoCThWgKGwxqq8DeVykv/2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951440; a=rsa-sha256; cv=none; b=a7xMVKgGylpeVRvUjMzaOGCOJe1CJrNQlDNobzTw1oi8owplJjasy5QEOlbBXDCumBO69p 7sUrt3Ua/UimKSYtg6U8oGu+/CBjmnzmgmm/BD7MB8WVHcoNoiKYMFoKc0VLFCRlJnVUU/ cT1rYQYwaWcKmCISwjASq8L0VVkH27/dWa1fC8SDaq9EPqsmCPmCQOgX7ghXcNxpLUaL2T iaOPqo4RAmju75jCsYqoqeGlQnPZiTXlAzWqMdk8m3MW+NvjEab0/K1tjbalUQYYQsVN3+ QKsoarlKb6ANdJokE71iDxTu8l4MxVNsvdbLWwA0ahPhjAnpkm93VX8qjrzuIg== Received: from [172.21.4.170] (dynamic-177-53-82-16.telecominternet.net.br [177.53.82.16]) (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: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q95Gm09xpzlTZ; Mon, 1 May 2023 14:30:39 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: <58128e85-82e3-e529-2d65-1145e6c84c09@FreeBSD.org> Date: Mon, 1 May 2023 11:30:36 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6a09a7f1e9a5 - main - netlink: always zero provided header buffers. To: "Alexander V. Chernikov" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305011409.341E9wop057673@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho In-Reply-To: <202305011409.341E9wop057673@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 01/05/23 11:09, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 > > commit 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 > Author: Alexander V. Chernikov > AuthorDate: 2023-05-01 14:07:33 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2023-05-01 14:09:47 +0000 > > netlink: always zero provided header buffers. > > Reported by: KMSAN > MFC after: 3 days > --- > sys/netlink/netlink_message_writer.h | 1 + > sys/netlink/route/neigh.c | 3 --- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h > index 57fc1bf342ea..92e43834efc7 100644 > --- a/sys/netlink/netlink_message_writer.h > +++ b/sys/netlink/netlink_message_writer.h > @@ -225,6 +225,7 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz) > > void *data_ptr = &nw->data[nw->offset]; > nw->offset += sz; > + bzero(data_ptr, sz); At first look, this line seems to be indented wrong. But looking at cgit web interface it seems that other lines are wrong and this is correct. -- Renato Botelho From nobody Mon May 1 14:38:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95SB5mzfz48c4H; Mon, 1 May 2023 14:38: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 4Q95SB5Gy8z3j8q; Mon, 1 May 2023 14:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+5TcBpo1Qaw09UNKEM7pxtp/IMe+pV8HHrCyh37U5vo=; b=DkV6Hkx8iCecwQpxBYW9Jg1n3emudVU8Mmxsb7eH0SLViF2ptx40FF5FeFS2fYCqqCR73z DYSEpdPkmMaG3YSY2rO9wWEGPznXzXmHcAGf4RzKgSvCxaZHk5Ieslq6Yg6rTdwouaZ31H T1c0OZ8KPD4rRYSEClhNyN5BPWYxUVe/v9tP4HKxFdF2v2LtJAIayKnLBCvo0BCwdCzeLs EKsKrvpeFoffXCTikijzDFqLP9jIzw5Wjem5pH5BQLrKJH5WVKCgLsKYR4SuB37qi3imto UfRnPWU9OAzHMw8D1lW4j/u0Mq6aKm55r8wWWC2vh3a8qrABxT4fbGp8sTJMEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+5TcBpo1Qaw09UNKEM7pxtp/IMe+pV8HHrCyh37U5vo=; b=b5wOr+9g9Oj+xxd6mwv0jR7GZRi+0XeDPlmUQClukw/ZaWB98lUo8m7pCJq5c+XthQiHcX sxg+vKGqgntUGOcBWYqIwZJJd/C9rl+r4QLVcIoTdaqlsUHstMFtv6hSqH4/STSViehrWe REvah5ZNCrWiFg2EqyHRO73CrA40mF9KVQIbFQk7NwvWmD5d0pnppaX7aqxfcsgkIpeS/J wq7iLONJbWjgNxW5As729gy06ZhCKs4HqkrYVlk05VHveKfHvVxQDWCgRGms9Uk29E+znB JlTQMivzNTUO5humu2YG5PL7Sxna9ZdsKjtAVqvBwa1hElqEFsHeJdDtEXILZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951930; a=rsa-sha256; cv=none; b=kVoqV1EgMd6BoO6P7a1u6GF+vBpqpytgdF83o5ocWhwsAa6C26j4hr59/3oMFiWi5r71+m 6p0qQmUXkXk5M1s+Hhfxx5SmmQQQj0MlDbITwOD9D2uzhsq3OZ8qee5RWvFR7WLFpLKKDU lEWagsXazDZTdTURQHKOcVIUnal1qheBW6pNv+L0EVyNvyX28HzDLgdOWUEQ/zlCAhddcQ 5xvMfKDPVbQWnmB58lWLP/MQ7QPntgXLCqng+5vrb6HPLB+nhYuZSy/SqkaWCnDjB+mL/o 6YRazDPulV7KB+M3vW3QiH3xXKdbvlgieHTfDXPo+NbQDTNX8AmMwVCeaDklCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95SB4LXDz17mv; Mon, 1 May 2023 14:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EcopH006999; Mon, 1 May 2023 14:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EcoCH006998; Mon, 1 May 2023 14:38:50 GMT (envelope-from git) Date: Mon, 1 May 2023 14:38:50 GMT Message-Id: <202305011438.341EcoCH006998@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: a58648a68b4c - main - wlan(4): Add more related drivers to "See also" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a58648a68b4c73d14c31c4af07f31479393bc376 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a58648a68b4c73d14c31c4af07f31479393bc376 commit a58648a68b4c73d14c31c4af07f31479393bc376 Author: Tom Hukins AuthorDate: 2023-04-19 19:47:24 +0000 Commit: Ed Maste CommitDate: 2023-05-01 14:38:09 +0000 wlan(4): Add more related drivers to "See also" Pull Request: https://github.com/freebsd/freebsd-src/pull/721 --- share/man/man4/wlan.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 index d7a186a34efd..7c12e8b1f7f9 100644 --- a/share/man/man4/wlan.4 +++ b/share/man/man4/wlan.4 @@ -174,6 +174,7 @@ Stations implementing earlier drafts (e.g., Linux) may be incompatible. .Xr bwn 4 , .Xr ipw 4 , .Xr iwi 4 , +.Xr iwlwifi 4 , .Xr iwm 4 , .Xr iwn 4 , .Xr malo 4 , @@ -182,6 +183,7 @@ Stations implementing earlier drafts (e.g., Linux) may be incompatible. .Xr otus 4 , .Xr ral 4 , .Xr rsu 4 , +.Xr rtw88 4 , .Xr rtwn 4 , .Xr rum 4 , .Xr run 4 , From nobody Mon May 1 14:47:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95dy1bw0z48cyL; Mon, 1 May 2023 14:47: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 4Q95dx6X7Nz3jyM; Mon, 1 May 2023 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBNhsOdLw8Hdp7zFRgI1G5CyinQUf8gOokYlkD00u/Q=; b=Wn51MT+JUl+LVzj/YCbOvXe+tMVGPSKZ9xNYAfUcJLWMSbc6NmvURjqx0CZ8fLlP1y/3fS tBrOAY5LeulqqdLKwJgYyvq+Vc5642JALTMoX0pTL2/33zobjujvnccM+N/jpEpQViURp5 Di2knVn3KZPdWL4NHz8YM8cc/5LIZY4NVcRGu5a1xdndcBzxwhzMR+LdS94MGYK1ShyoVe 1Zvt83mEFDbZWVA3Oc4lQmzIMRYW8p0gzWca7CYAKIFoj4QSk7EAPDNKFQ+Ixj83oe6Z4y Ob7wkaTO5E/GXgfE21qjl1t9AqX3kt2fxG+uz6qhlU8ikh+925dxLxoHq6LZ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBNhsOdLw8Hdp7zFRgI1G5CyinQUf8gOokYlkD00u/Q=; b=mQz7H1flKZewYG2Dh4WzN+osoy4wDReDSI80ZarYuUuqQD5oYmq4wqrte+s+3LMbZRDvoh s8bM8SV6J3q9owDCybCeZsWEIZ2mZjOXf46otumOlM979Q/NSY3i6bkTna+TlwGXok9f/K NYMiGasWG+I240hG1cWkNuNqJSnrRXdYYayrQwoGP5EqOa8Tu7ykcvJ9Eaz3mOZtrxhJAT r8UR5o+i4dLOacKMMJdMtgm085VTG9J9HjZ5XdcAG1PGCJ2CwoCZ4RhhESW1AYdj+bUVLf +e1oc7DYF1NX1bYh+UlYNsau0adyVSsTysJ7T9rd++gQbpH77dmUHVRE7syzzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682952437; a=rsa-sha256; cv=none; b=VxRFaRuYUMGSM3ka5nw87QaiubpvVrOFy6IFGc65e23YUJRMx/vHBn81gazhYwi5t4oV0c qO3qeg/gM4C5yx5Zb3V4cVVy+4JNDS2d75t7DDsAKr/xvQXQjeYgku0ngUHlqV4ueKoOxa 8Wu/X5b9zFx0ScJXHzMzAbtiZsfSJRV+Z94oQMzGvAm3aP2Sjb5z6YmunZr4ufzqHN0+Qs sRUULCvBoc1lSGN7lVX5Ms8JqtJJvlJM3ehO6/HGiiYqo7e7sMpbaVGZpOc3eBWRoVxoY4 Fd7ClGN3QiBWlf4XsOWU7L6Bas7XMgSHxHNZ4zA7rlC2Qo9y7tEXS0Y6ytY3Xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95dx5Tzxz182P; Mon, 1 May 2023 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341ElHqg023341; Mon, 1 May 2023 14:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341ElHPM023339; Mon, 1 May 2023 14:47:17 GMT (envelope-from git) Date: Mon, 1 May 2023 14:47:17 GMT Message-Id: <202305011447.341ElHPM023339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 88406e631e93 - main - netlink: whitespace fix in netlink_message_writer.h. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88406e631e93e08deee9fde97b12e3e1bf6b0590 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=88406e631e93e08deee9fde97b12e3e1bf6b0590 commit 88406e631e93e08deee9fde97b12e3e1bf6b0590 Author: Alexander V. Chernikov AuthorDate: 2023-05-01 14:45:45 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-05-01 14:47:11 +0000 netlink: whitespace fix in netlink_message_writer.h. Reported by: garga MFC after: 2 weeks --- sys/netlink/netlink_message_writer.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h index 92e43834efc7..d64400f3677e 100644 --- a/sys/netlink/netlink_message_writer.h +++ b/sys/netlink/netlink_message_writer.h @@ -186,7 +186,7 @@ nlmsg_reply(struct nl_writer *nw, const struct nlmsghdr *hdr, int payload_len) hdr->nlmsg_flags, payload_len)); } -#define nlmsg_data(_hdr) ((void *)((_hdr) + 1)) +#define nlmsg_data(_hdr) ((void *)((_hdr) + 1)) /* * KPI similar to mtodo(): @@ -196,7 +196,7 @@ nlmsg_reply(struct nl_writer *nw, const struct nlmsghdr *hdr, int payload_len) static inline int nlattr_save_offset(const struct nl_writer *nw) { - return (nw->offset - ((char *)nw->hdr - nw->data)); + return (nw->offset - ((char *)nw->hdr - nw->data)); } static inline void * @@ -218,16 +218,16 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz) { sz = NETLINK_ALIGN(sz); - if (__predict_false(nw->offset + sz > nw->alloc_len)) { + if (__predict_false(nw->offset + sz > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, sz)) return (NULL); - } + } - void *data_ptr = &nw->data[nw->offset]; - nw->offset += sz; + void *data_ptr = &nw->data[nw->offset]; + nw->offset += sz; bzero(data_ptr, sz); - return (data_ptr); + return (data_ptr); } #define nlmsg_reserve_object(_ns, _t) ((_t *)nlmsg_reserve_data_raw(_ns, sizeof(_t))) #define nlmsg_reserve_data(_ns, _sz, _t) ((_t *)nlmsg_reserve_data_raw(_ns, _sz)) @@ -263,24 +263,24 @@ nlattr_add(struct nl_writer *nw, int attr_type, int attr_len, const void *data) { int required_len = NLA_ALIGN(attr_len + sizeof(struct nlattr)); - if (__predict_false(nw->offset + required_len > nw->alloc_len)) { + if (__predict_false(nw->offset + required_len > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, required_len)) return (false); } - struct nlattr *nla = (struct nlattr *)(&nw->data[nw->offset]); + struct nlattr *nla = (struct nlattr *)(&nw->data[nw->offset]); - nla->nla_len = attr_len + sizeof(struct nlattr); - nla->nla_type = attr_type; - if (attr_len > 0) { + nla->nla_len = attr_len + sizeof(struct nlattr); + nla->nla_type = attr_type; + if (attr_len > 0) { if ((attr_len % 4) != 0) { /* clear padding bytes */ bzero((char *)nla + required_len - 4, 4); } - memcpy((nla + 1), data, attr_len); + memcpy((nla + 1), data, attr_len); } - nw->offset += required_len; - return (true); + nw->offset += required_len; + return (true); } static inline bool From nobody Mon May 1 14:52:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95mF6fjMz48dPH; Mon, 1 May 2023 14:52:45 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q95mF5lL2z3kkv; Mon, 1 May 2023 14:52:45 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952765; h=from:from:reply-to:subject: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=XmB/4OXmbdnIaFQEKcdaRTtOtjtu/EUfl3N/y+iSPzE=; b=dMvn6/UDSRNNc4cfmm8AHsfyHMjPptWrMIuZsODt72F8q3GsJ6h6GL7w78WuQGXFy1tCMx MhUHjslFT9q9sXlMhX5iU2KyK5Z5VXlSoH6SP82VDog3azZCUxIVIHNsLolSvhfGqdPwDn 3X8q8X0NMA7uMXnu/MBzH82bpuoMVq5841mTQCfKEY8XjYZ+xC0BToKbZkMvEv1mBz9YKk EYU8KLpYYPmqAHw1cYo5AdX16i+3Op2PBRcF9dnoF9YhHhSARWMqhwf3wrzHQ8RdGijhET pEj1zVB9yiQASlbq6Oiw4YXZ/nCTOkW4OZ9GFYc+wa0jTxJwmbZ3jrzs5jwdUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952765; h=from:from:reply-to:subject: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=XmB/4OXmbdnIaFQEKcdaRTtOtjtu/EUfl3N/y+iSPzE=; b=HSNgu6X6oUqm++AzZKEZCM9g894pWnYHMk2135d0Pas5RYu7ZzN8OHMiApbUd7MdvNYCwo 1pj8u7raFdelRL4YlxhGL0X/+KhYh5MDVBqeSIreLiGEAtEMETqtLvXs+mr1+fQ5c/93vz krjlPSgxqthVAM7BRGjmBXlkSYzBmqd7JiaO3Nm3oxrE99btN+4+q6q+pi/GW8GwxV52LJ EVTWOCUvODo1OlcWlGABg8gWE7T24exCAgp1MBQWX4l9rEcsYCC3I2HYck1ktuZDxK7edO gguObiUsrnLeryknTv8wlVZ2vXzc6+KoTmsXVgswlICijtiq7tMs1kIgCIHfJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682952765; a=rsa-sha256; cv=none; b=YbGtFYa8DhylVNVoH0I7FR1GzOE3Vypj8CkwDdeqGb68mmWEEu844Ful6DsdDwJEOIpXx/ 4A/pUq5CZOyczNr9lJ72rCIlPLmKyI4XmWf83sNKqwTW+MH3rlrGkIT0gytyli7J+oVqo2 lHI1Dm2GlTUR9QGEgKlTlvneOhT5LjiymJptJMl4TSKqZL016y1h8KuyEbca1UfswbWL/e /jmSb4fPSC/lw49CMUJXRwFBGgb8GezjqaGfUtiCtBSFfLR7tSNQZjy5US+R42TqNEj3wn GnZwrWzVDWlLVhnbFXgkrgsCmXBIndOHqnQ6nfilWrmoQovFyP+ez0jTlwx+Jg== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q95mF24Yjzkh7; Mon, 1 May 2023 14:52:45 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: Date: Mon, 1 May 2023 11:52:43 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: 3416e102c4e9 - main - arm: Remove TI code from GENERIC Content-Language: en-CA To: Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305010632.3416WV6r012728@gitrepo.freebsd.org> From: Mitchell Horne In-Reply-To: <202305010632.3416WV6r012728@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 5/1/23 03:32, Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3416e102c4e978a394a604012dae1943c7300a1e > > commit 3416e102c4e978a394a604012dae1943c7300a1e > Author: Emmanuel Vadot > AuthorDate: 2023-04-27 06:19:07 +0000 > Commit: Emmanuel Vadot > CommitDate: 2023-05-01 06:32:21 +0000 > > arm: Remove TI code from GENERIC > > TI support is in a sad state for years. > We haven't been able to keep up with all the breaking changes that > upstream do in the DTS. This requires a lot of new drivers to handle the > new buses that they create and all the new clocks that they expose. > Keep the code for now in case somebody is interested in reviving this > platform but stop bloating GENERIC with code that don't work. > > Reviewed by: imp, mmel > MFC after: never > Sponsored by: Beckhoff Automation GmbH & Co. KG > Differential Revision: https://reviews.freebsd.org/D39843 I think this needs a RELNOTES entry, no? Mitchell > --- > sys/arm/conf/GENERIC | 27 --------------------------- > 1 file changed, 27 deletions(-) > > diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC > index 815fd2a1881e..fc4ce2ef146a 100644 > --- a/sys/arm/conf/GENERIC > +++ b/sys/arm/conf/GENERIC > @@ -43,9 +43,6 @@ files "../mv/files.arm7" > files "../nvidia/tegra124/files.tegra124" > files "../qemu/files.qemu" > files "../rockchip/files.rk32xx" > -files "../ti/files.ti" > -files "../ti/am335x/files.am335x" > -files "../ti/omap4/files.omap4" > files "../xilinx/files.zynq7" > > options SOC_ALLWINNER_A10 > @@ -140,12 +137,6 @@ device bcm2835_bsc > device fsliic # Freescale i2c/iic > device icee # AT24Cxxx and compatible EEPROMs > device sy8106a # SY8106A Buck Regulator > -device ti_i2c > -device am335x_pmic # AM335x Power Management IC (TPC65217) > -device am335x_rtc # RTC support (power management only) > -device twl # TI TWLX0X0/TPS659x0 Power Management > -device twl_vreg # twl voltage regulation > -device twl_clks # twl external clocks > > # i2c RTCs > device ds1307 # Dallas DS1307 RTC and compatible > @@ -173,12 +164,8 @@ device spibus > device spigen > device bcm2835_spi > device mv_spi > -device ti_spi > device zy7_qspi # Xilinx Zynq QSPI controller > > -# ADC support > -device ti_adc > - > # PWM > device pwm > > @@ -186,7 +173,6 @@ device pwm > # If we don't enable the watchdog driver, the BeagleBone could potentially > # reboot automatically because the boot loader might have enabled the > # watchdog. > -device ti_wdt > device imxwdt # Watchdog. WARNING: can't be disabled!!! > device aw_wdog # Allwinner Watchdog > > @@ -229,7 +215,6 @@ device miibus > > device awg # 10/100/1000 integrated EMAC controller > device cgem # Cadence GEM Gigabit Ethernet device > -device cpsw # TI Common Platform Ethernet Switch (CPSW) > device dwc # 10/100/1000 integrated GMAC controller > device emac # 10/100 integrated EMAC controller > device ffec # Freescale Fast Ethernet Controller > @@ -251,21 +236,11 @@ device dwc_hdmi > device imx6_hdmi > device imx6_ipu > > -# TDA19988 HDMI Encoder > -device tda19988 > - > # Pinmux > device fdt_pinctrl > > -# TI Programmable Realtime Unit support > -device ti_pruss > - > -# Mailbox support > -device ti_mbox > - > # DMA controller > device fslsdma > -device ti_sdma > device a10_dmac > device a31_dmac > > @@ -303,6 +278,4 @@ makeoptions MODULES_EXTRA+="dtb/zynq" > > # SOC-specific modules > makeoptions MODULES_EXTRA+="allwinner" > -makeoptions MODULES_EXTRA+="arm_ti" > makeoptions MODULES_EXTRA+="imx" > - From nobody Mon May 1 14:58:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95tk6Vjdz48dZk; Mon, 1 May 2023 14:58:22 +0000 (UTC) (envelope-from melifaro@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 4Q95tk6198z3l61; Mon, 1 May 2023 14:58:22 +0000 (UTC) (envelope-from melifaro@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682953102; 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=PTRtQNzpkr5FVEddJcLRIWVbwQ1pufCHCEe3U2NipIk=; b=U4K50Nq/zepkRiiVDCCOsCg8OL77G79mMoHxN1owa008Lc6Fl36OsbAFWqSYzwFSQePVMq Kn/VkotdU5BntYmAMf4DYoRvNvEe3dGuiXTcqKOkKVUUVWOxQorn96vQPwnlBafCz2ofge QvJS8lwJxbdUb6ygO8aEhw4MdxjJTySwsIQBLDYC6UvaKg0m46jEi0uzBng1bRih6Im6+s F7U8sddS62Q9Nnh5xGH7kyNiLnfzZKrguxs5YkmqtVR5k30LbrEZh1xrHzuOgyjEU2jjz2 fzB3AtWfDpueE+ahvsLzXyEmZh7YLWXuWzBawdt4lCXrrgw4yt5SCy1+ZcXMzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682953102; 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=PTRtQNzpkr5FVEddJcLRIWVbwQ1pufCHCEe3U2NipIk=; b=LPY3uL8fkK9NqrCMikrZIoxELI8DFz9OQW/CYDow2zBK4WFrYJtUNCqHTh8sc1j+5hscpw gupPYAa41pVg0D9S/KreQLT88mj9QMAli+R5Q2jJw3tsPRyUFGttT5IiVc/ZceWVOuI5fs Fmo3RdjLffhocr8fuAIxZmP+7f5w6SCQDrb9ONMDUIzVxZV2kyiyQuyVtfO9g4tqMEwl4q cqR0IHyw5+/HT33eHEN6OOOwumcz/Lv95imHciLzUCBi2l4rtt+RFkTFDTkBL9ltlDAVED SCL6h+XMNwa7PT3SnnUQm28m2LaNRMMgmwiL7aedxyR5W6slEZtDT8EIY5Cj/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682953102; a=rsa-sha256; cv=none; b=NTJeF6/9uIfv5ZHkpZkVMUgaA3DRBHSe/lXZ+Sqky+0gDsmy83UXqMNvK2ji/tvWbKxGt8 cFyaMHaMsyXVSZchUp1F0UmcHuxNz4Wh9dOnj8rqQ+l5B1/acSaoNXWATAJEi0cRaA0ScX 52o/3DHAjWOxGQVj4KePgbCv49RLPcCZm1MO5ampXrCC7Lp6P9jg832O8Sb59fu4RRO6y0 I39iBMd2DaqGoBV14qrAMe6Et4ahTNvk+qqPc8zSXKhSH9WXBY5Gaq5yeYUONbKoKO/hzP OeAAxV1wIffqL11lGAU4WH+WAAe4pZzBwMvh8PBpjTbkOI5YjLSQIYhy+W35UA== Received: from smtpclient.apple (unknown [IPv6:2a02:8084:d6bb:510:3cee:d979:6270:71a5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: melifaro/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q95tk1NHDzkh8; Mon, 1 May 2023 14:58:22 +0000 (UTC) (envelope-from melifaro@freebsd.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: git: 6a09a7f1e9a5 - main - netlink: always zero provided header buffers. From: Alexander Chernikov In-Reply-To: <58128e85-82e3-e529-2d65-1145e6c84c09@FreeBSD.org> Date: Mon, 1 May 2023 15:58:10 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7CBFB961-B052-4F95-BE04-8865D9B49034@FreeBSD.org> References: <202305011409.341E9wop057673@gitrepo.freebsd.org> <58128e85-82e3-e529-2d65-1145e6c84c09@FreeBSD.org> To: Renato Botelho X-Mailer: Apple Mail (2.3731.400.51.1.1) X-ThisMailContainsUnwantedMimeParts: N > On 1 May 2023, at 15:30, Renato Botelho wrote: >=20 > On 01/05/23 11:09, Alexander V. Chernikov wrote: >> The branch main has been updated by melifaro: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6a09a7f1e9a52fb25158ca60216c6b81= 7f8c0b71 >> commit 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 >> Author: Alexander V. Chernikov >> AuthorDate: 2023-05-01 14:07:33 +0000 >> Commit: Alexander V. Chernikov >> CommitDate: 2023-05-01 14:09:47 +0000 >> netlink: always zero provided header buffers. >> Reported by: KMSAN >> MFC after: 3 days >> --- >> sys/netlink/netlink_message_writer.h | 1 + >> sys/netlink/route/neigh.c | 3 --- >> 2 files changed, 1 insertion(+), 3 deletions(-) >> diff --git a/sys/netlink/netlink_message_writer.h = b/sys/netlink/netlink_message_writer.h >> index 57fc1bf342ea..92e43834efc7 100644 >> --- a/sys/netlink/netlink_message_writer.h >> +++ b/sys/netlink/netlink_message_writer.h >> @@ -225,6 +225,7 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, = size_t sz) >> void *data_ptr =3D &nw->data[nw->offset]; >> nw->offset +=3D sz; >> + bzero(data_ptr, sz); >=20 > At first look, this line seems to be indented wrong. But looking at = cgit web interface it seems that other lines are wrong and this is = correct. Ups. Somehow I messed with spaces. Thanks for pointing this out! Should = be fixed by 88406e631e93. /Alexander > --=20 > Renato Botelho >=20 From nobody Mon May 1 15:29:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96b6721Bz48gQ8; Mon, 1 May 2023 15:29: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 4Q96b66Sckz3q8K; Mon, 1 May 2023 15:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eOAKDarBd43RjYhCx2qKIv+Yo0bkEbyYCdoBNT/dwv8=; b=q8jzs9tHs2/k5WBaFC7vNpMRq0wsZj1kkEHaWnvvrBKSEB3G6b1kpuVuin7KIK0GKglXRb QTCI8ZRdpG74HQoSwiziwP5XeazcQRz1FtnA6OdWV19T4piS3a462wYi0hqGajhZOuSP7F 7VJJj3+9I2KuUreTC3p7b7pNk0M91g4Kya76pJZZGuGiNt7srA1Fcq3Wtqrvce+W7RYUcY 24JvbKTHioBRmqUXdkmtwTz/ZYAVItjGxkUtmYUMIGxtxb7wzMWIOkfrcQOHQv/kbdk5A5 wwttvt/QKuBaQTannelKRsUXuRu9xyxig7NiPnbaF5nTgBr71GgoLAAGIKulyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eOAKDarBd43RjYhCx2qKIv+Yo0bkEbyYCdoBNT/dwv8=; b=Qt1E+FcRwVN0Y5v8ZQh/ckDzB/Mns98unkhWbiRS+pTFecJPjPAyOI7yQhNBj522QW4ORv 2Cv5nYHfnWI+Lyd3ZX08aqzz8TBpnJpRpohqd2K76i0HLSO9GcBfJC4SdA/UYT7XZ3mSqy NM6e1zUc9UjlZsI8PwUyiJg516QAIQ5/9IPJr4sM7Jx1hHKAAfo6Fbu7V5OT03twmPpZfa mNW7EgGD+4PyBHRrXSjZpgr28i4bwSHP2g3xWOdORSRPBdraNpSbw+dL04Yla3BOgDTLSg oTaR2XBYaJ/Ane6FS+4MWQt0+tCpGcRfXPhVs5FK1KKgHJHww5FMUPqNO8h9ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682954994; a=rsa-sha256; cv=none; b=QIqB+4UbhwN3P9SRh1E7SVIXfrvk8ELraq0m0y1MhEVix1b7uQgbAG9V9KoYAfTBHtJSjE MaDB1MeNXW9+FJpxe7gCZTMu0Xt13QMTDL27pu/6CV8RpsQzjjnIJPS3Bu1knsfRStydrx 6rbfGhwMRpUMkZd7e/7wtHp0w7BgGtk1KFEWRoiuySWm/fQLSUv/zr0FzW+JqrukP/TmpO 04OqQA7NW9TmDmaD9RmZGjGyPR1g1QEj2hmzPBXDsJk2ysFLr551CLRZoE424AFoAGB3dX 4WS4DSGVUciUnglosGAXjTkg3I2HpfH0CkuG5R6j8pr/UycCweHh0VQGocQe1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96b65NShz19F2; Mon, 1 May 2023 15:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341FTsqW090080; Mon, 1 May 2023 15:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341FTs4l090079; Mon, 1 May 2023 15:29:54 GMT (envelope-from git) Date: Mon, 1 May 2023 15:29:54 GMT Message-Id: <202305011529.341FTs4l090079@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: 865362061dac - main - mfi(4): Refer to mrsas(4) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 865362061dacd06562dc839e97577cbe8319f7f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=865362061dacd06562dc839e97577cbe8319f7f7 commit 865362061dacd06562dc839e97577cbe8319f7f7 Author: Tom Hukins AuthorDate: 2023-04-19 20:03:09 +0000 Commit: Ed Maste CommitDate: 2023-05-01 15:06:00 +0000 mfi(4): Refer to mrsas(4) Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/722 --- share/man/man4/mfi.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4 index 12a4ec5290da..9be944d8ae9d 100644 --- a/share/man/man4/mfi.4 +++ b/share/man/man4/mfi.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2019 +.Dd April 19, 2023 .Dt MFI 4 .Os .Sh NAME @@ -81,14 +81,14 @@ If the tunable .Va hw.mfi.mrsas_enable is set to 1, then the driver will reduce its probe priority to allow -.Cd mrsas +.Xr mrsas 4 to attach to the card instead of .Nm . .Pp .Nm does not provide ATA TRIM support. Refer to -.Cd mrsas +.Xr mrsas 4 if TRIM support is required. .Sh HARDWARE The From nobody Mon May 1 15:29:55 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96b81fbJz48gQH; Mon, 1 May 2023 15:29: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 4Q96b76yGbz3pkw; Mon, 1 May 2023 15:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U96e8rPiDF9lTYmOIfrH8IsQDH9fjCbiiYiC3uWZabY=; b=rltajk64SBEg9T+T5tUjbuTUGH0n7KmpWsjk0tvInNHeQXjOKpWgKiavwEC8MK9RaLwzLG fvrCGqU/kTcResv6OwvbKJmwoyQWtg0+obzDKFZENOHvZU/H86Jg+k9CRny5+sz4B6yJc7 Sv3wjl0qoyEW9xE73FfeghcK1fDJO9phAvrwMCnnJZJiT4kO9HhzcaIxVRug/vqrwnBCgD L/j+zSeojaU31iFDIy7v3StEaJBF/16KZx2+N2zLDkgQw7WrPhprkfAmFwykE/1eDXP8au E8HgVrRPstsSVU/EDo445Z35kKjafFDAwjIkh63P//r10At4SqDmZoBxZ43R5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U96e8rPiDF9lTYmOIfrH8IsQDH9fjCbiiYiC3uWZabY=; b=EIN4c3xwKhjN5HUX6fbp38MRJhfEKFwKObLt4R0fkkQZCyqZ7FUa4yvZV3c2e6n5jWQ7O5 0q5O8v0XT4fH3Hg14fmTMdUWADmU/PwO3FB6ZFOq/RUg7Hx5Ydrgg0+WxXNlfwdKolb6DP 7HZUkv/b4HlXYGBcZhMQ1PgR7eIorJuL60vocFOTFuv8JeSTis2rkd0num+TrdsKvaF2P1 4WypvELHFNsX+j9HjSdxCo6DQj2eg1sBATy9vAbbl02uCP1iP6xpshzCkndgxVFbkgtpZy u8gm7+3SiYn5pdfTTyIFmtEtjpINbveaRgVKsTrx49PqcV+gQVDoDZ5LfVgH6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682954996; a=rsa-sha256; cv=none; b=CKoWiGl1XIVv5QFmpM562RuJ/VKKnO0lQ0xg1lKk8SDOa9mDXcPeOAPSXm7IMoqhXVDxcT N/qX5w+0kYCbHyR+LmbgWMDaVkrfZR8TRvE6eSSl9SRo4oTE3zXtHfbpWxp7vipJds1045 ShvN9Zp4TJzXqox1g6JZxZcd3BzAz2t28sHlcu0bC6OeSnmyKPCSPsZjNKJs9NpYqlBsSR OU7gLVG8f8LD89SdiFQPqSKvv9LMANLLNIJ+vAnwsEgpunGFACFK8UVxS0pmu80qlunmBh SeS/WhILRu5BL+MrekcUslQz65an2iPsnHA3fHTCc8qKxioLfLK6US6w+3UzPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96b75mmcz19Bd; Mon, 1 May 2023 15:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341FTtjV090105; Mon, 1 May 2023 15:29:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341FTtjM090104; Mon, 1 May 2023 15:29:55 GMT (envelope-from git) Date: Mon, 1 May 2023 15:29:55 GMT Message-Id: <202305011529.341FTtjM090104@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: e5bc2547a5f8 - main - geom(4): Add cross reference to geom(8) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 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: e5bc2547a5f8173d1e5b72c1713a54dc89e29620 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e5bc2547a5f8173d1e5b72c1713a54dc89e29620 commit e5bc2547a5f8173d1e5b72c1713a54dc89e29620 Author: Tom Hukins AuthorDate: 2023-03-27 20:50:25 +0000 Commit: Ed Maste CommitDate: 2023-05-01 15:06:00 +0000 geom(4): Add cross reference to geom(8) PR: 264387 Reviewed by: ceri Pull Request: https://github.com/freebsd/freebsd-src/pull/702 --- share/man/man4/geom.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/geom.4 b/share/man/man4/geom.4 index f6988c663f54..91ba9360ec3b 100644 --- a/share/man/man4/geom.4 +++ b/share/man/man4/geom.4 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2019 +.Dd March 27, 2023 .Dt GEOM 4 .Os .Sh NAME @@ -445,6 +445,7 @@ Dump contents of gctl requests. .El .Sh SEE ALSO .Xr libgeom 3 , +.Xr geom 8 , .Xr DECLARE_GEOM_CLASS 9 , .Xr disk 9 , .Xr g_access 9 , From nobody Mon May 1 15:40:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96qf5XjHz48gmW; Mon, 1 May 2023 15:40: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 4Q96qf56xSz3rnG; Mon, 1 May 2023 15:40:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vmbunr5ciTc57M5jNDNSwPlNulnF3KMCjDwMKUyUAo=; b=hyHappalyqIbf3peisNy2tNfyEBeSTF5NP7Il+IWQziWitLe9g9LOnvV5/PuXZ+TD7Quck BQEvGaXzKvbfQ2pl3BHtH6xaTZOU0ppME9VHZ4b0YiyQYL3AVw8rZr1LYXyJOSiWg6lvDu YQzj+bxsOOs2kANdQkphTyCuV8+dumlOxohBsXJebFmzjm6qDY75pPSXpjzx8LtbMgLV4P xiLrnUknvcZaTroszewbukz4aszk0WGyf8vyibxRxbQNjfivrC7VS7PIjy5efUH2m2dv6b 4lq6IjQh50RmBapLOLCNyGvnA48kOPYTG6cMX1rzdzf1hBO2c1ZrSbvhfUz2AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vmbunr5ciTc57M5jNDNSwPlNulnF3KMCjDwMKUyUAo=; b=M3DcHFuzuwo+lgEs36UJ5qMm45YyyQqgUOLerWrJYq4oCKqTZ2lFwEhDBKyPzMeDuubpBV Xm5DDcdJ3FHnv/CQyAuGqMMN4Vu/StwduTvcXrijjgKoEhQgdV8gUCu1shEsUUNPMWMBfe JUu4kdGVfaAEPwGY/hK0igQR86nE1doUjRlWny1oDMJvgKDjfnUQGMWNbrnRbsQlScfUuK W+/WgdHb/XoDxU5TRKMV7Q6sTr4efou12J7lvlHDMDZOPcspDCwAhK3dtyKGHg19wMhRvT Ih4yr1kZ85UKgj6L2JyCib4cvPnxD0/uohd4UrjIXwRX1T61Q4V3fjnfv3DWQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682955646; a=rsa-sha256; cv=none; b=RNVmfbansMcNX/Q+N6+5GYKfUvyomM+7S+IYehzTgEmrVF5lAsUWr6xsCPBOv4TY+B0TR9 o/ykQiCvvYfdPt+zN8hzOycgs/XNtCXqoF2CWxDIX6ztYydSqxMow8fgX+DTqCfaQiKEnu 1sKnhWnBpeYDbIZARIT9NkgcpU4zccwRpPgRxwMC5BktbB9qDgPRCSQCDpcBqcirt3IbqL bO1WtfBEUQ9vkJfSPOmJK9lvjiXMR72DodOhGMmWSlpglSKpO4tKHY6+PNp2q+m6mcLPiy dFl5VMhsnw9aBE/lyFfaO4bESLLdbFETOcWg3VJYEXGeRjLTbgPY3+8zZrL3Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96qf4BF7z19XP; Mon, 1 May 2023 15:40:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341FekMT016442; Mon, 1 May 2023 15:40:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341Fek6p016441; Mon, 1 May 2023 15:40:46 GMT (envelope-from git) Date: Mon, 1 May 2023 15:40:46 GMT Message-Id: <202305011540.341Fek6p016441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 56da525b535f - main - hwpmc: Fix a typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56da525b535f8537205bccd1f4b25b3ce354ca62 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=56da525b535f8537205bccd1f4b25b3ce354ca62 commit 56da525b535f8537205bccd1f4b25b3ce354ca62 Author: Mark Johnston AuthorDate: 2023-05-01 15:19:25 +0000 Commit: Mark Johnston CommitDate: 2023-05-01 15:40:29 +0000 hwpmc: Fix a typo MFC after: 1 week --- sys/dev/hwpmc/hwpmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index ff6bfbd4322f..5d29931c90f0 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -1248,7 +1248,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) if (core_version < 1 || core_version > 5 || (core_cputype != PMC_CPU_INTEL_CORE && core_version == 1)) { /* Unknown PMC architecture. */ - printf("hwpc_core: unknown PMC architecture: %d\n", + printf("hwpmc_core: unknown PMC architecture: %d\n", core_version); return (EPROGMISMATCH); } From nobody Mon May 1 15:40:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96qg6ml5z48gh6; Mon, 1 May 2023 15:40: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 4Q96qg67YVz3rwb; Mon, 1 May 2023 15:40:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S3iCNXTG809XJwu+ERned5KistTMvnoT7tCTvGAzYJk=; b=yS5hsvhYD1Qo9CkcQ/b3YG8YY5JisD+5Ti3zJUvrcB7CNt4i1+inLwX5WNJEPQM1GuMmJU VA6SG0Zgz95ZkUYVntN9QhwTdM2iSJUajQnYjuLS0cKwi4GqRQbWOUjiQrJFLk7JhDu7Yd DlqaGgjMm5QG3BHIgaKILN+1XUsLXPGwhpICgfFgToVcvEHE9E4Rnc3fGspMw9dDyw6XRB HDvQysg669JPskztPXlWbWMNm00Ctou4ubY6e/mdpEdqJzg6RQF8j7OrtvTYNNqcr9jttB gJqV3HP4yvX0Olh9OykqWBaZRXYBW7U5beWwM9vlx1tN2AfuwodWWwMx4a18NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S3iCNXTG809XJwu+ERned5KistTMvnoT7tCTvGAzYJk=; b=Ylp9mOvi74P0O/zU72Tg/J9ltJwM1YG1L3UMMq9vd9DD/xTWlxwSuNRugw+WfYXQhDsoXT 0VWuSKrYhl0VQmvnaA1JKvnMFweYSYP2uaxwqt5dJik39ESiVsZuFAberx70Nu83ePtZwh QoAlDYNUQKWfHOLVBOUn1sOGgL/QCRFadRuzEFlg6x02iRuFnBw/pomEp54XGS8a7Q09hH TaHL9gfUPfEW0ll2ioFHrmqhxLfql/S9aTIklfY7+h/Ccy9RcOn3qwVuIKMuZBef7YQG/f PlFq6MQJAGAexWvhMz2D9sLmzKwEPrfkY1ZgW1/zdOhku1TiaxnDOpDOGpB5UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682955647; a=rsa-sha256; cv=none; b=T85jUDXblCG7tJKphM7py6O0D3dhSgKlSMqx0NYTiM2gc/yqq8JnJoW51dvFgKztwZX3PV keJHKcQidUQmp4f3W9O0smUJmRiCr/DyaK1HNnowrQlIckxsPzpQcOlPzqsk03k+WgDyo8 Db093fQs6mWes22e8dGd3Di/+Ie1ldnejgvKi5vLChF98V4G9Hu8GLbFOs98/QETPUj+Dq y9KRK0p+Kd068YoFEpZgxTuOt/eivOnp3GQC4N9uiRzN9ECPRHvI1CG7X5+kMQDUnK4lq/ nko1+TNZiWjrP2Tjf64lKiuro7olwTeY/rFo6iwOXQS5dkfyTnxSEkEBa9fVUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96qg4dZLz19s1; Mon, 1 May 2023 15:40:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341Fel75016489; Mon, 1 May 2023 15:40:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341Felmr016485; Mon, 1 May 2023 15:40:47 GMT (envelope-from git) Date: Mon, 1 May 2023 15:40:47 GMT Message-Id: <202305011540.341Felmr016485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: aad1685066fc - main - fbt: get rid of redundant defines List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aad1685066fc2430d6ee9b3025369ba6bd513333 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aad1685066fc2430d6ee9b3025369ba6bd513333 commit aad1685066fc2430d6ee9b3025369ba6bd513333 Author: Christos Margiolis AuthorDate: 2023-05-01 15:20:34 +0000 Commit: Mark Johnston CommitDate: 2023-05-01 15:40:29 +0000 fbt: get rid of redundant defines No functional change intended. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39882 --- sys/cddl/dev/fbt/aarch64/fbt_isa.c | 2 -- sys/cddl/dev/fbt/arm/fbt_isa.c | 3 --- sys/cddl/dev/fbt/fbt.h | 3 +++ sys/cddl/dev/fbt/powerpc/fbt_isa.c | 2 -- sys/cddl/dev/fbt/riscv/fbt_isa.c | 2 -- sys/cddl/dev/fbt/x86/fbt_isa.c | 3 --- 6 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index 07f02e2edb72..26d750bf540c 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -42,8 +42,6 @@ #define AARCH64_BRK_IMM16_SHIFT 5 #define AARCH64_BRK_IMM16_VAL (0x40d << AARCH64_BRK_IMM16_SHIFT) #define FBT_PATCHVAL (AARCH64_BRK | AARCH64_BRK_IMM16_VAL) -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" #define FBT_AFRAMES 4 int diff --git a/sys/cddl/dev/fbt/arm/fbt_isa.c b/sys/cddl/dev/fbt/arm/fbt_isa.c index 0be28b56aa6a..d52809c9f227 100644 --- a/sys/cddl/dev/fbt/arm/fbt_isa.c +++ b/sys/cddl/dev/fbt/arm/fbt_isa.c @@ -45,9 +45,6 @@ #define FBT_JUMP 0xea000000 #define FBT_SUBSP 0xe24dd000 -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" - int fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval) { diff --git a/sys/cddl/dev/fbt/fbt.h b/sys/cddl/dev/fbt/fbt.h index aa9bce564fa0..2816eec992ff 100644 --- a/sys/cddl/dev/fbt/fbt.h +++ b/sys/cddl/dev/fbt/fbt.h @@ -34,6 +34,9 @@ #include "fbt_isa.h" +#define FBT_ENTRY "entry" +#define FBT_RETURN "return" + /* * fbt_probe is a bit of a misnomer. One of these structures is created for * each trace point of an FBT probe. A probe might have multiple trace points diff --git a/sys/cddl/dev/fbt/powerpc/fbt_isa.c b/sys/cddl/dev/fbt/powerpc/fbt_isa.c index eb7feceb269d..7f52308e1f76 100644 --- a/sys/cddl/dev/fbt/powerpc/fbt_isa.c +++ b/sys/cddl/dev/fbt/powerpc/fbt_isa.c @@ -46,8 +46,6 @@ #define FBT_BR_MASK 0x03fffffc #define FBT_IS_JUMP(instr) ((instr & ~FBT_BR_MASK) == FBT_BRANCH) -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" #define FBT_AFRAMES 5 int diff --git a/sys/cddl/dev/fbt/riscv/fbt_isa.c b/sys/cddl/dev/fbt/riscv/fbt_isa.c index baf268028988..5c8340d9f001 100644 --- a/sys/cddl/dev/fbt/riscv/fbt_isa.c +++ b/sys/cddl/dev/fbt/riscv/fbt_isa.c @@ -43,8 +43,6 @@ #define FBT_C_PATCHVAL MATCH_C_EBREAK #define FBT_PATCHVAL MATCH_EBREAK -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" #define FBT_AFRAMES 5 int diff --git a/sys/cddl/dev/fbt/x86/fbt_isa.c b/sys/cddl/dev/fbt/x86/fbt_isa.c index 481e65bd761b..8c536335791c 100644 --- a/sys/cddl/dev/fbt/x86/fbt_isa.c +++ b/sys/cddl/dev/fbt/x86/fbt_isa.c @@ -57,9 +57,6 @@ #define FBT_PATCHVAL 0xf0 #endif -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" - int fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t scratch __unused) { From nobody Mon May 1 15:40:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96qh6m0qz48gmd; Mon, 1 May 2023 15:40: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 4Q96qh6MVdz3s4C; Mon, 1 May 2023 15:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955648; h=from:from:reply-to:subject:subject: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+QY7Fkym7acnMeba4wRvUhJJRPfzHSro/xZ6ik+CvI=; b=oChBSBqgmhmlYVLcXfORJrO658Xy6A+M1dORIgtUB1Ia/J2CUrgFxdtCh8T6+4TaU3FJDx p7tGwPmRqIpXdWRlGrE43cvb+oTK2f8/8prgNnJTKBRDAK3PBsdyTUdnq5EBhAnA+JADGZ indGX15Ie0jXE4odmItdflYLR/fIvxWh0AaS0Sz6O4nZqkA6VX7gL3EID1oYyd7ysenHMR J0h4xrMxxJ5QMlKPdmXE9+YWlfyAtaD9jBPN7M8hdkF4gUw/CExeeFAxcPQcVTZ9i2fJ41 xAGP0rfQwLc0dkpKU4LVqZTRJvthXUXyEXgq6Jg3GPCgcErBpMa8aGpxG5MsqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955648; h=from:from:reply-to:subject:subject: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+QY7Fkym7acnMeba4wRvUhJJRPfzHSro/xZ6ik+CvI=; b=NzSqbQItyXVRRoglzofAIW+i/E3ZdeMVhbAOlpmDGlhDKbXjfg4BfhcmddE3mm26GW1sy9 PStgOt/UbIZOYh/F+VRC+6wguM4hfVbgjTrh68Qm46QcWW/V8cvqnhWzrBRs5INzd6QK/R mSAfshqYFkxPvE/pYpdzV7tMcTbAEaDa9viODNZfoh7LgvmmHU/GzMNu0iLJIKSZBG1R6D WVKLRHcIzlbsyaDvsVcZNVQPUdsK5Dy6zxY/toP5yyeOrp27PfBUKlx6gFaAOKZVnB6fBX x3klNDN+FQaB2MAj+yHv95F22xmm49p7S1TvTRSf14KddbLrFq+5IbLS0ZDlkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682955648; a=rsa-sha256; cv=none; b=UsN946jrW9X1RLsxMohJOxNgpQd4UIPUCd6eftpKwu007PqXF+clZk3UaYLCkbDqpdwcCq 6sxsh5jIvAWahUupgOoVfzpIVufdIQUJLUoNIJG0GjsaOhmvnjOVu94Zo/xk+1vQ19u8b3 cGEmeuFbr/K7pBhLe3CzBf9iHeYfcqAWAsqOcH8hOhsuG/uHZWrxC8gyZOx52+/RwAmOa/ K9NuczjNHzEeKyuYp9cZs/p12nBZjNRSZIinK0DmtjdiUU3ZL98DcXNx3PjgUucDoL+4Af GNp/viHIvCQ5ZJ7GGNZ1dpQvN3Zgn4SWTpL7dU5MlPgRz+t4m8a4z2OV+EpcTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96qh5L1Dz19Fv; Mon, 1 May 2023 15:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341Fem5v017375; Mon, 1 May 2023 15:40:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341Femeh017374; Mon, 1 May 2023 15:40:48 GMT (envelope-from git) Date: Mon, 1 May 2023 15:40:48 GMT Message-Id: <202305011540.341Femeh017374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e11d11c543e7 - main - kinst: test lock in kinst_trampoline_dealloc_locked() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e11d11c543e7303685c8b5a32bb0338cd3e61f1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e11d11c543e7303685c8b5a32bb0338cd3e61f1e commit e11d11c543e7303685c8b5a32bb0338cd3e61f1e Author: Christos Margiolis AuthorDate: 2023-05-01 15:22:37 +0000 Commit: Mark Johnston CommitDate: 2023-05-01 15:40:29 +0000 kinst: test lock in kinst_trampoline_dealloc_locked() Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39883 --- sys/cddl/dev/kinst/trampoline.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cddl/dev/kinst/trampoline.c b/sys/cddl/dev/kinst/trampoline.c index ba61faa2b3ab..6614a6ed9302 100644 --- a/sys/cddl/dev/kinst/trampoline.c +++ b/sys/cddl/dev/kinst/trampoline.c @@ -163,6 +163,8 @@ kinst_trampoline_dealloc_locked(uint8_t *tramp, bool freechunks) struct trampchunk *chunk; int off; + sx_assert(&kinst_tramp_sx, SX_XLOCKED); + if (tramp == NULL) return; From nobody Mon May 1 18:04:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9B0w6tzhz48pq1; Mon, 1 May 2023 18:04: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 4Q9B0w6DY7z47rv; Mon, 1 May 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682964240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA0+yaR2bH6M5iXNhua5h+BIUmgTE++3RyyC95aHzQQ=; b=x5+fN39UjN1sgzVM15mRefw8FTnBU/glljaOfu5WX5zBPXC1UWMbbC/auNQy4w2r5MXQex 7Uf5iZYghBsGWfXxHIxlqak/TXN2kDMQWFekQFvCq/WY0Mr7yclK0LqG7utMUqCKHYRDmA CTK5viKwaybEoIEnXReRtezWQqgU3npq8+zKbLaidc0sAw4rHmDrtyZ4OPXqc2qbnn7aqa JXDfig5RcLa9F3sDdHK3qhmS08/duV3q+/H6YZ9ie+ioTdv0rg7hjmG4NemsNOjPMHqCg/ WvzbTWE2lTlARy5PsHrzu9KAtrEOYpavWiD7tdmBM4E1/vY/MKwcCpucb3mg5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682964240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA0+yaR2bH6M5iXNhua5h+BIUmgTE++3RyyC95aHzQQ=; b=O6Rh+Aus0iixmHvVbjTmlv8vlccX5FO8PrUHg10ftGzGTqiVTqvf4bnK6jTbdZc2T7vv9R k2f7lWEcLAPLm/CiD1hFT6otqglyZw/wOiJ9wkYeUDmIxZhbCCNmZX2q+M5yimliL574MC 6f/ait3OUcKeGmrMRN4TUdg5a7ppPa8m5873JIpGhoWLJtMCIsVjQk64S3HC6NgwyKmFTl QrW6nDAzR9uX+YrLNbEooa/7v4U3yzHVc+v028BXynWU6b50RjLsg+42q9unZtSlK5ES5E DbZGYRUrFpBhpsIF/oNa4vTzs+PJtfNiU7duU8ck+nzHKROMcHPsxetN6YSt7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682964240; a=rsa-sha256; cv=none; b=a6My7gW/k363IekNPayGkv0aIfE1RtT7XauNqKmr5RY9AhQ84AZ7nv/WF21RoYy19fIUDd sBowQ669ZMPowRbMjJLvtFIa0ks5Q44jH8HFHObwQ2KKC+otwzvctEYE3AlnFpJpwj4Xhy Rqq5iXWzcPSitYNUMVnFfMg/xaHVLUFZSP94BmkYgtoDhMtbQMLhZ5EVnRPTANVmqNWIrT aCVpXE2QegtoJu1kGzEnq+aTeoJ6OQ2PW3LSZT/VehYyhipXJqEw7CeDLN/ffPAMtU74M4 JbM56fWQU3lyKJU8yIzXB00fi4xQ4pGmDqMD0O9Y2LXWpK5uyxgwhEDssN7ZgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9B0w5GwMzFyY; Mon, 1 May 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341I409h054187; Mon, 1 May 2023 18:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341I40xr054186; Mon, 1 May 2023 18:04:00 GMT (envelope-from git) Date: Mon, 1 May 2023 18:04:00 GMT Message-Id: <202305011804.341I40xr054186@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: 75baf3765c68 - main - Cirrus-CI: set PKG_FORMAT via top level `env:` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75baf3765c686547e8e4a5510858f45c23ccdec3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=75baf3765c686547e8e4a5510858f45c23ccdec3 commit 75baf3765c686547e8e4a5510858f45c23ccdec3 Author: Ed Maste AuthorDate: 2023-05-01 16:45:36 +0000 Commit: Ed Maste CommitDate: 2023-05-01 18:03:32 +0000 Cirrus-CI: set PKG_FORMAT via top level `env:` This ensures consistency among different CI scripts, including future ones for pkgbase work. Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index f2c8fa83c59f..f560e9476bc8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,6 +10,9 @@ compute_engine_instance: memory: 8G disk: 40 +env: + PKG_FORMAT: tar + task: matrix: - name: World and kernel amd64 build and boot smoke test @@ -46,7 +49,7 @@ task: - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes buildworld buildkernel" package_script: - - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" + - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes packages" package_check_script: - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG" From nobody Mon May 1 19:28:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9Ctl1pqVz48vjn; Mon, 1 May 2023 19:28: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 4Q9Ctl1M7Xz4Mwx; Mon, 1 May 2023 19:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682969327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D4OuiSfR+Ioq/kpqeQhiuNJNsa0sfFPLiKxDpPXrFUA=; b=eauecoYqd60AiepqBEYXkitgjsFrOhVQMJxPE0vnEcnr6SVd0xm4BaFNfaBiEQNUnhOvf2 alzQYYqG5atGLbRohiipupu2ljA3gNV4pKBHTCJ99U7Vze9mVlZ40p6cyJV369zGM2AhzE 43LVH3FWU7VZR5yJIMxD/plx0oAXoEIvWyRu0w4cyBtT0Q+VfG+hcBmWZxzEhS91WxVgBd ZvMqRLJoVXFy3wU+E0N8YaKMTOrpt4+rVpXiDJ5EWjqChaEQFR5whxdIXgTxXR5WYttK+p ijZUKD63+TV42NlfiEZvoouxtQpoWmSy65PhmPFry1MnSBcVloWrWh5URf4UnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682969327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D4OuiSfR+Ioq/kpqeQhiuNJNsa0sfFPLiKxDpPXrFUA=; b=kYc4gVBKYjt2JJHJ3SObO23XflYS054oohsyo+ERc1yn5YxVZbQ+VtfP2PYErfPQiXO/3o N/HpN87Z82aqBtxFH2ZCH20UUX42SWptoupkygvp5lpvaTsDisZEslQkxFQyTunET0362V fzoW8XegjUQfXfwbPqSwpP6oIo8/RzQjjpN9jca0ge7wo1j/d3Av31cD9sAl6QdTsj9QC5 Zr1GRCPOHQDj2SdoG4JmTymn3cjYkjlqah4AGzqWA0/eyftcPfiJabjUQP9i8jk9K+oSFP MIWmlgd9sBQSyBFakSLcO1NYN2Xo9ts+LDXj+qnmfGRPOsxL09v9GmbRAUpO5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682969327; a=rsa-sha256; cv=none; b=FbZQPmRIXFavU6nkHI+lMZ+dN3/QG/hiPXtj1bkzFGCREX7luD+q2f4btDYWxdhCpipvKp 8ryG3st7KcxjIyVbr256K1gYNu4rTNOcYjk2M8gWLT7HciRC8Czv4fn0cbA5E8VJygoUVb FyAKrCV+kouLB0ODUjx6381qdXgp1H4Ianh8EGw9FRK7UDpj+anMZaHSUhsCbd3xiKx31p C1JR9g8a8gJfA/oM17M+AQ9D5g5Lr41qiOZzgfrzIE05uDcdZSCmNg+xsni3gRREbKivYE RE9n/3OUZr6tDbFhG9lEzrs2QMHGsWi/zVrJOmzJ5/sEWymV6zDWeaerUS5FBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9Ctl0Lq8zHsc; Mon, 1 May 2023 19:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341JSkXM087162; Mon, 1 May 2023 19:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341JSkmO087161; Mon, 1 May 2023 19:28:46 GMT (envelope-from git) Date: Mon, 1 May 2023 19:28:46 GMT Message-Id: <202305011928.341JSkmO087161@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: 2a3bd0870869 - main - pkgbase: hide duplicate METALOG directory warnings under verbose List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a3bd0870869819354b5ea65761d13e5e2987697 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2a3bd0870869819354b5ea65761d13e5e2987697 commit 2a3bd0870869819354b5ea65761d13e5e2987697 Author: Ed Maste AuthorDate: 2023-05-01 17:25:18 +0000 Commit: Ed Maste CommitDate: 2023-05-01 19:22:36 +0000 pkgbase: hide duplicate METALOG directory warnings under verbose Creating directories multiple times is an inherent side effect of the way installation is done. Hide warnings from duplicate directory entries (with identical metadata) under metalog_reader's verbose mode. Duplicate file entries are always reported. They currently generate warnings but will be switched to errors once the few instances currently in the tree are fixed. PR: 244596, 271178 Reviewed by: kevans Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39898 --- tools/pkgbase/metalog_reader.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/pkgbase/metalog_reader.lua b/tools/pkgbase/metalog_reader.lua index 3e8cf8461914..9cc5fd727923 100644 --- a/tools/pkgbase/metalog_reader.lua +++ b/tools/pkgbase/metalog_reader.lua @@ -392,12 +392,18 @@ function Analysis_session(metalog, verbose, w_notagdirs) if #rows == 1 then goto continue end local iseq, offby = metalogrows_all_equal(rows) if iseq then -- repeated line, just a warning - warn[#warn+1] = 'warning: '..filename - .. ' ' .. rows[1].attrs.type - ..' repeated with same meta: line ' - ..table.concat( - table_map(rows, function(e) return e.linenum end), ',') - warn[#warn+1] = '\n' + local dupmsg = filename .. ' ' .. + rows[1].attrs.type .. + ' repeated with same meta: line ' .. + table.concat(table_map(rows, function(e) return e.linenum end), ',') + if rows[1].attrs.type == "dir" then + if verbose then + warn[#warn+1] = 'warning: ' .. dupmsg .. '\n' + end + else + -- XXX downgrade to warning until instances in the tree are fixed (PR271178) + warn[#warn+1] = 'error: ' .. dupmsg .. '\n' + end elseif not metalogrows_all_equal(rows, false, true) then -- same filename (possibly different tags), different metadata, an error errs[#errs+1] = 'error: '..filename From nobody Mon May 1 20:23:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9F6P0CjQz48yfp; Mon, 1 May 2023 20:23: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 4Q9F6N6q23z3DHJ; Mon, 1 May 2023 20:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682972637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqyrauoSd8xuNLKL5GZmlaoc/xG1V1IN59S90RPFTQw=; b=KtnAp7M3sTGO18yVnMXBJhvVk1pNj36F2p6wl7/kOh46QfBpPdkjJyxZhZp3zVWogr4/xT 5SbSD5rKJaR4A06EcDpHk6vQw3eLBKh8HW3mdFLGSdtbU31VdykVB/WOS/ichF5OqP8Duu czlqZ0kdTHjdpYsyVoR9ChU8w2SBhZeA60QaCtKP8DER1SlxgMbJ4DakiTGrij+CWl6Q1R b1qF7Bt+MDtOOq+3v75ylfwzCamIrgPtnKvsuMbEFiAKI4GT3GZYQ6pgTAulixW7zGg+Ig 9Q+IAprYwWAn/Bb+pzz30O1FIPCc88YA3fkR5GFJKAfKMEoMwxMx5kKj5VLdgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682972637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqyrauoSd8xuNLKL5GZmlaoc/xG1V1IN59S90RPFTQw=; b=ulgCGwnX4uV6p618MqHDYxlK4Q7Dmn7hFoRtQDvDHCmx2FGzP7R1GuQVkpKcqyAJLLx4R4 bzfDrIZWmZTBKRu2FRedlN1MqHEfAO/9Pl7TJz9TbcPuSVjuaI0z+a18ZFCcDm1VeM+nya bVvdTb7+81RChuk7cCYHbNvcaTbglMGcPt+LoVBqMslQX2izByUfgc4Qz71hP6xlr7dneh ql5mCgwNL1IaXczXPPTp4VHbwKH2p261XYnVnIKtPzNDpd0pIrE0+gIwOVbDnh6H6g7mQ7 1/EQZj8YyJdgiaCXvozt42fGfXaNGbtY7vpHkM4RnssC2IJ7Lh4OMZ0mjKehHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682972637; a=rsa-sha256; cv=none; b=UdJjCVF6kkutB3mcc5bHsR/iXyxUYnMraqBRBtEMNen4KlHbqvJg2BqPZNj3ORyR3CL03Y H1xodNhTXQQWeuKGE5K1o8Gtd3tYd+6r9lDlfWwYWjCt5GvnmZk8eqFnudN+siMAtJc9g0 SjNbnKyXeroA0Xz8yo1yz40ufKpWG5uk68hiUK3h+q8jAHukqGgso+R9AXANmXXegWho53 VX13HuZvhbaa/7O4Lifcy/+ULsoXiYHpklnY1+PnYWtfrtRS5YVz1Mm9tTSKCz1mh9iI7Q h8rd30gCDLl4/YsKryXkq/WXCpXc/MGvF4r9uXv67voK4nohT9JRNeKLtZxRTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9F6N5sDPzJll; Mon, 1 May 2023 20:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341KNuRq085471; Mon, 1 May 2023 20:23:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341KNubv085470; Mon, 1 May 2023 20:23:56 GMT (envelope-from git) Date: Mon, 1 May 2023 20:23:56 GMT Message-Id: <202305012023.341KNubv085470@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: ed2e50508ce4 - main - bxe: prefer C99 bool to boolean_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed2e50508ce4f3473cf8afc9b395813149486196 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ed2e50508ce4f3473cf8afc9b395813149486196 commit ed2e50508ce4f3473cf8afc9b395813149486196 Author: Ed Maste AuthorDate: 2019-07-04 14:56:07 +0000 Commit: Ed Maste CommitDate: 2023-05-01 20:23:39 +0000 bxe: prefer C99 bool to boolean_t Differential Revision: https://reviews.freebsd.org/D20853 --- sys/dev/bxe/bxe.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 3a25321138ec..537501b6b959 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -7566,12 +7566,12 @@ bxe_attn_int_deasserted4(struct bxe_softc *sc, uint32_t attn) { uint32_t val; - boolean_t err_flg = FALSE; + bool err_flg = false; if (attn & AEU_INPUTS_ATTN_BITS_PGLUE_HW_INTERRUPT) { val = REG_RD(sc, PGLUE_B_REG_PGLUE_B_INT_STS_CLR); BLOGE(sc, "PGLUE hw attention 0x%08x\n", val); - err_flg = TRUE; + err_flg = true; if (val & PGLUE_B_PGLUE_B_INT_STS_REG_ADDRESS_ERROR) BLOGE(sc, "PGLUE_B_PGLUE_B_INT_STS_REG_ADDRESS_ERROR\n"); if (val & PGLUE_B_PGLUE_B_INT_STS_REG_INCORRECT_RCV_BEHAVIOR) @@ -7595,7 +7595,7 @@ bxe_attn_int_deasserted4(struct bxe_softc *sc, if (attn & AEU_INPUTS_ATTN_BITS_ATC_HW_INTERRUPT) { val = REG_RD(sc, ATC_REG_ATC_INT_STS_CLR); BLOGE(sc, "ATC hw attention 0x%08x\n", val); - err_flg = TRUE; + err_flg = true; if (val & ATC_ATC_INT_STS_REG_ADDRESS_ERROR) BLOGE(sc, "ATC_ATC_INT_STS_REG_ADDRESS_ERROR\n"); if (val & ATC_ATC_INT_STS_REG_ATC_TCPL_TO_NOT_PEND) @@ -7615,7 +7615,7 @@ bxe_attn_int_deasserted4(struct bxe_softc *sc, BLOGE(sc, "FATAL parity attention set4 0x%08x\n", (uint32_t)(attn & (AEU_INPUTS_ATTN_BITS_PGLUE_PARITY_ERROR | AEU_INPUTS_ATTN_BITS_ATC_PARITY_ERROR))); - err_flg = TRUE; + err_flg = true; } if (err_flg) { BXE_SET_ERROR_BIT(sc, BXE_ERR_MISC); @@ -8019,7 +8019,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, int reg_offset; uint32_t val0, mask0, val1, mask1; uint32_t val; - boolean_t err_flg = FALSE; + bool err_flg = false; if (attn & AEU_INPUTS_ATTN_BITS_CFC_HW_INTERRUPT) { val = REG_RD(sc, CFC_REG_CFC_INT_STS_CLR); @@ -8027,7 +8027,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, /* CFC error attention */ if (val & 0x2) { BLOGE(sc, "FATAL error from CFC\n"); - err_flg = TRUE; + err_flg = true; } } @@ -8037,13 +8037,13 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, /* RQ_USDMDP_FIFO_OVERFLOW */ if (val & 0x18000) { BLOGE(sc, "FATAL error from PXP\n"); - err_flg = TRUE; + err_flg = true; } if (!CHIP_IS_E1x(sc)) { val = REG_RD(sc, PXP_REG_PXP_INT_STS_CLR_1); BLOGE(sc, "PXP hw attention-1 0x%08x\n", val); - err_flg = TRUE; + err_flg = true; } } @@ -8080,7 +8080,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, */ if (val0 & PXP2_EOP_ERROR_BIT) { BLOGE(sc, "PXP2_WR_PGLUE_EOP_ERROR\n"); - err_flg = TRUE; + err_flg = true; /* * if only PXP2_PXP2_INT_STS_0_REG_WR_PGLUE_EOP_ERROR is @@ -8103,7 +8103,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, BLOGE(sc, "FATAL HW block attention set2 0x%x\n", (uint32_t)(attn & HW_INTERRUT_ASSERT_SET_2)); - err_flg = TRUE; + err_flg = true; bxe_panic(sc, ("HW block attention set2\n")); } if(err_flg) { @@ -8121,7 +8121,7 @@ bxe_attn_int_deasserted1(struct bxe_softc *sc, int port = SC_PORT(sc); int reg_offset; uint32_t val; - boolean_t err_flg = FALSE; + bool err_flg = false; if (attn & AEU_INPUTS_ATTN_BITS_DOORBELLQ_HW_INTERRUPT) { val = REG_RD(sc, DORQ_REG_DORQ_INT_STS_CLR); @@ -8129,7 +8129,7 @@ bxe_attn_int_deasserted1(struct bxe_softc *sc, /* DORQ discard attention */ if (val & 0x2) { BLOGE(sc, "FATAL error from DORQ\n"); - err_flg = TRUE; + err_flg = true; } } @@ -8143,7 +8143,7 @@ bxe_attn_int_deasserted1(struct bxe_softc *sc, BLOGE(sc, "FATAL HW block attention set1 0x%08x\n", (uint32_t)(attn & HW_INTERRUT_ASSERT_SET_1)); - err_flg = TRUE; + err_flg = true; bxe_panic(sc, ("HW block attention set1\n")); } if(err_flg) { From nobody Mon May 1 20:47:26 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9FdW1fMNz49062; Mon, 1 May 2023 20:47: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 4Q9FdW18TDz3FtQ; Mon, 1 May 2023 20:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682974047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ni0Xmg5xVHphoHDT51QpkRp391fgCctIMQ2aT0o7p8=; b=RMOS/M/dQPxTTPPYQMB19xhT6rnhlDuSJJEevG87vnpQmZ8m4sPV5Vk8qnzddIKIcD0cKm 2eopPshVe+lBK4fHG0vUls7UG9GXnotZm49GCeX8p8NEpoyf0Iy2niOitOV60SAuwjINez qc1esVk0Q2/wdqwE5CBogBLdJ5nINjT1GzCmAancpwkNEf1rT1AOqDJ2OzIPwyzYnSwiLR cUFu7e2cufRjIfcPbJGfsRh3XDSA7y+DEmhsxle9Gww16kigBFcg6B33qwTqrXz3Pyn1G9 C129/My6NozJ0xvBrd1K2N9aEiIfWX2Y/RyklGbgcuqStygt6MLfOFKm5x1kxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682974047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ni0Xmg5xVHphoHDT51QpkRp391fgCctIMQ2aT0o7p8=; b=sCAxsxqiJFS1PjGt4WdcMm9Wi8TAmFe8zTwNk5NFyhRq98/iMyL8IqW1JWJWy48aMbjJ8s 0SxMYW4sXpPfcU+23jQ4sr/sbiqVyu27CRWh47M2OwmLsOJKcEy2atAmvDHpQtTViyZ89G iT7nltu12xfzm5k0jlLGlkfGZaGXHUCt2uBWFQscgOMOtUMxIm8TyjkkrH5Q7/Be/WBDjq 19/PwDoR8ydrIQ3mperki7i0hcWgkx72rXRu43Wy+ae+DJhv8xF3snRZQY3dE9PaB1PsqY HilUM8TP+KlGFSrC3uIknBo17XqfbZy/+0eOpUnEtk+aH2B9CLA2rr92OTcMMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682974047; a=rsa-sha256; cv=none; b=fJoPHlOcYXYTGMY7hU715n4Z31Rb+6285XZA0A5lemPDF8IiKsGSpuBACevyUwCAEaGawx yf+qmUGOCXaVlZ0zMn+O7387UAb/KFzevYnTpznAbl2rFpRVRA1M0PQ70zRPFGOZ3n96F7 PPPusk7/ITysZY9/tZe8j3+xJPj0fhHp8DohnNxodthoBgdDvLME+7PsTkMRijWhoxhzWn yCC4/oSH9vh89IF6GSVYoTtS4WO7eqAeJa+8dFQDgaLSRD4C8IYgtAohlXyETXlxyfOwUT BFCFaEATZfshG4uKDgwiogNYmcEubZJcex2oZ2yaB4XAhn/r5J3RqGJclnGjDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9FdW062rzKvM; Mon, 1 May 2023 20:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341KlQpQ018581; Mon, 1 May 2023 20:47:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341KlQVT018580; Mon, 1 May 2023 20:47:26 GMT (envelope-from git) Date: Mon, 1 May 2023 20:47:26 GMT Message-Id: <202305012047.341KlQVT018580@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: 5f2e84015da7 - main - bsd.lib.mk: decouple lib*_pic.a from TOOLCHAIN build knob List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f2e84015da7a664bba0af7727349c9c3f6902ba Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5f2e84015da7a664bba0af7727349c9c3f6902ba commit 5f2e84015da7a664bba0af7727349c9c3f6902ba Author: Ed Maste AuthorDate: 2023-05-01 20:33:47 +0000 Commit: Ed Maste CommitDate: 2023-05-01 20:46:39 +0000 bsd.lib.mk: decouple lib*_pic.a from TOOLCHAIN build knob A user may use a tool chain from a package or just use an existing tool chain from a previous installation. There is no reason for this to disable the installation of lib${LIB}_pic.a. This also means we don't need to force MK_TOOLCHAIN=yes in lib/libc. This reverts part of commit c0f5aeb0329d71e6b02379133c0c9c0145c9afea. Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39917 --- lib/libc/Makefile | 3 --- share/mk/bsd.lib.mk | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index e2a8f1473bf3..2b06bc1b3c5a 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -6,9 +6,6 @@ SHLIBDIR?= /lib .include -# Force building of libc_pic.a -MK_TOOLCHAIN= yes - LIBC_SRCTOP?= ${.CURDIR} # Pick the current architecture directory for libc. In general, this is diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 1d4a97134d41..8e5035f6db41 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -378,7 +378,7 @@ ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} .endif .endif #defined(SHLIB_NAME) -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" +.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) _LIBS+= lib${LIB_PRIVATE}${LIB}_pic.a lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} @@ -540,7 +540,7 @@ _libinstall: .endif # SHLIB_LDSCRIPT .endif # SHLIB_LINK .endif # SHIB_NAME -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" +.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ .endif From nobody Mon May 1 21:04:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0q2vk1z491J4; Mon, 1 May 2023 21:04: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 4Q9G0q2Rkyz3HkX; Mon, 1 May 2023 21:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HMtSs3ABBn7HI15+LTQTbaR3b0XVROrcanyWpONxqZQ=; b=kq2uvsmjpqXw/p4naAkybydQe4A4ImbYdhFWY4vWV3CkHvGOCCACrUY0t4TUbFsr02vWT5 ctiDY08y5wedu2m2V8JpNfA4j7m9/+wx2Ggz2BJvKqWQj3Ckp5rhGpWwgl5lvvaT60ATOB cOaFP2TrIuZL1QvvFaCiHBAvtf/YLLBN5Of50wGCVGNKy4ia4He+RhvL2yU3qmHQanvD1n uQu68e8rbZvddfFgVeJdXa1ONRy6ik6N7DhWIt/FVVV4OiWx9zjOs35cXnPBRXgxS28zgA vQK5f5+49m3fu7fEnFa45PT06yWwaI4ATSXo97TKyiTttLIW4M1kuX3Ag3YNng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HMtSs3ABBn7HI15+LTQTbaR3b0XVROrcanyWpONxqZQ=; b=OGsCy5oHAm0RwXk+l1BlZnmCwyB4vw6Z9VVqKlBvVlS/AZis9yXwI1wny8Ruq3pzK1okd2 ft2EqgvoHA/EKMq8+7Z2lIt4rl0zfG/wtgsReMzmUzhilJijobIHDy0tIa5EGnZtrohtn3 5P6LWZi3aAFLyS0ZIKePG+YuUYCn2CN8lNsdRqRO5hvi9LnX+FUXXBlxAfV2+4VBSyafqH p8NgYpHEP4+EooXYX5IYYp5lTcNbMR0cM6YVCzq7esVh0N5t1pfftRF3t+qlL8v6STSodY Trrw1091cKn4bXba3kauOwAIhM/tCA87tadOn1ib9IGLBrkbG8E04+kzkoHtdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975051; a=rsa-sha256; cv=none; b=eChHSkOdSA5/MgMqMjuWoq0tkpIwk4cyvWkXFH0PxySPqHPlNXDT29C+64aksWX/6VUxmL wu2KfRdWer4O3MY6Cxv5SnZ8L6c438dugY+VBD+k/cBuOSA8+ipESEpVvKTso2tK+XLuO/ XzCTSxqbEl35Z9y9jZ/4MaEl0v1NNP8AicCtsDogBcNAzbvYg8u7mT9teNDLol7oxU/tdB rD1F6TfDPwKpMoo4kRDGcWWgTDz9XoN0nNUJ4VyZUk6wHNt7iIHNQBT8O6UNk0pJqJietd tHFF0zBqWztZw0Q4v7Uj/wWF7iCl/V1SFRH6hQXKbMThSQvgt3ZTch3bm0O15A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0q1WCzzLWq; Mon, 1 May 2023 21:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4BrU051715; Mon, 1 May 2023 21:04:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4Br9051714; Mon, 1 May 2023 21:04:11 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:11 GMT Message-Id: <202305012104.341L4Br9051714@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: 91ac713b646d - main - stand/boot1.efi: Allow modules to add env variables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91ac713b646de667ac149be7dfe06adba4ce55cc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=91ac713b646de667ac149be7dfe06adba4ce55cc commit 91ac713b646de667ac149be7dfe06adba4ce55cc Author: Warner Losh AuthorDate: 2023-05-01 15:26:31 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:52 +0000 stand/boot1.efi: Allow modules to add env variables Sometimes filesystem modules need to pass details of the state of the filesystem to later stages of a boot. Provide a generic method to do so. We'll add them after any env variables set in our config files. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39407 --- stand/efi/boot1/boot1.c | 20 ++++++++++++++++++++ stand/efi/boot1/boot_module.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c index 088821ecd1f8..2f9801c8ea92 100644 --- a/stand/efi/boot1/boot1.c +++ b/stand/efi/boot1/boot1.c @@ -96,6 +96,26 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load buf = NULL; } + /* + * See if there's any env variables the module wants to set. If so, + * append it to any config present. + */ + if (mod->extra_env != NULL) { + const char *env = mod->extra_env(); + if (env != NULL) { + size_t newlen = cmdsize + strlen(env) + 1; + + cmd = realloc(cmd, newlen); + if (cmd == NULL) + goto errout; + if (cmdsize > 0) + strlcat(cmd, " ", newlen); + strlcat(cmd, env, newlen); + cmdsize = strlen(cmd); + free(__DECONST(char *, env)); + } + } + if ((status = BS->LoadImage(TRUE, IH, efi_devpath_last_node(dev->devpath), loaderbuf, loadersize, &loaderhandle)) != EFI_SUCCESS) { printf("Failed to load image provided by %s, size: %zu, (%lu)\n", diff --git a/stand/efi/boot1/boot_module.h b/stand/efi/boot1/boot_module.h index 99046fb53577..4ecfa4c72a83 100644 --- a/stand/efi/boot1/boot_module.h +++ b/stand/efi/boot1/boot_module.h @@ -94,6 +94,9 @@ typedef struct boot_module_t /* valid devices as found by probe. */ dev_info_t *(*devices)(void); + + /* return any environment variables to pass to next stage */ + const char *(*extra_env)(void); } boot_module_t; extern const boot_module_t *boot_modules[]; From nobody Mon May 1 21:04:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0r6g9Tz491Xn; Mon, 1 May 2023 21:04: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 4Q9G0r3h96z3HqH; Mon, 1 May 2023 21:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9fofuUvWy42TVqtSfNQcJKL+g81fCnTkBliklDSAhQ=; b=fYfKRryiWrAtNwLN6QvhWfhs6AK7NCjqYkKEQz6u1alFpUdSlyLMk7FEkHbh8b720G1YjC IQB0gzO2ptrQ2CkUnC6HI1v4YMculDJd2oHF5RH4SOG7c+5EYEuQwYDV4Aa7pquL/eqm+A yAzK7NOsvbu2yIe9ESRdhBA9NVYxrWqLQV+Rv0xNkGGLZJzToOEMbXo17RVqqXKmmP8uVu GNVsBN6S7Jz424lD0GZdVSCbXV5GVcfJy6OfcwmkPwvDG1sbl3K7wb4shc5famxS6eIUdv mJKzXmHSMfADEy78aq8mIObvcbEPgO4ICsLt3hgzwXUTU5f9hcJqkWVs/xZ1dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9fofuUvWy42TVqtSfNQcJKL+g81fCnTkBliklDSAhQ=; b=oYc8m/yKS//zvd7KD/mw4PTtTLiMcR6CxWw85Z4Vd86uFhoaszQAiQwZguWQ/+x2zjx0QT WZSsWialDXU5YId3r0dk/Jl6m5kGGbYuv0aGwuB21DJOdDRtsUoMUZQqXHY8u7G3TfIHDW 2ijhCoVkKJ2yFrlCKzo7iw9thd4Kt8fy4ZzS7gHcYX6y+YLDfhn3v+RyR6OQNwkbATEmmR 8VbxE3KkqK5G4QwkfhEQNld07YbH2WUwPyx/NxqQWuzt7cDfe+8cbDhfp6wXYovhZ5yvq/ Yd+aMrYKNWbTweYV0Vt7tDTpL5b9UzKzHOEv7NL8icSsoQjWZiGv0uNTuAyQhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975052; a=rsa-sha256; cv=none; b=gMo9u+OCXrKaxxWyfsf1Je5KabugwvRjwDXZaVmV4WH7Y11Ua52aDpr6BhyxXAh06qx+cO f7pDqxkxthylRmyLsdoXVy23jxfScuMjcOITFanMC9+aOwdBxaxrQs532vL0rjLwT3CGF4 PerCo2JxgqQL5/8yuhaeNK3MJLcM3Cq14JmgUXhAO/26Ic01uGcRrVp1hhhOnrDxmioQAw nPmLiBEbFVxVOiFu+fY8QqatkiM/efxpNFOhHJ1RVtrOnZuoUSp2+gnxsqKVr5f6iInqfo kTTmjI4fmkEJRfj4fSO1LPiErfk0DuaY/Wzr3slx3SSlnMlHw2uZMGhylrhi8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0r2lghzL2g; Mon, 1 May 2023 21:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Cp2051739; Mon, 1 May 2023 21:04:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4ClE051738; Mon, 1 May 2023 21:04:12 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:12 GMT Message-Id: <202305012104.341L4ClE051738@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: 439a9766adba - main - stand/zfs: Move spa_find_by_dev from zfsimpl.c to zfs.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 439a9766adbabcdfcce9fb0396b43c9e1482155a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=439a9766adbabcdfcce9fb0396b43c9e1482155a commit 439a9766adbabcdfcce9fb0396b43c9e1482155a Author: Warner Losh AuthorDate: 2023-05-01 15:26:44 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:52 +0000 stand/zfs: Move spa_find_by_dev from zfsimpl.c to zfs.c zfsimpl.c doesn't know about devdesc at all, but zfs.c does. Move it to zfs.c, which is the only user. Keep it static for now, but it could be exposed later if something else were to need it. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39408 --- stand/libsa/zfs/zfs.c | 13 +++++++++++++ stand/libsa/zfs/zfsimpl.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 3d5a392dd03f..4a4d3cf26843 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -373,6 +373,19 @@ zfs_readdir(struct open_file *f, struct dirent *d) } } +static spa_t * +spa_find_by_dev(struct zfs_devdesc *dev) +{ + + if (dev->dd.d_dev->dv_type != DEVT_ZFS) + return (NULL); + + if (dev->pool_guid == 0) + return (STAILQ_FIRST(&zfs_pools)); + + return (spa_find_by_guid(dev->pool_guid)); +} + /* * if path is NULL, create mount structure, but do not add it to list. */ diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 4a285470642e..29e8bb82b6e2 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -1367,19 +1367,6 @@ spa_find_by_name(const char *name) return (NULL); } -static spa_t * -spa_find_by_dev(struct zfs_devdesc *dev) -{ - - if (dev->dd.d_dev->dv_type != DEVT_ZFS) - return (NULL); - - if (dev->pool_guid == 0) - return (STAILQ_FIRST(&zfs_pools)); - - return (spa_find_by_guid(dev->pool_guid)); -} - static spa_t * spa_create(uint64_t guid, const char *name) { From nobody Mon May 1 21:04:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0s598zz491Xr; Mon, 1 May 2023 21:04: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 4Q9G0s4W24z3Hsr; Mon, 1 May 2023 21:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI34fVl5UNMSx7e2ObdFctGSBKOG6yX/p/yjS3B7ox0=; b=HcgYsqMKq2FCWBXE7RndIB0vA+yhJS2140EDxa+6SN7hGU+BOmpkUA/lj0CAX3/RQ8g/vk NOrz5urQucYCsRKJJmVPGY4sP4aIl5MrrLtNHgAGb+6eiZwVrJ7ZdujEgdEI/kSCx/ycUS yWKSeiJMhkoG4zGX6+cIj7nK+S41HHspHA+4w6tdGkyv00vWpGTLLp/GIcObNuswg2A3dh WXAwnEDbcyKwV7t39g6sJb5kyrE94TiBfJWPgqBe/NnUMWcjjp+ePUJ3lXIeapU5c00Vn3 VCiYlDAXV93Xc8VgIEF8D+xneGEfS7w/IvGCvWceFZzx1tXY3/zF1VZDz+U6zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI34fVl5UNMSx7e2ObdFctGSBKOG6yX/p/yjS3B7ox0=; b=lMX26aNpfkOZx2ampH9O/90fn1CdIJQfvHF4Vcwh6TIjnHm/z6zKC9OqePyz2qzBJSeqPq FV79GlzpAaqIkUW4dGfCFQakmAFqYmWzS+nELP1M/ExXk5fj5CY8O+y+Q6UkeUkqk2X2mp N7WQ9BnZMQgLPSva9KwhKFUdSx6L/4TUHYSfzQ5cRWFkgY1E7Mv+PsMqsrVIGfDDzaK++l qPSHV/+9jmgAgcq56iGQMWAu8St80lxaYQkXs2kNbUnmNGA3KHNFHX2U+Z9elsGA52NBQb wjepoN2R1qplIgn/+xEBzKGZRa0+m7/8/ARoPqZzji9FlPFm6HLnBU8kFXTNSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975053; a=rsa-sha256; cv=none; b=g4aiKTVcUu0EDqB5FBauadAd/FUksHHhgucVoIecQEURGbK1pBEyBJFlF51N1wZpWSb9tD rw1kFmHX2j+tVa0xf8tbrNuVROoFtWEe/1y7Ecka4GFixSdyrj49yw3R1TN6BdfGAmcRoz j3ZCFT0n+x3JL9eMM6pQuJClxMMmDcmS0G5XDC4bt8ejHUkmAr1zsHFZbb0y0Eg9i7sw0I yVcvT2KFU6i4ePOCA9BHHwvt57tl3r3IvCBKNtp47TZ8Gnm3J6E5BFZLWc8x571xABAX61 v5NXLalwhbLvsdvrGsQw0Figr6isnH1ROToHJWfKkCcj5sJE+Nf/w7vx5IRUcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0s3Jf9zKkx; Mon, 1 May 2023 21:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4DvC051760; Mon, 1 May 2023 21:04:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4Dlu051759; Mon, 1 May 2023 21:04:13 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:13 GMT Message-Id: <202305012104.341L4Dlu051759@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: 6479bd1b7d34 - main - stand/zfs: Refactor zfs_get_bootenv List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6479bd1b7d347e42012fab64b595b0cf091e13f4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6479bd1b7d347e42012fab64b595b0cf091e13f4 commit 6479bd1b7d347e42012fab64b595b0cf091e13f4 Author: Warner Losh AuthorDate: 2023-05-01 15:26:51 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/zfs: Refactor zfs_get_bootenv Create a new interface to zfs_get_bootenv called zfs_get_bootenv_spa which takes a spa instead of a void * (effectively a devdesc *). Use that in zfs_get_bootenv. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39409 --- stand/libsa/zfs/zfs.c | 27 ++------------------------- stand/libsa/zfs/zfsimpl.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 4a4d3cf26843..17f213fe833c 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -798,35 +798,12 @@ zfs_probe_partition(void *arg, const char *partname, int zfs_get_bootenv(void *vdev, nvlist_t **benvp) { - struct zfs_devdesc *dev = (struct zfs_devdesc *)vdev; - nvlist_t *benv = NULL; - vdev_t *vd; spa_t *spa; - if (dev->dd.d_dev->dv_type != DEVT_ZFS) - return (ENOTSUP); - - if ((spa = spa_find_by_dev(dev)) == NULL) + if ((spa = spa_find_by_dev((struct zfs_devdesc *)vdev)) == NULL) return (ENXIO); - if (spa->spa_bootenv == NULL) { - STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, - v_childlink) { - benv = vdev_read_bootenv(vd); - - if (benv != NULL) - break; - } - spa->spa_bootenv = benv; - } else { - benv = spa->spa_bootenv; - } - - if (benv == NULL) - return (ENOENT); - - *benvp = benv; - return (0); + return (zfs_get_bootenv_spa(spa, benvp)); } /* diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 29e8bb82b6e2..40a1448a0c9f 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3853,3 +3853,33 @@ done: free(entry); return (rc); } + +/* + * Return either a cached copy of the bootenv, or read each of the vdev children + * looking for the bootenv. Cache what's found and return the results. Returns 0 + * when benvp is filled in, and some errno when not. + */ +static int +zfs_get_bootenv_spa(spa_t *spa, nvlist_t **benvp) +{ + vdev_t *vd; + nvlist_t *benv = NULL; + + if (spa->spa_bootenv == NULL) { + STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, + v_childlink) { + benv = vdev_read_bootenv(vd); + + if (benv != NULL) + break; + } + spa->spa_bootenv = benv; + } + benv = spa->spa_bootenv; + + if (benv == NULL) + return (ENOENT); + + *benvp = benv; + return (0); +} From nobody Mon May 1 21:04:14 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0t6d2Gz491J9; Mon, 1 May 2023 21:04: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 4Q9G0t686dz3HrS; Mon, 1 May 2023 21:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AELX0kqbNaAkvNEtris2lMCW8x7iyCp1ByGF1B656MY=; b=mRZP04XbRulFcjGG2RG7Y+7gquPIjWKQgqotxlh99muoAJaeeNpwSdil1e3FIbhczwb8Q4 zetth19QWOrQOV/MWyjCoiVJPgDRvR/T07TQqdra95WdBi6MjggSLq3fHzqRV1F9SuW6in kwiTjMCdCk1xwnGIambERaE11dOkADZlrK5xnL0Tweaviq0fNHA/lDpIMWQGFwbpmdAFrQ BY/tafcm+8x1xMTtXP6jXBLGBM9N79zl/D1KhtwPIqZoiPSeHqqQgRdfhWpRDdvZHhk6/B VwTJPsfN+PA+xYXhSB4pMG8GRpXej+UjCO5/RdlhMkH27nT9ljmv4AMtnfX5AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AELX0kqbNaAkvNEtris2lMCW8x7iyCp1ByGF1B656MY=; b=I4BuZ6iKmAiBKwWFBBRjRu/lHdsnTHndadruTd3stbI/Ewgl4v/3hogAQCqrYBLInFj36x Xa4Kk8Hy56YejNQzkacTJvzxH+WHyzJfmVQyMvTxuN2RHslDCvvU6peTRDmyJNnLVfLpy4 kb8DXu7e/NJo7RdkVf884xMeDdLvl82QMQeDVAHIld0kRjdXWZRaYFIqZz4joTLJWj+iOg 5bI7Dn7q0fcLEL38RRKAEhiHNuAJSHWudvHygbSR/9IUwr7Trz012gprs9r1503jMzWyGx 3yqjePKCs5pnPn0EJf48iLyZR4ltj4AAHlon50r+FBX57RaKEA1azStg159xOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975054; a=rsa-sha256; cv=none; b=TVOfRCoY/zSukK84a3P2ctRwwVlXUCuJenBvRvPqHSkUc3IqkUeI1X9igHjTnWmjZvy7gL OAQEOjuwYnf+S9Etp06cEvpvNLRBZ2BRy0TP7umRE1h4tfaoB+WsiT/zvakW/puigT+Dml 2GZkNEBazmn9eyfYPaVR/2m7zi+72yK7IvUnrfX/suZV2hlfAC25k/xDflNo082CYU4vZa 3u3MF3//5VPt+vc5NlXtFXtmdG7jcwHMkQygltmmKqVgAv0B1e2GVoB8rI1wmKvXsHR8sZ 1aU8P6ez4EumzNN0T0BIQjoE3CweOyxgGbHjGKq43Mx344BCZsGOrQ2GlB0bIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0t53v4zLZk; Mon, 1 May 2023 21:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4EWa051780; Mon, 1 May 2023 21:04:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4EB0051779; Mon, 1 May 2023 21:04:14 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:14 GMT Message-Id: <202305012104.341L4EB0051779@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: 4dcae288fe63 - main - stand/zfs: Refactor zfs_set_bootenv List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dcae288fe63667bdf930258b94e0e51a2d05787 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4dcae288fe63667bdf930258b94e0e51a2d05787 commit 4dcae288fe63667bdf930258b94e0e51a2d05787 Author: Warner Losh AuthorDate: 2023-05-01 15:26:59 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/zfs: Refactor zfs_set_bootenv Refactor zfs_set_bootenv to split out the lookup of spa from the rest. zfs_set_bootenv_spa flushes the benv to the vdevs and updates the cached benv. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39410 --- stand/libsa/zfs/zfs.c | 14 ++------------ stand/libsa/zfs/zfsimpl.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 17f213fe833c..7cdfa1a06df9 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -812,22 +812,12 @@ zfs_get_bootenv(void *vdev, nvlist_t **benvp) int zfs_set_bootenv(void *vdev, nvlist_t *benv) { - struct zfs_devdesc *dev = (struct zfs_devdesc *)vdev; spa_t *spa; - vdev_t *vd; - if (dev->dd.d_dev->dv_type != DEVT_ZFS) - return (ENOTSUP); - - if ((spa = spa_find_by_dev(dev)) == NULL) + if ((spa = spa_find_by_dev((struct zfs_devdesc *)vdev)) == NULL) return (ENXIO); - STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, v_childlink) { - vdev_write_bootenv(vd, benv); - } - - spa->spa_bootenv = benv; - return (0); + return (zfs_set_bootenv_spa(spa, benv)); } /* diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 40a1448a0c9f..3b093dea3c41 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3883,3 +3883,19 @@ zfs_get_bootenv_spa(spa_t *spa, nvlist_t **benvp) *benvp = benv; return (0); } + +/* + * Store nvlist to pool label bootenv area. Also updates cached pointer in spa. + */ +static int +zfs_set_bootenv_spa(spa_t *spa, nvlist_t *benv) +{ + vdev_t *vd; + + STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, v_childlink) { + vdev_write_bootenv(vd, benv); + } + + spa->spa_bootenv = benv; + return (0); +} From nobody Mon May 1 21:04:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0v7012z491DV; Mon, 1 May 2023 21: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 4Q9G0v64b1z3Hts; Mon, 1 May 2023 21: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=1682975055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZGVgCXaYZ8dHgzloyRJVIhQawhhsB6l/cMwA/nvVCw=; b=kOdhMLGbdw3RkSl0RwOrgBjnqogMJzbFRDWZbns81YIjmkzqyPtL2xTzgbgQGnuS4OAcci ysLKBmFCcSM3kzyQ45wjtY8EO2F9doL6UjIKjDkrTIsVEo3b/jlGEi9vd3IW+J5E9Hv9me r+xxGQMIuHBza6l9fJqYompcF4QtsR2kRUHq0m3xtMGQB47xQqHMSobmjPVM/z5PscBwAp xwJ0yltRqWIJX1lbepcG1CFtkKZc/VCO/DlHawYMD9aueM4PqnwQNzrJB+iw2h1gvfPFk3 iLIfyO3NR250fqcS09o9d+JVb4G58rqcVBQW/+HmhTuaIb+C47aRdkS2y2BT+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZGVgCXaYZ8dHgzloyRJVIhQawhhsB6l/cMwA/nvVCw=; b=WIqFIhbuWUPzvrwaDm3nW9rWa3/UFrzgu1LWdnlm+5Tt9vKtMgwm04hhiOssmU3Nra9r6L ZndYMBpDs5qb/I3FM3l+z3oZhsmRnHjFh5AYg+kL7jet47yez2Bwg0UzNwNKVZeFa3OPV9 whamkG/lV0IGhp5utkUU+oXhQT0Yno3hYVpjsjf/IcU+vWwMySf0/G3HXsbjLw+Ang53jh 18G/2r8WTnkj0m8DVKAeBDVLWanuwh/Gz3/oFztI6ghdq8OjI8TVk8twfLsJ/20rJNpRqM B8pfBqj/o5f3Ohp/w+UQoTSiRBUtopNLMTXSnm/d9/vGWrkZG3Ip+2PUdyXF9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975055; a=rsa-sha256; cv=none; b=ZWV1wTlygWDI059Gk+2/1ykAtunzNhGVsxBXfW+OT4yNRFeOREQDWvgHgQuv7uZGxAP5Bt VUG04njasoVjbEdpPqMQ3f90O6/NdpntCmeCdzPWuRYho9dtgX/bt97et5OCON3S2Bh/l3 Md9+32OKFvhQfOOtIIQwMWqpVBpLQFIKBMJQUl2fY2icZXU+h/vh1gj0g4XOkYUXzNl19I x2LCF7ElX8qnupPdzRWHwzOrhZSsru4lSPgvA4ifyOqeemMpUaADRCSDXceIcrisnLt/Uf CPdMMUXiLnGIcoF5qrfozZYOR+bGDf2ulYF4KO87mBUQoiuidzVWCXeUJlNJMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0v550GzLWv; Mon, 1 May 2023 21:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4FFA051806; Mon, 1 May 2023 21:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4FMP051805; Mon, 1 May 2023 21:04:15 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:15 GMT Message-Id: <202305012104.341L4FMP051805@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: b765cfa380a4 - main - stand/zfs: Refactor zfs_get_bootonce List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b765cfa380a47de2b77cbf8a6249e226b0de2275 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b765cfa380a47de2b77cbf8a6249e226b0de2275 commit b765cfa380a47de2b77cbf8a6249e226b0de2275 Author: Warner Losh AuthorDate: 2023-05-01 15:27:06 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/zfs: Refactor zfs_get_bootonce Lookup the spa and pass it into zfs_get_bootonce_spa to process the boot once protocol. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39411 --- stand/libsa/zfs/zfs.c | 23 ++++------------------- stand/libsa/zfs/zfsimpl.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 7cdfa1a06df9..8ddd6de8623d 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -827,27 +827,12 @@ zfs_set_bootenv(void *vdev, nvlist_t *benv) int zfs_get_bootonce(void *vdev, const char *key, char *buf, size_t size) { - nvlist_t *benv; - char *result = NULL; - int result_size, rv; - - if ((rv = zfs_get_bootenv(vdev, &benv)) != 0) - return (rv); + spa_t *spa; - if ((rv = nvlist_find(benv, key, DATA_TYPE_STRING, NULL, - &result, &result_size)) == 0) { - if (result_size == 0) { - /* ignore empty string */ - rv = ENOENT; - } else { - size = MIN((size_t)result_size + 1, size); - strlcpy(buf, result, size); - } - (void) nvlist_remove(benv, key, DATA_TYPE_STRING); - (void) zfs_set_bootenv(vdev, benv); - } + if ((spa = spa_find_by_dev((struct zfs_devdesc *)vdev)) == NULL) + return (ENXIO); - return (rv); + return (zfs_get_bootonce_spa(spa, key, buf, size)); } /* diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 3b093dea3c41..996245b92c45 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3899,3 +3899,36 @@ zfs_set_bootenv_spa(spa_t *spa, nvlist_t *benv) spa->spa_bootenv = benv; return (0); } + +/* + * Get bootonce value by key. The bootonce pair is removed from the + * bootenv nvlist and the remaining nvlist is committed back to disk. This process + * the bootonce flag since we've reached the point in the boot that we've 'used' + * the BE. For chained boot scenarios, we may reach this point multiple times (but + * only remove it and return 0 the first time). + */ +static int +zfs_get_bootonce_spa(spa_t *spa, const char *key, char *buf, size_t size) +{ + nvlist_t *benv; + char *result = NULL; + int result_size, rv; + + if ((rv = zfs_get_bootenv_spa(spa, &benv)) != 0) + return (rv); + + if ((rv = nvlist_find(benv, key, DATA_TYPE_STRING, NULL, + &result, &result_size)) == 0) { + if (result_size == 0) { + /* ignore empty string */ + rv = ENOENT; + } else if (buf != NULL) { + size = MIN((size_t)result_size + 1, size); + strlcpy(buf, result, size); + } + (void)nvlist_remove(benv, key, DATA_TYPE_STRING); + (void)zfs_set_bootenv_spa(spa, benv); + } + + return (rv); +} From nobody Mon May 1 21:04:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0x10m2z491DY; Mon, 1 May 2023 21:04: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 4Q9G0x0CpVz3J19; Mon, 1 May 2023 21:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hEFvj8dhCHBlT0WZp0so12oDUQ1eebyCso8Rg1bYrsU=; b=HuQi4ZF95srmis6QnW72FfDEXc5iUJH6F26c1pQo57LTHP29uwGoBzIoYzchkDn4zytbOx 7CBVBMqaiA1B//dBWS8B1YUjduCrgT60pIUG9gqFU0TlVNq5PVYzOil77WaH3QuHPtDztS CYw76A27/sMo0Buvpl0BN7M+tfyUBKHAeVXwM1+1Cr2LKndXNbvZBfRR2Rz+T9jPd4i0/b A8rM3mIjD3ssk8daEHG2E0vKmfgsN/rrFKTowt++pnqgWlhebkaetRRf+TmEe/O2BMvL16 K6yPrpQXqjE+OvIpGJtYa26LL/P523BSa7dVBKCd0Nc1cp6W8jBx2gNuNouhUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hEFvj8dhCHBlT0WZp0so12oDUQ1eebyCso8Rg1bYrsU=; b=hicmxU3Wte0R/XNyfiUjLJ5QRzfnW2RoclRGx/kUdzxxKSZLbPHINxSWcOpvE3d/T1aiwn Q53v9+V/W7EXKEfFadrnoihRLm6JpzmcI5heEU+/Y5wNY8yypG7Yl3TTQqJMoomydVogaf g6ozBk3YsxOhkGGvcg04zxW+0niJ6zq2fJe+iHw0tLVOJF50xOC0v+xGJmMvgLq+HzgOEZ I1SneaNTR2lyjOxfe3cggltWsM6hT8BYmMuS5+dDVAEFQBqRCn6WnZomP29B9Ml9adBlR7 QrpZKFIfC+uoWBDfSnLYtJGydjiAdiB0sZhevwhnyQzyhaM/9MSFAqx+EOpxgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975057; a=rsa-sha256; cv=none; b=jNrmrEQGimbXpvjgpG0oZx+57EX33FabDZS3FXpvkuVFcJsbgJ09oUZ/1zZStAA1KTaCSY PvRNTgD6a59BzaN/1bvWD/k4UrPKBME/PodqATnIcCpuwbEJBN19+LewPHykbTwYeo0Q5c B7eWIISjAsQeE843/xD5eSZAn/NVbEQQh3kQ9ZtrjUyK16HOLUwv6P14pAauEJg/5bC46t 30eQMg22qD0/b9dfOJGQgGfFNzqPS4Szp9BH5VvDOrmXHOX3gRhxM68JZcb5RKWvaPyb3F Sd/Tgso+6NiOupTTs53V/92qUuYdR8x+2s5vaCXcYlZZ7YT1V8BBa5SULi3TGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0w6DTVzKky; Mon, 1 May 2023 21:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4GZG051830; Mon, 1 May 2023 21:04:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4GLq051829; Mon, 1 May 2023 21:04:16 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:16 GMT Message-Id: <202305012104.341L4GLq051829@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: 43f7eeff0d45 - main - stand/boot1.efi: Implement bootonce for ZFS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43f7eeff0d45769e1deaf0a6879bc807fdafaf4c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=43f7eeff0d45769e1deaf0a6879bc807fdafaf4c commit 43f7eeff0d45769e1deaf0a6879bc807fdafaf4c Author: Warner Losh AuthorDate: 2023-05-01 15:27:14 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/boot1.efi: Implement bootonce for ZFS Implement ZFS bootonce protocol. We pass zfs-bootonce=t to the next boot stage as a command line argument. Unlike zfsboot -> loader handoff in the BIOS case, we don't use the OS_BOOTONCE_USED. This would require modifications to loader.efi which would only server to make it more complicated. Instead, use the command line parsing interface for the boot1.efi -> loader.efi to pass in the zfs-bootonce kenv that will be needed by rc.d/zfsbe to activate the BE if boot progresses that far. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39412 --- stand/efi/boot1/zfs_module.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/stand/efi/boot1/zfs_module.c b/stand/efi/boot1/zfs_module.c index 7aaca72e30f1..234b50084839 100644 --- a/stand/efi/boot1/zfs_module.c +++ b/stand/efi/boot1/zfs_module.c @@ -40,6 +40,8 @@ static dev_info_t *devices; +static char zfs_bootonce[VDEV_PAD_SIZE]; + uint64_t ldi_get_size(void *priv) { @@ -165,6 +167,16 @@ load(const char *filepath, dev_info_t *devinfo, void **bufp, size_t *bufsize) return (EFI_NOT_FOUND); } + /* + * OK. We've found a filesystem. Any attempt to use it should clear the + * 'once' flag. Prior to now, we'd not be able to clear it anyway. We + * don't care if we can't find the files to boot, or if there's a + * problem with it: we've tried to use it once we're able to mount the + * ZFS dataset. + */ + *zfs_bootonce = '\0'; + zfs_get_bootonce_spa(spa, OS_BOOTONCE, zfs_bootonce, sizeof(zfs_bootonce)); + if ((err = zfs_lookup(&zmount, filepath, &dn)) != 0) { if (err == ENOENT) { DPRINTF("Failed to find '%s' on pool '%s' (%d)\n", @@ -220,6 +232,18 @@ status(void) printf("\n"); } +static const char * +extra_env(void) +{ + char *rv = NULL; /* So we return NULL if asprintf fails */ + + if (*zfs_bootonce == '\0') + return NULL; + asprintf(&rv, "zfs-bootonce=%s", zfs_bootonce); + return (rv); +} + + static void init(void) { @@ -241,5 +265,6 @@ const boot_module_t zfs_module = .probe = probe, .load = load, .status = status, - .devices = _devices + .devices = _devices, + .extra_env = extra_env, }; From nobody Mon May 1 21:04:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0y33xmz491GV; Mon, 1 May 2023 21:04: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 4Q9G0y101Mz3J1Q; Mon, 1 May 2023 21:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNGWiiYddpYGpr8540z8ps58eBVxEt8jWvnYt/k7SdU=; b=Rsy4CHuYfsyDOypMF5PlgJ333YsMcpM2B0LSyoYVwfpOr3clsAASU/W93BRxqzRE9uYzdj 23QYX3OhUk39m/RKdDWI2S7qoyyDjxNOTo67VaQRNXpmFhHgAcvZAs1sQYrNUZRt84GEEu QYH5rTg2+BdzX9RWQnNm/2u+1PXBUkMS4GAyzta/J4iMJ34DQBYOOd8+gaA0xPxkKYnKuC tvk9LzYB4b+DEFthYRcIfnTKjT2hIooJ62OaVukvyg5uSTfatKWA79sT8Bt8Rk2Iz4y+Hm Li+ZdcIMCJCHVeUmZtrGprbe4Dqtsj0qFzCdKEuuMwIiu0pk1XfWSQ5Pp2c7rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNGWiiYddpYGpr8540z8ps58eBVxEt8jWvnYt/k7SdU=; b=VaHIrm+TS1oazfkxHjyrTnlRiMxlavkazqvVUxn8ysFPLsXGUDSl1ynVza/oSFtECDS+qs E/Hj/78Rbw8DRnl21St5hwrwk4MoRp5BhZxWbnLOmGEBw0FidKv+OAb7wrjp3CVdf5Ew4q BFhsvV1qpPDeFzz6oyiB6ucmRmNv7TPHsRkikHVpO3i7M6AqoulO3LDn4pYImEI5D7cFop 17nZ6vaBHisW+2D3jkTEKpb2QSSdwt+wazU8eKr5fRE6BJjKBBa9FwbzGVuPzlebQtw04O C7W+8+a5VjHKAf50zpperBQRXfVkfD9MWKkEHFZ5Vvc0anlQ6LcgaQyu85oDsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975058; a=rsa-sha256; cv=none; b=AYiAs+s7SBuLO3A9Ad+FAyz1SoD2bnFNHVWjQSXJRt+fJ38XCSRYx8CFfS6eYRGAcPnMHk x5mY+befWtckbDZpnBrpTVbc0xljcFoGEoLPOguYninbMP4joZ3Vi8SSjiSLsPRq5rUxpH 0lE+6ctenacTDnpd4+Jx9VeugdzLPWXkbhDqu2ws080AHL2OtGwFLXsxx0DyvaDh1QWQBF vDKmmOUrFCI6jv0go29ct6rAjJosVI637S/m4mWfPyCAhMzZHMoXJPOLUgzMXWHXmioXdS 2n2lo1eiCKMenNPhvB3Y18SMFyqGLKSJ5HrZAfv4CKKV1/tiPOYT+ur4HNCWIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0y01qvzLXS; Mon, 1 May 2023 21:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4HKn051849; Mon, 1 May 2023 21:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4HSA051848; Mon, 1 May 2023 21:04:17 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:17 GMT Message-Id: <202305012104.341L4HSA051848@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: 0c4183f02efc - main - rc.d/zfsbe: Simplify List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c4183f02efccbb09892f3e5c97745884afe189d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c4183f02efccbb09892f3e5c97745884afe189d commit 0c4183f02efccbb09892f3e5c97745884afe189d Author: Warner Losh AuthorDate: 2023-05-01 15:28:11 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 rc.d/zfsbe: Simplify So $(foo) is a shorter version of "`foo`". Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39413 --- libexec/rc/rc.d/zfsbe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/zfsbe b/libexec/rc/rc.d/zfsbe index e0a30c5a16b4..c69255363ecf 100755 --- a/libexec/rc/rc.d/zfsbe +++ b/libexec/rc/rc.d/zfsbe @@ -57,7 +57,7 @@ activate_bootonce() _dev=$1 _be=${_dev##*/} - _bootonce="`kenv -q zfs-bootonce`" + _bootonce=$(kenv -q zfs-bootonce) if [ "$_bootonce" = "zfs:${_dev}:" ] ; then bectl activate $_be fi From nobody Mon May 1 21:04:19 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0z3V9Yz491VM; Mon, 1 May 2023 21:04: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 4Q9G0z2thKz3J26; Mon, 1 May 2023 21:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2B8NEASbiy7uMb7Pd/KgrKb2sCo+DIt7mWyYypvEbM4=; b=QyqtdC6RlMFfNY2CtHP/rpTHOWiL3/lvAbvAyqaFlcYw5HLx2MNS1ONe6Bgm7odl7IwIg1 eOLOHmgeio2Nu2H4IaoAno+O/HqXVDRi8pk3/G2Hv/LBv4GH4Ll4xFciVL3LGysSv6PdJ0 m5kf5GWWxQXKTJOJYv2JZfrNarvP2sf0TqBm5GioddZRoIhfhmib0PzPynh+KLyG6dIxio 2e+deA9cOMZkAGbCm0VIE/9KRDpHSfNjyQqspzAp3xQF3nbfXYkUOCR5P7TgoBe5w1vle7 bRH8k45csIKA8wLduac0OFY/DivwhXIAiZoeJTVulLPWp8QPZ39CM6A+HsOgig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2B8NEASbiy7uMb7Pd/KgrKb2sCo+DIt7mWyYypvEbM4=; b=i/Dy5S+mb/WlyZCYUIZFcn99PBMCCbdBRSNYYyF94UzvYtk1/z5D2QNUXd99GQUu2uei7C ERkKkHksvNLWI6PoWA4tceackaOuceoiSh6l2kyPpLbwPuBsFh20zesd+n0D+p0TyOjzJ8 WCaGrOR6djA+1zyDfGJ4dF9J8HECLBNvD5cwvWgqO1EtndkrBKDHyYMKVOaXoLscemBhOO KX1qDhzXHtgnDYmNpuXT76+xsZdtVImeLUGIjHH3cTdsbq5ro0gZnXCwes1/8CxPAATEby yIFyBBvwk9DYlz45a9xNFOzho/2UJoFKnXbX4wMWwtBv7n9FEDu6sI+WDhL8Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975059; a=rsa-sha256; cv=none; b=yZRML6uyMidIMktnYcPV5/YbD/m9blNFzxoZrnv61xTN/w/aElVbR6phB5BLtx9uTYjMHM UcmLeFG7Yi+HNsjYRQ6YlBF8my6r0wpEQxn/RTMTjsa6L6Eyqo4wE2y+ZKYT3tLcjVp4qx FGpWSpegibD3ANpETyF23QvJGVL0EVZ1zMq+xa8W3rtiTNHZqRTf2ldlZc4UsIofmQbxF4 WVy4SNym4BLceZ1oFVU5V9Tdtlrg6/IfGWh7sRNZs61f3+WjotGx2lslmWPp2eb1zjSi1p zNYfMa5PPxCcJvbyIVEq+3EZmwHlxtw/EgY1cNlU3PEU7qN9TVDoAywu7vuaPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0z1mygzL9k; Mon, 1 May 2023 21:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4JY7051873; Mon, 1 May 2023 21:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4JTS051872; Mon, 1 May 2023 21:04:19 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:19 GMT Message-Id: <202305012104.341L4JTS051872@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: 5ce98ee5f42d - main - stand/userboot: Simplify 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ce98ee5f42de10d29f3a99719652c272d13c2e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5ce98ee5f42de10d29f3a99719652c272d13c2e7 commit 5ce98ee5f42de10d29f3a99719652c272d13c2e7 Author: Warner Losh AuthorDate: 2023-05-01 15:28:17 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/userboot: Simplify code We have way more than 8k of stack for the current value of the zfs bootonce attribute. Allocate buf on the stack rather than the complicated malloc / free dance. Sponsored by: Netflix Reviewed by: tsoome, kevans, jhb Differential Revision: https://reviews.freebsd.org/D39414 --- stand/userboot/userboot/main.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c index b134d86de9bd..3dde6f6b4109 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -235,7 +235,6 @@ extract_currdev(void) struct devdesc *dd; #if defined(USERBOOT_ZFS_SUPPORT) struct zfs_devdesc zdev; - char *buf = NULL; if (userboot_zfs_found) { @@ -272,17 +271,14 @@ extract_currdev(void) #if defined(USERBOOT_ZFS_SUPPORT) if (userboot_zfs_found) { - buf = malloc(VDEV_PAD_SIZE); - if (buf != NULL) { - if (zfs_get_bootonce(&zdev, OS_BOOTONCE, buf, - VDEV_PAD_SIZE) == 0) { - printf("zfs bootonce: %s\n", buf); - set_currdev(buf); - setenv("zfs-bootonce", buf, 1); - } - free(buf); - (void) zfs_attach_nvstore(&zdev); + char buf[VDEV_PAD_SIZE]; + + if (zfs_get_bootonce(&zdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) { + printf("zfs bootonce: %s\n", buf); + set_currdev(buf); + setenv("zfs-bootonce", buf, 1); } + (void)zfs_attach_nvstore(&zdev); } #endif } From nobody Mon May 1 21:04:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G102w7Qz491Zj; Mon, 1 May 2023 21:04: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 4Q9G102Ldsz3JKy; Mon, 1 May 2023 21:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mK/fq7aynaWLRB/xWGtQcw73PWb1XKKw5flCAtzip6c=; b=hi8wiZ0kKGOfaeHeVGM4CVduwK/TBr98uLrbf0QbLnkrrw8nNp7TwFzhDmEolLPY4fACK8 TXWOsn/UQJ7RVq3gtjMAylIL+GWIMEXBe61lDozuxTxYp0W/Tq2pMalmK8Jt6WymklIdRi +hEo7kEfd3wcceLX1YyJekAvNhgdpetRNaGGf8Kv6uAFUIvPVgXgDGXcLt0GsRnrealGXb 0WOwyji3k1Ev7rTtYiQFunDh92i9o2Xc+cUatKYU6z0OV+jYT9aiCY/UD/DjB5JY4UFFtd vqtRqbSA7POPB3Ck6uOCo0UCuKU61TyIP/3odAnW9q5yheE6RWQd8U36fpXvKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mK/fq7aynaWLRB/xWGtQcw73PWb1XKKw5flCAtzip6c=; b=RfKLJ7P6pxvEi4RxYUxseWy6fjSq6gUg6xdusHoBfnQVEUYnyxYyeub1/OFOukuNcFSeaN j83xyILI+a9riTkkfeAIFwoUAZePMDNGTRdF8BHdBojnqQMuEl0ct9EN2hg7fr0BbtB+WM iK9+Wm2Ia6LUslYwooJHIZglQfS2wfi69oMJMZlBkv2OBEejNjtHVd4ZpruTiYE2uCIo/r IHKjPovjteyx/N+KXLIZ5RgBceE2PAXPphBPpzl2cqO87G/PxXBec5WWrR7tS8KoYWK5ef X62V70K5zkNjrL/DLUmz783BWSNqycFzl4To0cX+mzwARtvcqXOfvhMgR/0SQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975060; a=rsa-sha256; cv=none; b=E4D+Q2k4fD664uUZSRvtXb9rL+NMHP2+uwFMH4bf3bnkjWtDiWt0DSL6H983b4op85iqWz Zn4+OUJ0vyNIU5llvtfaXsCeTyFYSrk0FBZSpFmgkFeJVmfRMEfWyUb3t8CrY1EK4NyBHe /O5FjCvwCelOOeUZO77wty2t2Hl756Q2++Cbr3IwP6Qi5Z9SWWlgtHS6w11Pk4LV1ElI1b borXh8iQShaYFi8F9yYdfwxFW0yvYmnLCa+44wpgphYshJJq9vVrYG47NKftSquyR2YJbz Zivbp2l2AVYILfMO6Uhd1uvqkIjAVdwgKFmxutUknzF4SjHiIwzd/nyqciLFbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G101PX3zLM6; Mon, 1 May 2023 21:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Kbr051893; Mon, 1 May 2023 21:04:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4KVY051892; Mon, 1 May 2023 21:04:20 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:20 GMT Message-Id: <202305012104.341L4KVY051892@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: d5babd0d2376 - main - stand/efi: Simplify code 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5babd0d23769d365a83bebc0a5cd8cbfb55564d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d5babd0d23769d365a83bebc0a5cd8cbfb55564d commit d5babd0d23769d365a83bebc0a5cd8cbfb55564d Author: Warner Losh AuthorDate: 2023-05-01 15:28:25 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/efi: Simplify code here We have plenty of stack in the EFI case, so use it instead of the complicated malloc / free dance. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39415 --- stand/efi/loader/main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 9ff5f1dd7674..e5f9b40ae55f 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -252,7 +252,6 @@ probe_zfs_currdev(uint64_t guid) { char *devname; struct zfs_devdesc currdev; - char *buf = NULL; bool bootable; currdev.dd.d_dev = &zfs_dev; @@ -265,18 +264,16 @@ probe_zfs_currdev(uint64_t guid) bootable = sanity_check_currdev(); if (bootable) { - buf = malloc(VDEV_PAD_SIZE); - if (buf != NULL) { - if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, - VDEV_PAD_SIZE) == 0) { - printf("zfs bootonce: %s\n", buf); - set_currdev(buf); - setenv("zfs-bootonce", buf, 1); - } - free(buf); - (void) zfs_attach_nvstore(&currdev); + char buf[VDEV_PAD_SIZE]; + + if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) { + printf("zfs bootonce: %s\n", buf); + set_currdev(buf); + setenv("zfs-bootonce", buf, 1); } + (void)zfs_attach_nvstore(&currdev); } + return (bootable); } #endif From nobody Mon May 1 21:04:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G113rNjz491Gf; Mon, 1 May 2023 21:04: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 4Q9G113MSmz3JCc; Mon, 1 May 2023 21:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFff6DH81IAYEJqUhhaQmIVWUYAhd9QB1u1pVAZArlA=; b=WryedrZQBy5kmCMEUTLnDDUZUz4PXe1HVV0WoDluGnsCuu3iCCbxIOl5EmR1TAKzIwLO2P PGaceMTLaeeNaywQQXvHgt+9JSuo1DJAcX397oxdkqrxJkseBin4FGbVpRHb1bf360atwu NS5QO+8OrKblQByeO2uKmKbxt0PHojAXF87+lNdFIjFbdL4eWWg/k+CxNPhpyKHcKWSHpt 518Dc5/i5aCwF+T1f4VTT8qvh3ZVseEaioE1jvTn5njUXMXxkHvtklJrpBRZ/yR94OOY5q 7l63ra46yv1MrdCuZdoU/U9tgZtg243N0ue//OtgneEXKoHP2J83WUu6HPsmwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFff6DH81IAYEJqUhhaQmIVWUYAhd9QB1u1pVAZArlA=; b=s4LyaPlUA54vNpSlmeRQDM91TYZ09OqCDI/5uxnOdB7hG+3As0jPUV2BW+AU5uUvDGsopB PF8VmC3Fwg3IfpsnrCtHqQG8xQsX1VemvvzlNMwZdvfLQU/koRiW09befwUWX2z7e31ecG gQgP/odEDdiy26g7BIVuREwQzbC2H+YvIwGHA4wffgskwr83DZzqpd9JCUOxXgJspV+WTD qv5jnJ7grjPZnl1wGuIOJCng8NU/z6sdQuccxfGv29qBLTcv4jOG8yoSVvYeJIx4Bq2OjJ HibL3gEH82DjpEbjsZhKdNEdjzkLHhzvOUJESSKwU2wnhXlGR/6uugF7xL3lWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975061; a=rsa-sha256; cv=none; b=rDWR8fRvFUM1DoRBtPEiSR05EJuA9jQO9rCBbmlQoJfSdhAgS/irAJjsl21kfWIQQuukLz XGSF7SlPOC8n8E7Vj3eI4LpZT/5RGNRBoEyWan9fkcdEJi4xL9BeGSYzOZ6fYNdqHkx7rd OT/ehOHbyBxixDi/f5hP0xpaXD9jc5GifD4A0Eszr3OI3Wb0XYMJr9i1pgzrRRZgZmYo+a nfXC+La6uoCjSsd8EwQK77jazjNn1MiImEioh1hYaV6hPJ4Ehz062VUyfiVA6rL3kUGPrd WWaToHwI6CTTiTm36Mb1Ef1u/cgzWjgq9GtpQuGb7Az0RqplsX0gdOVU+tztCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G112JWnzLXT; Mon, 1 May 2023 21:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4LAp051928; Mon, 1 May 2023 21:04:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4L17051927; Mon, 1 May 2023 21:04:21 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:21 GMT Message-Id: <202305012104.341L4L17051927@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: 5328f9034fc4 - main - stand/kboot: Simplify List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5328f9034fc410b105629700a1309bebf094266a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5328f9034fc410b105629700a1309bebf094266a commit 5328f9034fc410b105629700a1309bebf094266a Author: Warner Losh AuthorDate: 2023-05-01 15:28:32 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/kboot: Simplify There's plenty of stack in kboot, so use it here rather than the malloc/free dance. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39416 --- stand/kboot/hostdisk.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c index 5cc7825034dd..d28530891e0e 100644 --- a/stand/kboot/hostdisk.c +++ b/stand/kboot/hostdisk.c @@ -574,7 +574,6 @@ probe_zfs_currdev(uint64_t pool_guid, uint64_t root_guid, bool setcurrdev) { char *devname; struct zfs_devdesc currdev; - char *buf = NULL; bool bootable; currdev.dd.d_dev = &zfs_dev; @@ -587,18 +586,15 @@ probe_zfs_currdev(uint64_t pool_guid, uint64_t root_guid, bool setcurrdev) bootable = sanity_check_currdev(); if (bootable) { - buf = malloc(VDEV_PAD_SIZE); - if (buf != NULL) { - if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, - VDEV_PAD_SIZE) == 0) { - printf("zfs bootonce: %s\n", buf); - if (setcurrdev) - set_currdev(buf); - setenv("zfs-bootonce", buf, 1); - } - free(buf); - (void)zfs_attach_nvstore(&currdev); + char buf[VDEV_PAD_SIZE]; + + if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) { + printf("zfs bootonce: %s\n", buf); + if (setcurrdev) + set_currdev(buf); + setenv("zfs-bootonce", buf, 1); } + (void)zfs_attach_nvstore(&currdev); init_zfs_boot_options(devname); } return (bootable); From nobody Mon May 1 21:04:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G125gl0z491B9; Mon, 1 May 2023 21:04: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 4Q9G124SNhz3JJS; Mon, 1 May 2023 21:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3Eal/GI4uR4zDMUvDYiYNWCDjAoTU9Z6fHOPA0O9jE=; b=Icat5eaHx2LwFYmYWka7rAyECEuOopVji2t9AFYgCsCKtUVTNP2U3qEjVzvAjeEAXPuHSn JZVwZ8B2C3D0bnwV4ojI4GYbPv687vRbI1BivbQB6EaKjK2zRxMnrkZId28SZaBtIL+sWO P4+tr2pRcG4g2dFpMcpPgeKGqntpWfkorcgt5bMX6um/TstK7xg7ZaL9kKLSUuh1WY1/KE QFzvFVUS2UQ9JF1ZTUmXVC1f/3cVUUZjKGRewiw7S0CHfCnLkEIgk/nXXCiKm9Wma6RlKk XN4FznAEgv5fqlGbWpHij5hwYy+tV0OMzl5EzaPZ4ta5Sx+Ox1VhGhaI4Yd4rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3Eal/GI4uR4zDMUvDYiYNWCDjAoTU9Z6fHOPA0O9jE=; b=BK2MHR8Ry2vZm760eUdWSiwSgdNin3eFtz11fIFOMo4L0xAv/g94REQYc9sj9W2EwUbAn6 iP2ZPed+TOzPDBruIPUun1G2MN27vc29T0Fil5P5RSUl7aCnIpkxDkfkEu/bv+SHLtM+Fr IcdT+UFg4ovJDBuOPaHTLIB1bliUKj1hyyy+/eNZBk9VOoXUHQ1OhGMIg/UcEPjbGuqoRU HMIlcSyKBSyNmaszo4Lq+tiVWBUnSoYSlW0pd6fEYCQUGxzTEggrSY7kzK+01oAps+mXNd m4c5UNtVOsPc3K39IjoB+vEyXiHOjW8mwXg6UNw1r7xeZlYZ9pJ+Xydt0nxd+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975062; a=rsa-sha256; cv=none; b=a7KR4I7kQBU87zqpHSJ0IWfx38jY6QKdenE/ClAMXXV8U7VCkq9IIYSGt57Hdvh+yu8+/o O5xSz7YAhgoVV06hncUbccqQcPHBfNohfnNY2cB3C84U4L17SQMqNaDOEZ6gx3mdy0WKpN 21qW0GPlTmVHV34zCfa2I0STxa9hd/uAOPPaJyKoGMf1Uks2TqVGYHouSK6ZlwUDoswifv FqyLWtOpJH8rvGhU8J5ad0HVEl6UKNMvGISzyJKPg4JifNtw8qwWmidI3bsSOxBlV60UBr bQfWTKsxMocifyvRqxtbD9Ajm79FNWdYbAVBEPfo/fjvWcWSyxz5JOV/Twr1Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G123FmxzLZl; Mon, 1 May 2023 21:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Mkv051947; Mon, 1 May 2023 21:04:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4Man051946; Mon, 1 May 2023 21:04:22 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:22 GMT Message-Id: <202305012104.341L4Man051946@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: cb8179079ab0 - main - stand: Fix warning about variable unused List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb8179079ab08263b0e3835655a83a8915f33eb4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb8179079ab08263b0e3835655a83a8915f33eb4 commit cb8179079ab08263b0e3835655a83a8915f33eb4 Author: Warner Losh AuthorDate: 2023-05-01 15:35:16 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: Fix warning about variable unused dflag is unused when LOADER_VERIEXEC isn't defined, so move it under the ifdef. Sponsored by: Netflix --- stand/common/module.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stand/common/module.c b/stand/common/module.c index 43c04728b4fa..9902309b7f99 100644 --- a/stand/common/module.c +++ b/stand/common/module.c @@ -114,10 +114,14 @@ command_load(int argc, char *argv[]) char *typestr; #ifdef LOADER_VERIEXEC char *prefix, *skip; + int dflag = 0; + char *args = "dkp:s:t:"; +#else + char *args = "kt:"; #endif - int dflag, dofile, dokld, ch, error; + int dofile, dokld, ch, error; - dflag = dokld = dofile = 0; + dokld = dofile = 0; optind = 1; optreset = 1; typestr = NULL; @@ -129,11 +133,13 @@ command_load(int argc, char *argv[]) prefix = NULL; skip = NULL; #endif - while ((ch = getopt(argc, argv, "dkp:s:t:")) != -1) { + while ((ch = getopt(argc, argv, args)) != -1) { switch(ch) { +#ifdef LOADER_VERIEXEC case 'd': dflag++; break; +#endif case 'k': dokld = 1; break; From nobody Mon May 1 21:04:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G135hYpz491BD; Mon, 1 May 2023 21:04: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 4Q9G1357tQz3JRg; Mon, 1 May 2023 21:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKkzAGoFohP8o2Ux7RAr4fSYoQiusofS1T1v++0puSE=; b=ryS8VVe3/bxwvOn6+jRAwbezHqJ2RgV2/3TccGZzvwOOCAGsASBHQJ/E+pL6wrm/Mp4Lfb xzc1baOvp2p4jMMz+PnRCZ7ZWJpE5FBe/MGJmRWYkTRaCE0iY2peL17TYT4KmMklXH6oIH ipjO9jg71/Vk0jNwGUPi0IescKfPQpRg/KCnSwDaGGlnGEia2yGpwyKX6jJcXXXpkhS7eU VFFmUbAuA3o5940cN7XliY1jaB8ciKuEAKx6ERTeuwB9LnIW+prc4ydr3lYGDJ+noUZvA6 PXFrZENOpv0E3j0krz2hRJYPVxq3xDxFZQgNWDr5A68GxGr3exstqlBkaY/zDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKkzAGoFohP8o2Ux7RAr4fSYoQiusofS1T1v++0puSE=; b=wAJKJ7fvpCa8nZ+HZPhzh8qsbELmsEHvl/nb9ZLlXP4pC/NwrjdpIH5WO0gIY727DkgyR5 fqgMCivT9WRQsvhdEx0Y4kxug9TQC40m41q55TKaVEF1xWMefDx5O6Y5iR7UswTr7MnUCx c1awT6ds7EoV6XMSn2wmRGQe2qrzOQQqV0zU72xdptUHh3Igu76tpbUW2RWMHLHm2NxWMV Zd2DKj6+L+vzzB99l8zVLTj49dY6d2nmTmdaM1yiwYi8d1BUj9MC2R3ThPZCav1NpDVeHJ kISkBTuWyLtJq4fgVHPr02jIsMpSXlRb7CuNd/nkBGweLNE/mPi6r+YbjHc3rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975063; a=rsa-sha256; cv=none; b=EEfsjWfaYxmU7drAtoxEi5G7L3XDq6ubFZOZNvY92frqAs20BhLkssrDdU3oaLZVZglKdu UJQId4fDG/SfO5uEH5A7kQkRAz0K+JHBq1Bgi+7Q6CWiF/WOie7UQzXCWsgRKnOs01K8Am SPEPk9i+axTRYFNs76qs8CNhpHo8f/5epGO0bH6bbmmKbhlCs+7PEHCXrymYzsBcD5fuKV 3KgPHv/MPxE0vdIAFaDw3CR/mt5X1CO2lx+WXCrLvl1xtiPnnpfs+PW22dvV4E9ZjtRe4i 78yLx/aGdbGy//3kzrLcV/wDhOzOqZqI3V5ThV8sTQiLfJfFjY1CzXLx63tqSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G133y17zLXV; Mon, 1 May 2023 21:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4N4O051970; Mon, 1 May 2023 21:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4NtL051969; Mon, 1 May 2023 21:04:23 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:23 GMT Message-Id: <202305012104.341L4NtL051969@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: 96b119340eec - main - stand: remove ZFS warning about computered but unused variable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96b119340eec331bdbbbdea606dae64cd2dce774 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=96b119340eec331bdbbbdea606dae64cd2dce774 commit 96b119340eec331bdbbbdea606dae64cd2dce774 Author: Warner Losh AuthorDate: 2023-05-01 15:45:41 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: remove ZFS warning about computered but unused variable Toss a __unused on the unexpected_errors variable. We compute it, but never use it. Sponsored by: Netflix --- sys/cddl/boot/zfs/zfssubr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/boot/zfs/zfssubr.c b/sys/cddl/boot/zfs/zfssubr.c index 1dcb0829680c..13edcc8ee747 100644 --- a/sys/cddl/boot/zfs/zfssubr.c +++ b/sys/cddl/boot/zfs/zfssubr.c @@ -1574,7 +1574,7 @@ vdev_raidz_read(vdev_t *vd, const blkptr_t *bp, void *data, raidz_map_t *rm; raidz_col_t *rc; int c, error; - int unexpected_errors; + int unexpected_errors __unused; int parity_errors; int parity_untried; int data_errors; From nobody Mon May 1 21:04:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G146mGmz491Gp; Mon, 1 May 2023 21:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9G145lM7z3Jfp; Mon, 1 May 2023 21:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=psvg0fVYxabq0vGqcRVmyRm8XiHsrIik67hxMtF5ipQ=; b=CVDpZMnzKyZFq1gued7cigi8FzOiT5YO5dL6NSZvwB0SMAFtIsO0sO7aMy6pHFFGEfwelY HqBeU/wgl+lSqNwh/RIOv5tquwEUiD1690a91A1RwhGTgesMAA+ORtfkWn8K8iptYv66v+ wbS/GWYXgfG+fusdrv7hZbgJBUrvQkU/rdNgLmi2F5MEN6srglq6CyhiPLdSkG3ujgdhL7 6QdJVUqcoyYmUNPhYZgFjiqxDyXGQs1ZWq6Fjxerq8dsRmnNXY5gsXteUniqusa9LsRO9j x/kZs++oaS8cqWqUxPDfaSEos8ggM4Q+P6bhqr8TA3X+zfAaAGFCTDZV32377w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=psvg0fVYxabq0vGqcRVmyRm8XiHsrIik67hxMtF5ipQ=; b=P4NxXOPqO4YfAdovK7KjFimKRpYLMAd4sN8PouGWuvGZARmrhJSPgtNUkMRg2XLgg1vwc8 KNtctn75ZKHRiaSxBmIu3DsY/0xGSugDSkGVoToTUjratMxOxA8YsYbCQtbeoEGbxLQD7l wmtJpMM8LIhw3r5vi0riLVajUVSt331BiA6DteLNYBJJDOBWmSHS/TMPOKwgZi5QQ45HWv Hmvdca9kiFksf+ruMphoRZ47+H6Y4u3pRQMzBypJ7YaJYO1YqdmjtWNS1pZjxZ7gIi5P2w z/jThs3WEsSFtJzrOxdtNXLVSN769YIYLq+uCTAX3kWWuV33MLBMDXbhQXCEtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975064; a=rsa-sha256; cv=none; b=TWuHA6AF/x5SCWhADgUNqYOJEgZ2+Oac+qBBIQ4Mi9a5DxUuCDEinorATQQmVajkV4XEHK yZr0rpYWsIJiaajQxWja+bEc8+ikpQSHPQMQeN3tQBBzbdvRrfJiFyL0EH8hHRfSgiOCot BLDtxxCB12nssK/fYcEhgiZ2pPf5ZqN+dakHzTsuxvmGNyvvuSBpl5iaUKrrmboVRxqzHB VTTmTQHam8cYjKv/74LasvrXpAmsLwypa6FpUOAZ81avEE7Fwl2si2MyLUpxFAFaKONblg 2jEMifjtQOPWOLBcoYvTDSkTfZsvj+4QPJPS/J2+xjq7aI6IMMVFB1wvhEIcig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G144rJRzL2h; Mon, 1 May 2023 21:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Oa7051989; Mon, 1 May 2023 21:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4OoW051988; Mon, 1 May 2023 21:04:24 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:24 GMT Message-Id: <202305012104.341L4OoW051988@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: 6c8358cd7ffd - main - stand: back out the most of the horrible aarch64 kludge List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c8358cd7ffd71acec74036429a8afb502720722 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6c8358cd7ffd71acec74036429a8afb502720722 commit 6c8358cd7ffd71acec74036429a8afb502720722 Author: Warner Losh AuthorDate: 2023-05-01 16:07:00 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: back out the most of the horrible aarch64 kludge Add one ifdef to upstrem code and get rid of compiling the horrible checked-in aarch64 assembler for the boot loader that the loader will never use. I'll attempt to upstream this and adjust as needed. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39897 --- stand/libsa/zfs/Makefile.inc | 33 ++++------------------ stand/libsa/zfs/blake3_impl_hack.c | 23 ++------------- .../openzfs/module/icp/algs/blake3/blake3_impl.c | 13 +++++---- 3 files changed, 15 insertions(+), 54 deletions(-) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 7660f4ab7baf..6eded5659602 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -19,11 +19,6 @@ ZSTD_SRC+= zstd_common.c ZSTD_SRC+= zstd_ddict.c zstd_decompress.c zstd_decompress_block.c ZSTD_SRC+= zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.c -# This is completely bogus: We should be able to omit this code completely. -.if ${MACHINE_ARCH} == "aarch64" -ZFS_SRC_AS = b3_aarch64_sse2.S b3_aarch64_sse41.S -.endif - SRCS+= ${ZFS_SRC} ${ZSTD_SRC} ${ZFS_SRC_AS} # @@ -52,9 +47,9 @@ CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${OZFS}/inc -DNEED_SOLARIS_BOOLEAN .endfor -CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} +CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -DOMIT_SIMD +CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -DOMIT_SIMD +CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} -DOMIT_SIMD CFLAGS_EARLY.list.c+= ${ZFS_EARLY} CFLAGS_EARLY.zfs_zstd.c+= ${ZFS_EARLY} CFLAGS_EARLY.nvlist.c+= ${ZFS_EARLY} @@ -73,9 +68,6 @@ CFLAGS.zfs.c+= -DHAS_ZSTD_ZFS \ -I${SYSDIR}/crypto/skein \ -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 -.for i in ${ZFS_SRC_AS} -CFLAGS.$i+= -DLOCORE -.endfor # # ZSTD coding style has some issues, so suppress clang's warnings. Also, zstd's # use of BMI instrucitons is broken in this environment, so avoid them. @@ -86,24 +78,9 @@ CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL} CFLAGS.zfs_zstd.c+= -DIN_BASE -DIN_LIBSA +CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include + # Do not unroll skein loops, reduce code size CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 -# To find blake3_impl.c in OpenZFS tree for our somehat ugly blake3_impl_hack.c -# that's needed until the necessary tweaks can be upstreamed. -# XXX the last import gutted all this since upstream changes broke this hack. -CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include - CWARNFLAGS.zfs.c+= ${NO_WDANGLING_POINTER} - -# Needing to remove the -mgeneral-regs-only is a red flag that this is not quite -# right. But it's needed at the moment due to the muddled upstream. -b3_aarch64_sse2.o: b3_aarch64_sse2.S - ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ - -o ${.TARGET} - ${CTFCONVERT_CMD} - -b3_aarch64_sse41.o: b3_aarch64_sse41.S - ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ - -o ${.TARGET} - ${CTFCONVERT_CMD} diff --git a/stand/libsa/zfs/blake3_impl_hack.c b/stand/libsa/zfs/blake3_impl_hack.c index 2be6cc54e774..789807714e2c 100644 --- a/stand/libsa/zfs/blake3_impl_hack.c +++ b/stand/libsa/zfs/blake3_impl_hack.c @@ -5,8 +5,8 @@ */ /* - * Hack for aarch64... There's no way to tell it omit the SIMD - * versions, so we fake it here. + * Hack for aarch64... Not sure why isspace isn't defined, but it sure doesn't + * belong here. */ #ifndef isspace static __inline int isspace(int c) @@ -16,22 +16,3 @@ static __inline int isspace(int c) #endif #include "blake3_impl.c" - -/* -static inline boolean_t blake3_is_not_supported(void) -{ - return (B_FALSE); -} - -const blake3_ops_t blake3_sse2_impl = { - .is_supported = blake3_is_not_supported, - .degree = 4, - .name = "fakesse2" -}; - -const blake3_ops_t blake3_sse41_impl = { - .is_supported = blake3_is_not_supported, - .degree = 4, - .name = "fakesse41" -}; -*/ diff --git a/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c b/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c index f3f48c2dfa1a..5684b4ff1a97 100644 --- a/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c +++ b/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c @@ -30,10 +30,13 @@ #include "blake3_impl.h" -#if defined(__aarch64__) || \ +#if !defined(OMIT_SIMD) && (defined(__aarch64__) || \ (defined(__x86_64) && defined(HAVE_SSE2)) || \ - (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) + (defined(__PPC64__) && defined(__LITTLE_ENDIAN__))) +#define USE_SIMD +#endif +#ifdef USE_SIMD extern void ASMABI zfs_blake3_compress_in_place_sse2(uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags); @@ -96,9 +99,7 @@ const blake3_ops_t blake3_sse2_impl = { }; #endif -#if defined(__aarch64__) || \ - (defined(__x86_64) && defined(HAVE_SSE2)) || \ - (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) +#ifdef USE_SIMD extern void ASMABI zfs_blake3_compress_in_place_sse41(uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, @@ -257,6 +258,7 @@ extern const blake3_ops_t blake3_generic_impl; static const blake3_ops_t *const blake3_impls[] = { &blake3_generic_impl, +#ifdef USE_SIMD #if defined(__aarch64__) || \ (defined(__x86_64) && defined(HAVE_SSE2)) || \ (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) @@ -273,6 +275,7 @@ static const blake3_ops_t *const blake3_impls[] = { #if defined(__x86_64) && defined(HAVE_AVX512F) && defined(HAVE_AVX512VL) &blake3_avx512_impl, #endif +#endif }; /* use the generic implementation functions */ From nobody Mon May 1 21:04:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G163MzJz491dX; Mon, 1 May 2023 21:04: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 4Q9G1615bXz3JSd; Mon, 1 May 2023 21:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nR0TKkdWk92IJd+DUctzVzk6Sj8accfeDlWD8wwZ/DY=; b=FlPqm+HVD9Wzo5u7ayh2JeYinQdFRCYqVIH/zAkcavWcqP9qJAOJ1/5VZXmnpp/5FDb2mW WdLVrpBpbxww2jXSIDXyyRTpt5rs9tBla/UpKCSSCKwuGIK9P5GhYj4Y4c7TPHNtPCBoDf I4zgDJCJzECsny9WB7+dBIz5WNbeaVgWKdce+Z9LP/nUdk9v0XqLiXwWBFYp0IHBjxX9Fb 5lxcYKG5NsL8XfaQMVZAMfB4lsMkBEEPEX/mf7knj3Of6Gx2ramRpVZ+t7GHt4IPpJGkCh Gg/ccJlVy6yXXcYLhvor6b+61rra+lPIVfPEYFMkEpxxuAx4todAIXuS46SzqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nR0TKkdWk92IJd+DUctzVzk6Sj8accfeDlWD8wwZ/DY=; b=ANc+SS5jQEtrpC9M7wT0WLjI5Gw+F62cSpyCTaZdvDGLPdA/j/N0zYRAjkrsw1l6kUUjTD 5X3Eab0CvDO8IK2B5N/mBHW9Bik8LO6cGCXF3HBfzv/SmM8tivZ1RdCA6TSbIvQ6hbFZ8s jiww3K0Pacjxx0QIq+i0d6evA1I3gFKn8UyRWM2gSy0LXt9FNpg1g8G7YDO3ijGsBkneqS fANeVIatLiU8Vbr7SQjSxHrk4oXvIeim+ORlNHt7rAv+K3PASiDLslOG9fyj5SPfVX6BFN TMLqrZHsfqoQaovzbhZ/q5Arn7KEbDHC3exXzTaV+ae/YrEIFcI0luuBSH3g6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975066; a=rsa-sha256; cv=none; b=Goo1FCChQ5QS4DDyF0V3PeF8Mm5d5LDbuTXDuZyQ+BPfuaszQtZOUwiDdtU3qvvvil6nto ok7ANp8VupUrqq+gc2EIxdTIXEg2JgGsGTRBCwFQD6QtxwdfUeUd4u2648zdSzJ3ZjT+f9 ve1c2IePWv1xOi6ewysLpbZDJgjpDn/raZskya62md839I80mcziEDwSzdpWHIL3YgGW4e TfBkJRNt2WbMmXNh37mCKa1yeY1/dWZ6hXWdcvxqHsATDMRAymVdxuTUuA3kjhHDkwJtgn RBtCJuSjY5cgJjR6oEYCB8i02LPzZmH09L8HIKlEBbBzqPBpqc2pg32f91Ph7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G155qhMzLM9; Mon, 1 May 2023 21:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Pxd052011; Mon, 1 May 2023 21:04:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4PxL052007; Mon, 1 May 2023 21:04:25 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:25 GMT Message-Id: <202305012104.341L4PxL052007@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: b53ec4e44f6f - main - stand: Add isspace to FreeBSD ctypes.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b53ec4e44f6f66f2235a96f7c0508a586b1275f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b53ec4e44f6f66f2235a96f7c0508a586b1275f1 commit b53ec4e44f6f66f2235a96f7c0508a586b1275f1 Author: Warner Losh AuthorDate: 2023-05-01 17:50:21 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: Add isspace to FreeBSD ctypes.h And eliminate blake3_impl_hack.c since it's no longer needed. Sponsored by: Netflix Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D39899 --- stand/libsa/zfs/Makefile.inc | 6 +++--- stand/libsa/zfs/blake3_impl_hack.c | 18 ------------------ sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h | 1 + 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 6eded5659602..8bf430a8e4bf 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -11,7 +11,7 @@ .PATH: ${OZFS}/module/icp/algs/blake3 ZFS_SRC= zfs.c nvlist.c skein.c skein_block.c list.c ZFS_SRC+= zfs_zstd.c -ZFS_SRC+= blake3.c blake3_generic.c blake3_impl_hack.c +ZFS_SRC+= blake3.c blake3_generic.c blake3_impl.c ZSTD_SRC+= entropy_common.c error_private.c ZSTD_SRC+= fse_decompress.c hist.c ZSTD_SRC+= huf_decompress.c pool.c xxhash.c @@ -49,7 +49,7 @@ CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${OZFS}/inc CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -DOMIT_SIMD CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -DOMIT_SIMD -CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} -DOMIT_SIMD +CFLAGS_EARLY.blake3_impl.c+= ${ZFS_EARLY} -DOMIT_SIMD CFLAGS_EARLY.list.c+= ${ZFS_EARLY} CFLAGS_EARLY.zfs_zstd.c+= ${ZFS_EARLY} CFLAGS_EARLY.nvlist.c+= ${ZFS_EARLY} @@ -78,7 +78,7 @@ CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL} CFLAGS.zfs_zstd.c+= -DIN_BASE -DIN_LIBSA -CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include +CFLAGS.blake3_impl.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include # Do not unroll skein loops, reduce code size CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 diff --git a/stand/libsa/zfs/blake3_impl_hack.c b/stand/libsa/zfs/blake3_impl_hack.c deleted file mode 100644 index 789807714e2c..000000000000 --- a/stand/libsa/zfs/blake3_impl_hack.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2022, Netflix, Inc - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -/* - * Hack for aarch64... Not sure why isspace isn't defined, but it sure doesn't - * belong here. - */ -#ifndef isspace -static __inline int isspace(int c) -{ - return c == ' ' || (c >= 0x9 && c <= 0xd); -} -#endif - -#include "blake3_impl.c" diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h index 53afd8b8bd42..201fa95550e3 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h @@ -39,5 +39,6 @@ ((C) >= 0x3A && (C) <= 0x40) || \ ((C) >= 0x5B && (C) <= 0x60) || \ ((C) >= 0x7B && (C) <= 0x7E)) +#define isspace(C) ((C) == 0x20 || ((C) >= 0x9 && (C) <= 0xD)) #endif From nobody Mon May 1 21:28:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYC1shHz492VC; Mon, 1 May 2023 21:28: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 4Q9GYC1RHxz3jlY; Mon, 1 May 2023 21:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pIDqWRZYmNRF8K3o8CijELZAbc4LiZCvqIAuKJ3O2tk=; b=A6cI8x2V5+6bt6GLyFuyjbCxfSa3EKun00xj9f7+CMSsFliFoyBP+AL4epzhP3QS16aKQO F4j2QOl7Wlp00PHqGZGFij/ixAsj7gj2LztdBQvtcvZKdzdZbXxcDibamSDdxG4x64+fG+ p9DHqycqnJqU2MvAN91eEN2J/WXKy0PysgYIqDVbqlEoLCRegLyk+plT8lUpdnYUV5/RZi 94TAKZG0nzRgf9xtqe5uj/bH0FiCRb6sdp8cPcCuob1Tk+S0qqJ3capfMUATOrHqXolg49 eVdptjLdVtVuqvm0j61QA8ZQv5GUpmEaQQAOwPZo0FT7tMeDh+EOkij6eRCTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pIDqWRZYmNRF8K3o8CijELZAbc4LiZCvqIAuKJ3O2tk=; b=q9wEiGYlH6oPuBtNQEoKQhgnw4xH7aw7YAudAYMHZ7VCz7bSUfQfTggC3IGetIoQ4GdGew xQyn3nTn+Zo60+qiyZ2LIM42M6XQECfyyZdv8IWzTzAsIRBSfvB4GwNvSkuB5eheKKlFzs nT4Q67PJVCDoHqw/6AXJE8ZY70rHTj8Q6UriDeW+ISY7Ky95vRV/Ju8SIxshkIcGmA9GUr ii4+6udDhSXSaf558EUAKuY3wpayeTZdOvkf/QWkCHzwcBXj7mXDiNi3iMbE7FR0BeOVi6 cp7Zg2U2aqviBqnRHWZo0uiITL799rhRLjHa1ZWIBsVxnZsx8KPFvx085zPdTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976527; a=rsa-sha256; cv=none; b=OIcjI/i9UOknHzdxdT05NVmB8kuGDgu4/nmu6A9so27jtXoLu/R0Fb34BTMsvdvYWY162m 2dqZgVxVdGPiDl6N6tKjM0CEpdwSnoaV0+9hUXdagJYmijkOTAy6r1I6tTCke60fXv0r26 L1krcg5pyAA5WhIjzyfWVCAsmST23A5u9jbneGA+kYL3tZwcQ7DUEYg9dVTrPLOMs48UPm 9sO54hO2AdZLPUAqkLMyk4bDU17ZwM29zU2coHSb9FaOIaEEHdARU7bTUbUMxk7s72tm0t pzdQhf7jpsHe87ogzlrg2dIpCpDRRIHouZvCn96QpWCBdW6DG4w3TRMuzykOqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYC0VSMzMJh; Mon, 1 May 2023 21:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSkfO085838; Mon, 1 May 2023 21:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSk6A085837; Mon, 1 May 2023 21:28:46 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:46 GMT Message-Id: <202305012128.341LSk6A085837@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: 83eabc64efec - main - kboot: Add HOST_MAP_FAILED define List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83eabc64efec4aaf46f87bf2ba5560ecd4c336d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=83eabc64efec4aaf46f87bf2ba5560ecd4c336d7 commit 83eabc64efec4aaf46f87bf2ba5560ecd4c336d7 Author: Warner Losh AuthorDate: 2023-05-01 21:11:32 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:11:32 +0000 kboot: Add HOST_MAP_FAILED define Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39790 --- stand/kboot/host_syscall.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h index 64288f48e6f0..c85284d03be7 100644 --- a/stand/kboot/host_syscall.h +++ b/stand/kboot/host_syscall.h @@ -123,6 +123,8 @@ struct host_timeval { #define HOST_MAP_FIXED 0x10 #define HOST_MAP_ANONYMOUS 0x20 +#define HOST_MAP_FAILED ((void *)-1) + /* Mount flags from uapi */ #define MS_RELATIME (1 << 21) From nobody Mon May 1 21:28:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYD2kpgz492gT; Mon, 1 May 2023 21:28: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 4Q9GYD22PSz3jx1; Mon, 1 May 2023 21:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cxwkESzsjNm9nXqINQUPNdClWBzFWw3uTVD0m0UY/c=; b=pcg/5MHJDrkwmw3TBjkneNSIlZgvUbUVg00bUNTlI6w1Vypw16pYxJWcX7lajN3ELTKwUq Iy6e0iGICIcqOWLR1612p7i4pKUR2YEe/vHt1Ya8ZZTJuTuD0jjqgKUdTQVFyeAh3jFLpj R3/++7AZ8/amI8r4qVQZ5mx8YG5Hln/psqTgWO9EHfNTWC0aA0TT7LpnSyrOgB2zPNRrol AyVBOraz4JovJ/pO2uzG+oM3IEnK6DdbrI8bWVkRQrWBBob/CYD0xSvygFpKRBtJrJp5q0 Rmygv3A5Hmy3N2GRklQN0yDcJjX/XD1RxyQrnid05Wu/scywiaKNtTVP+CGLZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cxwkESzsjNm9nXqINQUPNdClWBzFWw3uTVD0m0UY/c=; b=bFZ4oVmRkGxsSA20BvG6Ea3Al+oxoDePRjRz6FO3GXomS1d1f5qCTGiTIAX5F7UoVeJBGJ lkfSuhxKTfaRkesxK2xr6/hJtl1yvqxzASzylc5O7cUVdnuwhkFCokw1eAcRzHOKoTjUFM lT7Kg5t6Z6SyIpjxb/l8jzFEfCcyM2P4ZjkE4owuPv43bTAsy+wHHXRBdq8L0/SHw4myUQ itBHueus181mtaTZzfvdAGZuA/ZV/s9W6JdETO9htndBTKR4Prk7RYVGLxpTQIAxmGBU9G YA/10KEqbEdotAmZrrpLtfH0NHGqy0D8V5+LPDqOCrvd4zP68b2Ni4vAC6cXig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976528; a=rsa-sha256; cv=none; b=AL35dV9bEpqvSp1ZjRvMmmhM6eS99CbxXk/iHaPK7HXkFatSnFmXAKieR2FFt4VvVTQUks UWV3akr2in9Om/Q58zW99IVaR3IaboGFhWaZciLtbfabGCzzVKQNkIQrCGp3lQk1SWoRNe zQ62pAilIddjmS/IQkdfTm7hkMX+tE0bumoKJ7Ry/hAoV9qfuW1zAeuv3scx1mFj7LknsA 3WnSMQydHQhcR+UhPDSJH18dsa9fZ3v8oXHcfSUHgdMi4iTNmX6F4kTE3tnoxJGS0dEZvA P8tL/ZosOowUlTibWYgj6L21W+9IaDSyO4oIXYInGIggzypLBQdFC3nZXRbD1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYD17XKzLj7; Mon, 1 May 2023 21:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSmsJ085868; Mon, 1 May 2023 21:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSmDU085867; Mon, 1 May 2023 21:28:48 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:48 GMT Message-Id: <202305012128.341LSmDU085867@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: cf6044857e2b - main - stand: Testing program for smbios List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf6044857e2b20f2ecf90929027e9dd335b38803 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cf6044857e2b20f2ecf90929027e9dd335b38803 commit cf6044857e2b20f2ecf90929027e9dd335b38803 Author: Warner Losh AuthorDate: 2023-05-01 21:12:19 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:19 +0000 stand: Testing program for smbios Write a quick and dirty testing program to dump physical memory to help test and debug the smbios.c code in new environments. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39791 --- tools/boot/smbios/Makefile | 11 ++++++ tools/boot/smbios/main.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++ tools/boot/smbios/stand.h | 18 +++++++++ 3 files changed, 125 insertions(+) diff --git a/tools/boot/smbios/Makefile b/tools/boot/smbios/Makefile new file mode 100644 index 000000000000..a555470aab14 --- /dev/null +++ b/tools/boot/smbios/Makefile @@ -0,0 +1,11 @@ +# $FreeBSD$ + +PROG= smbios +MAN= +.PATH: ${SRCTOP}/stand/libsa +SRCS= main.c +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/stand/libsa + +.include + +CFLAGS+= -Wno-cast-align diff --git a/tools/boot/smbios/main.c b/tools/boot/smbios/main.c new file mode 100644 index 000000000000..60263d2ea8d9 --- /dev/null +++ b/tools/boot/smbios/main.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2023 Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Test program for smbios support in the boot loader. This program will mmap + * physical memory, and print the smbios table at the passed in PA. This is + * intended to test the code and debug problems in a debugger friendly + * environment. + */ + +#include +#define setenv my_setenv + +#define SMBIOS_SERIAL_NUMBERS 1 +#define SMBIOS_LITTLE_ENDIAN_UUID 1 + +#include + +#include "smbios.h" +#include "smbios.c" + +#include + +#define MAX_MAP 10 +#define PAGE (64<<10) + +static struct mapping +{ + uintptr_t pa; + caddr_t va; +} map[MAX_MAP]; +static int fd; +static int nmap; + +caddr_t ptov(uintptr_t pa) +{ + caddr_t va; + uintptr_t pa2; + struct mapping *m = map; + + pa2 = rounddown(pa, PAGE); + for (int i = 0; i < nmap; i++, m++) { + if (m->pa == pa2) { + return (m->va + pa - m->pa); + } + } + if (nmap == MAX_MAP) + errx(1, "Too many maps"); + va = mmap(0, PAGE, PROT_READ, MAP_SHARED, fd, pa2); + if (va == MAP_FAILED) + err(1, "mmap offset %#lx", (long)pa2); + m = &map[nmap++]; + m->pa = pa2; + m->va = va; + return (m->va + pa - m->pa); +} + +static void +cleanup(void) +{ + for (int i = 0; i < nmap; i++) { + munmap(map[i].va, PAGE); + } +} + +int +my_setenv(const char *name, const char *value, int overwrite __unused) +{ + printf("%s=%s\n", name, value); + return 0; +} + +static void +usage(void) +{ + errx(1, "smbios address"); +} + +int +main(int argc, char **argv) +{ + uintptr_t addr; + + if (argc != 2) + usage(); + addr = strtoull(argv[1], NULL, 0); + /* For mmap later */ + fd = open("/dev/mem", O_RDONLY); + if (fd < 0) + err(1, "Opening /dev/mem"); + smbios_detect(ptov(addr)); + cleanup(); +} diff --git a/tools/boot/smbios/stand.h b/tools/boot/smbios/stand.h new file mode 100644 index 000000000000..d754189fad13 --- /dev/null +++ b/tools/boot/smbios/stand.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2023 Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +caddr_t ptov(uintptr_t pa); From nobody Mon May 1 21:28:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYF3ZFhz492VJ; Mon, 1 May 2023 21:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9GYF35v1z3k7B; Mon, 1 May 2023 21:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dekcKSxGupNVe1AyBkbHrhIKSbbtmCVHtodjrNIjbvo=; b=sk1vA/PVVayzb7uGKkUT8AK1nYG7grlMxLNGceS6XYeeOjbype2lQJc+zzTwNWqhBv2L9l GWTl9bHGUY/quarKCoCrTp87i5ATqcBiYWB14SKVnCJGdxNqxMcN3nB+ZfeOuR+RXq5cyi DwXC9fQSe6hBMn6kSWWYtICg7nMOnJjYQB4LJ8w0ViQHGauyNuJ4wO+U83i16Lab7urg+5 BeRzoMx0N7Amjq2QzAa2bKdGa48i+UHniIjAHqXH8LGVyIgnJLWKAkVGmUJYMpUhZG8f+r SSic0aKCyXkOsf6uC6IBw2v5/E/8e4FUQctjU8nFrfJTkRjupzMrMEIuIGxo3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dekcKSxGupNVe1AyBkbHrhIKSbbtmCVHtodjrNIjbvo=; b=iurPgKMwRdbN+K0gqv1YZYBT1HnuZChK4C4ZWgn4GUAlOrYZPDC20UncEQiK9ZncNN2e/4 QqAxlUghJuO5sS6E42NsZO8H2cX6TM2TacpFziczSfA4/hVBDTrM3TREV02gkrvPpvKIAG 4ZctDDlNsuS99EgPAZBJjXt3ncYg0D8yv3y3o1fcGKwchKl3GBQxxSwgV3lBLS8yRs+lLg KYeH7LjQlznLw6YPsQZkGxVPVzgx9lK1dGvZs48Sc221taIl2U8oCtXzggBPAB53KIyMZ2 NR2W0SZyjBaNQmK+z1g3LOwlprBCkItYnsKl2wGaQxnZU4BHUYgyTlYMPU1FgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976529; a=rsa-sha256; cv=none; b=ECWysxLuGQyJ1Nb83qqXB7ILVVpLtlIlyJ7MmOFjIAauA+kMRQzZThSlNPD2VpgT89bbOd ZMXU/hfwxL8buF/5f2clz/NFZ2BSIQ/X/okHtnXFwyVhTgV51ACSUDdMZzQ9HBF8LBi2w7 jkNLA6rNu2FTSsZDZQXGSveZdjYi5l5B94vlQCkfhdWEkU4QG44ZyC16icUBn9YvaGrOFN RzmsNu24aohPVFh2aC8NtUvo+QmlqxgukGUejmN+7ZqUm2rVaAuJm5IcyY2GRuH3sESSZq XKpp/1LYL/GkL8uDNfS/2QKUXG+lPuTXwO/ZW6ZX1VP47Mv08vV9JSHqCkDeAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYF2C8RzM0L; Mon, 1 May 2023 21:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSnbC085895; Mon, 1 May 2023 21:28:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSnRw085894; Mon, 1 May 2023 21:28:49 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:49 GMT Message-Id: <202305012128.341LSnRw085894@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: facd0edbb26c - main - kboot: Fix an off by one 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: facd0edbb26cec53e8b958f426b7f46550db6c5f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=facd0edbb26cec53e8b958f426b7f46550db6c5f commit facd0edbb26cec53e8b958f426b7f46550db6c5f Author: Warner Losh AuthorDate: 2023-05-01 21:12:24 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:24 +0000 kboot: Fix an off by one error Fix an off-by-one error that would mean we'd get stuck on the newline if ACPI= wasn't first. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39817 --- stand/kboot/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/kboot/main.c b/stand/kboot/main.c index 3895f7e76773..ecf96cc73d4d 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -168,7 +168,7 @@ kboot_rsdp_from_efi(void) return((vm_offset_t)strtoull(walker + 7, NULL, 0)); if (strncmp("ACPI=", walker, 5) == 0) return((vm_offset_t)strtoull(walker + 5, NULL, 0)); - walker += strcspn(walker, "\n"); + walker += strcspn(walker, "\n") + 1; } return (0); } From nobody Mon May 1 21:28:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYG4m6yz492Fy; Mon, 1 May 2023 21:28: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 4Q9GYG41kBz3kBG; Mon, 1 May 2023 21:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJle0ds6veaoHgMWOkq7iPt4o8Cwp+HFRnBvp1EXkfw=; b=P6F6GUeg//tJoI8Vk4sX+THbVav/jRyV+hOXr7i1L1myKi2kKhfgPgfpjcpN7bFUjSaAXr /V18/fO0hoiwLkFfhqdeg62VViYJReGNXtj7H34D6jtZ1W+xh/t0eBq3jFtp4joPZbIELc vOADy949CBMREbFTXs3rDC8rqGgMOukVQQRp3RXYz7/4dSUmMuC+FJKf0UXGNCyvZbczEs Lj351gI7s67EiqeGY0tBcjslvYL4WlpjNvkjJyd3ZKsRU8Rtqvx0AHMrnWId0ueJrcL5iN q71+tGbPm5SB+qKbAk9yB/cqDI4X71C+ccpmBGdpRL5JnXIk3u8vnH8T9MXchw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJle0ds6veaoHgMWOkq7iPt4o8Cwp+HFRnBvp1EXkfw=; b=TxK7eDOjO21wG62vWefOpX0SqJNTriwfctiPA1ZGb+ZZxDWU6BfwWp/Dv1gJ4lZ9HTkmJX G/DrXfnqoDUpYVRbcj473OYEKW5PtmbtGjx/AIhSYTiq3BlT6msm7WBPrUFP17vwzXzIp9 Wv5GMynZyHR77RfJALyetfPE0UIdqGBLuXCbESE6WqvnGN3TDcVHXHMeQODxwmntRDGkEU tOddq6EDaGbHXvEK1NzO35as9db1Pajfx1xseqoZdklnKDnWZIcgZQvbjhT0tZB5F0Kgpd a5L8yKb6KlcDxyH2KvE9vhrACaLN1LDTu5g0RR81TqDLIPr+PDbMoXMJpingTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976530; a=rsa-sha256; cv=none; b=a5WVMdinTHmR67U4FRFbd42Ap4B+mpuiEfgP5sEWo5UvqegN+/s8j3FHoavIEF0hgIgPM/ DENarxo2bzzycGpuHSmk+mB/G2MvNZPUrVRNNVgsN1gqFJ1K/4313onKklNQT6Byerhb8t acM9W8Kf90fX/jHxZstlQVk8xwNzSy/AqtOLcvwxcosqCSc2n8uktMvy8k4v3sb2et5gO6 v6g+3vpi0aglOCFAs9HyTQyWAMIdqF8B8XzwBNVTXzKuoTRhDWwWXbIIv0mjvR74SBkCkn k4rzrSyRtq4/l5iNUIqLlIxfMFEwooOwq+lIXj/wk1hxYF7MdPI8rDg0EvZb/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 4Q9GYG36fczMKL; Mon, 1 May 2023 21:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSojk085920; Mon, 1 May 2023 21:28:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSono085919; Mon, 1 May 2023 21:28:50 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:50 GMT Message-Id: <202305012128.341LSono085919@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: a083d0867635 - main - kboot: Add smbios support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a083d086763594a7072b11fd9ef0553c6466da34 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a083d086763594a7072b11fd9ef0553c6466da34 commit a083d086763594a7072b11fd9ef0553c6466da34 Author: Warner Losh AuthorDate: 2023-05-01 21:12:29 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:29 +0000 kboot: Add smbios support Add support for getting smbios from /sys/firmware/efi/systab, if any. Add ptov mapping that uses mmap on /dev/mem to do the mapping with 64k pages (usually we only need 1 or two mappings). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39792 --- stand/kboot/main.c | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/stand/kboot/main.c b/stand/kboot/main.c index ecf96cc73d4d..c8c49067bcc7 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "host_syscall.h" #include "kboot.h" #include "stand.h" +#include struct arch_switch archsw; extern void *_end; @@ -195,6 +196,107 @@ has_acpi(void) return rsdp != 0; } +/* + * SMBIOS support. We map the physical memory address we get into a VA in this + * address space with mmap with 64k pages. Once we're done, we cleanup any + * mappings we made. + */ + +#define MAX_MAP 10 +#define PAGE (64<<10) + +static struct mapping +{ + uintptr_t pa; + caddr_t va; +} map[MAX_MAP]; +static int smbios_fd; +static int nmap; + +caddr_t ptov(uintptr_t pa) +{ + caddr_t va; + uintptr_t pa2; + struct mapping *m = map; + + pa2 = rounddown(pa, PAGE); + for (int i = 0; i < nmap; i++, m++) { + if (m->pa == pa2) { + return (m->va + pa - m->pa); + } + } + if (nmap == MAX_MAP) + panic("Too many maps for smbios"); + + /* + * host_mmap returns small negative numbers on errors, can't return an + * error here, so we have to panic. The Linux wrapper will set errno + * based on this and then return HOST_MAP_FAILED. Since we're calling + * the raw system call we have to do that ourselves. + */ + va = host_mmap(0, PAGE, HOST_PROT_READ, HOST_MAP_SHARED, smbios_fd, pa2); + if ((intptr_t)va < 0 && (intptr_t)va >= -511) + panic("smbios mmap offset %#jx failed", (uintmax_t)pa2); + m = &map[nmap++]; + m->pa = pa2; + m->va = va; + return (m->va + pa - m->pa); +} + +static void +smbios_cleanup(void) +{ + for (int i = 0; i < nmap; i++) { + host_munmap(map[i].va, PAGE); + } +} + +static vm_offset_t +kboot_find_smbios(void) +{ + char buffer[512 + 1]; + char *walker, *ep; + + if (!file2str("/sys/firmware/efi/systab", buffer, sizeof(buffer))) + return (0); /* Not an EFI system */ + ep = buffer + strlen(buffer); + walker = buffer; + while (walker <= ep) { + if (strncmp("SMBIOS3=", walker, 8) == 0) + return((vm_offset_t)strtoull(walker + 8, NULL, 0)); + if (strncmp("SMBIOS=", walker, 7) == 0) + return((vm_offset_t)strtoull(walker + 7, NULL, 0)); + walker += strcspn(walker, "\n") + 1; + } + return (0); +} + +static void +find_smbios(void) +{ + char buf[40]; + uintptr_t pa; + caddr_t va; + + pa = kboot_find_smbios(); + printf("SMBIOS at %#jx\n", (uintmax_t)pa); + if (pa == 0) + return; + + snprintf(buf, sizeof(buf), "%#jx", (uintmax_t)pa); + setenv("hint.smbios.0.mem", buf, 1); + smbios_fd = host_open("/dev/mem", O_RDONLY, 0); + if (smbios_fd < 0) { + printf("Can't open /dev/mem to read smbios\n"); + return; + } + va = ptov(pa); + printf("Start of smbios at pa %p va %p\n", (void *)pa, va); + smbios_detect(va); + smbios_cleanup(); + host_close(smbios_fd); +} + static void parse_file(const char *fn) { @@ -300,6 +402,8 @@ main(int argc, const char **argv) */ find_acpi(); + find_smbios(); + interact(); /* doesn't return */ return (0); @@ -531,5 +635,6 @@ command_fdt(int argc, char *argv[]) return (command_fdt_internal(argc, argv)); } - + COMMAND_SET(fdt, "fdt", "flattened device tree handling", command_fdt); + From nobody Mon May 1 21:28:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYJ1360z492VS; Mon, 1 May 2023 21:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9GYH547wz3k3X; Mon, 1 May 2023 21:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tW3QgpM1XRy1VVgPvmOdCvPZ/snqfLvv8MHZg5196s=; b=SOSAADGL28035vwC4UfEqZgGJDgr2QPuqGiAqlFyqg+XUozBzoHWrrUscvG320btGPC7UB dz6rMHxFxHIea20FjR81WA+7ZrMdbJ7uVNR94oyG1VmC86MgRRYJtjZ35RzLT26XPIzngZ 9IPETFrXPMPVyQGSE7HwPiBdQxQyJjFrJuUWBYCHOJD+Zb9vLkFNKMAJQla4WgPPQv1y8j 74q44BowL/5rpspk1Vj+NiHx2IitFWDcO68ME3CLXsKXX3Mo8qozghzXNl9m70Vwz6gapd QhyaLBpyc/fg0Scfw0bG0v5fgzY9IM1hc2yN6GZT7VC4aMgDyxhxf4vWUjU+xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tW3QgpM1XRy1VVgPvmOdCvPZ/snqfLvv8MHZg5196s=; b=HtS+B/VdawvaMAL8/qtTR8ODYKTbLH5u2aCvquc9dR3Y9XHAEq62KseUUdpxIL+eGcpo90 JLrKeB7cqMvVa3j+BimKaKID9iVhAvha8EHk1n55iaua0zpPUNFLPsK7jbVIR0/vBey5au cDWcAfBp0q1P4ZtJTfeYOv2dfi8er2z74vQ/CD+G1bzFW3IbinY2fpLr0V7wStND4UWq0n Fqrlo8diK/bnkIzVCoQrkqIUYc+yuhpNYkifYjKvJJ2EaOx9rvCNY/YQbm9xMtMy8xVIxU QC7xed18DuJFoO/uogHYQVoGlGnj2W2UiHzoTkTcVfNqK3yMdw7+LywuJEJs7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976531; a=rsa-sha256; cv=none; b=lUyoIku5yabuIamRRtvWDBr0IwFHnMyIqY+dvMPxB3AhZE1oMUjaIeRuhj8gYRBRL0YAEV WPKcpIMNmNY+GeCrNcFijOaMrbRvlbt5mlZO5Rw4F1qukvpuovXvYaozROLaz5WN59KuGZ Q5aKbQ1BAgrwFdkGiCo7tXh+3Qo+yweAVVpwG/4zdf+35wwVBJKE5LJNt4+VjFKZM4CLIr w21vANvBfTCyR+T5u8i+B6mhmOt5Zc/6U0MEYHAT0a0ZI5NXugiAhoWFvB7UkF8HelKZQG 12jqMudIMAZhyhOzeDLEmeZVDsafvkl/9yCVRJNEIQkqt7eLRjv0Her/Al3lUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYH42zDzM0M; Mon, 1 May 2023 21:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSpex085939; Mon, 1 May 2023 21:28:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSpEB085938; Mon, 1 May 2023 21:28:51 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:51 GMT Message-Id: <202305012128.341LSpEB085938@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: c5e433b99ed3 - main - stand: Avoid unaligned access in smbios 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5e433b99ed3ddef0eb4fa937f38c34d4a3c4ae0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e433b99ed3ddef0eb4fa937f38c34d4a3c4ae0 commit c5e433b99ed3ddef0eb4fa937f38c34d4a3c4ae0 Author: Warner Losh AuthorDate: 2023-05-01 21:12:34 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:34 +0000 stand: Avoid unaligned access in smbios code This code was written on x86 where unaligned accesses were easy. LinuxBoot running on aarch64 uses mmap of /dev/mem to read the smbios table. Linux's mapping of this memory doesn't allow the normal unaligned fixup, so we get a bus error instead. We can't use the more natural le16dec and friends because they optimize into a single, unaligned memory load. We don't see this issue on aarch64 UEFI because memory is mapped such that unaligned accesses are fixed up. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39793 --- stand/libsa/smbios.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index 657e1635e6e1..a88d3ac4ab69 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -96,10 +96,47 @@ __FBSDID("$FreeBSD$"); #define SMBIOS3_SIG "_SM3_" #define SMBIOS_DMI_SIG "_DMI_" -#define SMBIOS_GET8(base, off) (*(uint8_t *)((base) + (off))) -#define SMBIOS_GET16(base, off) (*(uint16_t *)((base) + (off))) -#define SMBIOS_GET32(base, off) (*(uint32_t *)((base) + (off))) -#define SMBIOS_GET64(base, off) (*(uint64_t *)((base) + (off))) +/* + * 5.1 General + *... + * NOTE The Entry Point Structure and all SMBIOS structures assume a + * little-endian ordering convention... + * ... + * + * We use memcpy to avoid unaligned access to memory. To normal memory, this is + * fine, but the memory we are using might be mmap'd /dev/mem which under Linux + * on aarch64 doesn't allow unaligned access. leXdec and friends can't be used + * because those can optimize to an unaligned load (which often is fine, but not + * for mmap'd /dev/mem which has special memory attributes). + */ +static inline uint8_t SMBIOS_GET8(const caddr_t base, int off) { return (base[off]); } + +static inline uint16_t +SMBIOS_GET16(const caddr_t base, int off) +{ + uint16_t v; + + memcpy(&v, base + off, sizeof(v)); + return (le16toh(v)); +} + +static inline uint32_t +SMBIOS_GET32(const caddr_t base, int off) +{ + uint32_t v; + + memcpy(&v, base + off, sizeof(v)); + return (le32toh(v)); +} + +static inline uint64_t +SMBIOS_GET64(const caddr_t base, int off) +{ + uint64_t v; + + memcpy(&v, base + off, sizeof(v)); + return (le64toh(v)); +} #define SMBIOS_GETLEN(base) SMBIOS_GET8(base, 0x01) #define SMBIOS_GETSTR(base) ((base) + SMBIOS_GETLEN(base)) @@ -195,7 +232,7 @@ smbios_setenv(const char *name, caddr_t addr, const int offset) #define UUID_TYPE uint32_t #define UUID_STEP sizeof(UUID_TYPE) #define UUID_ALL_BITS (UUID_SIZE / UUID_STEP) -#define UUID_GET(base, off) (*(UUID_TYPE *)((base) + (off))) +#define UUID_GET(base, off) SMBIOS_GET32(base, off) static void smbios_setuuid(const char *name, const caddr_t addr, const int ver __unused) From nobody Mon May 1 21:28:52 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYJ6Hnjz492XB; Mon, 1 May 2023 21:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9GYJ5hp7z3kBt; Mon, 1 May 2023 21:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yb8ykKk+3NSbK8koskW5nDBOoGnrjmcMN8FxQEh5ksc=; b=IL2V64kaa4ITqGSsUp4Gyv+KLyT2HcfXpG/kqAlGjhQrjP9PXWHUkbfwpo7Itrfyjrz2na vOAj06F8Ql7ZyjUAjLCMvKDh937AAsOOk0zs1GeahATML2wTs9VkPgHxP0qQtaq/FkFxAY psIYthrd4iOGqnb/iXS2fupJei8dG63XSwhMU4NDhzsAmKAzZCW2GAIvSByv1ehLBT34ji qQCzLrRK14QcHppu3d5om0BgBdbzXhdsmnzL+yGY3KD6142TPKWZqw+SRAYi3rXMJ9uO9+ NTZ8BLwKBtdvpn8Le/5bTttB8A3A4z1Nq9lXRh0UqMaCBdZI2Bq4n9kfcENPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yb8ykKk+3NSbK8koskW5nDBOoGnrjmcMN8FxQEh5ksc=; b=FbuLBanGllTRr81+AD4xxIC7dQ9j2yd/HCdHB0VJVnUc9MO2ozF3jw7wsJqE94wbty3xFv dbAPzYVgZBmh/rucdoBTi9YjIjbvfZGOfhDNu8CE4t9KTIEh+2JzB46I4PY88JqHuvKR/F TwnOHowulGrMQCHJLXEXlJiZyJfNAB3L5Dn53ThVr7cePZvWlsHIA/3nX/Uznr8NUPiRrl MgUdXL5YSlxZS8cw9HgBgzf5ziC41aIiPYqkZpV4Up3Bp3Qfuv2up2jEjrGIGCsAnnU/dI ikiFhfq+7o76Gc909UhxrF9IJmEy/ob7Gr6SwSdF1dz1pkiPbYydSGQV4Y7YLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976532; a=rsa-sha256; cv=none; b=vB8Y4vp8RMFIbOtyw02gnv83Tw9bE7HokoyV1fcAJCvQq9tGWzggF5LzPWOvZ79ln+d2zJ 3iP8pw8L3t7LOHp3TJ/u5EgtMNzrbiwioH+zM89yYtkMpC63Fd5nbXXMKaNb8EwFF24zpL FBE5MHKSnW5bls9MYbNxPGuyOgzQ+UKZCJXu3uBUOcoQWFXRlMyr3LGiE4O6/+sbK8kenR V0c1w6de1ONpzBslR/H9M7VwH5EehzMI/9ZPA943lnTIuHlodUpYFVNXgAL0tCROvuqiL0 1b3eq449RY0IXLB063mdmfVcv1oW9wrpXzmULg9Rjc4aPHS1hb2eygjmaLFo9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYJ4kN2zMJZ; Mon, 1 May 2023 21:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSqkO085958; Mon, 1 May 2023 21:28:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSqiM085957; Mon, 1 May 2023 21:28:52 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:52 GMT Message-Id: <202305012128.341LSqiM085957@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: a5b4ec528192 - main - stand: More protection against malformed smbios tables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5b4ec5281929a9b7ef4a8005bb4b0035322e922 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a5b4ec5281929a9b7ef4a8005bb4b0035322e922 commit a5b4ec5281929a9b7ef4a8005bb4b0035322e922 Author: Warner Losh AuthorDate: 2023-05-01 21:12:41 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:41 +0000 stand: More protection against malformed smbios tables Add some more sanity checks to make sure we don't march off the end of the table. Typically, smbios structures are well formed, or Windows wouldn't boot. Sometimes they aren't, and this at least fails safe. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39794 --- stand/libsa/smbios.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index a88d3ac4ab69..01083fdfd756 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -520,19 +520,23 @@ smbios_find_struct(int type) { caddr_t dmi; size_t i; + caddr_t ep; if (smbios.addr == NULL) return (NULL); + ep = smbios.addr + smbios.length; for (dmi = smbios.addr, i = 0; - dmi < smbios.addr + smbios.length && i < smbios.count; i++) { - if (SMBIOS_GET8(dmi, 0) == type) + dmi < ep && i < smbios.count; i++) { + if (SMBIOS_GET8(dmi, 0) == type) { return dmi; + } /* Find structure terminator. */ dmi = SMBIOS_GETSTR(dmi); - while (SMBIOS_GET16(dmi, 0) != 0) + while (SMBIOS_GET16(dmi, 0) != 0 && dmi < ep) { dmi++; - dmi += 2; + } + dmi += 2; /* For checksum */ } return (NULL); From nobody Tue May 2 00:40:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9LpZ564yz48CF8; Tue, 2 May 2023 00:40: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 4Q9LpZ4cNcz3wZX; Tue, 2 May 2023 00:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BF+BzyWLmmlUWz5cO2/Rp4L3xjheVbIxWwZTLDjOLvo=; b=K6IIO96xR8DSJykIGBa/gQAuKXQW8ztXe5b463gYGpieXI5RKbN08UGBsURnM2r4vkQZXR bQvqI7VtlPE5g6PodNVz2iQO53la0tuyG40ySxBjmzJWh9g9p7eIKOSsPu75wiguKHhptO h6efjxvCqLGh6zJUT4xlShOlqaQwepe3me1qXGS+HTdcM7cGqFOxLzf7z6IB8uR+Jxeynp bWaIQdO4RqCUgr8y+RlHykOA+22tYIhzmOjjj21iquF8L6AEXgrH2YLCi3w3Bry8GP321R eAIQfmjhG4tORfpNZ1U4Rvhspn54iB/Mo3GEGbE9pIHGjpRpfvg07xPD47NHSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BF+BzyWLmmlUWz5cO2/Rp4L3xjheVbIxWwZTLDjOLvo=; b=REdWvCrSAdYC70Cr+wEGe17mJrKlvXfKpmFBhIuKYG1Z1Vwm86DLYWcM5vShmaURX1ZaT4 4I8gflmzLYXkMZ1Sur/eanEhTOgGwheqTJsSLg4y3+W89001/QkGSVO1I/zse6tTWWDYMv HJtTKMVsseQDvOsdPpL7+q5xORRDeQpdFHtpOh2M8kkD4zMXeVeFgC/oY3ERVAEjzAZk8z QVHoFu96kh5PunTjHqdK3j409Dp8RcNDypTPeASwd9Zbgnxlj344y4rWcrhgbf+szQBXiX hHIQQAb31TTq0bhuKOcIsl5DqgcuE9tGf67nQGmoVKU1MRtQWghMhv/h3MHp7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682988038; a=rsa-sha256; cv=none; b=OBr16ehSyPd2e3o9EDhFDvOoH7fCURLAISY0sAq5DQmvrTCJoh+D0eihA9cBQGUVzr638q BYvMI5woDImO7FjfIVPW+0IVzwyp8wdNZJdxnNll92j14aTQJq837BxkAMMAhIdCORZCPF 1ohZLgL4rE9nUqqGWqyT411E4rYuNACzLgYwRWueWU6GJbHsNK0EgDhZbda6H7i6iIe5w0 liEs5qgD9hsJIDOrksDCaAgaSeupGQUFlZiWsQt2brCY78gl3OF2EKXu6Eoo8EaTLcAGVl z3r5pvXSj2eyLZ1xDs2kx8i1DuPEgNa190RcN+ytFSbfMcaqZrE6JrVCVP6Bcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9LpZ3gfCzRrr; Tue, 2 May 2023 00:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3420ecc8006254; Tue, 2 May 2023 00:40:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3420ecFM006253; Tue, 2 May 2023 00:40:38 GMT (envelope-from git) Date: Tue, 2 May 2023 00:40:38 GMT Message-Id: <202305020040.3420ecFM006253@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: 0b4568e36fa6 - main - src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b4568e36fa622d406008e7f482821f603fedd6d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0b4568e36fa622d406008e7f482821f603fedd6d commit 0b4568e36fa622d406008e7f482821f603fedd6d Author: Ed Maste AuthorDate: 2023-05-01 20:58:42 +0000 Commit: Ed Maste CommitDate: 2023-05-02 00:33:08 +0000 src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN Prior to 590461a4b89b installation of include files was controlled directly by ${MK_TOOLCHAIN}. 590461a4b89b added an INCLUDES knob defaulting to YES. Setting WITHOUT_TOOLCHAIN forced it off to retain existing behaviour. Decouple them now, as there are reasonable use cases for installing libraries and include files without a compiler or other tool chain components. Reviewed by: imp, jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39918 --- share/mk/src.opts.mk | 1 - tools/build/options/WITHOUT_TOOLCHAIN | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 0bbb2dd6c539..c61ce50a7c4e 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -459,7 +459,6 @@ MK_LLD_BOOTSTRAP:= no .if ${MK_TOOLCHAIN} == "no" MK_CLANG:= no -MK_INCLUDES:= no MK_LLD:= no MK_LLDB:= no MK_LLVM_BINUTILS:= no diff --git a/tools/build/options/WITHOUT_TOOLCHAIN b/tools/build/options/WITHOUT_TOOLCHAIN index 57deb32a51f7..9568c0affa4f 100644 --- a/tools/build/options/WITHOUT_TOOLCHAIN +++ b/tools/build/options/WITHOUT_TOOLCHAIN @@ -1,4 +1,4 @@ .\" $FreeBSD$ -Do not install header or +Do not install programs used for program development, compilers, debuggers etc. From nobody Tue May 2 00:40:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9Lpc1LzQz48Cgp; Tue, 2 May 2023 00:40: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 4Q9Lpb58Msz3x0x; Tue, 2 May 2023 00:40:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AdX6Js+KL95v6omSvc7/dFwWNwINfHdszXL20t2eIns=; b=xB+x12c1Qj/XC/olWxAl4Ir52Q28ORrVJ92fhHcjJgCARjpUWx7VMvkYIU0xszwxb6Ct1z DJhENo5zqTE29iOOL/hgAADIz1a0ISSZ2qoOLrY8xJSZSxWOulETZy7yDSqp+YGr1MtDBJ l4lh8OJs5Qp54TwyI46OqKMwNNZ+OArEU5VItaia5Jnk9Vod8IHaY1Vu7ZRR5W8DfZlchg xoCGoPyfMAYNfcKapXEI05TKRqz0LrQKPYQpCONLZ1gsYh5ptdLzgXzgbcHa13+6ius1aZ pXQ0k6Iqk6X9QD9m3IjQ1gEWmpxbPPx+H+dVUTJuD/pgxOcWDFnnxQI/APqSjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AdX6Js+KL95v6omSvc7/dFwWNwINfHdszXL20t2eIns=; b=koiM7K2O2s3oXtHePSjCvE09xq0L7ENopjXUd3qC+lv1fSrhKI6JoH4rTLNLWtFOcxfZzV kwm3xcqOZCWGxAb0KUDH3ZIPMeAywyzrISdLAimKdgy5ccGLcfWsQzkyEgwaQxrQkaUGGY adUdaDFB/TnvhT1sdXWo6SrCc4FSqS74hlihAbrL5QV67Ym3aKJnF7ROLKwHJsbytSZ5js Xl8X4AsKe/fLzz1b+5M74c0yTHtyfb4m0jefgc62zT2ydkWUxMKU2sUXuykoEHBCJ/Kbq0 Il3APREybu/nGF0w+gE2dmpoViXbe3TafUnaOCxELd3j9Jfqlwc3hQH28wUwxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682988039; a=rsa-sha256; cv=none; b=kdPqR4f3zg0DyMgQDcASxdpFjjRDZTde/CfGTM/rZ+c9s2pcFpT+jeD1LjnTHRMJXymuEI AfCG8oLd6jVzzBUwgiXj5JajPoTRMP4ns/95hijzinhMCVrKBHb8OIj6GpctdT4OAU19E3 XHN8qNOahReCYdWcw8gsKCf0ZidRxYJOOyYint0HV7LblaRSvC3PG4ps25mviBWoGyb2hr NpmEV++uGl3nI63YcqUz5ZZWFXn8lFQ+IBxLEesKxIKG2uyqxvajqaWdkz2Fmsi5rxZ62T PRjhVU8Pj8s4heyz3TfgEc7h/cSQ3mqXz0Tkg6k0tBan1MUy9yWI08lfyNyIbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9Lpb4DlszRdJ; Tue, 2 May 2023 00:40:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3420edag006273; Tue, 2 May 2023 00:40:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3420edSh006272; Tue, 2 May 2023 00:40:39 GMT (envelope-from git) Date: Tue, 2 May 2023 00:40:39 GMT Message-Id: <202305020040.3420edSh006272@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: 83d5725005c5 - main - src.conf.5: regen after MK_TOOLCHAIN / MK_INCLUDES decoupling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83d5725005c5186110fd28627d6c363c91320393 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=83d5725005c5186110fd28627d6c363c91320393 commit 83d5725005c5186110fd28627d6c363c91320393 Author: Ed Maste AuthorDate: 2023-05-02 00:39:30 +0000 Commit: Ed Maste CommitDate: 2023-05-02 00:39:30 +0000 src.conf.5: regen after MK_TOOLCHAIN / MK_INCLUDES decoupling --- share/man/man5/src.conf.5 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 2c625e50eba5..5a1bb730f957 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 April 28, 2023 +.Dd May 1, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1671,7 +1671,7 @@ Do not build or install and .Xr tftpd 8 . .It Va WITHOUT_TOOLCHAIN -Do not install header or +Do not install programs used for program development, compilers, debuggers etc. When set, it enforces these options: @@ -1686,8 +1686,6 @@ When set, it enforces these options: .It .Va WITHOUT_CLANG_FULL .It -.Va WITHOUT_INCLUDES -.It .Va WITHOUT_LLD .It .Va WITHOUT_LLDB From nobody Tue May 2 03:45:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9QvW3hJxz48NmW; Tue, 2 May 2023 03:45: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 4Q9QvW3Sl6z4FBS; Tue, 2 May 2023 03:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2rFI/sga0nvdF+37PNYrAiwkV3CgpZN6HImBnh2kws=; b=SmKEDpgr3pNeFkqIIhClCwiHDnwDdc+a1fZCLnekGv0cTA6WanRNRfc4bcYsGBxDzMpiE9 f/Kv5Fz3cu0S0FIYvekNqU3qQMQ0mF5QcVAOh1wrG/8Vazmo4CgNLHEV+9nHWPptoFQM5J a80puL5vTf5MAtQ3+xFa55tfwLP9lUi4ptKL/7rubcMt2hh9Lh0IjYq6vOorImMqnmudou K5BT5lrjN32E+7C6hTggg3m2PQzGHodx9fXsLrDhbGT4aFB5XfWfOhXTDbdfbY8YdFxunC 4X8AzneGKufbWzKyggASnIzma9eQebkoBBO3oxtDdbxP6QlxHnN3H4cPY7sZQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2rFI/sga0nvdF+37PNYrAiwkV3CgpZN6HImBnh2kws=; b=dXmLMyHDDqavcUz6xT9u6bP5KnjSi3ToIEp31eoRxtKCvQ/5xT3kcz6lCCzRVdRx6fklaf PHVPg5TPO/+bKCGe45U1QLLlNQfwjtybZBEFyj0l/AjK4AynO0G+aJYoUANdq1IpJNJq2C 52TvYRRBoNvD9nla/PZ/8n/OM2XAh8lgGm/5AirrboLnLAdFUBokL61wOXvRZQiS1VDoB0 E7R3BNGkdYwFMS3FjTJ4uVndyCKUkLl2P8KGJdufhT0yN61uuDc3s0KFPuYp2OJ/1C+qWx dxwiEO6YiHDmU4mJtBrk2ybu8Ws3MyGh653fg1MIjYxLGhgk6mae5FNOU+JhHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682999111; a=rsa-sha256; cv=none; b=mNWncH4mJF0wH7x++yfvPnKkVOVM2tONWARGpyLXHEvFazOywrEuScRnyhYZujaQsdoWXY GfXnYWe48K3q50q2BrKALeC3W8eE8/K7uXkjoOlMtQUjnW94RLpHyhgYSq+0GrCg2gurRs Npph9wOmcdrciSu8X4KXgPWsXKBWrkHkkJB4uxnJ7YWI6AwPY5GMExHRuK/0wy7UBjrfxp h9PInnThWPL7V2I31dvcLEKlnT7m6DPs/jahiWaFn35GIpU9sU/0vXA+gr8cby7T4D7RKI 8AuLwk7doWaF9ir3KU1ApZHIC3Ido3hRq9pZZE8qMkAhNvgW3dE21P65mYACjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9QvW2WcczY0B; Tue, 2 May 2023 03:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3423jBh8014058; Tue, 2 May 2023 03:45:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3423jB5J014057; Tue, 2 May 2023 03:45:11 GMT (envelope-from git) Date: Tue, 2 May 2023 03:45:11 GMT Message-Id: <202305020345.3423jB5J014057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: d713e0891ff9 - main - MFV: less v632. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d713e0891ff9ab8246245c3206851d486ecfdd37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=d713e0891ff9ab8246245c3206851d486ecfdd37 commit d713e0891ff9ab8246245c3206851d486ecfdd37 Merge: 83d5725005c5 159d764c1668 Author: Xin LI AuthorDate: 2023-05-02 03:43:57 +0000 Commit: Xin LI CommitDate: 2023-05-02 03:43:57 +0000 MFV: less v632. MFC after: 2 weeks contrib/less/LICENSE | 2 +- contrib/less/NEWS | 79 ++++- contrib/less/brac.c | 9 +- contrib/less/ch.c | 321 ++++++++----------- contrib/less/charset.c | 234 +++++++++----- contrib/less/charset.h | 2 +- contrib/less/cmd.h | 3 +- contrib/less/cmdbuf.c | 211 +++--------- contrib/less/command.c | 200 ++++++------ contrib/less/compose.uni | 14 +- contrib/less/cvt.c | 19 +- contrib/less/decode.c | 144 ++------- contrib/less/edit.c | 357 +++++++++++++++------ contrib/less/filename.c | 137 ++++---- contrib/less/fmt.uni | 4 +- contrib/less/forwback.c | 64 +--- contrib/less/funcs.h | 748 ++++++++++++++++++++++--------------------- contrib/less/help.c | 46 ++- contrib/less/ifile.c | 118 ++----- contrib/less/input.c | 203 +++++++++--- contrib/less/jump.c | 37 +-- contrib/less/less.h | 89 +++-- contrib/less/less.hlp | 44 ++- contrib/less/less.nro | 677 ++++++++++++++++++++++++++------------- contrib/less/lessecho.c | 44 +-- contrib/less/lessecho.nro | 38 +-- contrib/less/lesskey.c | 66 ++-- contrib/less/lesskey.h | 2 +- contrib/less/lesskey.nro | 62 ++-- contrib/less/lesskey_parse.c | 111 ++----- contrib/less/lglob.h | 2 +- contrib/less/line.c | 467 ++++++++++++--------------- contrib/less/linenum.c | 53 ++- contrib/less/lsystem.c | 18 +- contrib/less/main.c | 54 ++-- contrib/less/mark.c | 84 ++--- contrib/less/mkutable | 15 +- contrib/less/optfunc.c | 314 ++++++++---------- contrib/less/option.c | 105 ++---- contrib/less/option.h | 4 +- contrib/less/opttbl.c | 116 +++++-- contrib/less/os.c | 231 +++++++------ contrib/less/output.c | 135 ++++---- contrib/less/pattern.c | 176 +++++----- contrib/less/pattern.h | 10 +- contrib/less/pckeys.h | 2 +- contrib/less/position.c | 41 +-- contrib/less/position.h | 2 +- contrib/less/prompt.c | 78 ++--- contrib/less/screen.c | 562 +++++++++++++++----------------- contrib/less/scrsize.c | 2 +- contrib/less/search.c | 370 ++++++++------------- contrib/less/signal.c | 29 +- contrib/less/tags.c | 87 ++--- contrib/less/ttyin.c | 52 +-- contrib/less/ubin.uni | 16 +- contrib/less/version.c | 31 +- contrib/less/wide.uni | 22 +- contrib/less/xbuf.c | 150 +++++++-- contrib/less/xbuf.h | 7 +- usr.bin/less/defines.h | 24 +- 61 files changed, 3721 insertions(+), 3623 deletions(-) diff --cc contrib/less/command.c index 8bd999e9f7a3,000000000000..88c0cb49ee77 mode 100644,000000..100644 --- a/contrib/less/command.c +++ b/contrib/less/command.c @@@ -1,2099 -1,0 +1,2095 @@@ +/* $FreeBSD$ */ +/* - * Copyright (C) 1984-2022 Mark Nudelman ++ * Copyright (C) 1984-2023 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ + + +/* + * User-level command processor. + */ + +#include "less.h" +#if MSDOS_COMPILER==WIN32C +#include +#endif +#include "position.h" +#include "option.h" +#include "cmd.h" + +extern int erase_char, erase2_char, kill_char; +extern int sigs; +extern int quit_if_one_screen; ++extern int one_screen; +extern int squished; +extern int sc_width; +extern int sc_height; +extern char *kent; +extern int swindow; +extern int jump_sline; +extern int quitting; +extern int wscroll; +extern int top_scroll; +extern int ignore_eoi; +extern int secure; +extern int hshift; +extern int bs_mode; ++extern int proc_backspace; +extern int show_attn; +extern int less_is_more; +extern int status_col; +extern POSITION highest_hilite; +extern POSITION start_attnpos; +extern POSITION end_attnpos; +extern char *every_first_cmd; +extern char version[]; +extern struct scrpos initial_scrpos; +extern IFILE curr_ifile; +extern void *ml_search; +extern void *ml_examine; +extern int wheel_lines; +extern int header_lines; +extern int def_search_type; +extern int updown_match; +#if SHELL_ESCAPE || PIPEC +extern void *ml_shell; +#endif +#if EDITOR +extern char *editor; +extern char *editproto; +#endif +extern int screen_trashed; /* The screen has been overwritten */ +extern int shift_count; +extern int oldbot; +extern int forw_prompt; +extern int incr_search; ++extern int full_screen; +#if MSDOS_COMPILER==WIN32C +extern int utf_mode; +#endif + +#if SHELL_ESCAPE +static char *shellcmd = NULL; /* For holding last shell command for "!!" */ +#endif +static int mca; /* The multicharacter command (action) */ +static int search_type; /* The previous type of search */ ++static int last_search_type; /* Type of last executed search */ +static LINENUM number; /* The number typed by the user */ +static long fraction; /* The fractional part of the number */ +static struct loption *curropt; +static int opt_lower; +static int optflag; +static int optgetname; +static POSITION bottompos; +static int save_hshift; +static int save_bs_mode; ++static int save_proc_backspace; +#if PIPEC +static char pipec; +#endif + +/* Stack of ungotten chars (via ungetcc) */ +struct ungot { + struct ungot *ug_next; + LWCHAR ug_char; +}; +static struct ungot* ungot = NULL; + - static void multi_search LESSPARAMS((char *pattern, int n, int silent)); ++static void multi_search (char *pattern, int n, int silent); + +/* + * Move the cursor to start of prompt line before executing a command. + * This looks nicer if the command takes a long time before + * updating the screen. + */ - static void - cmd_exec(VOID_PARAM) ++static void cmd_exec(void) +{ + clear_attn(); + clear_bot(); + flush(); +} + +/* + * Indicate we are reading a multi-character command. + */ - static void - set_mca(action) - int action; ++static void set_mca(int action) +{ + mca = action; + clear_bot(); + clear_cmd(); +} + +/* + * Indicate we are not reading a multi-character command. + */ - static void - clear_mca(VOID_PARAM) ++static void clear_mca(void) +{ + if (mca == 0) + return; + mca = 0; +} + +/* + * Set up the display to start a new multi-character command. + */ - static void - start_mca(action, prompt, mlist, cmdflags) - int action; - constant char *prompt; - void *mlist; - int cmdflags; ++static void start_mca(int action, constant char *prompt, void *mlist, int cmdflags) +{ + set_mca(action); + cmd_putstr(prompt); + set_mlist(mlist, cmdflags); +} + - public int - in_mca(VOID_PARAM) ++public int in_mca(void) +{ + return (mca != 0 && mca != A_PREFIX); +} + +/* + * Set up the display to start a new search command. + */ - static void - mca_search1(VOID_PARAM) ++static void mca_search1(void) +{ ++ int i; ++ +#if HILITE_SEARCH + if (search_type & SRCH_FILTER) + set_mca(A_FILTER); + else +#endif + if (search_type & SRCH_FORW) + set_mca(A_F_SEARCH); + else + set_mca(A_B_SEARCH); + + if (search_type & SRCH_NO_MATCH) + cmd_putstr("Non-match "); + if (search_type & SRCH_FIRST_FILE) + cmd_putstr("First-file "); + if (search_type & SRCH_PAST_EOF) + cmd_putstr("EOF-ignore "); + if (search_type & SRCH_NO_MOVE) + cmd_putstr("Keep-pos "); + if (search_type & SRCH_NO_REGEX) + cmd_putstr("Regex-off "); + if (search_type & SRCH_WRAP) + cmd_putstr("Wrap "); ++ for (i = 1; i <= NUM_SEARCH_COLORS; i++) ++ { ++ if (search_type & SRCH_SUBSEARCH(i)) ++ { ++ char buf[8]; ++ SNPRINTF1(buf, sizeof(buf), "Sub-%d ", i); ++ cmd_putstr(buf); ++ } ++ } + +#if HILITE_SEARCH + if (search_type & SRCH_FILTER) + cmd_putstr("&/"); + else +#endif + if (search_type & SRCH_FORW) + cmd_putstr("/"); + else + cmd_putstr("?"); + forw_prompt = 0; +} + - static void - mca_search(VOID_PARAM) ++static void mca_search(void) +{ + mca_search1(); + set_mlist(ml_search, 0); +} + +/* + * Set up the display to start a new toggle-option command. + */ - static void - mca_opt_toggle(VOID_PARAM) ++static void mca_opt_toggle(void) +{ + int no_prompt; + int flag; + char *dash; + + no_prompt = (optflag & OPT_NO_PROMPT); + flag = (optflag & ~OPT_NO_PROMPT); + dash = (flag == OPT_NO_TOGGLE) ? "_" : "-"; + + set_mca(A_OPT_TOGGLE); + cmd_putstr(dash); + if (optgetname) + cmd_putstr(dash); + if (no_prompt) + cmd_putstr("(P)"); + switch (flag) + { + case OPT_UNSET: + cmd_putstr("+"); + break; + case OPT_SET: + cmd_putstr("!"); + break; + } + forw_prompt = 0; + set_mlist(NULL, 0); +} + +/* + * Execute a multicharacter command. + */ - static void - exec_mca(VOID_PARAM) ++static void exec_mca(void) +{ + char *cbuf; + + cmd_exec(); + cbuf = get_cmdbuf(); + if (cbuf == NULL) + return; + + switch (mca) + { + case A_F_SEARCH: + case A_B_SEARCH: + multi_search(cbuf, (int) number, 0); + break; +#if HILITE_SEARCH + case A_FILTER: + search_type ^= SRCH_NO_MATCH; + set_filter_pattern(cbuf, search_type); + break; +#endif + case A_FIRSTCMD: + /* + * Skip leading spaces or + signs in the string. + */ + while (*cbuf == '+' || *cbuf == ' ') + cbuf++; + if (every_first_cmd != NULL) + free(every_first_cmd); + if (*cbuf == '\0') + every_first_cmd = NULL; + else + every_first_cmd = save(cbuf); + break; + case A_OPT_TOGGLE: + toggle_option(curropt, opt_lower, cbuf, optflag); + curropt = NULL; + break; + case A_F_BRACKET: + match_brac(cbuf[0], cbuf[1], 1, (int) number); + break; + case A_B_BRACKET: + match_brac(cbuf[1], cbuf[0], 0, (int) number); + break; +#if EXAMINE + case A_EXAMINE: + if (secure) + break; + edit_list(cbuf); +#if TAGS + /* If tag structure is loaded then clean it up. */ + cleantags(); +#endif + break; +#endif +#if SHELL_ESCAPE + case A_SHELL: + /* + * !! just uses whatever is in shellcmd. + * Otherwise, copy cmdbuf to shellcmd, + * expanding any special characters ("%" or "#"). + */ + if (*cbuf != '!') + { + if (shellcmd != NULL) + free(shellcmd); + shellcmd = fexpand(cbuf); + } + + if (secure) + break; + if (shellcmd == NULL) + lsystem("", "!done"); + else + lsystem(shellcmd, "!done"); + break; ++ case A_PSHELL: ++ if (secure) ++ break; ++ lsystem(pr_expand(cbuf), "#done"); ++ break; +#endif +#if PIPEC + case A_PIPE: + if (secure) + break; + (void) pipe_mark(pipec, cbuf); + error("|done", NULL_PARG); + break; +#endif + } +} + +/* + * Is a character an erase or kill char? + */ - static int - is_erase_char(c) - int c; ++static int is_erase_char(int c) +{ + return (c == erase_char || c == erase2_char || c == kill_char); +} + +/* + * Is a character a carriage return or newline? + */ - static int - is_newline_char(c) - int c; ++static int is_newline_char(int c) +{ + return (c == '\n' || c == '\r'); +} + +/* + * Handle the first char of an option (after the initial dash). + */ - static int - mca_opt_first_char(c) - int c; ++static int mca_opt_first_char(int c) +{ + int no_prompt = (optflag & OPT_NO_PROMPT); + int flag = (optflag & ~OPT_NO_PROMPT); + if (flag == OPT_NO_TOGGLE) + { + switch (c) + { + case '_': + /* "__" = long option name. */ + optgetname = TRUE; + mca_opt_toggle(); + return (MCA_MORE); + } + } else + { + switch (c) + { + case '+': + /* "-+" = UNSET. */ + optflag = no_prompt | ((flag == OPT_UNSET) ? + OPT_TOGGLE : OPT_UNSET); + mca_opt_toggle(); + return (MCA_MORE); + case '!': + /* "-!" = SET */ + optflag = no_prompt | ((flag == OPT_SET) ? + OPT_TOGGLE : OPT_SET); + mca_opt_toggle(); + return (MCA_MORE); + case CONTROL('P'): + optflag ^= OPT_NO_PROMPT; + mca_opt_toggle(); + return (MCA_MORE); + case '-': + /* "--" = long option name. */ + optgetname = TRUE; + mca_opt_toggle(); + return (MCA_MORE); + } + } + /* Char was not handled here. */ + return (NO_MCA); +} + +/* + * Add a char to a long option name. + * See if we've got a match for an option name yet. + * If so, display the complete name and stop + * accepting chars until user hits RETURN. + */ - static int - mca_opt_nonfirst_char(c) - int c; ++static int mca_opt_nonfirst_char(int c) +{ + char *p; + char *oname; + int err; + + if (curropt != NULL) + { + /* + * Already have a match for the name. + * Don't accept anything but erase/kill. + */ + if (is_erase_char(c)) + return (MCA_DONE); + return (MCA_MORE); + } + /* + * Add char to cmd buffer and try to match + * the option name. + */ + if (cmd_char(c) == CC_QUIT) + return (MCA_DONE); + p = get_cmdbuf(); + if (p == NULL) + return (MCA_MORE); + opt_lower = ASCII_IS_LOWER(p[0]); + err = 0; + curropt = findopt_name(&p, &oname, &err); + if (curropt != NULL) + { + /* + * Got a match. + * Remember the option and + * display the full option name. + */ + cmd_reset(); + mca_opt_toggle(); + for (p = oname; *p != '\0'; p++) + { + c = *p; + if (!opt_lower && ASCII_IS_LOWER(c)) + c = ASCII_TO_UPPER(c); + if (cmd_char(c) != CC_OK) + return (MCA_DONE); + } + } else if (err != OPT_AMBIG) + { + bell(); + } + return (MCA_MORE); +} + +/* + * Handle a char of an option toggle command. + */ - static int - mca_opt_char(c) - int c; ++static int mca_opt_char(int c) +{ + PARG parg; + + /* + * This may be a short option (single char), + * or one char of a long option name, + * or one char of the option parameter. + */ + if (curropt == NULL && len_cmdbuf() == 0) + { + int ret = mca_opt_first_char(c); + if (ret != NO_MCA) + return (ret); + } + if (optgetname) + { + /* We're getting a long option name. */ + if (!is_newline_char(c) && c != '=') + return (mca_opt_nonfirst_char(c)); + if (curropt == NULL) + { + parg.p_string = get_cmdbuf(); + if (parg.p_string == NULL) + return (MCA_MORE); + error("There is no --%s option", &parg); + return (MCA_DONE); + } + optgetname = FALSE; + cmd_reset(); + } else + { + if (is_erase_char(c)) + return (NO_MCA); + if (curropt != NULL) + /* We're getting the option parameter. */ + return (NO_MCA); + curropt = findopt(c); + if (curropt == NULL) + { + parg.p_string = propt(c); + error("There is no %s option", &parg); + return (MCA_DONE); + } + opt_lower = ASCII_IS_LOWER(c); + } + /* + * If the option which was entered does not take a + * parameter, toggle the option immediately, + * so user doesn't have to hit RETURN. + */ + if ((optflag & ~OPT_NO_PROMPT) != OPT_TOGGLE || + !opt_has_param(curropt)) + { + toggle_option(curropt, opt_lower, "", optflag); + return (MCA_DONE); + } + /* + * Display a prompt appropriate for the option parameter. + */ + start_mca(A_OPT_TOGGLE, opt_prompt(curropt), (void*)NULL, 0); + return (MCA_MORE); +} + +/* + * Normalize search type. + */ - public int - norm_search_type(st) - int st; ++public int norm_search_type(int st) +{ + /* WRAP and PAST_EOF are mutually exclusive. */ + if ((st & (SRCH_PAST_EOF|SRCH_WRAP)) == (SRCH_PAST_EOF|SRCH_WRAP)) + st ^= SRCH_PAST_EOF; + return st; +} + +/* + * Handle a char of a search command. + */ - static int - mca_search_char(c) - int c; ++static int mca_search_char(int c) +{ + int flag = 0; + + /* + * Certain characters as the first char of + * the pattern have special meaning: + * ! Toggle the NO_MATCH flag + * * Toggle the PAST_EOF flag + * @ Toggle the FIRST_FILE flag + */ + if (len_cmdbuf() > 0) + return (NO_MCA); + + switch (c) + { + case '*': + if (less_is_more) + break; + case CONTROL('E'): /* ignore END of file */ + if (mca != A_FILTER) + flag = SRCH_PAST_EOF; + break; + case '@': + if (less_is_more) + break; + case CONTROL('F'): /* FIRST file */ + if (mca != A_FILTER) + flag = SRCH_FIRST_FILE; + break; + case CONTROL('K'): /* KEEP position */ + if (mca != A_FILTER) + flag = SRCH_NO_MOVE; + break; ++ case CONTROL('S'): { /* SUBSEARCH */ ++ char buf[32]; ++ SNPRINTF1(buf, sizeof(buf), "Sub-pattern (1-%d):", NUM_SEARCH_COLORS); ++ clear_bot(); ++ cmd_putstr(buf); ++ flush(); ++ c = getcc(); ++ if (c >= '1' && c <= '0'+NUM_SEARCH_COLORS) ++ flag = SRCH_SUBSEARCH(c-'0'); ++ else ++ flag = -1; /* calls mca_search() below to repaint */ ++ break; } + case CONTROL('W'): /* WRAP around */ + if (mca != A_FILTER) + flag = SRCH_WRAP; + break; + case CONTROL('R'): /* Don't use REGULAR EXPRESSIONS */ + flag = SRCH_NO_REGEX; + break; + case CONTROL('N'): /* NOT match */ + case '!': + flag = SRCH_NO_MATCH; + break; + } + + if (flag != 0) + { - search_type = norm_search_type(search_type ^ flag); ++ if (flag != -1) ++ search_type = norm_search_type(search_type ^ flag); + mca_search(); + return (MCA_MORE); + } + return (NO_MCA); +} + +/* + * Handle a character of a multi-character command. + */ - static int - mca_char(c) - int c; ++static int mca_char(int c) +{ + int ret; + + switch (mca) + { + case 0: + /* + * We're not in a multicharacter command. + */ + return (NO_MCA); + + case A_PREFIX: + /* + * In the prefix of a command. + * This not considered a multichar command + * (even tho it uses cmdbuf, etc.). + * It is handled in the commands() switch. + */ + return (NO_MCA); + + case A_DIGIT: + /* + * Entering digits of a number. + * Terminated by a non-digit. + */ + if ((c >= '0' && c <= '9') || c == '.') + break; + switch (editchar(c, ECF_PEEK|ECF_NOHISTORY|ECF_NOCOMPLETE|ECF_NORIGHTLEFT)) + { + case A_NOACTION: + /* + * Ignore this char and get another one. + */ + return (MCA_MORE); + case A_INVALID: + /* + * Not part of the number. + * End the number and treat this char + * as a normal command character. + */ + number = cmd_int(&fraction); + clear_mca(); + cmd_accept(); + return (NO_MCA); + } + break; + + case A_OPT_TOGGLE: + ret = mca_opt_char(c); + if (ret != NO_MCA) + return (ret); + break; + + case A_F_SEARCH: + case A_B_SEARCH: + case A_FILTER: + ret = mca_search_char(c); + if (ret != NO_MCA) + return (ret); + break; + + default: + /* Other multicharacter command. */ + break; + } + + /* + * The multichar command is terminated by a newline. + */ + if (is_newline_char(c)) + { + /* + * Execute the command. + */ + exec_mca(); + return (MCA_DONE); + } + + /* + * Append the char to the command buffer. + */ + if (cmd_char(c) == CC_QUIT) + /* + * Abort the multi-char command. + */ + return (MCA_DONE); + + switch (mca) + { + case A_F_BRACKET: + case A_B_BRACKET: + if (len_cmdbuf() >= 2) + { + /* + * Special case for the bracket-matching commands. + * Execute the command after getting exactly two + * characters from the user. + */ + exec_mca(); + return (MCA_DONE); + } + break; + case A_F_SEARCH: + case A_B_SEARCH: + if (incr_search) + { + /* Incremental search: do a search after every input char. */ - int st = (search_type & (SRCH_FORW|SRCH_BACK|SRCH_NO_MATCH|SRCH_NO_REGEX|SRCH_NO_MOVE|SRCH_WRAP)); ++ int st = (search_type & (SRCH_FORW|SRCH_BACK|SRCH_NO_MATCH|SRCH_NO_REGEX|SRCH_NO_MOVE|SRCH_WRAP|SRCH_SUBSEARCH_ALL)); + char *pattern = get_cmdbuf(); + if (pattern == NULL) + return (MCA_MORE); + /* + * Must save updown_match because mca_search + * reinits it. That breaks history scrolling. + * {{ This is ugly. mca_search probably shouldn't call set_mlist. }} + */ + int save_updown_match = updown_match; + cmd_exec(); + if (*pattern == '\0') + { + /* User has backspaced to an empty pattern. */ + undo_search(1); + } else + { + if (search(st | SRCH_INCR, pattern, 1) != 0) + /* No match, invalid pattern, etc. */ + undo_search(1); + } + /* Redraw the search prompt and search string. */ ++ if (!full_screen) ++ { ++ clear(); ++ repaint(); ++ } + mca_search1(); + updown_match = save_updown_match; + cmd_repaint(NULL); + } + break; + } + + /* + * Need another character. + */ + return (MCA_MORE); +} + +/* + * Discard any buffered file data. + */ - static void - clear_buffers(VOID_PARAM) ++static void clear_buffers(void) +{ + if (!(ch_getflags() & CH_CANSEEK)) + return; + ch_flush(); + clr_linenum(); +#if HILITE_SEARCH + clr_hilite(); +#endif +} + +/* + * Make sure the screen is displayed. + */ - static void - make_display(VOID_PARAM) ++static void make_display(void) +{ ++ /* ++ * If not full_screen, we can't rely on scrolling to fill the screen. ++ * We need to clear and repaint screen before any change. ++ */ ++ if (!full_screen && !(quit_if_one_screen && one_screen)) ++ clear(); + /* + * If nothing is displayed yet, display starting from initial_scrpos. + */ + if (empty_screen()) + { + if (initial_scrpos.pos == NULL_POSITION) + jump_loc(ch_zero(), 1); + else + jump_loc(initial_scrpos.pos, initial_scrpos.ln); - } else if (screen_trashed) ++ } else if (screen_trashed || !full_screen) + { + int save_top_scroll = top_scroll; + int save_ignore_eoi = ignore_eoi; + top_scroll = 1; + ignore_eoi = 0; + if (screen_trashed == 2) + { + /* Special case used by ignore_eoi: re-open the input file + * and jump to the end of the file. */ + reopen_curr_ifile(); + jump_forw(); + } + repaint(); + top_scroll = save_top_scroll; + ignore_eoi = save_ignore_eoi; + } +} + +/* + * Display the appropriate prompt. + */ - static void - prompt(VOID_PARAM) ++static void prompt(void) +{ + constant char *p; + + if (ungot != NULL && ungot->ug_char != CHAR_END_COMMAND) + { + /* + * No prompt necessary if commands are from + * ungotten chars rather than from the user. + */ + return; + } + + /* + * Make sure the screen is displayed. + */ + make_display(); + bottompos = position(BOTTOM_PLUS_ONE); + + /* + * If we've hit EOF on the last file and the -E flag is set, quit. + */ + if (get_quit_at_eof() == OPT_ONPLUS && + eof_displayed() && !(ch_getflags() & CH_HELPFILE) && + next_ifile(curr_ifile) == NULL_IFILE) + quit(QUIT_OK); + + /* + * If the entire file is displayed and the -F flag is set, quit. + */ + if (quit_if_one_screen && *** 3700 LINES SKIPPED *** From nobody Tue May 2 11:39:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRC1kKqz48tJQ; Tue, 2 May 2023 11:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9dRC0sp0z3qBf; Tue, 2 May 2023 11:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOBAnurKyn7R3b4vwVGxF+WNhhOTA26RHhBT6Gqh/YU=; b=AkdlIAWFps/IFv7RIjpM5j24lt2eYwZfytqPdbvFgjvUgZNmLQD342LsNqSUDnkb1UrUw6 k/pTGUI1miGHK9EhGu+IiKFSg+Z075ugb/7M27FPe4NvpMPmHrbzS7WhtCzGPKylXzQOcF uQPNtuFDml1SeTaaQCz2O4fkK6OASKNqYJ+VlLOCLjrNrxdncJtfBxCtjtSmcfDKtUewOt +dLq3bQbyqIXYA4JC9Cw1cXO01YmxO30VF80PIkoqaAkxT9+aTgahchhNim8q+GjfLDX3z BZh3GBto6P7A2MdH0GUQxIDIFhyGz+Gkrr2ceKSDXz1fI3HyE+hZpFUVJR5lpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOBAnurKyn7R3b4vwVGxF+WNhhOTA26RHhBT6Gqh/YU=; b=nuS3JimfGyTc+9g4NzWOkT9KfVGMGepIFi8R7r8qo283U46yoasSMrc9+/tVTH0A3bTxYH iVbt59iIQNOddd6NYMxGWChaM4khRgKyUNLlK/2UojF0+AQ3kcGAFIa2AYvtl1M3+rLWTD kqV+9cQznC3fMV2rcQRwgwkzG33//jZMe/8/ngLnuaI+m/zDt6mdt/KxEBha0M0UsIHF/v yLcCkH8pDrp8Q56U7wlrjFz+cWTXbhE4bLgFLPnD/2Fec213VK4Uw0FceNZV3bj2b6A5nw 25NwNmb4fcKZnaQc81Jd6YHWYHootMpwqhTIowZFRtb5UQRFYzfBjBWE0nfxbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027591; a=rsa-sha256; cv=none; b=Qa3CkD36MQfA8yuL0ZTvnWo5h8ZlxAXw0B5PfgYqdX/QhR0eXPRdRLBcAOZ9v4dXnA02Tj XP3F4Aui+0CfoYy7KJggn5PmmI3/K+z1mtWcq51B9oM7fR55UvESIjlGjKFjMCMhQqDU7S X4a6pIcDrwUuJFlJwFwQa7WBVs0FJNVkfgob/SGYmMVK4c3SnQqO6ghdpfWFqrYIwG2Gi9 YeBd2D/Clma9hE1niZtPGs5n6xHgiPn8439/pRK/owWUdM5yx0QOa35+yOkIyhZQbRRgP7 HeKRIK+G+0VhaUrXYBpplC3V0XPRBLo2E34nfRPAoq+MtL2ddxz01I8eE212nA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRB72thzm4n; Tue, 2 May 2023 11:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Bdod7092284; Tue, 2 May 2023 11:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdoTQ092283; Tue, 2 May 2023 11:39:50 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:50 GMT Message-Id: <202305021139.342BdoTQ092283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 32bb28d8ad31 - main - amd64: move definition of the struct pmap_pcids into _pmap.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32bb28d8ad31294579bd95c29e84a5985e543ae5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=32bb28d8ad31294579bd95c29e84a5985e543ae5 commit 32bb28d8ad31294579bd95c29e84a5985e543ae5 Author: Konstantin Belousov AuthorDate: 2023-05-01 11:06:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:20 +0000 amd64: move definition of the struct pmap_pcids into _pmap.h and rename the structure to pmap_pcid. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 2 ++ sys/amd64/include/_pmap.h | 39 +++++++++++++++++++++++++++++++++++++++ sys/amd64/include/pmap.h | 8 ++------ 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index e8a88aab3225..92d9a66837cd 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4362,6 +4362,8 @@ pmap_free_pt_page(pmap_t pmap, vm_page_t m, bool zerofilled) pmap_pt_page_count_adj(pmap, -1); } +_Static_assert(sizeof(struct pmap_pcid) == 8, "Fix pcpu zone for pm_pcidp"); + /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. diff --git a/sys/amd64/include/_pmap.h b/sys/amd64/include/_pmap.h new file mode 100644 index 000000000000..b4b1b5962838 --- /dev/null +++ b/sys/amd64/include/_pmap.h @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2014-2020 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by + * Konstantin Belousov under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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. + */ + +#ifndef _MACHINE__PMAP_H_ +#define _MACHINE__PMAP_H_ + +struct pmap_pcid { + uint32_t pm_pcid; + uint32_t pm_gen; +}; + +#endif diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index d74f25cc8024..3b99b88742e5 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -291,6 +291,7 @@ #include #include #include +#include #include #include #include @@ -371,11 +372,6 @@ enum pmap_type { PT_RVI, /* AMD's nested page tables */ }; -struct pmap_pcids { - uint32_t pm_pcid; - uint32_t pm_gen; -}; - /* * The kernel virtual address (KVA) of the level 4 page table page is always * within the direct map (DMAP) region. @@ -394,7 +390,7 @@ struct pmap { long pm_eptgen; /* EPT pmap generation id */ smr_t pm_eptsmr; int pm_flags; - struct pmap_pcids pm_pcids[MAXCPU]; + struct pmap_pcid pm_pcids[MAXCPU]; struct rangeset pm_pkru; }; From nobody Tue May 2 11:39:52 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRD2gNhz48tLw; Tue, 2 May 2023 11:39:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9dRD1ws0z3q1v; Tue, 2 May 2023 11:39:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kEMz9Q848nF/TqBsfRurMbq9DWY6yE/++wuG/YScsFQ=; b=X+kLNEP70yCyyW/Go9rskFX5KAuPURI8TLBIROHMrgYFqsRsB8u37xUeY4oQNLRDinvGA3 /2627NEWf4jLTgVisS1u5+H6QNlft6ugmsnOgLLsPZz2B1Nb+lmzxsKwplo72rBfXFEZ3O 3lMR3AzwvLdgp9oRo8FCVw5+wIqrOO5d+gbnH+8j1qoYShZY09EakiSTOyNdfLzJYGoqiv cuUfD9/BG8OdmhbTEEyHVrLQ8LX2v1eQVoXAWuRjHKcaamSHhgQgS9XNlwht0VoQCcTat0 EChIzDJgnGWbEro2hWbUUsPOUdKdtJ31OYTnw3a6/fNE9tNy5tMloiYDTBN6xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kEMz9Q848nF/TqBsfRurMbq9DWY6yE/++wuG/YScsFQ=; b=ca6ZOgwJyaghkVa6QjP3OX/13nUITz4v/9BxyuZ1vy4kpbLjoeOeKWmlIAGZlbPg5QODF+ xpIhUjZMTHgiuH8P3OEh/M1EICcW+eA1UmJbiGvmebcrnMT/IMCQE+W4Iiy2vkVsYeDxMe Wf2SF31xeqB/D20vyP6AlaHLztPhoOdjrZwHxRrfWIJYAafyaTPYbKmbS59UYJUCdqqtdd BZ6H01fMMpJS0FFSLHowKfkpzphIulA4HyK9Yy6RSVyA68VhC9XRNsvhNVtRV5XPDlxNNX L8gNL157MlxS6OOnRyZ/4GfR78YW6OAxiPRKUUeVEwE6prYZsY//ptvqlYAJrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027592; a=rsa-sha256; cv=none; b=mp7m+5XPv1bg6uUJO5oG33C7Vuj8+kgLBnpQ1sTLQdA3oRJSoqsefKdfuaCq6EGy5sdNte u9oy20qJxHCrX/XdRqaxFNk/B9p+T5kJo0h7EtgpbKQaXBfqqxtABvHv6SpYTHjVh83Hor LsYI4+ki6Vd11fEy7BRD0AZIuGW+6YIJCCmDP+PV+5nrArDQEsAUEToMGOSEqlGGendIZC ZnN66IdLzQmGoLboAskrJWwFsxXYCbJUV1qI4DnN7+WW1nJNvuD32oQqK3GkGYk0QWvpwm tujW4ZsRKrtUF9Lu2wYlr3WU6AGG+lMZx9MsT2sXbPkKij4fLmTuHnSeOpr08A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRD0vhrzmB0; Tue, 2 May 2023 11:39:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342BdqfA092305; Tue, 2 May 2023 11:39:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdqT1092304; Tue, 2 May 2023 11:39:52 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:52 GMT Message-Id: <202305021139.342BdqT1092304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 86b61ccb34d4 - main - amd64 pmap: add pmap_pinit_pcids() helper List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86b61ccb34d44e0e73dd2a68174ebc869ebccf8e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=86b61ccb34d44e0e73dd2a68174ebc869ebccf8e commit 86b61ccb34d44e0e73dd2a68174ebc869ebccf8e Author: Konstantin Belousov AuthorDate: 2023-05-01 11:21:10 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:29 +0000 amd64 pmap: add pmap_pinit_pcids() helper to initialize pm_pcids array for a new user pmap Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 92d9a66837cd..3b125041bb29 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4193,12 +4193,24 @@ pmap_abort_ptp(pmap_t pmap, vm_offset_t va, vm_page_t mpte) } } +static void +pmap_pinit_pcids(pmap_t pmap, uint32_t pcid, int gen) +{ + struct pmap_pcid *pcidp; + int i; + + CPU_FOREACH(i) { + pcidp = &pmap->pm_pcids[i]; + pcidp->pm_pcid = pcid; + pcidp->pm_gen = gen; + } +} + void pmap_pinit0(pmap_t pmap) { struct proc *p; struct thread *td; - int i; PMAP_LOCK_INIT(pmap); pmap->pm_pmltop = kernel_pmap->pm_pmltop; @@ -4211,10 +4223,7 @@ pmap_pinit0(pmap_t pmap) TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_flags = pmap_flags; - CPU_FOREACH(i) { - pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN + 1; - pmap->pm_pcids[i].pm_gen = 1; - } + pmap_pinit_pcids(pmap, PMAP_PCID_KERN + 1, 1); pmap_activate_boot(pmap); td = curthread; if (pti) { @@ -4373,7 +4382,6 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) { vm_page_t pmltop_pg, pmltop_pgu; vm_paddr_t pmltop_phys; - int i; bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -4397,9 +4405,8 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) pmltop_phys = VM_PAGE_TO_PHYS(pmltop_pg); pmap->pm_pmltop = (pml5_entry_t *)PHYS_TO_DMAP(pmltop_phys); - CPU_FOREACH(i) { - pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE; - pmap->pm_pcids[i].pm_gen = 0; + if (pmap_pcid_enabled) { + pmap_pinit_pcids(pmap, PMAP_PCID_NONE, 0); } pmap->pm_cr3 = PMAP_NO_CR3; /* initialize to an invalid value */ pmap->pm_ucr3 = PMAP_NO_CR3; From nobody Tue May 2 11:39:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRF3sZNz48tLy; Tue, 2 May 2023 11:39: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 4Q9dRF2yHyz3qHh; Tue, 2 May 2023 11:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsjRBY6jJrr88Ej/fXla6xr34i14eivdEwfnoCxXACo=; b=Dnk9wmaJYnVAEhRLn6QMR4eJVDevpPg0QCdb+i3koHWFBIlCu9tuQ58iUigziLVWZVeRoH fuFP8YCJZgUykDPjQwAFkye+j7DKUwTrmY4RxSGclmiknbtbPfZuK4YH1efFNWCSMRR44i Yw8DdlQ6s9rWPegLIEd7lG5ftTVOUrsZyULejCzmIOPtpbl7WwsvxS9BqTC3UrX71mGf2k 8XWuoDitEPbYr2TzbWNzS/vdMnzrJn7hPgMIlaYX6d96J6Ow1yzOXA4A9GOYRRonm4q8j/ 5mm3bSBmniy/CF9X7/Rh8JsMYKMxQKWyin3EHOze1Dv08hE4Ck96hPBH4i90BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsjRBY6jJrr88Ej/fXla6xr34i14eivdEwfnoCxXACo=; b=vWe2FrxOHBOG7fHiLU6Gc2tM8L0JpnTBFBHi9Pbo8sor+OdEWtWwZP5f5lSby7Evo2nvz8 aETjJ7NihgJda+ajYmWGqI+vZDIZCDSguwY/skd399CJ3Mh5qQWB94ffq1Kiik5z8wRdIT ewF4nZScjjcCWRbp/mTbfMvV28j1lE33RWU2D8bbYi7rGyHGcSiRMKhc8suTo+DIinbAcn chse+FduQGERH5glWRZtzk5T/TeNPp/t7YeT4lm9TUAl4tnw9aSoqliUssoyqkhZpf8tx5 FbnBTW0tEhiyGrX/yDiJulPlgASW/UK7n28o2TW9DfARnwOVDSW5CH7GLfaSRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027593; a=rsa-sha256; cv=none; b=AcRxhIsJNQfnDpuneMwv+9p/JBqEJaMXC3Pv0jL1A77qbcLotgm0hk8l9k9GnC8r8Xd9aR TamoUfWtxorQukUb+aLHbyIQwCTJTIZTl66BwejHRFTvkBXP2WO/uoyPtX4HOXBUbtaB/h bssSPzaoazyXN2ML/qUzPNHR3lPdVFSDbw3ZNKMZM3kxZwbt9nb6c1x8Rrk2lXm4tzRwQ/ JP+ZI2el0oB+wmV+DU7yrgkzMJuStBaj50ThsRAIjqJ2RJPwIpoZZisPuimbwZjvLfs/j3 q5Nf5Y6wOY79FeQL9foOG8lzKa5X+93KXbOkW1UvLqT9w7QzsWi7prqyB9KNrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRF1wcTzmB1; Tue, 2 May 2023 11:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Bdrea092324; Tue, 2 May 2023 11:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdrSS092323; Tue, 2 May 2023 11:39:53 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:53 GMT Message-Id: <202305021139.342BdrSS092323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9e0143694ad3 - main - amd64: add pmap_get_pcid() helper List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e0143694ad31b534310a473b993e520264f11e2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9e0143694ad31b534310a473b993e520264f11e2 commit 9e0143694ad31b534310a473b993e520264f11e2 Author: Konstantin Belousov AuthorDate: 2023-05-01 11:02:59 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:35 +0000 amd64: add pmap_get_pcid() helper Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/efirt_machdep.c | 19 +++++++++++++------ sys/amd64/amd64/mp_machdep.c | 20 ++++++++------------ sys/amd64/amd64/pmap.c | 16 ++++------------ sys/amd64/include/pmap.h | 8 ++++++++ 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index 6fffd113f868..b7f7a91b8671 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -298,6 +298,7 @@ int efi_arch_enter(void) { pmap_t curpmap; + uint64_t cr3; curpmap = PCPU_GET(curpmap); PMAP_LOCK_ASSERT(curpmap, MA_OWNED); @@ -313,8 +314,10 @@ efi_arch_enter(void) if (pmap_pcid_enabled && !invpcid_works) PCPU_SET(curpmap, NULL); - load_cr3(VM_PAGE_TO_PHYS(efi_pmltop_page) | (pmap_pcid_enabled ? - curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); + cr3 = VM_PAGE_TO_PHYS(efi_pmltop_page); + if (pmap_pcid_enabled) + cr3 |= pmap_get_pcid(curpmap); + load_cr3(cr3); /* * If PCID is enabled, the clear CR3_PCID_SAVE bit in the loaded %cr3 * causes TLB invalidation. @@ -328,12 +331,16 @@ void efi_arch_leave(void) { pmap_t curpmap; + uint64_t cr3; curpmap = &curproc->p_vmspace->vm_pmap; - if (pmap_pcid_enabled && !invpcid_works) - PCPU_SET(curpmap, curpmap); - load_cr3(curpmap->pm_cr3 | (pmap_pcid_enabled ? - curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); + cr3 = curpmap->pm_cr3; + if (pmap_pcid_enabled) { + cr3 |= pmap_get_pcid(curpmap); + if (!invpcid_works) + PCPU_SET(curpmap, curpmap); + } + load_cr3(cr3); if (!pmap_pcid_enabled) invltlb(); vm_fault_enable_pagefaults(curthread->td_md.md_efirt_dis_pf); diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 5c60d301c1e7..94589f736637 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -767,7 +767,7 @@ invltlb_invpcid_handler(pmap_t smp_tlb_pmap) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + d.pcid = pmap_get_pcid(smp_tlb_pmap); d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : @@ -786,7 +786,7 @@ invltlb_invpcid_pti_handler(pmap_t smp_tlb_pmap) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + d.pcid = pmap_get_pcid(smp_tlb_pmap); d.pad = 0; d.addr = 0; if (smp_tlb_pmap == kernel_pmap) { @@ -808,8 +808,6 @@ invltlb_invpcid_pti_handler(pmap_t smp_tlb_pmap) static void invltlb_pcid_handler(pmap_t smp_tlb_pmap) { - uint32_t pcid; - #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -828,8 +826,8 @@ invltlb_pcid_handler(pmap_t smp_tlb_pmap) * CPU. */ if (smp_tlb_pmap == PCPU_GET(curpmap)) { - pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; - load_cr3(smp_tlb_pmap->pm_cr3 | pcid); + load_cr3(smp_tlb_pmap->pm_cr3 | + pmap_get_pcid(smp_tlb_pmap)); if (smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3) PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); } @@ -865,8 +863,7 @@ invlpg_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1) if (smp_tlb_pmap == PCPU_GET(curpmap) && smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid | - PMAP_PCID_USER_PT; + d.pcid = pmap_get_pcid(smp_tlb_pmap) | PMAP_PCID_USER_PT; d.pad = 0; d.addr = smp_tlb_addr1; invpcid(&d, INVPCID_ADDR); @@ -890,7 +887,7 @@ invlpg_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1) if (smp_tlb_pmap == PCPU_GET(curpmap) && (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + pcid = pmap_get_pcid(smp_tlb_pmap); kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlpg(ucr3, kcr3, smp_tlb_addr1); @@ -944,8 +941,7 @@ invlrng_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, if (smp_tlb_pmap == PCPU_GET(curpmap) && smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid | - PMAP_PCID_USER_PT; + d.pcid = pmap_get_pcid(smp_tlb_pmap) | PMAP_PCID_USER_PT; d.pad = 0; d.addr = smp_tlb_addr1; do { @@ -978,7 +974,7 @@ invlrng_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, if (smp_tlb_pmap == PCPU_GET(curpmap) && (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + pcid = pmap_get_pcid(smp_tlb_pmap); kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlrng(ucr3, kcr3, smp_tlb_addr1, smp_tlb_addr2); diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 3b125041bb29..16bfe9986c6b 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3076,7 +3076,6 @@ pmap_invalidate_page_pcid_cb(pmap_t pmap, vm_offset_t va, struct invpcid_descr d; uint64_t kcr3, ucr3; uint32_t pcid; - u_int cpuid; /* * Because pm_pcid is recalculated on a context switch, we @@ -3095,9 +3094,7 @@ pmap_invalidate_page_pcid_cb(pmap_t pmap, vm_offset_t va, PCPU_GET(ucr3_load_mask) != PMAP_UCR3_NOMASK) return; - cpuid = PCPU_GET(cpuid); - - pcid = pmap->pm_pcids[cpuid].pm_pcid; + pcid = pmap_get_pcid(pmap); if (invpcid_works1) { d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -3172,7 +3169,6 @@ pmap_invalidate_range_pcid_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, struct invpcid_descr d; uint64_t kcr3, ucr3; uint32_t pcid; - u_int cpuid; CRITICAL_ASSERT(curthread); @@ -3181,9 +3177,7 @@ pmap_invalidate_range_pcid_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, PCPU_GET(ucr3_load_mask) != PMAP_UCR3_NOMASK) return; - cpuid = PCPU_GET(cpuid); - - pcid = pmap->pm_pcids[cpuid].pm_pcid; + pcid = pmap_get_pcid(pmap); if (invpcid_works1) { d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -3273,7 +3267,6 @@ pmap_invalidate_all_pcid_cb(pmap_t pmap, bool invpcid_works1) struct invpcid_descr d; uint64_t kcr3; uint32_t pcid; - u_int cpuid; if (pmap == kernel_pmap) { if (invpcid_works1) { @@ -3284,9 +3277,8 @@ pmap_invalidate_all_pcid_cb(pmap_t pmap, bool invpcid_works1) } } else if (pmap == PCPU_GET(curpmap)) { CRITICAL_ASSERT(curthread); - cpuid = PCPU_GET(cpuid); - pcid = pmap->pm_pcids[cpuid].pm_pcid; + pcid = pmap_get_pcid(pmap); if (invpcid_works1) { d.pcid = pcid; d.pad = 0; @@ -10152,7 +10144,7 @@ pmap_activate_boot(pmap_t pmap) if (pti) { kcr3 = pmap->pm_cr3; if (pmap_pcid_enabled) - kcr3 |= pmap->pm_pcids[cpuid].pm_pcid | CR3_PCID_SAVE; + kcr3 |= pmap_get_pcid(pmap) | CR3_PCID_SAVE; } else { kcr3 = PMAP_NO_CR3; } diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 3b99b88742e5..cef718fb50d5 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -533,6 +533,14 @@ pmap_invlpg(pmap_t pmap, vm_offset_t va) } #endif /* sys/pcpu.h && machine/cpufunc.h */ +/* Return pcid for the pmap pmap on current cpu */ +static __inline uint32_t +pmap_get_pcid(pmap_t pmap) +{ + MPASS(pmap_pcid_enabled); + return (pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); +} + #endif /* _KERNEL */ /* Return various clipped indexes for a given VA */ From nobody Tue May 2 11:39:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRG4CtDz48tRL; Tue, 2 May 2023 11:39: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 4Q9dRG3nR0z3q9l; Tue, 2 May 2023 11:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VCdIENffwrLjZb0tFlUh/KZB0WC9BCONd3614CwLCt8=; b=jr1w6Obkf0aEfaxFtVR9ni1mXBlGqcYYCyGiF3NPnM8ZwAdmiWiUOIEI0Tx3n2M8yDi2lJ oCZPUD9M0W37MBkONnDeudPAFcuJYCnrzP2Kf1ICnEnzfHvhqAxt/mfPtlPR1dBXC09Bwr 5wbRpWbVvOewQgKfPBdUr9KBS3FXsQNs1lEscxQVcAY1soF0dgk3tnWJpTbrwshot+x4hW bvdCmsvOf/YXqr/80QmE64fPue72iwziNHGfioEAweb4owBjuEd4+TDYSYrVEtrqFmi2cC rAmqGenBtrC+euFmuAMpvr5/w/mscgDKbzK2liLMNeYMk+j03Mo+wIJGEHcgYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VCdIENffwrLjZb0tFlUh/KZB0WC9BCONd3614CwLCt8=; b=Lp7wAhPYxeXzjayHsEZM8ZFcDEyf6ri3Oi/QKkSjti2+4E6hGg0HbHzzr2/c5/EP6NtB+b n64PyU7byDumo7ZBys0NmOopiaHhp1eVpN73nAV1QLByiseCiHID2uSd+5Jf9Jj4sNqXbN wQUxBoEtQNDv92JVhxJ2/gRxqy/FXXe1MhztVeuqvaeC9s8L0BPqYNwTAvhhXVyWv1Zr6o L7wbPqNNi3XKYpqp1sVCHJ5MGEFO4rcj5/5t3HNLy+2xZYlRZ72M8Qkuqs3RzciQKYuAy3 HwkO6LYziXNR8OUGcMuU2rSkzvph1U3k0Hbvhq1F5LbB2/XXg8xjfPeD1q0d8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027594; a=rsa-sha256; cv=none; b=dP90mQsHnZw0NAMdC50+S8ukKnqT+/qee5/NtIfqPVWc24lADp4naJ+TruGAicI3lv5Nel H3tf2GcqD6GiobX0ZTlZ6s5gJCZnWpGaidEvHSZHNxISaFfbJHTfai9ptn/U2l6JuhE9kV KAhNjEBvnDPKL0+m/s6gkG6aRvwa/3IvaqxIvRR/h3u0qTm7gWJp8dX85zpu+nKjmzf2px r/QW5Wbzru7v0ZgxawrrEe1yNU8h2K+Wbq1HrMqnIlp2mw/ch6I6nZmD2rxrS0AZQzDd6x hsBLpCAwiDwBcF3+leHnqxK9Uk3qVr0FizaIt4fBbyrZ8D9ODjZNakHVLB11nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRG2d0dzmRm; Tue, 2 May 2023 11:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Bds9H092350; Tue, 2 May 2023 11:39:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdsGp092349; Tue, 2 May 2023 11:39:54 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:54 GMT Message-Id: <202305021139.342BdsGp092349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9c8cbf381985 - main - amd64 pmap_pcid_alloc(): pass a pointer to struct pmap_pcid instead of cpuid List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c8cbf3819854d9acbf4c0fba43942036f956786 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9c8cbf3819854d9acbf4c0fba43942036f956786 commit 9c8cbf3819854d9acbf4c0fba43942036f956786 Author: Konstantin Belousov AuthorDate: 2023-05-01 11:35:48 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:40 +0000 amd64 pmap_pcid_alloc(): pass a pointer to struct pmap_pcid instead of cpuid Cpuid is used to index the pmap->pm_pcids array only. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 16bfe9986c6b..a7716d7f394e 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -9926,20 +9926,20 @@ out: } static uint64_t -pmap_pcid_alloc(pmap_t pmap, u_int cpuid) +pmap_pcid_alloc(pmap_t pmap, struct pmap_pcid *pcidp) { uint32_t gen, new_gen, pcid_next; CRITICAL_ASSERT(curthread); gen = PCPU_GET(pcid_gen); - if (pmap->pm_pcids[cpuid].pm_pcid == PMAP_PCID_KERN) + if (pcidp->pm_pcid == PMAP_PCID_KERN) return (pti ? 0 : CR3_PCID_SAVE); - if (pmap->pm_pcids[cpuid].pm_gen == gen) + if (pcidp->pm_gen == gen) return (CR3_PCID_SAVE); pcid_next = PCPU_GET(pcid_next); KASSERT((!pti && pcid_next <= PMAP_PCID_OVERMAX) || (pti && pcid_next <= PMAP_PCID_OVERMAX_KERN), - ("cpu %d pcid_next %#x", cpuid, pcid_next)); + ("cpu %d pcid_next %#x", PCPU_GET(cpuid), pcid_next)); if ((!pti && pcid_next == PMAP_PCID_OVERMAX) || (pti && pcid_next == PMAP_PCID_OVERMAX_KERN)) { new_gen = gen + 1; @@ -9950,25 +9950,23 @@ pmap_pcid_alloc(pmap_t pmap, u_int cpuid) } else { new_gen = gen; } - pmap->pm_pcids[cpuid].pm_pcid = pcid_next; - pmap->pm_pcids[cpuid].pm_gen = new_gen; + pcidp->pm_pcid = pcid_next; + pcidp->pm_gen = new_gen; PCPU_SET(pcid_next, pcid_next + 1); return (0); } static uint64_t -pmap_pcid_alloc_checked(pmap_t pmap, u_int cpuid) +pmap_pcid_alloc_checked(pmap_t pmap, struct pmap_pcid *pcidp) { uint64_t cached; - cached = pmap_pcid_alloc(pmap, cpuid); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, - ("pmap %p cpu %d pcid %#x", pmap, cpuid, - pmap->pm_pcids[cpuid].pm_pcid)); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || - pmap == kernel_pmap, + cached = pmap_pcid_alloc(pmap, pcidp); + KASSERT(pcidp->pm_pcid < PMAP_PCID_OVERMAX, + ("pmap %p cpu %d pcid %#x", pmap, PCPU_GET(cpuid), pcidp->pm_pcid)); + KASSERT(pcidp->pm_pcid != PMAP_PCID_KERN || pmap == kernel_pmap, ("non-kernel pmap pmap %p cpu %d pcid %#x", - pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); + pmap, PCPU_GET(cpuid), pcidp->pm_pcid)); return (cached); } @@ -9984,6 +9982,7 @@ static void pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) { pmap_t old_pmap; + struct pmap_pcid *pcidp, *old_pcidp; uint64_t cached, cr3, kcr3, ucr3; KASSERT((read_rflags() & PSL_I) == 0, @@ -9994,17 +9993,18 @@ pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) PCPU_SET(ucr3_load_mask, PMAP_UCR3_NOMASK); old_pmap = PCPU_GET(curpmap); MPASS(old_pmap->pm_ucr3 != PMAP_NO_CR3); - old_pmap->pm_pcids[cpuid].pm_gen = 0; + old_pcidp = &old_pmap->pm_pcids[cpuid]; + old_pcidp->pm_gen = 0; } - cached = pmap_pcid_alloc_checked(pmap, cpuid); + pcidp = &pmap->pm_pcids[cpuid]; + cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if ((cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) - load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid); + load_cr3(pmap->pm_cr3 | pcidp->pm_pcid); PCPU_SET(curpmap, pmap); - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid; - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[cpuid].pm_pcid | - PMAP_PCID_USER_PT; + kcr3 = pmap->pm_cr3 | pcidp->pm_pcid; + ucr3 = pmap->pm_ucr3 | pcidp->pm_pcid | PMAP_PCID_USER_PT; if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); @@ -10021,16 +10021,17 @@ static void pmap_activate_sw_pcid_nopti(struct thread *td __unused, pmap_t pmap, u_int cpuid) { + struct pmap_pcid *pcidp; uint64_t cached, cr3; KASSERT((read_rflags() & PSL_I) == 0, ("PCID needs interrupts disabled in pmap_activate_sw()")); - cached = pmap_pcid_alloc_checked(pmap, cpuid); + pcidp = &pmap->pm_pcids[cpuid]; + cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) - load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | - cached); + load_cr3(pmap->pm_cr3 | pcidp->pm_pcid | cached); PCPU_SET(curpmap, pmap); if (cached) counter_u64_add(pcid_save_cnt, 1); From nobody Tue May 2 11:39:55 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRH6Hhbz48tWj; Tue, 2 May 2023 11:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9dRH47yGz3q7f; Tue, 2 May 2023 11:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aVITDJ/FwISQGWt3FgtwqZVCoSJS/rzEvIkklcypRM=; b=GX/nPgHkRsZefNPYIMt95xmZ90ygCyyeOOFUTcqjcXl2A8Tw8485lYQoHaP4nkhNlRI5pa YuKzaBZdAf5Ea7yhoW8fEjJb/IdViXumg8ljOJ37hrE7EGrst6eBryGaeC5nWzwgONKNFf YIR2xvdwirv7ialap38aCfmSdVDLaske9NSSnhU7Q1DPApFTR9V90TfX0idZ9LsurBMjr3 kETOl3FsfrgdNiQmEAG6VwsOppGbP8+wVosyIf0aaPO6HV14nsIe7/ljFVgTQsBVkxlRrJ hKLe90cofvlKbiEa4bNdOSWoYa5eioS+geKbvCp0mB5e6l3jrcZBMUkdmCLQ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aVITDJ/FwISQGWt3FgtwqZVCoSJS/rzEvIkklcypRM=; b=WcojJpCr+dfpkNHcviRB5+zoKddrHquIeQR0Nk4fNEQFq0cfcs1Nx7UYO9Tc81+couJvJb yEuCy9f2B7WPQAPyZ4SYi/7eh4Qhygqyk3vX3/hHUA72yCZHEUcsBRWnjGgoztgXKqcYsd HWGvJR4AaVwLbl3/uyaLTR902ozZdMGQUCT22FbbAT0lStvoIij5fm2svIRSF4MQlJoBXu nvdBNJOreN8rbNCbVoF0AhwoczJpVxonV2FfXL+xflpVlTwcfXtYfzEyhZqAZ5Dx+I/g6S dZd8G5GXEXnSwlL3BX74c5cAyyArtB4iGdkYW6CtGGXVDgh+4TOx7Zn6cw2tzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027595; a=rsa-sha256; cv=none; b=RaK0/pcm6ppN2ysNl9KyT8dwa9oNxoWeAMN8TgnJ+YkDM+5W+XKQaJ/Ple2b44oserLExU rR3iPoAJ05WPbGWlLKB6T1ddpxxQ9DN7GZ+Ywu9H9jGS7hHz6LU4ypWC8hhmQfe7My3peH bNW2gvcVXREVsAPEY1O6wQVbpnPjBHBzCcwoBNTQrJo19SjjYlIoQJ985XfvvrLjGzyNGr gy0magW2JF6rct+JKSeXLqiYwOnFYwg65tLgFNUWi862qgDNcv0p3l5uYGYowMis9ZYQWd MNqQymnrsOzkrx7lLjJKBwdQ6LpN7MfArqDCKNc+yof9go56o2Lqe7ekE+I/dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRH3G20zmPd; Tue, 2 May 2023 11:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342BdtKT092369; Tue, 2 May 2023 11:39:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342Bdtn7092368; Tue, 2 May 2023 11:39:55 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:55 GMT Message-Id: <202305021139.342Bdtn7092368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 42f722e721cd - main - amd64: store pcids pmap data in pcpu zone List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 commit 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 Author: Konstantin Belousov AuthorDate: 2023-05-01 05:17:45 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:47 +0000 amd64: store pcids pmap data in pcpu zone This change eliminates the struct pmap_pcid array embedded into struct pmap and sized by MAXCPU, which would bloat with MAXCPU increase. Also it removes false sharing of cache lines, since the array elements are mostly locally accessed by corresponding CPUs. Suggested by: mjg Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 38 +++++++++++++++++++++++++++++--------- sys/amd64/include/pcpu.h | 4 +++- sys/amd64/include/pmap.h | 8 ++++++-- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a7716d7f394e..a09920d62961 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -384,7 +384,15 @@ pmap_pku_mask_bit(pmap_t pmap) #define VM_PAGE_TO_PV_LIST_LOCK(m) \ PHYS_TO_PV_LIST_LOCK(VM_PAGE_TO_PHYS(m)) -struct pmap kernel_pmap_store; +/* + * Statically allocate kernel pmap memory. However, memory for + * pm_pcids is obtained after the dynamic allocator is operational. + * Initialize it with a non-canonical pointer to catch early accesses + * regardless of the active mapping. + */ +struct pmap kernel_pmap_store = { + .pm_pcidp = (void *)0xdeadbeefdeadbeef, +}; vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ @@ -2026,9 +2034,14 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* Initialize TLB Context Id. */ if (pmap_pcid_enabled) { + kernel_pmap->pm_pcidp = (void *)(uintptr_t) + offsetof(struct pcpu, pc_kpmap_store); for (i = 0; i < MAXCPU; i++) { - kernel_pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN; - kernel_pmap->pm_pcids[i].pm_gen = 1; + struct pmap_pcid *pcidp; + + pcidp = zpcpu_get_cpu(kernel_pmap->pm_pcidp, i); + pcidp->pm_pcid = PMAP_PCID_KERN; + pcidp->pm_gen = 1; } /* @@ -3031,6 +3044,7 @@ pmap_invalidate_ept(pmap_t pmap) static inline void pmap_invalidate_preipi_pcid(pmap_t pmap) { + struct pmap_pcid *pcidp; u_int cpuid, i; sched_pin(); @@ -3040,8 +3054,10 @@ pmap_invalidate_preipi_pcid(pmap_t pmap) cpuid = 0xffffffff; /* An impossible value */ CPU_FOREACH(i) { - if (cpuid != i) - pmap->pm_pcids[i].pm_gen = 0; + if (cpuid != i) { + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, i); + pcidp->pm_gen = 0; + } } /* @@ -4192,7 +4208,7 @@ pmap_pinit_pcids(pmap_t pmap, uint32_t pcid, int gen) int i; CPU_FOREACH(i) { - pcidp = &pmap->pm_pcids[i]; + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, i); pcidp->pm_pcid = pcid; pcidp->pm_gen = gen; } @@ -4215,6 +4231,7 @@ pmap_pinit0(pmap_t pmap) TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_flags = pmap_flags; + pmap->pm_pcidp = uma_zalloc_pcpu(pcpu_zone_8, M_WAITOK); pmap_pinit_pcids(pmap, PMAP_PCID_KERN + 1, 1); pmap_activate_boot(pmap); td = curthread; @@ -4398,6 +4415,9 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) pmap->pm_pmltop = (pml5_entry_t *)PHYS_TO_DMAP(pmltop_phys); if (pmap_pcid_enabled) { + if (pmap->pm_pcidp == NULL) + pmap->pm_pcidp = uma_zalloc_pcpu(pcpu_zone_8, + M_WAITOK); pmap_pinit_pcids(pmap, PMAP_PCID_NONE, 0); } pmap->pm_cr3 = PMAP_NO_CR3; /* initialize to an invalid value */ @@ -9993,11 +10013,11 @@ pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) PCPU_SET(ucr3_load_mask, PMAP_UCR3_NOMASK); old_pmap = PCPU_GET(curpmap); MPASS(old_pmap->pm_ucr3 != PMAP_NO_CR3); - old_pcidp = &old_pmap->pm_pcids[cpuid]; + old_pcidp = zpcpu_get_cpu(old_pmap->pm_pcidp, cpuid); old_pcidp->pm_gen = 0; } - pcidp = &pmap->pm_pcids[cpuid]; + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, cpuid); cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if ((cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) @@ -10027,7 +10047,7 @@ pmap_activate_sw_pcid_nopti(struct thread *td __unused, pmap_t pmap, KASSERT((read_rflags() & PSL_I) == 0, ("PCID needs interrupts disabled in pmap_activate_sw()")); - pcidp = &pmap->pm_pcids[cpuid]; + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, cpuid); cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index c0c35f4419e8..342bdde312be 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -35,6 +35,7 @@ #ifndef _MACHINE_PCPU_H_ #define _MACHINE_PCPU_H_ +#include #include #include @@ -101,7 +102,8 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); uint64_t pc_ucr3_load_mask; \ u_int pc_small_core; \ u_int pc_pcid_invlpg_workaround; \ - char __pad[2908] /* pad to UMA_PCPU_ALLOC_SIZE */ + struct pmap_pcid pc_kpmap_store; \ + char __pad[2900] /* pad to UMA_PCPU_ALLOC_SIZE */ #define PC_DBREG_CMD_NONE 0 #define PC_DBREG_CMD_LOAD 1 diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index cef718fb50d5..1b3aeb248ebb 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -286,6 +286,7 @@ #ifndef LOCORE +#include #include #include #include @@ -390,7 +391,7 @@ struct pmap { long pm_eptgen; /* EPT pmap generation id */ smr_t pm_eptsmr; int pm_flags; - struct pmap_pcid pm_pcids[MAXCPU]; + struct pmap_pcid *pm_pcidp; struct rangeset pm_pkru; }; @@ -537,8 +538,11 @@ pmap_invlpg(pmap_t pmap, vm_offset_t va) static __inline uint32_t pmap_get_pcid(pmap_t pmap) { + struct pmap_pcid *pcidp; + MPASS(pmap_pcid_enabled); - return (pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); + pcidp = zpcpu_get(pmap->pm_pcidp); + return (pcidp->pm_pcid); } #endif /* _KERNEL */ From nobody Tue May 2 14:08:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9hl624Lhz491Yn; Tue, 2 May 2023 14: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 4Q9hl61Rzsz45dF; Tue, 2 May 2023 14:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683036530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHZNvtfXcEhmeSUEqEv0lRUOG/4DO57k50g0Q+3XNwI=; b=ZCHJm0xmvJXQLDUO417siao0bZNaeq359e/xgXQ7psLHxBT2B1zWNnkaS0JPBwBExgdFHf GK4R3oXFsfMHuUyxzmP7PGZOoqKRikQjstpR/SWVWCp1av2rVofib0b6UX0IRu0YdyoUTf 6fSaa3X1mpTLFuA4VqwwPRyYkX+q+k1uzPU+yi0PbmYJg7MtuSzL/ca/dZQgRaBbsVCFpF SKcLWPJxuqZXC3h5t4VTCr4nyLgxXZn7Of/z541VrlYSr1J2CXPKDnahl3cQZITZaSorrY W7rz1oo4k7s84sWTTffTOpkVDYBihc+78l1aifLzp3yULJ7yw6/sn8Q5pQUNHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683036530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHZNvtfXcEhmeSUEqEv0lRUOG/4DO57k50g0Q+3XNwI=; b=NPdCM9eJlagiIty/5CMWanGHzSAuJHTlOyw3TOF5RJEboCC9fMIouvfjECo2R8FVDPyb0U uPd+b9dPek/PDsoWKtrYoeTzqU3DCYLSrtMsf9hE+755ZhTAs9QCehCpLnyoPuLax7L5Ag Thx3tui3fHgEmwvemqBqFMGcJk0DWWMGmI25JRGhfvlK+2lNyjNDARbryznFXyhYqk2uwa ok96Z8gHSwbuTSQ4aadkHTc0pIsOU0KPetxl2YjKszMReUdIilbc3HezmXM8Zdlk2/jeBZ Jio3SscEiyIX4llG2z6QhYsS7F9ETG1UoGWFD+zBnD0hVdMIUAGiH4Yt4kUWZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683036530; a=rsa-sha256; cv=none; b=eKxi5eg7nWouMduJE6lFHMANiL4wGeYV56JU3XUfL9cTFVSFk9UGlSYBxqTKpU2swiKtsj HMESyrBptl5ze/c0WiRcab8HY/qm5b15f9LkFtRCWO6J1acuP6MPy4Ue3z/9dUvFF8ZGAm oTXnRb7eOISYXVbAj9faUupV81D5Ipe9fLadW/BpkSLYVHJF/QxYnYYVDNj60tX/jRJ5Ik 0idgtpvQTcts0kUnCicw4XznV0QIqocv3pFmUCe4HoNegwdAlv5ooVGfab+BDjYNJR2lB/ oSblRnVn2rKgqvnETYDCyBujIAxiSpCN2YAlBUvUQDTzFDsLtuaOPs6PYvMYhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9hl60Pm4zr0B; Tue, 2 May 2023 14:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342E8nw8041015; Tue, 2 May 2023 14:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342E8nRS041014; Tue, 2 May 2023 14:08:49 GMT (envelope-from git) Date: Tue, 2 May 2023 14:08:49 GMT Message-Id: <202305021408.342E8nRS041014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 6f378116e9bf - main - Intel DMAR: remove parsing of 6-level paging capability List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f378116e9bf982b8246d033d81cb64d52b24462 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=6f378116e9bf982b8246d033d81cb64d52b24462 commit 6f378116e9bf982b8246d033d81cb64d52b24462 Author: Jason A. Harmening AuthorDate: 2023-05-01 16:22:39 +0000 Commit: Jason A. Harmening CommitDate: 2023-05-02 14:06:11 +0000 Intel DMAR: remove parsing of 6-level paging capability Early versions of the VT-d spec mentioned 6-level paging support as a possible value for the SAGAW capability, but later versions removed it and SAGAW=0x10 is currently listed as a reserved value. The 6-level (agaw=64) entry in sagaw_bits is furthermore problematic with clang15 because the attempted comparison against 1ULL << 64 in dmar_maxaddr2mgaw() causes the compiler to elide the last iteration of the initial loop, which bypasses the subsequent logic to find the greatest HW-supported address width. This results in 5-level paging always being selected regardless of whether the hardware supports it, which can result address translation failure due to invalid context- entry programming. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39896 --- sys/x86/iommu/intel_utils.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index e3ebea648c4c..f2cf58ca04fa 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -99,9 +99,14 @@ static const struct sagaw_bits_tag { {.agaw = 48, .cap = DMAR_CAP_SAGAW_4LVL, .awlvl = DMAR_CTX2_AW_4LVL, .pglvl = 4}, {.agaw = 57, .cap = DMAR_CAP_SAGAW_5LVL, .awlvl = DMAR_CTX2_AW_5LVL, - .pglvl = 5}, - {.agaw = 64, .cap = DMAR_CAP_SAGAW_6LVL, .awlvl = DMAR_CTX2_AW_6LVL, - .pglvl = 6} + .pglvl = 5} + /* + * 6-level paging (DMAR_CAP_SAGAW_6LVL) is not supported on any + * current VT-d hardware and its SAGAW field value is listed as + * reserved in the VT-d spec. If support is added in the future, + * this structure and the logic in dmar_maxaddr2mgaw() will need + * to change to avoid attempted comparison against 1ULL << 64. + */ }; bool From nobody Tue May 2 15:12:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9k900Fd6z494GX; Tue, 2 May 2023 15:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9k8z6PWmz4FYj; Tue, 2 May 2023 15:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683040371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKoBdg+HQaXykZF2yJIZkV12X5nbiw90PT5xCT0kGyA=; b=sJK+XEYwioocHvCv5VWviuMGMho6FM5v7YiRrlQxhSa9zfaPJwBKg04QvceaKO1eqXaET+ czeiIDAUMJN6GwSCWADw7cFb5suous+k8LIiUpyw62Qf6lCXb5DsX3kjUG+3OgKUZn5UOd PaZUd4D/Rl5dr2x9l9JsdAIBB1fqGlANjCV5aaPJJIKk1P9/dUymM2fFxnj9qko76/0y5x kwgyFSEqvS057zCFJ2BgqQK1HcSlfrsz16iRnk4IEwSXAsdQqCmzY5t5c7M/sUfAwURmrQ eRoM9AgBIA39e1ui1FGHK9f0Q/ymuzz9oYmJ6ABG1QqmBnVxOZgjUEfzgSusfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683040371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKoBdg+HQaXykZF2yJIZkV12X5nbiw90PT5xCT0kGyA=; b=gDJ/2ce2avDMyHS/G0QdJCSGVa/VtAab1zVWrt39EN/0az5XyeYPfuOP/5Mp17+SJp0qdH /mF2muDDTa+h9/nLNnWW3/HGw5u6NW4OVS5QLirwcRbjhc1qvhmzu3dxH6pSpXAUo/NnOE iRuN5clcZAHC3Io5fa+Ge4mzHXTZceHSPYt6DpL0xP4qsGPTtnVrlzcJ8ZfE8FFn3qqjrj yf1mHYgZhveqrmlc1HK/o8HXaTlgaW2ctbwaDbfPuKSBWg7y4lBco3KwM19gGV4HEWgcYi gPBxOP8egLuPgMliwc0HrcVAYqvz06fz9kJqHxBxWGHYgiNH2m7nORnQNz9FPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683040371; a=rsa-sha256; cv=none; b=S0W81LV0XGpfKGQYxV4h/Q5+sbykGA1NNlirpLqG6Frs0VzRC0BdKREhEZBDBMNPb8F1BS O8rgvG8+tSeRA/TJPo2X6djLB7Tl848QL0L2MOWWK5gu/utBA+eDme3b2M5lNJT5ZCZWl/ 0xkkbASE0NVQ/gf6WPCM8YeAO+1SiJY9emxs8XZjpz7nzgCuth1ZBhJ0D7Lg4RceWhrs2g DSzxqh/lTrpti7pWJwuEGZxT4IfVfptPu4ntQFHdhY8MwnkTOiUFrx4t9tPVDqe43gRQ3H 0ah9qF+DcJaSChJZFfMlj4RgnYrd/iUX2ww9nG5XkIo+/7yfDlgO2Qzd6XVMrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9k8z5QLczspP; Tue, 2 May 2023 15:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342FCpxX056203; Tue, 2 May 2023 15:12:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342FCpbN056202; Tue, 2 May 2023 15:12:51 GMT (envelope-from git) Date: Tue, 2 May 2023 15:12:51 GMT Message-Id: <202305021512.342FCpbN056202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1d71cebc05ccfeedf95f2db3e94b17270167888 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 commit a1d71cebc05ccfeedf95f2db3e94b17270167888 Author: Konstantin Belousov AuthorDate: 2023-05-02 15:11:39 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 15:11:39 +0000 fstatat(2): restore AT_EMPTY_PATH handling Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 Reported by: markj Sponsored by: The FreeBSD Foundation --- sys/kern/vfs_syscalls.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5c0a291e3b0b..d68af4ea4d51 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); - if ((error = namei(&nd)) != 0) + if ((error = namei(&nd)) != 0) { + if (error == ENOTDIR && + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) + error = kern_fstat(td, fd, sbp); return (error); + } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); NDFREE_PNBUF(&nd); vput(nd.ni_vp); From nobody Tue May 2 16:07:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9lNQ53Cgz4971M; Tue, 2 May 2023 16:07: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 4Q9lNQ4DLLz4MX0; Tue, 2 May 2023 16:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683043670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wabTW0aVaBRpETJEMbIfwnyJIud0PBWSnrd36fFypo=; b=rEW2RoLp2+q753/NoSL1GE5yCSZZVlSUCIpA2L2LvV4zsjwR843sYSGCEhjAd53LTiSQpT F83s4WKAKmMMIc0RmF7pe8pRuO6ybetI5OBr/aDezu6COLOwJHTsY6fKea+q9Rc7wSefkw kh04MUWJms3LYMhw/qzrtq/2oWRKfpOMrIXOerixcFWdD2j2wDWmAebVQcyBLOjrSaQ1oD TUU1F+zrmtqGgIejM0gbefnpVsaFtuac1nchUKETuJqT9X0ZV5K/avnqDhoI8JM0k3QKwS FpLCyrZv5cY9/ZxT/Cnz9o8ZbGDUt6R6c1a5GRhuQAR4J7PTb6iSTGXA4PKo5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683043670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wabTW0aVaBRpETJEMbIfwnyJIud0PBWSnrd36fFypo=; b=R7Sb7VV1m1leEenQcXEDuujCwLq77zm8NAj1cHeufTmh/l1pV86u8DamaXZ4bG04D+Odr2 7oado/hJ6V8pVnHP9fZk6lxjq/qvlUV9pVhytWQ2tjQ/KrRf8Uhnax5JArTgUC6OsJ+u67 rpkGoXzu8mJwuSY0jhk7hfXF0q2hjrXWGkndrpBF5vaDeBdlsOS9mtOmQWouo68g+Y7hQ0 SplJQX0HLPV8G7Hc05QKEoc2FaKau3do6FBIdIppab64i34EtetU4TMonkkdwV4sWsR+Pr JIP6ERioghbZrCgI0e7aoFcCuUHu08lP97h9PNHl85g+tVoSiRk/n550+1k9Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683043670; a=rsa-sha256; cv=none; b=UzXfRArYVGzp4T9MDyJKJKrSUv4GAjdjTCNvjD04QfIP8eszPPRu2vsBVOe8wycjoJGAw1 2SQ4WklQNC7od819Nj4QiIUo67s0gwM6OQAnizzUVuq+NIdvfFlxVRCOmsBVkGPRkANzpI WzYE7MbFJaNS15cs2tG3TSnyFMZfp7ik+KrfxVKDoeQN7MtzDs2tu97fpcZ8DWJcKZOPw8 32yf74B2rvxo77dzUQaUUFD3nsL4p+aYLho8rDuYgPhGDJo1dWVmfVdd8pvptULk54hOU/ q4q4XV9G2pzNwT21dZwXUJDQX/dtmfjwyI3LXqoiSjNjxdxRiu9C8K/F3D4I+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 4Q9lNQ3HHnztjG; Tue, 2 May 2023 16:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342G7oIl040167; Tue, 2 May 2023 16:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342G7oRW040166; Tue, 2 May 2023 16:07:50 GMT (envelope-from git) Date: Tue, 2 May 2023 16:07:50 GMT Message-Id: <202305021607.342G7oRW040166@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: 476babaea7a3 - main - rtsol: introduce an 'always' script List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 476babaea7a32ef215e6a3791eed267252f93d79 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=476babaea7a32ef215e6a3791eed267252f93d79 commit 476babaea7a32ef215e6a3791eed267252f93d79 Author: Kristof Provost AuthorDate: 2023-05-02 08:45:01 +0000 Commit: Kristof Provost CommitDate: 2023-05-02 16:07:36 +0000 rtsol: introduce an 'always' script In addition to the 'M' and 'O' scripts (for when 'Managed' and 'Other' flags are set) also introduce an 'always' script that is called for any router advertisement (so even if M and O are not set). This is primarly useful for systems like pfSense that wish to be informed of routers for further system configuration. See also https://redmine.pfsense.org/issues/14072 Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39931 --- usr.sbin/rtsold/rtsol.c | 12 ++++++++++++ usr.sbin/rtsold/rtsold.8 | 18 +++++++++++++++++- usr.sbin/rtsold/rtsold.c | 19 ++++++++++++++++--- usr.sbin/rtsold/rtsold.h | 2 ++ 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c index 646dd092cb0c..e15b9f202468 100644 --- a/usr.sbin/rtsold/rtsol.c +++ b/usr.sbin/rtsold/rtsol.c @@ -81,6 +81,7 @@ static char *make_rsid(const char *, const char *, struct rainfo *); #define _ARGS_MANAGED managedconf_script, ifi->ifname, rasender #define _ARGS_OTHER otherconf_script, ifi->ifname, rasender +#define _ARGS_ALWAYS alwaysconf_script, ifi->ifname, rasender #define _ARGS_RESADD resolvconf_script, "-a", rsid #define _ARGS_RESDEL resolvconf_script, "-d", rsid @@ -327,6 +328,17 @@ rtsol_input(int sock) if (!ifi->managedconfig) CALL_SCRIPT(OTHER, NULL); } + + /* + * "Always" script. + */ + if (!ifi->alwaysconfig) { + const char *rasender = inet_ntop(AF_INET6, &from.sin6_addr, + ntopbuf, sizeof(ntopbuf)); + ifi->alwaysconfig = 1; + CALL_SCRIPT(ALWAYS, NULL); + } + clock_gettime(CLOCK_MONOTONIC_FAST, &now); newent_rai = 0; rai = find_rainfo(ifi, &from); diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8 index 992d3a0f784d..cc5505a7de5c 100644 --- a/usr.sbin/rtsold/rtsold.8 +++ b/usr.sbin/rtsold/rtsold.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2021 +.Dd May 2, 2023 .Dt RTSOLD 8 .Os .\" @@ -42,6 +42,7 @@ .Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Ar interface ... @@ -49,6 +50,7 @@ .Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Fl a @@ -56,12 +58,14 @@ .Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl R Ar script-name .Ar interface ... .Nm rtsol .Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl R Ar script-name .Fl a .\" @@ -250,6 +254,18 @@ router advertisement is also TRUE. must be the absolute path from root to the script file, be a regular file, and be created by the same owner who runs .Nm . +.It Fl A Ar script-name +Specifies a supplement script file to always be called for the router +advertisement. +.Nm +will invoke +.Ar script-name +with a first argument of the receiving interface name +and a second argument of the sending router address. +.Ar script-name +must be the absolute path from root to the script file, be a regular +file, and be created by the same owner who runs +.Nm . .It Fl p Ar pidfile Writes the process ID of .Nm diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index f1ba3b07c879..3da2a225307b 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -82,6 +82,7 @@ int uflag = 0; const char *managedconf_script; const char *otherconf_script; +const char *alwaysconf_script; const char *resolvconf_script = "/sbin/resolvconf"; cap_channel_t *capllflags, *capscript, *capsendmsg, *capsyslog; @@ -126,11 +127,11 @@ main(int argc, char **argv) progname = basename(argv[0]); if (strcmp(progname, "rtsold") == 0) { - opts = "adDfFim1M:O:p:R:u"; + opts = "adDfFim1M:O:A:p:R:u"; once = 0; pidfilepath = NULL; } else { - opts = "adDFiM:O:R:u"; + opts = "adDFiM:O:A:R:u"; fflag = 1; once = 1; } @@ -167,6 +168,9 @@ main(int argc, char **argv) case 'O': otherconf_script = optarg; break; + case 'A': + alwaysconf_script = optarg; + break; case 'p': pidfilepath = optarg; break; @@ -204,6 +208,9 @@ main(int argc, char **argv) if (otherconf_script != NULL && *otherconf_script != '/') errx(1, "configuration script (%s) must be an absolute path", otherconf_script); + if (alwaysconf_script != NULL && *alwaysconf_script != '/') + errx(1, "configuration script (%s) must be an absolute path", + alwaysconf_script); if (*resolvconf_script != '/') errx(1, "configuration script (%s) must be an absolute path", resolvconf_script); @@ -336,7 +343,8 @@ init_capabilities(void) { #ifdef WITH_CASPER const char *const scripts[] = - { resolvconf_script, managedconf_script, otherconf_script }; + { resolvconf_script, managedconf_script, otherconf_script, + alwaysconf_script }; cap_channel_t *capcasper; nvlist_t *limits; @@ -616,6 +624,7 @@ rtsol_check_timer(void) if (probe) { ifi->managedconfig = 0; ifi->otherconfig = 0; + ifi->alwaysconfig = 0; } if (probe && mobile_node) { error = cap_probe_defrouters(capsendmsg, @@ -786,13 +795,17 @@ usage(const char *progname) if (strcmp(progname, "rtsold") == 0) { fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] interface ...\n"); fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] -a\n"); } else { fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] interface ...\n"); fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] -a\n"); } exit(1); diff --git a/usr.sbin/rtsold/rtsold.h b/usr.sbin/rtsold/rtsold.h index 1342ad87703b..6b8db8466e62 100644 --- a/usr.sbin/rtsold/rtsold.h +++ b/usr.sbin/rtsold/rtsold.h @@ -75,6 +75,7 @@ struct ifinfo { * configuration */ int otherconfig; /* need a separate protocol for the "other" * configuration */ + int alwaysconfig; /* Have we called the 'always' script? */ int state; int probes; int dadcount; @@ -160,6 +161,7 @@ extern int Fflag; extern int uflag; extern const char *managedconf_script; extern const char *otherconf_script; +extern const char *alwaysconf_script; extern const char *resolvconf_script; extern struct cap_channel *capllflags, *capscript, *capsendmsg, *capsyslog; From nobody Tue May 2 17:00:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9mXp3KzDz49BFD; Tue, 2 May 2023 17:00:10 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9mXn5jLZz3hBt; Tue, 2 May 2023 17:00:09 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 342H01rL012468; Tue, 2 May 2023 20:00:01 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 342H01Jw012467; Tue, 2 May 2023 20:00:01 +0300 (MSK) (envelope-from dchagin) Date: Tue, 2 May 2023 20:00:01 +0300 From: Dmitry Chagin To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202305021512.342FCpbN056202@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Q9mXn5jLZz3hBt X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > Author: Konstantin Belousov > AuthorDate: 2023-05-02 15:11:39 +0000 > Commit: Konstantin Belousov > CommitDate: 2023-05-02 15:11:39 +0000 > > fstatat(2): restore AT_EMPTY_PATH handling > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > Reported by: markj > Sponsored by: The FreeBSD Foundation > --- > sys/kern/vfs_syscalls.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > index 5c0a291e3b0b..d68af4ea4d51 100644 > --- a/sys/kern/vfs_syscalls.c > +++ b/sys/kern/vfs_syscalls.c > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > > - if ((error = namei(&nd)) != 0) > + if ((error = namei(&nd)) != 0) { > + if (error == ENOTDIR && > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > + error = kern_fstat(td, fd, sbp); > return (error); > + } cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > NDFREE_PNBUF(&nd); > vput(nd.ni_vp); From nobody Tue May 2 18:04:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9nyp04YZz49FJv; Tue, 2 May 2023 18:04: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 4Q9nyn6jKzz3rM6; Tue, 2 May 2023 18:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=STaYSLhFCSEcbLNOy0rml/rmf+8FVlYNkbGZq5V7dTE=; b=uTs2i81wZ3dx9gPMkAKhRFmOMupXZsKVy/E0Euqdze8sGvZZmZpLZPU23cIJlvsGe3w2D7 bA0ZCkB04Etekj98QJA1DV4m6JIDiCjJr/9PbWehNqEfBRp1NU2wXH2HNUHOXhpGKN9Zd6 66bPrvswehbaQC8g6zHbHYJs8ZZS8S8H77P7Wp0KyRyzZ/yKNUugVWSuqQaG7pSOE2lPxR NsQR1ngA/4j9vynSxxqel+0uq0kAGI2TLz8jR+/Kv9PIbUEKH3mgsvGxa+f5Iu5j4fLFp7 5CPnopUtGfkOSI4coJGkwtbL/UXrN2j5bJEBqSLa03xFwltMUIyEfH5mGXBBpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=STaYSLhFCSEcbLNOy0rml/rmf+8FVlYNkbGZq5V7dTE=; b=aifJi0sOvxDEm16pxOpx1VP3YyUy1yveEU3ZTOxIhceW/DszArOSeVsly5F2ViAWX/8NVb cpClDskkQ3XlkLF3Lbm6Zydax8eBEOSYl6PGp4K1nwXPmEb3ddFBCEqD+RAsdQAGJNI92I nc8SvEp0TGr2BhCUDqz7ysbpeUeNCOeoG1KvIKGrRTqqHGgIwXJXXiuvXKWUxSEVoi/C3c M0+tHtFYLHQ/qyPc+NKUl1Eo+RuVImrFiI1HFc6I1LA6h+5ya204aVTXlf9gEYB7Odocy9 m6GFaQuuLS0al6zsalCWNvyas+WRQGX0hhOtqD0P/zNkfCXsJYVQjY8QlSnJWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683050657; a=rsa-sha256; cv=none; b=DJiMWwoaNtAD+0lIX3mrWKql6mk1wZWwkeIOVKrfzLSZoyfqTnHZRCx6gxTj4IjyJqpP3Y KF/lNXQx5nmvZAg91DaaytHvKp5lVupPtEAUKLKJnXhLRoAFI5/8H+xWtbZfy3Fe70D5cm JjS3EVmz9OWhhHxVUAoUITN2mymvbwzdrUCj2T4AdikGJ7xkc8YZeLCL2Hu0iLbfwiaRXU ipvBClhE0U9u2D1JijiKJFGtHiJSpz6JZFki9OP430iTNqTaUBNk+8MA5bBd61UoEeM7u5 Ud2u9OQE0CCbrOqzXKasGHedhMdMaZQtxIcZLpaGjh9Esgf8NFQgqfWtuAVcnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9nyn5nG7zy3p; Tue, 2 May 2023 18:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342I4H6p043879; Tue, 2 May 2023 18:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342I4H4m043878; Tue, 2 May 2023 18:04:17 GMT (envelope-from git) Date: Tue, 2 May 2023 18:04:17 GMT Message-Id: <202305021804.342I4H4m043878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: f5d39047b094 - main - riscv: remove unused string from swtch.S List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5d39047b094d5164b85ae7e2a6a9a8342269815 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f5d39047b094d5164b85ae7e2a6a9a8342269815 commit f5d39047b094d5164b85ae7e2a6a9a8342269815 Author: Mitchell Horne AuthorDate: 2023-01-23 17:11:16 +0000 Commit: Mitchell Horne CommitDate: 2023-05-02 18:01:00 +0000 riscv: remove unused string from swtch.S MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/riscv/riscv/swtch.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/riscv/riscv/swtch.S b/sys/riscv/riscv/swtch.S index 2176d2a181be..d2e23784c994 100644 --- a/sys/riscv/riscv/swtch.S +++ b/sys/riscv/riscv/swtch.S @@ -369,8 +369,6 @@ ENTRY(cpu_switch) #endif ret -.Lcpu_switch_panic_str: - .asciz "cpu_switch: %p\0" END(cpu_switch) /* From nobody Tue May 2 18:04:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9nyq14cWz49FZg; Tue, 2 May 2023 18:04: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 4Q9nyq0GN0z3rRl; Tue, 2 May 2023 18:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAIcZZ2rze2Ft59DOmrSsBMpEf0++WjTTRI0r39CfCg=; b=bHpVu8qZa2yYOTYE3nYvdNsS1wKAwxjSUCWhAoQA5ulnaVfCQLBDbSG+YXd5Ahla+KICPm Lba4FXvgdGOcRVm5HA6kwAqA7JPGzts9f/Ibo8Lw35dJb2nIAj1VXzqKP9VqI7/sfCLBod 1L9AqbBiZKcwaSWRMvkbOU4gaAKqQT6xLbUhjyizaPNi2zxZ/8zkdWc4RQ6lYMhAKpHTCn eFtLxZALDWT7xkPQl3TMTZ3nyLFztLJfpZSxAR7KATiWY5vC47Xjb3+6gLzFO/k8qhBK0g /0tfK9+nQNrXCieD7MhdQFAJrl0iRk9/C1r5EoM6TLx071DqWGYcottMY28qkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAIcZZ2rze2Ft59DOmrSsBMpEf0++WjTTRI0r39CfCg=; b=cydBkOkAq20hFPG68SQ/Pg1XtgLG9fpGESq9zsV3VrZaqXdVvTglyIvJ+neg/4/itUbrWz ooIyxQ8dr/P9IWb5xcGDktUBxyjY+9OVLJKqMHx+01RtVPwmmtZFEvAtwLzaLoCTvq1N6A WPGjM7L0kamh3OECerjxud4pEGWKrPBxpxps+EXrZBSBzjKHA6am4NnuvXcPP5fyAtR1x+ 6WjtcBJPkPcTHc8vtoyoZRWSgz34bXYHGmlQKQdB5HtRb2zLbqtlLR+lSym1awZTrMYQnz 1SFtpRJXbJRawF/MJ1GfOqXcqq183BaIfKxObVO/domjfUsS1QAPPGhwlK6ocA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683050659; a=rsa-sha256; cv=none; b=oP83tQw0Etp/FQytdwgHPMkGgBdtfWvg1I1BS2fTbBae07JMvYETz3emxLreA2/G3nJIh1 LS/QahK8m+Npx1ejqU9b5YpjnGbgcaq72z79CWUdEmuthgGSERGZqJxpSVdnTSXvPt3tCu WJZ7U37CMyCvHNnCB76lmVahKpGafs846BScLod1W/TzrR3951XnCMCSGiBEOQoukHRA8x 1tO7dQ3JHaABKFjfRwmRc16YUA+B42TzmXppK8EYQcm4yS97Cv+9mjWQzAVTo97ZsIyLYf zVqzIyiRfgHagt1AUyCzQTeLhz8CTvHtdwMso6iQ75RhqBBPu4rZFdD76nu3RA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9nyp6RnQzxvx; Tue, 2 May 2023 18:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342I4I0r043898; Tue, 2 May 2023 18:04:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342I4I4o043897; Tue, 2 May 2023 18:04:18 GMT (envelope-from git) Date: Tue, 2 May 2023 18:04:18 GMT Message-Id: <202305021804.342I4I4o043897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: c32b6c742f36 - main - riscv: retire the FPE kernel 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c32b6c742f36225ca0a9d2e7a704f959875e37b3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c32b6c742f36225ca0a9d2e7a704f959875e37b3 commit c32b6c742f36225ca0a9d2e7a704f959875e37b3 Author: Mitchell Horne AuthorDate: 2023-04-25 17:51:35 +0000 Commit: Mitchell Horne CommitDate: 2023-05-02 18:01:31 +0000 riscv: retire the FPE kernel option We always build the kernel floating point support. Now that the riscv64sf userspace variant has been removed the option is required for correct operation. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39851 --- sys/conf/kern.mk | 7 +++---- sys/conf/options.riscv | 1 - sys/riscv/conf/GENERIC | 1 - sys/riscv/conf/NOTES | 1 - sys/riscv/riscv/exec_machdep.c | 15 +-------------- sys/riscv/riscv/identcpu.c | 2 -- sys/riscv/riscv/machdep.c | 5 +---- sys/riscv/riscv/swtch.S | 14 +------------- sys/riscv/riscv/trap.c | 4 ---- 9 files changed, 6 insertions(+), 44 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 1a1251f670e1..245f81e6ed71 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -153,10 +153,9 @@ INLINE_LIMIT?= 8000 # # For RISC-V we specify the soft-float ABI (lp64) to avoid the use of floating -# point registers within the kernel. However, for kernels supporting hardware -# float (FPE), we have to include that in the march so we can have limited -# floating point support in context switching needed for that. This is different -# than userland where we use a hard-float ABI (lp64d). +# point registers within the kernel. However, we include the F and D extensions +# in -march so we can have limited floating point support in context switching +# code. This is different than userland where we use a hard-float ABI (lp64d). # # We also specify the "medium" code model, which generates code suitable for a # 2GiB addressing range located at any offset, allowing modules to be located diff --git a/sys/conf/options.riscv b/sys/conf/options.riscv index 9e48f73fba33..964a2f07173c 100644 --- a/sys/conf/options.riscv +++ b/sys/conf/options.riscv @@ -1,5 +1,4 @@ # $FreeBSD$ RISCV opt_global.h # For cpu RISCV to work -FPE opt_global.h INTRNG opt_global.h diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 49e3f07c0f96..04645ec9bf90 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -72,7 +72,6 @@ options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data -options FPE # Floating-point extension support options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits diff --git a/sys/riscv/conf/NOTES b/sys/riscv/conf/NOTES index f36e6283433d..d3ff441a95d6 100644 --- a/sys/riscv/conf/NOTES +++ b/sys/riscv/conf/NOTES @@ -16,7 +16,6 @@ options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data -options FPE # Floating-point extension support options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default # RISC-V SBI console diff --git a/sys/riscv/riscv/exec_machdep.c b/sys/riscv/riscv/exec_machdep.c index ab79c0384eb3..e61bce628602 100644 --- a/sys/riscv/riscv/exec_machdep.c +++ b/sys/riscv/riscv/exec_machdep.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -70,10 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FPE -#include -#endif - static void get_fpcontext(struct thread *td, mcontext_t *mcp); static void set_fpcontext(struct thread *td, mcontext_t *mcp); @@ -123,7 +120,6 @@ set_regs(struct thread *td, struct reg *regs) int fill_fpregs(struct thread *td, struct fpreg *regs) { -#ifdef FPE struct pcb *pcb; pcb = td->td_pcb; @@ -139,7 +135,6 @@ fill_fpregs(struct thread *td, struct fpreg *regs) memcpy(regs->fp_x, pcb->pcb_x, sizeof(regs->fp_x)); regs->fp_fcsr = pcb->pcb_fcsr; } else -#endif memset(regs, 0, sizeof(*regs)); return (0); @@ -148,7 +143,6 @@ fill_fpregs(struct thread *td, struct fpreg *regs) int set_fpregs(struct thread *td, struct fpreg *regs) { -#ifdef FPE struct trapframe *frame; struct pcb *pcb; @@ -160,7 +154,6 @@ set_fpregs(struct thread *td, struct fpreg *regs) pcb->pcb_fpflags |= PCB_FP_STARTED; frame->tf_sstatus &= ~SSTATUS_FS_MASK; frame->tf_sstatus |= SSTATUS_FS_CLEAN; -#endif return (0); } @@ -274,7 +267,6 @@ set_mcontext(struct thread *td, mcontext_t *mcp) static void get_fpcontext(struct thread *td, mcontext_t *mcp) { -#ifdef FPE struct pcb *curpcb; critical_enter(); @@ -300,20 +292,16 @@ get_fpcontext(struct thread *td, mcontext_t *mcp) } critical_exit(); -#endif } static void set_fpcontext(struct thread *td, mcontext_t *mcp) { -#ifdef FPE struct pcb *curpcb; -#endif td->td_frame->tf_sstatus &= ~SSTATUS_FS_MASK; td->td_frame->tf_sstatus |= SSTATUS_FS_OFF; -#ifdef FPE critical_enter(); if ((mcp->mc_flags & _MC_FP_VALID) != 0) { @@ -327,7 +315,6 @@ set_fpcontext(struct thread *td, mcontext_t *mcp) } critical_exit(); -#endif } int diff --git a/sys/riscv/riscv/identcpu.c b/sys/riscv/riscv/identcpu.c index 5f10ec6358ae..c57a22c1b51a 100644 --- a/sys/riscv/riscv/identcpu.c +++ b/sys/riscv/riscv/identcpu.c @@ -203,10 +203,8 @@ parse_riscv_isa(char *isa, int len, u_long *hwcapp) switch(isa[i]) { case 'a': case 'c': -#ifdef FPE case 'd': case 'f': -#endif case 'i': case 'm': hwcap |= HWCAP_ISA_BIT(isa[i]); diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 0821a29d11c1..6b8dcb647162 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -92,10 +93,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FPE -#include -#endif - #ifdef FDT #include #include diff --git a/sys/riscv/riscv/swtch.S b/sys/riscv/riscv/swtch.S index d2e23784c994..5b878ae2fb30 100644 --- a/sys/riscv/riscv/swtch.S +++ b/sys/riscv/riscv/swtch.S @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); -#ifdef FPE .macro __fpe_state_save p /* * Enable FPE usage in supervisor mode, @@ -204,8 +203,7 @@ ENTRY(fpe_state_clear) ret END(fpe_state_clear) -#endif /* FPE */ - + /* * void cpu_throw(struct thread *old __unused, struct thread *new) */ @@ -240,7 +238,6 @@ ENTRY(cpu_throw) ld s10, (PCB_S + 10 * 8)(x13) ld s11, (PCB_S + 11 * 8)(x13) -#ifdef FPE /* Is FPE enabled for new thread? */ ld t0, TD_FRAME(a0) ld t1, (TF_SSTATUS)(t0) @@ -251,8 +248,6 @@ ENTRY(cpu_throw) /* Restore registers. */ __fpe_state_load x13 1: -#endif - ret END(cpu_throw) @@ -292,7 +287,6 @@ ENTRY(cpu_switch) sd s10, (PCB_S + 10 * 8)(x13) sd s11, (PCB_S + 11 * 8)(x13) -#ifdef FPE /* * Is FPE enabled and is it in dirty state * for the old thread? @@ -313,7 +307,6 @@ ENTRY(cpu_switch) __fpe_state_save x13 1: -#endif /* Activate the new thread's pmap */ mv s0, a0 @@ -355,7 +348,6 @@ ENTRY(cpu_switch) ld s10, (PCB_S + 10 * 8)(x13) ld s11, (PCB_S + 11 * 8)(x13) -#ifdef FPE /* Is FPE enabled for new thread? */ ld t0, TD_FRAME(a1) ld t1, (TF_SSTATUS)(t0) @@ -366,8 +358,6 @@ ENTRY(cpu_switch) /* Restore registers. */ __fpe_state_load x13 1: -#endif - ret END(cpu_switch) @@ -466,8 +456,6 @@ ENTRY(savectx) sd s10, (PCB_S + 10 * 8)(a0) sd s11, (PCB_S + 11 * 8)(a0) -#ifdef FPE __fpe_state_save a0 -#endif ret END(savectx) diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index 39e0fbb1d5bd..11ecfa702054 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -57,9 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FPE #include -#endif #include #include #include @@ -395,7 +393,6 @@ do_trap_user(struct trapframe *frame) ecall_handler(); break; case SCAUSE_ILLEGAL_INSTRUCTION: -#ifdef FPE if ((pcb->pcb_fpflags & PCB_FP_STARTED) == 0) { /* * May be a FPE trap. Enable FPE usage @@ -407,7 +404,6 @@ do_trap_user(struct trapframe *frame) pcb->pcb_fpflags |= PCB_FP_STARTED; break; } -#endif call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)frame->tf_sepc, exception); userret(td, frame); From nobody Tue May 2 18:46:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9pvt1wvMz49HTm; Tue, 2 May 2023 18:46: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 4Q9pvt1FkCz3yYj; Tue, 2 May 2023 18:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZNcBB8r6halXyRF4oVBC8qQMQgB8JOtc7eluHfnNt/Q=; b=P7WLpxqEpy2t2zIKYgUfb4Z/BhfczzmNnIWPUvf1+YTzPBcysOa/oG1o9cGk2nHTgVwMgS BMSXMcqv5zg+xkoUfnD2MP/ww6R3vu7ZQ1+USBzDznaYsPzP10z/KXGWPPo0xGp77c1iCO tn7YkV7WjjzkAY89QIQ6PESPYC4GMsTosJkZcYiTmgkrfW0sF1OR+2SILCbVEa64Bdfa9c yrIaz4o4D/W45z/8+VpCfJ2t8Kdv2vQQNDbuv+IR54fMKpEiJMow2SoRoZUu8TsJUqmQgf yQpA+jOYT9dFk/TDQK5PJnsWto6yPDnHA3HDUO5PhkTEF18iAPZJ7Rg9wgtO/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZNcBB8r6halXyRF4oVBC8qQMQgB8JOtc7eluHfnNt/Q=; b=UPBgUfitH/ytnOAh81ekqXAY7H8UH0Xy3vAYAYcKDCL0MPuR4O7G9vCF1/U6Kqe2bKdVWD 4YyWzxB+3Ta+u3Al87kOiKc4Gu4jG/IVb5z+TQ0kVnWKukT63IDF1jhn/t45z11DHwgFnt vezlalDfgYQ+6uXe+3hC0lnnqmmRULG0s6rVV3FUhvUgAcAOKDBo7ahWSP/TI58X5QzwYg tAbr8PKg5JqHqQD5ybyMvPt5GFeeOwzRrijxtIW8CMs57N4jmyn0oDH7+Z5Nm3T8kucjNY 4AwZqWFR/T2PWQilZV1WOylWyk8kHEejB2MXbobhC5ZTSflYsz7vTUkIWGN99g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683053210; a=rsa-sha256; cv=none; b=MV8OSMnbxE7up9RGNp5owsM2pyHkMfNh7b+JMiGxXWn9rAUxJ1IV1GaHXtLezgvw5V+aZQ mwCHCv7I9MOv4qrJJD8H8Gp9z6mrcUwUFCVqieiEXmCFR3QaG0zAAdDNSJaJS3yqLCl7ut AzezK9BtZHCdX161MmzXDsPcULz3STpbwH97fQZW3MZlTEZkwDnlx0oiEpTnUu9MM7TtVd jd99hnTTazhBvZIFZo5TbBEi+LKT0k7Eo24Q7esSK/DTR2SsPwBHP5oKqalYjqdMqpnvcI QW94zAbZVklutykP5VI1MbohzrJc46O+Ir7lA+tsrEPfoT5k4y7t++q92wzSnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9pvt0HzXzytb; Tue, 2 May 2023 18:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342IkntK009174; Tue, 2 May 2023 18:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342IknjH009173; Tue, 2 May 2023 18:46:49 GMT (envelope-from git) Date: Tue, 2 May 2023 18:46:49 GMT Message-Id: <202305021846.342IknjH009173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: f766d1d5a7c6 - main - IfAPI: Add if_maddr_empty() to check for any maddrs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f766d1d5a7c65d001c443e3fd21694645d58b8b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=f766d1d5a7c65d001c443e3fd21694645d58b8b2 commit f766d1d5a7c65d001c443e3fd21694645d58b8b2 Author: Justin Hibbits AuthorDate: 2023-04-10 18:20:00 +0000 Commit: Justin Hibbits CommitDate: 2023-05-02 18:34:47 +0000 IfAPI: Add if_maddr_empty() to check for any maddrs if_llmaddr_count() only counts link-level multicast addresses. hv_netvsc(4) needs to know if there are any multicast addresses. Since hv_netvsc(4) is the only instance where this would be used, make it a simple boolean. If others need a if_maddr_count(), that can be added in the future. Reviewed by: melifaro Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39493 --- sys/net/if.c | 7 +++++++ sys/net/if_var.h | 1 + 2 files changed, 8 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index b53a361c2ba3..af9758a39324 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4685,6 +4685,13 @@ if_llmaddr_count(if_t ifp) return (count); } +bool +if_maddr_empty(if_t ifp) +{ + + return (CK_STAILQ_EMPTY(&ifp->if_multiaddrs)); +} + u_int if_foreach_llmaddr(if_t ifp, iflladdr_cb_t cb, void *cb_arg) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 98d65be2ef81..f87472509863 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -657,6 +657,7 @@ u_int if_foreach_lladdr(if_t, iflladdr_cb_t, void *); u_int if_foreach_llmaddr(if_t, iflladdr_cb_t, void *); u_int if_lladdr_count(if_t); u_int if_llmaddr_count(if_t); +bool if_maddr_empty(if_t); int if_getamcount(const if_t ifp); struct ifaddr * if_getifaddr(const if_t ifp); From nobody Tue May 2 18:46:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9pvv1yq7z49Hbt; Tue, 2 May 2023 18:46: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 4Q9pvv1bgsz3ymK; Tue, 2 May 2023 18:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eItw+htrPBm9A/xF+X2Wxs9QITq5O/ldrBEeYH3Q9tE=; b=ioq4wmAUXDYImCIu1/aidZzpLdheyRMXKYRYB5gXGVi42n3HtnwBhj0xk5id6ZBmspm06m F7uaz91YlaZlJgZYPlmZbhogSPs/oMmGldLGkglzbPVnWLxhHkckhEn6XV1zIxV8XJIhTF 1R6So/q1xBf3NobDmClsHHEmio8aHli+H9RIMpGz9H1C7ggVpj8UygnSzFwE9JACFjm+in ZmYj31G3PTs14u8aPxPqqGCnmYcgqbxMPe1YF+2k9BcvfWmn9XUEnfChE7twpy9Q1fIFrm SGSPXCN04ltMtuj3fc8zI2MmbJ0XGKFgwTyT8mTPX3HSLLmFVJWpL6pWU4VK2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eItw+htrPBm9A/xF+X2Wxs9QITq5O/ldrBEeYH3Q9tE=; b=oEiBf2semITFqFH2igDD29SMGAWnmek7rQXzx1ylrTfSGitEvnvlUPozY9UO87kPfVCBmK iSyeqNZc8aojJjfcVaWjpLc2u15I4z4aH5FIjELQMPlsUnOI7/4Ys9cQWhopyyKoTX6D8c WPspNYOSLje/28c/Vk3vDXex7L+ywsiLgI2emyQPLslSAeRwwuVpvm6Sjvayjjh/w/XcYh /Btc1MpAh/YNoBwizKjZSeo52Bq3DKQPgyLfrQePc/3Pk+k0De5zm9VCy+u9iKazE/J/Pk 6JLOawGHHT9WThQdBD9uSQvTAXgj5Wf+bv98vyzRakCzTyHd26taXBpgntKO3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683053211; a=rsa-sha256; cv=none; b=Q0tjrePwWNkqKDwYd7gn8q+6h3RqjfiBvLJujW8rZ7JI1rx8r+Nbfku3j3wsgnZAFh4Rf2 zZ4S03AdVLCt9sHQ+w1qminCiJFQtbF+Nhff1VzVm2M2Qq+0y6yy9suNs6utvG8op65T4c nu5QJZBYYaOtT1HrsXw2la0WwCbU4V+on0JoWsnth+GTuBFsFduSwkMisVrf4T6BRcLNli jfsGHxo/XKOODSmz+dtvI84L4T8QD6Tr+9Ez99JOo6n4V9YheCyboYwHK64B0nr6MsoJ5P iPooXe8nDEaBIS5IEDw8JLopqET4RJAq2JKDEWmEMaanmDWxO6xAlb7M4pr61w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9pvv0gJ7zyr4; Tue, 2 May 2023 18:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Ikpw6009194; Tue, 2 May 2023 18:46:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342IkpjX009193; Tue, 2 May 2023 18:46:51 GMT (envelope-from git) Date: Tue, 2 May 2023 18:46:51 GMT Message-Id: <202305021846.342IkpjX009193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 4db5958a0691 - main - Mechanically convert if_hn(4) to IfAPI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4db5958a0691755dbf232801d2f58f4bec0aeeb5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=4db5958a0691755dbf232801d2f58f4bec0aeeb5 commit 4db5958a0691755dbf232801d2f58f4bec0aeeb5 Author: Justin Hibbits AuthorDate: 2022-09-26 14:34:28 +0000 Commit: Justin Hibbits CommitDate: 2023-05-02 18:34:47 +0000 Mechanically convert if_hn(4) to IfAPI Reviewed by: zlei Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37855 --- sys/dev/hyperv/netvsc/if_hn.c | 663 +++++++++++++++++++++------------------ sys/dev/hyperv/netvsc/if_hnvar.h | 10 +- 2 files changed, 355 insertions(+), 318 deletions(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index bd64d64963de..5d7002b8f65f 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -158,7 +158,7 @@ __FBSDID("$FreeBSD$"); #define HN_LRO_LENLIM_MULTIRX_DEF (12 * ETHERMTU) #define HN_LRO_LENLIM_DEF (25 * ETHERMTU) /* YYY 2*MTU is a bit rough, but should be good enough. */ -#define HN_LRO_LENLIM_MIN(ifp) (2 * (ifp)->if_mtu) +#define HN_LRO_LENLIM_MIN(ifp) (2 * if_getmtu(ifp)) #define HN_LRO_ACKCNT_DEF 1 @@ -247,7 +247,7 @@ struct hn_rxinfo { struct hn_rxvf_setarg { struct hn_rx_ring *rxr; - struct ifnet *vf_ifp; + if_t vf_ifp; }; #define HN_RXINFO_VLAN 0x0001 @@ -270,29 +270,29 @@ static void hn_chan_callback(struct vmbus_channel *, void *); static void hn_init(void *); -static int hn_ioctl(struct ifnet *, u_long, caddr_t); +static int hn_ioctl(if_t, u_long, caddr_t); #ifdef HN_IFSTART_SUPPORT -static void hn_start(struct ifnet *); +static void hn_start(if_t); #endif -static int hn_transmit(struct ifnet *, struct mbuf *); -static void hn_xmit_qflush(struct ifnet *); -static int hn_ifmedia_upd(struct ifnet *); -static void hn_ifmedia_sts(struct ifnet *, +static int hn_transmit(if_t, struct mbuf *); +static void hn_xmit_qflush(if_t); +static int hn_ifmedia_upd(if_t); +static void hn_ifmedia_sts(if_t, struct ifmediareq *); -static void hn_ifnet_event(void *, struct ifnet *, int); -static void hn_ifaddr_event(void *, struct ifnet *); -static void hn_ifnet_attevent(void *, struct ifnet *); -static void hn_ifnet_detevent(void *, struct ifnet *); -static void hn_ifnet_lnkevent(void *, struct ifnet *, int); +static void hn_ifnet_event(void *, if_t, int); +static void hn_ifaddr_event(void *, if_t); +static void hn_ifnet_attevent(void *, if_t); +static void hn_ifnet_detevent(void *, if_t); +static void hn_ifnet_lnkevent(void *, if_t, int); static bool hn_ismyvf(const struct hn_softc *, - const struct ifnet *); + const if_t); static void hn_rxvf_change(struct hn_softc *, - struct ifnet *, bool); -static void hn_rxvf_set(struct hn_softc *, struct ifnet *); + if_t, bool); +static void hn_rxvf_set(struct hn_softc *, if_t); static void hn_rxvf_set_task(void *, int); -static void hn_xpnt_vf_input(struct ifnet *, struct mbuf *); +static void hn_xpnt_vf_input(if_t, struct mbuf *); static int hn_xpnt_vf_iocsetflags(struct hn_softc *); static int hn_xpnt_vf_iocsetcaps(struct hn_softc *, struct ifreq *); @@ -416,9 +416,9 @@ static void hn_destroy_tx_data(struct hn_softc *); static void hn_txdesc_dmamap_destroy(struct hn_txdesc *); static void hn_txdesc_gc(struct hn_tx_ring *, struct hn_txdesc *); -static int hn_encap(struct ifnet *, struct hn_tx_ring *, +static int hn_encap(if_t, struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **); -static int hn_txpkt(struct ifnet *, struct hn_tx_ring *, +static int hn_txpkt(if_t, struct hn_tx_ring *, struct hn_txdesc *); static void hn_set_chim_size(struct hn_softc *, int); static void hn_set_tso_maxsize(struct hn_softc *, int, int); @@ -426,7 +426,7 @@ static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_tx_ring_qflush(struct hn_tx_ring *); static void hn_resume_tx(struct hn_softc *, int); static void hn_set_txagg(struct hn_softc *); -static void *hn_try_txagg(struct ifnet *, +static void *hn_try_txagg(if_t, struct hn_tx_ring *, struct hn_txdesc *, int); static int hn_get_txswq_depth(const struct hn_tx_ring *); @@ -617,7 +617,7 @@ static struct taskqueue **hn_tx_taskque;/* shared TX taskqueues */ static struct rmlock hn_vfmap_lock; static int hn_vfmap_size; -static struct ifnet **hn_vfmap; +static if_t *hn_vfmap; #ifndef RSS static const uint8_t @@ -923,7 +923,7 @@ hn_set_rxfilter(struct hn_softc *sc, uint32_t filter) static int hn_rxfilter_config(struct hn_softc *sc) { - struct ifnet *ifp = sc->hn_ifp; + if_t ifp = sc->hn_ifp; uint32_t filter; HN_LOCK_ASSERT(sc); @@ -933,15 +933,15 @@ hn_rxfilter_config(struct hn_softc *sc) * its RX filter is configured, so stick the synthetic device in * the promiscous mode. */ - if ((ifp->if_flags & IFF_PROMISC) || (sc->hn_flags & HN_FLAG_RXVF)) { + if ((if_getflags(ifp) & IFF_PROMISC) || (sc->hn_flags & HN_FLAG_RXVF)) { filter = NDIS_PACKET_TYPE_PROMISCUOUS; } else { filter = NDIS_PACKET_TYPE_DIRECTED; - if (ifp->if_flags & IFF_BROADCAST) + if (if_getflags(ifp) & IFF_BROADCAST) filter |= NDIS_PACKET_TYPE_BROADCAST; /* TODO: support multicast list */ - if ((ifp->if_flags & IFF_ALLMULTI) || - !CK_STAILQ_EMPTY(&ifp->if_multiaddrs)) + if ((if_getflags(ifp) & IFF_ALLMULTI) || + !if_maddr_empty(ifp)) filter |= NDIS_PACKET_TYPE_ALL_MULTICAST; } return (hn_set_rxfilter(sc, filter)); @@ -1098,16 +1098,16 @@ hn_rss_ind_fixup(struct hn_softc *sc) } static int -hn_ifmedia_upd(struct ifnet *ifp __unused) +hn_ifmedia_upd(if_t ifp __unused) { return EOPNOTSUPP; } static void -hn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +hn_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) { - struct hn_softc *sc = ifp->if_softc; + struct hn_softc *sc = if_getsoftc(ifp); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -1129,7 +1129,7 @@ hn_rxvf_set_task(void *xarg, int pending __unused) } static void -hn_rxvf_set(struct hn_softc *sc, struct ifnet *vf_ifp) +hn_rxvf_set(struct hn_softc *sc, if_t vf_ifp) { struct hn_rx_ring *rxr; struct hn_rxvf_setarg arg; @@ -1154,40 +1154,40 @@ hn_rxvf_set(struct hn_softc *sc, struct ifnet *vf_ifp) } static bool -hn_ismyvf(const struct hn_softc *sc, const struct ifnet *ifp) +hn_ismyvf(const struct hn_softc *sc, const if_t ifp) { - const struct ifnet *hn_ifp; + if_t hn_ifp; hn_ifp = sc->hn_ifp; if (ifp == hn_ifp) return (false); - if (ifp->if_alloctype != IFT_ETHER) + if (if_getalloctype(ifp) != IFT_ETHER) return (false); /* Ignore lagg/vlan interfaces */ - if (strcmp(ifp->if_dname, "lagg") == 0 || - strcmp(ifp->if_dname, "vlan") == 0) + if (strcmp(if_getdname(ifp), "lagg") == 0 || + strcmp(if_getdname(ifp), "vlan") == 0) return (false); /* - * During detach events ifp->if_addr might be NULL. + * During detach events if_getifaddr(ifp) might be NULL. * Make sure the bcmp() below doesn't panic on that: */ - if (ifp->if_addr == NULL || hn_ifp->if_addr == NULL) + if (if_getifaddr(ifp) == NULL || if_getifaddr(hn_ifp) == NULL) return (false); - if (bcmp(IF_LLADDR(ifp), IF_LLADDR(hn_ifp), ETHER_ADDR_LEN) != 0) + if (bcmp(if_getlladdr(ifp), if_getlladdr(hn_ifp), ETHER_ADDR_LEN) != 0) return (false); return (true); } static void -hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, bool rxvf) +hn_rxvf_change(struct hn_softc *sc, if_t ifp, bool rxvf) { - struct ifnet *hn_ifp; + if_t hn_ifp; HN_LOCK(sc); @@ -1209,7 +1209,7 @@ hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, bool rxvf) goto out; sc->hn_flags &= ~HN_FLAG_RXVF; - if (hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + if (if_getdrvflags(hn_ifp) & IFF_DRV_RUNNING) hn_rxfilter_config(sc); else hn_set_rxfilter(sc, NDIS_PACKET_TYPE_NONE); @@ -1231,19 +1231,19 @@ hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, bool rxvf) hn_resume_mgmt(sc); } - devctl_notify("HYPERV_NIC_VF", hn_ifp->if_xname, + devctl_notify("HYPERV_NIC_VF", if_name(hn_ifp), rxvf ? "VF_UP" : "VF_DOWN", NULL); if (bootverbose) { if_printf(hn_ifp, "datapath is switched %s %s\n", - rxvf ? "to" : "from", ifp->if_xname); + rxvf ? "to" : "from", if_name(ifp)); } out: HN_UNLOCK(sc); } static void -hn_ifnet_event(void *arg, struct ifnet *ifp, int event) +hn_ifnet_event(void *arg, if_t ifp, int event) { if (event != IFNET_EVENT_UP && event != IFNET_EVENT_DOWN) @@ -1252,16 +1252,16 @@ hn_ifnet_event(void *arg, struct ifnet *ifp, int event) } static void -hn_ifaddr_event(void *arg, struct ifnet *ifp) +hn_ifaddr_event(void *arg, if_t ifp) { - hn_rxvf_change(arg, ifp, ifp->if_flags & IFF_UP); + hn_rxvf_change(arg, ifp, if_getflags(ifp) & IFF_UP); } static int hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) { - struct ifnet *ifp, *vf_ifp; + if_t ifp, vf_ifp; uint64_t tmp; int error; @@ -1273,9 +1273,9 @@ hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) * Fix up requested capabilities w/ supported capabilities, * since the supported capabilities could have been changed. */ - ifr->ifr_reqcap &= ifp->if_capabilities; + ifr->ifr_reqcap &= if_getcapabilities(ifp); /* Pass SIOCSIFCAP to VF. */ - error = vf_ifp->if_ioctl(vf_ifp, SIOCSIFCAP, (caddr_t)ifr); + error = ifhwioctl(SIOCSIFCAP, vf_ifp, (caddr_t)ifr, curthread); /* * NOTE: @@ -1286,31 +1286,31 @@ hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) /* * Merge VF's enabled capabilities. */ - ifp->if_capenable = vf_ifp->if_capenable & ifp->if_capabilities; + if_setcapenable(ifp, if_getcapenable(vf_ifp) & if_getcapabilities(ifp)); - tmp = vf_ifp->if_hwassist & HN_CSUM_IP_HWASSIST(sc); - if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & HN_CSUM_IP_HWASSIST(sc); + if (if_getcapenable(ifp) & IFCAP_TXCSUM) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); - tmp = vf_ifp->if_hwassist & HN_CSUM_IP6_HWASSIST(sc); - if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & HN_CSUM_IP6_HWASSIST(sc); + if (if_getcapenable(ifp) & IFCAP_TXCSUM_IPV6) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); - tmp = vf_ifp->if_hwassist & CSUM_IP_TSO; - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & CSUM_IP_TSO; + if (if_getcapenable(ifp) & IFCAP_TSO4) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); - tmp = vf_ifp->if_hwassist & CSUM_IP6_TSO; - if (ifp->if_capenable & IFCAP_TSO6) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & CSUM_IP6_TSO; + if (if_getcapenable(ifp) & IFCAP_TSO6) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); return (error); } @@ -1318,48 +1318,48 @@ hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) static int hn_xpnt_vf_iocsetflags(struct hn_softc *sc) { - struct ifnet *vf_ifp; + if_t vf_ifp; struct ifreq ifr; HN_LOCK_ASSERT(sc); vf_ifp = sc->hn_vf_ifp; memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, vf_ifp->if_xname, sizeof(ifr.ifr_name)); - ifr.ifr_flags = vf_ifp->if_flags & 0xffff; - ifr.ifr_flagshigh = vf_ifp->if_flags >> 16; - return (vf_ifp->if_ioctl(vf_ifp, SIOCSIFFLAGS, (caddr_t)&ifr)); + strlcpy(ifr.ifr_name, if_name(vf_ifp), sizeof(ifr.ifr_name)); + ifr.ifr_flags = if_getflags(vf_ifp) & 0xffff; + ifr.ifr_flagshigh = if_getflags(vf_ifp) >> 16; + return (ifhwioctl(SIOCSIFFLAGS, vf_ifp, (caddr_t)&ifr, curthread)); } static void hn_xpnt_vf_saveifflags(struct hn_softc *sc) { - struct ifnet *ifp = sc->hn_ifp; + if_t ifp = sc->hn_ifp; int allmulti = 0; HN_LOCK_ASSERT(sc); /* XXX vlan(4) style mcast addr maintenance */ - if (!CK_STAILQ_EMPTY(&ifp->if_multiaddrs)) + if (!if_maddr_empty(ifp)) allmulti = IFF_ALLMULTI; /* Always set the VF's if_flags */ - sc->hn_vf_ifp->if_flags = ifp->if_flags | allmulti; + if_setflags(sc->hn_vf_ifp, if_getflags(ifp) | allmulti); } static void -hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) +hn_xpnt_vf_input(if_t vf_ifp, struct mbuf *m) { struct rm_priotracker pt; - struct ifnet *hn_ifp = NULL; + if_t hn_ifp = NULL; struct mbuf *mn; /* * XXX racy, if hn(4) ever detached. */ rm_rlock(&hn_vfmap_lock, &pt); - if (vf_ifp->if_index < hn_vfmap_size) - hn_ifp = hn_vfmap[vf_ifp->if_index]; + if (if_getindex(vf_ifp) < hn_vfmap_size) + hn_ifp = hn_vfmap[if_getindex(vf_ifp)]; rm_runlock(&hn_vfmap_lock, &pt); if (hn_ifp != NULL) { @@ -1372,7 +1372,7 @@ hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) /* * Update VF stats. */ - if ((vf_ifp->if_capenable & IFCAP_HWSTATS) == 0) { + if ((if_getcapenable(vf_ifp) & IFCAP_HWSTATS) == 0) { if_inc_counter(vf_ifp, IFCOUNTER_IBYTES, mn->m_pkthdr.len); } @@ -1394,7 +1394,7 @@ hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) /* * Go through hn(4)'s if_input. */ - hn_ifp->if_input(hn_ifp, m); + if_input(hn_ifp, m); } else { /* * In the middle of the transition; free this @@ -1412,12 +1412,12 @@ hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) static void hn_mtu_change_fixup(struct hn_softc *sc) { - struct ifnet *ifp; + if_t ifp; HN_LOCK_ASSERT(sc); ifp = sc->hn_ifp; - hn_set_tso_maxsize(sc, hn_tso_maxlen, ifp->if_mtu); + hn_set_tso_maxsize(sc, hn_tso_maxlen, if_getmtu(ifp)); if (sc->hn_rx_ring[0].hn_lro.lro_length_lim < HN_LRO_LENLIM_MIN(ifp)) hn_set_lro_lenlim(sc, HN_LRO_LENLIM_MIN(ifp)); } @@ -1483,7 +1483,7 @@ hn_rss_mbuf_hash(struct hn_softc *sc, uint32_t mbuf_hash) static void hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) { - struct ifnet *ifp, *vf_ifp; + if_t ifp, vf_ifp; struct ifrsshash ifrh; struct ifrsskey ifrk; int error; @@ -1491,7 +1491,7 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) HN_LOCK_ASSERT(sc); KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, - ("%s: synthetic parts are not attached", sc->hn_ifp->if_xname)); + ("%s: synthetic parts are not attached", if_name(sc->hn_ifp))); if (sc->hn_rx_ring_inuse == 1) { /* No RSS on synthetic parts; done. */ @@ -1510,21 +1510,21 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) * supported. */ memset(&ifrk, 0, sizeof(ifrk)); - strlcpy(ifrk.ifrk_name, vf_ifp->if_xname, sizeof(ifrk.ifrk_name)); - error = vf_ifp->if_ioctl(vf_ifp, SIOCGIFRSSKEY, (caddr_t)&ifrk); + strlcpy(ifrk.ifrk_name, if_name(vf_ifp), sizeof(ifrk.ifrk_name)); + error = ifhwioctl(SIOCGIFRSSKEY, vf_ifp, (caddr_t)&ifrk, curthread); if (error) { if_printf(ifp, "%s SIOCGIFRSSKEY failed: %d\n", - vf_ifp->if_xname, error); + if_name(vf_ifp), error); goto done; } if (ifrk.ifrk_func != RSS_FUNC_TOEPLITZ) { if_printf(ifp, "%s RSS function %u is not Toeplitz\n", - vf_ifp->if_xname, ifrk.ifrk_func); + if_name(vf_ifp), ifrk.ifrk_func); goto done; } if (ifrk.ifrk_keylen != NDIS_HASH_KEYSIZE_TOEPLITZ) { if_printf(ifp, "%s invalid RSS Toeplitz key length %d\n", - vf_ifp->if_xname, ifrk.ifrk_keylen); + if_name(vf_ifp), ifrk.ifrk_keylen); goto done; } @@ -1532,16 +1532,16 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) * Extract VF's RSS hash. Only Toeplitz is supported. */ memset(&ifrh, 0, sizeof(ifrh)); - strlcpy(ifrh.ifrh_name, vf_ifp->if_xname, sizeof(ifrh.ifrh_name)); - error = vf_ifp->if_ioctl(vf_ifp, SIOCGIFRSSHASH, (caddr_t)&ifrh); + strlcpy(ifrh.ifrh_name, if_name(vf_ifp), sizeof(ifrh.ifrh_name)); + error = ifhwioctl(SIOCGIFRSSHASH, vf_ifp, (caddr_t)&ifrh, curthread); if (error) { if_printf(ifp, "%s SIOCGRSSHASH failed: %d\n", - vf_ifp->if_xname, error); + if_name(vf_ifp), error); goto done; } if (ifrh.ifrh_func != RSS_FUNC_TOEPLITZ) { if_printf(ifp, "%s RSS function %u is not Toeplitz\n", - vf_ifp->if_xname, ifrh.ifrh_func); + if_name(vf_ifp), ifrh.ifrh_func); goto done; } @@ -1549,7 +1549,7 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) if ((ifrh.ifrh_types & my_types) == 0) { /* This disables RSS; ignore it then */ if_printf(ifp, "%s intersection of RSS types failed. " - "VF %#x, mine %#x\n", vf_ifp->if_xname, + "VF %#x, mine %#x\n", if_name(vf_ifp), ifrh.ifrh_types, my_types); goto done; } @@ -1650,7 +1650,7 @@ hn_vf_rss_restore(struct hn_softc *sc) HN_LOCK_ASSERT(sc); KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, - ("%s: synthetic parts are not attached", sc->hn_ifp->if_xname)); + ("%s: synthetic parts are not attached", if_name(sc->hn_ifp))); if (sc->hn_rx_ring_inuse == 1) goto done; @@ -1677,7 +1677,7 @@ done: static void hn_xpnt_vf_setready(struct hn_softc *sc) { - struct ifnet *ifp, *vf_ifp; + if_t ifp, vf_ifp; struct ifreq ifr; HN_LOCK_ASSERT(sc); @@ -1692,10 +1692,10 @@ hn_xpnt_vf_setready(struct hn_softc *sc) /* * Save information for restoration. */ - sc->hn_saved_caps = ifp->if_capabilities; - sc->hn_saved_tsomax = ifp->if_hw_tsomax; - sc->hn_saved_tsosegcnt = ifp->if_hw_tsomaxsegcount; - sc->hn_saved_tsosegsz = ifp->if_hw_tsomaxsegsize; + sc->hn_saved_caps = if_getcapabilities(ifp); + sc->hn_saved_tsomax = if_gethwtsomax(ifp); + sc->hn_saved_tsosegcnt = if_gethwtsomaxsegcount(ifp); + sc->hn_saved_tsosegsz = if_gethwtsomaxsegsize(ifp); /* * Intersect supported/enabled capabilities. @@ -1703,41 +1703,41 @@ hn_xpnt_vf_setready(struct hn_softc *sc) * NOTE: * if_hwassist is not changed here. */ - ifp->if_capabilities &= vf_ifp->if_capabilities; - ifp->if_capenable &= ifp->if_capabilities; + if_setcapabilitiesbit(ifp, 0, if_getcapabilities(vf_ifp)); + if_setcapenablebit(ifp, 0, if_getcapabilities(ifp)); /* * Fix TSO settings. */ - if (ifp->if_hw_tsomax > vf_ifp->if_hw_tsomax) - ifp->if_hw_tsomax = vf_ifp->if_hw_tsomax; - if (ifp->if_hw_tsomaxsegcount > vf_ifp->if_hw_tsomaxsegcount) - ifp->if_hw_tsomaxsegcount = vf_ifp->if_hw_tsomaxsegcount; - if (ifp->if_hw_tsomaxsegsize > vf_ifp->if_hw_tsomaxsegsize) - ifp->if_hw_tsomaxsegsize = vf_ifp->if_hw_tsomaxsegsize; + if (if_gethwtsomax(ifp) > if_gethwtsomax(vf_ifp)) + if_sethwtsomax(ifp, if_gethwtsomax(vf_ifp)); + if (if_gethwtsomaxsegcount(ifp) > if_gethwtsomaxsegcount(vf_ifp)) + if_sethwtsomaxsegcount(ifp, if_gethwtsomaxsegcount(vf_ifp)); + if (if_gethwtsomaxsegsize(ifp) > if_gethwtsomaxsegsize(vf_ifp)) + if_sethwtsomaxsegsize(ifp, if_gethwtsomaxsegsize(vf_ifp)); /* * Change VF's enabled capabilities. */ memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, vf_ifp->if_xname, sizeof(ifr.ifr_name)); - ifr.ifr_reqcap = ifp->if_capenable; + strlcpy(ifr.ifr_name, if_name(vf_ifp), sizeof(ifr.ifr_name)); + ifr.ifr_reqcap = if_getcapenable(ifp); hn_xpnt_vf_iocsetcaps(sc, &ifr); - if (ifp->if_mtu != ETHERMTU) { + if (if_getmtu(ifp) != ETHERMTU) { int error; /* * Change VF's MTU. */ memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, vf_ifp->if_xname, sizeof(ifr.ifr_name)); - ifr.ifr_mtu = ifp->if_mtu; - error = vf_ifp->if_ioctl(vf_ifp, SIOCSIFMTU, (caddr_t)&ifr); + strlcpy(ifr.ifr_name, if_name(vf_ifp), sizeof(ifr.ifr_name)); + ifr.ifr_mtu = if_getmtu(ifp); + error = ifhwioctl(SIOCSIFMTU, vf_ifp, (caddr_t)&ifr, curthread); if (error) { if_printf(ifp, "%s SIOCSIFMTU %u failed\n", - vf_ifp->if_xname, ifp->if_mtu); - if (ifp->if_mtu > ETHERMTU) { + if_name(vf_ifp), if_getmtu(ifp)); + if (if_getmtu(ifp) > ETHERMTU) { if_printf(ifp, "change MTU to %d\n", ETHERMTU); /* @@ -1746,7 +1746,7 @@ hn_xpnt_vf_setready(struct hn_softc *sc) * failure of the adjustment will cause us * infinite headache. */ - ifp->if_mtu = ETHERMTU; + if_setmtu(ifp, ETHERMTU); hn_mtu_change_fixup(sc); } } @@ -1815,22 +1815,22 @@ hn_xpnt_vf_init(struct hn_softc *sc) HN_LOCK_ASSERT(sc); KASSERT((sc->hn_xvf_flags & HN_XVFFLAG_ENABLED) == 0, - ("%s: transparent VF was enabled", sc->hn_ifp->if_xname)); + ("%s: transparent VF was enabled", if_name(sc->hn_ifp))); if (bootverbose) { if_printf(sc->hn_ifp, "try bringing up %s\n", - sc->hn_vf_ifp->if_xname); + if_name(sc->hn_vf_ifp)); } /* * Bring the VF up. */ hn_xpnt_vf_saveifflags(sc); - sc->hn_vf_ifp->if_flags |= IFF_UP; + if_setflagbits(sc->hn_ifp, IFF_UP, 0); error = hn_xpnt_vf_iocsetflags(sc); if (error) { if_printf(sc->hn_ifp, "bringing up %s failed: %d\n", - sc->hn_vf_ifp->if_xname, error); + if_name(sc->hn_vf_ifp), error); return; } @@ -1870,13 +1870,13 @@ hn_xpnt_vf_init_taskfunc(void *xsc, int pending __unused) hn_xpnt_vf_setready(sc); } - if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (if_getdrvflags(sc->hn_ifp) & IFF_DRV_RUNNING) { /* * Delayed VF initialization. */ if (bootverbose) { if_printf(sc->hn_ifp, "delayed initialize %s\n", - sc->hn_vf_ifp->if_xname); + if_name(sc->hn_vf_ifp)); } hn_xpnt_vf_init(sc); } @@ -1885,7 +1885,7 @@ done: } static void -hn_ifnet_attevent(void *xsc, struct ifnet *ifp) +hn_ifnet_attevent(void *xsc, if_t ifp) { struct hn_softc *sc = xsc; @@ -1899,47 +1899,48 @@ hn_ifnet_attevent(void *xsc, struct ifnet *ifp) if (sc->hn_vf_ifp != NULL) { if_printf(sc->hn_ifp, "%s was attached as VF\n", - sc->hn_vf_ifp->if_xname); + if_name(sc->hn_vf_ifp)); goto done; } - if (hn_xpnt_vf && ifp->if_start != NULL) { + if (hn_xpnt_vf && if_getstartfn(ifp) != NULL) { /* * ifnet.if_start is _not_ supported by transparent * mode VF; mainly due to the IFF_DRV_OACTIVE flag. */ if_printf(sc->hn_ifp, "%s uses if_start, which is unsupported " - "in transparent VF mode.\n", ifp->if_xname); + "in transparent VF mode.\n", if_name(sc->hn_vf_ifp)); + goto done; } rm_wlock(&hn_vfmap_lock); - if (ifp->if_index >= hn_vfmap_size) { - struct ifnet **newmap; + if (if_getindex(ifp) >= hn_vfmap_size) { + if_t *newmap; int newsize; - newsize = ifp->if_index + HN_VFMAP_SIZE_DEF; - newmap = malloc(sizeof(struct ifnet *) * newsize, M_DEVBUF, + newsize = if_getindex(ifp) + HN_VFMAP_SIZE_DEF; + newmap = malloc(sizeof(if_t) * newsize, M_DEVBUF, M_WAITOK | M_ZERO); memcpy(newmap, hn_vfmap, - sizeof(struct ifnet *) * hn_vfmap_size); + sizeof(if_t) * hn_vfmap_size); free(hn_vfmap, M_DEVBUF); hn_vfmap = newmap; hn_vfmap_size = newsize; } - KASSERT(hn_vfmap[ifp->if_index] == NULL, + KASSERT(hn_vfmap[if_getindex(ifp)] == NULL, ("%s: ifindex %d was mapped to %s", - ifp->if_xname, ifp->if_index, hn_vfmap[ifp->if_index]->if_xname)); - hn_vfmap[ifp->if_index] = sc->hn_ifp; + if_name(ifp), if_getindex(ifp), if_name(hn_vfmap[if_getindex(ifp)]))); + hn_vfmap[if_getindex(ifp)] = sc->hn_ifp; rm_wunlock(&hn_vfmap_lock); /* NOTE: hn_vf_lock for hn_transmit()/hn_qflush() */ rm_wlock(&sc->hn_vf_lock); KASSERT((sc->hn_xvf_flags & HN_XVFFLAG_ENABLED) == 0, - ("%s: transparent VF was enabled", sc->hn_ifp->if_xname)); + ("%s: transparent VF was enabled", if_name(sc->hn_ifp))); sc->hn_vf_ifp = ifp; rm_wunlock(&sc->hn_vf_lock); @@ -1950,8 +1951,8 @@ hn_ifnet_attevent(void *xsc, struct ifnet *ifp) * Install if_input for vf_ifp, which does vf_ifp -> hn_ifp. * Save vf_ifp's current if_input for later restoration. */ - sc->hn_vf_input = ifp->if_input; - ifp->if_input = hn_xpnt_vf_input; + sc->hn_vf_input = if_getinputfn(ifp); + if_setinputfn(ifp, hn_xpnt_vf_input); /* * Stop link status management; use the VF's. @@ -1972,7 +1973,7 @@ done: } static void -hn_ifnet_detevent(void *xsc, struct ifnet *ifp) +hn_ifnet_detevent(void *xsc, if_t ifp) { struct hn_softc *sc = xsc; @@ -2001,8 +2002,8 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) HN_LOCK(sc); KASSERT(sc->hn_vf_input != NULL, ("%s VF input is not saved", - sc->hn_ifp->if_xname)); - ifp->if_input = sc->hn_vf_input; + if_name(sc->hn_ifp))); + if_setinputfn(ifp, sc->hn_vf_input); sc->hn_vf_input = NULL; if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) && @@ -2013,7 +2014,7 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) /* * The VF was ready; restore some settings. */ - sc->hn_ifp->if_capabilities = sc->hn_saved_caps; + if_setcapabilities(ifp, sc->hn_saved_caps); /* * NOTE: * There is _no_ need to fixup if_capenable and @@ -2022,10 +2023,10 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) * if_capabilites and the synthetic device's * if_capabilites. */ - sc->hn_ifp->if_hw_tsomax = sc->hn_saved_tsomax; - sc->hn_ifp->if_hw_tsomaxsegcount = - sc->hn_saved_tsosegcnt; - sc->hn_ifp->if_hw_tsomaxsegsize = sc->hn_saved_tsosegsz; + if_sethwtsomax(ifp, sc->hn_saved_tsomax); + if_sethwtsomaxsegcount(sc->hn_ifp, + sc->hn_saved_tsosegcnt); + if_sethwtsomaxsegsize(ifp, sc->hn_saved_tsosegsz); } if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { @@ -2047,14 +2048,14 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) rm_wlock(&hn_vfmap_lock); - KASSERT(ifp->if_index < hn_vfmap_size, - ("ifindex %d, vfmapsize %d", ifp->if_index, hn_vfmap_size)); - if (hn_vfmap[ifp->if_index] != NULL) { - KASSERT(hn_vfmap[ifp->if_index] == sc->hn_ifp, + KASSERT(if_getindex(ifp) < hn_vfmap_size, + ("ifindex %d, vfmapsize %d", if_getindex(ifp), hn_vfmap_size)); + if (hn_vfmap[if_getindex(ifp)] != NULL) { + KASSERT(hn_vfmap[if_getindex(ifp)] == sc->hn_ifp, ("%s: ifindex %d was mapped to %s", - ifp->if_xname, ifp->if_index, - hn_vfmap[ifp->if_index]->if_xname)); - hn_vfmap[ifp->if_index] = NULL; + if_name(ifp), if_getindex(ifp), + if_name(hn_vfmap[if_getindex(ifp)]))); + hn_vfmap[if_getindex(ifp)] = NULL; } rm_wunlock(&hn_vfmap_lock); @@ -2063,7 +2064,7 @@ done: } static void -hn_ifnet_lnkevent(void *xsc, struct ifnet *ifp, int link_state) +hn_ifnet_lnkevent(void *xsc, if_t ifp, int link_state) { struct hn_softc *sc = xsc; @@ -2071,6 +2072,42 @@ hn_ifnet_lnkevent(void *xsc, struct ifnet *ifp, int link_state) if_link_state_change(sc->hn_ifp, link_state); } +static int +hn_tsomax_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + unsigned int tsomax; + int error; + + tsomax = if_gethwtsomax(sc->hn_ifp); + error = sysctl_handle_int(oidp, &tsomax, 0, req); + return error; +} + +static int +hn_tsomaxsegcnt_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + unsigned int tsomaxsegcnt; + int error; + + tsomaxsegcnt = if_gethwtsomaxsegcount(sc->hn_ifp); + error = sysctl_handle_int(oidp, &tsomaxsegcnt, 0, req); + return error; +} + +static int +hn_tsomaxsegsz_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + unsigned int tsomaxsegsz; + int error; + + tsomaxsegsz = if_gethwtsomaxsegsize(sc->hn_ifp); + error = sysctl_handle_int(oidp, &tsomaxsegsz, 0, req); + return error; +} + static int hn_probe(device_t dev) { @@ -2089,7 +2126,7 @@ hn_attach(device_t dev) struct sysctl_oid_list *child; struct sysctl_ctx_list *ctx; uint8_t eaddr[ETHER_ADDR_LEN]; - struct ifnet *ifp = NULL; + if_t ifp = NULL; int error, ring_cnt, tx_ring_cnt; uint32_t mtu; @@ -2156,7 +2193,7 @@ hn_attach(device_t dev) * ether_ifattach(). */ ifp = sc->hn_ifp = if_alloc(IFT_ETHER); - ifp->if_softc = sc; + if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); /* @@ -2281,14 +2318,15 @@ hn_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "hwassist", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_hwassist_sysctl, "A", "hwassist"); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tso_max", - CTLFLAG_RD, &ifp->if_hw_tsomax, 0, "max TSO size"); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tso_maxsegcnt", - CTLFLAG_RD, &ifp->if_hw_tsomaxsegcount, 0, - "max # of TSO segments"); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tso_maxsegsz", - CTLFLAG_RD, &ifp->if_hw_tsomaxsegsize, 0, - "max size of TSO segment"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tso_max", + CTLTYPE_UINT | CTLFLAG_RD, sc, 0, hn_tsomax_sysctl, + "IU", "max TSO size"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tso_maxsegcnt", + CTLTYPE_UINT | CTLFLAG_RD, sc, 0, hn_tsomaxsegcnt_sysctl, + "IU", "max # of TSO segments"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tso_maxsegsz", + CTLTYPE_UINT | CTLFLAG_RD, sc, 0, hn_tsomaxsegsz_sysctl, + "IU", "max size of TSO segment"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rxfilter", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_rxfilter_sysctl, "A", "rxfilter"); @@ -2370,60 +2408,59 @@ hn_attach(device_t dev) * Setup the ifnet for this interface. */ - ifp->if_baudrate = IF_Gbps(10); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_ioctl = hn_ioctl; - ifp->if_init = hn_init; + if_setbaudrate(ifp, IF_Gbps(10)); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); + if_setioctlfn(ifp, hn_ioctl); + if_setinitfn(ifp, hn_init); #ifdef HN_IFSTART_SUPPORT if (hn_use_if_start) { int qdepth = hn_get_txswq_depth(&sc->hn_tx_ring[0]); - ifp->if_start = hn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, qdepth); - ifp->if_snd.ifq_drv_maxlen = qdepth - 1; - IFQ_SET_READY(&ifp->if_snd); + if_setstartfn(ifp, hn_start); + if_setsendqlen(ifp, qdepth); + if_setsendqready(ifp); } else #endif { - ifp->if_transmit = hn_transmit; - ifp->if_qflush = hn_xmit_qflush; + if_settransmitfn(ifp, hn_transmit); + if_setqflushfn(ifp, hn_xmit_qflush); } - ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_LRO | IFCAP_LINKSTATE; + if_setcapabilitiesbit(ifp, IFCAP_RXCSUM | IFCAP_LRO | IFCAP_LINKSTATE, 0); #ifdef foo /* We can't diff IPv6 packets from IPv4 packets on RX path. */ - ifp->if_capabilities |= IFCAP_RXCSUM_IPV6; + if_setcapabilitiesbit(ifp, IFCAP_RXCSUM_IPV6, 0); #endif if (sc->hn_caps & HN_CAP_VLAN) { /* XXX not sure about VLAN_MTU. */ - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU, 0); } - ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist; - if (ifp->if_hwassist & HN_CSUM_IP_MASK) - ifp->if_capabilities |= IFCAP_TXCSUM; - if (ifp->if_hwassist & HN_CSUM_IP6_MASK) - ifp->if_capabilities |= IFCAP_TXCSUM_IPV6; + if_sethwassist(ifp, sc->hn_tx_ring[0].hn_csum_assist); + if (if_gethwassist(ifp) & HN_CSUM_IP_MASK) + if_setcapabilitiesbit(ifp, IFCAP_TXCSUM, 0); + if (if_gethwassist(ifp) & HN_CSUM_IP6_MASK) + if_setcapabilitiesbit(ifp, IFCAP_TXCSUM_IPV6, 0); if (sc->hn_caps & HN_CAP_TSO4) { - ifp->if_capabilities |= IFCAP_TSO4; - ifp->if_hwassist |= CSUM_IP_TSO; + if_setcapabilitiesbit(ifp, IFCAP_TSO4, 0); + if_sethwassistbits(ifp, CSUM_IP_TSO, 0); } if (sc->hn_caps & HN_CAP_TSO6) { - ifp->if_capabilities |= IFCAP_TSO6; - ifp->if_hwassist |= CSUM_IP6_TSO; + if_setcapabilitiesbit(ifp, IFCAP_TSO6, 0); + if_sethwassistbits(ifp, CSUM_IP6_TSO, 0); } /* Enable all available capabilities by default. */ - ifp->if_capenable = ifp->if_capabilities; + if_setcapenable(ifp, if_getcapabilities(ifp)); /* * Disable IPv6 TSO and TXCSUM by default, they still can * be enabled through SIOCSIFCAP. */ - ifp->if_capenable &= ~(IFCAP_TXCSUM_IPV6 | IFCAP_TSO6); - ifp->if_hwassist &= ~(HN_CSUM_IP6_MASK | CSUM_IP6_TSO); + if_setcapenablebit(ifp, 0, (IFCAP_TXCSUM_IPV6 | IFCAP_TSO6)); + if_sethwassistbits(ifp, 0, (HN_CSUM_IP6_MASK | CSUM_IP6_TSO)); - if (ifp->if_capabilities & (IFCAP_TSO6 | IFCAP_TSO4)) { + if (if_getcapabilities(ifp) & (IFCAP_TSO6 | IFCAP_TSO4)) { /* * Lock hn_set_tso_maxsize() to simplify its * internal logic. @@ -2431,23 +2468,23 @@ hn_attach(device_t dev) HN_LOCK(sc); hn_set_tso_maxsize(sc, hn_tso_maxlen, ETHERMTU); HN_UNLOCK(sc); - ifp->if_hw_tsomaxsegcount = HN_TX_DATA_SEGCNT_MAX; - ifp->if_hw_tsomaxsegsize = PAGE_SIZE; + if_sethwtsomaxsegcount(ifp, HN_TX_DATA_SEGCNT_MAX); + if_sethwtsomaxsegsize(ifp, PAGE_SIZE); } *** 816 LINES SKIPPED *** From nobody Tue May 2 18:46:52 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9pvw3Fmrz49HYR; Tue, 2 May 2023 18:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9pvw2hLnz401W; Tue, 2 May 2023 18:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NIp2k+MN+GrEOCseRXyVsNzj7b0Wm9kgW59CMOCQv2U=; b=Ddaa7nXy5zcCkjjPy8Jm3z9nFy4CCV2Bfl2Jak+6q+D3pmepWrZ8pkF2uXWJPCZKNrn/BO 4i0i2REasjbYCeKvl41JHE/td562KI/Da62AdiHvMAaRnVyA5T43aCSRO4w1GHXTtTVf04 QiNbGG+vtT7OtcvwbrSsLzWascgX7MW6krmY2s1rvVvpE0Gjy56UakeTBesk9yBG6H4M1t IalzyceDaKXgx92QrQ/hIaig1WAy4vnsn83IdehCThi1JhmigQXcS8g45khFZ9ugG7XiJi RgNgnats0kEzPWtnoLrMexvX4cH4QmqJCObH24aIsmlfPZZ8TdgqZADId5PBpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NIp2k+MN+GrEOCseRXyVsNzj7b0Wm9kgW59CMOCQv2U=; b=w0aHGEhEX/toiaFD6IjBcUMTRQStO2X6cDjQYjl79XxCXtNSkGWXxPDQ9hhpe2faX8S4CG VCmLMm/gL8mnhSTggsiWKnglglNUhvRqY7QBwY3CINDIFTxRuRoRw83pffB4nhx5iWRT27 ID3QN4akYWelJKa9IxPXqogG4hUrI2RcMNBSs3lrA8USZdlH2dgu1hfdqQk5sAhVWa6Skz ieV2jvIkK3F7FPtidtEyCRMDlU3Qw9YUpUT3T2o1KpFxF2EhHTp6yUh6I+2PgpoD+WOrc6 DI+6QwkULMQqnLsNIWk0Z/ZOLNTdZqTfjpdm+D852pK7jFcv4B2fRnZh8VSCjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683053212; a=rsa-sha256; cv=none; b=AqasgkFKpX46IFg1GaPbE+oTX4Rm512FO1GPRHEhk1QqTt/l25/SZ2uGcOv+0oTCs2GkKN 3yRDh7hD9uMlO8Cz/iml35H+BJwCfJHNXBxmQO2DVhjEEcDEnrpAPxYG65gKvGOfkxHvh4 fDLZMXmWmQ7/RCQt6aTOl1eOuRZdZqJ0ULu0A9DIYRWyIiWVIxLj1EWDlrjux8PnKbwvma 2Ohs8KrDKjP/nJ6VveLmL982D1SiesFtG82LcjkejSYogZBsdcYGztsPmisG8mDte/5FJC lhPPgVqcHw1iScKLUYO+Cw0hc8C1ScrCgOSZ+aO20hxt1xBeI20fuNKsK1Xlpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9pvw1dNFzyr5; Tue, 2 May 2023 18:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Ikq74009219; Tue, 2 May 2023 18:46:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342Ikqan009218; Tue, 2 May 2023 18:46:52 GMT (envelope-from git) Date: Tue, 2 May 2023 18:46:52 GMT Message-Id: <202305021846.342Ikqan009218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 0785c323f31c - main - Convert nfs bootp/diskless to use IfAPI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0785c323f31cd7c4039139bc8fb1f994dfe6cba6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=0785c323f31cd7c4039139bc8fb1f994dfe6cba6 commit 0785c323f31cd7c4039139bc8fb1f994dfe6cba6 Author: Justin Hibbits AuthorDate: 2023-02-07 19:37:03 +0000 Commit: Justin Hibbits CommitDate: 2023-05-02 18:35:58 +0000 Convert nfs bootp/diskless to use IfAPI Use the new IfAPI interface and address iterators so the nfs driver doesn't need direct access to the interface structures. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38962 --- sys/nfs/bootp_subr.c | 100 +++++++++++++++++++++++++------------------------ sys/nfs/nfs_diskless.c | 59 +++++++++++++++++------------ 2 files changed, 86 insertions(+), 73 deletions(-) diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c index 62fcb06fbc5d..d10139756447 100644 --- a/sys/nfs/bootp_subr.c +++ b/sys/nfs/bootp_subr.c @@ -137,7 +137,7 @@ struct bootpc_ifcontext { } _req; #define ireq _req._ifreq #define iareq _req._in_alias_req - struct ifnet *ifp; + if_t ifp; struct sockaddr_dl *sdl; struct sockaddr_in myaddr; struct sockaddr_in netmask; @@ -263,7 +263,6 @@ static void bootpc_tag_helper(struct bootpc_tagcontext *tctx, unsigned char *start, int len, int tag); #ifdef BOOTP_DEBUG -void bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa); void bootpboot_p_iflist(void); #endif @@ -295,38 +294,35 @@ static __inline int bootpc_ifctx_isfailed(struct bootpc_ifcontext *ifctx); */ #ifdef BOOTP_DEBUG -void -bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa) +static u_int +bootpboot_p_ifa(void *ifp, struct ifaddr *ifa, u_int count __unused) { printf("%s flags %x, addr ", - ifp->if_xname, ifp->if_flags); + if_name(ifp), if_getflags(ifp)); print_sin_addr((struct sockaddr_in *) ifa->ifa_addr); printf(", broadcast "); print_sin_addr((struct sockaddr_in *) ifa->ifa_dstaddr); printf(", netmask "); print_sin_addr((struct sockaddr_in *) ifa->ifa_netmask); printf("\n"); + + return (0); } void bootpboot_p_iflist(void) { - struct ifnet *ifp; - struct ifaddr *ifa; + struct epoch_tracker et; + struct if_iter iter; + if_t ifp; printf("Interface list:\n"); - IFNET_RLOCK(); - for (ifp = CK_STAILQ_FIRST(&V_ifnet); - ifp != NULL; - ifp = CK_STAILQ_NEXT(ifp, if_link)) { - for (ifa = CK_STAILQ_FIRST(&ifp->if_addrhead); - ifa != NULL; - ifa = CK_STAILQ_NEXT(ifa, ifa_link)) - if (ifa->ifa_addr->sa_family == AF_INET) - bootpboot_p_if(ifp, ifa); - } - IFNET_RUNLOCK(); + NET_EPOCH_ENTER(et); + for (ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) + if_foreach_addr_type(ifp, AF_INET, bootpboot_p_ifa, ifp); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); } #endif /* defined(BOOTP_DEBUG) */ @@ -1498,14 +1494,31 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, } } +static u_int +bootpc_init_ifa_cb(void *arg, struct ifaddr *ifa, u_int count) +{ + struct sockaddr_dl *sdl = (struct sockaddr_dl *)ifa->ifa_addr; + + if (count != 0) + return (0); + + if (sdl->sdl_type != IFT_ETHER) + return (0); + + *(struct sockaddr_dl **)arg = sdl; + + return (1); +} + void bootpc_init(void) { + struct epoch_tracker et; struct bootpc_ifcontext *ifctx = NULL; /* Interface BOOTP contexts */ struct bootpc_globalcontext *gctx; /* Global BOOTP context */ - struct ifnet *ifp; struct sockaddr_dl *sdl; - struct ifaddr *ifa; + struct if_iter iter; + if_t ifp; int error; #ifndef BOOTP_WIRED_TO int ifcnt; @@ -1573,22 +1586,15 @@ bootpc_init(void) * attaches and wins the race, it won't be eligible for bootp. */ ifcnt = 0; - IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if ((ifp->if_flags & - (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) != + NET_EPOCH_ENTER(et); + for (if_t ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) { + if ((if_getflags(ifp) & + (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) == IFF_BROADCAST) - continue; - switch (ifp->if_alloctype) { - case IFT_ETHER: - break; - default: - continue; - } - ifcnt++; + ifcnt++; } - - IFNET_RUNLOCK(); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); if (ifcnt == 0) { printf("WARNING: BOOTP found no eligible network interfaces, skipping!\n"); goto out; @@ -1600,37 +1606,32 @@ bootpc_init(void) retry: ifctx = STAILQ_FIRST(&gctx->interfaces); - IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { + NET_EPOCH_ENTER(et); + for (ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) { if (ifctx == NULL) break; #ifdef BOOTP_WIRED_TO - if (strcmp(ifp->if_xname, __XSTRING(BOOTP_WIRED_TO)) != 0) + if (strcmp(if_name(ifp), __XSTRING(BOOTP_WIRED_TO)) != 0) continue; #else - if ((ifp->if_flags & + if ((if_getflags(ifp) & (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) != IFF_BROADCAST) - continue; - switch (ifp->if_alloctype) { + break; + switch (if_getalloctype(ifp)) { case IFT_ETHER: break; default: continue; } #endif - strlcpy(ifctx->ireq.ifr_name, ifp->if_xname, + strlcpy(ifctx->ireq.ifr_name, if_name(ifp), sizeof(ifctx->ireq.ifr_name)); ifctx->ifp = ifp; /* Get HW address */ sdl = NULL; - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) - if (ifa->ifa_addr->sa_family == AF_LINK) { - sdl = (struct sockaddr_dl *)ifa->ifa_addr; - if (sdl->sdl_type == IFT_ETHER) - break; - } + if_foreach_addr_type(ifp, AF_LINK, bootpc_init_ifa_cb, &sdl); if (sdl == NULL) panic("bootpc: Unable to find HW address for %s", ifctx->ireq.ifr_name); @@ -1638,7 +1639,8 @@ retry: ifctx = STAILQ_NEXT(ifctx, next); } - IFNET_RUNLOCK(); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); CURVNET_RESTORE(); if (STAILQ_EMPTY(&gctx->interfaces) || @@ -1702,7 +1704,7 @@ retry: if (gctx->gotrootpath != 0) { struct epoch_tracker et; - kern_setenv("boot.netif.name", ifctx->ifp->if_xname); + kern_setenv("boot.netif.name", if_name(ifctx->ifp)); NET_EPOCH_ENTER(et); bootpc_add_default_route(ifctx); diff --git a/sys/nfs/nfs_diskless.c b/sys/nfs/nfs_diskless.c index 6df01e56f9b2..8f21861ab27e 100644 --- a/sys/nfs/nfs_diskless.c +++ b/sys/nfs/nfs_diskless.c @@ -146,6 +146,19 @@ nfs_parse_options(const char *envopts, struct nfs_args *nd) free(opts, M_TEMP); } +static u_int +nfs_setup_diskless_ifa_cb(void *arg, struct sockaddr_dl *sdl, u_int count) +{ + struct sockaddr_dl *ourdl = arg; + + if ((sdl->sdl_type == ourdl->sdl_type) && + (sdl->sdl_alen == ourdl->sdl_alen) && + !bcmp(LLADDR(sdl), LLADDR(ourdl), sdl->sdl_alen)) + return (1); + + return (0); +} + /* * Populate the essential fields in the nfsv3_diskless structure. * @@ -166,16 +179,18 @@ nfs_parse_options(const char *envopts, struct nfs_args *nd) void nfs_setup_diskless(void) { + struct epoch_tracker et; + struct if_iter iter; struct nfs_diskless *nd = &nfs_diskless; struct nfsv3_diskless *nd3 = &nfsv3_diskless; - struct ifnet *ifp; - struct ifaddr *ifa; - struct sockaddr_dl *sdl, ourdl; + if_t ifp; + struct sockaddr_dl ourdl; struct sockaddr_in myaddr, netmask; char *cp; int cnt, fhlen, is_nfsv3; uint32_t len; time_t timeout_at; + u_int count; if (nfs_diskless_valid != 0) return; @@ -219,29 +234,25 @@ nfs_setup_diskless(void) printf("nfs_diskless: no hardware address\n"); return; } - ifa = NULL; timeout_at = time_uptime + NFS_IFACE_TIMEOUT_SECS; retry: CURVNET_SET(TD_TO_VNET(curthread)); - IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family == AF_LINK) { - sdl = (struct sockaddr_dl *)ifa->ifa_addr; - if ((sdl->sdl_type == ourdl.sdl_type) && - (sdl->sdl_alen == ourdl.sdl_alen) && - !bcmp(LLADDR(sdl), - LLADDR(&ourdl), - sdl->sdl_alen)) { - IFNET_RUNLOCK(); - CURVNET_RESTORE(); - goto match_done; - } - } - } + NET_EPOCH_ENTER(et); + + for (ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) { + count = if_foreach_lladdr(ifp, nfs_setup_diskless_ifa_cb, &ourdl); + + if (count > 0) + break; + } - IFNET_RUNLOCK(); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); CURVNET_RESTORE(); + if (cnt > 0) { + goto match_done; + } + if (time_uptime < timeout_at) { pause("nfssdl", hz / 5); goto retry; @@ -249,9 +260,9 @@ retry: printf("nfs_diskless: no interface\n"); return; /* no matching interface */ match_done: - kern_setenv("boot.netif.name", ifp->if_xname); + kern_setenv("boot.netif.name", if_name(ifp)); if (is_nfsv3 != 0) { - strlcpy(nd3->myif.ifra_name, ifp->if_xname, + strlcpy(nd3->myif.ifra_name, if_name(ifp), sizeof(nd3->myif.ifra_name)); /* set up gateway */ @@ -290,7 +301,7 @@ match_done: nfs_diskless_valid = 3; } else { - strlcpy(nd->myif.ifra_name, ifp->if_xname, + strlcpy(nd->myif.ifra_name, if_name(ifp), sizeof(nd->myif.ifra_name)); /* set up gateway */ From nobody Tue May 2 19:04:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9qJV6VhBz49J2S; Tue, 2 May 2023 19:04:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9qJV3vRxz42LM; Tue, 2 May 2023 19:04:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-7515631b965so1040020185a.0; Tue, 02 May 2023 12:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683054281; x=1685646281; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=BsHH1zJ7xeW03Z6DhPQB3WLk+FbPP2Hzs9pNgV+oXvE=; b=UMkeIKpKLIEBA+lCVBafydlq1m7v8oxrhzVkQtjywDTsV0lV90rIPIbfago6jOlAX2 L03r6vCxnCElpt4qUvRpCOEWPIyKFQBvxHN+Hclu17t8xHMvqdEjiaBRuweFggL8FUoE Jr2QcQUgigzHKoG/zJa0iuA84N/wIRQBOVI6k6iZyq166N4nJoQWY9A/QOiANd3PIPLN ByoVW3ws1hyxatcp7zaQc6ljzBqPmUhu6RoNtMng7IxY74ABNOk0UdtxAzVmdG9vJ1+f KEKUJ5/K7p5uUR5URSdBvkdVA3mbgtaIZAbmZh+jK3Kpz6V8Kyle1l7eytyUz7wNBeYj RjvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683054281; x=1685646281; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BsHH1zJ7xeW03Z6DhPQB3WLk+FbPP2Hzs9pNgV+oXvE=; b=I8LiQF5lXZV4pBd9CC8BkddfTUJQ9erRuEsx0AIYJhwS7i00DnA08kxkX15+UtYxil zmfNjTGYJGYzfp6RzibPmxwe6Q+Hy9mA4JUis18dTQ7p6XbXEJBJaMyjwFvf/OTTu5qc bv4POBtcX91oK/fG+fkQmogkxbPPkNVqEEDXg6tfzOc6cSCTbRES2cFLVF/zSymo51oM gSD4HonBIGV0JxTCkKKT2+fBdjr+8GjWO8O6MjrBPIVGhpyrbzbZZue4nEyz/ccMJUC+ M0dHqS8TK7FUECjMDXOGUq+LjcJ8OvfIlmtl2/r1EtDj0ypj2P0pgbUMKIsSPWALeC4o cBng== X-Gm-Message-State: AC+VfDznlqUNxrRy2fDdSdx6/v2lY1xdLmInvwe/n3QAzGyytzQ09LVX 6m9nYflQsxajyinQqjosUrpXuq4RcCg= X-Google-Smtp-Source: ACHHUZ6N7o8QEmjeoAuguI/Lg8f4HgXHZ/LleXw3c2JmxAYqlD0b+0AakcooPixvFz6d0UU0SXp8fA== X-Received: by 2002:ad4:5f4b:0:b0:61b:65f4:2a15 with SMTP id p11-20020ad45f4b000000b0061b65f42a15mr5455286qvg.12.1683054281054; Tue, 02 May 2023 12:04:41 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id or16-20020a05620a619000b0074abe1e1457sm9889640qkn.76.2023.05.02.12.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 12:04:40 -0700 (PDT) Date: Tue, 2 May 2023 15:04:37 -0400 From: Mark Johnston To: Dmitry Chagin Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Q9qJV3vRxz42LM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > > > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > > Author: Konstantin Belousov > > AuthorDate: 2023-05-02 15:11:39 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2023-05-02 15:11:39 +0000 > > > > fstatat(2): restore AT_EMPTY_PATH handling > > > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > > Reported by: markj > > Sponsored by: The FreeBSD Foundation > > --- > > sys/kern/vfs_syscalls.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > > index 5c0a291e3b0b..d68af4ea4d51 100644 > > --- a/sys/kern/vfs_syscalls.c > > +++ b/sys/kern/vfs_syscalls.c > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > > > > - if ((error = namei(&nd)) != 0) > > + if ((error = namei(&nd)) != 0) { > > + if (error == ENOTDIR && > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > > + error = kern_fstat(td, fd, sbp); > > return (error); > > + } > > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing the error up. > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > > NDFREE_PNBUF(&nd); > > vput(nd.ni_vp); > From nobody Tue May 2 19:20:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9qg60MyRz49Jmt; Tue, 2 May 2023 19:20: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 4Q9qg573J4z44TX; Tue, 2 May 2023 19:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683055250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZXfZmiHaGGufjhNR9twFLvWoOQY7oN3F2xn+x26RI4=; b=Okg8azxJ6fwv8DW6Mn72Dzw3oFDXIhT0m2rNLdVnv9inGQpNi9vlvnsuaiF0G2ltNEBI1r d0LtVYqOKuW0z2ZpL78fUjv9jKbwvRmyyTfDQ5+wrkLLLE38tzJBXppTu6VC/PukQVUw1p BBSvxh+UcrBrUX8dfC/8DPwKj9Wfgol/5W7I5SuRI4eKY/U7u9hE8NFUsMVIh148aPMuyN +eXAcF0cVD0+Dq9dsY+DL5tz8Mu09HVkT+ak8Rs/g62BhjfM76AzJ24/HL8/KCMT0iu98Y daOyeExrjvN6KVncy9sDI9Si9249Oy0YhUm1GWXJVSV7rv+5L6Mvn+wPixO/bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683055250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZXfZmiHaGGufjhNR9twFLvWoOQY7oN3F2xn+x26RI4=; b=Shrlkg2edjoarWzNln00YW2k0qkBR4W/F/EJ4/1aAFmdDUk6rlnFDrvPv9PWCUUn53wPFB Qi3JuUKTwlpnvmt3dK6U9ke5GjIQG5iI54sXqCD2GMziixhl0Hjqwla63WQr0EfXCG9SMO cYDAIBYwWOnklk3oAhYmumGAoZ+nOHjLUVGw3Cjw7lI44DdnYa4FEQ13V1s8LoHkwE05qE QG8n/jt/4k9sBgV2+ASEYp+2W5zsp3qLX2qAxfByxAkFhkS/ZzjjucF97lcAsQCLCEW46X VHvaVTtA9mRCnTSHfCtRGh4cNg58qgxROdX1jCHfFWcz/WQ998v8lQiHiTsUUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683055250; a=rsa-sha256; cv=none; b=fXjEbgwesrhAUtvAo23b+pULSVsSJuBjFy9lcgmzF1cMUkVcENxjOrKqBZELd7CNQ8vlsa v8rtXBH259ZcwwJz4PS88jOO6gC8mTTh4h6YB/PqVtIFtPC22tfYJzfZnB0z5PmPfuDZMR gydPs2TuDKqlybgiEHdNDcHsxButhxWwvoeAorJgAl0nMpWIDHy9/I86CYrjmrhw8BdhW7 5eWfiV5B038i3No7s/+GWrce1Jbv0ANzOu3Top0oLbd9NyybsxaLbIAMnhoTedm73DAJSb JHM2V+NEz6sO8e4UVlOu7eA8cuex0VwDY6tJKgcehhypt7q8ohCitA4bY2Qknw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9qg56653z10tG; Tue, 2 May 2023 19:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342JKnWA069639; Tue, 2 May 2023 19:20:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342JKnS4069638; Tue, 2 May 2023 19:20:49 GMT (envelope-from git) Date: Tue, 2 May 2023 19:20:49 GMT Message-Id: <202305021920.342JKnS4069638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0ebc92bf3db1 - main - vmrun.sh: mention new edk2 package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ebc92bf3db1685fbcd023e42b683f4b10464095 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0ebc92bf3db1685fbcd023e42b683f4b10464095 commit 0ebc92bf3db1685fbcd023e42b683f4b10464095 Author: Christos Margiolis AuthorDate: 2023-05-02 19:19:08 +0000 Commit: Mark Johnston CommitDate: 2023-05-02 19:19:09 +0000 vmrun.sh: mention new edk2 package uefi-edk2-bhyve no longer exists. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39937 --- share/examples/bhyve/vmrun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index 1ef310b07e92..3ab16b58afb4 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -249,7 +249,7 @@ fi if [ ${efi_mode} -gt 0 ]; then if [ ! -f ${efi_firmware} ]; then echo "Error: EFI Firmware ${efi_firmware} doesn't exist." \ - "Try: pkg install uefi-edk2-bhyve" + "Try: pkg install edk2-bhyve" exit 1 fi fi From nobody Tue May 2 19:26:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9qp450QKz49KRj; Tue, 2 May 2023 19:26:52 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9qp40vFyz45xs; Tue, 2 May 2023 19:26:51 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 342JQn8N013027; Tue, 2 May 2023 22:26:49 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 342JQnaw013026; Tue, 2 May 2023 22:26:49 +0300 (MSK) (envelope-from dchagin) Date: Tue, 2 May 2023 22:26:49 +0300 From: Dmitry Chagin To: Mark Johnston Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Q9qp40vFyz45xs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: > On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: > > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > > > The branch main has been updated by kib: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > > > > > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > > > Author: Konstantin Belousov > > > AuthorDate: 2023-05-02 15:11:39 +0000 > > > Commit: Konstantin Belousov > > > CommitDate: 2023-05-02 15:11:39 +0000 > > > > > > fstatat(2): restore AT_EMPTY_PATH handling > > > > > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > > > Reported by: markj > > > Sponsored by: The FreeBSD Foundation > > > --- > > > sys/kern/vfs_syscalls.c | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > > > index 5c0a291e3b0b..d68af4ea4d51 100644 > > > --- a/sys/kern/vfs_syscalls.c > > > +++ b/sys/kern/vfs_syscalls.c > > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, > > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > > > > > > - if ((error = namei(&nd)) != 0) > > > + if ((error = namei(&nd)) != 0) { > > > + if (error == ENOTDIR && > > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > > > + error = kern_fstat(td, fd, sbp); > > > return (error); > > > + } > > > > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag > > It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and > returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing > the error up. > it call cache_fpl_handled_error() which is set status to CACHE_FPL_STATUS_HADLED, namei() simply return error in that path > > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > > > NDFREE_PNBUF(&nd); > > > vput(nd.ni_vp); > > From nobody Tue May 2 20:01:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9rZG0xfYz49Lvb; Tue, 2 May 2023 20:01:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (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 4Q9rZF6Plyz49LJ; Tue, 2 May 2023 20:01:41 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6a5f602a8f7so3105890a34.1; Tue, 02 May 2023 13:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683057701; x=1685649701; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yFuDDd06LpxUrx8g3W+vRpHtVpySvJzkfErEWSvwpA0=; b=LOmOtyINgaI6Vx1Ks8Xpa23Y2CBAHK33NepHmjI8npaBmKHDwxJMNnxODWfmxhRQxu djuIOZJT0Pxv+YOTdz58/9lrTYEXoku9VNDEqJOevzT1sdbr74mLnCbGAK+ihoS8PA3P 0YwLQ4mG9KSiUAhf7sDK/VLK/QokYpMlSSxyOCqGQu6V349OQCSyO02OBlyJrcyvMfdE 8oDs2l2lE5cRU3VdZkiaR3+yzjag1MBTFNsB1z1TFQjstI5osSQiqLsvuPdYxYrmKdCc TZ86JIiLNKbGt65vr50xps8A4p1ZgyC2hdohlaTGyT66ct1T0NJAPMjItAv8SIDdR2Ek ExWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683057701; x=1685649701; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yFuDDd06LpxUrx8g3W+vRpHtVpySvJzkfErEWSvwpA0=; b=HeRC4h9Jwec5ePVlJ0ezNcf3EiuoVI3U2yrC86/7Kdt9kClHoHPaONm+IZD+7fniid EIQD9BXaPNifqGulv89YPKLAw1xJ3BUlGWKm+UUJfagMVX+jx83EMnUwyu8vl5V5//6H 6ejygQ/6RHR2E182UpTx4lsc5Z05PB+P48Bm1cJ7byWqolP/fkIKI4HwsySNfsQz2hpD /qXEo7O0FKsGmxrz3+9lmXmEjWXLPPRC9kYBvcDsOXh2bwUMCMBcAWP80nqcj+sAOiPv B1rLoKUAs1DtT01kPUDe60zXlvPipQhxhoI6izoX0jq8BuVD1VdwHCqlwS/Em73Sdlzi Avpw== X-Gm-Message-State: AC+VfDxZI5NwpE8KQQHYWEq2a8H9TKK41jaz/KS/YnFZDUmdRt3ZDWnG 6f0Fm7gx6wE2lJZK10Ax9rjW/oX4EUYRRW+cFP+Zuuby X-Google-Smtp-Source: ACHHUZ7iFazPlot0hVO6Jim7FOpTqJh+QOWgMMLIvZMnxFLEigvlqlEbsiQet+3AKL9u3vg3acdDBEPsvapGLyn0Mt8= X-Received: by 2002:a9d:65c1:0:b0:6a5:f682:44c2 with SMTP id z1-20020a9d65c1000000b006a5f68244c2mr8528101oth.14.1683057700724; Tue, 02 May 2023 13:01:40 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:799a:0:b0:4d4:94b:7266 with HTTP; Tue, 2 May 2023 13:01:40 -0700 (PDT) In-Reply-To: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 2 May 2023 22:01:40 +0200 Message-ID: Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling To: Dmitry Chagin Cc: Mark Johnston , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Q9rZF6Plyz49LJ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N right, this should do it diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index e4977392349f..b583eed5e249 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4435,6 +4435,7 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, struct vnode **vpp) if ((*vpp)->v_type != VDIR) { if (!((cnp->cn_flags & EMPTYPATH) != 0 && cnp->cn_pnbuf[0] == '\0')) { cache_fpl_smr_exit(fpl); + ndp->ni_resflags |= NIRES_EMPTYPATH; return (cache_fpl_handled_error(fpl, ENOTDIR)); } } On 5/2/23, Dmitry Chagin wrote: > On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: >> On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: >> > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: >> > > The branch main has been updated by kib: >> > > >> > > URL: >> > > https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 >> > > >> > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 >> > > Author: Konstantin Belousov >> > > AuthorDate: 2023-05-02 15:11:39 +0000 >> > > Commit: Konstantin Belousov >> > > CommitDate: 2023-05-02 15:11:39 +0000 >> > > >> > > fstatat(2): restore AT_EMPTY_PATH handling >> > > >> > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 >> > > Reported by: markj >> > > Sponsored by: The FreeBSD Foundation >> > > --- >> > > sys/kern/vfs_syscalls.c | 6 +++++- >> > > 1 file changed, 5 insertions(+), 1 deletion(-) >> > > >> > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c >> > > index 5c0a291e3b0b..d68af4ea4d51 100644 >> > > --- a/sys/kern/vfs_syscalls.c >> > > +++ b/sys/kern/vfs_syscalls.c >> > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int >> > > fd, const char *path, >> > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | >> > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); >> > > >> > > - if ((error = namei(&nd)) != 0) >> > > + if ((error = namei(&nd)) != 0) { >> > > + if (error == ENOTDIR && >> > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) >> > > + error = kern_fstat(td, fd, sbp); >> > > return (error); >> > > + } >> > >> > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag >> >> It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and >> returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing >> the error up. >> > > it call cache_fpl_handled_error() which is set status to > CACHE_FPL_STATUS_HADLED, namei() simply return error in that path > > >> > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); >> > > NDFREE_PNBUF(&nd); >> > > vput(nd.ni_vp); >> > > -- Mateusz Guzik From nobody Tue May 2 21:08:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9t3F5jxXz48B03; Tue, 2 May 2023 21:08:25 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) (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 4Q9t3F1rpbz4MJy; Tue, 2 May 2023 21:08:25 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=rYEKU4Sc; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2607:f8b0:4864:20::c2f as permitted sender) smtp.mailfrom=mjguzik@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-54c96cef24aso1276031eaf.1; Tue, 02 May 2023 14:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683061704; x=1685653704; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=trTjSvSeLSB76/ik+DWUYGo7z6kAG/sOCNlB8rBHz+w=; b=rYEKU4Sc0jZjPr+FO1f7cKrgaZCrLDhoh7B13JBnKd6UpgUg9KA8xnopOrDd3z+6Am 19Pq4V7ZYPyXotJJLLgMqDlfC6LfwSu6LfNq7ztgoB/VzSZIR20t3+AL0Fiz3EJ5xyZW mSH7cKkTFKWiG3b2wavJkckTydUaXHbKTRi8y0aveNAO53HVjRrgr4+vdJEIhcBxeowz 11ZS0YAAS3i15OTTYKJ0Emp37jAKSYc1dd1mGpLc2JkX3mOGutgUhO6y2JbLNjHAfdNf zXfBdxe6lEC7N/pLj2Vc1HuHByxrxtdRyTcWpHfdJxAee4GkhMYV7hNNxNvQmB3E7MOE KfaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683061704; x=1685653704; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=trTjSvSeLSB76/ik+DWUYGo7z6kAG/sOCNlB8rBHz+w=; b=G3/jlahACO/jgT20Vm//r3WqoD40GeWQweLDGW8oh10Lxb1T0xd7+Hwhd2CwJ2vVaX xRnmO3dvrz52bC7Q2jzugMxmh4qlM36aE4ges8tpBHFViGTnOzAeIfoQJfML/FYtSa5j OVUAiCJd9UOOM3ntyyyQmpW+PXqmEYGbANygh0+mWKltRDjCEAos+O584Mg73TkjGAJl XhHyFgdyLI1qSI7b+VupKlmW8pctuK8KNOGXAxutM5jzLg4oIH9kmUSgbaS0MDoavn0E skWxixTHCtP1a7b9YZMeye5xiEbwftcD94rJvgZmoqFxunVnJOyUg7Ky1NI6aoLU1w+B fOYg== X-Gm-Message-State: AC+VfDzAJSDq5a40dN8cl4E4qPOPFIkw5sOY10+dejfe3p/c5dKz6ghA uyd9IiI5UE+mgqKdk9PV8jNDD3RilXgqwPzQxjFU/M+U X-Google-Smtp-Source: ACHHUZ6/PoomMzr5WBRS+3U+Y2f+p0QCq7Dol9axmESQUY9Sy7yOxM3/Hn9i5yFwvn3gk0eK9UcLcNtRdU4t5xj2XC4= X-Received: by 2002:a05:6820:1995:b0:547:7c75:4b23 with SMTP id bp21-20020a056820199500b005477c754b23mr8429902oob.4.1683061704220; Tue, 02 May 2023 14:08:24 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:799a:0:b0:4d4:94b:7266 with HTTP; Tue, 2 May 2023 14:08:23 -0700 (PDT) In-Reply-To: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 2 May 2023 23:08:23 +0200 Message-ID: Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling To: Dmitry Chagin Cc: Mark Johnston , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.91 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.91)[-0.908]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::c2f:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4Q9t3F1rpbz4MJy X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 5/2/23, Mateusz Guzik wrote: > right, this should do it > > diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c > index e4977392349f..b583eed5e249 100644 > --- a/sys/kern/vfs_cache.c > +++ b/sys/kern/vfs_cache.c > @@ -4435,6 +4435,7 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, > struct vnode **vpp) > if ((*vpp)->v_type != VDIR) { > if (!((cnp->cn_flags & EMPTYPATH) != 0 && > cnp->cn_pnbuf[0] == '\0')) { > cache_fpl_smr_exit(fpl); > + ndp->ni_resflags |= NIRES_EMPTYPATH; > return (cache_fpl_handled_error(fpl, ENOTDIR)); > } > } > on another look it already works fine as is, I miseed the ! in the condition ;) #include #include int main(void) { struct stat sb; int fd; fd = open("/etc/fstab", O_RDONLY); fstatat(fd, "", &sb, AT_EMPTY_PATH); } openat(AT_FDCWD,"/etc/fstab",O_RDONLY,00) = 3 (0x3) fstatat(3,"",{ mode=-rw-r--r-- ,inode=370100,size=145,blksize=4096 },AT_EMPTY_PATH) = 0 (0x0) dtrace -n 'vfs:fplookup:: /execname == "a.out"/ { @[stack(), arg1, arg2] = count(); }' [snip] kernel`kern_statat+0xec kernel`sys_fstatat+0x27 kernel`amd64_syscall+0x109 kernel`0xffffffff809726bb 4980 3 1 as in handled in cache_fplookup_emptypath > > On 5/2/23, Dmitry Chagin wrote: >> On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: >>> On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: >>> > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: >>> > > The branch main has been updated by kib: >>> > > >>> > > URL: >>> > > https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 >>> > > >>> > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 >>> > > Author: Konstantin Belousov >>> > > AuthorDate: 2023-05-02 15:11:39 +0000 >>> > > Commit: Konstantin Belousov >>> > > CommitDate: 2023-05-02 15:11:39 +0000 >>> > > >>> > > fstatat(2): restore AT_EMPTY_PATH handling >>> > > >>> > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 >>> > > Reported by: markj >>> > > Sponsored by: The FreeBSD Foundation >>> > > --- >>> > > sys/kern/vfs_syscalls.c | 6 +++++- >>> > > 1 file changed, 5 insertions(+), 1 deletion(-) >>> > > >>> > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c >>> > > index 5c0a291e3b0b..d68af4ea4d51 100644 >>> > > --- a/sys/kern/vfs_syscalls.c >>> > > +++ b/sys/kern/vfs_syscalls.c >>> > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int >>> > > fd, const char *path, >>> > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | >>> > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); >>> > > >>> > > - if ((error = namei(&nd)) != 0) >>> > > + if ((error = namei(&nd)) != 0) { >>> > > + if (error == ENOTDIR && >>> > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) >>> > > + error = kern_fstat(td, fd, sbp); >>> > > return (error); >>> > > + } >>> > >>> > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag >>> >>> It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and >>> returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing >>> the error up. >>> >> >> it call cache_fpl_handled_error() which is set status to >> CACHE_FPL_STATUS_HADLED, namei() simply return error in that path >> >> >>> > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); >>> > > NDFREE_PNBUF(&nd); >>> > > vput(nd.ni_vp); >>> > >> > > > -- > Mateusz Guzik > -- Mateusz Guzik From nobody Tue May 2 21:52:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9v2G4XP3z48D2B; Tue, 2 May 2023 21:52:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9v2G3nkkz3Fqv; Tue, 2 May 2023 21:52:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064358; h=from:from:reply-to:subject: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=nHsl5WWkMOPFYxOJYkmLicBzrpCy4AZ7mWrejKuum40=; b=nguE25A969u+ekwDIsWd/b6IBJmb6jOnsihv/aAx8K0k7hmIg7cl/z7BfCNDT1m0jJB83j 5+vnmyv9bB6kJNf/0G6FW6KrRvDXcuHZ3cgzyy2Mr9et0dkrLKc4mEPwizwYlGAZF1Bvk5 I4NQ3k7o6JmuicOsAfQI79K/3rsXsqOruD9R2idqGoEtb2KfGfMpAAXMQDWU8AIQBrZ5W2 bju0IknQastYnj0qjiy29WPSnupEkGfOl6uloNpt35XNESM1oMzCEZKSxQOj133+/54JxI 7CXciBX8DA+Xqpj+941YGhO42R4ZFv2EId37wxQUgDSOidVF+HZ5OtxfDIPm1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064358; h=from:from:reply-to:subject: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=nHsl5WWkMOPFYxOJYkmLicBzrpCy4AZ7mWrejKuum40=; b=iq7dNr8cXWOcKqsTs1MuWtp2OWwjkiDtv2g/ahtMbjAENeAP/Xhv96342hKc/h/hmh3kUi 6EVHGgZsde0ZYELKkZjhxsGZ0M5Ph8Q/Rsi+FVyWhJzT2TqFvlIYhzqCmB7b1Sw6glnFwT REcUyZpCZ8bCZegQrAkAwtV/EgFY9ICbgdLJMnd/66yX6hn7VQmxsQCMhQlGQ/sROnYc/Y KI1vdpnjMpQWUd4qjYS7xsdsfMEZ4G6/Wn9pVAv5+qo51xp/EYyhmU68317XxuzHd622n4 Ocx9G+JcO+FmAiXDjA/UivIGTwob9DL+Sy+udT0iPhhGFKccjC6rEYpa42L7aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683064358; a=rsa-sha256; cv=none; b=ySqsY50RadA5MKkNkKpjpVCqfboZoUaW9+NM/a6D2is4UuHaevDiGlZocH7lHWH+a6Mvy2 koJSWrw9p5h74Gc9mxGtt6dGST00SbGD6ss+qO5EFYcflxijNU7vgzf7F2DpUzNakRU95K +8Kb24XOQgm8nEUA86Xvmdeatz6h3WEQo98rmyLJXLq9iZ4jKrpiPXIiHstRSASz5NcjXq 7mz4ikLws+aEJpsiYYQNEAp5WNYCAu1Qe4bS8WsONgocxrZVLpswYqkrfmTBemA3sZZ86v bYf5OmKhZJGlho7d+WIE+5EbS2kMbUpFF4NK6BtP5glGjauK2BxRje8Z0YgtDA== Received: from [IPV6:2601:648:8680:16b0:56:ddb:b895:f1c1] (unknown [IPv6:2601:648:8680:16b0:56:ddb:b895:f1c1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q9v2F6z93zQK9; Tue, 2 May 2023 21:52:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <50e84672-585d-627a-27fd-8a9257024cd5@FreeBSD.org> Date: Tue, 2 May 2023 14:52:36 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: d713e0891ff9 - main - MFV: less v632. Content-Language: en-US To: Xin LI , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305020345.3423jB5J014057@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202305020345.3423jB5J014057@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 5/1/23 8:45 PM, Xin LI wrote: > The branch main has been updated by delphij: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d713e0891ff9ab8246245c3206851d486ecfdd37 > > commit d713e0891ff9ab8246245c3206851d486ecfdd37 > Merge: 83d5725005c5 159d764c1668 > Author: Xin LI > AuthorDate: 2023-05-02 03:43:57 +0000 > Commit: Xin LI > CommitDate: 2023-05-02 03:43:57 +0000 > > MFV: less v632. > > MFC after: 2 weeks Thanks! -- John Baldwin From nobody Tue May 2 22:02:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9vFw3fB5z48Dbb; Tue, 2 May 2023 22:02: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 4Q9vFw2plrz3HNk; Tue, 2 May 2023 22:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=izC/I80zna/RrNWiagEVS5TxbXgWLoqQdQmXIVo1cXc=; b=QRS+MIb++eX/d68kyMWqcGc/ALg+BI4oy9Kaol667ojhMXp9IlG/EX3QtAvWvnBJ9nln44 EhjJ5NloCEC5IyAgapPciURWIlAdY0Z9rOj1N0lgCHDVfnnUPT7YPYZVQMKcLm90MfDe3T vKlf38ZRg59B0THh5Wd3veso/OcfWbRnf7pfotG/IfhCtLdAL3em0iZcPaDhdrAFyYUA0k Rh/8a3hqRs4P69Z/bGD7dmJY8qBfUlWewIl9COxUPWTinWauR7IplRw1tOrcDlTTajC1D6 ysm6XJZLyj+9QSjnAHI7NKTWx74p4BN/hX64jKhJwK/R6Qvc5lKzM6lOdVVJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=izC/I80zna/RrNWiagEVS5TxbXgWLoqQdQmXIVo1cXc=; b=KvymfM95V5pgWzQlNbTbxFow3qyjOJn0gkbFlFrDOGmZA6w9OA1Pu3LXy5aFGlgrtUQby5 z5ivtfY3iy0u4vPvjOlbu+mi7Iq75V+SVyH4weqU9teg7te+i8KQapvxHS4Ffgi9Y6DIri O4RRw2n4rjpibjRSuKOpOiA144MgFYHnmQkWNyq0kzWQzBI8x/nVUSz/PwY6yB7IYyN3FB bP1M09a1hbhTsBgntFC/vcTmrDy2+y1OGRiW0KfrSb55NfE3U8fZORD++yE7GAIxBjiWpF n9NUAtjQg5FFByOYVZ7I/YooN2Rqo3B7G47kJBTavV/FMKcar85m66/cglC1bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683064964; a=rsa-sha256; cv=none; b=ZuGPqAiK+SyL5WyUTVHJRMoXve2XdVFGrfei+s1EmYSvhrNtw+ZGvySMcts7XtCVPfmh51 g0+Q8wCdgK4Dst0GlaCgsSE/wOiyv44eFK0ZnGV9UbGs2uphetv6kmWbEDFnbChj+p1TAp p25SG6JFF6YOE0DUGaDzy0ko23PHtuxm60UltHLnlvKUW2NzyPmvdJqjiaDCOZqW8FJewL d0wO7h0NB+rOs+YQ5/snnGy6BOzjFXhuSISrKI2Fj2fAA3Ri30yHmKvlgLRtNazTWQfNug kyWBChO39htLMNrBYTGEwL54qjxS60SolwjQNCyyiruF5g3rqLP1Ajr6UniqMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9vFw1skBz14fs; Tue, 2 May 2023 22:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342M2ieO040001; Tue, 2 May 2023 22:02:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342M2ixQ040000; Tue, 2 May 2023 22:02:44 GMT (envelope-from git) Date: Tue, 2 May 2023 22:02:44 GMT Message-Id: <202305022202.342M2ixQ040000@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: ec1e83782d9d - main - rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec1e83782d9d13b427f7e935e9477e8120ec6c31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ec1e83782d9d13b427f7e935e9477e8120ec6c31 commit ec1e83782d9d13b427f7e935e9477e8120ec6c31 Author: Ed Maste AuthorDate: 2023-05-02 19:57:20 +0000 Commit: Ed Maste CommitDate: 2023-05-02 22:01:43 +0000 rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no rtld's Makefile used to add -L${LIBDIR} to LDFLAGS when MK_TOOLCHAIN was no. This was done as part of a change to fix building rtld with MK_TOOLCHAIN == no (although I'm not sure this part was necessary). In any case as of 5f2e84015da7 libc_pic.a is built independent of the MK_TOOLCHAIN setting and the main part of the workaround has already been removed. Remove the rest now. This reverts commit c0f5aeb0329d71e6b02379133c0c9c0145c9afea. Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39938 --- libexec/rtld-elf/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 1f3df176992a..a132c756723f 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -57,9 +57,6 @@ CFLAGS+= -fpic -DPIC $(DEBUG) LDFLAGS+= -shared -Wl,-Bsymbolic -Wl,-z,defs -nostdlib -e ${RTLD_ENTRY} # Pull in the dependencies that we use from libc .include "rtld-libc/Makefile.inc" -.if ${MK_TOOLCHAIN} == "no" -LDFLAGS+= -L${LIBCDIR} -.endif VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${RTLD_ELF_DIR}/Symbol.map From nobody Wed May 3 04:15:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB3X815TWz48rpf; Wed, 3 May 2023 04:15: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 4QB3X80ZFvz4H65; Wed, 3 May 2023 04:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683087336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3wXr9vPjSQaFp4zQGWPW9EkHHsyhnF3IYfpLnimaJY=; b=N38CykCFr1RQ0qgqNKKQIgG5udWrdp7OYC0PIq3ffMowTVtZRwwmHs4wbf4z6LOBENZXdS gsd6Bu6owqdSDIhkMFpOGH8BieJiiQzMN6A4qjrnSYYG6iJGKgQG+dnnzaEHyVdIVXt5g3 xQCvGKKA+W/vvhMelo113HblnGjwRoquKiVNhV9uUm2wV5WX/2FoJc8PtYyx9kUGdEzkeH 4ENsDy5s84mzM7e30es4sdcPJX9bJIMYsk4L31dk+N99eZORBF8gYQels41/w7LGDUDtZl HpfTQsId3/GASR17ODaWPLKWUzX5sxliNG36JLBgqw40oBGPmwx0kvpzRp19hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683087336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3wXr9vPjSQaFp4zQGWPW9EkHHsyhnF3IYfpLnimaJY=; b=agzDxBVi86zWV0/52HMhJnO/wAyw7Tu1/dt9lieVztXPqHYVgBMdtuKxijk45Qo6eZJfMl STIVlVO2ZWbYT1Kiy5Fy8ZaSEw4qMrpxBt/CGwc3lJvkWvMwHl0ZGM0Rk7iv4mkbb9+a/J a5iLb1vOFSu/lo56AIJjsZ4r8nPuTbcBe4NilJm/qoMiNBrutuyga8rPb1xCQpMyxTpNYn hlEGfEZIEpDy4piM2A7yLeaqB0NY/uL4jV1RjhdrIMjAGyrB6YUea4tSa94WL/xoReusVP gcwFgfWpsO8sjzPABzUIRsTIFPvZdK/v5e7F4r7cVwwXm+pIF18EUBDc/7ShWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683087336; a=rsa-sha256; cv=none; b=R5jLTa/Z7/JRUq5KJ74pSfZ05eqKgp+QayaY/XUKvazNhdGuUMZ6gvCvDl2FNSULurIgxG 181jJ4ds3jzkpVehVkq5n894IcSznuuJRdINeV/7kmYO/aawX/9ZLqdRvpqXWlzSfdvc90 qVyWGoW4hZD10Yzblx35YCpp0+OlZlG8YzKC+SZYv9lMQnUsex76uAR+B/aUXetkoMhCKz 9SWS/MNwNj3qCtFevAxIJeyK7Q02ADVPXeqcfeT+2I6QbIlg9/6kvGMYEBu+TtzskG4Hky 2dLL4S+L9eJKx6/r1j+aHkInKBlv35qJrcNWsXcIEv36pW7ZWZiDUq4NAHVDqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB3X76krHzGgq; Wed, 3 May 2023 04:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3434FZeg053395; Wed, 3 May 2023 04:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3434FZ0U053394; Wed, 3 May 2023 04:15:35 GMT (envelope-from git) Date: Wed, 3 May 2023 04:15:35 GMT Message-Id: <202305030415.3434FZ0U053394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: f78cc42f10cb - main - riscv: Add pass(4) to GENERIC kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f78cc42f10cbfb5811276bc6827732ca32eb5485 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=f78cc42f10cbfb5811276bc6827732ca32eb5485 commit f78cc42f10cbfb5811276bc6827732ca32eb5485 Author: Jessica Clarke AuthorDate: 2023-05-03 04:14:57 +0000 Commit: Jessica Clarke CommitDate: 2023-05-03 04:14:57 +0000 riscv: Add pass(4) to GENERIC kernel Whilst we don't have ahci(4) currently, we do have umass(4), and need pass(4) for smartctl(8) to be able to talk to such devices. Reported by: David Gilbert MFC after: 1 week --- sys/riscv/conf/GENERIC | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 04645ec9bf90..9465b2712b2e 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -101,6 +101,9 @@ device vtnet # VirtIO Ethernet device device virtio_blk # VirtIO Block device device virtio_mmio # VirtIO MMIO bus +# ATA/SCSI peripherals +device pass # Passthrough device (direct ATA/SCSI access) + # NVM Express (NVMe) support device nvme # base NVMe driver options NVME_USE_NVD=0 # prefer the cam(4) based nda(4) driver From nobody Wed May 3 06:46:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB6tM32nlz490v8; Wed, 3 May 2023 06:46:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QB6tK554Dz4RWQ; Wed, 3 May 2023 06:46:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 3436kPoJ052568 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 3 May 2023 09:46:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3436kPoJ052568 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3436kPEN052567; Wed, 3 May 2023 09:46:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 3 May 2023 09:46:25 +0300 From: Konstantin Belousov To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5844bd058aed - main - jobc: rework detection of orphaned groups. Message-ID: References: <202101100241.10A2fvtm057663@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Result: default: False [-1.17 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_SPAM_SHORT(0.83)[0.833]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_SOFTFAIL(0.00)[~all:c]; HAS_XAW(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4QB6tK554Dz4RWQ X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Sun, Apr 30, 2023 at 11:01:44PM -0500, Kyle Evans wrote: > On Sat, Jan 9, 2021 at 8:43 PM Konstantin Belousov wrote: > > > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5844bd058aed6f3d0c8cbbddd6aa95993ece0189 > > > > commit 5844bd058aed6f3d0c8cbbddd6aa95993ece0189 > > Author: Konstantin Belousov > > AuthorDate: 2020-12-29 00:41:56 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2021-01-10 02:41:20 +0000 > > > > jobc: rework detection of orphaned groups. > > > > Instead of trying to maintain pg_jobc counter on each process group > > update (and sometimes before), just calculate the counter when needed. > > Still, for the benefit of the signal delivery code, explicitly mark > > orphaned groups as such with the new process group flag. > > > > This way we prevent bugs in the corner cases where updates to the counter > > were missed due to complicated configuration of p_pptr/p_opptr/real_parent > > (debugger). > > > > Since we need to iterate over all children of the process on exit, this > > change mostly affects the process group entry and leave, where we need > > to iterate all process group members to detect orpaned status. > > > > Hi, > > I have a question about the locking here... > > > [... snip ...] > > @@ -678,43 +677,40 @@ jobc_reaper(struct proc *p) > > } > > > > static struct proc * > > -jobc_parent(struct proc *p) > > +jobc_parent(struct proc *p, struct proc *p_exiting) > > { > > struct proc *pp; > > > > - sx_assert(&proctree_lock, SX_LOCKED); > > + sx_assert(&proctree_lock, SA_LOCKED); > > > > pp = proc_realparent(p); > > - if (pp->p_pptr == NULL || > > + if (pp->p_pptr == NULL || pp == p_exiting || > > (pp->p_treeflag & P_TREE_GRPEXITED) == 0) > > return (pp); > > return (jobc_reaper(pp)); > > } > > > > -#ifdef INVARIANTS > > -static void > > -check_pgrp_jobc(struct pgrp *pgrp) > > +static int > > +pgrp_calc_jobc(struct pgrp *pgrp) > > { > > struct proc *q; > > int cnt; > > > > - sx_assert(&proctree_lock, SX_LOCKED); > > - PGRP_LOCK_ASSERT(pgrp, MA_NOTOWNED); > > +#ifdef INVARIANTS > > + if (!mtx_owned(&pgrp->pg_mtx)) > > + sx_assert(&proctree_lock, SA_LOCKED); > > +#endif > > > > cnt = 0; > > - PGRP_LOCK(pgrp); > > LIST_FOREACH(q, &pgrp->pg_members, p_pglist) { > > if ((q->p_treeflag & P_TREE_GRPEXITED) != 0 || > > q->p_pptr == NULL) > > continue; > > - if (isjobproc(jobc_parent(q), pgrp)) > > + if (isjobproc(jobc_parent(q, NULL), pgrp)) > > cnt++; > > } > > - KASSERT(pgrp->pg_jobc == cnt, ("pgrp %d %p pg_jobc %d cnt %d", > > - pgrp->pg_id, pgrp, pgrp->pg_jobc, cnt)); > > - PGRP_UNLOCK(pgrp); > > + return (cnt); > > } > > -#endif > > > > /* > > * Move p to a process group > > [... snip ...] > > So the proctree lock is sufficient for pgrp_calc_jobc() to provide a > stable answer needed for everything fixjobc_kill() uses it for... > > > @@ -934,35 +827,46 @@ fixjobc_kill(struct proc *p) > > p->p_treeflag |= P_TREE_GRPEXITED; > > > > /* > > - * Check p's parent to see whether p qualifies its own process > > - * group; if so, adjust count for p's process group. > > + * Check if exiting p orphans its own group. > > */ > > - if (isjobproc(jobc_parent(p), pgrp)) > > - pgadjustjobc(pgrp, false); > > + pgrp = p->p_pgrp; > > + if (isjobproc(jobc_parent(p, NULL), pgrp)) { > > + PGRP_LOCK(pgrp); > > + if (pgrp_calc_jobc(pgrp) == 0) > > + orphanpg(pgrp); > > + PGRP_UNLOCK(pgrp); > > + } > > > > /* > > * Check this process' children to see whether they qualify > > - * their process groups after reparenting to reaper. If so, > > - * adjust counts for children's process groups. > > + * their process groups after reparenting to reaper. > > */ > > LIST_FOREACH(q, &p->p_children, p_sibling) { > > - if ((q->p_treeflag & P_TREE_ORPHANED) != 0) > > - continue; > > - fixjobc_kill_q(p, q, true); > > + pgrp = q->p_pgrp; > > + PGRP_LOCK(pgrp); > > + if (pgrp_calc_jobc(pgrp) == 0) { > > + /* > > + * We want to handle exactly the children that > > + * has p as realparent. Then, when calculating > > + * jobc_parent for children, we should ignore > > + * P_TREE_GRPEXITED flag already set on p. > > + */ > > + if (jobc_parent(q, p) == p && isjobproc(p, pgrp)) > > + orphanpg(pgrp); > > + } else > > + pgrp->pg_flags &= ~PGRP_ORPHANED; > > + PGRP_UNLOCK(pgrp); > > } > > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > > - fixjobc_kill_q(p, q, true); > > - LIST_FOREACH(q, &p->p_children, p_sibling) { > > - if ((q->p_treeflag & P_TREE_ORPHANED) != 0) > > - continue; > > - fixjobc_kill_q(p, q, false); > > + LIST_FOREACH(q, &p->p_orphans, p_orphan) { > > + pgrp = q->p_pgrp; > > + PGRP_LOCK(pgrp); > > + if (pgrp_calc_jobc(pgrp) == 0) { > > + if (isjobproc(p, pgrp)) > > + orphanpg(pgrp); > > + } else > > + pgrp->pg_flags &= ~PGRP_ORPHANED; > > + PGRP_UNLOCK(pgrp); > > } > > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > > - fixjobc_kill_q(p, q, false); > > - > > -#ifdef INVARIANTS > > - check_pgrp_jobc(pgrp); > > -#endif > > } > > > > void > > ... and I would imagine the proctree lock is sufficient for > isjobproc/jobc_parent as well- is there any reason we can't/shouldn't > just use atomic(9) for operations with pgrp->pg_flags and push all of > the extra lock acquisitions into the orphanpg() cases? It seems like > we could avoid taking any pgrp lock in the common case and at least > mitigate that additional overhead from the exit() path. My reading is that you are proposing change pgrp locks into proctree_lock. Flag (PGRP_ORPHANED) needs to be consistent with the group membership, so it cannot be atomic, it would need to be under the same lock. If this works, I do not object, but I did not looked carefully. The most obvious problem could be that it is not easy to take sx proctree_lock in some places that only need pgrp mutex right now. From nobody Wed May 3 06:56:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB75t49kKz490bB; Wed, 3 May 2023 06:56: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 4QB75t3fbqz4Snm; Wed, 3 May 2023 06:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683096994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PiGWZtwpcx+aBd3Er55B3Rw+uCqGItNZ+weJpZvuF4U=; b=kZ9h4fZm8FqPbYLbdjbIgX9ujUbDOXLCtYGgLf2JyygIR4z28J1EaDpx/JmxE6ymaRj7xD wl2NaLPOrpeaMnUbk2Mg+5Vhx1LxnEpFmrjSsQNvrOLROzHqSvuy5sdraHCqa0fnFm7YPj NboUaBDknn9JctdCruBtQGwGJn9AaMRR2YjlehkkIZWJuTTxzrh48iBh9cn0zLWbKHzT2E xGdPqXMe19x62HLeH+WbfWh0N/6WU0ggDju8qF4gAeU2u2X16cIMA3XDCfncciWGcchXyU VNghK9TLshIKxtj4wi8nXp6JvYH/DZh5+iJE0rKT4rC0he8Sdx2Qv8QoZA6CsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683096994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PiGWZtwpcx+aBd3Er55B3Rw+uCqGItNZ+weJpZvuF4U=; b=GI4l1nINeKbJ9mKv+/GtbAEq4REYsu5HFGSBLrPS67xX6+X/AyLagYXkEOw4HDQps7/guB cgBDrbudU4tWAETCd/Oh9nlv6G83iJV7UqqOLvmNhaseae8/jEUrMIy06pINMD/a82bvgH vUP5D4DB+6PSGJ4Fuk4ZhJSMW59YQS3sc1LE1KUpKaor0z9mf03plTMhOfsd6UtWxU30Jr Ky7jiETGPCUa6tEumqWRGDwjEm7LOTkXxd3T9WsSI379CoZ8hh9/1Zg5LBiZv9kAlOT94d 1ZN35VXsraOft94U0Ftn0qCKkxI3rt67oYXKkFqM7qexGAYtiabj+E+G1Nj/rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683096994; a=rsa-sha256; cv=none; b=fLnixRRE8w74xeskdy1Jg7dr4+1MsS9y0fINfsfPF+OXcC42dP+29DjmEtOmNyk+w7oNgT yaBzWHOgQBtyUrFbgCB/r5JCZhhTT6asemmkAfV5qhgBPXN3hsWiSPEd4OOvuuhyokIlif 6NRZTzhNHVhgMiENzWlM5UH0JChv3Xki2dizd8f3lcmg0Kf1AxLcCJwW9ctX9ubCDhhQWY eosnrozLUDgknzHfgHSXwFlxkvtofw15JpR/u+k3LAMW2NF5KPiR3hukoJMSv5kJ3zn5Zu GRRQmOrQxNWWS0yjuTaS43zayR7EwZLxRoETA5BQcgL4lcEyU6hce3rC/AEjrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB75t2k57zLTm; Wed, 3 May 2023 06:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3436uYBm016473; Wed, 3 May 2023 06:56:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3436uYYp016472; Wed, 3 May 2023 06:56:34 GMT (envelope-from git) Date: Wed, 3 May 2023 06:56:34 GMT Message-Id: <202305030656.3436uYYp016472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: cf0fc64bc2f9 - main - vfs: reduce audit branching in namei_setup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf0fc64bc2f91bc00c78b316b51a0aaac8b53235 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cf0fc64bc2f91bc00c78b316b51a0aaac8b53235 commit cf0fc64bc2f91bc00c78b316b51a0aaac8b53235 Author: Mateusz Guzik AuthorDate: 2023-05-03 06:56:10 +0000 Commit: Mateusz Guzik CommitDate: 2023-05-03 06:56:10 +0000 vfs: reduce audit branching in namei_setup --- sys/kern/vfs_lookup.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 66a8b267f346..a75ea4ca16d6 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -372,10 +372,12 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) /* * If we are auditing the kernel pathname, save the user pathname. */ - if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG_UPATH1_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); - if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG_UPATH2_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); + if (AUDITING_TD(td)) { + if (cnp->cn_flags & AUDITVNODE1) + AUDIT_ARG_UPATH1_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); + if (cnp->cn_flags & AUDITVNODE2) + AUDIT_ARG_UPATH2_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); + } if (ndp->ni_startdir != NULL && !startdir_used) vrele(ndp->ni_startdir); if (error != 0) { From nobody Wed May 3 07:22:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB7gy101kz492Fq; Wed, 3 May 2023 07:22: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 4QB7gy0YJdz4WLl; Wed, 3 May 2023 07:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyumgTl1u8//59moXrNFE3eUOekVzFTR9/KBi0vLAWA=; b=d5hB/t+u9kqEiZYeltbki2mC5U0/by9odW4Fr0bsQ7ehrYEv9V2hJxben6CYuibeEtYJSS o/xxezjcLBow4HbxLUHID7MShszxRLZG6pezcnO+CwhaqjZUMWQ6mUqgqOq3PKK2Ca7puG 6OO2OIglDH7/P4h8+v/J7H+zlih9xoTxcfaoI6JCCfsnWeJ50VAXVaq3ssXwbEMSVafhfu BhumpB9vIyKLRXVfmsGX7lUo88rfggynttb6yKjrPP9ZYZd/XP/KEFcDkJbfQfBewzRKpz S4caI/uyBsslvqaBI2wEDW2+04DbVrUcSLg6ZWl2nNfo8ttRc0iOuOEdf/PY5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyumgTl1u8//59moXrNFE3eUOekVzFTR9/KBi0vLAWA=; b=YjbXW6Dk5y87Rk51zUdWiXINiCyaYHNcoGoteafBdw9um+dWUmTwvfRH4Tx/csCl2c8eTB hqAwupgQ0YzNFvrYuWvJ/08muOgRjM1tYjoxmy3gAvPvuI3r3fTly9J7KU8Jcyoo0P4JMy hY6ZrsQ7h8TLJ4zqIBF8KwGrW5fkj2CW9pnnFAxYpmE9v6uoBeY+5qzMReCMbX02ItiB8O Rssg9BR0+VowDEAaHypds5hjNzT8e1GrLMfr/uahyCLUqmL007UDAYImjiafWr0dLrcC4L Gk4MMJf2f473TcoAGfVebO3jnXEnavlIccP/04jQ2+hOf/5PARhhwDzIfiDKaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683098558; a=rsa-sha256; cv=none; b=mB7gyVCZX3Un/spU/9ShZSnx265x5fUMZ7lc6qQIJoWiWh4msqBQSVzPB+HIeCzsnmUSpk 2HoIsI/fkmQ7EhPA47ylEJ1VPPNZQQRa7w4tyzCmzkQNTdU5hCMR0Yw0B3OQJmwbDtYnvx j7gMn81gpcQf/lNl+A571OqSYbR2HuCiCliWQwaUJAG5PxPk49N93UJDNqTG/cqfCSz8AG Pn2zCQCQCrPZmgPvBxvk2gwcXSEvUhS9cBYdoFl7AjDX5iOJ3ghMwEzAlHpYW0+B3otCiv oFZjSFaKceRoL+RzeIcte0QM9sR5qLA0omlQj+e0e83tQQIZJiSdxMTq7KNTwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB7gx6kFZzM9r; Wed, 3 May 2023 07:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3437MbUO065378; Wed, 3 May 2023 07:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3437MbGj065377; Wed, 3 May 2023 07:22:37 GMT (envelope-from git) Date: Wed, 3 May 2023 07:22:37 GMT Message-Id: <202305030722.3437MbGj065377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: f15b2e1afd57 - main - RELNOTES: Add fwget entry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f15b2e1afd572c7a8ebc7e599e04eb1797fec6fc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f15b2e1afd572c7a8ebc7e599e04eb1797fec6fc commit f15b2e1afd572c7a8ebc7e599e04eb1797fec6fc Author: Emmanuel Vadot AuthorDate: 2023-05-03 07:20:35 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-03 07:20:35 +0000 RELNOTES: Add fwget entry Sponsored by: Beckhoff Automation GmbH & Co. KG --- RELNOTES | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RELNOTES b/RELNOTES index b13c0738f70b..6434375089a0 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,13 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +d198b8774d2c + Add a new "fwget" utility. + The goal of this utility is to inspect the system for peripherals + that needs firmware and install the appropriate packages for them. + For now only pci subsystem is supported and only firmwares for Intel + and AMD GPUs are known. + 896516e54a8c Add a new "syskrb5" mount option for Kerberized NFSv4.1/4.2 mounts. Without this patch, a Kerberized NFSv4.1/4.2 mount must provide From nobody Wed May 3 07:22:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB7gz53rVz492Fw; Wed, 3 May 2023 07:22: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 4QB7gz1S0Hz4WP9; Wed, 3 May 2023 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMowLg8BixizSzThJDKOHQ7S0RR48RZbRryUi/sk7DA=; b=PYp3Q/Pq3mW1tRQOgmjZRGUvdKFrOWVM6DT9btFqEF98rQSG2wNIKt3/JmjEChT51432R0 veUkgnxyzd3tekfP+tU3bykYwvuHlTg/VQ7lK78oEidua3uxM79dnCzsPaqJ81TRbT5QkO asbXlpFykjT3v6odsd02Ebvm08V+O0DwCzD5vZeItxn2pJnXebRkcZIe7bgk7yrveFORNE y259eYTvk/NKHIHoXIUQxoFC/7i8Aw+Fd5WxRJVlAcq6O3HYvRFlmrb/C3ztFxebxW0/b0 PtyAC2loKgcNJhgIozyM6cHUzzGSXTN3n7mMJ/vnHDLyxRZgXjp3bnzl8rpfhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMowLg8BixizSzThJDKOHQ7S0RR48RZbRryUi/sk7DA=; b=QjtXZ/dpr9fjo6L5GoRqI3QCijC365g8qdEjF169pB3OCd54tlV+OOj891GUee4oIbeIAj hbbgrEW94Y9/FN8zOLE+94uThWGk6nkUuXjcmeOP5/YlKITj/EuBUAyxzZW7NaiznH/rTR O3aGlJ5znUbZcqNkm4q7K8ngW7gIslevx9G8qfF+xnE70svBLD/3VY6xdYjmnOueY+cBuU 57g7xCfOWp+pQGk4pZEHSALJbfZ8G5who9oR7+aRs1NCgv2IFiEJA+sQkAt1wn+LDpzuKz iXHBNnbJo/CKBmmajomh9+S9WAbjuUZABFM8azygj4BlR2hgBCXlcHL6rOKCLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683098559; a=rsa-sha256; cv=none; b=kd581ROZjYBWNKZTUOdibxCnpHGBCZFwN+gneP4BENaByTv2Q2Bkwd9gxorvx4clclzaJU 09jRlKaaNloFjdoDZ7BpEnA96U66saCZr/BniPhJURHU90rSUQZrUwNmQCtGfSyUp7dCd1 upGKgNp8ebTC0ynOmF0ols+UsStOTUb2PWrzypPKj9yJxaGacfntLRoQ82+SxEl6zKow8q UhWxmwTg7jZiDurF7h/j3sn1a5qnO0FLBeeZFz+y2PSurM1Hhb7kaOEqRpCDLoBB+esFat EhCylrfV83oqM9iy6APrzbew81RvGF5jBZOHfmCIYbCkeDcOtkr53JZ6vE6ycA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB7gz0XQHzLR3; Wed, 3 May 2023 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3437MckX065397; Wed, 3 May 2023 07:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3437McYR065396; Wed, 3 May 2023 07:22:38 GMT (envelope-from git) Date: Wed, 3 May 2023 07:22:38 GMT Message-Id: <202305030722.3437McYR065396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1d7355248b5c - main - RELNOTES: Document TI code removal from armv7 GENERIC kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d7355248b5cf3b0d09247c6c7c4ff2d40c39945 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1d7355248b5cf3b0d09247c6c7c4ff2d40c39945 commit 1d7355248b5cf3b0d09247c6c7c4ff2d40c39945 Author: Emmanuel Vadot AuthorDate: 2023-05-03 07:21:58 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-03 07:21:58 +0000 RELNOTES: Document TI code removal from armv7 GENERIC kernel Suggested by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG --- RELNOTES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELNOTES b/RELNOTES index 6434375089a0..4d69e2bbc36d 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,12 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +3416e102c4e9 + Remove TI code from armv7 GENERIC kernel. + This code doesn't cope with newer DTS and hasn't in a long time so + support for TI armv7 platform (like BeagleBone and Pandaboard) is now + removed from GENERIC. + d198b8774d2c Add a new "fwget" utility. The goal of this utility is to inspect the system for peripherals From nobody Wed May 3 09:55:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBC402Xd2z4991B; Wed, 3 May 2023 09:55:12 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBC3z6N6Mz3KwT; Wed, 3 May 2023 09:55:11 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 3439t8Zs093984; Wed, 3 May 2023 12:55:08 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 3439t847093983; Wed, 3 May 2023 12:55:08 +0300 (MSK) (envelope-from dchagin) Date: Wed, 3 May 2023 12:55:08 +0300 From: Dmitry Chagin To: Mateusz Guzik Cc: Mark Johnston , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4QBC3z6N6Mz3KwT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 11:08:23PM +0200, Mateusz Guzik wrote: > On 5/2/23, Mateusz Guzik wrote: > > right, this should do it > > > > diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c > > index e4977392349f..b583eed5e249 100644 > > --- a/sys/kern/vfs_cache.c > > +++ b/sys/kern/vfs_cache.c > > @@ -4435,6 +4435,7 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, > > struct vnode **vpp) > > if ((*vpp)->v_type != VDIR) { > > if (!((cnp->cn_flags & EMPTYPATH) != 0 && > > cnp->cn_pnbuf[0] == '\0')) { > > cache_fpl_smr_exit(fpl); > > + ndp->ni_resflags |= NIRES_EMPTYPATH; > > return (cache_fpl_handled_error(fpl, ENOTDIR)); > > } > > } > > > > on another look it already works fine as is, I miseed the ! in the condition ;) ugh, thanks, looks like it's time for me to sleep it off )) > > #include > #include > > int > main(void) > { > struct stat sb; > int fd; > > fd = open("/etc/fstab", O_RDONLY); > > fstatat(fd, "", &sb, AT_EMPTY_PATH); > } > > openat(AT_FDCWD,"/etc/fstab",O_RDONLY,00) = 3 (0x3) > fstatat(3,"",{ mode=-rw-r--r-- ,inode=370100,size=145,blksize=4096 > },AT_EMPTY_PATH) = 0 (0x0) > > dtrace -n 'vfs:fplookup:: /execname == "a.out"/ { @[stack(), arg1, > arg2] = count(); }' > [snip] > kernel`kern_statat+0xec > kernel`sys_fstatat+0x27 > kernel`amd64_syscall+0x109 > kernel`0xffffffff809726bb > 4980 3 1 > > as in handled in cache_fplookup_emptypath > > > > > On 5/2/23, Dmitry Chagin wrote: > >> On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: > >>> On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: > >>> > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > >>> > > The branch main has been updated by kib: > >>> > > > >>> > > URL: > >>> > > https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > >>> > > > >>> > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > >>> > > Author: Konstantin Belousov > >>> > > AuthorDate: 2023-05-02 15:11:39 +0000 > >>> > > Commit: Konstantin Belousov > >>> > > CommitDate: 2023-05-02 15:11:39 +0000 > >>> > > > >>> > > fstatat(2): restore AT_EMPTY_PATH handling > >>> > > > >>> > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > >>> > > Reported by: markj > >>> > > Sponsored by: The FreeBSD Foundation > >>> > > --- > >>> > > sys/kern/vfs_syscalls.c | 6 +++++- > >>> > > 1 file changed, 5 insertions(+), 1 deletion(-) > >>> > > > >>> > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > >>> > > index 5c0a291e3b0b..d68af4ea4d51 100644 > >>> > > --- a/sys/kern/vfs_syscalls.c > >>> > > +++ b/sys/kern/vfs_syscalls.c > >>> > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int > >>> > > fd, const char *path, > >>> > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > >>> > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > >>> > > > >>> > > - if ((error = namei(&nd)) != 0) > >>> > > + if ((error = namei(&nd)) != 0) { > >>> > > + if (error == ENOTDIR && > >>> > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > >>> > > + error = kern_fstat(td, fd, sbp); > >>> > > return (error); > >>> > > + } > >>> > > >>> > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag > >>> > >>> It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and > >>> returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing > >>> the error up. > >>> > >> > >> it call cache_fpl_handled_error() which is set status to > >> CACHE_FPL_STATUS_HADLED, namei() simply return error in that path > >> > >> > >>> > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > >>> > > NDFREE_PNBUF(&nd); > >>> > > vput(nd.ni_vp); > >>> > > >> > > > > > > -- > > Mateusz Guzik > > > > > -- > Mateusz Guzik From nobody Wed May 3 09:59:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBC8t20v4z499KM; Wed, 3 May 2023 09:59: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 4QBC8t1RV3z3Lst; Wed, 3 May 2023 09:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IvZzap/NEmOMYAXRli817Ri1xH1cXCe4rpPe3eHr2sE=; b=FuahQTDC+iP+hcc1jeuxRGWfP0cnMntYqmmDBT4/S2i1LYScm+AvSRlP2xZTO2pLDGYbcq cG6QglW6fpst40kl/eDSZ1NjFM2fux2Gq0IZudo09DGEkTX7TF5U9f1Ic9EEjW6f+g4WpX /j5kX5ltsZzdPosBk4M+sr/M6+o25szSfGNu0Aferus3OpmtILUoAvQzF1CWJnQ4u2hCSs oCAujZWvO3+LP6pHGfz9AKnTSBKukafXwrYilU2rQugPm6NfaJ5Ubh4MESpKGSjvjXOQFc hmvE60G6P+zzXSZjNO3QJ7dp64nnPWiiHjKtl/hpz588eauI/s1/MtVsWhEa/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IvZzap/NEmOMYAXRli817Ri1xH1cXCe4rpPe3eHr2sE=; b=ogbVubsroycfQYrhqChIIyERjQnHJLPJGUYtsCkLvXE8eyisVLB3ZZqpu4thObmnLcAczK aNUNTSr04j8lnyBvqrJy/DTJKtyzQM71TNP95rKO1rLciQeP5SbLCOSysT5VOhruj4RLCN 1w4u8+hZ157jhFIwcBfqGDQfl1HAouCc9LauxC6DvhiJBGo/qCaayEp/gqYfxmsOBXi26l 4MmV9GztIjHfSFJdvrXiWCKgH6DHAGFSfoHITCkPyLz36LWALsne7k6GbOOxW1vCOhVRsD KIfLfJWpaTFBastiLVdAG7swiIyoQ9kpc8fVVweZJ5OpczY5FKZBHb15RblbXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683107966; a=rsa-sha256; cv=none; b=DR8OEU5zXesaLigrpCslRv8rfNBEvgc8gr4oK5d6JeLyzCFDAI7ZXSnkIQMMpLMcUWOL9Y BnSsPJTyXWd5Jk/4z6iNZYhyUXs1uc14Vj9XNoH9n9Kilm2IswiL/gaZWbp/OYfZcizi3i wqru1HWzzd/t2cSmx+GPiAG8kKHsVqszn5HSVGuqiPtZVLBhwT+8ZuKgxN+KwsQlLmXjd0 VbYfJ6KHz9/FMNbiITQuEYqMTKroug9QcrOe9CgYMsHmkXvFIXCsMFWjOQcYgi7PtNLJ/5 B6zWvfRALKaUUUuhSG4TaghgxkB5UhNhthvH9s+V2w4yMpZM+KpbUMLRixl5QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBC8t0SHPzQtv; Wed, 3 May 2023 09:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3439xPxX014201; Wed, 3 May 2023 09:59:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3439xPpw014200; Wed, 3 May 2023 09:59:25 GMT (envelope-from git) Date: Wed, 3 May 2023 09:59:25 GMT Message-Id: <202305030959.3439xPpw014200@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: 7b676698856e - main - pf: simplify structs with anonymous unions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b676698856ec4604b2b93f4fa917767bfbfa66e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b676698856ec4604b2b93f4fa917767bfbfa66e commit 7b676698856ec4604b2b93f4fa917767bfbfa66e Author: Kristof Provost AuthorDate: 2023-05-03 06:02:43 +0000 Commit: Kristof Provost CommitDate: 2023-05-03 08:24:20 +0000 pf: simplify structs with anonymous unions Rather than playing preprocessor hacks use actual anonymous unions. No functional change. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 24 +++++++++--------------- sys/netpfil/pf/pf.h | 20 +++++--------------- sys/netpfil/pf/pf_table.c | 26 ++++++++++---------------- 3 files changed, 24 insertions(+), 46 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index c1550f2c30e6..412453f8dd25 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1704,32 +1704,26 @@ struct pfioc_state_kill { struct pfioc_states { int ps_len; union { - caddr_t psu_buf; - struct pfsync_state *psu_states; - } ps_u; -#define ps_buf ps_u.psu_buf -#define ps_states ps_u.psu_states + caddr_t ps_buf; + struct pfsync_state *ps_states; + }; }; struct pfioc_states_v2 { int ps_len; uint64_t ps_req_version; union { - caddr_t psu_buf; - struct pf_state_export *psu_states; - } ps_u; -#define ps_buf ps_u.psu_buf -#define ps_states ps_u.psu_states + caddr_t ps_buf; + struct pf_state_export *ps_states; + }; }; struct pfioc_src_nodes { int psn_len; union { - caddr_t psu_buf; - struct pf_src_node *psu_src_nodes; - } psn_u; -#define psn_buf psn_u.psu_buf -#define psn_src_nodes psn_u.psu_src_nodes + caddr_t psn_buf; + struct pf_src_node *psn_src_nodes; + }; }; struct pfioc_if { diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index f226232419f8..fc3ea6c9e1d3 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -233,11 +233,9 @@ struct pfi_kif_cmp { struct pfi_kif { char pfik_name[IFNAMSIZ]; union { - RB_ENTRY(pfi_kif) _pfik_tree; - LIST_ENTRY(pfi_kif) _pfik_list; - } _pfik_glue; -#define pfik_tree _pfik_glue._pfik_tree -#define pfik_list _pfik_glue._pfik_list + RB_ENTRY(pfi_kif) pfik_tree; + LIST_ENTRY(pfi_kif) pfik_list; + }; u_int64_t pfik_packets[2][2][2]; u_int64_t pfik_bytes[2][2][2]; u_int32_t pfik_tzero; @@ -275,12 +273,7 @@ struct pf_addr { u_int8_t addr8[16]; u_int16_t addr16[8]; u_int32_t addr32[4]; - } pfa; /* 128-bit address */ -#define v4 pfa.v4 -#define v6 pfa.v6 -#define addr8 pfa.addr8 -#define addr16 pfa.addr16 -#define addr32 pfa.addr32 + }; /* 128-bit address */ }; #define PFI_AFLAG_NETWORK 0x01 @@ -344,10 +337,7 @@ struct pf_poolhashkey { u_int8_t key8[16]; u_int16_t key16[8]; u_int32_t key32[4]; - } pfk; /* 128-bit hash key */ -#define key8 pfk.key8 -#define key16 pfk.key16 -#define key32 pfk.key32 + }; /* 128-bit hash key */ }; struct pf_mape_portset { diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c index ea37b077c651..28d63b54c2d8 100644 --- a/sys/netpfil/pf/pf_table.c +++ b/sys/netpfil/pf/pf_table.c @@ -107,21 +107,15 @@ struct pfr_walktree { PFRW_COUNTERS } pfrw_op; union { - struct pfr_addr *pfrw1_addr; - struct pfr_astats *pfrw1_astats; - struct pfr_kentryworkq *pfrw1_workq; - struct pfr_kentry *pfrw1_kentry; - struct pfi_dynaddr *pfrw1_dyn; - } pfrw_1; + struct pfr_addr *pfrw_addr; + struct pfr_astats *pfrw_astats; + struct pfr_kentryworkq *pfrw_workq; + struct pfr_kentry *pfrw_kentry; + struct pfi_dynaddr *pfrw_dyn; + }; int pfrw_free; int pfrw_flags; }; -#define pfrw_addr pfrw_1.pfrw1_addr -#define pfrw_astats pfrw_1.pfrw1_astats -#define pfrw_workq pfrw_1.pfrw1_workq -#define pfrw_kentry pfrw_1.pfrw1_kentry -#define pfrw_dyn pfrw_1.pfrw1_dyn -#define pfrw_cnt pfrw_free #define senderr(e) do { rv = (e); goto _bad; } while (0) @@ -740,7 +734,7 @@ pfr_enqueue_addrs(struct pfr_ktable *kt, struct pfr_kentryworkq *workq, pfr_walktree, &w)) printf("pfr_enqueue_addrs: IPv6 walktree failed.\n"); if (naddr != NULL) - *naddr = w.pfrw_cnt; + *naddr = w.pfrw_free; } static void @@ -1068,7 +1062,7 @@ pfr_walktree(struct radix_node *rn, void *arg) /* FALLTHROUGH */ case PFRW_ENQUEUE: SLIST_INSERT_HEAD(w->pfrw_workq, ke, pfrke_workq); - w->pfrw_cnt++; + w->pfrw_free++; break; case PFRW_GET_ADDRS: if (w->pfrw_free-- > 0) { @@ -1089,7 +1083,7 @@ pfr_walktree(struct radix_node *rn, void *arg) case PFRW_POOL_GET: if (ke->pfrke_not) break; /* negative entries are ignored */ - if (!w->pfrw_cnt--) { + if (!w->pfrw_free--) { w->pfrw_kentry = ke; return (1); /* finish search */ } @@ -2347,7 +2341,7 @@ pfr_kentry_byidx(struct pfr_ktable *kt, int idx, int af) bzero(&w, sizeof(w)); w.pfrw_op = PFRW_POOL_GET; - w.pfrw_cnt = idx; + w.pfrw_free = idx; switch (af) { #ifdef INET From nobody Wed May 3 09:59:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBC8v4hWpz499ST; Wed, 3 May 2023 09:59: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 4QBC8v2G5wz3Ld1; Wed, 3 May 2023 09:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJAEtJfshjJ3mL8saCMLUNDKH/7a9yOPUbQUPYDIxtQ=; b=Tku05NJGOVmjj/btgigXgSddDh+BpIxQMXJUIPYZ90sCu9cci6m8ujC/JZ6yNcCqxJHr4I dncLJQVfArPF6UJUUTdVOMd+Cw7czBNADId8BqJM57lz2hmT7JDWiBoZGs9cWEle2HZb2C aDLLB8blzaqGSpiqhGDXqdihZt5jL4ay6zjaCGZ7iZRWmaa5l4+s9ddVP0BZgxybZQA+Db RQ2UmQNynDGfXg1WwMhIpyn/yNVIcZANYL1o/iwOHRiNVgRh5SrUzCGAd7XgMqTRUATygZ CmtbmcHIHmklC12HU6qJXW2bcLaJbEuHZrPjIZ/D8Ev8xFyJjWkNjpn4zz5A0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJAEtJfshjJ3mL8saCMLUNDKH/7a9yOPUbQUPYDIxtQ=; b=iJUSNF+JCHwqAsTEDUjczqBZw0iMM75J7kzNLqg9kwhrs1UUjPDIP284jszQuSQlDr+sLn L+bTjJQRRdJtkFiyCjehTXdLQbqmB7MmNWQ5V13mZAUS9YQFvHv17mqkVp3eb5DPO4gpJ7 6WmFDl0NtOyLkBwFZ5bH8s+uk6dCLZKgTRaplUrRiJjiY5cbcbEBfh2/UFMh29B+gfujSg wq7bZ6hSHXqNHhLO3keXrz0EbkIhbSctQxDt33u4oAyaXDfQToildNfN3Hn11eiPXdMPNZ Eo1DOgS9InqazoetHGjhajHmOqKzPeD50gf4Ms7Ry0WeD7d2FH9rVuj47yGwPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683107967; a=rsa-sha256; cv=none; b=VrVYgY4I6gSKO8+uvG+u1xy1sBrRKQE/EIHjQHsaGefaRjRJhlB0eqP7J462qKEAp3aYqB O3s6vHc+Z57q52qLz7GTXY9VlULcv3u2sFr3Es3M11xjWHQtrmn6xAtlygCU3eOeA4gStK SOiq5ZIxbCQ12Lg/ZRQLOKGxuzfdNNiKoC3EWqEVPa2wgkDfNXBTubKnUHiTIl/QT4BLwG YS1bwCnX1BU6HWHrNodvRyciPKmH63xh79zyE7XMQhP42ftsfK14eXMZMj4TWt1+T73OBf P+oVo2RXDpL6QDTueNkyy0P/Z4dUIJrcgtMz8J7xbf3ou7czCFTInYaY6EjpGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBC8v13tDzQyG; Wed, 3 May 2023 09:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3439xRuJ014220; Wed, 3 May 2023 09:59:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3439xR8T014219; Wed, 3 May 2023 09:59:27 GMT (envelope-from git) Date: Wed, 3 May 2023 09:59:27 GMT Message-Id: <202305030959.3439xR8T014219@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: 16303d2ba6b0 - main - pf: improve source node error handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16303d2ba6b099afa8ec8f2e97deca2785caa082 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=16303d2ba6b099afa8ec8f2e97deca2785caa082 commit 16303d2ba6b099afa8ec8f2e97deca2785caa082 Author: Kajetan Staszkiewicz AuthorDate: 2023-05-03 08:31:05 +0000 Commit: Kristof Provost CommitDate: 2023-05-03 08:31:05 +0000 pf: improve source node error handling Functions manipulating source nodes can fail due to various reasons like memory allocation errors, hitting configured limits or lack of redirection targets. Ensure those errors are properly caught and propagated in the code. Increase the error counters not only when parsing the main ruleset but the NAT ruleset too. Cherry-picked from development of D39880 Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D39940 --- sys/net/pfvar.h | 2 +- sys/netpfil/pf/pf.c | 50 ++++++++++++++++++++++++++++++-------------------- sys/netpfil/pf/pf_lb.c | 47 ++++++++++++++++++++++++++++------------------- 3 files changed, 59 insertions(+), 40 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 412453f8dd25..f72c3980438d 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2403,7 +2403,7 @@ int pf_step_out_of_keth_anchor(struct pf_keth_anchor_stackframe *, struct pf_keth_rule **, struct pf_keth_rule **, int *); -int pf_map_addr(u_int8_t, struct pf_krule *, +u_short pf_map_addr(u_int8_t, struct pf_krule *, struct pf_addr *, struct pf_addr *, struct pf_addr *, struct pf_ksrc_node **); struct pf_krule *pf_get_translation(struct pf_pdesc *, struct mbuf *, diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index e5f2a5ea57a0..ee17df0c866f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -329,7 +329,7 @@ static struct pf_kstate *pf_find_state(struct pfi_kkif *, struct pf_state_key_cmp *, u_int); static int pf_src_connlimit(struct pf_kstate **); static void pf_overload_task(void *v, int pending); -static int pf_insert_src_node(struct pf_ksrc_node **, +static u_short pf_insert_src_node(struct pf_ksrc_node **, struct pf_krule *, struct pf_addr *, sa_family_t); static u_int pf_purge_expired_states(u_int, int); static void pf_purge_unlinked_rules(void); @@ -865,11 +865,12 @@ pf_free_src_node(struct pf_ksrc_node *sn) uma_zfree(V_pf_sources_z, sn); } -static int +static u_short pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, struct pf_addr *src, sa_family_t af) { - struct pf_srchash *sh = NULL; + u_short reason = 0; + struct pf_srchash *sh = NULL; KASSERT((rule->rule_flag & PFRULE_SRCTRACK || rule->rpool.opts & PF_POOL_STICKYADDR), @@ -881,15 +882,19 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, if (*sn == NULL) { PF_HASHROW_ASSERT(sh); - if (!rule->max_src_nodes || - counter_u64_fetch(rule->src_nodes) < rule->max_src_nodes) - (*sn) = uma_zalloc(V_pf_sources_z, M_NOWAIT | M_ZERO); - else - counter_u64_add(V_pf_status.lcounters[LCNT_SRCNODES], - 1); + if (rule->max_src_nodes && + counter_u64_fetch(rule->src_nodes) >= rule->max_src_nodes) { + counter_u64_add(V_pf_status.lcounters[LCNT_SRCNODES], 1); + PF_HASHROW_UNLOCK(sh); + reason = PFRES_SRCLIMIT; + goto done; + } + + (*sn) = uma_zalloc(V_pf_sources_z, M_NOWAIT | M_ZERO); if ((*sn) == NULL) { PF_HASHROW_UNLOCK(sh); - return (-1); + reason = PFRES_MEMORY; + goto done; } for (int i = 0; i < 2; i++) { @@ -899,7 +904,8 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, if ((*sn)->bytes[i] == NULL || (*sn)->packets[i] == NULL) { pf_free_src_node(*sn); PF_HASHROW_UNLOCK(sh); - return (-1); + reason = PFRES_MEMORY; + goto done; } } @@ -926,10 +932,12 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, (*sn)->states >= rule->max_src_states) { counter_u64_add(V_pf_status.lcounters[LCNT_SRCSTATES], 1); - return (-1); + reason = PFRES_SRCLIMIT; + goto done; } } - return (0); +done: + return (reason); } void @@ -4581,7 +4589,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, struct pf_ksrc_node *sn = NULL; struct tcphdr *th = &pd->hdr.tcp; u_int16_t mss = V_tcp_mssdflt; - u_short reason; + u_short reason, sn_reason; /* check maximums */ if (r->max_states && @@ -4593,14 +4601,15 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, /* src node for filter rule */ if ((r->rule_flag & PFRULE_SRCTRACK || r->rpool.opts & PF_POOL_STICKYADDR) && - pf_insert_src_node(&sn, r, pd->src, pd->af) != 0) { - REASON_SET(&reason, PFRES_SRCLIMIT); + (sn_reason = pf_insert_src_node(&sn, r, pd->src, pd->af)) != 0) { + REASON_SET(&reason, sn_reason); goto csfailed; } /* src node for translation rule */ if (nr != NULL && (nr->rpool.opts & PF_POOL_STICKYADDR) && - pf_insert_src_node(&nsn, nr, &sk->addr[pd->sidx], pd->af)) { - REASON_SET(&reason, PFRES_SRCLIMIT); + (sn_reason = pf_insert_src_node(&nsn, nr, &sk->addr[pd->sidx], + pd->af)) != 0 ) { + REASON_SET(&reason, sn_reason); goto csfailed; } s = pf_alloc_state(M_NOWAIT); @@ -4689,8 +4698,9 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, } if (r->rt) { - if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { - REASON_SET(&reason, PFRES_MAPFAILED); + /* pf_map_addr increases the reason counters */ + if ((reason = pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, + &sn)) != 0) { pf_src_tree_remove_state(s); s->timeout = PFTM_UNLINKED; STATE_DEC_COUNTERS(s); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index ca8593a1c37d..a2f0224f842c 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -342,10 +342,11 @@ pf_get_mape_sport(sa_family_t af, u_int8_t proto, struct pf_krule *r, return (1); } -int +u_short pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, struct pf_addr *naddr, struct pf_addr *init_addr, struct pf_ksrc_node **sn) { + u_short reason = 0; struct pf_kpool *rpool = &r->rpool; struct pf_addr *raddr = NULL, *rmask = NULL; struct pf_srchash *sh = NULL; @@ -364,8 +365,10 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, /* If the supplied address is the same as the current one we've * been asked before, so tell the caller that there's no other * address to be had. */ - if (PF_AEQ(naddr, &(*sn)->raddr, af)) - return (1); + if (PF_AEQ(naddr, &(*sn)->raddr, af)) { + reason = PFRES_MAPFAILED; + goto done; + } PF_ACPY(naddr, &(*sn)->raddr, af); if (V_pf_status.debug >= PF_DEBUG_NOISY) { @@ -375,15 +378,15 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, pf_print_host(naddr, 0, af); printf("\n"); } - return (0); + goto done; } mtx_lock(&rpool->mtx); /* Find the route using chosen algorithm. Store the found route in src_node if it was given or found. */ if (rpool->cur->addr.type == PF_ADDR_NOROUTE) { - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } if (rpool->cur->addr.type == PF_ADDR_DYNIFTL) { switch (af) { @@ -392,8 +395,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, if (rpool->cur->addr.p.dyn->pfid_acnt4 < 1 && (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_ROUNDROBIN) { - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } raddr = &rpool->cur->addr.p.dyn->pfid_addr4; rmask = &rpool->cur->addr.p.dyn->pfid_mask4; @@ -404,8 +407,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, if (rpool->cur->addr.p.dyn->pfid_acnt6 < 1 && (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_ROUNDROBIN) { - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } raddr = &rpool->cur->addr.p.dyn->pfid_addr6; rmask = &rpool->cur->addr.p.dyn->pfid_mask6; @@ -414,8 +417,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, } } else if (rpool->cur->addr.type == PF_ADDR_TABLE) { if ((rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_ROUNDROBIN) { - mtx_unlock(&rpool->mtx); - return (1); /* unsupported */ + reason = PFRES_MAPFAILED; + goto done_pool_mtx; /* unsupported */ } } else { raddr = &rpool->cur->addr.v.a.addr; @@ -503,8 +506,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, /* table contains no address of type 'af' */ if (rpool->cur != acur) goto try_next; - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } } else if (rpool->cur->addr.type == PF_ADDR_DYNIFTL) { rpool->tblidx = -1; @@ -513,8 +516,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, /* table contains no address of type 'af' */ if (rpool->cur != acur) goto try_next; - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } } else { raddr = &rpool->cur->addr.v.a.addr; @@ -533,8 +536,6 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, if (*sn != NULL) PF_ACPY(&(*sn)->raddr, naddr, af); - mtx_unlock(&rpool->mtx); - if (V_pf_status.debug >= PF_DEBUG_NOISY && (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) { printf("pf_map_addr: selected address "); @@ -542,7 +543,15 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, printf("\n"); } - return (0); +done_pool_mtx: + mtx_unlock(&rpool->mtx); + +done: + if (reason) { + counter_u64_add(V_pf_status.counters[reason], 1); + } + + return (reason); } struct pf_krule * From nobody Wed May 3 10:25:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBClb0vtlz49BlF; Wed, 3 May 2023 10:26: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 4QBClb0c6Fz3Npb; Wed, 3 May 2023 10:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683109563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0inLDJVFF1fbJi4sDxdN/Xd+ZGfui/h/MGMh2wA0Ls=; b=hA85Mo6xLkfCS1Cdl30owlHMLbgk1pPuUYiAw+Wwuvda/Bl7ZGCAkOk1K301zEHAvXKugp 8ez/RAcywJhVtnZBpWb7+1c5SL0vsHYR04lYA4fF+F4NI2Uk9Y7daRNjbjkFrUr1zeK1SU xdspQqm3ty2VPlWOMmtJIpJddCiQrU97jGBJERDgZG3zwH6p7thgrURQX7RdT9qVnb9De0 YdlAOMBRxsxt6I8pSNG63nc4LKrF73hn3DQefGTsih20II/4yt1cr3bmGXBBPdF8vOtI/r BKbmoLs09zrEhUzJNJNMSANMNod/lZFcfmZi/A9Hlew1BDZILYNq1falTs/51A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683109563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0inLDJVFF1fbJi4sDxdN/Xd+ZGfui/h/MGMh2wA0Ls=; b=bNx6ytIbIPeNZ0ZqIenT52N+eMb//u4cU2iHpkHWzqWEMWw3JczUqCtbqomcSWRIIn5zNE 4/JTzO6OXF1COOef+C/GJ43z2ulMzR0somzFiL/Ivd2FUdwxb4voC9NBmOEsH8csaFZL9N OJ2KLWwudp82+lfLe58b9VhASURFxQfG3aHsHU/7Sw4H4GNjyzMDvldmPBQbt0okpOvXeG yQKHis8y5iCczFak8ke8phYcT+RUrcbsax4+EFVVqK2LeIXUIZxr4+n/+iPdY3OD3m2J9h VM57et8rZDTA/u1AqB41kL95jK9/eC94oWQCYx0E97CzInpRc+B4irb1hcq4lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683109563; a=rsa-sha256; cv=none; b=FuHly2Q+yAifyB7N3ikzRhyNukkeAs8hclBTWjPHahsXoAUCVXL08TlhYCQ73PC3FiLvnX 2R/DuriDIvm7Pff6ct84gZc10+LjGyc3hTVCpdArowOHgWrMMn0lNaJdlGvqL3mecsHll+ CPYndvJT2kURyLJPRecOJKwyXzM6Cg36GxUIsGcOXRPikPq83ImKmAg0OVCwoYlA/BRMhT CDtZ8getRdq0zBNdkr/GQYSNyvGg3HTAMJx8vdCYJbyKDQjLaDsgLJDvybkPmD/KcYxKWG uFQnCK5JR1K7P15DTBlg8ZQ7dEagHKCRgGLvlCFgsHP06tyt1kxrGtiBtAM9mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBClZ6m1mzRRb; Wed, 3 May 2023 10:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AQ2QX063823; Wed, 3 May 2023 10:26:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343APu5b063807; Wed, 3 May 2023 10:25:56 GMT (envelope-from git) Date: Wed, 3 May 2023 10:25:56 GMT Message-Id: <202305031025.343APu5b063807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: d411c1d696ef - main - zfs: merge openzfs/zfs@d96e29576 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d411c1d696ef35d60f8c3564e5eef7aeafa2fece Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=d411c1d696ef35d60f8c3564e5eef7aeafa2fece commit d411c1d696ef35d60f8c3564e5eef7aeafa2fece Merge: 16303d2ba6b0 d96e29576c89 Author: Martin Matuska AuthorDate: 2023-05-03 10:04:55 +0000 Commit: Martin Matuska CommitDate: 2023-05-03 10:04:55 +0000 zfs: merge openzfs/zfs@d96e29576 Notable upstream pull request merges: #11680 Add support for zpool user properties #14145 Storage device expansion "silently" fails on degraded vdev #14405 Create zap for root vdev #14659 Allow MMP to bypass waiting for other threads #14674 Miscellaneous FreBSD compilation bugfixes #14692 Fix some signedness issues in arc_evict() #14702 Fix typo in check_clones() #14715 module: small fixes for FreeBSD/aarch64 #14716 Trim needless zeroes from checksum events #14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter #14722 Fix "Detach spare vdev in case if resilvering does not happen" #14723 freebsd clone range fixes #14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS #14735 Fix in check_filesystem() #14739 Fix data corruption when cloning embedded blocks #14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic #14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()" #14774 FreeBSD .zfs fixups #14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration #14779 powerpc64: Support ELFv2 asm on Big Endian #14788 FreeBSD: add missing vop_fplookup assignments #14789 PAM: support the authentication facility #14790 Revert "Fix data race between zil_commit() and zil_suspend()" #14795 Fix positive ABD size assertion in abd_verify() #14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE #14804 Correct ABD size for split block ZIOs #14806 Use correct block pointer in block cloning case. #14808 blake3: fix up bogus checksums in face of cpu migration Obtained from: OpenZFS OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed lib/libbe/be.c | 8 +- lib/libbe/be_access.c | 6 +- lib/libbe/be_info.c | 4 +- sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 39 ++++++++- sys/contrib/openzfs/cmd/zfs/zfs_iter.c | 6 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 47 ++++++---- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 99 ++++++++++++++++------ sys/contrib/openzfs/config/kernel-acl.m4 | 34 ++++++-- .../openzfs/config/kernel-generic_fillattr.m4 | 33 ++++++-- sys/contrib/openzfs/config/kernel-inode-create.m4 | 41 +++++++-- sys/contrib/openzfs/config/kernel-inode-getattr.m4 | 63 ++++++++++---- .../openzfs/config/kernel-inode-permission.m4 | 35 ++++++-- sys/contrib/openzfs/config/kernel-inode-setattr.m4 | 87 +++++++++++++++++++ .../openzfs/config/kernel-is_owner_or_cap.m4 | 25 +++++- sys/contrib/openzfs/config/kernel-mkdir.m4 | 55 +++++++++--- sys/contrib/openzfs/config/kernel-mknod.m4 | 34 +++++++- sys/contrib/openzfs/config/kernel-rename.m4 | 56 ++++++++---- .../openzfs/config/kernel-setattr-prepare.m4 | 44 +++++++--- sys/contrib/openzfs/config/kernel-symlink.m4 | 33 ++++++-- sys/contrib/openzfs/config/kernel-tmpfile.m4 | 33 ++++++-- sys/contrib/openzfs/config/kernel-writepage_t.m4 | 26 ++++++ sys/contrib/openzfs/config/kernel-xattr-handler.m4 | 91 ++++++++++++-------- sys/contrib/openzfs/config/kernel.m4 | 8 +- .../openzfs/contrib/debian/control.modules.in | 4 +- .../contrib/dracut/90zfs/module-setup.sh.in | 3 + .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 15 +++- .../contrib/dracut/90zfs/zfs-generator.sh.in | 67 ++------------- .../openzfs/contrib/dracut/90zfs/zfs-lib.sh.in | 2 +- .../90zfs/zfs-nonroot-necessities.service.in | 20 +++++ .../dracut/90zfs/zfs-rollback-bootfs.service.in | 3 +- .../dracut/90zfs/zfs-snapshot-bootfs.service.in | 3 +- sys/contrib/openzfs/contrib/dracut/Makefile.am | 1 + sys/contrib/openzfs/contrib/initramfs/README.md | 25 +++++- sys/contrib/openzfs/contrib/initramfs/hooks/zfs.in | 3 + sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 10 +++ .../openzfs/contrib/pam_zfs_key/pam_zfs_key.c | 67 +++++++++++---- sys/contrib/openzfs/include/libzfs.h | 26 ++++-- sys/contrib/openzfs/include/libzutil.h | 1 + .../include/os/freebsd/spl/sys/simd_aarch64.h | 6 +- .../openzfs/include/os/freebsd/spl/sys/types.h | 2 +- .../include/os/freebsd/zfs/sys/zfs_vnops_os.h | 10 +-- .../include/os/linux/kernel/linux/blkdev_compat.h | 2 +- .../include/os/linux/kernel/linux/vfs_compat.h | 21 ++++- .../include/os/linux/kernel/linux/xattr_compat.h | 17 +++- .../openzfs/include/os/linux/spl/sys/cred.h | 30 ++++--- .../openzfs/include/os/linux/spl/sys/isa_defs.h | 18 +++- .../openzfs/include/os/linux/spl/sys/types.h | 15 +++- .../openzfs/include/os/linux/zfs/sys/policy.h | 6 +- .../openzfs/include/os/linux/zfs/sys/trace_zil.h | 8 ++ .../include/os/linux/zfs/sys/zfs_vnops_os.h | 15 ++-- sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 13 ++- sys/contrib/openzfs/include/sys/dmu_objset.h | 7 ++ sys/contrib/openzfs/include/sys/dnode.h | 10 ++- sys/contrib/openzfs/include/sys/fs/zfs.h | 1 + sys/contrib/openzfs/include/sys/spa.h | 3 + sys/contrib/openzfs/include/sys/vdev_impl.h | 1 + sys/contrib/openzfs/include/sys/zfs_acl.h | 10 +-- sys/contrib/openzfs/include/zfeature_common.h | 1 + .../openzfs/lib/libspl/include/sys/isa_defs.h | 18 +++- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 81 +++++++++++++++--- sys/contrib/openzfs/lib/libzfs/libzfs_changelist.c | 7 +- sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 18 ++-- sys/contrib/openzfs/lib/libzfs/libzfs_iter.c | 75 +++++++++++++--- sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 4 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 21 ++--- sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 2 +- sys/contrib/openzfs/lib/libzutil/zutil_import.c | 5 +- sys/contrib/openzfs/man/man4/zfs.4 | 10 ++- sys/contrib/openzfs/man/man7/dracut.zfs.7 | 16 ++-- sys/contrib/openzfs/man/man7/zfsprops.7 | 12 ++- sys/contrib/openzfs/man/man7/zpool-features.7 | 16 ++++ sys/contrib/openzfs/man/man7/zpoolconcepts.7 | 64 +++++++------- sys/contrib/openzfs/module/Makefile.bsd | 10 +++ sys/contrib/openzfs/module/lua/ldo.c | 2 + sys/contrib/openzfs/module/lua/setjmp/setjmp.S | 2 + .../openzfs/module/lua/setjmp/setjmp_loongarch64.S | 82 ++++++++++++++++++ .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 8 -- .../openzfs/module/os/freebsd/zfs/zfs_acl.c | 10 +-- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 15 ++-- sys/contrib/openzfs/module/os/linux/spl/spl-cred.c | 12 +++ sys/contrib/openzfs/module/os/linux/zfs/policy.c | 13 +-- sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c | 36 ++++---- sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_ioctl_os.c | 4 + .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 35 ++++---- .../openzfs/module/os/linux/zfs/zfs_znode.c | 2 +- .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 53 +++++++++--- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 38 +++++++-- .../openzfs/module/os/linux/zfs/zpl_inode.c | 77 ++++++++++++----- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 25 +++--- .../openzfs/module/zcommon/zfeature_common.c | 6 ++ sys/contrib/openzfs/module/zfs/arc.c | 8 +- sys/contrib/openzfs/module/zfs/dbuf.c | 3 +- sys/contrib/openzfs/module/zfs/mmp.c | 2 +- sys/contrib/openzfs/module/zfs/spa.c | 16 +++- sys/contrib/openzfs/module/zfs/spa_errlog.c | 12 +-- sys/contrib/openzfs/module/zfs/spa_misc.c | 29 ++++++- sys/contrib/openzfs/module/zfs/vdev.c | 50 +++++++++-- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 7 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 6 ++ sys/contrib/openzfs/module/zfs/vdev_queue.c | 3 + sys/contrib/openzfs/module/zfs/zfs_fm.c | 10 +-- sys/contrib/openzfs/module/zfs/zfs_replay.c | 14 +-- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 4 +- sys/contrib/openzfs/module/zfs/zil.c | 9 +- sys/contrib/openzfs/tests/runfiles/common.run | 19 +++-- sys/contrib/openzfs/tests/runfiles/linux.run | 6 +- .../tests/test-runner/bin/test-runner.py.in | 34 ++++---- .../openzfs/tests/zfs-tests/tests/Makefile.am | 4 + .../functional/cli_root/zdb/zdb_encrypted.ksh | 4 +- .../functional/cli_root/zpool_get/vdev_get.cfg | 73 ++++++++++++++++ .../cli_root/zpool_get/vdev_get_001_pos.ksh | 62 ++++++++++++++ .../functional/cli_root/zpool_get/zpool_get.cfg | 1 + .../cli_root/zpool_set/vdev_set_001_pos.ksh | 52 ++++++++++++ .../tests/functional/rsend/send-c_volume.ksh | 9 +- .../tests/functional/vdev_zaps/vdev_zaps.kshlib | 13 +++ .../functional/vdev_zaps/vdev_zaps_001_pos.ksh | 3 +- .../functional/vdev_zaps/vdev_zaps_002_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_003_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_004_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_005_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_006_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_007_pos.ksh | 1 + .../functional/zvol/zvol_misc/zvol_misc_trim.ksh | 4 +- sys/modules/zfs/zfs_config.h | 64 ++++++++++++-- sys/modules/zfs/zfs_gitrev.h | 2 +- 130 files changed, 2034 insertions(+), 640 deletions(-) diff --cc lib/libbe/be.c index a5e053cb82df,000000000000..a27025684305 mode 100644,000000..100644 --- a/lib/libbe/be.c +++ b/lib/libbe/be.c @@@ -1,1309 -1,0 +1,1309 @@@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2017 Kyle J. Kneitinger + * + * 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 REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "be.h" +#include "be_impl.h" + +struct promote_entry { + char name[BE_MAXPATHLEN]; + SLIST_ENTRY(promote_entry) link; +}; + +struct be_destroy_data { + libbe_handle_t *lbh; + char target_name[BE_MAXPATHLEN]; + char *snapname; + SLIST_HEAD(, promote_entry) promotelist; +}; + +#if SOON +static int be_create_child_noent(libbe_handle_t *lbh, const char *active, + const char *child_path); +static int be_create_child_cloned(libbe_handle_t *lbh, const char *active); +#endif + +/* Arbitrary... should tune */ +#define BE_SNAP_SERIAL_MAX 1024 + +/* + * Iterator function for locating the rootfs amongst the children of the + * zfs_be_root set by loader(8). data is expected to be a libbe_handle_t *. + */ +static int +be_locate_rootfs(libbe_handle_t *lbh) +{ + struct statfs sfs; + struct mnttab entry; + zfs_handle_t *zfs; + + /* + * Check first if root is ZFS; if not, we'll bail on rootfs capture. + * Unfortunately needed because zfs_path_to_zhandle will emit to + * stderr if / isn't actually a ZFS filesystem, which we'd like + * to avoid. + */ + if (statfs("/", &sfs) == 0) { + statfs2mnttab(&sfs, &entry); + if (strcmp(entry.mnt_fstype, MNTTYPE_ZFS) != 0) + return (1); + } else + return (1); + zfs = zfs_path_to_zhandle(lbh->lzh, "/", ZFS_TYPE_FILESYSTEM); + if (zfs == NULL) + return (1); + + strlcpy(lbh->rootfs, zfs_get_name(zfs), sizeof(lbh->rootfs)); + zfs_close(zfs); + return (0); +} + +/* + * Initializes the libbe context to operate in the root boot environment + * dataset, for example, zroot/ROOT. + */ +libbe_handle_t * +libbe_init(const char *root) +{ + char altroot[MAXPATHLEN]; + libbe_handle_t *lbh; + char *poolname, *pos; + int pnamelen; + + lbh = NULL; + poolname = pos = NULL; + + if ((lbh = calloc(1, sizeof(libbe_handle_t))) == NULL) + goto err; + + if ((lbh->lzh = libzfs_init()) == NULL) + goto err; + + /* + * Grab rootfs, we'll work backwards from there if an optional BE root + * has not been passed in. + */ + if (be_locate_rootfs(lbh) != 0) { + if (root == NULL) + goto err; + *lbh->rootfs = '\0'; + } + if (root == NULL) { + /* Strip off the final slash from rootfs to get the be root */ + strlcpy(lbh->root, lbh->rootfs, sizeof(lbh->root)); + pos = strrchr(lbh->root, '/'); + if (pos == NULL) + goto err; + *pos = '\0'; + } else + strlcpy(lbh->root, root, sizeof(lbh->root)); + + if ((pos = strchr(lbh->root, '/')) == NULL) + goto err; + + pnamelen = pos - lbh->root; + poolname = malloc(pnamelen + 1); + if (poolname == NULL) + goto err; + + strlcpy(poolname, lbh->root, pnamelen + 1); + if ((lbh->active_phandle = zpool_open(lbh->lzh, poolname)) == NULL) + goto err; + free(poolname); + poolname = NULL; + + if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_BOOTFS, lbh->bootfs, + sizeof(lbh->bootfs), NULL, true) != 0) + goto err; + + if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_ALTROOT, + altroot, sizeof(altroot), NULL, true) == 0 && + strcmp(altroot, "-") != 0) + lbh->altroot_len = strlen(altroot); + + return (lbh); +err: + if (lbh != NULL) { + if (lbh->active_phandle != NULL) + zpool_close(lbh->active_phandle); + if (lbh->lzh != NULL) + libzfs_fini(lbh->lzh); + free(lbh); + } + free(poolname); + return (NULL); +} + + +/* + * Free memory allocated by libbe_init() + */ +void +libbe_close(libbe_handle_t *lbh) +{ + + if (lbh->active_phandle != NULL) + zpool_close(lbh->active_phandle); + libzfs_fini(lbh->lzh); + free(lbh); +} + +/* + * Proxy through to libzfs for the moment. + */ +void +be_nicenum(uint64_t num, char *buf, size_t buflen) +{ + + zfs_nicenum(num, buf, buflen); +} + +static bool +be_should_promote_clones(zfs_handle_t *zfs_hdl, struct be_destroy_data *bdd) +{ + char *atpos; + + if (zfs_get_type(zfs_hdl) != ZFS_TYPE_SNAPSHOT) + return (false); + + /* + * If we're deleting a snapshot, we need to make sure we only promote + * clones that are derived from one of the snapshots we're deleting, + * rather than that of a snapshot we're not touching. This keeps stuff + * in a consistent state, making sure that we don't error out unless + * we really need to. + */ + if (bdd->snapname == NULL) + return (true); + + atpos = strchr(zfs_get_name(zfs_hdl), '@'); + return (strcmp(atpos + 1, bdd->snapname) == 0); +} + +/* + * This is executed from be_promote_dependent_clones via zfs_iter_dependents, + * It checks if the dependent type is a snapshot then attempts to find any + * clones associated with it. Any clones not related to the destroy target are + * added to the promote list. + */ +static int +be_dependent_clone_cb(zfs_handle_t *zfs_hdl, void *data) +{ + int err; + bool found; + const char *name; + struct nvlist *nvl; + struct nvpair *nvp; + struct be_destroy_data *bdd; + struct promote_entry *entry, *newentry; + + nvp = NULL; + err = 0; + bdd = (struct be_destroy_data *)data; + + if (be_should_promote_clones(zfs_hdl, bdd) && + (nvl = zfs_get_clones_nvl(zfs_hdl)) != NULL) { + while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) { + name = nvpair_name(nvp); + + /* + * Skip if the clone is equal to, or a child of, the + * destroy target. + */ + if (strncmp(name, bdd->target_name, + strlen(bdd->target_name)) == 0 || + strstr(name, bdd->target_name) == name) { + continue; + } + + found = false; + SLIST_FOREACH(entry, &bdd->promotelist, link) { + if (strcmp(entry->name, name) == 0) { + found = true; + break; + } + } + + if (found) + continue; + + newentry = malloc(sizeof(struct promote_entry)); + if (newentry == NULL) { + err = ENOMEM; + break; + } + +#define BE_COPY_NAME(entry, src) \ + strlcpy((entry)->name, (src), sizeof((entry)->name)) + if (BE_COPY_NAME(newentry, name) >= + sizeof(newentry->name)) { + /* Shouldn't happen. */ + free(newentry); + err = ENAMETOOLONG; + break; + } +#undef BE_COPY_NAME + + /* + * We're building up a SLIST here to make sure both that + * we get the order right and so that we don't + * inadvertently observe the wrong state by promoting + * datasets while we're still walking the tree. The + * latter can lead to situations where we promote a BE + * then effectively demote it again. + */ + SLIST_INSERT_HEAD(&bdd->promotelist, newentry, link); + } + nvlist_free(nvl); + } + zfs_close(zfs_hdl); + return (err); +} + +/* + * This is called before a destroy, so that any datasets(environments) that are + * dependent on this one get promoted before destroying the target. + */ +static int +be_promote_dependent_clones(zfs_handle_t *zfs_hdl, struct be_destroy_data *bdd) +{ + int err; + zfs_handle_t *clone; + struct promote_entry *entry; + + snprintf(bdd->target_name, BE_MAXPATHLEN, "%s/", zfs_get_name(zfs_hdl)); - err = zfs_iter_dependents(zfs_hdl, 0, true, be_dependent_clone_cb, bdd); ++ err = zfs_iter_dependents(zfs_hdl, true, be_dependent_clone_cb, bdd); + + /* + * Drain the list and walk away from it if we're only deleting a + * snapshot. + */ + if (bdd->snapname != NULL && !SLIST_EMPTY(&bdd->promotelist)) + err = BE_ERR_HASCLONES; + while (!SLIST_EMPTY(&bdd->promotelist)) { + entry = SLIST_FIRST(&bdd->promotelist); + SLIST_REMOVE_HEAD(&bdd->promotelist, link); + +#define ZFS_GRAB_CLONE() \ + zfs_open(bdd->lbh->lzh, entry->name, ZFS_TYPE_FILESYSTEM) + /* + * Just skip this part on error, we still want to clean up the + * promotion list after the first error. We'll then preserve it + * all the way back. + */ + if (err == 0 && (clone = ZFS_GRAB_CLONE()) != NULL) { + err = zfs_promote(clone); + if (err != 0) + err = BE_ERR_DESTROYMNT; + zfs_close(clone); + } +#undef ZFS_GRAB_CLONE + free(entry); + } + + return (err); +} + +static int +be_destroy_cb(zfs_handle_t *zfs_hdl, void *data) +{ + char path[BE_MAXPATHLEN]; + struct be_destroy_data *bdd; + zfs_handle_t *snap; + int err; + + bdd = (struct be_destroy_data *)data; + if (bdd->snapname == NULL) { - err = zfs_iter_children(zfs_hdl, 0, be_destroy_cb, data); ++ err = zfs_iter_children(zfs_hdl, be_destroy_cb, data); + if (err != 0) + return (err); + return (zfs_destroy(zfs_hdl, false)); + } + /* If we're dealing with snapshots instead, delete that one alone */ - err = zfs_iter_filesystems(zfs_hdl, 0, be_destroy_cb, data); ++ err = zfs_iter_filesystems(zfs_hdl, be_destroy_cb, data); + if (err != 0) + return (err); + /* + * This part is intentionally glossing over any potential errors, + * because there's a lot less potential for errors when we're cleaning + * up snapshots rather than a full deep BE. The primary error case + * here being if the snapshot doesn't exist in the first place, which + * the caller will likely deem insignificant as long as it doesn't + * exist after the call. Thus, such a missing snapshot shouldn't jam + * up the destruction. + */ + snprintf(path, sizeof(path), "%s@%s", zfs_get_name(zfs_hdl), + bdd->snapname); + if (!zfs_dataset_exists(bdd->lbh->lzh, path, ZFS_TYPE_SNAPSHOT)) + return (0); + snap = zfs_open(bdd->lbh->lzh, path, ZFS_TYPE_SNAPSHOT); + if (snap != NULL) + zfs_destroy(snap, false); + return (0); +} + +#define BE_DESTROY_WANTORIGIN (BE_DESTROY_ORIGIN | BE_DESTROY_AUTOORIGIN) +/* + * Destroy the boot environment or snapshot specified by the name + * parameter. Options are or'd together with the possible values: + * BE_DESTROY_FORCE : forces operation on mounted datasets + * BE_DESTROY_ORIGIN: destroy the origin snapshot as well + */ +static int +be_destroy_internal(libbe_handle_t *lbh, const char *name, int options, + bool odestroyer) +{ + struct be_destroy_data bdd; + char origin[BE_MAXPATHLEN], path[BE_MAXPATHLEN]; + zfs_handle_t *fs; + char *snapdelim; + int err, force, mounted; + size_t rootlen; + + bdd.lbh = lbh; + bdd.snapname = NULL; + SLIST_INIT(&bdd.promotelist); + force = options & BE_DESTROY_FORCE; + *origin = '\0'; + + be_root_concat(lbh, name, path); + + if ((snapdelim = strchr(path, '@')) == NULL) { + if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_FILESYSTEM)) + return (set_error(lbh, BE_ERR_NOENT)); + + if (strcmp(path, lbh->rootfs) == 0 || + strcmp(path, lbh->bootfs) == 0) + return (set_error(lbh, BE_ERR_DESTROYACT)); + + fs = zfs_open(lbh->lzh, path, ZFS_TYPE_FILESYSTEM); + if (fs == NULL) + return (set_error(lbh, BE_ERR_ZFSOPEN)); + + /* Don't destroy a mounted dataset unless force is specified */ + if ((mounted = zfs_is_mounted(fs, NULL)) != 0) { + if (force) { + zfs_unmount(fs, NULL, 0); + } else { + free(bdd.snapname); + return (set_error(lbh, BE_ERR_DESTROYMNT)); + } + } + } else { + /* + * If we're initially destroying a snapshot, origin options do + * not make sense. If we're destroying the origin snapshot of + * a BE, we want to maintain the options in case we need to + * fake success after failing to promote. + */ + if (!odestroyer) + options &= ~BE_DESTROY_WANTORIGIN; + if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_SNAPSHOT)) + return (set_error(lbh, BE_ERR_NOENT)); + + bdd.snapname = strdup(snapdelim + 1); + if (bdd.snapname == NULL) + return (set_error(lbh, BE_ERR_NOMEM)); + *snapdelim = '\0'; + fs = zfs_open(lbh->lzh, path, ZFS_TYPE_DATASET); + if (fs == NULL) { + free(bdd.snapname); + return (set_error(lbh, BE_ERR_ZFSOPEN)); + } + } + + /* + * Whether we're destroying a BE or a single snapshot, we need to walk + * the tree of what we're going to destroy and promote everything in our + * path so that we can make it happen. + */ + if ((err = be_promote_dependent_clones(fs, &bdd)) != 0) { + free(bdd.snapname); + + /* + * If we're just destroying the origin of some other dataset + * we were invoked to destroy, then we just ignore + * BE_ERR_HASCLONES and return success unless the caller wanted + * to force the issue. + */ + if (odestroyer && err == BE_ERR_HASCLONES && + (options & BE_DESTROY_AUTOORIGIN) != 0) + return (0); + return (set_error(lbh, err)); + } + + /* + * This was deferred until after we promote all of the derivatives so + * that we grab the new origin after everything's settled down. + */ + if ((options & BE_DESTROY_WANTORIGIN) != 0 && + zfs_prop_get(fs, ZFS_PROP_ORIGIN, origin, sizeof(origin), + NULL, NULL, 0, 1) != 0 && + (options & BE_DESTROY_ORIGIN) != 0) + return (set_error(lbh, BE_ERR_NOORIGIN)); + + /* + * If the caller wants auto-origin destruction and the origin + * name matches one of our automatically created snapshot names + * (i.e. strftime("%F-%T") with a serial at the end), then + * we'll set the DESTROY_ORIGIN flag and nuke it + * be_is_auto_snapshot_name is exported from libbe(3) so that + * the caller can determine if it needs to warn about the origin + * not being destroyed or not. + */ + if ((options & BE_DESTROY_AUTOORIGIN) != 0 && *origin != '\0' && + be_is_auto_snapshot_name(lbh, origin)) + options |= BE_DESTROY_ORIGIN; + + err = be_destroy_cb(fs, &bdd); + zfs_close(fs); + free(bdd.snapname); + if (err != 0) { + /* Children are still present or the mount is referenced */ + if (err == EBUSY) + return (set_error(lbh, BE_ERR_DESTROYMNT)); + return (set_error(lbh, BE_ERR_UNKNOWN)); + } + + if ((options & BE_DESTROY_ORIGIN) == 0) + return (0); + + /* The origin can't possibly be shorter than the BE root */ + rootlen = strlen(lbh->root); + if (*origin == '\0' || strlen(origin) <= rootlen + 1) + return (set_error(lbh, BE_ERR_INVORIGIN)); + + /* + * We'll be chopping off the BE root and running this back through + * be_destroy, so that we properly handle the origin snapshot whether + * it be that of a deep BE or not. + */ + if (strncmp(origin, lbh->root, rootlen) != 0 || origin[rootlen] != '/') + return (0); + + return (be_destroy_internal(lbh, origin + rootlen + 1, + options & ~BE_DESTROY_ORIGIN, true)); +} + +int +be_destroy(libbe_handle_t *lbh, const char *name, int options) +{ + + /* + * The consumer must not set both BE_DESTROY_AUTOORIGIN and + * BE_DESTROY_ORIGIN. Internally, we'll set the latter from the former. + * The latter should imply that we must succeed at destroying the + * origin, or complain otherwise. + */ + if ((options & BE_DESTROY_WANTORIGIN) == BE_DESTROY_WANTORIGIN) + return (set_error(lbh, BE_ERR_UNKNOWN)); + return (be_destroy_internal(lbh, name, options, false)); +} + +static void +be_setup_snapshot_name(libbe_handle_t *lbh, char *buf, size_t buflen) +{ + time_t rawtime; + int len, serial; + + time(&rawtime); + len = strlen(buf); + len += strftime(buf + len, buflen - len, "@%F-%T", localtime(&rawtime)); + /* No room for serial... caller will do its best */ + if (buflen - len < 2) + return; + + for (serial = 0; serial < BE_SNAP_SERIAL_MAX; ++serial) { + snprintf(buf + len, buflen - len, "-%d", serial); + if (!zfs_dataset_exists(lbh->lzh, buf, ZFS_TYPE_SNAPSHOT)) + return; + } +} + +bool +be_is_auto_snapshot_name(libbe_handle_t *lbh __unused, const char *name) +{ + const char *snap; + int day, hour, minute, month, second, serial, year; + + if ((snap = strchr(name, '@')) == NULL) + return (false); + ++snap; + /* We'll grab the individual components and do some light validation. */ + if (sscanf(snap, "%d-%d-%d-%d:%d:%d-%d", &year, &month, &day, &hour, + &minute, &second, &serial) != 7) + return (false); + return (year >= 1970) && (month >= 1 && month <= 12) && + (day >= 1 && day <= 31) && (hour >= 0 && hour <= 23) && + (minute >= 0 && minute <= 59) && (second >= 0 && second <= 60) && + serial >= 0; +} + +int +be_snapshot(libbe_handle_t *lbh, const char *source, const char *snap_name, + bool recursive, char *result) +{ + char buf[BE_MAXPATHLEN]; + int err; + + be_root_concat(lbh, source, buf); + + if ((err = be_exists(lbh, buf)) != 0) + return (set_error(lbh, err)); + + if (snap_name != NULL) { + if (strlcat(buf, "@", sizeof(buf)) >= sizeof(buf)) + return (set_error(lbh, BE_ERR_INVALIDNAME)); + + if (strlcat(buf, snap_name, sizeof(buf)) >= sizeof(buf)) + return (set_error(lbh, BE_ERR_INVALIDNAME)); + + if (result != NULL) + snprintf(result, BE_MAXPATHLEN, "%s@%s", source, + snap_name); + } else { + be_setup_snapshot_name(lbh, buf, sizeof(buf)); + + if (result != NULL && strlcpy(result, strrchr(buf, '/') + 1, + sizeof(buf)) >= sizeof(buf)) + return (set_error(lbh, BE_ERR_INVALIDNAME)); + } + if ((err = zfs_snapshot(lbh->lzh, buf, recursive, NULL)) != 0) { + switch (err) { + case EZFS_INVALIDNAME: + return (set_error(lbh, BE_ERR_INVALIDNAME)); + + default: + /* + * The other errors that zfs_ioc_snapshot might return + * shouldn't happen if we've set things up properly, so + * we'll gloss over them and call it UNKNOWN as it will + * require further triage. + */ + if (errno == ENOTSUP) + return (set_error(lbh, BE_ERR_NOPOOL)); + return (set_error(lbh, BE_ERR_UNKNOWN)); + } + } + + return (BE_ERR_SUCCESS); +} + + +/* + * Create the boot environment specified by the name parameter + */ +int +be_create(libbe_handle_t *lbh, const char *name) +{ + int err; + + err = be_create_from_existing(lbh, name, be_active_path(lbh)); + + return (set_error(lbh, err)); +} + +static int +be_deep_clone_prop(int prop, void *cb) +{ + int err; + struct libbe_dccb *dccb; + zprop_source_t src; + char pval[BE_MAXPATHLEN]; + char source[BE_MAXPATHLEN]; + char *val; + + dccb = cb; + /* Skip some properties we don't want to touch */ + if (prop == ZFS_PROP_CANMOUNT) + return (ZPROP_CONT); + + /* Don't copy readonly properties */ + if (zfs_prop_readonly(prop)) + return (ZPROP_CONT); + + if ((err = zfs_prop_get(dccb->zhp, prop, (char *)&pval, + sizeof(pval), &src, (char *)&source, sizeof(source), false))) + /* Just continue if we fail to read a property */ + return (ZPROP_CONT); + + /* + * Only copy locally defined or received properties. This continues + * to avoid temporary/default/local properties intentionally without + * breaking received datasets. + */ + if (src != ZPROP_SRC_LOCAL && src != ZPROP_SRC_RECEIVED) + return (ZPROP_CONT); + + /* Augment mountpoint with altroot, if needed */ + val = pval; + if (prop == ZFS_PROP_MOUNTPOINT) + val = be_mountpoint_augmented(dccb->lbh, val); + + nvlist_add_string(dccb->props, zfs_prop_to_name(prop), val); + + return (ZPROP_CONT); +} + +/* + * Return the corresponding boot environment path for a given + * dataset path, the constructed path is placed in 'result'. + * + * example: say our new boot environment name is 'bootenv' and + * the dataset path is 'zroot/ROOT/default/data/set'. + * + * result should produce: 'zroot/ROOT/bootenv/data/set' + */ +static int +be_get_path(struct libbe_deep_clone *ldc, const char *dspath, char *result, int result_size) +{ + char *pos; + char *child_dataset; + + /* match the root path for the boot environments */ + pos = strstr(dspath, ldc->lbh->root); + + /* no match, different pools? */ + if (pos == NULL) + return (BE_ERR_BADPATH); + + /* root path of the new boot environment */ + snprintf(result, result_size, "%s/%s", ldc->lbh->root, ldc->bename); + + /* gets us to the parent dataset, the +1 consumes a trailing slash */ + pos += strlen(ldc->lbh->root) + 1; + + /* skip the parent dataset */ + if ((child_dataset = strchr(pos, '/')) != NULL) + strlcat(result, child_dataset, result_size); + + return (BE_ERR_SUCCESS); +} + +static int +be_clone_cb(zfs_handle_t *ds, void *data) +{ + int err; + char be_path[BE_MAXPATHLEN]; + char snap_path[BE_MAXPATHLEN]; + const char *dspath; + zfs_handle_t *snap_hdl; + nvlist_t *props; + struct libbe_deep_clone *ldc; + struct libbe_dccb dccb; + + ldc = (struct libbe_deep_clone *)data; + dspath = zfs_get_name(ds); + + snprintf(snap_path, sizeof(snap_path), "%s@%s", dspath, ldc->snapname); + + /* construct the boot environment path from the dataset we're cloning */ + if (be_get_path(ldc, dspath, be_path, sizeof(be_path)) != BE_ERR_SUCCESS) + return (BE_ERR_UNKNOWN); + + /* the dataset to be created (i.e. the boot environment) already exists */ + if (zfs_dataset_exists(ldc->lbh->lzh, be_path, ZFS_TYPE_DATASET)) + return (BE_ERR_EXISTS); + + /* no snapshot found for this dataset, silently skip it */ + if (!zfs_dataset_exists(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) + return (0); + + if ((snap_hdl = + zfs_open(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) == NULL) + return (BE_ERR_ZFSOPEN); + + nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP); + nvlist_add_string(props, "canmount", "noauto"); + + dccb.lbh = ldc->lbh; + dccb.zhp = ds; + dccb.props = props; + if (zprop_iter(be_deep_clone_prop, &dccb, B_FALSE, B_FALSE, + ZFS_TYPE_FILESYSTEM) == ZPROP_INVAL) + return (-1); + + if ((err = zfs_clone(snap_hdl, be_path, props)) != 0) + return (BE_ERR_ZFSCLONE); + + nvlist_free(props); + zfs_close(snap_hdl); + + if (ldc->depth_limit == -1 || ldc->depth < ldc->depth_limit) { + ldc->depth++; - err = zfs_iter_filesystems(ds, 0, be_clone_cb, ldc); ++ err = zfs_iter_filesystems(ds, be_clone_cb, ldc); + ldc->depth--; + } + + return (err); +} + +/* + * Create a boot environment with a given name from a given snapshot. + * Snapshots can be in the format 'zroot/ROOT/default@snapshot' or + * 'default@snapshot'. In the latter case, 'default@snapshot' will be prepended + * with the root path that libbe was initailized with. +*/ +static int +be_clone(libbe_handle_t *lbh, const char *bename, const char *snapshot, int depth) +{ + int err; + char snap_path[BE_MAXPATHLEN]; + char *parentname, *snapname; *** 2351 LINES SKIPPED *** From nobody Wed May 3 11:11:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBDmD5yj4z49Dcd for ; Wed, 3 May 2023 11:11:40 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-19.consmr.mail.gq1.yahoo.com (sonic305-19.consmr.mail.gq1.yahoo.com [98.137.64.82]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBDmC6w0Hz3js8 for ; Wed, 3 May 2023 11:11:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=AqX6624o; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683112298; bh=7lB0Ya6UTfmMsy4T6W3Ri3Ls7V5ng0LIRnDQg2N6zPQ=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=AqX6624o7hQrPLTgFD9Uu2axVEp8tQTcyQA4xDpuOrjvOzM2RnZsGmvMhIxLRcd2L5MjzQR5dAZg55ef48QTn33kbA2oHSGYZmbwF6SKmcfJQ78Dw1OjVBnGY3wjJ2VKrBJCTcMzNylf79Yz49tROw0c3t8QHR7iZ+Z35RTzyOb0nqa2OzNYmVTEIPBEzKJknP+YYjKaEGRsmmKPy/IGjM5rz1qrjlPNG9u5PnMKssWvGFgK7VZvfCdUh5+N5aImo6n6tW422HgfxaMFKbGZofiMAP79UuZrB2P6FmMnbmrTtHXnrmkS6topcI37VmWlvwvvFPm9uAtXXXltx3e65Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683112298; bh=11ndbhE3Ilxfxhuphnl8gMe26VGEoFrIZ8TqNyceQi7=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=U4zCVNPcltA1bc7VqMbj1Wu2A5oknj99fALZJWMbvNXgAXUTzuIVuND3mLUE9M6jtlUgtIoIrMbPyl7qIxWaXRKbt7AW8U+PSA1V0FFqxZTs7WXqoID/m7ZIPLMr96av/DLI9+dTkJFbZNgDuvWEkfRaCii0+TwZRMq0a8CqSEPuHVuZKfc0AhavDR2QS6tYpBNya2MW/2eCKtncd3EXSHIgTp4kVkFNImfGNkjTQz6li459cNxrrkbDm2z/EnD7m6Wyx7084viEbS6VhgSdBugu8HUaLLQFXnQbtNivauK79r5uUn/TBK7fZ6UUtoOotObt+dQczvqC/Tmp9ie8UQ== X-YMail-OSG: jD3viHIVM1mOPr7i_6rGc2kWw_v441dQznJrdYeBuhTfkwZaFmTsrTTqLJAlpgM .XDpu2IJwzTCOZJ9WYPiGWI3llzKf0pcwPDtz5SuN5TDtWuYliKEPZFgBjlacLCv_sfAMwXKmd0x UMDeYkEBcXcJzDrCqHLdTVzrg2ulRCI7iDa8VksxNLMlm7DwnQg2Zsb1f31EQUAvLAb_F9pCLoMp bPwylJCKFjotJSC7_rXlnWm9fEtXVxS_2IiFnUvToJTIPSjoCuegeuZ7oIKcLAkGJ1duZLejxVUw sTVP1jq2tXieLxAJuKO9FxJtzC31nqjoewnj_dfxhQ0GRCxSyg9QaCZiOrt_6YxsJWE6cRkfoMv_ RriMHmlAVj2Uz_oPfLi3UxZuQQUkINdYnW6w9tRy3a9hBgBDm6GzDjT.OWs4gObfEzGXluehOKSn ZP4DD8kXX7qHu02ztH6xDpGntDphWnXtBUMEyvrNffwhrbwMjNxS3mK6cRXTr9erdSI8DpjFOpB1 2xEYCPmPcPlvHp8VERsOnACopkFdc998_1BIAXHnrwtYAmAeSrPZQShv7hh7qrvPZBU6A_AVFNm1 AsUtGuAfJamC2nFh2_ys1HQrLdfmpuVJacQFcJ5XGXhuKNMP6lOraWpU92ALYdtUrZiHdZF9qLxT IwneuW2WsTfcQxV39RGr4UkAPWXPnMchOOuP211swGZSU9iUzkgRx.kKS_0fnwFdw_ddcGu40tIT _IDXvX7GEFr4QqM5whZQrUubb6SZ3TnI.jLsdPqxSxhW7DGPbrlKWjXvSzIibORaLyL_eycViuJ6 6h.ozha26Y5Bg5MCJModlomyxWL1jmFKcEQx0_5g3n3YyBthhXbnvLPXOqWrCOKHSKBy1G_tniXa BO4kEpcluqbgx.WV9SsCGlFwUrfiw11Ey3R46zvQEi2hBROYvspbCVDoZBlKD5E4UtR02KtLEWjo xH6_mMDTE0cUMPCJ7gcuQwO5GBbkpCS.8XRFsXg7Rs.3X4Pvijwpwbzy3n1vor6mdaWs4zvfC7Fq rdBuRUqFeF9OD1iNmg22tmj6m9bO_NiBTg5jvlkscgjmWtGsHMm3qEBtm5L1PJrMUKJUOpugwina ehQMHT0efM7ugvXNL8r9VxhiioRHRCuS1yvi2hyB5p2CCmeNf4Q_SYIOPaD5ooWwbeer_vPEmo2A s_VhnVDaZgvYL7R5sr62ifXRn5XU51Qf7bnc.ZGo6DVeGFa4PRpg_s6cS..qMR4H8IMQu8a.VVOf 61eatRTG23A1k0kSebPXjupI.p5UHn5f9jg1RQWV7XKMvNJ7JgW0iGiFwrppln5fuznysptlYmMW eQ0gqZVh_t2M6G2gqwNieG58ole9Op0jPws3wqz_21wuz4QcrTcbT0Xjpg354B5PW8Up4PLImqC6 oHYrt2cApVFC6RTIIUMb4j3PW8f.X6SwaLKgGQzvc1hq_nkyml7pGoKTAXS6tDfHkUEDjPGjbOE9 XS6NiysplSuDxm.T9IeDFh_7G5SLh2xyfHGmOXXS_Y8eNfmPh4MNLxfQsBjwNLUTzwxVbDnuN4ud LKrdCPw7ME38vJ4hmg1mQi0j3vVso8SyXyV.ArgUDxj824_3C1WpOMOyMleBodFF_.dTj.FFSGmE b6R2oKsHr_OCKgcN4gspq66irvZCywBybjpSJ7IJQvkHhkPuY4nJsnZ7trXYS9TNNrOYK4x8KUar 0FXf95ac6TfcYWdVqzULedJLT3vS3jvfAzqada6ZFSPhKk15eLA5X_e41gOlhwvLmBCvA8etXRUc aVUx3nH07EwkzslhyeOC5IOVD47hXyPS_9Cp933Hr4FgIG_bxgFn27R22cHFBjABUAYlrLnXC247 t_2PxOzQcBvsWGoRul8_oqErWKR2ZOhEuzatYQS_QHeqLyprz5mej7K1.LS6SBNmfVT_TVspQi2y 0FNxqB_3iu_FktXTGjDBXxhvnmEElXQpI_DE.Neo1tHBRu_YKz0.4IMcl1y2l5_1wv.cfjSkewmH iHciVkEFqJXZubLIkzZuzbmdeKkG7V_tUgrRXc3VROVqCR.RUFHiFITBSo0bkkPTiZ5gXNZMPT6G Mjjuafdqc0RQ4A4qq.eZ3PiyM6yWKZET9pCmV5e3wlZJ21KcL50tWc77lJiYKG1FG9_.ULVzycgv E5gv.WlXR9V5CjGrJJ4GNtxlEuiv3apVsQ.6b2GRSSQatlpPh9fu6PiQ37Locqd0aLMGW4pu4uNa z8dtgVAUj.pUsWnU6iUDnE2mMRp1d4CmpjiidR9G6CiXBw4a1IHQhgBukPmPDAKIZsLQt9f.rnLC V X-Sonic-MF: X-Sonic-ID: a8f6ebe1-e2e3-4921-892a-afa98b66ed70 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Wed, 3 May 2023 11:11:38 +0000 Received: by hermes--production-ne1-7dbd98dd99-t5dz4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5f55902284da616046a0b78e0b4b9c9e; Wed, 03 May 2023 11:11:36 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: RE: git: d411c1d696ef - main - zfs: merge openzfs/zfs@d96e29576 Message-Id: <67B4513E-5CCD-4475-A0DA-D73E91323E81@yahoo.com> Date: Wed, 3 May 2023 04:11:24 -0700 To: Martin Matuska , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3731.400.51.1.1) References: <67B4513E-5CCD-4475-A0DA-D73E91323E81.ref@yahoo.com> X-Spamd-Result: default: False [-2.81 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.81)[-0.809]; SUBJECT_ENDS_SPACES(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.82:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org] X-Rspamd-Queue-Id: 4QBDmC6w0Hz3js8 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N Martin Matuska write on Date: Wed, 03 May 2023 10:25:56 UTC : > The branch main has been updated by mm: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dd411c1d696ef35d60f8c3564e5eef7ae= afa2fece >=20 > commit d411c1d696ef35d60f8c3564e5eef7aeafa2fece > Merge: 16303d2ba6b0 d96e29576c89 > Author: Martin Matuska > AuthorDate: 2023-05-03 10:04:55 +0000 > Commit: Martin Matuska > CommitDate: 2023-05-03 10:04:55 +0000 >=20 > zfs: merge openzfs/zfs@d96e29576 >=20 > Notable upstream pull request merges: > . . . > #14715 module: small fixes for FreeBSD/aarch64 > . . . That changed: openzfs/zfs/blob/master/include/os/freebsd/spl/sys/simd_aarch64.h But it looks like: openzfs/zfs/blob/master/include/os/freebsd/spl/sys/simd_arm.h was not updated and armv7 would likely still crash based on what openzfs has in its simd_arm.h : #define kfpu_allowed() 1 #define kfpu_initialize(tsk) do {} while (0) #define kfpu_begin() do {} while (0) #define kfpu_end() do {} while (0) #define kfpu_init() (0) #define kfpu_fini() do {} while (0) /* * Check if NEON is available */ static inline boolean_t zfs_neon_available(void) { return (elf_hwcap & HWCAP_NEON); } /* * Check if SHA256 is available */ static inline boolean_t zfs_sha256_available(void) { return (elf_hwcap2 & HWCAP2_SHA2); } =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Wed May 3 14:03:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBJZn0B1zz49NHf; Wed, 3 May 2023 14: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 4QBJZm6hdwz3xF1; Wed, 3 May 2023 14: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=1683122624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kd+dpIqXbyltQVLoS+vhhzpKUk28EAsLuowcTL2NkjI=; b=VoOj+d/V8ho26dv++Bj/qbijv0OSfWUSFD9Mk7KpQGuznpOEGIwV3xP2/7Z8184vALljfJ 0HRt4+dPqizwJu3YG/WjNG9aFeSEmt/cI2IOup7WMToUAv/WBaExTBkl8aD3lp5jawPIIA y2/MvjdQ7ztUC4T1DhYYzQXEoDzieYTWss1w+KGMCuzbG5f7xw7I8YLsWjGxlcCpk1IZEf gld+F5+q7YO/WaYR8f99pXJhE5aBnX0KRnqSNCeTTsMJZB4v90o6s0TZ43H2e3H/TqVsG6 yeGw37w6unI0F4iR8nYfenoSkc73t7YpPqNctlNUO1hHhX0GjbQpKg2avKpXeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683122624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kd+dpIqXbyltQVLoS+vhhzpKUk28EAsLuowcTL2NkjI=; b=oJ2rVPODjz/WxE6DwqRhvk5aHz8nZw0usp7JT0sS98mewn3JV2OKOaxfI1DxmfRqoD40VK ouJ0hjAATId7QewYl8bB+h8Si9aLqhp7ef3gs2OCNYio2MAH/3Mvt72tcE+WAfQBuxJqDd Q807BzvNe4htJ8qVe+/AcaN9Yd3aneJRGxtOwX9l/hQMbBTH2J+LR2gzni1tts3cEvivu7 u+ggrEmSUS0LyXMNK+DzNtlKHVZROCtFarKrf4s8hK0v+EXosmIehwUikLPBgfZgjNThg4 FhpoYYinHon3Q/acCWURH1HGw7PC+stKZDx7cMru3Hcm402hNi+JiueTl6S4Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683122624; a=rsa-sha256; cv=none; b=aCGcR06PGTR5jhaVePo5tNQpTsOF7Jn+hp2drqN+F9xNnT9mNLXTcEIGkCQoM8H2tEfj3w 4VW1ghPWXxpEax83qFgIQD2Xn1mczp5mEwSyh0d4RGD6eeSNxh3XwpU0sodh5w4QNbqpQL Qh9KO5N7cHLdJIeqBk1IlpeFpwtlapUU271WbxyNb9gZWAdpOj2LxFq3oCFWlfsZSFC4uj +GCz41lNlPV8YWEON1TDcpYLNVKnUPP4TmRQqm7rDs3TW8are1n3ADfjbJaGDM2ClDp2QX S0k05qHGWQgRWVbaOqInQqBn5+kS7oY47BB5OFj6lpR0bRxlnPjWKuRORW1kuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBJZm5mcFzXvL; Wed, 3 May 2023 14:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343E3ih8026297; Wed, 3 May 2023 14:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343E3iNN026296; Wed, 3 May 2023 14:03:44 GMT (envelope-from git) Date: Wed, 3 May 2023 14:03:44 GMT Message-Id: <202305031403.343E3iNN026296@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: 81f964e2ffb7 - main - authpf: do not sprintf to a null pointer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 commit 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 Author: Ed Maste AuthorDate: 2023-05-03 13:26:42 +0000 Commit: Ed Maste CommitDate: 2023-05-03 14:03:27 +0000 authpf: do not sprintf to a null pointer The fgetln loop will terminate with buf = NULL at EOF. Reported by: GCC Reviewed by: kp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39947 --- contrib/pf/authpf/authpf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 4032efb27895..5ffa5b9cfe43 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -566,9 +566,8 @@ allowed_luser(struct passwd *pw) syslog(LOG_INFO, "denied access to %s: not listed in %s", pw->pw_name, PATH_ALLOWFILE); - /* reuse buf */ - sprintf(buf, "%s", "\n\nSorry, you are not allowed to use this facility!\n"); - fputs(buf, stdout); + fputs("\n\nSorry, you are not allowed to use this facility!\n", + stdout); } fflush(stdout); return (0); From nobody Wed May 3 15:34:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBLZz1nqXz48y7n; Wed, 3 May 2023 15:34: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 4QBLZz14Djz462Y; Wed, 3 May 2023 15:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXLLHM7qGn5YRdjbLOmeaVWGLXRhZ8S1TRRvvq7VL4I=; b=j8A2SMPLqjQ20TbpF5roqP/MHV66XQOwGWpcaSBT8sK5m9odO/1qL6etpM8aGRS5KaFgUP I2ruQSe9YSskC85H0eFzu75rQgWXeWGgWgAeEsXKfM/PB+R108zcWv/RMUU8DFNOwq/SzB 1lQapGrfPUz7wf4j2o0jx8T4J2clrGgjyvpPD7fnprEOeQ5a5VOCz7dGYNggN4hD7bJoLp XXug2R+FeYiS+IXWcN0newvv3YTIC99C0cKP+Z3DiAswuRbIKcMYKpzLgVKbxgzRFaIBE3 q10bnK1MqSIr/cIkgUshVgTQyIRnmksdzYx1Wz35elJ5S7Wo9mXJBvapUCTNkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXLLHM7qGn5YRdjbLOmeaVWGLXRhZ8S1TRRvvq7VL4I=; b=YTTuFRG6k37wmfOCU93gDz4mOYuNGltdx/VHlzg3yb4QKRrjez0dSaUY1Tet6rbnMJhLYk kAXBzEQUyH+cE7nSbX4yrzlIucbDVLSQ2qAA/drI0HzH1mgGgbDGXdttJjuMWd5WaeydJ1 gmpl6ymIq4uKSIHPkSiaza78TaoQR1HYkDUGsNQNMz10OTTvXOefiqNEHq5OdBv2T0cmED L1omGeeAtvHXzoOUApqA7GqoyD+H6rwLpHelbp85ghY7VglRxQSBj/ABBkwXiEcXx7U6Z6 d3VL66qqg750Dyef1Mqp8KGLOcVrmN8zSH1o320MxHHbsCzJD+Wu2L+RuvaYwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683128043; a=rsa-sha256; cv=none; b=xlkpyxXouXuBT6YAhYfZr771eERx866lnYV4TY+7QKoqVbUoFu2rE8Uzg5yRnFZe+78egU DZfYOse7nImYGBcd62c9MwtgDBPt2XkqLZAXBRX6+ajrStKGxzrXlf3wkU9ZPKIPJddvDl tOd2XLM656K74wkaZGco34jiSE2Xrt+CS+ak+OpAzDgbMdklOpgRuUCdqnjRubXgVy8XNr 7Svspe9diHd0vhXRPoFpYvuPL2AytBk2y00aTSliJYonJ4f7FgQ8Bi0iiYFvFB8NfA7ZhS L8th8xEZZyDBRmTamg+/Cfcg/5lPPjFZ0aEG+EopMg7oprbY4s1+pl1ovUDURw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBLZz07g2zbRw; Wed, 3 May 2023 15:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343FY2OI074325; Wed, 3 May 2023 15:34:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343FY2Zu074324; Wed, 3 May 2023 15:34:02 GMT (envelope-from git) Date: Wed, 3 May 2023 15:34:02 GMT Message-Id: <202305031534.343FY2Zu074324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: d9ae4adff271 - main - sctp: improve shutdown(..., SHUT_WR) handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9ae4adff2715cfab4a941037ec15aa07108efa1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d9ae4adff2715cfab4a941037ec15aa07108efa1 commit d9ae4adff2715cfab4a941037ec15aa07108efa1 Author: Michael Tuexen AuthorDate: 2023-05-03 15:30:50 +0000 Commit: Michael Tuexen CommitDate: 2023-05-03 15:33:49 +0000 sctp: improve shutdown(..., SHUT_WR) handling When shutdown(..., SHUT_WR) is called in the front states, send a SHUTDOWN chunk when a COOKIE ACK chunk is received and there is no outstanding data. MFC after: 1 week --- sys/netinet/sctp_input.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 26abf4953164..fc362d091a22 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2782,16 +2782,13 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, __LINE__); } sctp_stop_all_cookie_timers(stcb); + sctp_toss_old_cookies(stcb, asoc); /* process according to association state */ if (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED) { /* state change only needed when I am in right state */ SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); sctp_start_net_timers(stcb); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } /* update RTO */ SCTP_STAT_INCR_COUNTER32(sctps_activeestab); SCTP_STAT_INCR_GAUGE32(sctps_currestab); @@ -2815,6 +2812,21 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, } } + if ((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) && + TAILQ_EMPTY(&asoc->send_queue) && + TAILQ_EMPTY(&asoc->sent_queue) && + (asoc->stream_queue_cnt == 0)) { + SCTP_STAT_DECR_GAUGE32(sctps_currestab); + SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); + sctp_stop_timers_for_shutdown(stcb); + sctp_send_shutdown(stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, + stcb->sctp_ep, stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, NULL); + sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_LOCKED); + } + if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { /* * We don't need to do the asconf thing, nor hb or @@ -2850,8 +2862,6 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, } } closed_socket: - /* Toss the cookie if I can */ - sctp_toss_old_cookies(stcb, asoc); /* Restart the timer if we have pending data */ TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { if (chk->whoTo != NULL) { From nobody Wed May 3 15:42:29 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBLmj50F8z48yfZ; Wed, 3 May 2023 15:42: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 4QBLmj4ZF3z46ws; Wed, 3 May 2023 15:42:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nTP4etru3nZ21JzPprHE4rCkoAMjOt7WaVByiVzema0=; b=NplyT7f0sc7VCkf3bIUobfUzE7y6oz+O9V8B81epIHYDygAX9oN7hpC7/XHAr1CdiwFtCh EHxa7OcSXOsl/O/mHuTpH+GD4DT/grRD2d1dWlic0mb8yK486Dzypz9xTyiJvUcU5B4f70 W9r6MFR8GjjvFCJgzq56RU/NrF28N4XuALgeB4CCLX7WiBL3XORK45buK0BpAoOPBt9Ca6 s81lPjPJtyjLj1GP9/ohFXYyll5+Bw1naHWduDXCbOpcVvOhrsb/dwJZd60jXI31WyrP61 XK5j5LXaQ5c2vJ+m28AZqSi5j793047eYFUHHHeFVyQaZ5M7jCw3R11AEzMYGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nTP4etru3nZ21JzPprHE4rCkoAMjOt7WaVByiVzema0=; b=NbHnqXlfLbp9uBrb0kzIvQMFJZKj/SXcFR+qzxMj3D5vYr06UH0gnYeQ8K/QL967qXOAk/ /4kKqWbgDB+dt1PvrGQtHvlKTlHh9tlsdiHITjvSlX/d7zMQD+MG4AT/AZIB83IF7OlWYL 8Wj9xB0GS/BJ6h4ZHi0IfcB/J6IDLPk9sQ4KaSPaVVZIdr2G63Hd8lTycr960HSOpMrp5V igdZ73+VujlDs4678mv75R6OCqISzuzcdCs8TLQmu9igauryVyDjtoK/5HoBJ1tqyNw61j laP8kolAtC2lMAoTJKDH0YtqYhT24Sp3QQd7rZMzuJ6NuPTnYRHcw0ZJJo0eGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683128549; a=rsa-sha256; cv=none; b=J/aBnR/IO18YEFzzQD7z+6cyTvYkE6XlRY6aHdUOf0gugXBzydQcXM72j22S3cA4+8d6XB 5sXITUz/52Q0Cb77NO1gYEQlvcvEqPG1QCzOQcZ8CYp+C773PPDeRqBMRZEHgkEXoJp36N l+n0AWFkOiFbblr7Lwq9d2l8n8DwOdvtArEb0bfMpqin1itrM3eWMEl3JUKinbhLVSeWYP hkQnqKNO8i4378LeqZQrQ3bJXMm45xAHwVwlDIwnCh6t/GzFFbM6yR4+gcot/I4skq6Z+u K6dXYn11rSpg8n+gklEeGgIiukUMMcXt/pnH7MJn5zZCKjAtpzzkyPhodO0rwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBLmj3d0lzbSs; Wed, 3 May 2023 15:42:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343FgTYj090590; Wed, 3 May 2023 15:42:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343FgTA5090589; Wed, 3 May 2023 15:42:29 GMT (envelope-from git) Date: Wed, 3 May 2023 15:42:29 GMT Message-Id: <202305031542.343FgTA5090589@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: fc2e2c950d97 - main - src.conf: add WITH_TOOLCHAIN description List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc2e2c950d97166ab32ca24134a37986ccaf94ab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fc2e2c950d97166ab32ca24134a37986ccaf94ab commit fc2e2c950d97166ab32ca24134a37986ccaf94ab Author: Ed Maste AuthorDate: 2023-05-02 17:27:18 +0000 Commit: Ed Maste CommitDate: 2023-05-03 15:41:58 +0000 src.conf: add WITH_TOOLCHAIN description It is not used by the in-tree default configuration, but adding it allows downstream projects with different defaults to make use of Cirrus-CI (as the makeman test added in 85e8c2a03490 requires that there are no missing option descriptions). Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39936 --- tools/build/options/WITH_TOOLCHAIN | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/options/WITH_TOOLCHAIN b/tools/build/options/WITH_TOOLCHAIN new file mode 100644 index 000000000000..62624bf9e28b --- /dev/null +++ b/tools/build/options/WITH_TOOLCHAIN @@ -0,0 +1,2 @@ +Install programs used for software development such as +compilers, debuggers, linkers etc. From nobody Wed May 3 16:00:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBM9s1ghFz4900L; Wed, 3 May 2023 16:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBM9s15s6z4C8n; Wed, 3 May 2023 16:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683129649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsJEzC8HH53qkY3eyTwCS0lpwY9W0RNgdXlmYZ+4Mio=; b=cGbli2MqIPIKn19p3MaXPdd0uKyk12cm+TCnJ1LANPCNWmCHH2Qzh7iXSb1KPog9SFhH/Z BYRCKA7qkA1okjaeN6AgCXeGvZ7ZRMtPq+Bvdll8ekL7ypbbviWEM37cZ5BGuor3LjBGe7 jQyaRe8E7pFfRXL3ncPURgjLhOOnqFUMyR/xKI5OxGvCW1n6bP10JjaFFztgNS45Wh2EoO WviiTAl0h3KPmCC3OjzX3cYsn2ldSr9XQvbpacIcifhixBXh/7QVbP1Sr6tgXHzHzEnBJ+ MPuowiRxerE3XVN7dzOHqNuSdlTXovqHwC0au64t/aSFfEdR56Bv3dEDE+EDiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683129649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsJEzC8HH53qkY3eyTwCS0lpwY9W0RNgdXlmYZ+4Mio=; b=ZJE+iGX4q7Zy+A7T1Vnm60F3bztsqg4b5w5e0E+uiME7X0ayYKf3E8NjWwjsWpRzKsUZj3 oKT7PQPOODhIqGu+Rz+OpmH2ShBrPTksyUNr5B9GtCyJTkxulY8p9xVN2xGy2pu76raAo4 S88xK2RyWoIBhiLPxkwyjYdoIxOSFEvpOX9a6Er403VWomKdezoZAN7/aYvV0OwstA+ofN qKXkTU5mCiYYitjR10HDc+LB1ZNOUN/U730dCQVuIVdr4iA0Hbu1Cz0lxLPRvqxReAW9Nf B3Z5QT6Ltmi/W5V9Bm0dP81CXCUQpL0EnoSwG35UpOHSIYde/SUIRMiveUlKlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683129649; a=rsa-sha256; cv=none; b=RIWoCIc3yKTK3pYPrRy7+KUyFu1toZCHMyG5qMI2xTuJE1bCZAqR3bW1ZaGWONvfIDTObm o256RKURHhXXEgH7dZjJsYuC+0rZzdJk87i3bh7Qq5ZkB/b/yIvxRgHcJNphySRlwiYmal +oX9/tG5cuGBnW+ZcfuPFch7HKiQrflUMdJ+nDbrHw8Rq3+iNT+KlMCqhf5JjGv8eX+kbi YcIrzEBUccgSXKZJ7EjfOfOFrSRBxAmU92SRfi8bdkJ+rch2HOYpOtr5iF/40aI40V9SkQ 3cv2DhnY6m4c66la3LEHd1slfU8CXhYL3GGp85PTgtnzKGuRlkRmUZG77sr6nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBM9s09MPzcDT; Wed, 3 May 2023 16:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343G0m5q017166; Wed, 3 May 2023 16:00:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343G0m91017165; Wed, 3 May 2023 16:00:48 GMT (envelope-from git) Date: Wed, 3 May 2023 16:00:48 GMT Message-Id: <202305031600.343G0m91017165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e8f6e5b2d969 - main - unix: Fix locking in uipc_peeraddr() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8f6e5b2d969fdf7e8f0a9a0a87eede357618fe9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e8f6e5b2d969fdf7e8f0a9a0a87eede357618fe9 commit e8f6e5b2d969fdf7e8f0a9a0a87eede357618fe9 Author: Mark Johnston AuthorDate: 2023-05-03 15:56:46 +0000 Commit: Mark Johnston CommitDate: 2023-05-03 15:56:46 +0000 unix: Fix locking in uipc_peeraddr() After the locking protocol changed in commit 75a67bf3d00d ("AF_UNIX: make unix socket locking finer grained"), uipc_peeraddr() was not updated accordingly. The link lock now only protects global socket lists. The PCB lock is used to protect the link between connected PCBs, so use that. Remove an old comment which appears to be noting that unp_conn is not set for connected SOCK_DGRAM sockets (in one direction anyway). Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39855 --- sys/kern/uipc_usrreq.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 294ef807416c..bd7a2cca245f 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -885,15 +885,10 @@ uipc_peeraddr(struct socket *so, struct sockaddr **nam) KASSERT(unp != NULL, ("uipc_peeraddr: unp == NULL")); *nam = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - UNP_LINK_RLOCK(); - /* - * XXX: It seems that this test always fails even when connection is - * established. So, this else clause is added as workaround to - * return PF_LOCAL sockaddr. - */ - unp2 = unp->unp_conn; + + UNP_PCB_LOCK(unp); + unp2 = unp_pcb_lock_peer(unp); if (unp2 != NULL) { - UNP_PCB_LOCK(unp2); if (unp2->unp_addr != NULL) sa = (struct sockaddr *) unp2->unp_addr; else @@ -904,7 +899,7 @@ uipc_peeraddr(struct socket *so, struct sockaddr **nam) sa = &sun_noname; bcopy(sa, *nam, sa->sa_len); } - UNP_LINK_RUNLOCK(); + UNP_PCB_UNLOCK(unp); return (0); } From nobody Wed May 3 18:32:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBQXP3MWvz497bf; Wed, 3 May 2023 18: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 4QBQXP2V6pz3KmQ; Wed, 3 May 2023 18: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=1683138725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4ErhG72MgE52ZfqLDcCnWHfwXv3T+1i7hQ/oNEQqE8=; b=iVT787ws+4OnJrslfdASlT2gJIIPPkhrA2eig8Xst1eoGq0hyNkO+3v+d8t8NFLQbH5ctf xyG7k3OwGTv2zO0KELBiAvIs67O5QsOriUVVUKcChNT4iQfBgyklk/SiEkcE2NEBxX/5o9 oigbG6sfVwBju/CD5kNpRcaf/JXtHFotHWRPfxV1B9GOLXsIM//xCkXEjKo3RQrY7ydzOa ap4zjFEu514r3E7EfBOp7TB2FV00lm0RxItJpuFc9ogwxYEP6u6bVzLCyy4httIaOt+Elq twQol6glK4+VTGL+/BzunEHUbWxugyq8k4uo/1AfZrUhUUaCWMpLuxLo8ZC47Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683138725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4ErhG72MgE52ZfqLDcCnWHfwXv3T+1i7hQ/oNEQqE8=; b=mdM5v3GyVovlNP06AKhfw+8obtVRrl/ILGv42XlV1mB3jw55hLKIO6gl7k6rqXHq9mmEFZ Mh1EAnOTkhPiCuPWWg/UO/jmmiLyyJC4BHQb2p49su8gYIyo35qbFYGAD2ALRJoY6rfWwm 4Bn4RHSA6Uhk3BiIU2Z7ZplV97c1IONmu3HeGvxp0/DrJB66ReDMYwk0FS8m+Pv4g6A0yY UzR4X5paD+UQ3jA08BDdWiUEsD1vnsenwnS8zKHYZa/q7FvACm5FkYOYOm4ThMjr5lLsiH mkUR2Lo5OzkB3sPniGitUcnXtbstYyoo62+RHQOC2dUXPILoMXrXgE2oSdfCjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683138725; a=rsa-sha256; cv=none; b=yUcF+N+GR26sp0LNGNDVkx6O1jswq6HgGgKoMayTXq18euRQWuWwQWWuClOWikgxoH84Jx yVSSRsiDC1ZpJOpSltnCQme1ch0fEQLbcJ0uZP8flAywMqdlu1rx+LjGrEi7ELIgIrsNbL uxEiNmHw9u7lRE6Ng3puzjuQlR+uBxFFrUy1hM3xdxnypW9gZhRDpsGVS/cFwweqtWLjYD 2J7YkKwnSbkDf9VfxxacZrGoOyukCDwmCj/2FGev0/HyLPGlAq8YcZPUFz5VjOLPnhVxZS vM2gnOyg+ZN7pt+QSfmOSflVEhOczA3pt0T+PlhwWieHkqIhT8Zo26E073EL3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBQXP1Ym9zggL; Wed, 3 May 2023 18:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343IW5sT069925; Wed, 3 May 2023 18:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343IW5hq069924; Wed, 3 May 2023 18:32:05 GMT (envelope-from git) Date: Wed, 3 May 2023 18:32:05 GMT Message-Id: <202305031832.343IW5hq069924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 04ede3675e44 - main - sctp: only start shutdown guard timer when sending SHUTDOWN chunk List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04ede3675e44847c3e9e4a9bd44509cdf42ed60a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=04ede3675e44847c3e9e4a9bd44509cdf42ed60a commit 04ede3675e44847c3e9e4a9bd44509cdf42ed60a Author: Michael Tuexen AuthorDate: 2023-05-03 18:28:46 +0000 Commit: Michael Tuexen CommitDate: 2023-05-03 18:28:46 +0000 sctp: only start shutdown guard timer when sending SHUTDOWN chunk The intention is to protect a malicious peer not following the shutdown procedures. MFC after: 1 week --- sys/netinet/sctp_input.c | 14 -------------- sys/netinet/sctp_output.c | 4 ---- sys/netinet/sctp_pcb.c | 1 - sys/netinet/sctp_usrreq.c | 6 +++--- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index fc362d091a22..5a7ed6ffde90 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1501,10 +1501,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, SCTP_STAT_INCR_COUNTER32(sctps_collisionestab); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } SCTP_STAT_INCR_GAUGE32(sctps_currestab); sctp_stop_all_cookie_timers(stcb); if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || @@ -1718,10 +1714,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, SCTP_STAT_INCR_COUNTER32(sctps_collisionestab); } SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } sctp_stop_all_cookie_timers(stcb); sctp_toss_old_cookies(stcb, asoc); sctp_send_cookie_ack(stcb); @@ -1788,8 +1780,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, } if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); } else if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) { /* move to OPEN state, if not in SHUTDOWN_SENT */ @@ -2176,10 +2166,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, /* update current state */ SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } sctp_stop_all_cookie_timers(stcb); SCTP_STAT_INCR_COUNTER32(sctps_passiveestab); SCTP_STAT_INCR_GAUGE32(sctps_currestab); diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 3b9a06b72d8a..fdea88002194 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -6768,8 +6768,6 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, atomic_subtract_int(&stcb->asoc.refcnt, 1); goto no_chunk_output; } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - NULL); } } } @@ -13562,8 +13560,6 @@ dataless_eof: error = ECONNABORTED; goto out; } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - NULL); sctp_feature_off(inp, SCTP_PCB_FLAGS_NODELAY); } } diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 7567764bfd72..4e97dc4e7ad3 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3461,7 +3461,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) } else { /* mark into shutdown pending */ SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*stcb->asoc.ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, &stcb->asoc)) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); } diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 6e17545c9a3b..917d301a85dc 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -736,7 +736,7 @@ sctp_disconnect(struct socket *so) stcb->sctp_ep, stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); - sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_LOCKED); + sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); } } else { /* @@ -750,7 +750,6 @@ sctp_disconnect(struct socket *so) * and move to SHUTDOWN-PENDING */ SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); } @@ -933,6 +932,8 @@ sctp_shutdown(struct socket *so) sctp_send_shutdown(stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, netp); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, NULL); } else { /* * We still got (or just got) data to send, so set @@ -957,7 +958,6 @@ sctp_shutdown(struct socket *so) return (0); } } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); /* * XXX: Why do this in the case where we have still data * queued? From nobody Wed May 3 19:20:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBRcg5N9Xz499tc; Wed, 3 May 2023 19:20: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 4QBRcg4k1Dz3jDQ; Wed, 3 May 2023 19:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683141651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KspyJSuFXY4dTKqgrjcZnMWKwKZDDQ+gi+HZlY02FxQ=; b=aTKUIPKaxurF7nE6vEt7HFCG8/0NC3mkCkl0FCPnK1+RyvJ8yelM/CiKN4ZYxE5hIBtsWy bFSEVxy2Y96Rk53R94JX6hMYhUZ4lFCkFhVxt1AjEsZqvwHw1PInX53W/F5BpP5y05z3UM zS9BptzTEIeOhQyMGHfogJN5q+sPYtlVsId3cw6K6gjNKbmQHGEeVEnSFaJfe+HCcdLZqs Hctgmg4DNiR+wyCNENKpGQSXi3u4OYcqLBF/ihwciWndW2cCV3RgD+rLitSfySfU8L9roj YV8Qpr2DylapKOsy3Cb6C9psT8i0hisV63rqglpxyh0O2oQEeM40laWCHQZWyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683141651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KspyJSuFXY4dTKqgrjcZnMWKwKZDDQ+gi+HZlY02FxQ=; b=ASecF+vxUhzzq9dvl6oRZyDOq/jE2aLXg2Q4CjwsLGwV/BBLIw98l5sHaMdHx0bOFgXlRv H+Rq/sPSuCzQEGthX0rcyL4qeECe2ipM8IO8ltb4crf+f51bX4aqewtVnoBLj6JsFv7eKW frbf4Jft1e025k9/VccFQCmoSFeSWIDCVmP3hi31Qho8mbieRQAyMwnvaaFIFIScafE60t zGo2hsbDSAb9UCrdy/hYz6bpzcMfdE2C9VS/JYdhIcYF24nHVWVqszRopNVTNsLAjnHMqH 0zHSsZQByYcSgJA3DYOVszoh7SdFxlIUksqQ52xrgV6PZkahB38YeMnT/gDeAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683141651; a=rsa-sha256; cv=none; b=mlZucbQmnnCDjUHay0VCoFIJYYIAQVHF8PM9ZzNIVFrEcBEFw6aL4oRBoE/mEuweYWA+k/ F9Pnjyj1pwzdafn31FG1/s5p8vRelpZotgrQG+r/Hes52LFpwI6tzFL45rD7TL/oV9lyk2 D0lDrmmV/0W5b0yegYaLPTT6FZ4nUVhpvq72oLEAQEQv6JPbxkqK60EejmU4wLn3XDfxGJ FR9c8jnAIhZB9LOB8e4blZSdvLsOYGkFVh58VvYFSnlDGJRtpHlrkZvLmj5HLiR8YCFvKC n1dtLwFDAMC3Ny+cYpBuP8JSiubp8rDJ9XeLa6igYgxX5zuf8Si7OgvVVIhCzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBRcg3n97zj2H; Wed, 3 May 2023 19:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343JKpqU047175; Wed, 3 May 2023 19:20:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343JKpx8047174; Wed, 3 May 2023 19:20:51 GMT (envelope-from git) Date: Wed, 3 May 2023 19:20:51 GMT Message-Id: <202305031920.343JKpx8047174@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: 9f27341c336a - main - local.meta.sys.mk set BOOTSTRAPPING List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f27341c336aa12f6c7163c17e646e76c813b689 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9f27341c336aa12f6c7163c17e646e76c813b689 commit 9f27341c336aa12f6c7163c17e646e76c813b689 Author: Simon J. Gerraty AuthorDate: 2023-05-03 19:20:02 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-03 19:20:02 +0000 local.meta.sys.mk set BOOTSTRAPPING When building for host on non-FreeBSD some makefiles want to see BOOTSTRAPPING defined. With this libmd and hence nmtree build ok --- share/mk/local.meta.sys.mk | 5 +++++ targets/pseudo/host-tools/Makefile.depend.host | 14 +++----------- usr.sbin/nmtree/Makefile.depend.host | 13 +++++++++++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index bcf25e2e5cd4..9d66e7295a0a 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -181,4 +181,9 @@ $V?= ${${V:S,DEP_,,}} .endfor .endif +.if ${MACHINE} == "host" && ${.MAKE.OS} != "FreeBSD" +# some makefiles expect this +BOOTSTRAPPING= 0 +.endif + .endif diff --git a/targets/pseudo/host-tools/Makefile.depend.host b/targets/pseudo/host-tools/Makefile.depend.host index a4525705b64b..39324fc6d49d 100644 --- a/targets/pseudo/host-tools/Makefile.depend.host +++ b/targets/pseudo/host-tools/Makefile.depend.host @@ -4,21 +4,13 @@ DIRDEPS= \ usr.bin/file2c \ usr.bin/lex \ usr.bin/mkdep \ + usr.bin/mkimg \ usr.bin/rpcgen \ usr.bin/sed \ - usr.bin/xargs \ - usr.bin/yacc \ - usr.bin/mkimg \ usr.bin/tar \ + usr.bin/yacc \ usr.sbin/makefs \ - -# these need work -xDIRDEPS+= \ - bin/dd \ - bin/sh \ - usr.bin/lockf \ - usr.bin/stat \ - usr.sbin/mtree \ + usr.sbin/nmtree \ .include diff --git a/usr.sbin/nmtree/Makefile.depend.host b/usr.sbin/nmtree/Makefile.depend.host new file mode 100644 index 000000000000..3fd283542a53 --- /dev/null +++ b/usr.sbin/nmtree/Makefile.depend.host @@ -0,0 +1,13 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + lib/libmd \ + lib/libnetbsd \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From nobody Wed May 3 20:32:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBTCH2Nr9z49DmK; Wed, 3 May 2023 20:32: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 4QBTCH1rk0z3rlg; Wed, 3 May 2023 20:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683145947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1JfiFwEb60hssJvDkqGzkCOmRwkHERys1YTb4SscNc=; b=W1eJ7TTimH2fHcZHb/L72385zZeq7e7syquIRl2dVlgtGn2H4YM48GUrNQolWW9kzbH+PB DfaEfgA6mWmt6/3NkAhA3n1W6G5LAGt8+ERmviwxssyw1ch9Zxn1UYW/dgI9K2l/LiLJJ4 lZbCRIupANnvHrl2SXaWiKLg4i9Co4C6rpStkUcO6qoJ5JF5Xkbg7AGC7r9H/mTf4xd9lp E9ruATLDYPdWrXYWy99uwp3u0dlue/UQEp+SctW3RIvSdYodCHfJ/ndwy3yKPcaey9778D X86Fk/2s7vj+6ULVhUDuYnIKQWglXeNgyN6IAD/Mb0j3aP8cewzyLoPF2XxxAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683145947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1JfiFwEb60hssJvDkqGzkCOmRwkHERys1YTb4SscNc=; b=TZqBcS+rJVK4m3kFsn+N68PbJY0qTpd6H36/qcQqP1jjQxEvi5OiIS3cLPPYwZjW1zu2BH XVdQpVaQs/5MID4arP+YjQ4T8/nzBgKZDRKnRfBiIGIbAVID1VO3lD0hNnd90/G8IXiA9T rf+SUjR5uZSsR8o8k2rBJjd6xzWx+Vbx90idqy8MQ3TQ5QZdjpzQsXws8+3mvUhcNZ8/bF yKdUxeI4GrWghqf1ALuzR2LwTc1FEbblib+Fs5DbX2+IRkm7ICXsvn+SpCj6we64rm1bFS JzhdDyViDgsinEZCdSDTEXCCmI6wS4i5aNmzZRU/d6jlyIa1TxYeSnoDnv2tGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683145947; a=rsa-sha256; cv=none; b=rdBhrhexB2dsrI7ir8Oo61YqRqPUcDZ8Y8Lm9ctQRynpqkogiWKPQbeOZMlqbortwbJXIh p04/z8/D7R98EUAHfTKlHrNBo/0rcurNY/kdVoX0EsLvFTpfhgrqov2RG64a8cpGKh3t+j tMtyzQlGJ7S2GGTZLxbyjeXMaKtkx96eml1p9Onntk3v6yX5nmtmecDSGlkRzH0uCYWs3R 5hn6A1zXuBSvRvyti0czWXa4Ybglw6hE+hWaxQw1mW1hfvtj+jDD5rAB7VbwRW1PPUx9M2 L3gbRqAz/IkatjK4VhMUul6MA9U+AyoCLiGAtFG/uTlsvoJ/NkIAGefHJKFGjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBTCH0x6yzkXj; Wed, 3 May 2023 20:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343KWRWE067699; Wed, 3 May 2023 20:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343KWRi9067698; Wed, 3 May 2023 20:32:27 GMT (envelope-from git) Date: Wed, 3 May 2023 20:32:27 GMT Message-Id: <202305032032.343KWRi9067698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Silvers Subject: git: 406475581246 - main - fsck_ffs: fix the previous change that skipped pass 5 in some cases List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 406475581246360faa7af9891dc8ad2423284e18 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=406475581246360faa7af9891dc8ad2423284e18 commit 406475581246360faa7af9891dc8ad2423284e18 Author: Chuck Silvers AuthorDate: 2023-05-03 20:21:19 +0000 Commit: Chuck Silvers CommitDate: 2023-05-03 20:31:32 +0000 fsck_ffs: fix the previous change that skipped pass 5 in some cases The previous change involved calling check_cgmagic() twice in a row for the same CG in order to differentiate when the CG was already ok vs. when the CG was rebuilt, but that doesn't work because the second call (which was supposed to rebuild the CG) returns 0 (indicating that the CG was not rebuilt) due to the prevfailcg check causing an early failure return. Fix this by moving the rebuild part of check_cgmagic() out into a separate function which is called by pass1() when it wants to rebuild a CG. Fixes: da86e7a20dc4a4b17e8d9e7630ed9b675cf71702 Reported by: pho Discussed with: mckusick Sponsored by: Netflix --- sbin/fsck_ffs/fsck.h | 3 ++- sbin/fsck_ffs/fsutil.c | 28 +++++++++++++--------------- sbin/fsck_ffs/gjournal.c | 2 +- sbin/fsck_ffs/inode.c | 2 +- sbin/fsck_ffs/main.c | 2 +- sbin/fsck_ffs/pass1.c | 12 +++++++++--- sbin/fsck_ffs/suj.c | 4 ++-- 7 files changed, 29 insertions(+), 24 deletions(-) diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 95dccf0d672d..1c8b9169e590 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -466,7 +466,8 @@ void cgdirty(struct bufarea *); struct bufarea *cglookup(int cg); int changeino(ino_t dir, const char *name, ino_t newnum, int depth); void check_blkcnt(struct inode *ip); -int check_cgmagic(int cg, struct bufarea *cgbp, int requestrebuild); +int check_cgmagic(int cg, struct bufarea *cgbp); +void rebuild_cg(int cg, struct bufarea *cgbp); void check_dirdepth(struct inoinfo *inp); int chkrange(ufs2_daddr_t blk, int cnt); void ckfini(int markclean); diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index 1df52b7cfdc9..48810954ba94 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -989,9 +989,7 @@ blzero(int fd, ufs2_daddr_t blk, long size) * Verify cylinder group's magic number and other parameters. If the * test fails, offer an option to rebuild the whole cylinder group. * - * Return 1 if the cylinder group is good or if repair is requested - * and is completed successfully. Return 0 if it is bad or if a repair - * has been requested but is not completed successfully. + * Return 1 if the cylinder group is good or return 0 if it is bad. */ #undef CHK #define CHK(lhs, op, rhs, fmt) \ @@ -1003,7 +1001,7 @@ blzero(int fd, ufs2_daddr_t blk, long size) error = 1; \ } int -check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) +check_cgmagic(int cg, struct bufarea *cgbp) { struct cg *cgp = cgbp->b_un.b_cg; uint32_t cghash, calchash; @@ -1077,15 +1075,16 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) return (0); prevfailcg = cg; pfatal("CYLINDER GROUP %d: INTEGRITY CHECK FAILED", cg); - if (!request_rebuild) { - printf("\n"); - return (0); - } - if (!reply("REBUILD CYLINDER GROUP")) { - printf("YOU WILL NEED TO RERUN FSCK.\n"); - rerun = 1; - return (0); - } + printf("\n"); + return (0); +} + +void +rebuild_cg(int cg, struct bufarea *cgbp) +{ + struct cg *cgp = cgbp->b_un.b_cg; + long start; + /* * Zero out the cylinder group and then initialize critical fields. * Bit maps and summaries will be recalculated by later passes. @@ -1127,7 +1126,6 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) } cgp->cg_ckhash = calculate_crc32c(~0L, (void *)cgp, sblock.fs_cgsize); cgdirty(cgbp); - return (1); } /* @@ -1191,7 +1189,7 @@ std_checkblkavail(ufs2_daddr_t blkno, long frags) cg = dtog(&sblock, blkno + j); cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) + if (!check_cgmagic(cg, cgbp)) return (-((cg + 1) * sblock.fs_fpg - sblock.fs_frag)); baseblk = dtogd(&sblock, blkno + j); for (k = 0; k < frags; k++) { diff --git a/sbin/fsck_ffs/gjournal.c b/sbin/fsck_ffs/gjournal.c index b65589b5bd08..cd2c9df878a8 100644 --- a/sbin/fsck_ffs/gjournal.c +++ b/sbin/fsck_ffs/gjournal.c @@ -97,7 +97,7 @@ gjournal_check(const char *filesys) } cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) { + if (!check_cgmagic(cg, cgbp)) { rerun = 1; ckfini(0); return; diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index 2d563f617a56..04891447254e 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -1394,7 +1394,7 @@ retry: cg = ino_to_cg(&sblock, ino); cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) { + if (!check_cgmagic(cg, cgbp)) { if (anyino == 0) return (0); request = (cg + 1) * sblock.fs_ipg; diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 2bd61dda7030..566fbe5ccd15 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -492,7 +492,7 @@ checkfilesys(char *filesys) snapflush(std_checkblkavail); if (cgheader_corrupt) { printf("PHASE 5 SKIPPED DUE TO CORRUPT CYLINDER GROUP " - "HEADER(S)\n"); + "HEADER(S)\n\n"); } else { pass5(); IOstats("Pass5"); diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index 55233e0bc4f4..e784fd29dc1c 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -100,11 +100,17 @@ pass1(void) cgbp = cglookup(c); cgp = cgbp->b_un.b_cg; rebuiltcg = 0; - if (!check_cgmagic(c, cgbp, 0)) { - if (!check_cgmagic(c, cgbp, 1)) + if (!check_cgmagic(c, cgbp)) { + if (!reply("REBUILD CYLINDER GROUP")) { cgheader_corrupt = 1; - else + if (!nflag) { + printf("YOU WILL NEED TO RERUN FSCK.\n"); + rerun = 1; + } + } else { + rebuild_cg(c, cgbp); rebuiltcg = 1; + } } if (!rebuiltcg && sblock.fs_magic == FS_UFS2_MAGIC) { inosused = cgp->cg_initediblk; diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index 40bbe340bfc6..9c8e1322b801 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -183,7 +183,7 @@ cg_lookup(int cgx) if (lastcg && lastcg->sc_cgx == cgx) return (lastcg); cgbp = cglookup(cgx); - if (!check_cgmagic(cgx, cgbp, 0)) + if (!check_cgmagic(cgx, cgbp)) err_suj("UNABLE TO REBUILD CYLINDER GROUP %d", cgx); hd = &cghash[HASH(cgx)]; LIST_FOREACH(sc, hd, sc_next) @@ -396,7 +396,7 @@ suj_checkblkavail(ufs2_daddr_t blkno, long frags) cg = dtog(&sblock, blkno); cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) + if (!check_cgmagic(cg, cgbp)) return (-((cg + 1) * sblock.fs_fpg - sblock.fs_frag)); baseblk = dtogd(&sblock, blkno); for (j = 0; j <= sblock.fs_frag - frags; j++) { From nobody Wed May 3 20:58:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBTnc4Bdqz49FmY; Wed, 3 May 2023 20:58: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 4QBTnc3jPKz3tf1; Wed, 3 May 2023 20:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683147524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UJb0eJ1kM//xx2XEtxb0chcONKhf5NThcmiR97jc06c=; b=w7gnCxi1xykVmAoFIB/kku/kJPzRbx6oIkERjiHvD7SfqAFiaf7sSSJSm5IwaiuNszWZ5l IfNVMaxMJ6nbrGA+luYs8MraPQClz8jLBGKHr4Fpl1c7Fhk5ykLIML3vq2Y+Rj+OV2ftB5 NT8s/ku9CoQSvqFWYP8uWvMx4Z4aezNjwnqRjTZ3by8v6nA/H4uISACAG5xRxUmjA6yNRi KAEJLRSAw0E9w+Ee47TCk6Falgjar61Eut8FEIyQhWFpi5HXMqpdzeByTDkun+qvo1p+KV NHxPaowTEb+7iFdKABaxZWMkdfaFQ99c4nMaxTURGmFsmzk7ngxkDVwcuKt40g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683147524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UJb0eJ1kM//xx2XEtxb0chcONKhf5NThcmiR97jc06c=; b=fGpFQQAK3LgKAGW8QtK0/+4NWbbS2q6Om726DZm2yz7PzLMcmz6tchOrymh4luCpzE0x30 aq/nvtjXtmtr3Zuof9wtE4U07OcshHPenJVaYV3dDZZmkua29/GDyNoRzOakLJYd7gCt4F TBf5ux0XqAg5g556e/3ViRd8mN+85A6pg7AmIjhJ1HGzOxuO8LcbJN2PGHnHsqQZDELxNs HP6xCEznqkp3ozx0PjrnQluFX6P5wdHi8Fa6J256/YHPpGJ7Z+zqBcP7zvM2S6pXMlH/Kl eG4DmnLOkzlXAJ3Jm9SGDqsquzohuWbOKEIEgJ7QHbvUVSdqxw7uT5SaBocT4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683147524; a=rsa-sha256; cv=none; b=BL/syyv8IYT1ShZckd+shHodIqLbs8e1b0V3wHcDWQESK5wElSXc0IH5/hw+JGWUoFCURD l5frO8OxaBmBtbVTKyORgFpAmD3wfcSrRxYOWWqaqqGTook7cI4XC03HymnMR1G5Ji/IwW 8gYDb6V8yHovvos9cor7RlITxirPyvMMYDv+GZDfEp0EQ7nw5fFUYUcfDYC5bM6recJx8d U9MhM1Eb57lZUlaGDE18oYwF3IQcj9P+uq5VKAFVOQhjgh3cj8WNGdJ4VWIyTOy9WHFaWB wy4JMTVhT56CrrOTQZLhgYu6uoj7fAGrIHMQj5Gq6qMO4n64zecOSWlM2SBLTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBTnc2gmDzkxQ; Wed, 3 May 2023 20:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343KwiBZ002539; Wed, 3 May 2023 20:58:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343Kwisq002538; Wed, 3 May 2023 20:58:44 GMT (envelope-from git) Date: Wed, 3 May 2023 20:58:44 GMT Message-Id: <202305032058.343Kwisq002538@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: 4194bbb34c60 - main - release: Report disk image filename List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4194bbb34c60a5bf0fd0ba28f7bfa20b7842ba3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4194bbb34c60a5bf0fd0ba28f7bfa20b7842ba3f commit 4194bbb34c60a5bf0fd0ba28f7bfa20b7842ba3f Author: Ed Maste AuthorDate: 2022-05-16 18:37:21 +0000 Commit: Ed Maste CommitDate: 2023-05-03 20:58:22 +0000 release: Report disk image filename For someone new to the release bits it's not always clear what files are being created. Report the disk image name explicitly. Reviewed by: gjb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39953 --- release/tools/vmimage.subr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index a65ec4f1a1f9..d7dc8ed992b5 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -318,6 +318,8 @@ vm_create_disk() { ${ROOTFSPART} \ -o ${VMIMAGE} + echo "Disk image ${VMIMAGE} created." + if [ ${ESP} = "yes" ]; then rm ${espfilename} fi From nobody Thu May 4 04:33:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBgtQ2skQz49dcS; Thu, 4 May 2023 04:33: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 4QBgtQ25sgz3M3s; Thu, 4 May 2023 04:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683174814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hG5s8eXnfbv20QdNb3l8UqrmuRLIn9HOeq4xCvtb2nc=; b=bILH67/2awrPiXar5SRl8Pm5MKpJRCaq2mtcQXalyTXA7gPLDPmOYIoJElXepTCPotehaL GFbVxJo+UkGF1G9MQNpHCyvqa8lMV19Zt8qlYJ4RttykFtvEo0d23kkrhvk1j1HGaP8h25 WZiwpb2QZxA5UpOEaMEzuxxyvaFZMM5UOiC/+nvj9qLoYkpjJiw087JKk+7w67hz+I8+vt v9HHAV1BYuEnbgTF91Tt69vznZQ6ztT08Symz0sroYwi2HS1/Y9xA7HUDG+2ZaJ1r2ShBI Qdre5U2Dr0JjKLAvead4MhUMT7VgbMnf2Awd7gjMRLoaUO+8HnnVfPo44gRhhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683174814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hG5s8eXnfbv20QdNb3l8UqrmuRLIn9HOeq4xCvtb2nc=; b=pVpoVDsA2jlLJe0g3nuvhRUAgmH/vOo8v+JlK5HoajGiZjPb3vxRrhLz7jp4BEp3Ud289z x4mvVYlPHqiba+Rr4wXCiK5HxVZF+uaOiwpFvvWA5LRntB9JkyFt9L8fZHtdqz/W8tt7Ot CWUZIR11l6PnyOwUsp7qLMJno5BVx3qflhInjXnQ6wZF1jNBd5+gU8b0BPEXIlaysj6qz9 tApxxrjvYtcieEsdcjulx2BX245o0mxYyVz0tfUnxJMWQTHYi28bEKBN6c4MAqDrPvpkvA JxJR8WsAN+4orf9hvq3q0PsuRXWfg64Sk7ueSgJlFEAT3pZG9PbcU2i2TPA6RA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683174814; a=rsa-sha256; cv=none; b=xE38whaJiZajXTZCrHn2N2bTvQ6FmmYVuBA5KnjNIGqIDWNX4G1XrHFlInwWVTKqRO5FJ1 GwJAibCBARr+GA77e8TpZstLgnleEmZ+YHZwTWuuigqDLQEmdctpBRpKrgmLiMnW02AWWd 0iHlGwmPjAoqPe22wa5fI43E8gyvM2lWBlAYdFcT/Ovx3w1/sZ9ugja8DntXUV5vOGRTP9 7THmGwxCJhVr/HBvfb3ug1y7gNopTYi5otZAn9UKw/biYIQF+139kpCITQI/RwvAVxw6BB mI+FNHmt+mcKe9j1I0GPcbjjTJmrX8V7kPsOWucDx8ki2lLvCoQpEPYqPf28Gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBgtQ18Tvzxtb; Thu, 4 May 2023 04:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3444XYkM062144; Thu, 4 May 2023 04:33:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3444XY57062143; Thu, 4 May 2023 04:33:34 GMT (envelope-from git) Date: Thu, 4 May 2023 04:33:34 GMT Message-Id: <202305040433.3444XY57062143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 5282ada06bbc - main - ObsoleteFiles: Complete 20201025: Remove cal data files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5282ada06bbc6727b467d6f6530fa19114143c61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=5282ada06bbc6727b467d6f6530fa19114143c61 commit 5282ada06bbc6727b467d6f6530fa19114143c61 Author: Li-Wen Hsu AuthorDate: 2023-05-04 04:28:52 +0000 Commit: Li-Wen Hsu CommitDate: 2023-05-04 04:28:52 +0000 ObsoleteFiles: Complete 20201025: Remove cal data files Fixes: d20d6550187a calendar: remove all datafiles except freebsd one MFC after: 3 days --- ObsoleteFiles.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6e7c5205a2bf..ede2871455ae 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -6199,6 +6199,18 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.all OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.holiday OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.misc OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.orthodox +OLD_DIRS+=usr/share/calendar/de_AT.ISO_8859-15 +OLD_DIRS+=usr/share/calendar/de_DE.ISO8859-1 +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-15 +OLD_DIRS+=usr/share/calendar/fr_FR.ISO8859-1 +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-15 +OLD_DIRS+=usr/share/calendar/hr_HR.ISO8859-2 +OLD_DIRS+=usr/share/calendar/hu_HU.ISO8859-2 +OLD_DIRS+=usr/share/calendar/pt_BR.ISO8859-1 +OLD_DIRS+=usr/share/calendar/pt_BR.UTF-8 +OLD_DIRS+=usr/share/calendar/ru_RU.KOI8-R +OLD_DIRS+=usr/share/calendar/ru_RU.UTF-8 +OLD_DIRS+=usr/share/calendar/uk_UA.KOI8-U # 20201004: logo files renamed to type-agnostic gfx-*.lua OLD_FILES+=boot/lua/logo-beastie.lua From nobody Thu May 4 14:29:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBx5j11syz499RN; Thu, 4 May 2023 14:29: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 4QBx5j0Y7Lz3HDj; Thu, 4 May 2023 14:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683210553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2M3C+MU/LvFZfD2eIJTxPKWppRY/MnkCMZ/pqKt/1LU=; b=fDRjKlOoeijsUvGo2WmeWFcEiLsG+gkogQ68KMdwDiYWBd3FrXwyHR+ntQbAiHN4FyjVpU bWCy34rzSN5U/8O9pzNKo8NbWPG1RhgMSx4v18SG6P3YDQE6Bb1d9FtW4eIGumitGMkEJE +o3VO30TxwisKE15NP83UJ0B0koy+2/zp1z+/COEyqkqWWIsFxrHxb51sOm9RY95jSFkRR aPmQqi/arLA3thmeigdYkASKX8GzUr9RjMw1xmol83KeA56pCkvroSmBihrElz61fZOSmq 82y4x5EP7v3pqSMHtSL5lel+iGuBpPsafok1GF4WUvyvr/DcMLKsphvN8F1Xlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683210553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2M3C+MU/LvFZfD2eIJTxPKWppRY/MnkCMZ/pqKt/1LU=; b=Wo/b6mfjEvJh2zNoWjCAjSvNWP+VUWMlEfMnG5/lTcPm3loXNGKveeHSPU9UEuxoU1+OkL KDhnyZhEEHZuKnzkyzwR3YQqFhqLuzRscDGT7Zi+VdZiPEUSHawArYQMCgBRNdV0AwIsIy aY0yC8eNVPNyZoT2FrTt0nc6SWgLZVecZqehRLjGV00ye4/h0MeAozvAxh/XoJ5Yt8nglK RfpgPsKBido+3yXFwoGPFA7Uo/MBu0LpIW/hgWcjPc215yvbQL7pwJHBsXIHYWVXV/DsDo OOF7t0JNGynwKwwF68RXXPtUgJhJGaxbVEq8GhMv1k1pIDL6xtbv6afOYsXXPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683210553; a=rsa-sha256; cv=none; b=n3g+VYQYjyaApKTwAljayvlL3yw3GSihLuQ8zi59b/yHKfs4/3x3e1qIjS9ahX3EZ72Jhq YB5IJCOfwvg1jWE4xvhOx/P0gnfq5e5e3uR9WTu9LeYlw92IT+vfH6UtU/s1SqSJ+awHwh dYCRye0Vjp3K6wx6BUXGcMdLESeLIjqn6GNU/Axnp+j9KjmVJtBIV0X/IbvVbc8Z/ldh/k TzjGFrbxNBQBAPIagnfRgW8k8cNq9ieVcRtslUhrcJRDK2HYmEpAeYinLop4xm3pmW+LNv 4X0wdZXQ9YDgc7M1vg+jxxfNSy0vILD+WCf4U6lGhqKBbvlawarwQ+y9pGgqPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBx5h6l6mzG44; Thu, 4 May 2023 14:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344ETCw7036650; Thu, 4 May 2023 14:29:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344ETCoS036649; Thu, 4 May 2023 14:29:12 GMT (envelope-from git) Date: Thu, 4 May 2023 14:29:12 GMT Message-Id: <202305041429.344ETCoS036649@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: 5fd34912b4a5 - main - stand: Fix oversight in updating OpenZFS: Add com.klarasystems:vdev_zaps_v2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fd34912b4a51f6ebe55d0d832fab4f3c60228e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd34912b4a51f6ebe55d0d832fab4f3c60228e7 commit 5fd34912b4a51f6ebe55d0d832fab4f3c60228e7 Author: Warner Losh AuthorDate: 2023-05-04 14:25:46 +0000 Commit: Warner Losh CommitDate: 2023-05-04 14:25:46 +0000 stand: Fix oversight in updating OpenZFS: Add com.klarasystems:vdev_zaps_v2 com.klarasystems:vdev_zaps_v2 is a new feature that the last OpenZFS import brought in. It needs to be on the list of supported features, but that update didn't happen so I woke up to a mailbox with multiple complaints. CirrusCI test to boot twice with a zpool update inbetween coming later today. Sponsored by: Netflix --- stand/libsa/zfs/zfsimpl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 996245b92c45..fb8938c587cd 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -133,6 +133,7 @@ static const char *features_for_read[] = { "com.delphix:zpool_checkpoint", "com.intel:allocation_classes", "com.joyent:multi_vdev_crash_dump", + "com.klarasystems:vdev_zaps_v2", "org.freebsd:zstd_compress", "org.illumos:lz4_compress", "org.illumos:sha512", From nobody Thu May 4 15:40:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBygf15xCz49DbK; Thu, 4 May 2023 15:40: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 4QBygf0CWhz3QbN; Thu, 4 May 2023 15:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETpyl8RyUHLbUY4aRoaa7FQlTylfQoWxObnFQAFxgvg=; b=X0zYxbzJUf3sQsBOWRNJC8vMeQo60clzoYPkI/dn64oZV/2CmtrProQ4HqMCJeQxWYpoG8 0b0yzHZXfbPBMj6JdkqMQm5sjSp4dTp9yKTCmz3r/dq61hxEyI+LOg+UeDyx/MWk2riDy3 kojfR7h+b+ngoWG1xwlTq5GV/JlywB5ypwBW0LS3nLfdn2Assy1nBmRsEaQChk5CNVTYPB rwo1TrbvOnj+8B/hzChqx5yjpth1od68sWS3zV3aJO6yqBmspGl31xw1JYXVAoi33+j1Vs qu0jrBpqQt77kEGFwPjhp2zmgInHQmHvWtnyQfpRtB5QQuRNwYZ+WRI/zD7L6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETpyl8RyUHLbUY4aRoaa7FQlTylfQoWxObnFQAFxgvg=; b=l9IXu5gxRSaqPepiX28mNBn37eZZc1TIBlLU1j44YenJv2zTUH8P+jvgopNIi5+2AguHjI +vonAwu/HVJ2KvGeGo1fsLLlybmndVqqWSP6KcK35bN7O7mNp8KvpGLxIBp4riPCDWyHgE QCfdrUmguKgO1DvDd7vWCD4FiZHrFAXCqUi1IqquZdLRdwv46i5WoTMEjwxGUjux13mZFI CwOwNmQYwLD3TrXJ6affZ5IDK7O8nlbHD2JS5BGMbtTAJD7pLyqNjMc2I0ji3srJaTbMOr J7uWeuJ2/DghhN4Nfcc+v9B836J3CD2wHVT3cL+V05fzqQLx/asjlI7Gi0Qvng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683214814; a=rsa-sha256; cv=none; b=t+N5dbS7uAu5tVMEwm2nFW45bmoJjQNC5xSBrRxWNA1rSnwCi1n36eCNXyTGi5egs0YhvU tqecyA7qf+EVOkgsZ01rlggeR2brHenX1ypicD4i4Y8tjKXa01yjXhsax8eMF/JGYzPJhG thLPzzLpSQcrpW3TC8ucPiawTadoRSvQ0buCwVAZakXqYi7XSLg7HjPKHcnrpyy8GxG4X2 kM9OLrbgSYfn6fXi0x6bh3JlH+EaYd86Ecxsf8xqWLWux0FCwLGxz+oiO5qCMpwVC8+hmi //5XTPC10ZuOvryGkxbBSGT1WvOjq86BQOYW7WKQu//59lwYddhERFSZbkz+9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBygd6NC6zHch; Thu, 4 May 2023 15:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FeD9C059260; Thu, 4 May 2023 15:40:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FeDEj059249; Thu, 4 May 2023 15:40:13 GMT (envelope-from git) Date: Thu, 4 May 2023 15:40:13 GMT Message-Id: <202305041540.344FeDEj059249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e704f88f3d92 - main - amd64: initialize APs kpmap_store in init_secondary() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e704f88f3d924202e60e37c82dd50a5022c89dd4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e704f88f3d924202e60e37c82dd50a5022c89dd4 commit e704f88f3d924202e60e37c82dd50a5022c89dd4 Author: Konstantin Belousov AuthorDate: 2023-05-04 06:17:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-04 15:39:22 +0000 amd64: initialize APs kpmap_store in init_secondary() The APs pcpu area is zeroed in init_secondary() by pcpu_init(), so the early initialization in pmap_bootstrap() is nop. Fixes: 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2ESC Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39945 --- sys/amd64/amd64/mp_machdep.c | 2 ++ sys/amd64/amd64/pmap.c | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 94589f736637..f6c3446e9981 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -215,6 +215,8 @@ init_secondary(void) /* See comment in pmap_bootstrap(). */ pc->pc_pcid_next = PMAP_PCID_KERN + 2; pc->pc_pcid_gen = 1; + pc->pc_kpmap_store.pm_pcid = PMAP_PCID_KERN; + pc->pc_kpmap_store.pm_gen = 1; pc->pc_smp_tlb_gen = 1; diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a09920d62961..55086125fbb9 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2036,13 +2036,9 @@ pmap_bootstrap(vm_paddr_t *firstaddr) if (pmap_pcid_enabled) { kernel_pmap->pm_pcidp = (void *)(uintptr_t) offsetof(struct pcpu, pc_kpmap_store); - for (i = 0; i < MAXCPU; i++) { - struct pmap_pcid *pcidp; - pcidp = zpcpu_get_cpu(kernel_pmap->pm_pcidp, i); - pcidp->pm_pcid = PMAP_PCID_KERN; - pcidp->pm_gen = 1; - } + PCPU_SET(kpmap_store.pm_pcid, PMAP_PCID_KERN); + PCPU_SET(kpmap_store.pm_gen, 1); /* * PMAP_PCID_KERN + 1 is used for initialization of From nobody Thu May 4 15:40:14 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBygg2ZNLz49F0l; Thu, 4 May 2023 15:40: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 4QBygg1qmxz3Qmj; Thu, 4 May 2023 15:40:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcNDLYvz0xa55SOD73YiTKQ66JqErN5rerrbNfZyUIk=; b=gg1QkUCfibY9pnwL95r1fg8SxY6wpfNa0jvDW/oCG5pnHI/HaCcwjpsVNmv5bavPDb4sqA uqGGjLkhMUXB5EZmiisN2PfXYI5TCfF9sVmJCnF7TBOENlwsQKRWchQny2oxWCfPm5tB3G pgxVE56/cPxVsh0ddRJhX01PkO7jKTdh6+ve0rIS/v7Z1Yvjs4EqljA1IwRjls8sz5hgBW q9wS4fuH8fhFnWnaAwUaUBV5rrEaFFGL4NYg7pwvHW31tVqaoPYd71Nbul+LqlmGFpQRxF rk7xPLDZfiN8w1pjEDlhcUwKuk8Qnlt+fpgv6zUJk4CG1SXo6P6jJCPCQAUicQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcNDLYvz0xa55SOD73YiTKQ66JqErN5rerrbNfZyUIk=; b=byAUtH3xUNPsS+/k9g4PsPbj6nN3/F/up+m/5TrncSDzB3IL3DwAdVcChej9/70dxBiTCB jZwYl/8tINRuBAUNnHHrqqrKwuTO7WhM6XH4UzEkzWxw3gWhyheC62Zzg803PyD+KS2JNa xgJS9m6WSZ6xE19qICn+GpaAOzwROEFhwGAV426tgKlhMEVwRiIsnTT+wmzuGfnq9Ad/50 VBFODqsD3wRWAvKpug8C0/p3oFnuOdRuyaaBm43pFXVaKsB/2iI24UAVA+DaK1jzXP3APx cuAXAJXNu8jG3HZUlH6bjYSxabmgnYNIRbKGbPZepbry7Z0DClge9cAj6bQlPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683214815; a=rsa-sha256; cv=none; b=ono3CcRNm3M5wk//QP/8EM1ktGKm+iKzvYLIbkFZfOPP0NUQdM2NOK2HMTLtihoevjDuVp FM67xXdAYi1d6z6eUB6Ex5vvOWGcoRAu2tm132FWkXDAMGR8lwnbL1MPRB2yHMQWUokByo +RlU1wozB2zYVt4NV2V5JAV/1ldxUuP1iArurqVe+7s6Mo0SxUVhmHyYsImxzu4dfE9aUO W5xUATwAEPBjEFZ4XT4GZyZh3rg4QtVCaVrCN82JbohjFJ+Z2Yt+Zzh93mY1EiCs6cQw9I OTnYmHHTSnhrxtuVT49iZYu/GQB5LO6VIlHAtZsmSrRg4jFPZgEvh3pVuUIyGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBygf6tQjzHhM; Thu, 4 May 2023 15:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FeEP3059940; Thu, 4 May 2023 15:40:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FeETu059928; Thu, 4 May 2023 15:40:14 GMT (envelope-from git) Date: Thu, 4 May 2023 15:40:14 GMT Message-Id: <202305041540.344FeETu059928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: af1c6d3f3013 - main - amd64: do not leak pcpu pages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af1c6d3f3013062370692c8e1e9c87bb138fbbd9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=af1c6d3f3013062370692c8e1e9c87bb138fbbd9 commit af1c6d3f3013062370692c8e1e9c87bb138fbbd9 Author: Konstantin Belousov AuthorDate: 2023-05-03 09:41:46 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-04 15:39:22 +0000 amd64: do not leak pcpu pages Do not preallocate pcpu area backing pages on early startup, only allocate enough of KVA for pcpu[MAXCPU] and the page for BSP. Other pages are allocated after we know the number of cpus and their assignments to the domains. PCPUs are not accessed until they are initialized, which happens on AP startup. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39945 --- sys/amd64/amd64/mp_machdep.c | 52 ++++++++++++++++++++------------------------ sys/amd64/amd64/pmap.c | 17 ++++++++++----- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index f6c3446e9981..5fdde0bb887d 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -290,29 +290,32 @@ init_secondary(void) init_secondary_tail(); } -/******************************************************************* - * local functions and data - */ - -#ifdef NUMA static void -mp_realloc_pcpu(int cpuid, int domain) +amd64_mp_alloc_pcpu(void) { vm_page_t m; - vm_offset_t oa, na; - - oa = (vm_offset_t)&__pcpu[cpuid]; - if (vm_phys_domain(pmap_kextract(oa)) == domain) - return; - m = vm_page_alloc_noobj_domain(domain, 0); - if (m == NULL) - return; - na = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); - pagecopy((void *)oa, (void *)na); - pmap_qenter((vm_offset_t)&__pcpu[cpuid], &m, 1); - /* XXX old pcpu page leaked. */ -} + int cpu; + + /* Allocate pcpu areas to the correct domain. */ + for (cpu = 1; cpu < mp_ncpus; cpu++) { +#ifdef NUMA + m = NULL; + if (vm_ndomains > 1) { + m = vm_page_alloc_noobj_domain( + acpi_pxm_get_cpu_locality(cpu_apic_ids[cpu]), 0); + } + if (m == NULL) #endif + m = vm_page_alloc_noobj(0); + if (m == NULL) + panic("cannot alloc pcpu page for cpu %d", cpu); + pmap_qenter((vm_offset_t)&__pcpu[cpu], &m, 1); + } +} + +/******************************************************************* + * local functions and data + */ /* * start each AP in our list @@ -330,6 +333,7 @@ start_all_aps(void) int apic_id, cpu, domain, i; u_char mpbiosreason; + amd64_mp_alloc_pcpu(); mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); MPASS(bootMP_size <= PAGE_SIZE); @@ -403,16 +407,6 @@ start_all_aps(void) outb(CMOS_REG, BIOS_RESET); outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */ - /* Relocate pcpu areas to the correct domain. */ -#ifdef NUMA - if (vm_ndomains > 1) - for (cpu = 1; cpu < mp_ncpus; cpu++) { - apic_id = cpu_apic_ids[cpu]; - domain = acpi_pxm_get_cpu_locality(apic_id); - mp_realloc_pcpu(cpu, domain); - } -#endif - /* start each AP */ domain = 0; for (cpu = 1; cpu < mp_ncpus; cpu++) { diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 55086125fbb9..1009736472dc 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1902,7 +1902,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) vm_offset_t va; pt_entry_t *pte, *pcpu_pte; struct region_descriptor r_gdt; - uint64_t cr4, pcpu_phys; + uint64_t cr4, pcpu0_phys; u_long res; int i; @@ -1917,7 +1917,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ create_pagetables(firstaddr); - pcpu_phys = allocpages(firstaddr, MAXCPU); + pcpu0_phys = allocpages(firstaddr, 1); /* * Add a physical memory segment (vm_phys_seg) corresponding to the @@ -1995,10 +1995,15 @@ pmap_bootstrap(vm_paddr_t *firstaddr) SYSMAP(struct pcpu *, pcpu_pte, __pcpu, MAXCPU); virtual_avail = va; - for (i = 0; i < MAXCPU; i++) { - pcpu_pte[i] = (pcpu_phys + ptoa(i)) | X86_PG_V | X86_PG_RW | - pg_g | pg_nx | X86_PG_M | X86_PG_A; - } + /* + * Map the BSP PCPU now, the rest of the PCPUs are mapped by + * amd64_mp_alloc_pcpu()/start_all_aps() when we know the + * number of CPUs and NUMA affinity. + */ + pcpu_pte[0] = pcpu0_phys | X86_PG_V | X86_PG_RW | pg_g | pg_nx | + X86_PG_M | X86_PG_A; + for (i = 1; i < MAXCPU; i++) + pcpu_pte[i] = 0; /* * Re-initialize PCPU area for BSP after switching. From nobody Thu May 4 15:40:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBygh23q7z49F3D; Thu, 4 May 2023 15:40: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 4QBygh1Pd9z3QnD; Thu, 4 May 2023 15:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MEIMDdDr0F/vqxzGXqF9wkW466NZKTn1fmTnXsz3dZ0=; b=E8S6CIQO3eo6mWd1knZn07MFwwLirtPpL8jcr7XeQAZkK+jV8uwGrL0GurVQY/ve75V1Vn Z5d3JuDNFkV4fghzMMYB5uD9/ILNOaYtbKPQqBst9EiDyBOjEwSO3FFhPDHcfJO8zoGgnf ZaialRK1Ap9nLo8Yjc6YRw0nEDDsKYiyvS+cnP2G3WWkBrU5tfk+ywCrSOOPXuWYE/3Io/ i46DUs76oXkIsAERzi76yHVsekU/eBveNs71HFEM0yuIj/fBHuDy2xCACptxD5j3B0m7ZM KFtJNYne0wpQOb9kpf4/c+s7mkImAK8b4fqv26kKpZ7DK9yGCSGG7hYLa4vAvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MEIMDdDr0F/vqxzGXqF9wkW466NZKTn1fmTnXsz3dZ0=; b=yeCzJGWaM/OBRvcm34LqhWEX5o6u4kl8th1QUuUT6rcUJ1X9EvItPzMPzmoQK8/8LQKpgN wvMmG8AhsK82DQawFdoXOqHBaQp6AfvcuUkShA1bq9NN6B5Ssbm3KarpCahYTGB+ygrstj 6mhP8uwB+9xmeCIp+0jGKGU5cHXkBl4C9TUcj64jRR+Bm3VH/TNI5mKrGN2jzl3flVTn+T Y2ypTamRETZ63pXfF7rxPH4O0QlJZVeaAU2FS2StmmlrR4qLMfHGRfRh19k/zsxQxJN7/0 JlxI66FuBvkWwah18dAMadiSc3kRR9ol6Hh27ti+Ik0+5Gpwp5riJYzyWyjLkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683214816; a=rsa-sha256; cv=none; b=HoLWRbnHeiBxiE6JIol/q4Zo6NPTsvnOtfOiQsUPOfHBpczM7LEHbupH9/XlU5j0zx/p1U 6no5w9Tdc+++W1aFz0OZGd49Arv0FSlVqf9FALSUUM/YEfAwM6iDpyhdGOdgzgmntwmmS0 6yH6azVhzM/Ux+1T8B/+rzX/Cy9Pgwy7AWRM4J9miQNtWgFHRIeRQOPZzriC+99ROHYDNL Nr/Iq247SY+PgTDc2owbnl9X0oKcURyp4YoFmM7T/47D1XvfYVP9tqVtoBCXAr/dllbu3k 8FFlDx+aNjX+Y2STosOvP7KvW/vWgJ0w/9xxECwJ7OsKQuYcauHAmLQ6gkK9Gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBygh0KRDzHfd; Thu, 4 May 2023 15:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FeF84060568; Thu, 4 May 2023 15:40:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FeFST060566; Thu, 4 May 2023 15:40:15 GMT (envelope-from git) Date: Thu, 4 May 2023 15:40:15 GMT Message-Id: <202305041540.344FeFST060566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3582acbad303 - main - amd64 mp_machdep.c: remove useless comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3582acbad303bb69895457a8a7dae0f485efe8ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3582acbad303bb69895457a8a7dae0f485efe8ea commit 3582acbad303bb69895457a8a7dae0f485efe8ea Author: Konstantin Belousov AuthorDate: 2023-05-04 06:24:03 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-04 15:39:22 +0000 amd64 mp_machdep.c: remove useless comment Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39945 --- sys/amd64/amd64/mp_machdep.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 5fdde0bb887d..c6454485483d 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -313,10 +313,6 @@ amd64_mp_alloc_pcpu(void) } } -/******************************************************************* - * local functions and data - */ - /* * start each AP in our list */ From nobody Thu May 4 15:47:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QByr72fQRz49DwX; Thu, 4 May 2023 15:47: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 4QByr725Svz3hp4; Thu, 4 May 2023 15:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/mCBEALQuG3Ho7ie9gb+DOXrDLmkz6GqJDU3uJ8Sj4=; b=aHKZ3JC94EiUCKz3SVGQ5+t3YQSALFjXjL3hGnDbqQAH6KPsIE59rkZmQPEygqcD+jjf2F TSKX5K5m78NGAKpX4SG0AE/M5Cj6NPhNKMHDaWrIH7ajKjHVcK2LbBox6zaAUI3UXORSD8 a7EwaB41EVZakVGPPQ754HK1p45ugyQlTVxQGf7tfczH3LZx4OBlAV9faxNZXB0jjzAcFW nkUM0QiISfuRg4MwQIjiyEuqxPY/vtnoHNy4Q6IA+IWQ3acaCCDSOEQPsC0xEKhZ4s+1ei bYeSpv5O6ou+s0qNWcr7lNdx9BCWBTnCBwJMu2G42xyksVpjLYz2QFe73iKoxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/mCBEALQuG3Ho7ie9gb+DOXrDLmkz6GqJDU3uJ8Sj4=; b=ulJTfuvAgLWaUw9gBmgJzhimcl2GHZKsoqZWREf+ivWiOL/kuS/8mXjkKToPRBhDFBMRgL n9Q27JCmbMRvUtvouPJr6ARf+AIoHN6el8a3QPsG+07s60Jj319itNbTus/g86ZhuPSu0v sMXgr6xn3sta9y11newex9/NPia9rtRLeRvKdbbLl3d2F0i5YmsS1XRBnRYSfLlRCp4AwM NSM5u7J/S+Mk7j6/eJqrQi5D48zYaQhXaEQyl+XQuDVFMNjEpXh+yrIfF06W7bNwNkn3dM xooNzpLA1GJpfpsnCZ6bbbcyGFFp0UgSvvm9MC3D2jAWGcIuOH88/YvLYXY4Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683215255; a=rsa-sha256; cv=none; b=I/Q8CNgBynK+R8W0bnQqP6JSk2oWVGWWv2FS//l6wGMMli7CHvuyKcvvFqrxg8J4G07W/j jcziaE0U/1ByDSCuEWdXDooiJlCwMIePdb6VgYh8FH+HP5AORCO6WnKy/vV/R+lWdxt303 Pp2m2JyW5gjFGZU90dC77dZYPr/YaJR33Cdp/hKoywBsXHPoRu+SWdX3SPbZ1eBg5zW+HR ZHZbELFs4Z+OuSxJedmoGKLq6WYs0bIPp/iPBljcmRjyySrAugDHJdrHSb9xbCp1Y5fLeP RaeLRrGklLKGS6GCfIqYncKg8WSq/RbDoipfATpDygHKcFDseW5r34jEhPokKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QByr717RwzJ4x; Thu, 4 May 2023 15:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FlZVY069792; Thu, 4 May 2023 15:47:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FlYn2069791; Thu, 4 May 2023 15:47:34 GMT (envelope-from git) Date: Thu, 4 May 2023 15:47:34 GMT Message-Id: <202305041547.344FlYn2069791@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: 0d66206fff44 - main - Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d66206fff44f864ea8a4b220c3a53b4caa959a0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0d66206fff44f864ea8a4b220c3a53b4caa959a0 commit 0d66206fff44f864ea8a4b220c3a53b4caa959a0 Merge: 3582acbad303 5eab6333fa27 Author: Ed Maste AuthorDate: 2023-05-04 15:46:25 +0000 Commit: Ed Maste CommitDate: 2023-05-04 15:46:40 +0000 Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb' git-subtree-dir: contrib/spleen git-subtree-mainline: 3582acbad303bb69895457a8a7dae0f485efe8ea git-subtree-split: 5eab6333fa27e2b6954c6927859d462a004e57bb Reviewed by: imp [earlier] Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20653 contrib/spleen/AUTHORS | 5 + contrib/spleen/ChangeLog | 264 + contrib/spleen/LICENSE | 24 + contrib/spleen/README.md | 236 + contrib/spleen/spleen-12x24.bdf | 26081 +++++++++++++++++ contrib/spleen/spleen-16x32.bdf | 32918 +++++++++++++++++++++ contrib/spleen/spleen-32x64.bdf | 59894 ++++++++++++++++++++++++++++++++++++++ contrib/spleen/spleen-5x8.bdf | 7121 +++++ contrib/spleen/spleen-6x12.bdf | 9009 ++++++ contrib/spleen/spleen-8x16.bdf | 20465 +++++++++++++ 10 files changed, 156017 insertions(+) diff --cc contrib/spleen/AUTHORS index 000000000000,1fdb3485e79a..1fdb3485e79a mode 000000,100644..100644 --- a/contrib/spleen/AUTHORS +++ b/contrib/spleen/AUTHORS diff --cc contrib/spleen/ChangeLog index 000000000000,2688c8a9dc50..2688c8a9dc50 mode 000000,100644..100644 --- a/contrib/spleen/ChangeLog +++ b/contrib/spleen/ChangeLog diff --cc contrib/spleen/LICENSE index 000000000000,7f639bf61a6d..7f639bf61a6d mode 000000,100644..100644 --- a/contrib/spleen/LICENSE +++ b/contrib/spleen/LICENSE diff --cc contrib/spleen/README.md index 000000000000,000000000000..629a13711038 new file mode 100644 --- /dev/null +++ b/contrib/spleen/README.md @@@ -1,0 -1,0 +1,236 @@@ ++``` ++ ++ :::::::::::::::::::: ++ ::: ::: ++ _____ _______ __. ________ ________ ________. ::: ++ _) _//__ __/ __ / |.\ __ /.\ __ /.\ _. | ::: ++ .\____ /.\ )/ / || )/ | )/ | \| | ::: ++ | )/ | __/| \ _____| _____| | |_ ::: ++ |____ |_____| |_____/____\\ |____\\ | |____/ ::: ++ - -- -- \_____| -H7--------------------------- `----' ----- ::: - - ++ ::: ::: ++ :::::::::::::::::::: ++ ++``` ++ ++# Spleen ++ ++Spleen is a monospaced bitmap font available in 6 sizes: ++ ++- 5x8 ++- 6x12 ++- 8x16 ++- 12x24 ++- 16x32 ++- 32x64 ++ ++Each size is provided in the Glyph Bitmap Distribution Format (BDF), and ++release tarballs contain the fonts in the following formats: `PCF`, `PSF` ++(for the Linux console), `OTB`, `OTF`, `.dfont` for macOS users, and `FON` ++for Windows users. ++ ++All font sizes contain all ISO/IEC 8859-1 characters (Basic Latin and Latin-1 ++Supplement Unicode block), Latin Extended-A characters, as well as Box Drawing, ++Block Elements, and Braille Patterns Unicode blocks, except for the 5x8 and the ++6x12 versions. ++ ++Due to character size constraints, the 5x8 version only contains printable ++ASCII characters, the Braille Patterns Unicode block, and light Box Drawing ++characters. Please also note that there is no OpenType version for this size. ++ ++As of Spleen 1.8.0, there is now a 6x12 version containing the same Unicode ++blocks as the 5x8 version and the Latin-1 Supplement Unicode block. ++ ++Spleen also has support for Powerline symbols out of the box. ++ ++The font name is a reference to Baudelaire. ++ ++## Screenshots ++ ++The following screenshots show Spleen 16x32 displaying code and prose. ++ ++![Spleen - Hello][1] ++ ++![Spleen - L'etranger][2] ++ ++ASCII characters for all sizes: ++ ++Spleen 5x8: ++ ++![Spleen - ASCII characters - 5x8][3] ++ ++Spleen 6x12: ++ ++![Spleen - ASCII characters - 6x12][4] ++ ++Spleen 8x16: ++ ++![Spleen - ASCII characters - 8x16][5] ++ ++Spleen 12x24: ++ ++![Spleen - ASCII characters - 12x24][6] ++ ++Spleen 16x32: ++![Spleen - ASCII characters - 16x32][7] ++ ++Spleen 32x64: ++![Spleen - ASCII characters - 32x64][8] ++ ++## XLFD font names ++ ++``` ++-misc-spleen-medium-r-normal--8-80-72-72-c-50-iso10646-1 ++-misc-spleen-medium-r-normal--12-120-72-72-c-60-iso10646-1 ++-misc-spleen-medium-r-normal--16-160-72-72-c-80-iso10646-1 ++-misc-spleen-medium-r-normal--24-240-72-72-c-120-iso10646-1 ++-misc-spleen-medium-r-normal--32-320-72-72-c-160-iso10646-1 ++-misc-spleen-medium-r-normal--64-640-72-72-c-320-iso10646-1 ++``` ++ ++## Packages ++ ++Spleen packages are available for: ++ ++- [OpenBSD][9] ++- [NetBSD][10] ++- [FreeBSD][11] ++- [Arch Linux][12] ++- [Void Linux][13] ++- [Nix][14] ++- [Debian][15] ++- [Ubuntu][16] ++- [MacPorts][17] ++ ++## Manual installation ++ ++### *BSD and Linux ++ ++Clone the repository, convert the files to the Portable Compiled Format ++(PCF) using **bdftopcf** and run **mkfontdir** in the directory. ++ ++Alternatively, release tarballs provide PCF files for each size. ++ ++### macOS ++ ++macOS users should use the `.dfont` files provided in the release tarballs. ++ ++### Windows ++ ++Windows users should use the `.fon` or `.otf` files provided in the release ++tarballs. ++ ++## Usage ++ ++### *BSD and Linux ++ ++Update the font path to include **Spleen**: ++ ++ xset +fp /usr/local/share/fonts/spleen/ ++ ++Update **.Xdefaults** and add one of the following directives: ++ ++ xterm*faceName: spleen:pixelsize=8:antialias=false ++ xterm*faceName: spleen:pixelsize=12:antialias=false ++ xterm*faceName: spleen:pixelsize=16:antialias=false ++ xterm*faceName: spleen:pixelsize=24:antialias=false ++ xterm*faceName: spleen:pixelsize=32:antialias=false ++ xterm*faceName: spleen:pixelsize=64:antialias=false ++ ++Launch **xterm**. ++ ++Ubuntu has bitmap fonts support disabled by default, instructions to enable ++it are available [here][18]. ++ ++### Linux console ++ ++Release tarballs provide PSF files for each size, `setfont` can be used ++to load and set the desired font. ++ ++### NetBSD console ++ ++NetBSD has .fnt files for each size which can be loaded using wsfontload(8). ++ ++For example, to load Spleen 16x32: ++ ++ wsfontload -N spleen-16x32 -w 16 -h 32 /usr/share/wscons/fonts/spleen-16x32.fnt ++ wsconsctl -dw font=spleen-16x32 ++ ++### FreeBSD console ++ ++The FreeBSD package contains .fnt files which can be loaded using ++vidcontrol(1). ++ ++For example, to load Spleen 16x32: ++ ++ vidcontrol -f /usr/local/share/fonts/spleen/spleen-16x32.fnt ++ ++### OpenType versions ++ ++Spleen release tarballs now contains OTF versions generated automatically ++from the BDF files, using [bdf2sfd][19]. Each font has a different name, ++allowing them to be installed alongside. ++ ++They should be used in the exact size specified below, with anti-aliasing ++disabled. ++ ++- Spleen 6x12: 9 Pt (12 pixels) ++- Spleen 8x16: 12 Pt (16 pixels) ++- Spleen 12x24: 18 Pt (24 pixels) ++- Spleen 16x32: 24 Pt (32 pixels) ++- Spleen 32x64: 48 Pt (64 pixels) ++ ++## License ++ ++Spleen is released under the BSD 2-Clause license. See `LICENSE` file for ++details. ++ ++## Author ++ ++Spleen is developed by Frederic Cambus. ++ ++- Site: https://www.cambus.net ++ ++## Resources ++ ++- [Spleen - Monospaced bitmap fonts][20] (2018) ++- [New console font Spleen made default][21] (2019) ++- [NetBSD, CTWM, and Spleen][22] (2021) ++ ++GitHub: https://github.com/fcambus/spleen ++ ++## Trivia ++ ++- Spleen is the default font for OpenBSD consoles since January 2019 ++- Spleen was imported in the NetBSD src tree in March 2019 ++- Spleen 12x24 was used in the Haiku [kernel debugger][23] (on high resolution ++ displays) from May 2021 to June 2022 ++- [msTERM][24], a Terminal program for MailStation devices uses Spleen 5x8 ++- [FBInk][25], a library to print text & images to an eInk Linux framebuffer ++ embeds Spleen 16x32 ++ ++[1]: https://www.cambus.net/content/2018/09/spleen-hello.png ++[2]: https://www.cambus.net/content/2018/09/spleen-etranger.png ++[3]: https://www.cambus.net/files/spleen/spleen-5x8.png ++[4]: https://www.cambus.net/files/spleen/spleen-6x12.png ++[5]: https://www.cambus.net/files/spleen/spleen-8x16.png ++[6]: https://www.cambus.net/files/spleen/spleen-12x24.png ++[7]: https://www.cambus.net/files/spleen/spleen-16x32.png ++[8]: https://www.cambus.net/files/spleen/spleen-32x64.png ++[9]: https://openports.pl/path/fonts/spleen ++[10]: https://pkgsrc.se/fonts/spleen ++[11]: https://www.freshports.org/x11-fonts/spleen/ ++[12]: https://aur.archlinux.org/packages/spleen-font/ ++[13]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/font-spleen ++[14]: https://github.com/NixOS/nixpkgs/tree/master/pkgs/data/fonts/spleen ++[15]: https://packages.debian.org/search?keywords=spleen ++[16]: https://packages.ubuntu.com/search?keywords=spleen ++[17]: https://ports.macports.org/port/font-spleen/ ++[18]: https://wiki.ubuntu.com/Fonts#Enabling_Bitmapped_Fonts ++[19]: https://github.com/fcambus/bdf2sfd ++[20]: https://www.cambus.net/spleen-monospaced-bitmap-fonts/ ++[21]: https://undeadly.org/cgi?action=article;sid=20190110064857 ++[22]: https://www.cambus.net/netbsd-ctwm-and-spleen/ ++[23]: https://git.haiku-os.org/haiku/commit/?id=29a109bd6c01ce71bb61177ee9ff0417e74c1e18 ++[24]: https://github.com/jcs/msTERM ++[25]: https://github.com/NiLuJe/FBInk diff --cc contrib/spleen/spleen-12x24.bdf index 000000000000,081694e4c63d..081694e4c63d mode 000000,100644..100644 --- a/contrib/spleen/spleen-12x24.bdf +++ b/contrib/spleen/spleen-12x24.bdf diff --cc contrib/spleen/spleen-16x32.bdf index 000000000000,08f888ba87b8..08f888ba87b8 mode 000000,100644..100644 --- a/contrib/spleen/spleen-16x32.bdf +++ b/contrib/spleen/spleen-16x32.bdf diff --cc contrib/spleen/spleen-32x64.bdf index 000000000000,d67331a3206e..d67331a3206e mode 000000,100644..100644 --- a/contrib/spleen/spleen-32x64.bdf +++ b/contrib/spleen/spleen-32x64.bdf diff --cc contrib/spleen/spleen-5x8.bdf index 000000000000,4cf57171ce82..4cf57171ce82 mode 000000,100644..100644 --- a/contrib/spleen/spleen-5x8.bdf +++ b/contrib/spleen/spleen-5x8.bdf diff --cc contrib/spleen/spleen-6x12.bdf index 000000000000,1b1b95f370ad..1b1b95f370ad mode 000000,100644..100644 --- a/contrib/spleen/spleen-6x12.bdf +++ b/contrib/spleen/spleen-6x12.bdf diff --cc contrib/spleen/spleen-8x16.bdf index 000000000000,4509fb709e0e..4509fb709e0e mode 000000,100644..100644 --- a/contrib/spleen/spleen-8x16.bdf +++ b/contrib/spleen/spleen-8x16.bdf From nobody Thu May 4 16:24:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBzfB2l6nz49Gtg; Thu, 4 May 2023 16:24: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 4QBzfB2GkPz3qYN; Thu, 4 May 2023 16:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683217442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0NFI4u9oOKFmb7O1IEKDWw/cObhSyBpTbaj2SUAdp8=; b=JA7QbGaNIS4X/ypL1Lr7LzCpsRUKQ3YK9e+6iJvrugc6pOEzNIHsLHFYLD5SmxmyYr5DhX 1afxdHL6t72OAQiP7K8qjUqTf1WBbdjabOW2Sb0a7D1A9QBWigGKJk1T/kszUdiXliErF2 fbj6aOvCKt01/0P/JYKrY6wm12dNMOBi3zgwMpeyon1dezajn0myG1JomUjQQSGTanXr+E mRVfh6ENnCiigTzsP7p618RZh+SoNskPuKfw0t2Jao6ReGmbmvHFRJxrtZeviuq0LWs+tz fbH4+oq1tE1aaGRfc/XA223JoAxtYmmVqC49wBu86gOveba55TsIfM79dtXyiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683217442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0NFI4u9oOKFmb7O1IEKDWw/cObhSyBpTbaj2SUAdp8=; b=orjFHIciCD1q9Tahxux9BSSPzHZqA3kkkidkgYq9IAyheNDu+Ouv/qMfl5dTrUPfB2aAWV iYM7pGHLMt13q6u8PHrjHCoeFnD+9G5XEOYn94IYHsQn0jsAuPmV19rw/vBJjaV3g4ANpt 3Tx4WG/QjKLavAKWXR+tqh1SX7zy7wlIQLWNAdfMH6DTTOno0UmYafmzJH+ElihGambs4a q1BIEgIU4jHkX32ZFGhPL0qFqVKgesRytvVwUPNH545OWOhFy2vsAksHh+M4cebiSyRU4i 7OAbGZoIBQICApqO7UJeyFQmC6UznpQwgnzRiUJpO1VtK6ycDsBb6wGuJFKigA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683217442; a=rsa-sha256; cv=none; b=l3SYyTzmnkmt8WIIxtOyMsL/LIp5Om8ilFXfWXKSp0tLeavhCBltCD6viJVAC8C5ljvWxK n+tHVrChNtP6HJOqPoHc1BhsNGEVyix1TtSXwJcLUGTDO/C1zu3kmlDoA4e29k4Yo3faUR r+GrVgU+/LDcE64dn/nswIFOby2i8/QaUFgRERCgUVxjU+BCA/4xnLDHkLOIHZ/eDbpTm2 KDEBPRsmM6LKeZmamX82vAOYA7hZRL9XP5CcbOxtqPfSrIhhbgJEvV8xHUf7/EskO/ApCk CleFZuyX9/3mysCbuiNAcVpsI/hKCVK2OuG4iHa/L38QAVBI3VIQ9JL2Qe5VKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBzfB1L7yzJdq; Thu, 4 May 2023 16:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344GO2u0035535; Thu, 4 May 2023 16:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344GO2VP035534; Thu, 4 May 2023 16:24:02 GMT (envelope-from git) Date: Thu, 4 May 2023 16:24:02 GMT Message-Id: <202305041624.344GO2VP035534@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: bf206a1db26e - main - pf: remove NULL check before uma_zfree() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf206a1db26e44180466ea2258a2b82467ffb99e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf206a1db26e44180466ea2258a2b82467ffb99e commit bf206a1db26e44180466ea2258a2b82467ffb99e Author: Kristof Provost AuthorDate: 2023-05-04 15:20:02 +0000 Commit: Kristof Provost CommitDate: 2023-05-04 16:22:54 +0000 pf: remove NULL check before uma_zfree() uma_zfree() can be called on a NULL pointer. Simplify the pf code a little by removing the redundant checks. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/if_pfsync.c | 6 ++---- sys/netpfil/pf/pf.c | 18 ++++++------------ sys/netpfil/pf/pf_norm.c | 6 ++---- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 2bf1146ceda8..cf9a50a7020c 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -649,10 +649,8 @@ cleanup: error = ENOMEM; if (skw == sks) sks = NULL; - if (skw != NULL) - uma_zfree(V_pf_state_key_z, skw); - if (sks != NULL) - uma_zfree(V_pf_state_key_z, sks); + uma_zfree(V_pf_state_key_z, skw); + uma_zfree(V_pf_state_key_z, sks); cleanup_state: /* pf_state_insert() frees the state keys. */ if (st) { diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index ee17df0c866f..1424099b1e5a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4541,10 +4541,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, return (action); } } else { - if (sk != NULL) - uma_zfree(V_pf_state_key_z, sk); - if (nk != NULL) - uma_zfree(V_pf_state_key_z, nk); + uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, nk); } /* copy back packet headers if we performed NAT operations */ @@ -4570,10 +4568,8 @@ cleanup: free(ri, M_PF_RULE_ITEM); } - if (sk != NULL) - uma_zfree(V_pf_state_key_z, sk); - if (nk != NULL) - uma_zfree(V_pf_state_key_z, nk); + uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, nk); return (PF_DROP); } @@ -4812,10 +4808,8 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, return (PF_PASS); csfailed: - if (sk != NULL) - uma_zfree(V_pf_state_key_z, sk); - if (nk != NULL) - uma_zfree(V_pf_state_key_z, nk); + uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, nk); if (sn != NULL) { PF_SRC_NODE_LOCK(sn); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index c0dd3ba60113..8b267636751a 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1576,10 +1576,8 @@ pf_normalize_tcp_init(struct mbuf *m, int off, struct pf_pdesc *pd, void pf_normalize_tcp_cleanup(struct pf_kstate *state) { - if (state->src.scrub) - uma_zfree(V_pf_state_scrub_z, state->src.scrub); - if (state->dst.scrub) - uma_zfree(V_pf_state_scrub_z, state->dst.scrub); + uma_zfree(V_pf_state_scrub_z, state->src.scrub); + uma_zfree(V_pf_state_scrub_z, state->dst.scrub); /* Someday... flush the TCP segment reassembly descriptors. */ } From nobody Thu May 4 16:46:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC08c4m3fz49JCT; Thu, 4 May 2023 16:46: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 4QC08c4KBhz40tT; Thu, 4 May 2023 16:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683218816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV/0RXiFNfxv22mfO8f79TPTtBuGvpA2nOk2zezs1U8=; b=a0vAEQeIGbKjsV+R6MB+kLKixcyoImniuWAR71e3A/EhS2ZKyJwvcbs3d1j6RSyhOmIj4f HvO06oZgy5xbZCy7SC3FA7k/ozTbZMo5epPgbnWTIH09uBtKw/5mEBnrLsee4E6rmyN3zg 0VCjSj/SrWClI5nm3VCyLTK5sX5OS5EIHGsymLJx89pJMpbzXaqz1p6jl7aO10LTK5+Aul iRZ91KUU4Tul2NoOClPLby+N+7KuTuQeAxq7e4EcU5CKS8ZYLIkSzEOrN5YxtueRIbA8Kd pbyAOoD7oBVoVuyMD3Uxm4etfss4oFBJ1DiL4G0PscmWNYjH4OWep8QomldzcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683218816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV/0RXiFNfxv22mfO8f79TPTtBuGvpA2nOk2zezs1U8=; b=aFhzuSSGMH3coQ/QmMdOB9ZwfXbvPGikLa4dmtDmGTTIQr4o7w6q/jpxyF0WPgxwKVKfOG lTHWBlDcf8lktUM34shntmwkW7d1C8XFd2J8tEEIVTKA9S6jsIVoSM1FVTkNjN+Q6FBcIl ScBj2D1FrUJuG2QaJiV+UoL8JbQ7fZqNP8eXEO0Sp20HEz0rGBa55tRWLwT7NSa6ryd8Wc nMc0s0H2sZEMMigkawthx8UXZRgBZ4JYvAJUEvWgOaTR7Z9F1aCy/auBJVSRHxFn+FjXIi MGuDib2ZUF3McT6YvaUdiaMBhDZwYfHjln/3yn77meca+5Lmhj9Vhzfn9DyfYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683218816; a=rsa-sha256; cv=none; b=wqY95cWccOt3M/7w4EyBjFZPVm42NYaNq6O0QfqHGI7WWAthpBs+4WNIbrn3Npdw+saw7C 2xkgDE86xWgCMm85VzTe4J2HBdanAfP/iB1x9yWQ2w4/SWWUvZPsVwG61mMTihN52qU8aN lC2g74Zf2OF6mihD6P4wv3qpBpPrHtfJpBBVQMjjiPUmUJLNZoMAYS/YA0KZzvVw5lrlzW UwbFteVBfvHFGGCe3dZCKPLMsJKFrkRLXyjUOddd6IIpa6HNiCIdv5CVV6Mxmf2EPHeO0T y8RN89kZKmFYBsU3A489JbiTlchiE6tQw56XF5XcIDbJw07H0o+7xbpU+72/GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC08c3MqYzKJ6; Thu, 4 May 2023 16:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344GkuVR068413; Thu, 4 May 2023 16:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344GkuIb068412; Thu, 4 May 2023 16:46:56 GMT (envelope-from git) Date: Thu, 4 May 2023 16:46:56 GMT Message-Id: <202305041646.344GkuIb068412@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: 42d088299cd4 - main - Update meta.sys.mk ensure DEP_* set at level 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42d088299cd44287d6f532a6a93ac9c78ce74de7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=42d088299cd44287d6f532a6a93ac9c78ce74de7 commit 42d088299cd44287d6f532a6a93ac9c78ce74de7 Author: Simon J. Gerraty AuthorDate: 2023-05-04 16:46:47 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 16:46:47 +0000 Update meta.sys.mk ensure DEP_* set at level 1+ --- share/mk/meta.sys.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/share/mk/meta.sys.mk b/share/mk/meta.sys.mk index 7a74ba2d5d21..f580f4962be8 100644 --- a/share/mk/meta.sys.mk +++ b/share/mk/meta.sys.mk @@ -1,4 +1,4 @@ -# $Id: meta.sys.mk,v 1.46 2023/04/18 18:43:00 sjg Exp $ +# $Id: meta.sys.mk,v 1.48 2023/05/04 16:41:10 sjg Exp $ # # @(#) Copyright (c) 2010-2021, Simon J. Gerraty @@ -188,7 +188,7 @@ META_NOECHO= : UPDATE_DEPENDFILE= NO .export UPDATE_DEPENDFILE .elif ${_filemon:T} == "filemon" && !exists(${_filemon}) -.warning ${.newline}ERROR: The filemon module (${_filemon}) is not loaded. +.error ${.newline}ERROR: The filemon module (${_filemon}) is not loaded. .endif .endif @@ -206,6 +206,15 @@ dirdeps: .endif .endif +.else # level > 0 + +# Makefile.depend* get read at level 1+ +# and often refer to DEP_MACHINE etc, +# so ensure DEP_* (for TARGET_SPEC_VARS anyway) are set +.for V in ${TARGET_SPEC_VARS} +DEP_$V = ${$V} +.endfor + .endif .else META_COOKIE_TOUCH= From nobody Thu May 4 18:29:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2R83SJ0z49PDh; Thu, 4 May 2023 18:29: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 4QC2R82lKFz4GB9; Thu, 4 May 2023 18:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683224980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E98TVezeBIYYlRsfjyf3KuKYgdEf5GXXDw7z8yyjKk4=; b=mIWd+sPdjv+EhLgqYfoNSKmdl+LTNdwFAd6oFWybaK46B/7a0xLxcgIOE9xW0iGKvsEad5 oXWOX876TvWe9t3yB9iEp8rulOWLZufN1KW9S5Ijm/g2GeR8JZX+pSXo3nWKoa0GKlXMN9 RuZmV87MeTl7hHHJEDH7T7e3G6c0aEcpWMiUz3LjpiV2HyZdJUoeJ+W0+cH0yPHv1+kCzt FYtQlijpAgjcVrcVP4a8eXR/xyzAl5HSV96yjfPYED6nbY0nmWsMmQF7xbb6kPsHfps1lO zvj9erkBi1xqpKSzx4Y6hxvpAK0CxLUHiyEpJHQ10aWKoEh40dHX8ZbgIb8eAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683224980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E98TVezeBIYYlRsfjyf3KuKYgdEf5GXXDw7z8yyjKk4=; b=JAifULBhqyKIHkCsRPemFk2AD+K4uCvjxboGKbL5f0RkvYB0VubPY1sb+LLN+wTVCvYT2D KmHlOSYEg6S5D+A/paS86Zuy6eBXDacNvn7AdKC88Vs9NwgfKN+YTrLVd5/ZxccYY58cC0 yKcj66yOnUc4qz/7kx6HQspqeW9/hTFegKNjdxPYkHRXMkY9kYfOLucWppilXIQje1qUtI DkylvPbT709EWoi7KKD3hOFizDTkYGmk7MIf7ItRSFlkbvx9BpOMIYV2Cpx59if+s9fY+d qLtHAh1BbOj0AW5bDyKcwZQsEuMizcg+wUarhvLy1PirHkSwyBt8dBs9KIMMpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683224980; a=rsa-sha256; cv=none; b=JmB7YkMkC9iOfHWCFW33qS7fWARPqiOF86UAh+UixqbVYIX4GzfkRi8I9o3ZWTp2hX6Ae5 szhl1KquH0GZpW/sfEPmSTSxbdja4kCVi/2+lli2Xf60g9BBviRylbd2iG+mQAIbO77FTY e9Tr/QYcuv0ggIXMawH0r8i6lssDzMmA2n4Iqr1drgLGsyglAwnPtpRFFN60m6ZnDi832M g7s7Rbeg8tpbdEOh494twz1gcMRpVXRfc7QClOUMEFh9Tn/Q1DeDYUmgPQ0PSTacYwVUCD ZDOBA4RbohaTleaA5iIRCnIIcHB9Oho4E92j1L1f+5f3NedsIb2iZIdt5PlwsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2R81p1GzNJk; Thu, 4 May 2023 18:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344ITeEE033751; Thu, 4 May 2023 18:29:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344ITeJ3033750; Thu, 4 May 2023 18:29:40 GMT (envelope-from git) Date: Thu, 4 May 2023 18:29:40 GMT Message-Id: <202305041829.344ITeJ3033750@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: ba4d333364ea - main - dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba4d333364ea7b4f8bccce3e5f35bd989b707c6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ba4d333364ea7b4f8bccce3e5f35bd989b707c6a commit ba4d333364ea7b4f8bccce3e5f35bd989b707c6a Author: Simon J. Gerraty AuthorDate: 2023-05-04 18:29:33 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 18:29:33 +0000 dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE This helps avoid ugly noise in dirdeps.cache on Linux. --- share/mk/dirdeps.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index 6fedd00310e9..83b620044aa5 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.157 2023/04/22 21:07:51 sjg Exp $ +# $Id: dirdeps.mk,v 1.158 2023/05/04 18:26:17 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -333,6 +333,14 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec:[$i]} DEP_MACHINE := ${_DEP_TARGET_SPEC} .endif +# host is special +.if ${DEP_MACHINE:Mhost*} != "" +DEP_TARGET_SPEC = ${DEP_MACHINE} +.for v in ${TARGET_SPEC_VARS:O:u:NMACHINE} +.undef DEP_$v +.endfor +.endif + # reset each time through _build_all_dirs = _build_xtra_dirs = From nobody Thu May 4 18:52:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2xw0y4Rz49QD5; Thu, 4 May 2023 18:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC2xw0RD0z4JDf; Thu, 4 May 2023 18:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9cn8eWZRrJTaHDNXtb63gm/wchZOd8HqBVXtZ2yWHU=; b=l+GQtT5sJykqVz4Vtv4pKG4soq3Cbn8Hg7P21sekpcEUV34fx+FfsXedekgQCCMAcceOpP MjTdQdoA2mERg+smSJrpQbjgcJeQQSLvova1czMoaTbfjr2h+lW86RDu/FldKEJa/KuNhP XHsuGiZtHF58o/+Y0nWuM+DoRITQfjS4SN6tvd5br25KFFOVWfILopleNVEN1KGwyrnwpw qMI6Jd1hEWKQZh6156sRBVmcgepJrGRxo7DVDV4zRwxZm7ATerfnL4dnYeTqneNBT2CxIp oZRFGgYKC28zMZ0E+TUsttv8uoU0jeHPUI7HVn7WJpIGG7NJ2VibbaWk07AUwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9cn8eWZRrJTaHDNXtb63gm/wchZOd8HqBVXtZ2yWHU=; b=K/f8UrnRwl2VIf9DYqYTRA2Hv7yeO1JdUoh3K56ApXm5xZXsxb91C8D4Tx4L7ktknOtx9W tVO50zbiWv2d5qwfEe1DD78uUtT0+HLQzztmJ1QMT4GfjXf5Hm5rcwGUd4XM525J+NG68z d9OMzoI165WccALoOwRTirZR02vNRRlj1z2rslWkR8JF/0zoMsRl9oxT8bv3H/WRLPQMbw zDk/vYsLIaRtsrIjFPulQ/3U7zRPocWEJFoEwJBxN/Q6jo1PZE/uy36s9bdqhd7/CW7Qus /FnTVSuwbgO9OnAP96RMrNRkD/auiEfnlHlp5zjq9HYliqyDVE4m9HsP1uNggw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226372; a=rsa-sha256; cv=none; b=wDkiB/e6BtUa23h7/Znx1ZHCtFX6IXOv7uHVMAR15mvGkUQv8G1DUAkxAPOr2FKmfnshFx bUmi8AOutuQW+S2JUrbruBVcaGV8Hel1O9W59saoYdXNYlJq4ilZThXWfjHliKBtNmAAP6 vQdH5+TTdDXx1jqGv8yigyatHW9GpNjGFBc4GEaeB4R319ubDhDiykumCBc8bdfphlU9yu 8dvqIHD/qZ71MmF5yzPwb6cK1EzAOADv+TxOmKGl4/lKwZQVoOJt/iC1NnmUJXCRQirFbV /NoMLt8b3zT3uD5r58iAE1taeNKrF/oCyO3QhGRUQAljkgxdODhUuylSaO2/Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2xv6ZshzP5p; Thu, 4 May 2023 18:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344Iqp8T082005; Thu, 4 May 2023 18:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344IqpV7082004; Thu, 4 May 2023 18:52:51 GMT (envelope-from git) Date: Thu, 4 May 2023 18:52:51 GMT Message-Id: <202305041852.344IqpV7082004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5903d9c00b75 - main - ncal: Error out if writing to stdout failed. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5903d9c00b75f17f09404d1001ee5aaae7603a61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5903d9c00b75f17f09404d1001ee5aaae7603a61 commit 5903d9c00b75f17f09404d1001ee5aaae7603a61 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-04 17:26:54 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-04 18:51:10 +0000 ncal: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D39958 --- usr.bin/ncal/ncal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 5a6c33ce759d..b4f025141f92 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -497,6 +497,8 @@ main(int argc, char *argv[]) monthrangeb(y, m, flag_julian_day, before, after); else monthranger(y, m, flag_julian_day, before, after); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); return (0); } From nobody Thu May 4 18:52:52 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2xx1dJ2z49Q5R; Thu, 4 May 2023 18:52: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 4QC2xx16rMz4J6C; Thu, 4 May 2023 18:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NyOWNAP1b2dQgxIvJP/QLSRp4lWQqbpwnnCKCpx7PSE=; b=PTkxqkeM1XZ+zjvSrDkoYBekXEyyx0TYpsUcu6BKGyGYVOAqNGQA+jlSG90pa7UjcOzG0A VD4273CcVZ3LbzVTwulSM2nMN2fhSRGo8vbBq6yy+xPIeuJGbKhjUujWwFgWIUNfmAc0Hi cHe8ixad0+rZ9jC+WDy4Yh3Rvx9f/cuohy66sK8tsNujQ9fqCT6WdWPDHANNd39nJFD7VB ZEYgTWe4NyqfDYDKrsqC9Hr+HXfwbj+M40hqnE6jQC8MuhAX6U5XG5lJ9xV3amJKv9CREm vJlaorgDW1v5arV8kFE2WHTA+dCmMyRTPrd4/Kj9ga0wjkAB39MET3iHWvzStA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NyOWNAP1b2dQgxIvJP/QLSRp4lWQqbpwnnCKCpx7PSE=; b=i+BanNKPuTBrC7SvXoNrTShCdv7esug3JtplY1cTF1FPbxk58nVMFMYbjhPGRyNeQ3XuUD iLfnp8gcpjrjEJY8VL0wvsLf9iZWk3LaV7jFO72huyCAnWLeYNRNsRx1j+XK+ToK237mpj 6aFXdwhcz89VfLxwwy6SYFBXp7IZq4Vj3apeY6ALhVot4Pdf0GuFg4bXHvB81kyfVV+Z1N Do31TCqDkxqseOH3Hm9Rk4nEXMPa/EQGkio9DFIHbUgigSMDAYVV4us0DLjFuSoqOiu+wZ 9eglL6E4P7wwc6mNXojCbNemDQmZa2/2V+clI7ZwzJUG/6tk8Q6CTeqa6F3pBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226373; a=rsa-sha256; cv=none; b=Qru9fNrCzZXOdzT7tmWvMW21KmoUq3D7Y71nVVTlvny1R7l3ZtWE7NousoI+61cZ01SNsv IIsOHBcwUCbdNFuOlqWUAU/VTu7zvY516nIpMjFcMxTgyls3FQzrfIBrKWZrNU399lOF8z zNwgJzOXTAB4gMWQmw5lYzC8PL25SbwceoiwZYtMwhm7dVJkRJKO8gNtaFmR+w8hfHBVAH df9K4jPU+5HI4At6lHPsL8RJgQCcU8e0J6ZJOY9ZpkGG2DMTUsKpisrWqLetJrZpSKhoyx EhGiyUeCLVGl3HeDqxK6wruzk9kEHZc6LJWlKn6jh2z2dAb0g8jlkaY0MIMN8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2xx0FBXzP5q; Thu, 4 May 2023 18:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344IqqRG082029; Thu, 4 May 2023 18:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344Iqq12082028; Thu, 4 May 2023 18:52:52 GMT (envelope-from git) Date: Thu, 4 May 2023 18:52:52 GMT Message-Id: <202305041852.344Iqq12082028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: cb46f47c7969 - main - tsort: Error out if writing to stdout failed. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb46f47c7969b619d1b2547d06a75ad5b375eda9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cb46f47c7969b619d1b2547d06a75ad5b375eda9 commit cb46f47c7969b619d1b2547d06a75ad5b375eda9 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-04 17:26:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-04 18:51:11 +0000 tsort: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D39959 --- usr.bin/tsort/tsort.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index 58492b26999c..b2dbe9beb799 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -183,6 +183,8 @@ main(int argc, char *argv[]) /* do the sort */ tsort(); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); exit(0); } From nobody Thu May 4 18:59:29 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC35Y6XjBz49QMn; Thu, 4 May 2023 18:59: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 4QC35Y5qnDz4Kj2; Thu, 4 May 2023 18:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQ0hVVh78RGszCM56nkkeCgE3sDFAPnse7kT8QrqIEU=; b=f9Ewpu/rZ1eVr0UsyD9hJmyK64gHgTKvbz5XbZNqO3UOqf2Y6Q6TXYrqd+TNyXVJ/ASADL mH1wIW9hQaTAMhVNfcuRYurct8U7zrPxpi7Gw2oanU35Hu/HK4JHCNs/728kGJzvi/2t4l AqnehVip81zsjhlzeDiZNnymyZ0+fCp2TTj8a2X/66vOyFnqfUmPTgGvluS1vluwRp7lcR dKr746ebYCuU59F5d6x2uqpRlzPFG/2oZuuqtDSTgKkt1iEp+TBJK+8KePI2cKTU0dy2f1 P2HuOb0tPDuexA8lLBEO7Qbhyo5Pk7ZLPDJ1IQsUBUZgirOy0VcRsT74l6B3Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQ0hVVh78RGszCM56nkkeCgE3sDFAPnse7kT8QrqIEU=; b=v9imvS1yyaiDVwoiFuZlsfnO60FkemAxLIdnfbZh2uXXcHG3iAr7kujH6VaIFS2eXDY5CU q56JKJQdJUs7pabr3nEoW5/SHS1WduKRL1Zz+el4/PPH6Bl0MTULMBqXJPzSZCo04xZm5v VX2Bod9rYkeSCjhaNVwXqV85tmGAv3t4wSGUnfGayaFcczEJA8FhfQX/uBf4fMPnXGRkuT tZi674JZdzwsPOkG+nENFEklqgX8WRJ89Mhern4K9rROV4Z3h33bk0IApYbc++oAtd6wQr 1J8zbZRL5ZwjEByjT8LV12p2EKQt69/4Z5pC9rdga5C+vaC3RPzmi6u3eZhftw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226769; a=rsa-sha256; cv=none; b=f2gkFrO0nVhTaXc96eLtoo7LSgOVh2qKAkkcvBgHMeD4fCi/Gd7x/X6CjlHx7poJvcST+E zPBN3QsOokxLaN7Fwk4a8zU7XlN8KTRc7ofUpJWZYhlUvWn4m450dkFneWEWa8w3qeDVFI SFFqukt/kswuASIDtqBIKfiTpOLdFPJ48M/NfLeUQLpL/+/AwZICAGcjavAq/lGE3/e0T3 ORf/SOauKDXlexchNoQQmdbFEfJ4BCJQTO89OWxm6YRh/61YyZTrjpipyUQRC7AINnejLM 3U5jYlDAjJuArQ7S+rQXh/Rk7gOm97x8fonb77kT2M8/hGfdkoGd7eblupGAVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC35Y4pDdzNZX; Thu, 4 May 2023 18:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344IxTKd083378; Thu, 4 May 2023 18:59:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344IxTX9083377; Thu, 4 May 2023 18:59:29 GMT (envelope-from git) Date: Thu, 4 May 2023 18:59:29 GMT Message-Id: <202305041859.344IxTX9083377@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: e5e345a4b0aa - main - local.dirdeps.mk skip N_host_libs for non-FreeBSD host List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5e345a4b0aa9ac50ed23f90851fc5c68e94e0fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e5e345a4b0aa9ac50ed23f90851fc5c68e94e0fd commit e5e345a4b0aa9ac50ed23f90851fc5c68e94e0fd Author: Simon J. Gerraty AuthorDate: 2023-05-04 18:58:39 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 18:58:39 +0000 local.dirdeps.mk skip N_host_libs for non-FreeBSD host The N_host_libs dance only makes sense if host is FreeBSD. Even then, if MK_host_egacy is yes we need libmd libnetbsd does not need libutil when using libegacy Sponsored by: Juniper Networks, Inc. --- lib/libnetbsd/Makefile.depend | 1 - lib/libnetbsd/Makefile.depend.options | 1 + share/mk/local.dirdeps.mk | 34 ++++++++++++++++---------- targets/pseudo/host-tools/Makefile.depend.host | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/libnetbsd/Makefile.depend b/lib/libnetbsd/Makefile.depend index cf2961c09880..18be76b0cb6f 100644 --- a/lib/libnetbsd/Makefile.depend +++ b/lib/libnetbsd/Makefile.depend @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libutil \ .include diff --git a/lib/libnetbsd/Makefile.depend.options b/lib/libnetbsd/Makefile.depend.options index 4dcc6c412671..95c6de3baf00 100644 --- a/lib/libnetbsd/Makefile.depend.options +++ b/lib/libnetbsd/Makefile.depend.options @@ -1,5 +1,6 @@ DIRDEPS_OPTIONS = host_egacy +DIRDEPS.host_egacy.no = lib/libutil DIRDEPS.host_egacy.yes = tools/build .include diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index d0ae1c0171cb..f2328d6cd99c 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -18,30 +18,38 @@ M_dep_qual_fixes += C;($m),[^/.,]*$$;\1; .endfor #.info M_dep_qual_fixes=${M_dep_qual_fixes} +# Some things we never want to build for host +DIRDEPS_FILTER.host = \ + Ninclude* \ + Nlib/csu* \ + Nlib/libc \ + Nlib/[mn]* \ + Ngnu/lib/lib[a-r]* \ + Nsecure/lib* \ + Nusr.bin/xinstall* \ + +.if ${.MAKE.OS} == "FreeBSD" +# Host libraries should mostly be excluded from the build so the +# host version in /usr/lib is used. +# Internal libraries need to be allowed to be built though +# since they are never installed. + # Cheat for including src.libnames.mk ____: # Pull in _INTERNALLIBS .include -# Host libraries should mostly be excluded from the build so the -# host version in /usr/lib is used. Internal libraries need to be -# allowed to be built though since they are never installed. _need_host_libs= .for lib in ${_INTERNALLIBS} _need_host_libs+= ${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} .endfor +.if ${MK_host_egacy} == "yes" +_need_host_libs+= lib/libmd +.endif N_host_libs:= ${cd ${SRCTOP} && echo lib/lib*:L:sh:${_need_host_libs:${M_ListToSkip}}:${M_ListToSkip}} -DIRDEPS_FILTER.host = \ - ${N_host_libs} \ - Ninclude* \ - Nlib/csu* \ - Nlib/libc \ - Nlib/[mn]* \ - Ngnu/lib/lib[a-r]* \ - Nsecure/lib* \ - Nusr.bin/xinstall* \ - +DIRDEPS_FILTER.host+= ${N_host_libs} +.endif DIRDEPS_FILTER+= \ Nbin/cat.host \ diff --git a/targets/pseudo/host-tools/Makefile.depend.host b/targets/pseudo/host-tools/Makefile.depend.host index 39324fc6d49d..7ec04928d055 100644 --- a/targets/pseudo/host-tools/Makefile.depend.host +++ b/targets/pseudo/host-tools/Makefile.depend.host @@ -1,4 +1,5 @@ DIRDEPS= \ + sbin/md5 \ usr.bin/awk \ usr.bin/cap_mkdb \ usr.bin/file2c \ @@ -12,6 +13,5 @@ DIRDEPS= \ usr.sbin/makefs \ usr.sbin/nmtree \ - .include From nobody Thu May 4 19:04:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3CC4GVPz49QdC; Thu, 4 May 2023 19:04: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 4QC3CC31jqz4LcT; Thu, 4 May 2023 19:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683227063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kt4cl7wneicy/cw7X8c/zNo36S/07sczdlSFSBl1g4o=; b=haWv5LQ2mC6O2NY2K7GNMuy3UuGLMbRuvMbekcJu7Bi6caC8P27wVyDPc5ogoT3x8c8EI7 2ap1fb/ciXGrK7iDQYAkrKqBNHURk+7lsPU2iRsw1T0hj21uSro9XUVJjgnBJeobp/FLY8 gRI0bTpGOYKcksh43QNEH88s044SKUYnbUUjk/s8lKwI/mT5KBiVyQcEaIK8kmCiwjaDRI 6Ra4+nlpX5P8sv1z0VqbrpNQp1Hwlllx+eMnwQsFdWC81nrYcOuI8yQiDRDj7B78QwxgGB QKariVbx88BfjABCc1i8tdZh1K7vVus8TZX8/u0V8r+bs6uSJn0RXUSaB4a2jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683227063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kt4cl7wneicy/cw7X8c/zNo36S/07sczdlSFSBl1g4o=; b=vRSIGsUwTubgOe/ceEoSHYYsTtzVsAc2FPPlVv2QS3wsuDFdKlaJIOdRE/S5V7sOh9I+3O aZsKxbYHk1mAx9ja1z4k/0/m/yf2axJyajUbmZ/M5mveCPb46bbu5fKN4XsjP5UYrOYbQz jHb2tsocezVR4ZPzWloS8l6K+MNcXePM4mAtvyVjj3LcSsl8tZH176xx718GA9MhY4uG3R iupwGiwGf3ajxL0poASlJ7+Houzk+Z6QLSDae1TSTauyi/9tmOQ/UPzH/vg72hMwMQIHqc lipOX1OKD9SkM+7ANHszhtUJGZO1OvPHHFZDwm2mQeUQSfrQPfePxHz5ZEb9pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683227063; a=rsa-sha256; cv=none; b=X3OnK6PUCY8FOTAlBvBfa5KL83gSH9+0X3U9Lf0dStU6jPXlGssbDhbsbX49m8YkEROUIL UgOlDEhdz/7cWRy6biVkBANmrYwFFxCYjCeXwS6KjCCyhwXrqXehlSIWyuDtUraM4Xr3Kt QptMtH33dXKDVq7FV80TV9YASXS7Qzr3d8LslOjkT5ljfhfMvO26uMfp/PahzEdSPhcIE1 aKq4GlNMMENC3DFXi3o97qAnUi1PkViiyuAiSkZ9rKZI3lf8SyWujM50jMLb4tUSLBUwl5 GcWdruokNAQsnjWsXWgmGKsp6SSCIGOBIEehY+2qmi5S0MB88nMImSSVd25jtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3CC24QqzP8h; Thu, 4 May 2023 19:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344J4Nl6099826; Thu, 4 May 2023 19:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344J4Nwc099825; Thu, 4 May 2023 19:04:23 GMT (envelope-from git) Date: Thu, 4 May 2023 19:04:23 GMT Message-Id: <202305041904.344J4Nwc099825@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: b75d7e2cbe94 - main - md5 Makefile.depend.host List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b75d7e2cbe949583b3debef340f7e77b65ffb6b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b75d7e2cbe949583b3debef340f7e77b65ffb6b9 commit b75d7e2cbe949583b3debef340f7e77b65ffb6b9 Author: Simon J. Gerraty AuthorDate: 2023-05-04 19:03:34 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 19:03:34 +0000 md5 Makefile.depend.host --- sbin/md5/Makefile.depend.host | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/md5/Makefile.depend.host b/sbin/md5/Makefile.depend.host new file mode 100644 index 000000000000..35734ab3bee3 --- /dev/null +++ b/sbin/md5/Makefile.depend.host @@ -0,0 +1,12 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + lib/libmd \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From nobody Thu May 4 19:34:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sl1rskz49Rm2; Thu, 4 May 2023 19:34: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 4QC3sl1LQXz4PZ4; Thu, 4 May 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OO9Uh+shcU2NSSHOZigJyTPVDCgRRS/z6y889OtUwI=; b=HNwO0EdR79m+11KQHxaZQlt0Lr4ua9yqU8mkWtrIwbEz+ZSaQhH+6C1lUPzLOzCIO+uKao radKVd+LZwVsRWL8Ui9WYOnJIGJkUkFEV24QPAfp+MkwCzMZRk6r7YDG4wnem78MCmPC6h J2mfQEMfbmpRkZKTnr93S9nt99+W3fjBUdF0od57nX60rI+kzllFhh3SMc1gwfE2qumZS1 jGROnmdc6b5YmDZlOG2pAfLewwT+8neahbtmjfcLCQ3pp+1W7anrTISlnhMwoJEKodHTSD fSdVyQpboxQemhQciYpd7DNfJzaCZMTKn5KhItf5JFzrAm8tY+XOXFV9ReK31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OO9Uh+shcU2NSSHOZigJyTPVDCgRRS/z6y889OtUwI=; b=nB51LJ3dHVBrdkknXSinxtd+KxlFTmvXjndG1c8plLsvkmShNNnkCMRZO11HEfQqZ8UZgu 4qWrMyJr+YvV/I7l5bnAPDIhwTYVm/qHtdVLEEFwYxhWY8wj8hrlaisQKwjnNtSdSi9e5k lTmyRq9vihHCGiRXcckPMaRZwWlZrko+HHLt31n6omfq+6Mbd6vRucu5lsmbBR8Fvm27yM q2Ycppn3VMOoEk0SvbAIzB8ejmtDJNOkNO4w5zHocfIqihmrKKB7O0WhzUlJG0qqWNYwaJ Y2CghRHxCo5phbYe+S2AYW9b9YtjQNIDT/u3x4JkkVK+FASWDUW3ZcUZ4DRlxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228859; a=rsa-sha256; cv=none; b=QTo/8UOC5qbVx8bAxeZ0EBSMj+c9shtAM2P7r6XYD2f3aiLZ+z7KnRdzWGqSx5RE1esdPQ aiso+Jtv8unqPb6kxYkVgRNi4D+znBmiVn/OC46YuzstmfJO6ZL9m9IzshyDyBv9GQac3N mLP+2fhPnd69+GJjkJfPy3OVSa7c/aev6lTS9+SSVBzt0qzejaxzNqiRYA6kIIucCRlRhD 7KxX+dn+ZIu3UF+EUUdbhd4Ozi7XnNcz8hGS6a9nW0CppKfE4hhA7KAvgJ2Az+k8O2okAe rCdtXeF9+NXX8rL6Wod9qjxiQueyFUedTcuf037ESKWj+FvaqBBpBzss/Kn7Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sl0Q2lzPwn; Thu, 4 May 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYIOY049296; Thu, 4 May 2023 19:34:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYIK8049295; Thu, 4 May 2023 19:34:18 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:18 GMT Message-Id: <202305041934.344JYIK8049295@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: 407f675718aa - main - imgact_elf: Change header_supported to return bool instead of boolean_t. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 407f675718aaf3dfed4795746b41c946ced47209 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=407f675718aaf3dfed4795746b41c946ced47209 commit 407f675718aaf3dfed4795746b41c946ced47209 Author: John Baldwin AuthorDate: 2023-05-04 19:29:29 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:29:29 +0000 imgact_elf: Change header_supported to return bool instead of boolean_t. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D39919 --- sys/amd64/amd64/elf_machdep.c | 10 +++++----- sys/arm/arm/elf_machdep.c | 8 ++++---- sys/arm64/arm64/elf32_machdep.c | 10 +++++----- sys/powerpc/powerpc/elf64_machdep.c | 8 ++++---- sys/sys/imgact_elf.h | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index 3dc606edc04d..afb30a1751b2 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -167,17 +167,17 @@ amd64_lower_shared_page(struct sysentvec *sv) } } -static boolean_t +static bool freebsd_brand_info_la57_img_compat(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0) { if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0) - return (TRUE); + return (true); if (fctl0 == NULL || (*fctl0 & NT_FREEBSD_FCTL_LA48) != 0) - return (FALSE); + return (false); if ((imgp->proc->p_md.md_flags & P_MD_LA48) != 0) - return (FALSE); - return (TRUE); + return (false); + return (true); } static Elf64_Brandinfo freebsd_brand_info_la48 = { diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index 724b3437458e..3580d399ff56 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include "opt_global.h" /* for OPT_KDTRACE_HOOKS */ #include "opt_stack.h" /* for OPT_STACK */ -static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, +static bool elf32_arm_abi_supported(struct image_params *, int32_t *, uint32_t *); u_long elf_hwcap; @@ -125,7 +125,7 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); -static boolean_t +static bool elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -138,9 +138,9 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, if (bootverbose) uprintf("Attempting to execute non EABI binary (rev %d) image %s", EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); - return (FALSE); + return (false); } - return (TRUE); + return (true); } void diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 7b346ed81b2c..e57ae0e35fa1 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -74,7 +74,7 @@ static void freebsd32_setregs(struct thread *td, struct image_params *imgp, u_long stack); static void freebsd32_set_syscall_retval(struct thread *, int); -static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, +static bool elf32_arm_abi_supported(struct image_params *, int32_t *, uint32_t *); extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); @@ -142,7 +142,7 @@ static Elf32_Brandinfo freebsd32_brand_info = { SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd32_brand_info); -static boolean_t +static bool elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -151,7 +151,7 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, /* Check if we support AArch32 */ if (ID_AA64PFR0_EL0_VAL(READ_SPECIALREG(id_aa64pfr0_el1)) != ID_AA64PFR0_EL0_64_32) - return (FALSE); + return (false); #define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 hdr = (const Elf32_Ehdr *)imgp->image_header; @@ -161,10 +161,10 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, "(rev %d) image %s", EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); - return (FALSE); + return (false); } - return (TRUE); + return (true); } static int diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index a247a2c51ad6..3d39ba40b898 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -149,9 +149,9 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_regset_end = SET_LIMIT(__elfN(regset)), }; -static boolean_t ppc64_elfv1_header_match(struct image_params *params, +static bool ppc64_elfv1_header_match(struct image_params *params, int32_t *, uint32_t *); -static boolean_t ppc64_elfv2_header_match(struct image_params *params, +static bool ppc64_elfv2_header_match(struct image_params *params, int32_t *, uint32_t *); static Elf64_Brandinfo freebsd_brand_info_elfv1 = { @@ -227,7 +227,7 @@ ppc64_init_sysvecs(void *arg) } SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL); -static boolean_t +static bool ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -237,7 +237,7 @@ ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, return (abi == 0 || abi == 1); } -static boolean_t +static bool ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused, uint32_t *fctl0 __unused) { diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 6890df5c1500..21f52ccb6c05 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -89,7 +89,7 @@ typedef struct { const char *interp_newpath; int flags; Elf_Brandnote *brand_note; - boolean_t (*header_supported)(struct image_params *, + bool (*header_supported)(struct image_params *, int32_t *, uint32_t *); /* High 8 bits of flags is private to the ABI */ #define BI_CAN_EXEC_DYN 0x0001 From nobody Thu May 4 19:34:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sm3QyPz49S7q; Thu, 4 May 2023 19:34: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 4QC3sm23dZz4PjY; Thu, 4 May 2023 19:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ol4QPP5H4aq5ZgsgeX1802ymld7ywOX6cNHQbTA96ZM=; b=afLTqKaFUN0DYaMmaiyu5hkFXhIjP+5bWzOUwnxN/trTVaJ5I2uLjMk7jz02aGtPHzdzdB iFNpziZAZAhpeUInnmSSyYXphOUhudA96x5fYpcd5xWgdB9AZ1nw6YBeejBdDoK6Nbh13p lIAqMqaWZ14xOA7xZUn7uYBg7WKQVi7vY+JpTG0QmHCxaXlAe5W31lUV0p8oNmFCWlYeHe FJEQKpa8CWgiuCVhK3Bf5fZbilBtDLUeJrYd6egTi4WNzNDUGIYtiaio2sWXr2RugZXS4z Hl5e8zRzn15iZL2iK/oNAzbyvX5LU+WJi6dm6dcExjtvriDp+n+ksmJJzrCDtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ol4QPP5H4aq5ZgsgeX1802ymld7ywOX6cNHQbTA96ZM=; b=oD7dIlJC3vIScNIIXVxeLSEn9MBxoZpO1znfXNY5AUuAXH2yCGHSOrlmbyris7snlxJNp+ gk9j39kwjoVdpk1CiX3fW48MsPPM1NG9SR+tlnjI79ETR/QbTfgocIspMXUUOBo/bHMckj FWv5Zi4YD2T5OIpypvgd8mj+WlgxfNQT1n0wogx20ZJznUyu8RYUpYn1n3PDGcTZ1rVcxE b5nmGowhc4+alGkwE/dbfqQGi0syrxZNeqbHO/V2BHLBXS5P9KKxH4tiJAzD1ER9ROqt6x jjpx+HstTL6LJU6gQQfqUy2AhMZBWhQRQ9l7+jSkJgL5jiwLPW1EiB/UHoCHWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228860; a=rsa-sha256; cv=none; b=OESl+hxBRl1DYJLfuOH4qqow7HQH1CcZ76hj6k7cWzm75iW9ULrNZ2jrUYZZJqzhabUDr/ s20dU0KOt/aHT+HwEsCf0ofPz7NPl6apg8+WDm8uYReNFPrXqnJvXBBM8VokU9vEB7ZxPW 9WQ0LZ6SXduz5LssWyWQkhe3UT4sO2Vf46DuijUfHEd9IM4o/ts6a0aEF3Kp5OX2qPDGep fG9HAGzNHT0WrUX4uWpo5JzV0xEnysuY1j3ir8ayzY7FfwRYqyMVew0FL29SXxrDpPkLDZ I5ocQu6iHMIPG1b3I5/75WA7j3cImCevDhwA2hTCLlm/HzSLfrqLXffnNw7Jeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sm18DCzPNF; Thu, 4 May 2023 19:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYKa5049315; Thu, 4 May 2023 19:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYKGP049314; Thu, 4 May 2023 19:34:20 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:20 GMT Message-Id: <202305041934.344JYKGP049314@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: 4961faaacc07 - main - pmap_{un}map_io_transient: Use bool instead of boolean_t. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4961faaacc07d5bc71f28131229b1184d0d5ca9f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4961faaacc07d5bc71f28131229b1184d0d5ca9f commit 4961faaacc07d5bc71f28131229b1184d0d5ca9f Author: John Baldwin AuthorDate: 2023-05-04 19:29:48 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:29:48 +0000 pmap_{un}map_io_transient: Use bool instead of boolean_t. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D39920 --- sys/amd64/amd64/pmap.c | 24 ++++++++++++------------ sys/amd64/amd64/uio_machdep.c | 12 ++++++------ sys/amd64/include/pmap.h | 4 ++-- sys/arm64/arm64/pmap.c | 22 +++++++++++----------- sys/arm64/arm64/uio_machdep.c | 12 ++++++------ sys/arm64/include/pmap.h | 4 ++-- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 12 ++++++------ sys/riscv/include/pmap.h | 4 ++-- sys/riscv/riscv/pmap.c | 22 +++++++++++----------- sys/riscv/riscv/uio_machdep.c | 12 ++++++------ 10 files changed, 64 insertions(+), 64 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 1009736472dc..273c768559e1 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -10365,19 +10365,19 @@ done: * \param vaddr On return contains the kernel virtual memory address * of the pages passed in the page parameter. * \param count Number of pages passed in. - * \param can_fault TRUE if the thread using the mapped pages can take - * page faults, FALSE otherwise. + * \param can_fault true if the thread using the mapped pages can take + * page faults, false otherwise. * - * \returns TRUE if the caller must call pmap_unmap_io_transient when - * finished or FALSE otherwise. + * \returns true if the caller must call pmap_unmap_io_transient when + * finished or false otherwise. * */ -boolean_t +bool pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; - boolean_t needs_mapping; + bool needs_mapping; pt_entry_t *pte; int cache_bits, error __unused, i; @@ -10385,14 +10385,14 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, * Allocate any KVA space that we need, this is done in a separate * loop to prevent calling vmem_alloc while pinned. */ - needs_mapping = FALSE; + needs_mapping = false; for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); if (__predict_false(paddr >= dmaplimit)) { error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK, &vaddr[i]); KASSERT(error == 0, ("vmem_alloc failed: %d", error)); - needs_mapping = TRUE; + needs_mapping = true; } else { vaddr[i] = PHYS_TO_DMAP(paddr); } @@ -10400,7 +10400,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, /* Exit early if everything is covered by the DMAP */ if (!needs_mapping) - return (FALSE); + return (false); /* * NB: The sequence of updating a page table followed by accesses @@ -10426,7 +10426,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, } else { pte = vtopte(vaddr[i]); cache_bits = pmap_cache_bits(kernel_pmap, - page[i]->md.pat_mode, 0); + page[i]->md.pat_mode, false); pte_store(pte, paddr | X86_PG_RW | X86_PG_V | cache_bits); pmap_invlpg(kernel_pmap, vaddr[i]); @@ -10439,7 +10439,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, void pmap_unmap_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; int i; diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c index 786844dda7ce..97e5fdc0a05e 100644 --- a/sys/amd64/amd64/uio_machdep.c +++ b/sys/amd64/amd64/uio_machdep.c @@ -67,7 +67,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) size_t cnt; int error = 0; int save = 0; - boolean_t mapped; + bool mapped; KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, ("uiomove_fromphys: mode")); @@ -75,7 +75,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys proc")); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; - mapped = FALSE; + mapped = false; while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; cnt = iov->iov_len; @@ -90,7 +90,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) cnt = min(cnt, PAGE_SIZE - page_offset); if (uio->uio_segflg != UIO_NOCOPY) { mapped = pmap_map_io_transient( - &ma[offset >> PAGE_SHIFT], &vaddr, 1, TRUE); + &ma[offset >> PAGE_SHIFT], &vaddr, 1, true); cp = (char *)vaddr + page_offset; } switch (uio->uio_segflg) { @@ -114,8 +114,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) } if (__predict_false(mapped)) { pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], - &vaddr, 1, TRUE); - mapped = FALSE; + &vaddr, 1, true); + mapped = false; } iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; @@ -127,7 +127,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) out: if (__predict_false(mapped)) pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], &vaddr, 1, - TRUE); + true); if (save == 0) td->td_pflags &= ~TDP_DEADLKTREAT; return (error); diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 1b3aeb248ebb..cf41855a7c59 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -481,8 +481,8 @@ void pmap_invalidate_cache_pages(vm_page_t *pages, int count); void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t *ptr, int *num); -boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); -void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); +bool pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, bool); +void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, bool); void pmap_map_delete(pmap_t, vm_offset_t, vm_offset_t); void pmap_pti_add_kva(vm_offset_t sva, vm_offset_t eva, bool exec); void pmap_pti_remove_kva(vm_offset_t sva, vm_offset_t eva); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 1d1986b34f66..69073c5c56db 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -7619,33 +7619,33 @@ pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, * \param vaddr On return contains the kernel virtual memory address * of the pages passed in the page parameter. * \param count Number of pages passed in. - * \param can_fault TRUE if the thread using the mapped pages can take - * page faults, FALSE otherwise. + * \param can_fault true if the thread using the mapped pages can take + * page faults, false otherwise. * - * \returns TRUE if the caller must call pmap_unmap_io_transient when - * finished or FALSE otherwise. + * \returns true if the caller must call pmap_unmap_io_transient when + * finished or false otherwise. * */ -boolean_t +bool pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; - boolean_t needs_mapping; + bool needs_mapping; int error __diagused, i; /* * Allocate any KVA space that we need, this is done in a separate * loop to prevent calling vmem_alloc while pinned. */ - needs_mapping = FALSE; + needs_mapping = false; for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); if (__predict_false(!PHYS_IN_DMAP(paddr))) { error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK, &vaddr[i]); KASSERT(error == 0, ("vmem_alloc failed: %d", error)); - needs_mapping = TRUE; + needs_mapping = true; } else { vaddr[i] = PHYS_TO_DMAP(paddr); } @@ -7653,7 +7653,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, /* Exit early if everything is covered by the DMAP */ if (!needs_mapping) - return (FALSE); + return (false); if (!can_fault) sched_pin(); @@ -7670,7 +7670,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, void pmap_unmap_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; int i; diff --git a/sys/arm64/arm64/uio_machdep.c b/sys/arm64/arm64/uio_machdep.c index 11ed239fa9dd..6e92046f614b 100644 --- a/sys/arm64/arm64/uio_machdep.c +++ b/sys/arm64/arm64/uio_machdep.c @@ -65,7 +65,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) size_t cnt; int error = 0; int save = 0; - boolean_t mapped; + bool mapped; KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, ("uiomove_fromphys: mode")); @@ -73,7 +73,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys proc")); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; - mapped = FALSE; + mapped = false; while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; cnt = iov->iov_len; @@ -88,7 +88,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) cnt = min(cnt, PAGE_SIZE - page_offset); if (uio->uio_segflg != UIO_NOCOPY) { mapped = pmap_map_io_transient( - &ma[offset >> PAGE_SHIFT], &vaddr, 1, TRUE); + &ma[offset >> PAGE_SHIFT], &vaddr, 1, true); cp = (char *)vaddr + page_offset; } switch (uio->uio_segflg) { @@ -112,8 +112,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) } if (__predict_false(mapped)) { pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], - &vaddr, 1, TRUE); - mapped = FALSE; + &vaddr, 1, true); + mapped = false; } iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; @@ -126,7 +126,7 @@ out: if (__predict_false(mapped)) { panic("ARM64TODO: uiomove_fromphys"); pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], &vaddr, 1, - TRUE); + true); } if (save == 0) td->td_pflags &= ~TDP_DEADLKTREAT; diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index ad77450f0233..b855a811d3c0 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -162,8 +162,8 @@ void *pmap_mapbios(vm_paddr_t, vm_size_t); void pmap_unmapdev(void *, vm_size_t); void pmap_unmapbios(void *, vm_size_t); -boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); -void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); +bool pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, bool); +void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, bool); bool pmap_get_tables(pmap_t, vm_offset_t, pd_entry_t **, pd_entry_t **, pd_entry_t **, pt_entry_t **); diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 82201b358e91..a406634e96b8 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -625,7 +625,7 @@ icl_cxgbei_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *ip, struct mbuf *m, *m_tail; vm_offset_t vaddr; size_t page_offset, todo, mtodo; - boolean_t mapped; + bool mapped; int i; MPASS(icp->icp_signature == CXGBEI_PDU_SIGNATURE); @@ -712,7 +712,7 @@ icl_cxgbei_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *ip, todo = MIN(len, PAGE_SIZE - page_offset); mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1, - FALSE); + false); do { mtodo = min(todo, M_SIZE(m) - m->m_len); @@ -727,7 +727,7 @@ icl_cxgbei_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *ip, if (__predict_false(mapped)) pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1, - FALSE); + false); page_offset = 0; len -= todo; @@ -813,7 +813,7 @@ icl_cxgbei_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip, struct icl_cxgbei_pdu *icp = ip_to_icp(ip); vm_offset_t vaddr; size_t page_offset, todo; - boolean_t mapped; + bool mapped; int i; if (icp->icp_flags & ICPF_RX_DDP) @@ -834,12 +834,12 @@ icl_cxgbei_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip, todo = MIN(len, PAGE_SIZE - page_offset); mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1, - FALSE); + false); m_copydata(ip->ip_data_mbuf, pdu_off, todo, (char *)vaddr + page_offset); if (__predict_false(mapped)) pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1, - FALSE); + false); page_offset = 0; pdu_off += todo; diff --git a/sys/riscv/include/pmap.h b/sys/riscv/include/pmap.h index 88579e6448b5..5ca6dc411e7b 100644 --- a/sys/riscv/include/pmap.h +++ b/sys/riscv/include/pmap.h @@ -154,8 +154,8 @@ void *pmap_mapbios(vm_paddr_t, vm_size_t); void pmap_unmapdev(void *, vm_size_t); void pmap_unmapbios(void *, vm_size_t); -boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); -void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); +bool pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, bool); +void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, bool); bool pmap_get_tables(pmap_t, vm_offset_t, pd_entry_t **, pd_entry_t **, pt_entry_t **); diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 1b4eaa60a1f4..8d34dbc3637d 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -4736,33 +4736,33 @@ pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, * \param vaddr On return contains the kernel virtual memory address * of the pages passed in the page parameter. * \param count Number of pages passed in. - * \param can_fault TRUE if the thread using the mapped pages can take - * page faults, FALSE otherwise. + * \param can_fault true if the thread using the mapped pages can take + * page faults, false otherwise. * - * \returns TRUE if the caller must call pmap_unmap_io_transient when - * finished or FALSE otherwise. + * \returns true if the caller must call pmap_unmap_io_transient when + * finished or false otherwise. * */ -boolean_t +bool pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; - boolean_t needs_mapping; + bool needs_mapping; int error __diagused, i; /* * Allocate any KVA space that we need, this is done in a separate * loop to prevent calling vmem_alloc while pinned. */ - needs_mapping = FALSE; + needs_mapping = false; for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); if (__predict_false(paddr >= DMAP_MAX_PHYSADDR)) { error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK, &vaddr[i]); KASSERT(error == 0, ("vmem_alloc failed: %d", error)); - needs_mapping = TRUE; + needs_mapping = true; } else { vaddr[i] = PHYS_TO_DMAP(paddr); } @@ -4770,7 +4770,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, /* Exit early if everything is covered by the DMAP */ if (!needs_mapping) - return (FALSE); + return (false); if (!can_fault) sched_pin(); @@ -4787,7 +4787,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, void pmap_unmap_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; int i; diff --git a/sys/riscv/riscv/uio_machdep.c b/sys/riscv/riscv/uio_machdep.c index e6f6d39f02be..108824d5b8b4 100644 --- a/sys/riscv/riscv/uio_machdep.c +++ b/sys/riscv/riscv/uio_machdep.c @@ -65,7 +65,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) size_t cnt; int error = 0; int save = 0; - boolean_t mapped; + bool mapped; KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, ("uiomove_fromphys: mode")); @@ -73,7 +73,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys proc")); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; - mapped = FALSE; + mapped = false; while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; cnt = iov->iov_len; @@ -88,7 +88,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) cnt = min(cnt, PAGE_SIZE - page_offset); if (uio->uio_segflg != UIO_NOCOPY) { mapped = pmap_map_io_transient( - &ma[offset >> PAGE_SHIFT], &vaddr, 1, TRUE); + &ma[offset >> PAGE_SHIFT], &vaddr, 1, true); cp = (char *)vaddr + page_offset; } switch (uio->uio_segflg) { @@ -112,8 +112,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) } if (__predict_false(mapped)) { pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], - &vaddr, 1, TRUE); - mapped = FALSE; + &vaddr, 1, true); + mapped = false; } iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; @@ -126,7 +126,7 @@ out: if (__predict_false(mapped)) { panic("TODO 3"); pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], &vaddr, 1, - TRUE); + true); } if (save == 0) td->td_pflags &= ~TDP_DEADLKTREAT; From nobody Thu May 4 19:34:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sn3pgkz49Rx8; Thu, 4 May 2023 19:34: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 4QC3sn37Syz4Pk5; Thu, 4 May 2023 19:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgf6P4e/B/SDpIvk2R12LgQ+uv1RRPmBRhfxmZrMAVY=; b=XJpehHPNJDyLfRyBAgY2HeI93sEbp6f8OAB7SesYBmLYIcAiDnO/hcrjw5DN/VRzKyP5OE 2n8TsRDM4fSWuv/P0gbltCb7qqO+s/EJtWoce0H+dryFs3nJy9y3jSl2LcVTAYca8hkeNl c7thicVfPblZaoPwW5MFH4jXw3Lfpn1Fg7hd5k/4Ongi68Rk0DAQZ9yzFQXqbHrPRBJFxF x//tFNeEhQ3bDLhi14vAphtvixyplIfcbZU5ZeaKfF6EI80Rew5d7YBgt19wNS91N0VJYE /8TDuK/xGb3r7QXDRs4FvpsXwN2uhALORt1DTKZtGuL5ZEaKJfqvWUSUJ5ZzpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgf6P4e/B/SDpIvk2R12LgQ+uv1RRPmBRhfxmZrMAVY=; b=xh1CwSluzMIQKidGBpAYWtKzTKPLS9r9vAJrjBP/vEzqKauWTW9wYKQKRVceUC7sifQE46 NkDRejGsgo3Dqbwnbkg81WOEbd0czLRw5meGb9PynJsqa763hQgFZz+wGcivK4LAbpnmTT 2TvsqtkINA/quqthkU9Yupz2OKdbcec2ZUkUjT82V06W1NLxG+ErIlLQaMLhQ0S5tsgbzk TCJQdkeEZROfdO1nlD4XK9PRasfMU7ZAeaSwZxX/VAuQEPEPLGsC4E3f2ZZ+1d7EWY0dzE t9mGwWaSTaWmeD6mDn5m8qfWMCHf8ayz1enFdqI4m3P3Y1O75or7Di2NMMjyfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228861; a=rsa-sha256; cv=none; b=kXTA6aqtMpUWviVGHehrbDdnzU2up0RQCtq4aWoiYDpNeQYY0n68WC+APmefbYPoZvM087 uHBFZrdvBCYj+RjBTOTCLmnRo6ktrJDUVdhcIe1fUoXNktYh+mzVb4icxwJKuxPzXvHdcn bBVlMQDkWJeqqrIhk0WLUqdY433gxw/fbH2Bx4YGYoc9uc3DhgwZe36MvEJ01DPmOIpF1s XOlsCi1s5StBgq7pQahnHRpu5rEkROPCp6TlAEYiiAJL6yizI4C0PYFieOplBBURTAbrnr osZJyx+YBy91jwFoedfjciSX9YqZnEGN9A6sOakzwQwx7sD6khy+gxH7e5/Ifw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sn1wcFzPtf; Thu, 4 May 2023 19:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYLvH049338; Thu, 4 May 2023 19:34:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYLd0049337; Thu, 4 May 2023 19:34:21 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:21 GMT Message-Id: <202305041934.344JYLd0049337@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: 65c92e48c43a - main - acpi_button: Replace boolean_t with better types. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 commit 65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 Author: John Baldwin AuthorDate: 2023-05-04 19:32:09 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:32:09 +0000 acpi_button: Replace boolean_t with better types. - Use an enum for the button type (it is not really a boolean value). - Use bool for fixed. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39922 --- sys/dev/acpica/acpi_button.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c index 492f64e00f4d..f2c7041f809f 100644 --- a/sys/dev/acpica/acpi_button.c +++ b/sys/dev/acpica/acpi_button.c @@ -53,10 +53,8 @@ ACPI_MODULE_NAME("BUTTON") struct acpi_button_softc { device_t button_dev; ACPI_HANDLE button_handle; - boolean_t button_type; -#define ACPI_POWER_BUTTON 0 -#define ACPI_SLEEP_BUTTON 1 - boolean_t fixed; + enum { ACPI_POWER_BUTTON, ACPI_SLEEP_BUTTON } button_type; + bool fixed; #ifdef EVDEV_SUPPORT struct evdev_dev *button_evdev; #endif @@ -120,14 +118,14 @@ acpi_button_probe(device_t dev) } else if (strcmp(str, "ACPI_FPB") == 0) { device_set_desc(dev, "Power Button (fixed)"); sc->button_type = ACPI_POWER_BUTTON; - sc->fixed = 1; + sc->fixed = true; } else if (strcmp(str, "PNP0C0E") == 0) { device_set_desc(dev, "Sleep Button"); sc->button_type = ACPI_SLEEP_BUTTON; } else if (strcmp(str, "ACPI_FSB") == 0) { device_set_desc(dev, "Sleep Button (fixed)"); sc->button_type = ACPI_SLEEP_BUTTON; - sc->fixed = 1; + sc->fixed = true; } return (rv); From nobody Thu May 4 19:34:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sp4C1jz49RmC; Thu, 4 May 2023 19:34: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 4QC3sp3VMzz4PSY; Thu, 4 May 2023 19:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wJ0Uo9vD4H6Pf40XpY27eZWm9kXVxy05imi4+zCQ9k=; b=qjxnbocEangaOSxtLIq7pNUoIAmJ/vlfu/6/vRrjpROHSZ4JS/DhjZSUgllNSA9PISdxM4 McN9fCAAK68EK0iT3jDi6NL+XD1KTBdCgem4Dtf+tiaYqOG0NGRmXkoqxio4ZLHDMKJjRV JmTeqCw6kv9kT1y8g6bwb0itnJudRnPTuHZVde9Xb2xcaNIShIFTOdfeqZLugiZJ7VAxW3 0RrVZWDu0YC1VD+NJaNeQevD8VQH/qlUvOF/dE1gpFTNhsUUU7cLFmd5zibbSz5oaqETcO l06gkDNW3F2sV0qmk8Dl2c+l0JqyE95fsjZhmarVnaMGK753/cYjNKVUafxcww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wJ0Uo9vD4H6Pf40XpY27eZWm9kXVxy05imi4+zCQ9k=; b=yldO9/JSkUh8HREMxdxexYNrRw5Xn5zmiZAzf7S5iYddySQHyrX4G2u3njkULlMLqbiW5Y Gcf8FyhJgCyecu2vJXABf9TjrcJZb7t4T/uC4u8PPxVrjmKRlX10H/WNeogxny7g4reoWO PXnhgsNa7OVHLybErOAATYNp56oCf2+/Oi2cFQ11GL7zrf5EAxQlsGaIVJVh/Fz96emGQh R+71VK75o19RAiMsjgkS55XLEqx6qOqUZVPp020aJk2wXfv4472TU8V6e4aIPTY4s83iQo 2/8D9kjJdMqr99ZhCK4eN1YOTDfQ2MlnTW3zbEiDenzIMsqotKEITCfSA0aINQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228862; a=rsa-sha256; cv=none; b=I5U1/z5mLGnE+PaaRiQwJPmiXC/Pn3fvaUKTTbY34eHE2i1SJQpo187SVg1NQRyq12ZKtp QNx8ihHMxExWS+NevmfCHBpDlmgTf3qy7Y+PmsQivXYX804YU6n4BCWJnILNP+3ETmq0Hj a8NsaRb0gBvBW38dLc9cdOKbGNXFnRtcdqUMU6Cvz9uUgZqG3IyTY/FgbSL4QHD64A1yrh w9ZwY2VgC5KTiH8nDcf7DeI9MekxNeAhs8MCRftO7fpG/L72KPxAQUKhqHURW7SWMSwXgE R/sV83WUHezSlLwJSLPO6ljjASB2RNhuTr0JMJjjtmtXMADclsvNFuUPl4af5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sp2bGPzPsT; Thu, 4 May 2023 19:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYM97049363; Thu, 4 May 2023 19:34:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYMNu049362; Thu, 4 May 2023 19:34:22 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:22 GMT Message-Id: <202305041934.344JYMNu049362@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: 463edaf441ac - main - al: Replace boolean_t with either al_bool or bool. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 463edaf441ac5e881d8202a5c1ffa4bfe4df4678 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=463edaf441ac5e881d8202a5c1ffa4bfe4df4678 commit 463edaf441ac5e881d8202a5c1ffa4bfe4df4678 Author: John Baldwin AuthorDate: 2023-05-04 19:32:40 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:32:40 +0000 al: Replace boolean_t with either al_bool or bool. Use al_bool for interfaces and structures defined in the OS-independent HAL in sys/contrib, and use plain bool for FreeBSD-specific APIs and structures in sys/dev/al_eth. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39923 --- sys/dev/al_eth/al_eth.c | 32 ++++----- sys/dev/al_eth/al_eth.h | 38 +++++------ sys/dev/al_eth/al_init_eth_kr.c | 42 ++++++------ sys/dev/al_eth/al_init_eth_lm.c | 148 ++++++++++++++++++++-------------------- sys/dev/al_eth/al_init_eth_lm.h | 52 +++++++------- 5 files changed, 156 insertions(+), 156 deletions(-) diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index ec10313442b3..e3f9a14f4f2d 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -664,7 +664,7 @@ al_eth_mac_table_broadcast_add(struct al_eth_adapter *adapter, static void al_eth_mac_table_promiscuous_set(struct al_eth_adapter *adapter, - boolean_t promiscuous) + bool promiscuous) { struct al_eth_fwd_mac_table_entry entry = { { 0 } }; @@ -856,7 +856,7 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) return (-1); } - adapter->phy_exist = params.phy_exist == TRUE; + adapter->phy_exist = params.phy_exist == true; adapter->phy_addr = params.phy_mdio_addr; adapter->an_en = params.autoneg_enable; adapter->lt_en = params.kr_lt_enable; @@ -904,7 +904,7 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) switch (params.media_type) { case AL_ETH_BOARD_MEDIA_TYPE_RGMII: - if (params.sfp_plus_module_exist == TRUE) + if (params.sfp_plus_module_exist == true) /* Backward compatibility */ adapter->mac_mode = AL_ETH_MAC_MODE_SGMII; else @@ -921,12 +921,12 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) adapter->use_lm = true; break; case AL_ETH_BOARD_MEDIA_TYPE_AUTO_DETECT: - adapter->sfp_detection_needed = TRUE; + adapter->sfp_detection_needed = true; adapter->auto_speed = false; adapter->use_lm = true; break; case AL_ETH_BOARD_MEDIA_TYPE_AUTO_DETECT_AUTO_SPEED: - adapter->sfp_detection_needed = TRUE; + adapter->sfp_detection_needed = true; adapter->auto_speed = true; adapter->mac_mode_set = false; adapter->use_lm = true; @@ -943,9 +943,9 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) device_printf(adapter->dev, "Board info: phy exist %s. phy addr %d. mdio freq %u Khz. " "SFP connected %s. media %d\n", - params.phy_exist == TRUE ? "Yes" : "No", + params.phy_exist ? "Yes" : "No", params.phy_mdio_addr, adapter->mdio_freq, - params.sfp_plus_module_exist == TRUE ? "Yes" : "No", + params.sfp_plus_module_exist ? "Yes" : "No", params.media_type); } @@ -1299,7 +1299,7 @@ al_eth_xmit_mbuf(struct al_eth_ring *tx_ring, struct mbuf *m) bus_dma_segment_t segs[AL_ETH_PKT_MAX_BUFS + 1]; struct al_eth_pkt *hal_pkt; struct al_buf *al_buf; - boolean_t remap; + bool remap; /* Check if queue is ready */ if (unlikely(tx_ring->stall) != 0) { @@ -1333,7 +1333,7 @@ al_eth_xmit_mbuf(struct al_eth_ring *tx_ring, struct mbuf *m) return; } - remap = TRUE; + remap = true; /* Map packets for DMA */ retry: error = bus_dmamap_load_mbuf_sg(tx_ring->dma_buf_tag, tx_info->dma_map, @@ -1343,8 +1343,8 @@ retry: if (error == EFBIG) { /* Try it again? - one try */ - if (remap == TRUE) { - remap = FALSE; + if (remap == true) { + remap = false; m_new = m_defrag(m, M_NOWAIT); if (m_new == NULL) { device_printf(tx_ring->dev, @@ -1846,7 +1846,7 @@ al_eth_hw_init(struct al_eth_adapter *adapter) if ((adapter->mac_mode == AL_ETH_MAC_MODE_SGMII) || (adapter->mac_mode == AL_ETH_MAC_MODE_RGMII && - adapter->phy_exist == FALSE)) { + adapter->phy_exist == false)) { rc = al_eth_mac_link_config(&adapter->hal_adapter, adapter->link_config.force_1000_base_x, adapter->link_config.autoneg, @@ -1861,7 +1861,7 @@ al_eth_hw_init(struct al_eth_adapter *adapter) } rc = al_eth_mdio_config(&adapter->hal_adapter, - AL_ETH_MDIO_TYPE_CLAUSE_22, TRUE /* shared_mdio_if */, + AL_ETH_MDIO_TYPE_CLAUSE_22, AL_TRUE /* shared_mdio_if */, adapter->ref_clk_freq, adapter->mdio_freq); if (rc != 0) { device_printf(adapter->dev, "%s failed at mdio config!\n", @@ -2551,7 +2551,7 @@ al_eth_setup_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) } else { device_printf_dbg(adapter->dev, "RX Soft LRO[%d] Initialized\n", qid); - rx_ring->lro_enabled = TRUE; + rx_ring->lro_enabled = true; rx_ring->lro.ifp = adapter->netdev; } } @@ -2971,9 +2971,9 @@ al_eth_config_rx_fwd(struct al_eth_adapter *adapter) entry.queue_sel_1 = AL_ETH_CTRL_TABLE_QUEUE_SEL_1_THASH_TABLE; entry.queue_sel_2 = AL_ETH_CTRL_TABLE_QUEUE_SEL_2_NO_PRIO; entry.udma_sel = AL_ETH_CTRL_TABLE_UDMA_SEL_MAC_TABLE; - entry.filter = FALSE; + entry.filter = false; - al_eth_ctrl_table_def_set(&adapter->hal_adapter, FALSE, &entry); + al_eth_ctrl_table_def_set(&adapter->hal_adapter, AL_FALSE, &entry); /* * By default set the mac table to forward all unicast packets to our diff --git a/sys/dev/al_eth/al_eth.h b/sys/dev/al_eth/al_eth.h index 1f8d4528b545..9579aca55685 100644 --- a/sys/dev/al_eth/al_eth.h +++ b/sys/dev/al_eth/al_eth.h @@ -177,8 +177,8 @@ struct al_eth_link_config { uint8_t flow_ctrl_supported; /* the following are not relevant to RGMII */ - boolean_t force_1000_base_x; - boolean_t autoneg; + bool force_1000_base_x; + bool autoneg; }; /* SFP detection event */ @@ -196,18 +196,18 @@ enum al_eth_sfp_detect_evt { /* SFP detection status */ struct al_eth_sfp_detect_stat { /* Status is valid (i.e. rest of fields are valid) */ - boolean_t valid; - boolean_t connected; + bool valid; + bool connected; uint8_t sfp_10g; uint8_t sfp_1g; uint8_t sfp_cable_tech; - boolean_t lt_en; - boolean_t an_en; + bool lt_en; + bool an_en; enum al_eth_mac_mode mac_mode; }; struct al_eth_retimer_params { - boolean_t exist; + bool exist; uint8_t bus_id; uint8_t i2c_addr; enum al_eth_retimer_channel channel; @@ -304,10 +304,10 @@ struct al_eth_adapter { struct al_eth_mac_stats mac_stats; enum al_eth_mac_mode mac_mode; - boolean_t mac_mode_set; /* Relevant only when 'auto_speed' is set */ + bool mac_mode_set; /* Relevant only when 'auto_speed' is set */ uint8_t mac_addr[ETHER_ADDR_LEN]; /* mdio and phy*/ - boolean_t phy_exist; + bool phy_exist; struct mii_bus *mdio_bus; struct phy_device *phydev; uint8_t phy_addr; @@ -328,28 +328,28 @@ struct al_eth_adapter { struct task link_status_task; uint32_t link_poll_interval; /* task interval in mSec */ - boolean_t serdes_init; + bool serdes_init; struct al_serdes_grp_obj serdes_obj; uint8_t serdes_grp; uint8_t serdes_lane; - boolean_t an_en; /* run kr auto-negotiation */ - boolean_t lt_en; /* run kr link-training */ + bool an_en; /* run kr auto-negotiation */ + bool lt_en; /* run kr link-training */ - boolean_t sfp_detection_needed; /* true if need to run sfp detection */ - boolean_t auto_speed; /* true if allowed to change SerDes speed configuration */ + bool sfp_detection_needed; /* true if need to run sfp detection */ + bool auto_speed; /* true if allowed to change SerDes speed configuration */ uint8_t i2c_adapter_id; /* identifier for the i2c adapter to use to access SFP+ module */ enum al_eth_ref_clk_freq ref_clk_freq; /* reference clock frequency */ unsigned int mdio_freq; /* MDIO frequency [Khz] */ - boolean_t up; + bool up; - boolean_t last_link; - boolean_t last_establish_failed; + bool last_link; + bool last_establish_failed; struct al_eth_lm_context lm_context; - boolean_t use_lm; + bool use_lm; - boolean_t dont_override_serdes; /* avoid overriding serdes parameters + bool dont_override_serdes; /* avoid overriding serdes parameters to preset static values */ struct mtx serdes_config_lock; struct mtx if_rx_lock; diff --git a/sys/dev/al_eth/al_init_eth_kr.c b/sys/dev/al_eth/al_init_eth_kr.c index fba6b6154a1f..db055adda8c0 100644 --- a/sys/dev/al_eth/al_init_eth_kr.c +++ b/sys/dev/al_eth/al_init_eth_kr.c @@ -131,9 +131,9 @@ al_eth_kr_an_run(struct al_eth_kr_data *kr_data, struct al_eth_an_adv *an_adv, struct al_eth_an_adv *an_partner_adv) { int rc; - boolean_t page_received = FALSE; - boolean_t an_completed = FALSE; - boolean_t error = FALSE; + al_bool page_received = AL_FALSE; + al_bool an_completed = AL_FALSE; + al_bool error = AL_FALSE; int timeout = AL_ETH_KR_AN_TIMEOUT; rc = al_eth_kr_an_init(kr_data->adapter, an_adv); @@ -144,7 +144,7 @@ al_eth_kr_an_run(struct al_eth_kr_data *kr_data, struct al_eth_an_adv *an_adv, } rc = al_eth_kr_an_start(kr_data->adapter, AL_ETH_AN__LT_LANE_0, - FALSE, TRUE); + AL_FALSE, AL_TRUE); if (rc != 0) { al_err("%s %s autonegotiation enable failed\n", kr_data->adapter->name, __func__); @@ -163,7 +163,7 @@ al_eth_kr_an_run(struct al_eth_kr_data *kr_data, struct al_eth_an_adv *an_adv, al_eth_kr_an_status_check(kr_data->adapter, &page_received, &an_completed, &error); - } while (page_received == FALSE); + } while (page_received == AL_FALSE); if (error != 0) { al_info("%s %s autonegotiation failed (status error)\n", @@ -273,7 +273,7 @@ al_eth_kr_lt_receiver_task_init(struct al_eth_kr_data *kr_data) sizeof(struct al_eth_kr_status_report_data)); } -static boolean_t +static bool al_eth_lp_coeff_up_change(struct al_eth_kr_data *kr_data, struct al_eth_kr_coef_up_data *lpcoeff) { @@ -281,12 +281,12 @@ al_eth_lp_coeff_up_change(struct al_eth_kr_data *kr_data, if (al_memcmp(last_lpcoeff, lpcoeff, sizeof(struct al_eth_kr_coef_up_data)) == 0) { - return (FALSE); + return (false); } al_memcpy(last_lpcoeff, lpcoeff, sizeof(struct al_eth_kr_coef_up_data)); - return (TRUE); + return (true); } /* @@ -361,17 +361,17 @@ al_eth_kr_lt_transmitter_task_init(struct al_eth_kr_data *kr_data) return (0); } -static boolean_t +static bool al_eth_kr_lt_all_not_updated(struct al_eth_kr_status_report_data *report) { if ((report->c_zero == C72_CSTATE_NOT_UPDATED) && (report->c_minus == C72_CSTATE_NOT_UPDATED) && (report->c_plus == C72_CSTATE_NOT_UPDATED)) { - return (TRUE); + return (true); } - return (FALSE); + return (false); } static void @@ -461,7 +461,7 @@ al_eth_kr_lt_transmitter_task_run(struct al_eth_kr_data *kr_data) /* Wait for not_updated for all coefficients from remote */ if (al_eth_kr_lt_all_not_updated(&report) != 0) { - ldcoeff.preset = TRUE; + ldcoeff.preset = AL_TRUE; nextstate = DO_PRESET; } break; @@ -474,7 +474,7 @@ al_eth_kr_lt_transmitter_task_run(struct al_eth_kr_data *kr_data) nextstate = DO_HOLD; else /* as long as the lp didn't response to the preset * we should continue sending it */ - ldcoeff.preset = TRUE; + ldcoeff.preset = AL_TRUE; break; case DO_HOLD: /* @@ -645,7 +645,7 @@ al_eth_kr_lt_transmitter_task_run(struct al_eth_kr_data *kr_data) * our receiver is ready for data. * no training will occur any more. */ - kr_data->status_report.receiver_ready = TRUE; + kr_data->status_report.receiver_ready = AL_TRUE; /* * in addition to the status we transmit, we also must tell our * local hardware state-machine that we are done, so the @@ -698,15 +698,15 @@ al_eth_kr_run_lt(struct al_eth_kr_data *kr_data) { unsigned int cnt; int ret = 0; - boolean_t page_received = FALSE; - boolean_t an_completed = FALSE; - boolean_t error = FALSE; - boolean_t training_failure = FALSE; + al_bool page_received = AL_FALSE; + al_bool an_completed = AL_FALSE; + al_bool error = AL_FALSE; + al_bool training_failure = AL_FALSE; al_eth_kr_lt_initialize(kr_data->adapter, AL_ETH_AN__LT_LANE_0); if (al_eth_kr_lt_frame_lock_wait(kr_data->adapter, AL_ETH_AN__LT_LANE_0, - AL_ETH_KR_FRAME_LOCK_TIMEOUT) == TRUE) { + AL_ETH_KR_FRAME_LOCK_TIMEOUT) == AL_TRUE) { /* * when locked, for the first time initialize the receiver and * transmitter tasks to prepare it for detecting coefficient @@ -768,7 +768,7 @@ al_eth_kr_run_lt(struct al_eth_kr_data *kr_data) al_eth_kr_lt_stop(kr_data->adapter, AL_ETH_AN__LT_LANE_0); cnt = AL_ETH_KR_LT_DONE_TIMEOUT; - while (an_completed == FALSE) { + while (an_completed == AL_FALSE) { al_eth_kr_an_status_check(kr_data->adapter, &page_received, &an_completed, &error); DELAY(1); @@ -806,7 +806,7 @@ int al_eth_an_lt_execute(struct al_hal_eth_adapter *adapter, * the link training progress will run rx equalization so need to make * sure rx parameters is not been override */ - rx_params.override = FALSE; + rx_params.override = AL_FALSE; kr_data.serdes_obj->rx_advanced_params_set( kr_data.serdes_obj, kr_data.lane, diff --git a/sys/dev/al_eth/al_init_eth_lm.c b/sys/dev/al_eth/al_init_eth_lm.c index 5caea40e3bf7..4b4ebe3628a7 100644 --- a/sys/dev/al_eth/al_init_eth_lm.c +++ b/sys/dev/al_eth/al_init_eth_lm.c @@ -206,18 +206,18 @@ static struct retimer_config_reg retimer_ds25_10g_mode[] = { static int al_eth_lm_retimer_boost_config(struct al_eth_lm_context *lm_context); static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_context); -static al_bool al_eth_lm_retimer_ds25_signal_detect( +static bool al_eth_lm_retimer_ds25_signal_detect( struct al_eth_lm_context *lm_context, uint32_t channel); static int al_eth_lm_retimer_ds25_cdr_reset(struct al_eth_lm_context *lm_context, uint32_t channel); -static al_bool al_eth_lm_retimer_ds25_cdr_lock( +static bool al_eth_lm_retimer_ds25_cdr_lock( struct al_eth_lm_context *lm_context, uint32_t channel); static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_context); struct al_eth_lm_retimer { int (*config)(struct al_eth_lm_context *lm_context); int (*reset)(struct al_eth_lm_context *lm_context, uint32_t channel); - int (*signal_detect)(struct al_eth_lm_context *lm_context, uint32_t channel); - int (*cdr_lock)(struct al_eth_lm_context *lm_context, uint32_t channel); + bool (*signal_detect)(struct al_eth_lm_context *lm_context, uint32_t channel); + bool (*cdr_lock)(struct al_eth_lm_context *lm_context, uint32_t channel); int (*rx_adaptation)(struct al_eth_lm_context *lm_context); }; @@ -438,7 +438,7 @@ al_eth_module_detect(struct al_eth_lm_context *lm_context, } static struct al_serdes_adv_tx_params da_tx_params = { - .override = TRUE, + .override = AL_TRUE, .amp = 0x1, .total_driver_units = 0x13, .c_plus_1 = 0x2, @@ -448,7 +448,7 @@ static struct al_serdes_adv_tx_params da_tx_params = { }; static struct al_serdes_adv_rx_params da_rx_params = { - .override = TRUE, + .override = AL_TRUE, .dcgain = 0x4, .dfe_3db_freq = 0x4, .dfe_gain = 0x3, @@ -462,7 +462,7 @@ static struct al_serdes_adv_rx_params da_rx_params = { }; static struct al_serdes_adv_tx_params optic_tx_params = { - .override = TRUE, + .override = AL_TRUE, .amp = 0x1, .total_driver_units = 0x13, .c_plus_1 = 0x2, @@ -472,7 +472,7 @@ static struct al_serdes_adv_tx_params optic_tx_params = { }; static struct al_serdes_adv_rx_params optic_rx_params = { - .override = TRUE, + .override = AL_TRUE, .dcgain = 0x0, .dfe_3db_freq = 0x7, .dfe_gain = 0x0, @@ -495,7 +495,7 @@ al_eth_serdes_static_tx_params_set(struct al_eth_lm_context *lm_context) if (lm_context->serdes_tx_params_valid != 0) { lm_context->tx_param_dirty = 0; - lm_context->tx_params_override.override = TRUE; + lm_context->tx_params_override.override = AL_TRUE; if ((lm_context->serdes_obj->tx_advanced_params_set) == 0) { al_err("tx_advanced_params_set is not supported for this serdes group\n"); @@ -539,7 +539,7 @@ al_eth_serdes_static_rx_params_set(struct al_eth_lm_context *lm_context) if (lm_context->serdes_rx_params_valid != 0) { lm_context->rx_param_dirty = 0; - lm_context->rx_params_override.override = TRUE; + lm_context->rx_params_override.override = AL_TRUE; if ((lm_context->serdes_obj->rx_advanced_params_set) == 0) { al_err("rx_advanced_params_set is not supported for this serdes group\n"); @@ -583,7 +583,7 @@ al_eth_rx_equal_run(struct al_eth_lm_context *lm_context) int best_score = -1; int test_score = -1; - rx_params.override = FALSE; + rx_params.override = AL_FALSE; lm_context->serdes_obj->rx_advanced_params_set(lm_context->serdes_obj, lm_context->lane, &rx_params); @@ -647,7 +647,7 @@ al_eth_rx_equal_run(struct al_eth_lm_context *lm_context) } rx_params.precal_code_sel = 0; - rx_params.override = TRUE; + rx_params.override = AL_TRUE; lm_context->serdes_obj->rx_advanced_params_set( lm_context->serdes_obj, lm_context->lane, @@ -848,7 +848,7 @@ config_error: return rc; } -static al_bool al_eth_lm_retimer_ds25_signal_detect(struct al_eth_lm_context *lm_context, +static bool al_eth_lm_retimer_ds25_signal_detect(struct al_eth_lm_context *lm_context, uint32_t channel) { int rc = 0; @@ -868,17 +868,17 @@ static al_bool al_eth_lm_retimer_ds25_signal_detect(struct al_eth_lm_context *lm goto config_error; if (reg & LM_DS25_SIGNAL_DETECT_MASK) - return TRUE; + return true; - return FALSE; + return false; config_error: al_err("%s: failed to access to the retimer\n", __func__); - return FALSE; + return false; } -static al_bool al_eth_lm_retimer_ds25_cdr_lock(struct al_eth_lm_context *lm_context, +static bool al_eth_lm_retimer_ds25_cdr_lock(struct al_eth_lm_context *lm_context, uint32_t channel) { int rc = 0; @@ -898,23 +898,23 @@ static al_bool al_eth_lm_retimer_ds25_cdr_lock(struct al_eth_lm_context *lm_cont goto config_error; if (reg & LM_DS25_CDR_LOCK_MASK) - return TRUE; + return true; - return FALSE; + return false; config_error: al_err("%s: failed to access to the retimer\n", __func__); - return FALSE; + return false; } -static boolean_t al_eth_lm_wait_for_lock(struct al_eth_lm_context *lm_context, +static bool al_eth_lm_wait_for_lock(struct al_eth_lm_context *lm_context, uint32_t channel) { uint32_t timeout = AL_ETH_LM_RETIMER_WAIT_FOR_LOCK; - al_bool lock = AL_FALSE; + bool lock = false; - while ((timeout > 0) && (lock == FALSE)) { + while ((timeout > 0) && (!lock)) { al_msleep(10); timeout -= 10; @@ -930,16 +930,16 @@ static boolean_t al_eth_lm_wait_for_lock(struct al_eth_lm_context *lm_context, static void al_eth_lm_retimer_signal_lock_check(struct al_eth_lm_context *lm_context, uint32_t channel, - boolean_t *ready) + bool *ready) { - al_bool signal_detect = TRUE; - al_bool cdr_lock = TRUE; + bool signal_detect = true; + bool cdr_lock = true; if (retimer[lm_context->retimer_type].signal_detect) { if (!retimer[lm_context->retimer_type].signal_detect(lm_context, channel)) { lm_debug("no signal detected on retimer channel %d\n", channel); - signal_detect = AL_FALSE; + signal_detect = false; } else { if (retimer[lm_context->retimer_type].cdr_lock) { cdr_lock = retimer[lm_context->retimer_type].cdr_lock( @@ -961,13 +961,13 @@ static void al_eth_lm_retimer_signal_lock_check(struct al_eth_lm_context *lm_con al_info("%s: (channel %d) signal %d cdr lock %d\n", __func__, channel, signal_detect, (signal_detect) ? cdr_lock : 0); - *ready = ((cdr_lock == TRUE) && (signal_detect == TRUE)); + *ready = (cdr_lock && signal_detect); } static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_context) { int rc = 0; - al_bool ready; + bool ready; struct retimer_config_reg *config_tx; uint32_t config_tx_size; struct retimer_config_reg *config_rx; @@ -1006,7 +1006,7 @@ static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_conte if (lm_context->serdes_obj->type_get() == AL_SRDS_TYPE_25G) { lm_debug("%s: serdes 25G - perform tx and rx gearbox reset\n", __func__); - al_eth_gearbox_reset(lm_context->adapter, TRUE, TRUE); + al_eth_gearbox_reset(lm_context->adapter, AL_TRUE, AL_TRUE); DELAY(AL_ETH_LM_GEARBOX_RESET_DELAY); } @@ -1025,7 +1025,7 @@ static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_conte static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_context) { int rc = 0; - al_bool ready; + bool ready; al_eth_lm_retimer_signal_lock_check(lm_context, lm_context->retimer_channel, &ready); @@ -1041,7 +1041,7 @@ static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_cont return 0; } -static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, boolean_t *link_up) +static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, bool *link_up) { struct al_eth_link_status status; int ret = 0; @@ -1053,7 +1053,7 @@ static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, boolea lm_debug("%s: >>>> Link state DOWN ==> UP\n", __func__); al_eth_led_set(lm_context->adapter, AL_TRUE); lm_context->link_state = AL_ETH_LM_LINK_UP; - *link_up = AL_TRUE; + *link_up = true; return 0; } else if (status.local_fault) { @@ -1070,7 +1070,7 @@ static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, boolea ret = 0; } - *link_up = AL_FALSE; + *link_up = false; return ret; } @@ -1107,10 +1107,10 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, lm_context->get_random_byte = params->get_random_byte; /* eeprom_read must be provided if sfp_detection is true */ - al_assert((lm_context->sfp_detection == FALSE) || + al_assert((lm_context->sfp_detection == false) || (lm_context->i2c_read != NULL)); - al_assert((lm_context->retimer_exist == FALSE) || + al_assert((lm_context->retimer_exist == false) || (lm_context->i2c_write != NULL)); lm_context->local_adv.selector_field = 1; @@ -1122,8 +1122,8 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, lm_context->local_adv.fec_capability = params->kr_fec_enable; lm_context->mode = AL_ETH_LM_MODE_DISCONNECTED; - lm_context->serdes_tx_params_valid = FALSE; - lm_context->serdes_rx_params_valid = FALSE; + lm_context->serdes_tx_params_valid = false; + lm_context->serdes_rx_params_valid = false; lm_context->rx_param_dirty = 1; lm_context->tx_param_dirty = 1; @@ -1138,7 +1138,7 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, lm_context->led_config = params->led_config; - lm_context->retimer_configured = FALSE; + lm_context->retimer_configured = false; lm_context->link_state = AL_ETH_LM_LINK_DOWN; @@ -1147,7 +1147,7 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, int al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, - boolean_t *link_fault, enum al_eth_lm_link_mode *old_mode, + bool *link_fault, enum al_eth_lm_link_mode *old_mode, enum al_eth_lm_link_mode *new_mode) { int err; @@ -1163,14 +1163,14 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, * if the link wasn't up. */ if (lm_context->lm_pause != NULL) { - boolean_t lm_pause = lm_context->lm_pause(lm_context->i2c_context); - if (lm_pause == TRUE) { + bool lm_pause = lm_context->lm_pause(lm_context->i2c_context); + if (lm_pause == true) { *new_mode = AL_ETH_LM_MODE_DISCONNECTED; if (link_fault != NULL) { if (lm_context->link_state == AL_ETH_LM_LINK_UP) - *link_fault = FALSE; + *link_fault = false; else - *link_fault = TRUE; + *link_fault = true; } return 0; @@ -1181,7 +1181,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, *new_mode = lm_context->mode; if (link_fault != NULL) - *link_fault = TRUE; + *link_fault = true; switch (lm_context->link_state) { case AL_ETH_LM_LINK_UP: @@ -1189,9 +1189,9 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, if (status.link_up) { if (link_fault != NULL) - *link_fault = FALSE; + *link_fault = false; - al_eth_led_set(lm_context->adapter, TRUE); + al_eth_led_set(lm_context->adapter, AL_TRUE); return (0); } else if (status.local_fault) { @@ -1211,7 +1211,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, lm_context->link_state = AL_ETH_LM_LINK_DOWN; break; - } else if (status.remote_fault == FALSE) { + } else if (status.remote_fault == AL_FALSE) { lm_debug("%s: >>>> Link state DOWN_RF ==> UP\n", __func__); lm_context->link_state = AL_ETH_LM_LINK_UP; } @@ -1221,7 +1221,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, break; }; - al_eth_led_set(lm_context->adapter, FALSE); + al_eth_led_set(lm_context->adapter, AL_FALSE); if (lm_context->sfp_detection) { err = al_eth_module_detect(lm_context, new_mode); @@ -1244,7 +1244,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, lm_context->rx_param_dirty = 1; lm_context->tx_param_dirty = 1; - lm_context->new_port = TRUE; + lm_context->new_port = true; if ((*new_mode != AL_ETH_LM_MODE_DISCONNECTED) && (lm_context->led_config)) { struct al_eth_lm_led_config_data data = {0}; @@ -1272,19 +1272,19 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, } int -al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_up) +al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, bool *link_up) { - boolean_t signal_detected; + bool signal_detected; int ret = 0; switch (lm_context->link_state) { case AL_ETH_LM_LINK_UP: - *link_up = TRUE; + *link_up = true; lm_debug("%s: return link up\n", __func__); return (0); case AL_ETH_LM_LINK_DOWN_RF: - *link_up = FALSE; + *link_up = false; lm_debug("%s: return link down (DOWN_RF)\n", __func__); return (0); @@ -1297,9 +1297,9 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u * finished. in this case link will not be established until LM will be enable again. */ if (lm_context->lm_pause) { - boolean_t lm_pause = lm_context->lm_pause(lm_context->i2c_context); - if (lm_pause == TRUE) { - *link_up = FALSE; + bool lm_pause = lm_context->lm_pause(lm_context->i2c_context); + if (lm_pause == true) { + *link_up = false; return (0); } @@ -1316,11 +1316,11 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u if (retimer[lm_context->retimer_type].config(lm_context)) { al_info("%s: failed to configure the retimer\n", __func__); - *link_up = FALSE; + *link_up = false; return (1); } - lm_context->new_port = FALSE; + lm_context->new_port = false; DELAY(1000); } @@ -1331,7 +1331,7 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u if (ret != 0) { lm_debug("retimer rx is not ready\n"); - *link_up = FALSE; + *link_up = false; return (0); } @@ -1342,16 +1342,16 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u lm_context->serdes_obj, lm_context->lane); - if (signal_detected == FALSE) { + if (signal_detected == false) { /* if no signal detected there is nothing to do */ lm_debug("serdes signal is down\n"); - *link_up = AL_FALSE; + *link_up = false; return 0; } if (lm_context->serdes_obj->type_get() == AL_SRDS_TYPE_25G) { lm_debug("%s: serdes 25G - perform rx gearbox reset\n", __func__); - al_eth_gearbox_reset(lm_context->adapter, FALSE, TRUE); + al_eth_gearbox_reset(lm_context->adapter, AL_FALSE, AL_TRUE); DELAY(AL_ETH_LM_GEARBOX_RESET_DELAY); } @@ -1400,11 +1400,11 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u lm_context->serdes_obj->pma_hard_reset_lane( lm_context->serdes_obj, lm_context->lane, - TRUE); + AL_TRUE); lm_context->serdes_obj->pma_hard_reset_lane( lm_context->serdes_obj, lm_context->lane, - FALSE); + AL_FALSE); lm_context->link_training_failures = 0; } } @@ -1437,7 +1437,7 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u return (0); } - *link_up = FALSE; + *link_up = false; return (1); } @@ -1450,13 +1450,13 @@ al_eth_lm_static_parameters_override(struct al_eth_lm_context *lm_context, if (tx_params != NULL) { lm_context->tx_params_override = *tx_params; lm_context->tx_param_dirty = 1; - lm_context->serdes_tx_params_valid = TRUE; + lm_context->serdes_tx_params_valid = true; } if (rx_params != NULL) { lm_context->rx_params_override = *rx_params; lm_context->rx_param_dirty = 1; - lm_context->serdes_rx_params_valid = TRUE; + lm_context->serdes_rx_params_valid = true; } return (0); @@ -1464,13 +1464,13 @@ al_eth_lm_static_parameters_override(struct al_eth_lm_context *lm_context, int al_eth_lm_static_parameters_override_disable(struct al_eth_lm_context *lm_context, - boolean_t tx_params, boolean_t rx_params) + bool tx_params, bool rx_params) { - if (tx_params != 0) - lm_context->serdes_tx_params_valid = FALSE; - if (rx_params != 0) - lm_context->serdes_tx_params_valid = FALSE; + if (tx_params) + lm_context->serdes_tx_params_valid = false; + if (rx_params) + lm_context->serdes_tx_params_valid = false; return (0); } @@ -1526,7 +1526,7 @@ al_eth_lm_mode_convert_to_str(enum al_eth_lm_link_mode val) void al_eth_lm_debug_mode_set(struct al_eth_lm_context *lm_context, - boolean_t enable) + bool enable) { lm_context->debug = enable; diff --git a/sys/dev/al_eth/al_init_eth_lm.h b/sys/dev/al_eth/al_init_eth_lm.h index 9e2563f4f46f..15becd4c3679 100644 --- a/sys/dev/al_eth/al_init_eth_lm.h +++ b/sys/dev/al_eth/al_init_eth_lm.h @@ -140,11 +140,11 @@ struct al_eth_lm_context { uint32_t link_training_failures; - boolean_t tx_param_dirty; - boolean_t serdes_tx_params_valid; + bool tx_param_dirty; + bool serdes_tx_params_valid; struct al_serdes_adv_tx_params tx_params_override; - boolean_t rx_param_dirty; - boolean_t serdes_rx_params_valid; + bool rx_param_dirty; + bool serdes_rx_params_valid; struct al_serdes_adv_rx_params rx_params_override; struct al_eth_an_adv local_adv; @@ -152,20 +152,20 @@ struct al_eth_lm_context { enum al_eth_lm_link_mode mode; uint8_t da_len; - boolean_t debug; + bool debug; /* configurations */ - boolean_t sfp_detection; + bool sfp_detection; uint8_t sfp_bus_id; uint8_t sfp_i2c_addr; enum al_eth_lm_link_mode default_mode; uint8_t default_dac_len; - boolean_t link_training; - boolean_t rx_equal; - boolean_t static_values; + bool link_training; + bool rx_equal; + bool static_values; - boolean_t retimer_exist; + bool retimer_exist; enum al_eth_retimer_type retimer_type; uint8_t retimer_bus_id; uint8_t retimer_i2c_addr; @@ -183,16 +183,16 @@ struct al_eth_lm_context { uint32_t gpio_present; enum al_eth_retimer_channel retimer_tx_channel; - boolean_t retimer_configured; + bool retimer_configured; enum al_eth_lm_max_speed max_speed; - boolean_t sfp_detect_force_mode; + bool sfp_detect_force_mode; enum al_eth_lm_link_state link_state; - boolean_t new_port; + bool new_port; - boolean_t (*lm_pause)(void *handle); + bool (*lm_pause)(void *handle); void (*led_config)(void *handle, struct al_eth_lm_led_config_data *data); }; @@ -209,7 +209,7 @@ struct al_eth_lm_init_params { * set to true to perform sfp detection if the link is down. * when set to true, eeprom_read below should NOT be NULL. */ - boolean_t sfp_detection; + bool sfp_detection; /* i2c bus id of the SFP for this port */ uint8_t sfp_bus_id; /* i2c addr of the SFP for this port */ @@ -238,13 +238,13 @@ struct al_eth_lm_init_params { * - if rx_equal is set serdes equalization will be run to configure the rx parameters. * - if static_values is set, tx and rx values will be set based on static values. */ - boolean_t retimer_exist; - boolean_t link_training; - boolean_t rx_equal; - boolean_t static_values; + bool retimer_exist; + bool link_training; + bool rx_equal; + bool static_values; /* enable / disable fec capabilities in AN */ - boolean_t kr_fec_enable; + bool kr_fec_enable; /* * pointer to function that's read 1 byte from eeprom @@ -267,12 +267,12 @@ struct al_eth_lm_init_params { /* in case force mode is true - the default mode will be set regardless to * the SFP EEPROM content */ *** 45 LINES SKIPPED *** From nobody Thu May 4 19:34:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sq54Xqz49SB8; Thu, 4 May 2023 19:34: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 4QC3sq4gJpz4PpY; Thu, 4 May 2023 19:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwugFHYNvaaymoP3Mg7Bl/qKt4Mq6ul87bfi9rUuWHQ=; b=AoNr7EFx+hrP/zQs5HwwvHgPYQY7+tmppJt6lG0pRE/cNWKL12cVmsIhstiGoYSWi/gSDN 8c+XJcH0LZWRLeFNxSmILYgJiVh6uzdGzOoLC8Hx58s7geNKd/8mJV3SksNiWihJJ2EqsO kcv1kpdThYAKSY/32hLWcbqYrpNSWv4ugcj1WZQr6FafwNMnjf4rHFT6AEl84JaV3PIc4X uwx2i1H41K2rQXro+yUwt4sL9gQWtUTwiDQe6udrsfRcG7wMDRqgw670DnJnsitzCla+pK rJfRyhfKbc0gTfQZgO061M/lh1KyAUQfa7Q0brqXxidxygPvqnasEOqiD8UEHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwugFHYNvaaymoP3Mg7Bl/qKt4Mq6ul87bfi9rUuWHQ=; b=McUdzprWgLtaJ6ALVeMrMNAOuzbSb/V5XPez+eCoFl9JOhnYDXZqa9j15V9bywDNl00UEo AFZFn1Vt/e21VbRTJANRN3lZ5MvLXlJ88HYCunAeripZWDxopQxIDhPISXE2EdzLVtO7HS gJxoSlMmdrRfJpib7cW9koDgcGsu7AW1lNvrg5idZvxI17e4Cg2mkck/Z/TMl7ugBmzvYk jC6A8qLT7MfVVovfxDVPfcIY4bhmaMmfRAFophacjytaBuq1Wf+HTPOxqRb0koJawCldnD V7UNtI8t7gTN99iOmNf2EGb40fyIjb0gRw87KLN4fSlHJdQbW8ZLE+1+DkQVdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228863; a=rsa-sha256; cv=none; b=lejF3N+E8/R16f/a/rLsfhB7zF7Wb0ytH+32jLKYCV4S49c+yaSv0CvymenyAzli6mTKR9 M0ZeEblIpUcAQ2Uadk6G29tggTZGxBOzMqG/mYBkVYWilDyAK19cJd9wFdaY/4i01AoPc5 9mVmiXyLzXikvlhMppPlOzacyNMDJL35J8NnwsTLudEMZMeeG5lxelsZAvRox3wHcnMI01 BsfwiQlHe50p2ztlln+4h+sYp1cAwo+WwUaKav27Z4j8tl7lPG6/BZRW/fQ2QrNdVqEUZD n3Q2IVux6CRsXbrbTIanFNZ6WaYBhgjzCQdfj3nC0XsbNEwY1qITVoZ13wg/eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sq3W8vzPsV; Thu, 4 May 2023 19:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYNWm049385; Thu, 4 May 2023 19:34:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYNJO049384; Thu, 4 May 2023 19:34:23 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:23 GMT Message-Id: <202305041934.344JYNJO049384@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: 1efae8a24ffd - main - dpaa2: Replace boolean_t with bool. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1efae8a24ffd08e78decc4a95f134db620dc41ce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1efae8a24ffd08e78decc4a95f134db620dc41ce commit 1efae8a24ffd08e78decc4a95f134db620dc41ce Author: John Baldwin AuthorDate: 2023-05-04 19:32:57 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:32:57 +0000 dpaa2: Replace boolean_t with bool. This was already using true/false rather than TRUE/FALSE. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39924 --- sys/dev/dpaa2/dpaa2_ni.c | 2 +- sys/dev/dpaa2/dpaa2_ni.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index e5b0fe59d14d..d4e4de216736 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2776,7 +2776,7 @@ dpaa2_ni_transmit(if_t ifp, struct mbuf *m) struct dpaa2_ni_channel *chan; struct dpaa2_ni_tx_ring *tx; uint32_t fqid; - boolean_t found = false; + bool found = false; int chan_n = 0; if (__predict_false(!(if_getdrvflags(ifp) & IFF_DRV_RUNNING))) diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index 03528420d5d7..00215fdcefe5 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -552,7 +552,7 @@ struct dpaa2_ni_softc { struct mtx lock; device_t miibus; struct mii_data *mii; - boolean_t fixed_link; + bool fixed_link; struct ifmedia fixed_ifmedia; int media_status; From nobody Thu May 4 19:34:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3ss0QS3z49SKQ; Thu, 4 May 2023 19:34: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 4QC3sr5K02z4Phs; Thu, 4 May 2023 19:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVjdRZy2V8ZcSsRJWfQYEa0xM6Nvlct3KPVwboplec4=; b=q7DcKtNZXOft00YSi+nMPy9F1TvcmcERP7OGZT4qVVdzblMS3pWkc70p3Ms73iPseDby6A pwOpMEXYSwZrGCk8zdYlOsT1hwA0WfzczzNS9NtNhahM6ujUittVqF5NOjJqbGlKEmSS1k LK4tUgUcs+e/LU9dKuwBDqQ2abZxxpetj/roTVPlhK/paCK0+Cv1DR5DHyknk/WgRbDGZi OYYyjMpPZZksD6bldnNv4VipRSYgGlsWFGam5LzjENfSPKrA8NIIcr1LQupfIj8CvrtU8H kwe6Af6I9Bwg3apbTzE2t+HAAZC3ho35Ah0Hl6IuISBpN8ea8K1VHppRutHDAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVjdRZy2V8ZcSsRJWfQYEa0xM6Nvlct3KPVwboplec4=; b=u3f/XIZlcXspfatmEZpXQH10YLUsh8wfiGvhyBb2TrCKjIr9WlIGNJobQ0iRntUFQeJ8zX nzAdOOoH1ZyPW+G8jlT+x2NTz2gC7yWWv7zsKbxmVaxzTBrHQ/YMkHG7dYKGIbxVjXMHRQ TlhjK1cjIdHJ7NkAPo49/RDoR8+f3tiqwZURbTOrUKX0fzcZJ/wdgAmDjxTnyOozJAOMoL Evevshq9ABlvsMelUF8k+PwDzNJQqNedbroruVgp7PLpQGJ9YPxJ7IsOHw7ps6AfnhnQcG H38ESrI4Vz4bOSurcHhnqAho63I18suOh+omRT96QhS4v7vbG2XEpsxLf4luOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228864; a=rsa-sha256; cv=none; b=JawzurstNgBqgp6J0uabyyIfzQFdBRUhln68sTqBq2rFdalrIgJ2VrgGRS/2uTLsnmTGb7 BlSFfjp6HGMNl8eLwpcn/LYYiZ3v2FJx7x3Ab9OQT2krsZgvL86fLkLTxOZMsrlJEaXxjg HZYlAfGHWksKjQ8FUawvw3Jf1XFM0YR2FGPT4DzxmU8zzTiDm/NnM5OArtPmNDavtLZSNr 9NAc9YV4hPzSg9+PTQESKq5SDagXI2C8BXoM1mGYQHJFSw8/jiKBLE/cL+w434DjNwGjDx 0LAiXt6qX5bxhGtO5BpeNm5rlCBW1PKZIiAMbqDi3Dq0pm7CAOPpm9cTXGIDAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sr4PvKzPwp; Thu, 4 May 2023 19:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYOvO049407; Thu, 4 May 2023 19:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYOWm049406; Thu, 4 May 2023 19:34:24 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:24 GMT Message-Id: <202305041934.344JYOWm049406@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: 2fd903276ddb - main - dwc(4): Use bool rather than boolean_t. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fd903276ddb5159dcea93f16e0bfe9a1fc9e491 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2fd903276ddb5159dcea93f16e0bfe9a1fc9e491 commit 2fd903276ddb5159dcea93f16e0bfe9a1fc9e491 Author: John Baldwin AuthorDate: 2023-05-04 19:33:20 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:33:20 +0000 dwc(4): Use bool rather than boolean_t. This was already using true/false rather than TRUE/FALSE. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39925 --- sys/dev/dwc/if_dwcvar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index f4193b8222c9..96bcffc45a4d 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -70,9 +70,9 @@ struct dwc_softc { struct mtx mtx; void * intr_cookie; struct callout dwc_callout; - boolean_t link_is_up; - boolean_t is_attached; - boolean_t is_detaching; + bool link_is_up; + bool is_attached; + bool is_detaching; int tx_watchdog_count; int stats_harvest_count; int phy_mode; From nobody Thu May 4 19:34:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3st0b3rz49SBD; Thu, 4 May 2023 19:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC3ss65dVz4Pq6; Thu, 4 May 2023 19:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EYAsSb7joJa/uihSeQ8gyB8vk/7j/5pfWkZJ1l1riQ=; b=TpSDDQtubfUcTxHbfmP5yDkOyQVOK7oXui/u7ix6c2j3aSafl1oGQgxv6SZT3UN0TTg66Q NGvQXzYUsNgxJ67i7eFm3QrVl51sVjD3e2hS4GXn1AO4wpbc4EOXRu6UHOY5xtfp5+XPpc 968YweeZblcObRyAJCAiVg59A8c/Q8WpGl8q+oZNxCdqR/qACfTOM3w9whYgYJOWiMHYBn bwX7vhtHOttYhJXpd2NLwcFKPBNFxt3mH1jm4LMT1gDfMTwRMkuIUPcjNb4wOcXQoQv4SR sumV+3xwrdLiaZrco2LfcPZnx75T2yK7wuM0JN3/g1UovPufHGZPLv4j9TAFHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EYAsSb7joJa/uihSeQ8gyB8vk/7j/5pfWkZJ1l1riQ=; b=cHvoKSUEaMwZeSEOqQ5Tyut1aOkYzsVNZKue+gg16KPkyA7wEEppHKFzkufeai86X5cBoY 1rVvUXmIGeefguC/BffSXSIDdaBGAvdz0TsclKuCxR1ubpdzqYkuhwrMOeP7wi2dJrqQ70 k2kdkG2hpKvlYjtTgz3bm6Hgw4QsO90Y1Q25Tqf8WgD+N2DMQAuO1+uQcgHRrhexixwhCo 4l7Smn2NECs5ZoWcuCz49Vjokuj9y1Fs6o+R8r1NeHycuAPve4n70FXbxKGGF0TKP5fWZg fIsA1GBUoOfr7BaN0fObjua+XZldPcSZkmHdQhcdh7sxstr4Xl+RSeDFH2e2KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228865; a=rsa-sha256; cv=none; b=Ml6BNp4xTg1glazScXrHOL6f/rieo7GDqd3Qlhs8pzK5YKPrJMHb+KawawDChqeSNzY5zw rczudrtJG5wAYCRo0LdoYk6oysdu2dsydkBKtIV4YvYocRNh5ABr1keic9+1l41KvJjJ1d kBUdQItZkAkesflpMDY79/vuHLMWpjakyoxJ8r/hVNpQ37sZeZo/ebNykVZVkM+LEvt4z5 IsZ/H/xMMPCZQ4tsAriSlczWQ8Iqn0rt8cs+B2tghk4brTZ2oS7TpfxUCy7BGPU8LbqFKs MrnligKf+J8vCEEHuVS+4R0wGoZziMemtA41iB2UL6ULInwjdK1iSuKKFktoig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3ss5B4JzPlW; Thu, 4 May 2023 19:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYPqo049426; Thu, 4 May 2023 19:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYP4p049425; Thu, 4 May 2023 19:34:25 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:25 GMT Message-Id: <202305041934.344JYP4p049425@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: afdb42987ca8 - main - ofw_cpu_early_foreach: Change callback to return bool instead of boolean_t. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afdb42987ca82869eeaecf6dc25c2b6fb7b8370e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=afdb42987ca82869eeaecf6dc25c2b6fb7b8370e commit afdb42987ca82869eeaecf6dc25c2b6fb7b8370e Author: John Baldwin AuthorDate: 2023-05-04 19:33:39 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:33:39 +0000 ofw_cpu_early_foreach: Change callback to return bool instead of boolean_t. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39926 --- sys/arm/annapurna/alpine/alpine_machdep_mp.c | 4 ++-- sys/arm/qemu/virt_mp.c | 2 +- sys/arm/qualcomm/ipq4018_mp.c | 2 +- sys/arm/qualcomm/qcom_cpu_kpssv2.h | 2 +- sys/arm/rockchip/rk32xx_mp.c | 2 +- sys/arm64/arm64/mp_machdep.c | 12 ++++++------ sys/dev/fdt/fdt_arm_platform.c | 2 +- sys/dev/ofw/ofw_cpu.h | 2 +- sys/riscv/riscv/mp_machdep.c | 18 +++++++++--------- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/arm/annapurna/alpine/alpine_machdep_mp.c b/sys/arm/annapurna/alpine/alpine_machdep_mp.c index 7e6ea3479570..2a341540104d 100644 --- a/sys/arm/annapurna/alpine/alpine_machdep_mp.c +++ b/sys/arm/annapurna/alpine/alpine_machdep_mp.c @@ -80,9 +80,9 @@ extern void mpentry(void); static int platform_mp_get_core_cnt(void); static int alpine_get_cpu_resume_base(u_long *pbase, u_long *psize); static int alpine_get_nb_base(u_long *pbase, u_long *psize); -static boolean_t alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *); +static bool alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *); -static boolean_t +static bool alpine_validate_cpu(u_int id, phandle_t child, u_int addr_cell, pcell_t *reg) { return ofw_bus_node_is_compatible(child, "arm,cortex-a15"); diff --git a/sys/arm/qemu/virt_mp.c b/sys/arm/qemu/virt_mp.c index 12a957caa897..9b7c1c0bd23d 100644 --- a/sys/arm/qemu/virt_mp.c +++ b/sys/arm/qemu/virt_mp.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); static int running_cpus; -static boolean_t +static bool virt_start_ap(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) { int err; diff --git a/sys/arm/qualcomm/ipq4018_mp.c b/sys/arm/qualcomm/ipq4018_mp.c index a7ebb7d7d6c8..f8de5d6a9ccd 100644 --- a/sys/arm/qualcomm/ipq4018_mp.c +++ b/sys/arm/qualcomm/ipq4018_mp.c @@ -75,7 +75,7 @@ ipq4018_mp_setmaxid(platform_t plat) printf("SMP: ncpu=%d\n", ncpu); } -static boolean_t +static bool ipq4018_start_ap(u_int id, phandle_t node, u_int addr_cells, pcell_t *arg) { diff --git a/sys/arm/qualcomm/qcom_cpu_kpssv2.h b/sys/arm/qualcomm/qcom_cpu_kpssv2.h index 18e4affc208e..d84158088120 100644 --- a/sys/arm/qualcomm/qcom_cpu_kpssv2.h +++ b/sys/arm/qualcomm/qcom_cpu_kpssv2.h @@ -30,6 +30,6 @@ #ifndef __QCOM_CPU_KPSSV2_H__ #define __QCOM_CPU_KPSSV2_H__ -extern boolean_t qcom_cpu_kpssv2_regulator_start(u_int id, phandle_t node); +extern bool qcom_cpu_kpssv2_regulator_start(u_int id, phandle_t node); #endif /* __QCOM_CPU_KPSSV2_H__ */ diff --git a/sys/arm/rockchip/rk32xx_mp.c b/sys/arm/rockchip/rk32xx_mp.c index 089db173a0e9..fdb70cb0a6cd 100644 --- a/sys/arm/rockchip/rk32xx_mp.c +++ b/sys/arm/rockchip/rk32xx_mp.c @@ -119,7 +119,7 @@ rk32xx_mp_start_pmu(uint32_t mask) bus_space_unmap(fdtbus_bs_tag, pmu, PMU_SIZE); } -static boolean_t +static bool rk32xx_start_ap(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) { int rv; diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 5e4c035586a5..9a4997358f8a 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -687,7 +687,7 @@ populate_release_addr(phandle_t node, vm_paddr_t *release_addr) *release_addr = (((uintptr_t)buf[0] << 32) | buf[1]); } -static boolean_t +static bool start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { uint64_t target_cpu; @@ -716,11 +716,11 @@ start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) if (!psci_present && cpuid != 0) { if (OF_getprop_alloc(node, "enable-method", (void **)&enable_method) <= 0) - return (FALSE); + return (false); if (strcmp(enable_method, "spin-table") != 0) { OF_prop_free(enable_method); - return (FALSE); + return (false); } OF_prop_free(enable_method); @@ -728,12 +728,12 @@ start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) if (release_addr == 0) { printf("Failed to fetch release address for CPU %u", cpuid); - return (FALSE); + return (false); } } if (!start_cpu(cpuid, target_cpu, 0, release_addr)) - return (FALSE); + return (false); /* * Don't increment for the boot CPU, its CPU ID is reserved. @@ -748,7 +748,7 @@ start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) cpuid_to_pcpu[cpuid]->pc_domain = domain; if (domain < MAXMEMDOM) CPU_SET(cpuid, &cpuset_domain[domain]); - return (TRUE); + return (true); } static void cpu_init_fdt(void) diff --git a/sys/dev/fdt/fdt_arm_platform.c b/sys/dev/fdt/fdt_arm_platform.c index bc761f6c231a..0b36a10138bf 100644 --- a/sys/dev/fdt/fdt_arm_platform.c +++ b/sys/dev/fdt/fdt_arm_platform.c @@ -73,7 +73,7 @@ fdt_platform_probe(platform_t plat) } #if defined(SMP) -static boolean_t +static bool fdt_platform_maxid(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) { diff --git a/sys/dev/ofw/ofw_cpu.h b/sys/dev/ofw/ofw_cpu.h index d96991946237..1c6d7e766040 100644 --- a/sys/dev/ofw/ofw_cpu.h +++ b/sys/dev/ofw/ofw_cpu.h @@ -31,7 +31,7 @@ #ifndef _DEV_OFW_OFW_CPU_H_ #define _DEV_OFW_OFW_CPU_H_ -typedef boolean_t (*ofw_cpu_foreach_cb)(u_int, phandle_t, u_int, pcell_t *); +typedef bool (*ofw_cpu_foreach_cb)(u_int, phandle_t, u_int, pcell_t *); int ofw_cpu_early_foreach(ofw_cpu_foreach_cb, boolean_t); #endif /* _DEV_OFW_OFW_CPU_H_ */ diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c index e7e862d3772b..799f07036c00 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -403,7 +403,7 @@ cpu_mp_probe(void) } #ifdef FDT -static boolean_t +static bool cpu_check_mmu(u_int id __unused, phandle_t node, u_int addr_size __unused, pcell_t *reg __unused) { @@ -412,12 +412,12 @@ cpu_check_mmu(u_int id __unused, phandle_t node, u_int addr_size __unused, /* Check if this hart supports MMU. */ if (OF_getprop(node, "mmu-type", (void *)type, sizeof(type)) == -1 || strncmp(type, "riscv,none", 10) == 0) - return (0); + return (false); - return (1); + return (true); } -static boolean_t +static bool cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { struct pcpu *pcpup; @@ -428,7 +428,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) int error; if (!cpu_check_mmu(id, node, addr_size, reg)) - return (0); + return (false); KASSERT(id < MAXCPU, ("Too many CPUs")); @@ -449,7 +449,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) /* We are already running on this cpu */ if (hart == boot_hart) - return (1); + return (true); /* * Rotate the CPU IDs to put the boot CPU as CPU 0. @@ -462,7 +462,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) /* Check if we are able to start this cpu */ if (cpuid > mp_maxid) - return (0); + return (false); /* * Depending on the SBI implementation, APs are waiting either in @@ -477,7 +477,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) /* Send a warning to the user and continue. */ printf("AP %u (hart %lu) failed to start, error %d\n", cpuid, hart, error); - return (0); + return (false); } } @@ -503,7 +503,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) CPU_SET(cpuid, &all_cpus); CPU_SET(hart, &all_harts); - return (1); + return (true); } #endif From nobody Thu May 4 19:34:26 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sv1rBFz49S8J; Thu, 4 May 2023 19:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC3sv0Bhsz4Pll; Thu, 4 May 2023 19:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AM3guibrDyAnZWW8hDvIJlQzfmQ1q2SGn2kpFfD18I=; b=KSapJPQBGuND4n283xVLvsE9cdvtO4jxxn32TXz4mF7ll5bSrcGeB7AuArVcFD5xuFFOpr JFVunzCnsdqYAgKo0BvKBwekMq8vF9gfWlxNMaigMdlP4ncFZU5NfEB22MPgplY9je3FuM IJIpCDdqrxzvk2oBi+HZg3NsVXzsa4aCjsHeH5dOt+iUGZ2eGrK6h4qE0lz5JLQ4rISbBy 0ecetHlhFj+YGrNgkW0Lfzq3hwA2x5iLg23XZigN7BGJWvK3JL3lUUUGFhqcXiBupdqLZH P+dc+ZVMfqVuAcfCf0a1O8RrwbfIrGSPnLDM5xgTYB52FOpVxoxpn2mb06mL9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AM3guibrDyAnZWW8hDvIJlQzfmQ1q2SGn2kpFfD18I=; b=CqFYpl9JkFAQgDjcbgRG//LEdEX6qVucLv0OGD+CmpXOXdNb0qvNytO7hXBZhgGovJ3vWl Pr8aDEOcZYSBtKXf5G2bJ53fOmDF2IuWVvUeYLP6Os7IWNp5x/KW53VHIOmsOH5Synu12o 9l5FeKLjeUWke8hzdmKAOeg6NX40gZmAB7V/LWGa3Ki4Hfdth2C/kflN0Nhcb0ogJl7XRV UJobF5CdvzqOp6ZOOr3Ewg9Eddw3io+gezUlCV5h0oxKUaVAAsDrxcMSfa6ai5JtHhW529 zbkw0Avl+DR/7KEmmNlo3zh5HquUfyKzdHEJGvXE+asEzh8FdSOUXuW/zExU4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228867; a=rsa-sha256; cv=none; b=vhj4wjKsVZ3ZReRsMrhOXWEKps9wDApF8LPIO0iKmiTdp6ILVLHgnxB3RHQoTNeclx+uv5 hZJdT1moDGr7DZrAGvn9wO0CO410x4501cHmm7DB0hqVNY20WDPbGweCsBKuXgeXpD4QOf QTTfvp9vqlQrWh7byrqwKDAdNsCIJQW38r7ZYMewqRKpfl7pchZZS5YQbqNMjscPBv0Msh GmMMIzX+6C+l6F/hK3kPdI5iwgB2q3eHBRrzGkcaSE49OxWsWe2P3QVLupgTy0jX2d2jKX xz0IM+K9a5ZkErt7Ni/YQdu1rn9SompxiURXxuy5Fb3s/mp15rt8iRm1KtlOXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3st64xZzQ7y; Thu, 4 May 2023 19:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYQ8Z049445; Thu, 4 May 2023 19:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYQEJ049444; Thu, 4 May 2023 19:34:26 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:26 GMT Message-Id: <202305041934.344JYQEJ049444@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: 6cf4b46197ba - main - emac(4): Use bool rather than boolean_t. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cf4b46197ba0e99342d72cd976e93b168e887ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6cf4b46197ba0e99342d72cd976e93b168e887ee commit 6cf4b46197ba0e99342d72cd976e93b168e887ee Author: John Baldwin AuthorDate: 2023-05-04 19:34:02 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:34:02 +0000 emac(4): Use bool rather than boolean_t. This was already using true/false rather than TRUE/FALSE. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39927 --- sys/arm/allwinner/if_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index 3db0c6e95bc0..4191f313a9d1 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -991,7 +991,7 @@ fail: return (error); } -static boolean_t +static bool emac_miibus_iowait(struct emac_softc *sc) { uint32_t timeout; From nobody Thu May 4 21:59:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC75X2RZgz49Zxm; Thu, 4 May 2023 21:59: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 4QC75X1wfbz3kMc; Thu, 4 May 2023 21:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tCaysB+CLVQg8Rd1aZl/wzpcHzTmuog3jtdwqAXN05k=; b=xSu9mFXO9BcR1Ulz8ByQB9XdmvmuCXtvwMCqSpzASJMznQzcifjLWw5y6Dn5Ulm7aN+9MJ iJPD9FjjasYFiczK9h46GD6RUwTR7ijYNLP0FHOWEdzdo78fPJ1dSl7sKqKUfZgW3FaCH8 ORlXwYgooOLS7K0b4w+RkOtEgOqp5ftZFZqe+iXeC0adpKtK3UlB9i9Jz+fE/35/2Fik/t YDV1le4Wo6h4QXa/Gpzy9FftLorZR6nyStueNujz6EcYQC5fx0LGORe+oXFr1CPXYILDjM WbLNGbKvLlHZ17Ge7cYezNvzA6pCe8NhWbcPX0VtZbNYCNs7THE/e+UVHBZTlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tCaysB+CLVQg8Rd1aZl/wzpcHzTmuog3jtdwqAXN05k=; b=etOgLoxyxTAfylLV+waEcVdqJh3HTwycsb6+BinkCoWkoEATpG+NPc0CoRgUkqpMs3oBOI uAfopjTMTzYVPlvPqMjtTPLkFMOgVaFYNMGHp73p/Wzt9yPOfqWBZym6BH84EvvTCOD0RH aD4ZsDYIM61rY1Q83orMbSFw3Q3tlHJjy92rwCjZlubfFVmoP3X5mhtdXVJe2lH1eyBZ4E +7FvbZaaRl9OWzBQ/tTyqo7l9lt0NFy+yIBar0XULe5OLVwNSbIJfLg7JcOWhrJP5tHH8i RMdEfMR3Ap3pFfOWa8kI+hLyHcIJbzGo9OhdwTkgEGs+e1Pab/rQ7dj8YLADhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683237584; a=rsa-sha256; cv=none; b=jZLfhrZfeNBzTOyObJI7kXmSqgRzWhDvJl/uzzmdLtXxwiUGD7KCVhnYKQ8EVscbeJYdGS jXmyNo/do7ShWyxT2bfdd07c0mzDv6YIJnm+Zi1N3jrmZO3RSGc/iayTJKUzE8hoSEUYvl f5B0NnBP5ukxkIcw59Hjvo2bhajYSNgBIYOWNtYUCreRYjfFjt4ftYksF55FOBaEQUc/5w vC9WWstE2/Q32oEiOK5z5IabiWi67uCJ0kWg2k27UDsaPYFi6ixE5jlnDdP1bqL5CEAVfl HUyU+W55L4AI4/tvtqQ2LH+EWrn2fZNUeNJUP3XipfpyFCv6of1bylUlO+2obA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC75X0zwLzTR8; Thu, 4 May 2023 21:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344LxijO081008; Thu, 4 May 2023 21:59:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344LxiCs081007; Thu, 4 May 2023 21:59:44 GMT (envelope-from git) Date: Thu, 4 May 2023 21:59:44 GMT Message-Id: <202305042159.344LxiCs081007@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: 8fb0f07c7a13 - main - wlan(4): Mention WiFi more prominently List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8fb0f07c7a1331beeecc0c0f6afec674671867b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fb0f07c7a1331beeecc0c0f6afec674671867b9 commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9 Author: Tom Hukins AuthorDate: 2023-05-01 14:47:58 +0000 Commit: Warner Losh CommitDate: 2023-05-04 21:59:12 +0000 wlan(4): Mention WiFi more prominently WiFi is a commonly used term to describe wireless LANs. Adding this word will help readers better understand the contents of this manual page and will help find the page when searching, for example when running `man -k wifi`. Pull Request: https://github.com/freebsd/freebsd-src/pull/721 Reviewed by: imp --- share/man/man4/wlan.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 index 7c12e8b1f7f9..5cb7c67735c2 100644 --- a/share/man/man4/wlan.4 +++ b/share/man/man4/wlan.4 @@ -25,12 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2021 +.Dd May 5, 2023 .Dt WLAN 4 .Os .Sh NAME .Nm wlan -.Nd generic 802.11 link-layer support +.Nd generic WiFi 802.11 link-layer support .Sh SYNOPSIS .Cd "device wlan" .Sh DESCRIPTION From nobody Thu May 4 22:02:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC78F3b1gz49bDB for ; Thu, 4 May 2023 22:02:05 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC78F1zPBz3l6p for ; Thu, 4 May 2023 22:02:05 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3f315712406so79514355e9.0 for ; Thu, 04 May 2023 15:02:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683237723; x=1685829723; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0KE1mIXyj78odeEBuXDGYQS7TGqS4ZyveuOm8LigVyA=; b=AEVlF5KeCGixe0eCwm9i4OFt4SXc87ik/7MhwEkfgAwnJarYDBEGgAOazE2tUFRr0d XNpHjtS+Wy5N95ZHt1RHSxFiYAmLVjMYth7hfBOZE3YCMaaW3qHMPBBnYKt+n6M6wY7L fz63/wQpUysQjPIArGDt+s9cnhflPYCTWFMaRNjhIr6AUDUYaeiVyJ8J6772Yt/3jl9u HJv4edFT9p8VS4fNl1IQg3qn4M6NBzHytPkZsWaOSjPHAK4aBVuXnPxOtp7+cOYcb75U 1o79uGGUn4DJFitg0WPUN+kN/tghfulFilynTw5zoROXo7N4EQ/Ajh6pKnh0OP+9Pdel IGjQ== X-Gm-Message-State: AC+VfDymUU2bTNw59TqK/2GXfM2oZVEaC7gSYHRFzUG0MAEaxolxKsRv geXa5dMPXtYPhE0qBeRhrfOZFCLVkN35Vxqx6FHwKA== X-Google-Smtp-Source: ACHHUZ5h062l8EOXRp30KUQ4Z7p6FgJLWtgpBsv8qUb+hRJVut4F2haRoDS1Rb63IdadHL5aQDaT2g== X-Received: by 2002:a05:6000:12:b0:306:d43:4d8e with SMTP id h18-20020a056000001200b003060d434d8emr3722780wrx.29.1683237723180; Thu, 04 May 2023 15:02:03 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id f16-20020a5d6650000000b003062c0ef959sm312799wrw.69.2023.05.04.15.02.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2023 15:02:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: git: 8fb0f07c7a13 - main - wlan(4): Mention WiFi more prominently From: Jessica Clarke In-Reply-To: <202305042159.344LxiCs081007@gitrepo.freebsd.org> Date: Thu, 4 May 2023 23:02:01 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <9622914B-E00E-4FF3-80A1-1FFA0A6C201C@freebsd.org> References: <202305042159.344LxiCs081007@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Rspamd-Queue-Id: 4QC78F1zPBz3l6p X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4 May 2023, at 22:59, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D8fb0f07c7a1331beeecc0c0f6afec674= 671867b9 >=20 > commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9 > Author: Tom Hukins > AuthorDate: 2023-05-01 14:47:58 +0000 > Commit: Warner Losh > CommitDate: 2023-05-04 21:59:12 +0000 >=20 > wlan(4): Mention WiFi more prominently >=20 > WiFi is a commonly used term to describe wireless LANs. Adding = this > word will help readers better understand the contents of this = manual > page and will help find the page when searching, for example when > running `man -k wifi`. >=20 > Pull Request: https://github.com/freebsd/freebsd-src/pull/721 > Reviewed by: imp Should we have MLINKS+=3Dwlan.4 wifi.4 like how we have MLINKS+=3Dfirewire.4 ieee1394.4 already? Jess > --- > share/man/man4/wlan.4 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 > index 7c12e8b1f7f9..5cb7c67735c2 100644 > --- a/share/man/man4/wlan.4 > +++ b/share/man/man4/wlan.4 > @@ -25,12 +25,12 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd January 26, 2021 > +.Dd May 5, 2023 > .Dt WLAN 4 > .Os > .Sh NAME > .Nm wlan > -.Nd generic 802.11 link-layer support > +.Nd generic WiFi 802.11 link-layer support > .Sh SYNOPSIS > .Cd "device wlan" > .Sh DESCRIPTION From nobody Thu May 4 22:02:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC78d0gjvz49b45; Thu, 4 May 2023 22:02: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 4QC78c3Dy0z3lDp; Thu, 4 May 2023 22:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237744; h=from:from:reply-to:subject:subject: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/YM4V+Uw80wrbja9UDypW6pg0GUK3RuLya35MyOVY8=; b=WA/VwvMfJ801XWHY0wnWYlrwmcLYmZ8trqW53oP/kYfGlp7HTGsNuMlhkwa3HvEo4dLtHa qISS4ygZGqyCi5yUJvN1InN1skB+M1N578IrwPoNUXBtims/Ep7h3rxwvxsAmNFocVHcoe b5suNiD3p1DlqAhxE4b/xC2iXHG1KQyYOFugtc0CWn0TchdgPUD4HEuru50R0xmzRjE1RS j8xkRJ5xrWQe2lOv0FO9yNdF4beafC6m0EYRzA9yO0rv2a3T2cNsGyslGDDv8i5zQWmBzP Dz8jmAoSw+BtSpR6jLDiEHnWyGK7h08QaVim8NIKpT7+uSgLK7f9tRbbW4ItVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237744; h=from:from:reply-to:subject:subject: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/YM4V+Uw80wrbja9UDypW6pg0GUK3RuLya35MyOVY8=; b=BGi6b4SpwBay3XEO+SNa3NbNnHJEOha7zmBB1+67Jia9CScE4TXp2FPuCW1RkYHG3P3alQ 6T2nShgpwKY2+AE8mOZZdwOqUbJMXvYCQm4XDeypJaQ04HXQYXtzWQ0BHfFvzyy0/Jpwll xJxlettsGoMG+DT4h7/mKK7nrYnYLElHGvLWD8fCj+U+ai/msy9YnyIOVHSEaqNTJsKQr9 6eHbdzkWIc1ibQT0mOxskcEEQFWpY0n8NUM00WD2EuzCdiQ8t1wbPf90/fTikNf4DVq73R h4lINOCqSUO04CW9tGRYnhRxHbeehmCUsxxSEYcLi9SH/Lz6a/jbZ8ZR9FBRyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683237744; a=rsa-sha256; cv=none; b=qNzXH3wxX8JMEPxJQxK13VWg4DAKakJ8MozMLDlO5gMqjmMPFOxxWYKv96J8ZoV/qc0eyB fxgH/I7nAKAtwK8HHVGC1WqgQH42zLwj3cFeizUOgdXm+n1ADWMRTi6/9DAGZOkauiaWeo fDuoAIz/mia3fnEL9gnpVIyNqSljoLBPWyGE3OKiqcNC0BgtG6/sQXzC5VGnGTheMM4KvT z4TvhZEh+F+iWgkFNz1eEusEbJuFE+cULC2ymTOceCGXXKQw/dy/bG5/6onC5XQZ6mCuQc GGokiYsBfikLoCMdZDtHZaowqfcsMtoJL5m+iHW/buERJC2xrplGsmCYJJT1lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC78c2HsQzV9j; Thu, 4 May 2023 22:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M2O1N095271; Thu, 4 May 2023 22:02:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M2OV6095270; Thu, 4 May 2023 22:02:24 GMT (envelope-from git) Date: Thu, 4 May 2023 22:02:24 GMT Message-Id: <202305042202.344M2OV6095270@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: 9affcf438beb - main - bluetooth/hccontrol: Fix unterminated command list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9affcf438beb43e912e289d1b9f86692d73b0b0a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9affcf438beb43e912e289d1b9f86692d73b0b0a commit 9affcf438beb43e912e289d1b9f86692d73b0b0a Author: Brian Campbell AuthorDate: 2023-05-04 22:01:31 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:01:36 +0000 bluetooth/hccontrol: Fix unterminated command list Signed-off-by: Brian Campbell Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/730 --- usr.sbin/bluetooth/hccontrol/le.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/bluetooth/hccontrol/le.c b/usr.sbin/bluetooth/hccontrol/le.c index 6f768619e9d3..c8ae335fcbe0 100644 --- a/usr.sbin/bluetooth/hccontrol/le.c +++ b/usr.sbin/bluetooth/hccontrol/le.c @@ -1365,4 +1365,7 @@ struct hci_command le_commands[] = { "Generate 64 bits of random data", &le_rand }, + { + NULL, + } }; From nobody Thu May 4 22:07:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7G52cJjz49bdL; Thu, 4 May 2023 22:07: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 4QC7G52CDSz3lsy; Thu, 4 May 2023 22:07:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9/+o8Q9M9mvd14kfyJ5dCzP2XPKAqKJsnT/Zo4iqVYI=; b=cIYxlMHhlISlxnsJKRHACQTPXusQ4zMnRK/7q8eaOFJEd2TZMfqCQe8AurBtzXE4p7wqjX bizgLfxVt3WKWqKDsJuSp/wZ+XksTcu+13d4Bj5hs4aLnTIvOSycpOaJfZjVcWTSbgR/46 hiwHxZ/URX+fEzpBwuBf99/ibUMICGiJd0nctClT7PKZj1xHR6LVH3z6rxsP66xExLyhpb ykUjwSYY5YSYj1LhjWYR/b2uPCe+SB2DYC6bf+zl+X2oXP2NOEHFoBnKABV1WfOvgWdHEk VOQfwbfh5dugBSQx6AuNlUDnsK1tZsULNwAf9C9u648HZ8EeU2xCGGwGgERnhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9/+o8Q9M9mvd14kfyJ5dCzP2XPKAqKJsnT/Zo4iqVYI=; b=pej1FLG6uWzDf/xtj1cdn+tXhwDdoWsN+964Jpeuu7IxmhguI3IO22YFHo8rHSx8vaiRQF 525RDEOx755jBzuP0uIkysuIbRyxbshb82/5cMB9/ycPA7jX14lZpreM/IRTXrPg2czU/7 JHkdMbvS26RnwpEZulwphncuH19eKS7FiuVqNg0YRymNHA/kSzMcznX8aXBtOn8EfPTrU6 wc3ZLWZ/EfaaxVRAOynXyA/CoHy5FLaV/IoATZepozfK0g1WkBswRFu7ZfgHegRuE0YSD1 TyeQONP4RGXTJFg6MTbKrRBc/F4CAayGwXpMvOGyrh4UkPgCbv724n6qlt8p1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238029; a=rsa-sha256; cv=none; b=jJD9wOILPLJhT1pRLusjazA4JH2uH0/WQ+Kgyp/hbTZYH9r8v8nCdDF53KWr2tSYhzPULu 1/JgeMmfoz585HAFrSAJBj6VDiOfxYHaRCIZdU9SjgGqmy8NLqNcLOsmwBY+F7IC1032sj AvD7/r9EJOIj1bAc9BG7k0AIdrIlgTMzK5qzoJ2zTYHIbL/60+SG04bDDwTXzpIdSmqAoc 3kBZrm7D5HHpQZhmbmG2fNeyXVgYT0iVgkcbGIM/1ZEtRf8USPrCaULlgt4oMKg4AWuLlE UIWDnkghCbFstY0TWpbpwITP/gelm5T1WPHUaTY1zOaXBD9jfB/kaD8PUdWKfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7G51FHbzV29; Thu, 4 May 2023 22:07:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M79sV097793; Thu, 4 May 2023 22:07:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M799l097792; Thu, 4 May 2023 22:07:09 GMT (envelope-from git) Date: Thu, 4 May 2023 22:07:09 GMT Message-Id: <202305042207.344M799l097792@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: 560a7d2584c8 - main - mpr(4) & mps(4): refer to related utilities List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 560a7d2584c8356b710ac63c71543bf5cc565439 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=560a7d2584c8356b710ac63c71543bf5cc565439 commit 560a7d2584c8356b710ac63c71543bf5cc565439 Author: Tom Hukins AuthorDate: 2023-05-04 22:05:14 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:06:27 +0000 mpr(4) & mps(4): refer to related utilities Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/729 --- share/man/man4/mpr.4 | 1 + share/man/man4/mps.4 | 1 + 2 files changed, 2 insertions(+) diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4 index 4224571643d5..fc2ed791f2a4 100644 --- a/share/man/man4/mpr.4 +++ b/share/man/man4/mpr.4 @@ -392,6 +392,7 @@ The following levels are available: .Xr scsi 4 , .Xr targ 4 , .Xr loader.conf 5 , +.Xr mprutil 8 , .Xr sysctl 8 .Sh HISTORY The diff --git a/share/man/man4/mps.4 b/share/man/man4/mps.4 index 5661b376b1ea..a176ac04985a 100644 --- a/share/man/man4/mps.4 +++ b/share/man/man4/mps.4 @@ -364,6 +364,7 @@ The following levels are available: .Xr scsi 4 , .Xr targ 4 , .Xr loader.conf 5 , +.Xr mpsutil 8 , .Xr sysctl 8 .Sh HISTORY The From nobody Thu May 4 22:07:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7G63bfCz49bgS; Thu, 4 May 2023 22:07: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 4QC7G636rVz3m00; Thu, 4 May 2023 22:07:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vaXXTBwjlOAaBNIIQ3sxD4ZC4qpJ0G4ngWS/gTSBOds=; b=jRnonqjtUvZjDicLxvYz90lCVPyhzGT3qp3sNpuSPXvAx8oSxI4NF38dT0wSaMY3lmgfT5 RefhO6k7Gh6WsglonGy2CCl5XSR3kf4FgHRdpqQNzJgSVN2N3O/9N3dcPaB+dUEhQoDtKe tONuSSqxLcQ+C7Q2e7AZY2FXrgJw5ZWZyK9V1skyvPH+38/ZvMliK5toY4j8S6tNcLosfX tbmoUkjKns1hi0VnQ871zfrHCjq/LACdRh42bQnGWrW+WiJt1oL8WLTiEHCcUfAESntYoG zaCC17AdCFLZXoD/loLMBkzRLfVbVNwyw35jjRCftugAC85Gt+xJ6lejkqgMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vaXXTBwjlOAaBNIIQ3sxD4ZC4qpJ0G4ngWS/gTSBOds=; b=QvKA0S3mmYW/3+90tIK8Cupm/iq9/Z2hckpd3j1QFNl6vsmX6PA6F3h9o0lsEMyyxTHgFq b+0FcPN+cB/8j5+cmehq2yfSRm6uRkRvsHa6m+AqbjbAMvYNJTlXolMCaM5cXEAx73NEyO idGJcQMaB7ODDLk2g2QSlwpQ9fiYbriSmkffIWGO+Vmo+suTYhWfuV6y/fVbIJphLG9rlH x2qaSMBrJRS2DxUyDhFhmjyOWjnCnW5GEd1kbA0qlB1eIDOGbO9UJhl4wG0mcDuzDXHWK1 rvlX69COhhldn7gd4iB4LQsEE2INutI72eWWyObnheMMJKt2xReM0/2US5HGcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238030; a=rsa-sha256; cv=none; b=I0sUrqEaEi2ObGZK1HgyoVOrQM8vDglN2uuBpTKb0QUZajXBJCkFMSJF22K9MlnOwFleru 0OduBhlHGL4cLX0sRVFfs0rmBJv0p9FZKMlEjG5AT8Da4yjEcfFCaYTSkhL8/00KUNTa6U guDHWO02h0mcwV1pYRaNNX3yfiSbwX2Jdl6Sdc/D3TmxsXBuhuonEyyDkhI/bdxDTthF4O OKJJj3ZED+DBQfzaw8pPquFTQU28IawyEP5lFygMP+2S+DyHkWEy4Z45qPl0EpLpbNPDoy RuW+aJweqaq2JhzRqQgHiQjaPK7S+tLR65PC8XMDKwXWFLl/sMmrP1KqgQUfRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7G629S1zV9l; Thu, 4 May 2023 22:07:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M7AXr097812; Thu, 4 May 2023 22:07:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M7AuJ097811; Thu, 4 May 2023 22:07:10 GMT (envelope-from git) Date: Thu, 4 May 2023 22:07:10 GMT Message-Id: <202305042207.344M7AuJ097811@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: 910733a6f909 - main - mpsutil(8): Improve English usage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 910733a6f909b0106d3e7db45813ae1f8eb9ea83 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=910733a6f909b0106d3e7db45813ae1f8eb9ea83 commit 910733a6f909b0106d3e7db45813ae1f8eb9ea83 Author: Tom Hukins AuthorDate: 2023-05-04 22:05:15 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:06:28 +0000 mpsutil(8): Improve English usage Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/729 --- usr.sbin/mpsutil/mpsutil.8 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/mpsutil/mpsutil.8 b/usr.sbin/mpsutil/mpsutil.8 index e7c2fda8f84e..959c60305065 100644 --- a/usr.sbin/mpsutil/mpsutil.8 +++ b/usr.sbin/mpsutil/mpsutil.8 @@ -85,11 +85,11 @@ The utility can be used to display or modify various parameters on LSI Fusion-MPS 3 controllers. .Pp -The +Both the .Nm mprutil -utility behave identically to -.Nm . -(same program) +and +.Nm +commands behave identically. .Pp Each invocation of .Nm From nobody Thu May 4 22:07:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7G74b3vz49bjY; Thu, 4 May 2023 22:07: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 4QC7G73y7Cz3mL4; Thu, 4 May 2023 22:07:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTk362sibIAAjTOi/d7aUp0p3yopPr3uM5Zp9JbLMNA=; b=YQPXRrdmrKQntkwqBjGVnP46x/sq7SXA13DBNCHmw8p7q6DvqbsDIeCfpEP3TZaaz4OTol bvRPhL0vag1WbrcaaifILJZ25zyUMdzvdJS4nJLsTNpFfFc84JvWNLw7v7noeL79wsI3L+ dE8nbsh1MqOz+ryMA57k5nGN//4yTcaMMLr6MM1fth0wpkJ8UZbW+GhuXmR6C3k8wWJGV/ EPnsrMXdaBLieCSJF5i5BcDRpRKQlHt4Q7o3yV4WZ1DoyoiM+Czp8cbensSCBoRaY7APps nyGKg3InOAkUBUpE8vMliEc5zIUreoTH/ia6aCvt4+Hy9R3NU7T8VIfTAb244Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTk362sibIAAjTOi/d7aUp0p3yopPr3uM5Zp9JbLMNA=; b=lCXe736lWid8DumyQR6sgkTGk5yZQ9UpJTnKYcmEurfwPiDkzeCwVITwmHvQfcWFXflxMs srnTI1a0yN/Q5WKMNafWTiZ5R2JQVHb/lLhWGcanIZznZHV1ogRMYAy4RN+jzTAf/sboRC GbmgiTXjM6UnvVL9IiAGOLkO0BBLNBi2QdE0ZM/fddUhAR0fgF/jt+4wNEhb08WERFJV5V 7BGnZPzCE7VmQuGmQWxuCOIDvJTRrmd492r2yP452qWbGmpbHMjmXVQuIh9cJMY4LabB8k yUhKmijoUX5CInJUH0EI9z65V83Q9i0NzngtWANkUTelCPlz+hkCVcRYAwRgmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238031; a=rsa-sha256; cv=none; b=UiXnZJjL6qJreuw/jhtYOAZY0YQGFuqdhan/aSpqgcKgME1laxprvD/mdnrxBbRQT4TNO9 qzNqpAJcACKn45EbpNIBgN7bp7pkzT7PXbnGjRvGB+f1rnfB+qE5IZ3+t0nm8Bi8zKXVMy zjyU8q/AD46qcrFnNCBBd/7YN+GWLjo+z9NEEwplLfmNBIxv2kQZPdFoqAMV0HfnvrqmB4 pLuM9oC7b3yhjX8Kk4wt41PJ/2xE+L4iSXtnSYik48whXA5gSab9R8DeRhE11sMRhGxRTh et9FxBEXzK8XwGDwCbf3Jrh7Ok/vPVZeUV2SS+bqnbB1J7cECL3xu1qHaUcxyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7G733cNzTSK; Thu, 4 May 2023 22:07:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M7Bwl097831; Thu, 4 May 2023 22:07:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M7Bif097830; Thu, 4 May 2023 22:07:11 GMT (envelope-from git) Date: Thu, 4 May 2023 22:07:11 GMT Message-Id: <202305042207.344M7Bif097830@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: af32969ddbb5 - main - mpsutil(8): Remove a stray paragraph List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af32969ddbb508b9e04801217cc6d081be24a9e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=af32969ddbb508b9e04801217cc6d081be24a9e8 commit af32969ddbb508b9e04801217cc6d081be24a9e8 Author: Tom Hukins AuthorDate: 2023-05-04 22:05:15 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:06:28 +0000 mpsutil(8): Remove a stray paragraph Spotted by running `mandoc -Tlint usr.sbin/mpsutil/mpsutil.8`. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/729 --- usr.sbin/mpsutil/mpsutil.8 | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/mpsutil/mpsutil.8 b/usr.sbin/mpsutil/mpsutil.8 index 959c60305065..917e96a60e51 100644 --- a/usr.sbin/mpsutil/mpsutil.8 +++ b/usr.sbin/mpsutil/mpsutil.8 @@ -171,4 +171,3 @@ utility first appeared in .Fx 11.0 . .Sh TODO Flash operations (save/update) are not supported on big-endian architectures. -.Pp From nobody Thu May 4 22:21:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7Z6398Lz49dBn; Thu, 4 May 2023 22:21: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 4QC7Z62k2Fz3nrY; Thu, 4 May 2023 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LNh5Q3luaRVuy/UfbqHqOk4wmYhxP0gmKvkBH/H8Dw=; b=E0Z4K8O+jr0B4j2q+OJJ7Z7uzgu0v8JfyLc4jCbwOK0I4abgQODKa+mCPkem/cT9QTWeU7 0zSxvbwii0lSB2WOJKGg8+2UXjGcmrzizbNrU7Za8RguZSCQ9axuAIFSfOEhR5xF/3m1UK MdJLhxW00K31NTgIy6i+7Icst5k8810og4GgWAypcLWKBjMp51+u9/wHo4WzTZ/CnFCYLp NnW9bwpQYCb2D92hkXvNichNKkHxkHozUArxjq2fOZ3zUcbJm70xeLA/qD2lNvuB/VXGRi dDBRKggTiOfeZ2LTKwHF/JjO5gNGeNtBgio/4Jn+ZJ9Zl6VYVLvWF13i9hMvQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LNh5Q3luaRVuy/UfbqHqOk4wmYhxP0gmKvkBH/H8Dw=; b=nyvwCNUOASDpBjHsu2mecrOLTbCELT7xfaIcjhLIfRom+XAlwnZDUocpDKgJp4k6GZqiZp TD37T5IckSa3003lcUpjnWGui1VNzajmnovys99ZT0R/sofiJ3o3RRpEoSjw8xdksxEXkH nvDpOHVjYzjdneCfZAE1Nts4Hfy69b+N8YSGgQwv0tBpi3HciB4tBL5gghrePtbgNrvsqs tbJb6mbllCNG9BFFjBLE28LVQdr+PKyIRo9r6d8LPZD/S7znAhBHy61ovXY0A06sEzkibS priKwoNsVxzs+JKA/zNM+1+5CDUHA0k+PmSdE5+2yk/P8Al9HbQNDCp2Q88Zuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238862; a=rsa-sha256; cv=none; b=ZTUCojqXuI1mDPRFACiW7rAn+cNU1Vx4SqF88RSxdc00K5N+FgGdPBasVfVRL+8LcW/bpC 7xM9Z9hP813QqAAzMen0TO508NtSyved9CB7RqPwzRzck7Rdb2Ooia9KZitUaZuQqmfbZ8 ppydBmTshic0o+0/gx0Ou5p7p5AmSGib6lJCMf71mdiaaR4zYUR29R9u0h90/SjBepT+5E pR5CTwBSLhPcsxPsyRHY6sQoonR2hFZBS8tfENLHTGix35q1HekupE9Vix2n2Zt1L5Jfy8 zmLYhMbgFF6NMSu9M4Rb0NBVgT8azLoN2jZzfXmeXzu5Uv7z4FRViR/1nu0Icg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7Z61nRfzVW6; Thu, 4 May 2023 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344ML2SK024675; Thu, 4 May 2023 22:21:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344ML2jn024674; Thu, 4 May 2023 22:21:02 GMT (envelope-from git) Date: Thu, 4 May 2023 22:21:02 GMT Message-Id: <202305042221.344ML2jn024674@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: a1bae244b6ea - main - Add wifi(4) alias for wlan(4). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1bae244b6ea6c53add245cd1373c6dd43fb7631 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a1bae244b6ea6c53add245cd1373c6dd43fb7631 commit a1bae244b6ea6c53add245cd1373c6dd43fb7631 Author: Warner Losh AuthorDate: 2023-05-04 22:19:16 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:20:56 +0000 Add wifi(4) alias for wlan(4). Suggested by: jrtc27 Sponsored by: Netflix --- share/man/man4/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 8ceda540093b..71d12055f4db 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -765,6 +765,7 @@ MLINKS+=vte.4 if_vte.4 MLINKS+=vtnet.4 if_vtnet.4 MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wg.4 if_wg.4 +MLINKS+=wlan.4 wifi.4 MLINKS+=${_wpi.4} ${_if_wpi.4} MLINKS+=xl.4 if_xl.4 From nobody Thu May 4 22:21:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7ZZ14nhz49dCD for ; Thu, 4 May 2023 22:21:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 4QC7ZY2HF5z3pF4 for ; Thu, 4 May 2023 22:21:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-50bc394919cso1603699a12.2 for ; Thu, 04 May 2023 15:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1683238883; x=1685830883; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LgP9Apom5KogsQiomRveDeOtoYvV2YrNMp2TSEBO/a0=; b=Ak0OerWLC3Uqr4ZzPmWUxXX+fxmBu/x4PXYOnGAdc75LHPMIYBT/JBM4fHjbXHaMXZ fjHY9qc1YdE6aoZIRId1HPbaBAb3YI0W4nR2lhUhuWKyb0/bfwB7yzYfsx+7Dp1X4NsX LzWQwFiOnFwHdFp0pBb60s6WfFVwoRGwNdb4rldl3V0kPgs+L+QrDRIPLKAQdRsEV3mn IKcL6kg6X4ITBl8HYLPTY/X31GmWHyGN3UF8BwqscjV82IERrfoGMzpRHhi7SMOGcHdQ vhKK1KvYW51irAbmW9pXrfAekH2jF4v2pIbOqqMYVGXBDQ3kT2TPCFWdNe9ozRLdwx77 zurg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683238883; x=1685830883; 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=LgP9Apom5KogsQiomRveDeOtoYvV2YrNMp2TSEBO/a0=; b=UjesnI7sqAgW+rWofFQPdu/mQ8gu0x+HM/48uQ5znV+VRi3k3mhpDVXzg4X/ASZoQK wAcHCDBBJIjagJGhbmTk8ZGXAQgZctYrA7R+94VHkIxULhnhSzmfcF/ly0EBDjr4Gk8d dfjMQMxcJvU0z8qczBKfA7dUgo+1/rX9jC7F9cCKXY/TDQ1bWe2ujKf1aPSiYDOFigHA 3K8Kc+f+ZCxXeFsAZStmuYOURuAPNkZN0mtsQwszGnNLOwFN/tL4zgJKHi0YRThfiKNx KqXwyfqUSneEDEq34LZpWeutmeMjXVDK8QzG+VC0PajMj2AaM5hoO/SJ8dhtZZn2V8bi D3jQ== X-Gm-Message-State: AC+VfDyeoYzhb01jwZxRqva3wYnKpVP7/5qQd6CWHpINHYozU9tsgWA/ i00srsPsyzeq3B0OrXCq/tuMi7BaDZt6xE8RQK9JRg== X-Google-Smtp-Source: ACHHUZ7T5wZItN43Wjf9QKJfR3AT6hspwfT/BKihFOTeHSsJg/QteDFeSeuowB0uXUNerjOqkShs8oP4RtjV3/ukZYM= X-Received: by 2002:a17:907:3f05:b0:94f:450e:6a76 with SMTP id hq5-20020a1709073f0500b0094f450e6a76mr346280ejc.61.1683238883621; Thu, 04 May 2023 15:21:23 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202305042159.344LxiCs081007@gitrepo.freebsd.org> <9622914B-E00E-4FF3-80A1-1FFA0A6C201C@freebsd.org> In-Reply-To: <9622914B-E00E-4FF3-80A1-1FFA0A6C201C@freebsd.org> From: Warner Losh Date: Thu, 4 May 2023 16:21:12 -0600 Message-ID: Subject: Re: git: 8fb0f07c7a13 - main - wlan(4): Mention WiFi more prominently To: Jessica Clarke Cc: Warner Losh , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000bb104f05fae5973b" X-Rspamd-Queue-Id: 4QC7ZY2HF5z3pF4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000bb104f05fae5973b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, we should! Done. Warner On Thu, May 4, 2023 at 4:02=E2=80=AFPM Jessica Clarke = wrote: > On 4 May 2023, at 22:59, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D8fb0f07c7a1331beeecc0c0f6afec67= 4671867b9 > > > > commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9 > > Author: Tom Hukins > > AuthorDate: 2023-05-01 14:47:58 +0000 > > Commit: Warner Losh > > CommitDate: 2023-05-04 21:59:12 +0000 > > > > wlan(4): Mention WiFi more prominently > > > > WiFi is a commonly used term to describe wireless LANs. Adding this > > word will help readers better understand the contents of this manual > > page and will help find the page when searching, for example when > > running `man -k wifi`. > > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/721 > > Reviewed by: imp > > Should we have > > MLINKS+=3Dwlan.4 wifi.4 > > like how we have > > MLINKS+=3Dfirewire.4 ieee1394.4 > > already? > > Jess > > > --- > > share/man/man4/wlan.4 | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 > > index 7c12e8b1f7f9..5cb7c67735c2 100644 > > --- a/share/man/man4/wlan.4 > > +++ b/share/man/man4/wlan.4 > > @@ -25,12 +25,12 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd January 26, 2021 > > +.Dd May 5, 2023 > > .Dt WLAN 4 > > .Os > > .Sh NAME > > .Nm wlan > > -.Nd generic 802.11 link-layer support > > +.Nd generic WiFi 802.11 link-layer support > > .Sh SYNOPSIS > > .Cd "device wlan" > > .Sh DESCRIPTION > > --000000000000bb104f05fae5973b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, we should! Done.

Warner
<= /div>
O= n Thu, May 4, 2023 at 4:02=E2=80=AFPM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 4 May 2023, at 22:59, Warner Losh = <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D8fb0f07c7a1331beeecc0c0f6afec674671867b9<= /a>
>
> commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9
> Author:=C2=A0 =C2=A0 =C2=A0Tom Hukins <tom@FreeBSD.org>
> AuthorDate: 2023-05-01 14:47:58 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-05-04 21:59:12 +0000
>
>=C2=A0 =C2=A0 wlan(4): Mention WiFi more prominently
>
>=C2=A0 =C2=A0 WiFi is a commonly used term to describe wireless LANs.= =C2=A0 Adding this
>=C2=A0 =C2=A0 word will help readers better understand the contents of = this manual
>=C2=A0 =C2=A0 page and will help find the page when searching, for exam= ple when
>=C2=A0 =C2=A0 running `man -k wifi`.
>
>=C2=A0 =C2=A0 Pull Request:
https://github.com/fr= eebsd/freebsd-src/pull/721
>=C2=A0 =C2=A0 Reviewed by: imp

Should we have

=C2=A0 MLINKS+=3Dwlan.4 wifi.4

like how we have

=C2=A0 MLINKS+=3Dfirewire.4 ieee1394.4

already?

Jess

> ---
> share/man/man4/wlan.4 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4
> index 7c12e8b1f7f9..5cb7c67735c2 100644
> --- a/share/man/man4/wlan.4
> +++ b/share/man/man4/wlan.4
> @@ -25,12 +25,12 @@
> .\"
> .\" $FreeBSD$
> .\"
> -.Dd January 26, 2021
> +.Dd May 5, 2023
> .Dt WLAN 4
> .Os
> .Sh NAME
> .Nm wlan
> -.Nd generic 802.11 link-layer support
> +.Nd generic WiFi 802.11 link-layer support
> .Sh SYNOPSIS
> .Cd "device wlan"
> .Sh DESCRIPTION

--000000000000bb104f05fae5973b-- From nobody Fri May 5 00:24:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJP0hhXz4B0Y2; Fri, 5 May 2023 00:24: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 4QCBJP0GLMz47rt; Fri, 5 May 2023 00:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+aPymbJdSsbrxIYofM56MWBtjhy4gCYmfEkYnnpDB4=; b=W9BerlQgD+DaR1HEsvP3OV9yGgU/ZE2gQNeEQZ380GAo7mAIOm4IeWM2uo0chdjd/71+jV 0MiefE/RLMUYdiHUNHKcnK2tTRYQkelDLuWKOJ5kt1iEcCIg07Iu8eH3eQiDS0QFJdJF4g 3wfV5mFM6ZJKEeWnou3PSFvwW/ta3LAZvJm+20YW+3GZZEpPlqFhIRvKvYj+XZauKOXjuV SRoTbZEBWcWuueuqgdFM6lmee8CFUjcaDSfHxo2qbD1BFW6JLaDYTHKvWpu0XthaCmseXO lC9ZcUaDC0cVa3g2nodlXO5IqYwzZ/Y1c88ZJo0nafuDAmBkDEE+fQZjn0W0Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+aPymbJdSsbrxIYofM56MWBtjhy4gCYmfEkYnnpDB4=; b=dcV3W5K7jfCzoG43gd1zyh/h7r/jiXqSSa68p2OQb+AvYP3M1oOq2ZEgEljEJJN8Ji6za4 H1eZ7kwCiE6uiR1Ief0aQJyfw8BlNiUab6m2p7dFMJciogk4bqnBpzeu7K4+XJ+GU7P+Rq w2BcEtfc2iMrkBSWX/ZDwPT0E7SC6tFhPg/ckW8vJJUn4PHr5C8B1rfeDROB3soMpOriJG fYw6TG/E6TKVNH6UtxsbgarTtS/tDf2tzWxpW7EqLxPwhlbQu7ejqks9YvNMb/n7z10idJ 4eaicLD0h3ThSWAuoUNj7OqJpnEurpLzpowd2ZgGxTbBCoUz3IzGG2m7Ydigbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246261; a=rsa-sha256; cv=none; b=OfC1yFzsLDqUB1MSk3QXtzcx1mR30frcmac7odNbx63KZGEk38jMwAZY6djDmkULqsHfKV SnT6qw6hL0UI8dR6jD/zCnBQm6XXbGUiC1jvbSSq3Kkp4ijXG/ECGNSwaX8GvXQgkdDM/D sIT69LAjNCL1Jj9CNwdsQXfRkNHTahT1jv8ZffsgfvZU9oU+qJyu8DKw5UcNqApvxLUPJ6 KKcsHwHJkc5XE/Z4gYUZmwbyv1h454qX+HoCyok5M/rGn/a9+KyKJ4klkpnHtIa3jBcTqK QdmZr9dCHD0YDLCgf9My4Hr6Ims6xDWcv4ieSsyNx+Qyrxo6sWJUI0TaMH0isA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJN6T2wzYT2; Fri, 5 May 2023 00:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450OKln027571; Fri, 5 May 2023 00:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450OKe1027570; Fri, 5 May 2023 00:24:20 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:20 GMT Message-Id: <202305050024.3450OKe1027570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 0167b5a79334 - main - sys/amd64/conf/FIRECRACKER: typo (compatiblity) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0167b5a793349dc6f8aa600f69b56edcfb559d79 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=0167b5a793349dc6f8aa600f69b56edcfb559d79 commit 0167b5a793349dc6f8aa600f69b56edcfb559d79 Author: Igor Ostapenko AuthorDate: 2023-05-04 19:44:21 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:08 +0000 sys/amd64/conf/FIRECRACKER: typo (compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/amd64/conf/FIRECRACKER | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/conf/FIRECRACKER b/sys/amd64/conf/FIRECRACKER index 4a9946f25991..ba00d674cf4e 100644 --- a/sys/amd64/conf/FIRECRACKER +++ b/sys/amd64/conf/FIRECRACKER @@ -173,7 +173,7 @@ envvar hw.broken_txfifo="1" # skip that; later in the boot process we have other timecounters. envvar machdep.disable_tsc_calibration="1" -# Provide bug-for-bug compatiblity with Linux in MP Table searching +# Provide bug-for-bug compatibility with Linux in MP Table searching # and parsing. Firecracker relies on these bugs. options MPTABLE_LINUX_BUG_COMPAT From nobody Fri May 5 00:24:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJQ2s6sz4B0Zq; Fri, 5 May 2023 00:24: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 4QCBJQ1QZlz47gS; Fri, 5 May 2023 00:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkNQOQYDvc+I3H4l+cI/VI/WxqOLO1vjIrkRYpHyETE=; b=KMQlFGlYPwZNojteRtu8nLO2CVlRXWPGLFb6VheVneGE84mPCqr6qirY6zRqTvEhDOCmwU /bFFVJI8ujGSoX5fhZJXNQQJ5ArieePYJbidJMLwNSOWHPpKvV8RYZwJ8vKvOmz0XSQv0A IA0AU8C9kmyWlAkkX6fuTjcoaEqeaEPwHu91DTqnME7Q1C5hy/OeSSX/NB40ra7yBbPZVr MCnJYtG+ZDlNHP/9SaeIyDd5GOWsl25B2thEvsU9GwQiRzV06+NDFYrZ5SS+sLNJxG7U22 ppzr7Fc9Lv0nEWATM72bJu55bdJWQnn//CuqLJAV7y90nttAu7dJ3EdUn4Q44w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkNQOQYDvc+I3H4l+cI/VI/WxqOLO1vjIrkRYpHyETE=; b=hfyvdIrfbOm4ZdxX8PqZsOxWL1tePLYwvw4F6hgZ6PLMzBtzZ9mUTinjJgl07+oHwI5BJt BULmWQN0qva5NpbVV6yIH76qSKLPyOSL6EPrkwhEOWsoN61zw1x0ZtE0bSodELu/ObLMnz VwkRVFXrYXTeCNLPDWf7zpSrL1PERrC2o0QJbOwpRwJcj3wx39zKaEPl2+F/WkuNck26eR 8m5l9+Yycw9fqbK220ROwLOoQLN+C9jjPBY8kYwAui024oqP7KXCu6jb5drovwXfcZLnkP OUFz+JkjQ0dwt42qqFQF6tlMY9+ZZRHK46xnXM5E80Xlob3aQF0Y0ksIbDJ4qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246262; a=rsa-sha256; cv=none; b=hyTs/LVyyo0Rgz92II2iLwtsvtFH+cps5cXjfKFWtYb60d2NCHdxMyR/O+Cf3GwKwpqDS+ Ai5yIr2RZd3Lq0V+FGmHLzBJ5rU8MBNSxJjjgGsfdEBpKGNmJ1KrUC+5utnKS30HFlsWOW NNc2cexQM4yN91+wpNk1XwTJPw6lU7TPIkbKy/JzxeSxuUpixpsxd0DJUXtXHQsGuAa1fO uoAxEonKRhyVamGVIT1qIuEsI2Lu6I/HpNoTknAogYZMExm5xgBb2HqSvTCiuBK1w7Jou6 gM0OIr8lFGAmE+CT803oXuQUTdCaej/TY30rp2kMyGa9b1w92S9OLJ3mNytpDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJQ0WV2zYYq; Fri, 5 May 2023 00:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450OLIQ027590; Fri, 5 May 2023 00:24:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450OLOY027589; Fri, 5 May 2023 00:24:21 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:21 GMT Message-Id: <202305050024.3450OLOY027589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 74081dc2bcd2 - main - sys/netpfil/ipfw/ip_fw2.c: typo (Compatiblity) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74081dc2bcd2a59393db438cbab3efc1f401e9d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=74081dc2bcd2a59393db438cbab3efc1f401e9d9 commit 74081dc2bcd2a59393db438cbab3efc1f401e9d9 Author: Igor Ostapenko AuthorDate: 2023-05-05 00:01:33 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:08 +0000 sys/netpfil/ipfw/ip_fw2.c: typo (Compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/netpfil/ipfw/ip_fw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index 4b347b2d7d2d..019114dc1d37 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -2002,7 +2002,7 @@ do { \ >> 8) | (offset != 0)); } else { /* - * Compatiblity: historically bare + * Compatibility: historically bare * "frag" would match IPv6 fragments. */ match = (cmd->arg1 == 0x1 && From nobody Fri May 5 00:24:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJR3Dv4z4B0N1; Fri, 5 May 2023 00:24: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 4QCBJR2PnWz47gw; Fri, 5 May 2023 00:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2857yzabrY03PAoGHh0tVnTy+J9e15m/q34wOLAg6A=; b=iqqjYqJoBw6RihWYsfaY5OZMgTWOMODs8ldhjPqus2AcJKFmanPJi3D8rE2Pg14woRAaU9 NuQ6P1bH4uaeCyQ2qjNIg7RbRtlg8WFSo18Cuzark6iNgpI4lDA0ObZzBI2CZnIdKLjYGh kYmoiTXFC8FFunuI09bPmBUDhj6nACxGTMglPbG6X/EfZQl0ulVDI+LJsmkKT4LR+/5l/f dPXh9wQQQaS4iBApWMKaj3C1DY1SLo4nXaNjOvesgYzc4IzqI+jtZE+ZWarjbBxcKWQPPo bZ1kT0p+sa9BUSUTsBlAySPhj5FScW57qQ4lDg1whmRCOB4zwvTti6VNkgGiXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2857yzabrY03PAoGHh0tVnTy+J9e15m/q34wOLAg6A=; b=nF0mnyhKerUpGYrroW0WlBeYk0BFhvB9Jbn8P7eb+L18qZ/urleTwzL+Bv9JsDMP9whC2d Egh35JNRL+g1iA5XPaGM4vnt84nv3xbVMHW8LXVxPML3I8h6bq8fohSTdtOmSGGvXUZxiS NLnaNq5lpt4uMM89aoBxFDiJwDlS9sKGiiokdErmxd1R8snKf8fZeZOHEbsZUE+OrDaTqh gRjzESEGrTzz5SDARiYZnXq4+Sv8THz0X+UAoO8IifPmrTWzpicS2VupNkYysVRtnJvNQi Nzruz0f+7Xa13V+3aOsRv+sHWNaA3rWmOzgxCQ2zmHMHg/kXOoFnH3n79mGyPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246263; a=rsa-sha256; cv=none; b=aTTxNbTunHztyzCmg/PTGedmFDjiQ/Mibhjq75fzLgj2bRyxgIvYRsTypXCYyDGYodhck3 cp/NWkEsGhSzhLuNTLExIVzCCr080FFT68c9bXl+aUscRKEjiyKlHGPSiUdXmJdRm5ibuD 9fOBCG1fNEN9xiSC0BUqXx/WIrAndeH/5mpEDD3pgETYllg/K1eVxXO0o2oR+WinwImM+w gdnPCbdSuT2L4otiYOAROTn5XRrCV4rDHjSfrsTKuc3bVfkoUwZWIDEPIWYjiH+NqY7ZBs Ua1z8CpMCfmWsbLtdIebHz7QrtX4HloCQdcCPBriD/UezaKQMZMpXlCRX7/MHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJR1Rs2zYBS; Fri, 5 May 2023 00:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450ONcx027609; Fri, 5 May 2023 00:24:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450ONrI027608; Fri, 5 May 2023 00:24:23 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:23 GMT Message-Id: <202305050024.3450ONrI027608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 6f9f3b726b42 - main - sys/sys/_endian.h: typo (Compatiblity) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f9f3b726b42fcb834ada692222d76cbcdf64b95 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=6f9f3b726b42fcb834ada692222d76cbcdf64b95 commit 6f9f3b726b42fcb834ada692222d76cbcdf64b95 Author: Igor Ostapenko AuthorDate: 2023-05-05 00:05:11 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:09 +0000 sys/sys/_endian.h: typo (Compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/sys/_endian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/_endian.h b/sys/sys/_endian.h index 3b4460472eb6..8d1eb3f3f3df 100644 --- a/sys/sys/_endian.h +++ b/sys/sys/_endian.h @@ -38,7 +38,7 @@ #include /* visibility macros */ -/* BSD Compatiblity */ +/* BSD Compatibility */ #define _BYTE_ORDER __BYTE_ORDER__ /* From nobody Fri May 5 00:24:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJS3Q0mz4B0Vv; Fri, 5 May 2023 00:24: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 4QCBJS2zCvz47yW; Fri, 5 May 2023 00:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CTY88DeV/DzqEOF3DeAKdpHsjcHeE7jB+ldal7LNsLU=; b=NA3JmUVjxgL54MQj/LSYEEkoxYVwbeSS+LCPcKj9G+o84XxUIOePo2nuHrO5E+LGhm9f9P D4oNM0bisGzql+6FwawfBFDf0sR7TkBM5JdtADWVHYJzQrd/0ixTEqCWNoLrzdxcel3KIq zKWNl+o9XjD5CZcxpja87u3W57IagiPPtI7khieviH/XfkLJx4/ehrFUXrnrQrT1YSPcjE /RpUHWPnjbLO2H2yzTEeAOAlaJE675J9rflRagl3L9OrxFx3I+4SrvMcRF8xgUTk57rpZn Wf/KEox1aIWTzH3U+291/5kC7b0xVkK/L3YF3+EJ17mkyDfdJEh7axq7cz7+rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CTY88DeV/DzqEOF3DeAKdpHsjcHeE7jB+ldal7LNsLU=; b=fDqcdVz1lIVaYVrKdgSDC9hQrREb9rXL2tmTp3Md+Fl5ZHsu9i6q6WLGdOMeAm8u93ZBAY 9OGCuSawMMZ9grXdiFb5eJ69LKJ8P30ZoQia6iC3uZW4BQXsWGaBVP4prEBhgULb5pbt6P FVdEiW5VfJnnEtMJCtUH6WPDJfGllZZ3G1QBUz4i4EjuGHFcJ4pvGbcdHPbdcOwYFhJyDU OZXTTOb8DnbFYXsynyN016ay7+Gi1DXHEyJBfkY3JqdcDmwUtfW9/KO0h6Z57BSa7KpSQb 293tqGf2zHhbIIyFxI2/+1uwpVP+ztMEqe9N9yjERnzwfM2Djmn6E7nyIASYsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246264; a=rsa-sha256; cv=none; b=P7wjbbIYjojOBAM3o4TbiCRRiCYTdT98PpEWogodkmHW72zTdWplRiaX+qEVrd8rg+C+zx W9dOFRUeELQQGOIL/GKfwJFGnX8ea8eXtjjSWYemKOcqbLkKtI0INzceB1xt15Og8PKjfH ufDHkIHIUQ1DHO60N1KKDKK3tq88e0k8MG6611DL6n2vcEgpIdtErUX7cxZlByqkvVjRmk 8E+JPvW6iV7kcqmfM/smb+wn1WTWiKZcxqZn+sGj1O0yEklT1rKcVNBfx3IpDDcp3kxMKn xp6+rHoU195vkgv94YUZTenaioMduInjnLnP4xi1XwTF1EtRqx3+qpOpoqNsIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJS20DBzYDh; Fri, 5 May 2023 00:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450OOQu027637; Fri, 5 May 2023 00:24:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450OO3O027636; Fri, 5 May 2023 00:24:24 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:24 GMT Message-Id: <202305050024.3450OO3O027636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: a1f2b76761df - main - sys/x86/x86/mptable.c: typo (compatiblity) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1f2b76761df83692a030479c4bd09953cf605b3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=a1f2b76761df83692a030479c4bd09953cf605b3 commit a1f2b76761df83692a030479c4bd09953cf605b3 Author: Igor Ostapenko AuthorDate: 2023-05-05 00:08:26 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:09 +0000 sys/x86/x86/mptable.c: typo (compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/x86/x86/mptable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/mptable.c b/sys/x86/x86/mptable.c index 173ffaa09b45..7be9730a7d49 100644 --- a/sys/x86/x86/mptable.c +++ b/sys/x86/x86/mptable.c @@ -1264,7 +1264,7 @@ mptable_host_res_handler(ext_entry_ptr entry, void *arg) break; default: printf( - "MPTable: Unknown compatiblity address space range for bus %u: %d\n", + "MPTable: Unknown compatibility address space range for bus %u: %d\n", cbasm->bus_id, cbasm->predefined_range); return; } From nobody Fri May 5 01:19:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCCWj3r05z4B8Hw; Fri, 5 May 2023 01:19: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 4QCCWj2vYcz4L0j; Fri, 5 May 2023 01:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683249553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gf1iLoFe8O73xLFTce9gTA5fnXyeHkdIyR/xne8BKA=; b=gVtIZiaiSydr3T0FM+PzWgt5spc+FhDyf1kYijpoeydWrjbkQ9c3q9O3JAQEsSTA7YKngt ADO2CNQYYqhO2dxgZhlPc2MX7H4qiBOys1GJK73fP8wRvm2FrgYJRMEUxPRcTt5QqJQZkB B81YXc09aSPHAG/uGhVcPJ6ar6fhZlzVFinftP7uT53a5kuiW3NA+8LuOYmuqhs5+CtUxg yM4XBEUx+LsB/uAK+1X8b5+8aeBQsrwwgtTJnRTCx7fw8brTi9RABousItiZNRytsabQMb hVybYgxreeTxaQ8nxlUUGSf8E9Icn/6mA33SxTuzeKdhrTK6v5ghcXVsJUb8XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683249553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gf1iLoFe8O73xLFTce9gTA5fnXyeHkdIyR/xne8BKA=; b=gvNSWHYuT7i2qXVNjBzuPeLm3m1MH5Squn3uI7vQfibrSVnLQHG31VDuiXDspKaMenJ5jm hDpGMoQen3plbtF6/k1PphHQeln9RqygXEoYdE9Lpe6VzDvLDlY/oUKG8NcbI81E8Y0EoR ls5K8M7cLg8GNiz5lq/ZgZvJvNqzTScmgD005uWRf7YE4KYEOSru+wBmnoKewnhi+r6UZP Rj88LYhO/34H38i2tBuvp2xHl54khcd46WuIExRfkD09CFcXBK0w6gsubK9Ya5nN7nhQ5N Droh7RneQxs/F4adgOV7DJBb41aiOVe7uVjfpZiogd3g4HSKX22qs97vvPeYRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683249553; a=rsa-sha256; cv=none; b=cSPQODakoXibWA5DBuZZlleOl2El/ql55LyzZrXEknxJiCFkvJtk+x6b4CTeV3FRbKl5kP SGwU/NXCLdl0Cb0xPtrKDXqdZPkZT1VH4CZei77C6pbL4v/SJifmJ89spI0lcM4HkDrSuw Dz0IYeEeeGtGS7gXh5OLlYKvTdENxyU96VlKBZDHcZDIU58/k1rO3iUHv8BKBfRya8jHEb MkcXR9xTMeqd80D1MWOZWROgxgnTfl/sLtVTu1eKdXRGAx/VJGOGVXcbPgMz9hqqLKm9lS G/vBWmR8cR86OuMdUwyGcz7W8CRq2HRQn6+w8drQEIPSNPVa0f6sVjlcZTeQlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCCWj1zYQzZBP; Fri, 5 May 2023 01:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3451JDdX010803; Fri, 5 May 2023 01:19:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3451JDQj010802; Fri, 5 May 2023 01:19:13 GMT (envelope-from git) Date: Fri, 5 May 2023 01:19:13 GMT Message-Id: <202305050119.3451JDQj010802@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: fa4651d7ea5b - main - build.7: remove reference to deprecated mergemaster List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa4651d7ea5bd7679e7ac5f17cd28581bb8db57f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fa4651d7ea5bd7679e7ac5f17cd28581bb8db57f commit fa4651d7ea5bd7679e7ac5f17cd28581bb8db57f Author: Ed Maste AuthorDate: 2023-03-03 13:54:22 +0000 Commit: Ed Maste CommitDate: 2023-05-05 01:14:06 +0000 build.7: remove reference to deprecated mergemaster Sponsored by: The FreeBSD Foundation --- share/man/man7/build.7 | 1 - 1 file changed, 1 deletion(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 4e499c81b45c..a2fb5ea77149 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -887,7 +887,6 @@ manpage first appeared in .Xr tests 7 , .Xr config 8 , .Xr etcupdate 8 , -.Xr mergemaster 8 , .Xr reboot 8 , .Xr shutdown 8 .Sh AUTHORS From nobody Fri May 5 04:39:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCHyT6Bkgz49VnC; Fri, 5 May 2023 04:39: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 4QCHyT4XC4z3q5S; Fri, 5 May 2023 04:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683261553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PRrQlKl5sJZAgaptLVotKT91ctYLiiicY5cVhmKU6M4=; b=XvQkp9wERWSO/EWf0YN16dCo2rQG/iL+O2s3r0uiUtBbVshC4hmEevUyUR9b29CMY0Ajnp QoOYCxkDjOe+k2v9iHGgTH0XpeJS93v1oh1UIqoxv0AE+mMCeTzi316ttVggJBKVFG5kOd d40B5oUiS/h23wp2RgB63xC4G2obwpw3yhXXdgPBUMhKxKhDlFa4f4/KQOpwxp0Nb8r3Ia E/dIzHGopP1rOeLcSkweW3ASE9gPQ6eJ36n/Rv4lePtXNVV0dyRIGJTfKUSmcgIV8/npky eV+WamVIRL6B9aKw5I/U44upsCfueRC2RmNooMW741mQJkIrt38vl4g5Lu5Wag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683261553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PRrQlKl5sJZAgaptLVotKT91ctYLiiicY5cVhmKU6M4=; b=c0fpRcQC87ZQtnrcEhZuCeke50OOjgq/hDOrpGrhsPAJimW4ERz5RE6sb95woX2O/iNfP0 V/21W3alUGfxpReaN0pe7riKb0+sipI+C3WAuT1lbEuITqmOQC61Vqj0C8J8sGvR9u9AI+ vzrzJViRYpc6plA6FUSTImIUfFE0B+MQgEEB6djZ77uTin8I9JKWFMOKlsHgHYnc9uLXNh aQEHYkb4FMbsgaC8HH9YzK0aDCCVuzfPQX8gL2wvjnjrR538V2kwrBDbukH6PhywuySq1l Dd4MO2H70xou5OF9EJsoAmS7ODLnJeuyildaCrLs84rG/ovbiyzkBG/6TBFRjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683261553; a=rsa-sha256; cv=none; b=VptVnbwfxbDSOgxtKUd+maAWuFYhZsBdgghzJuRoxttY2PRfDbowxENkgw+xeZUtZSsXuH gxY0onl3UltwZqP6+3HYlfRgjOE+2+DnRhE7R0Gz0LBgb8emImPMl1U8lnfef6TE7EpWVS wy41Nnl7vakSarqijSGJl0RV2y1X/2itwtjGdfOsaIOfhMaqY5E99pyPX4vPHo6kgjDHgZ KVJp+aqWqJJaomzWeFvalmNyK/sTPkWGi5YVbOG7mkvYDJ9D3WvutlsvAfOhQfb6jo9x/V zQiuNJcYf8k9VBkrN4gM3aS2IQmMZtjqnaqmm2WGivhLxQQYC0WF9EmZLRVqJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCHyT3FqzzgRZ; Fri, 5 May 2023 04:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3454dDxK041360; Fri, 5 May 2023 04:39:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3454dDvB041359; Fri, 5 May 2023 04:39:13 GMT (envelope-from git) Date: Fri, 5 May 2023 04:39:13 GMT Message-Id: <202305050439.3454dDvB041359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: fff1551c0357 - main - ntpd: Support IPv6-only hosts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fff1551c0357cc43f6138fecfad1d79d8d8baa15 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fff1551c0357cc43f6138fecfad1d79d8d8baa15 commit fff1551c0357cc43f6138fecfad1d79d8d8baa15 Author: Mina Galic AuthorDate: 2023-05-05 04:33:18 +0000 Commit: Cy Schubert CommitDate: 2023-05-05 04:37:02 +0000 ntpd: Support IPv6-only hosts 0.pool.* returns only IPv4 addresses. 2.pool.* returns both, IPv6 and IPv4 addresses. conservatively extend our IPv4 only pool configuration by adding a second pool, which also returns IPv6 addresses. PR: 270536 Reported by: Lapo Luchini MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/731 Differential Revision: https://reviews.freebsd.org/D39954 --- usr.sbin/ntp/ntpd/ntp.conf | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/usr.sbin/ntp/ntpd/ntp.conf b/usr.sbin/ntp/ntpd/ntp.conf index ae0a3d0e6cad..3a56ec9f599c 100644 --- a/usr.sbin/ntp/ntpd/ntp.conf +++ b/usr.sbin/ntp/ntpd/ntp.conf @@ -20,24 +20,27 @@ tos minclock 3 maxclock 6 # -# The following pool statement will give you a random set of NTP servers -# geographically close to you. A single pool statement adds multiple -# servers from the pool, according to the tos minclock/maxclock targets. +# The following pool statements will give you a random set of IPv4 and IPv6 +# NTP servers geographically close to you. A single pool statement adds +# multiple servers from the pool, according to the tos minclock/maxclock +# targets. # See http://www.pool.ntp.org/ for details. Note, pool.ntp.org encourages # users with a static IP and good upstream NTP servers to add a server -# to the pool. See http://www.pool.ntp.org/join.html if you are interested. +# to the pool. See http://www.pool.ntp.org/join.html if you are interested. # # The option `iburst' is used for faster initial synchronization. # pool 0.freebsd.pool.ntp.org iburst +pool 2.freebsd.pool.ntp.org iburst # # If you want to pick yourself which country's public NTP server -# you want to sync against, comment out the above pool, uncomment -# the next one, and replace CC with the country's abbreviation. -# Make sure that the hostname resolves to a proper IP address! +# you want to sync against, comment out the above pool statements, +# uncomment the next ones, and replace CC with the country's abbreviation. +# Make sure that the hostnames resolves to a proper IP address! # # pool 0.CC.pool.ntp.org iburst +# pool 2.CC.pool.ntp.org iburst # # To configure a specific server, such as an organization-wide local From nobody Fri May 5 04:42:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCJ2q3JSRz49W1m; Fri, 5 May 2023 04:42:59 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCJ2q02C9z3r9K; Fri, 5 May 2023 04:42:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id uXnTpqVMpLAoIunHWp2Isy; Fri, 05 May 2023 04:42:58 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id unHUpv7fXyAOeunHVpQnrW; Fri, 05 May 2023 04:42:58 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=64548952 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=P0xRbXHiH_UA:10 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=xTW7z8BQHFCe7OKxZjIA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 40EA2B89; Thu, 4 May 2023 21:42:56 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 2CB06381; Thu, 4 May 2023 21:42:56 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: fff1551c0357 - main - ntpd: Support IPv6-only hosts In-reply-to: <202305050439.3454dDvB041359@gitrepo.freebsd.org> References: <202305050439.3454dDvB041359@gitrepo.freebsd.org> Comments: In-reply-to Cy Schubert message dated "Fri, 05 May 2023 04:39:13 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 May 2023 21:42:56 -0700 Message-Id: <20230505044256.2CB06381@slippy.cwsent.com> X-CMAE-Envelope: MS4xfGpC5iqGjWaX/t7iolYDb2vV/7pdSre0wYsufvP6NRxiCMFp8we0dIn2iR2JF4SwOATez0kdUZwip9C/0osmOxiZeBAR+bipdu3qKirfTL4UDlAaH3KF DOJPRrfQiZCJOpHOETVF3WKVNxnx+X3rPHyQQ8NbmXvbgQTfzYEEmOkw/daQFh2zrMm+4ZaY4QETVHcC9c4FJXvSnO2hv8VZkmUTHSOxOwpcEnfupH4xt/JT JIxjkAGT0/1mCYS30dHw+ntSY7lMD9ne5L+pioUKBvTbfmA66CDL9wHmR7lv/YoWfk7aLq308wk2HfL7oMxIblkfslO3Z3NZNfcJHXvwwUY= X-Rspamd-Queue-Id: 4QCJ2q02C9z3r9K X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202305050439.3454dDvB041359@gitrepo.freebsd.org>, Cy Schubert write s: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fff1551c0357cc43f6138fecfad1d79d > 8d8baa15 > > commit fff1551c0357cc43f6138fecfad1d79d8d8baa15 > Author: Mina Galic > AuthorDate: 2023-05-05 04:33:18 +0000 > Commit: Cy Schubert > CommitDate: 2023-05-05 04:37:02 +0000 > > ntpd: Support IPv6-only hosts > > 0.pool.* returns only IPv4 addresses. > 2.pool.* returns both, IPv6 and IPv4 addresses. > > conservatively extend our IPv4 only pool configuration by adding a > second pool, which also returns IPv6 addresses. > > PR: 270536 > Reported by: Lapo Luchini > MFC after: 3 days > Pull Request: https://github.com/freebsd/freebsd-src/pull/731 > Differential Revision: https://reviews.freebsd.org/D39954 Reviewed by emaste and myself. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri May 5 08:59:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCPlD4rQlz4935Q; Fri, 5 May 2023 08:59:52 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher 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 "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCPlB4syRz4Rlx; Fri, 5 May 2023 08:59:50 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=q3p3aqWV; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com; dmarc=pass (policy=none) header.from=bidouilliste.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1683277181; 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=QBe8V8BYP8vrcFTKWp4eVS5rrHBRH5eWqS40SecXfdE=; b=q3p3aqWVhN6OU711lT+YeqtERQxSpuO31wBazv+U8EQBLiIDtRHPAdGDNWAF1/kdwIn17l iz0ezjeUfDfPF+s0Q1R6xlYTZ1xz6IeyySMqthcNJQpkDoYIfO1Ys5yLIBICfF59KqDu+H 50sK4RAjiXFzSyfMJtkKa5o31yZTu9s= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 60a08cfb (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 5 May 2023 08:59:40 +0000 (UTC) Date: Fri, 5 May 2023 10:59:35 +0200 From: Emmanuel Vadot To: Kyle Evans , ihor@antonovs.family Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8935a3993219 - main - daemon: use kqueue for all events Message-Id: <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> In-Reply-To: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> References: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.990]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[manu]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4QCPlB4syRz4Rlx X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hello, On Fri, 14 Apr 2023 05:13:54 GMT Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8935a3993219be76c7ea03e9ad4509657d08af6c > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c > Author: Ihor Antonov > AuthorDate: 2023-04-14 05:10:29 +0000 > Commit: Kyle Evans > CommitDate: 2023-04-14 05:12:21 +0000 > > daemon: use kqueue for all events > > Refactor daemon to use kqueue/kevent instead of signals. > > This changes allows to simplify the code in several ways: > - the execution flow is now linear, no async events. > - several variables became redundant and got removed. > - all event handling is now concentrated inside of the event loop, which > makes code reading and comprehension easier. > - new kqueuex(2) call is used for CLOEXEC, but maintained closing the > kq fd prior to execve() to ease later MFC > > No UX/API changes are intended. > > Reviewed by: kevans > Pull Request: https://github.com/freebsd/freebsd-src/pull/701 This break sysutils/seatd when we resume and leaves the console is a really sad state (impossible to use, keystroke don't match). Don't really know how to properly debug but : 1/ Reverting the commit make seatd not exiting on resume (and so sway doesn't exit). 2/ If I start seatd without daemon it works 3/ If I manually start saetd with daemon in tmux with "daemon -s debug -T seatd -p /var/run/seatd.pid /usr/local/bin/seatd -g video" (so same thing as the rc script) I see "daemon: kevent wait: Interrupted system call" printed when I get back network. Feel free to ask me any test you want to debug further ;) Cheers, -- Emmanuel Vadot From nobody Fri May 5 09:55:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCQzp4P54z496Kr; Fri, 5 May 2023 09:55: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 4QCQzp3j3Vz4XhD; Fri, 5 May 2023 09:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683280550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+C8wyejlI56TObHgAZEL/fNGnfK5E+t5O8cHxaFI/c=; b=I6xixwYCQYGoLzdxWyquKSoWeOirIGt+QWP689TFHFCX20fKoch9aCbVaCGQkLrY3YrXh8 KtcucWKyDv+yAxG6NtGMlw1+ruvQVjC4JUiEdFZK21yGgJMdY3UElakMXkItO2nXXVbDqJ ALy9aXJBDslnaUxxjaeojKW4MdVaAi9ktMb9wSr7wwW0bVFMqWIc/fX6vL0z5SCncgxlfe 9mH32paTw6nCz8jhOBCvwEA05uv+vXNhDXs0RU8VVdoAZyBYnQA8YXcAZ+LnmeKNyyz/Xk PM+Xxa361uWNQ/eCxPmil2GZKucxvFjk309TFZh0YG0rtTVxdMe+c7fFWeC0fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683280550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+C8wyejlI56TObHgAZEL/fNGnfK5E+t5O8cHxaFI/c=; b=AjRtRNGrgJm97QOTo8AvVMgjQgdImXulZYvrJcMi/oztuDlyfovNRIDB7CP7USMpV/Na9w ggRC8yvOFc+rdbV66hMjGHzF9W6CY9jFgBXvlLO9g6ZdSgZboXtxUJYtEn0J94tDa9hax8 +V52cB3L7ujx/6YFJ7nUaLi116Lak+6ZguYjSz7WNU631+WAY4DoWvLzo/DxeL3rBnfRdo z1/ChFVUBt2hFzymIjwZEiuQdy4coa2tEo9lJdlUmZWfQbTP3v7L1sQd53A8WHJvT5ivYJ G0feCB+h4KiVBWO2PhyEuCRvS+mX8ZxHBRm4Y8gslFmv/Vco8IV2JOS2Tt2Z4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683280550; a=rsa-sha256; cv=none; b=XwxhcIXWP6tPQByE34EN2cPxGE2Ig7Y82VdgHTXZ5uK1ejqNPlDOIDcHAproSHjQ8dbXV4 bV+WoefeKfNtyXRbs7CcUy03w9LDX2vdkGB2Kcs1E6T/dG22I8lsL89dSDfyriOJe7HpYr TFVhQ8e6J5nyIWecrTE9zMNUvGJD/AmW2W5Lzbz5HVylXModowbos8PJD21/0yLMQIRBhn 5E/JHMAhfftIGVxB0WgFq34UIDRtoBBd4UDuOdaP8uXbNM4wOMlgMIK1qhE8MVkI0g22as 8oKGQgQfj7zguI/twqLQvZRUUP3qpmDCsbsXeHUvIp1uACtqibNlhXAwQEk2nQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCQzp2kbhzqdB; Fri, 5 May 2023 09:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3459toZ1067889; Fri, 5 May 2023 09:55:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3459to8l067888; Fri, 5 May 2023 09:55:50 GMT (envelope-from git) Date: Fri, 5 May 2023 09:55:50 GMT Message-Id: <202305050955.3459to8l067888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: 6abf81b3d674 - main - pvscsi: maximum target number is one less than number of targets List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6abf81b3d6747da0baa90860d5a6e929c97c9bb9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=6abf81b3d6747da0baa90860d5a6e929c97c9bb9 commit 6abf81b3d6747da0baa90860d5a6e929c97c9bb9 Author: Yuri Pankov AuthorDate: 2023-05-05 09:48:57 +0000 Commit: Yuri Pankov CommitDate: 2023-05-05 09:51:44 +0000 pvscsi: maximum target number is one less than number of targets Fix the number of targets we inquiry to be one less than the maximum number of targets adapter reports. This gets rid of the errors reported on VMware Workstation: (probe36:pvscsi0:0:65:0): INQUIRY. CDB: 12 00 00 00 24 00 (probe36:pvscsi0:0:65:0): CAM status: CCB request completed with an error While here, print the maximum number of targets. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39867 --- sys/dev/vmware/pvscsi/pvscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c index 1ba4777da906..48650647c561 100644 --- a/sys/dev/vmware/pvscsi/pvscsi.c +++ b/sys/dev/vmware/pvscsi/pvscsi.c @@ -1412,7 +1412,7 @@ finish_ccb: cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; cpi->hba_eng_cnt = 0; /* cpi->vuhba_flags = 0; */ - cpi->max_target = sc->max_targets; + cpi->max_target = sc->max_targets - 1; cpi->max_lun = 0; cpi->async_flags = 0; cpi->hpath_id = 0; @@ -1684,6 +1684,7 @@ pvscsi_attach(device_t dev) PVSCSI_MAX_REQ_QUEUE_DEPTH); device_printf(sc->dev, "Use Msg: %d\n", sc->use_msg); + device_printf(sc->dev, "Max targets: %d\n", sc->max_targets); device_printf(sc->dev, "REQ num pages: %d\n", sc->req_ring_num_pages); device_printf(sc->dev, "CMP num pages: %d\n", sc->cmp_ring_num_pages); device_printf(sc->dev, "MSG num pages: %d\n", sc->msg_ring_num_pages); From nobody Fri May 5 12:11:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCTzw4zvyz49Ffg; Fri, 5 May 2023 12:11: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 4QCTzw4MRBz3GFQ; Fri, 5 May 2023 12:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/xZNUUB3FaqLJztAa4rBxQNHYQUSpq/sbPjj16OLe7k=; b=Oopj4sdQ3vOCMsfDuzSwW4S3/TLWpWISq0zRqIcj9DJAuM78yO4RMJIyX1zP6VhImMz2vX UGY7Wm46Q5wXNcPyVlPpmp205nG2Xig30fmqHeWxwty8UxD3Nev1mTq9lkrN4Lg1tMY/OH TOAyHb3wSgoSKXwR2ftnEkMZsaZ2NshKh1kB2eIjhz4b4iJDtEXwOJfN3/u+lFAsZ2AvRT UlCvGq6Brjurqt+kYZ30RQg06rxUt+1X99d/RDa3WAT5IrEH4xta6o0UE43H/dw3ONxoSY Z7Zyi3KjrxzjLcaE1HgkZalVrMNr7DoJR3rG7YuVujHmpFNfVIIr7xG/wbE2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/xZNUUB3FaqLJztAa4rBxQNHYQUSpq/sbPjj16OLe7k=; b=FugDTbKzxkZcNAY+edNr9AGmB7dJslbNdgpl82dbQa8R6qUhw2nG7cG65AL3H2+tDTpvXA OjXuZYIYMvVh6Tm9WecMcO3zqnZXMDc+RLtT7wuxjscekkWM4TKEQdYHwxWP8GhZUXyBAa KgJ2hdMvwWdaadB4eWp8jzdYCShOeWVueGtsCYkQ+v8D+i9M45glq2jL7Ig9rCOxcD6uZm iV7ucIO+XqlT+vmLaplZ78jmLjVGtlTOuEOmmp3M5GQJE/JKwRe72Dk+vU9XAYRxeAklZz iGfcu5shBU6KqPpFvFsqefJY78UvqtBrSadrWMj4Sr7dNGEi0KKxK3m23RKjUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683288668; a=rsa-sha256; cv=none; b=KBsGYBGAhJey9HPC2G4Jt63X5bVhRteVpvAdvHOYmbJ9VL+55mWCgXgZnIVPPJYRH6G1x7 DynJF6ajNs+ueUtkjqEbnCm5jJ9XkWAcwQK+FpWBNpJuIPDNWmSfD2cysrXFvWEA4nMQLL hFOTpMRjqxkEvdtDnN2UqUt77NbQmuh4vXY8e2rIvuBmQMkX6xc1tWuBuYXrZgQDjIhsLm TKhE0QbmkS/aa1Lcb+5++Te6ZJqrwKUkzZy+aRFYg+8g9Rq8OZOSboCDn43oG8EjeDt0+H pwIxK6llSxWzTPohK1yAN3M3Uo4WA1y+wZtqoQUEXmPi0PI4It6A2eUmdnsTkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCTzw3BJ2zth7; Fri, 5 May 2023 12:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CB8Wd091340; Fri, 5 May 2023 12:11:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CB82I091339; Fri, 5 May 2023 12:11:08 GMT (envelope-from git) Date: Fri, 5 May 2023 12:11:08 GMT Message-Id: <202305051211.345CB82I091339@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: 8216f1a9ccaf - main - pf: fix a few more prototypes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8216f1a9ccaf880ac9cdb6d973032239d64e81bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8216f1a9ccaf880ac9cdb6d973032239d64e81bf commit 8216f1a9ccaf880ac9cdb6d973032239d64e81bf Author: Kristof Provost AuthorDate: 2023-05-05 11:40:25 +0000 Commit: Kristof Provost CommitDate: 2023-05-05 11:41:02 +0000 pf: fix a few more prototypes Fix function prototypes to use the same type for sa_family_t as the definition. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f72c3980438d..b9b7640788d1 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2166,7 +2166,7 @@ VNET_DECLARE(struct ifnet *, sync_ifp); VNET_DECLARE(struct pf_krule, pf_default_rule); #define V_pf_default_rule VNET(pf_default_rule) extern void pf_addrcpy(struct pf_addr *, struct pf_addr *, - u_int8_t); + sa_family_t); void pf_free_rule(struct pf_krule *); int pf_test_eth(int, int, struct ifnet *, struct mbuf **, struct inpcb *); @@ -2181,7 +2181,7 @@ int pf_test6(int, int, struct ifnet *, struct mbuf **, struct inpcb *); int pf_normalize_ip6(struct mbuf **, int, struct pfi_kkif *, u_short *, struct pf_pdesc *); void pf_poolmask(struct pf_addr *, struct pf_addr*, - struct pf_addr *, struct pf_addr *, u_int8_t); + struct pf_addr *, struct pf_addr *, sa_family_t); void pf_addr_inc(struct pf_addr *, sa_family_t); int pf_refragment6(struct ifnet *, struct mbuf **, struct m_tag *, bool); #endif /* INET6 */ @@ -2386,7 +2386,7 @@ int pf_osfp_get(struct pf_osfp_ioctl *); int pf_osfp_match(struct pf_osfp_enlist *, pf_osfp_t); #ifdef _KERNEL -void pf_print_host(struct pf_addr *, u_int16_t, u_int8_t); +void pf_print_host(struct pf_addr *, u_int16_t, sa_family_t); void pf_step_into_anchor(struct pf_kanchor_stackframe *, int *, struct pf_kruleset **, int, struct pf_krule **, From nobody Fri May 5 12:15:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCV4P4TCwz49Fml; Fri, 5 May 2023 12:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCV4P3d4vz3HC0; Fri, 5 May 2023 12:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YRt9D9/uN5pjlBaNFu/oNcw1FWZJjFgE8wExrB1keDM=; b=d7dkwfcFP3tCjrGAH0InyzNxduQPs0qX3e677tnss9omqDWHhBW4qZGkLojiGTaducJkAF IqO1+sO7vwr9rlpxIDEGVmCrMR84Q09nrZ7gRgITuwmpwje84qmoazNPWuCocyEtzjxdq2 z0P15C0IyRVYU/eaEPVeBLeJS2T8HAyAtV//f+DAfcbrgRgchIlCvUNwpAG7YTWhWzMH26 qCvmzHS1yLEyCmydKxZU2sGjFiO8cNwzggwoM7CXiI1JlftQDe2xlz1Uqfb6dVkMKGFv7o rzreYOaK9d0znqHbFKAD+JSvCGjhoSpDSuwBM317NwqQRG4xkNEBG+hUn7ymTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YRt9D9/uN5pjlBaNFu/oNcw1FWZJjFgE8wExrB1keDM=; b=a0u4Yd6oU+a73kdmwQCCNgXCzdz68+Y4xaLOfXM6Y64beTnF0Pa+mpcMmPYhynuhG+WthZ qroiOHat45dS9RPfuPHTr/qWK91dLXDnQ5SHpodrwPchSbtGIjXQ6bZlCn48RZTj/GKlKe cyeAQBgu4h09qiLmi0AMIIZ27rnCM/1evyWdU82FNkKD+dVhOfbLvz0kuYTuQgexZGLCsd SFKJ593EpH2DGP9sApZmfr7iYaPkpjT6qKtIbJa42j+KAbG/LcbC6M9jrQL2WJUBmlynYk tOF4XnvqbN9pG2PURy7GLhcVMQi1ysgG30wQuffDay5pc/g0laNxKdmhNJwcFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683288901; a=rsa-sha256; cv=none; b=LkdrsX6Egd5mJfwWhF4QEqW4VvkjwpAZLKyOc3vi4y+1w+InhWP+2hqSVjklwmx0D9KvWo HzS6x6gHqSHIlZSm/hPEmHuSVpRRObcZMVfMUAkeOGFRs92DsCezsePhFzBt/JgW/fHyJ6 FUsQCO+gIlrTFhmIpnSBNnnkHxnXjWXPSYKcVm7tWpOvwktzPD1VEXI7IBom7pvzTxRkcq HNLxAvDgYWc8NXntzBSb/weX4BxTwWK+TpLkSBoECnKlkpFtwybxbVtz3x2j/2R0OzwCRl C1V221txaH4KnwcTrFZVDTTfYmXUm1uvqaI6J+xTKl4fbFnLLN3qf7igQDgjIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCV4P2hKlztx8; Fri, 5 May 2023 12:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CF1Aw099321; Fri, 5 May 2023 12:15:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CF1aY099320; Fri, 5 May 2023 12:15:01 GMT (envelope-from git) Date: Fri, 5 May 2023 12:15:01 GMT Message-Id: <202305051215.345CF1aY099320@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: f7057652618a - main - Makefile.inc1: use make builtin :ts instead of sed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7057652618a73d93911cf636c254d183db77f6f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f7057652618a73d93911cf636c254d183db77f6f commit f7057652618a73d93911cf636c254d183db77f6f Author: Ed Maste AuthorDate: 2022-04-10 22:52:48 +0000 Commit: Ed Maste CommitDate: 2023-05-05 12:14:35 +0000 Makefile.inc1: use make builtin :ts instead of sed Commit 3eb1b4da3cf7 replaced "xargs -n1" with a sed expression to convert from space to newline as a list separator for *-old-* targets. Dan Nelson followed up with a suggestion to use make's built-in :ts instead, which should be slightly more efficient. Reviewed by: sjg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39972 --- Makefile.inc1 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d059d5dd9fea..86e8da9467da 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3245,10 +3245,9 @@ RM_I=-fv list-old-files: .PHONY @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ - -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" \ - -V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib32," \ - -V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib32," | \ - sed -E 's/[[:space:]]+/\n/g' | sort + -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \ + -V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib32,:ts\n" \ + -V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib32,:ts\n" | sort delete-old-files: .PHONY @echo ">>> Removing old files (only deletes safe to delete libs)" @@ -3312,10 +3311,10 @@ check-old-files: .PHONY list-old-libs: .PHONY @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ - -V OLD_LIBS -V MOVED_LIBS -V "OLD_LIBS:Mlib/*:S,^lib,usr/lib32," \ - -V "OLD_LIBS:Musr/lib/*:S,^usr/lib,usr/lib32," \ - -V "OLD_LIBS:Mlib/casper/*:S,^lib/casper,usr/lib32," | \ - sed -E 's/[[:space:]]+/\n/g' | sort + -V "OLD_LIBS:ts\n" -V "MOVED_LIBS:ts\n" \ + -V "OLD_LIBS:Mlib/*:S,^lib,usr/lib32,:ts\n" \ + -V "OLD_LIBS:Musr/lib/*:S,^usr/lib,usr/lib32,:ts\n" \ + -V "OLD_LIBS:Mlib/casper/*:S,^lib/casper,usr/lib32,:ts\n" | sort delete-old-libs: .PHONY @echo ">>> Removing old libraries" From nobody Fri May 5 12:27:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCVLn3G6Nz49GkQ; Fri, 5 May 2023 12:27:29 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCVLm6xf2z3Htw; Fri, 5 May 2023 12:27:28 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm3 header.b=jBHZrAFo; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="j jEmYNO"; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 64.147.123.24 as permitted sender) smtp.mailfrom=yuri@aetern.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id E4805320083A; Fri, 5 May 2023 08:27:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 05 May 2023 08:27:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1683289646; x=1683376046; bh=OWGOH4Q9y7RohqgAyMmckby9L5KE8YOtJ20 91DnbDvg=; b=jBHZrAFobEINLclSedbrhV22qw8KQaDekSjAmzJYXRbbYF4yG84 vNNBt0/0k7VqnZbIO6JZEw5Ag2wt1edAisbcKYpJdiZgqc1ELywX4tk85Eh01TyD 5LlJ7zatc06dUIRaPsQU+xGAZq/jjXqeHhRZ8rtfFTr3AfYruds/zzyU8oQPfpEc kLKzdHCQ5Gt2Zf/JiOH+68NQRD30NxadtDDlwKsUPeaSa0oYrBQg03XaTQK1pOf+ RDry7X6XZVYlQsNgD7c4phIjEoyGKXDqP4xLgJsKwk788BpcEZPwji29Uh42x56B apUPeh50shM+nxi//GvckRdhshvM4Vsgz5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1683289646; x= 1683376046; bh=OWGOH4Q9y7RohqgAyMmckby9L5KE8YOtJ2091DnbDvg=; b=j jEmYNO62j+vI8oy6LNu0z6zp41O0izPIFwWWxZDfntNgRVXmQ3Krgwnu8oYjzhaJ t+s2LA1lTDfn3Koen8G9xUmk2nhcmz8+BCsryCVBzG4ORYVWV4j7NlxeX2naCY+w Z5Q6bWpy6RkPMgrUCrJUCXmNoCIDYJgt4lIuS/7D9wb9sLTvYyag7VpCBhHn5sUV TyNu/f8Xq5L5YQV7SvOtkIC4AGax5ss1qKUeZG+/Gx3aa1DSvrFbPyswuyDDxtkZ ZckaOHgNlBCgErm2K7hc9gd+ovVxgdm7ThFwXS1AOI6nrXnSHSLZ15kMfj+X80jj 64VuroadksncSJ+gpj8dQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefvddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepjghurhhi uceohihurhhisegrvghtvghrnhdrohhrgheqnecuggftrfgrthhtvghrnhepgeehleevue ehhffggfetteffieffhfduteduteeuvdehvdfhffdvtefhffejjedvnecuffhomhgrihhn pehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhephihurhhisegrvghtvghrnhdrohhrgh X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 5 May 2023 08:27:25 -0400 (EDT) Message-ID: <1b4c658e-0311-876b-bc55-ccbb5200b1c6@aetern.org> Date: Fri, 5 May 2023 14:27:23 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: 5282ada06bbc - main - ObsoleteFiles: Complete 20201025: Remove cal data files Content-Language: en-US To: Li-Wen Hsu , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305040433.3444XY57062143@gitrepo.freebsd.org> From: Yuri In-Reply-To: <202305040433.3444XY57062143@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QCVLm6xf2z3Htw X-Spamd-Bar: / X-Spamd-Result: default: False [-0.40 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.24]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm3,messagingengine.com:s=fm3]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; local_wl_from(0.00)[yuri@aetern.org]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_from X-ThisMailContainsUnwantedMimeParts: N Li-Wen Hsu wrote: > The branch main has been updated by lwhsu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5282ada06bbc6727b467d6f6530fa19114143c61 > > commit 5282ada06bbc6727b467d6f6530fa19114143c61 > Author: Li-Wen Hsu > AuthorDate: 2023-05-04 04:28:52 +0000 > Commit: Li-Wen Hsu > CommitDate: 2023-05-04 04:28:52 +0000 > > ObsoleteFiles: Complete 20201025: Remove cal data files > > Fixes: d20d6550187a calendar: remove all datafiles except freebsd one > MFC after: 3 days > --- > ObsoleteFiles.inc | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > index 6e7c5205a2bf..ede2871455ae 100644 > --- a/ObsoleteFiles.inc > +++ b/ObsoleteFiles.inc > @@ -6199,6 +6199,18 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.all > OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.holiday > OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.misc > OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.orthodox > +OLD_DIRS+=usr/share/calendar/de_AT.ISO_8859-15 > +OLD_DIRS+=usr/share/calendar/de_DE.ISO8859-1 > +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-15 > +OLD_DIRS+=usr/share/calendar/fr_FR.ISO8859-1 > +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-15 > +OLD_DIRS+=usr/share/calendar/hr_HR.ISO8859-2 > +OLD_DIRS+=usr/share/calendar/hu_HU.ISO8859-2 > +OLD_DIRS+=usr/share/calendar/pt_BR.ISO8859-1 > +OLD_DIRS+=usr/share/calendar/pt_BR.UTF-8 > +OLD_DIRS+=usr/share/calendar/ru_RU.KOI8-R > +OLD_DIRS+=usr/share/calendar/ru_RU.UTF-8 > +OLD_DIRS+=usr/share/calendar/uk_UA.KOI8-U > > # 20201004: logo files renamed to type-agnostic gfx-*.lua > OLD_FILES+=boot/lua/logo-beastie.lua These directories are still in etc/mtree/BSD.usr.dist, so they get recreated. From nobody Fri May 5 12:45:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCVlS57bHz49HpL; Fri, 5 May 2023 12:45: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 4QCVlS2lgyz3KrK; Fri, 5 May 2023 12:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bVfhkvPdBfU/hBhMZwhHICbWnOTI8o11eyR4+u6de8=; b=ruIjG/m/eijGFHwcOb4qotacNTSS3PvLyEQu2C6wsRKOkrU+lzU/wMc+9I42nSXLuGkzVu 1vk9x4hHmrMdtkow++NIBkaeJsEd5SqL7CU1wyCjSEF/qg8VTm1uwRzeXFMNmRdrOwL5Me u2BFFytZoA/bIkUTWKVApOG8L5hoH2Io9grnzy4DaZKWMSLF2UPCd/r6sZNaL4QVzCdQhI +NNGEKce02o1ahMSzfFyrE/4lq7arOSQebbUGQk68ArAFK17knHflhs3ykmCASTy9T8ZJV 7kIZBfQ4hAn5di2K4aGcYTLRpC/9pLm5Q8pmEFiDqi/czrifqjTt1bXCnLk/2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bVfhkvPdBfU/hBhMZwhHICbWnOTI8o11eyR4+u6de8=; b=WLAbPoi1ZldJsK2T1pxoSQggEGKa9/M1vx4IsB0OyJszjE32zLAWN9zeMkFR8jHEkEutyp BmwJsUIwTAkCR1IZ55PI6p14sciqZCS322tfNFcVu6MkGmbWB621IcTUIsOy4FgdeOLDgg Vl0acCVXHHH9l8zY+kElnzw9yrJSSQLLbq5pbjI0e5S2yHXR488qUJiHJcvRwcOK/V1ZaB m008GZ03esSZ6CQcXx1Dq2xcZi8VcjdRIAsPPNjAx6SVLsYT0/NDvlx6C9mDMthVDmkzpp 1Vq3/AfntPxKk6n/Gx25n8FMe6jN6aLBAlkOZR02w/bWmxSIPRR+CyYoqa40HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683290724; a=rsa-sha256; cv=none; b=FPTta/hQGHAq/7D+ky/nvEDs8hzDkg2qowq9KO7M5Z74tG07C5NU9htJfc1fJJRld6qaSF 1JoAf1lI9sq96Lhfx9lcHrbil92I4gfl+9en0+y4TGG+YTGB5PNpmA/oHwF8tfhg/Q1vnN uvXZ1G0Ojc9jxPZ99qU5OT2ncLdRi6UgwJKeytMsJWT66oApR+g4PLvvATZjKeQRDgqBZP kXbAAH5n6G0Tbs1lYZB4d7AMfd5qvGI8dmMjS/GJFZoSqC5NICsul3pdOScZBdquRrg+Yy oGeMWzJLZihQgzRfK5hgcLRpPPAjRFD6rRhAkP9iyvZ4Ys0xz7MP8OPrqUkv+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 4QCVlQ2FBfzvq4; Fri, 5 May 2023 12:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CjMWH048252; Fri, 5 May 2023 12:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CjMRU048251; Fri, 5 May 2023 12:45:22 GMT (envelope-from git) Date: Fri, 5 May 2023 12:45:22 GMT Message-Id: <202305051245.345CjMRU048251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: dabef9818f32 - main - dd: Tidy up the 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dabef9818f324a8b3cba2a361aff1d74e97be45e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dabef9818f324a8b3cba2a361aff1d74e97be45e commit dabef9818f324a8b3cba2a361aff1d74e97be45e Author: Dag-Erling Smørgrav AuthorDate: 2023-05-05 11:17:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-05 12:42:32 +0000 dd: Tidy up the tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D39711 --- bin/dd/tests/dd2_test.sh | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/bin/dd/tests/dd2_test.sh b/bin/dd/tests/dd2_test.sh index c0b33fc17226..7632de3bde22 100755 --- a/bin/dd/tests/dd2_test.sh +++ b/bin/dd/tests/dd2_test.sh @@ -1,30 +1,8 @@ # # Copyright (c) 2017 Spectra Logic Corporation -# 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. +# SPDX-License-Identifier: BSD-2-Clause # -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. -# -# $FreeBSD$ - atf_test_case max_seek max_seek_head() @@ -33,17 +11,23 @@ max_seek_head() } max_seek_body() { - case `df -T . | tail -n 1 | cut -wf 2` in - "ufs") - atf_skip "UFS's maximum file size is too small";; - "zfs") ;; # ZFS is fine - "tmpfs") - atf_skip "tmpfs can't create arbitrarily large spare files";; - *) atf_skip "Unknown file system";; + case $(df -T . | tail -n 1 | cut -wf 2) in + "ufs") + atf_skip "UFS's maximum file size is too small" + ;; + "zfs") + # ZFS is fine + ;; + "tmpfs") + atf_skip "tmpfs can't create arbitrarily large sparse files" + ;; + *) + atf_skip "Unknown file system" + ;; esac touch f.in - seek=`echo "2^63 / 4096 - 1" | bc` + seek=$(bc -e "2^63 / 4096 - 1") atf_check -s exit:0 -e ignore dd if=f.in of=f.out bs=4096 seek=$seek } @@ -55,7 +39,7 @@ seek_overflow_head() seek_overflow_body() { touch f.in - seek=`echo "2^63 / 4096" | bc` + seek=$(bc -e "2^63 / 4096") atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ dd if=f.in of=f.out bs=4096 seek=$seek atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ From nobody Fri May 5 12:45:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCVlS57cSz49Hk6; Fri, 5 May 2023 12:45: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 4QCVlS2lj6z3KgL; Fri, 5 May 2023 12:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d5fzhIneASAWce+XB4+/LWm8h7MT93akoXnqeqJYE0=; b=bZaLocqT9c52HT6d0A0Xfm97BFkosX+DzFPlzeZTK4Bq3KFZQjunkbYngcIv+fle5Q55Yz EzGNL3NF243OvqNGLBvF+Dpovdckeuo5503HNNMwt8o85Bcn9kHzzvcctsqHjafg19t2/j fJEAB3tmI1P7ETTqSQygrX8buvdQXYrOYJ5tu/9lrCOZGarldfAxmlioBBmuojY0pxItyh PRErukr+oJI0sKk25JzX9IaQyiowvIOaR0Cn5icz/LJjbVPCKdoCVM+0NN/Ru10T/3umdj FNgL1SJaF/MzARhQ/qakBXwVJyJcihj+Bhd4CoW5lopelWE7HygpoleFjbYC5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d5fzhIneASAWce+XB4+/LWm8h7MT93akoXnqeqJYE0=; b=lY7nxehXBhTT0nTdt1W06GabcE9/nSqZZKZmGtruxYqLerMzbcB5YhsslAbslIwFL9UqoN eXZTrQrry60VVXVYyXbBOaC8tm3cLz80NH5PaIXQAgMsQSkeXuLBrgAI+NO5Wxox3CvYKz Pk9S+0jVYJrktIbGL57BPATFpbJG7apNRN/6Zxf+xCw2oGrjAE8tOAXsgYFur8XTIVWXab y4g9S/WqYj0miuyDXTwqNna6I57gw4f1qM5Usn7EEhgc+i5KcANEzWO0g0HrKnr1ySrp19 pFseMgAbRv+tm18j/C6n4+b8zPIL/mDLHEYipG8yYd35IHWMuHqckUT2VEnO6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683290724; a=rsa-sha256; cv=none; b=bTdZZak95l/8V2WrhpWpVe8xedDB+bC54iF7cxfa4KLu1ssztOG8iCL69/NktHVptdnmia K9wsqB5kSN0Zc4ol0k0r6s8bkjeMPG48S453ltHl+GAWqDHuyqrvceNKDSJK06ymT/I9dU DhaKbtNSY4wcSf9LgVdSCs7YxJcXzWK/qQeh9atGJE8lhMwjt5xbwJMBISPL3XgVZ+ZagW B1wlA/n8H4nrpgNQsFg+YOJIoIoCFjjbqhrhp4i9Fq8OZ1cpQBzzq5in6Sv5moiPy2I4SJ IxXARsJAdvy4F+C2ozYlSKOEmkmf37J+9FpQnQeG5hbFmeejgT28yJuIPxezbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCVlR31rfzvq5; Fri, 5 May 2023 12:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CjNsH048276; Fri, 5 May 2023 12:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CjNLE048275; Fri, 5 May 2023 12:45:23 GMT (envelope-from git) Date: Fri, 5 May 2023 12:45:23 GMT Message-Id: <202305051245.345CjNLE048275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5807f35c541c - main - dd: Fix SIGINT handling. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5807f35c541c26bbd91a3ae12506cd8dd8f20688 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5807f35c541c26bbd91a3ae12506cd8dd8f20688 commit 5807f35c541c26bbd91a3ae12506cd8dd8f20688 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-05 11:17:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-05 12:42:32 +0000 dd: Fix SIGINT handling. Currently, we handle SIGINT by calling summary() and _exit() directly from the signal handler, which we install after setup(). There are several issues with this: * summary() is not signal safe; * the parent is not informed about the signal; * setup() can block on open(), and catching SIGINT at that stage will produce the correct exit status but will not print anything to stderr as POSIX demands. Fix this by making SIGINT non-restartable, changing our signal handler to only set a flag, installing it before setup(), and checking the termination flag before and after every blocking operation, i.e. open(), read(), write(). Also add two test cases, one for catching SIGINT while opening the input and one for catching it while reading. I couldn't think of an easy way to test catching SIGINT while writing (it's certainly feasible, but perhaps not from a shell script). MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: cracauer, ngie, imp Differential Revision: https://reviews.freebsd.org/D39641 --- bin/dd/dd.c | 15 ++++++++++++++- bin/dd/extern.h | 2 ++ bin/dd/misc.c | 20 ++++++++++++++++---- bin/dd/position.c | 5 ++++- bin/dd/tests/dd2_test.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+), 6 deletions(-) diff --git a/bin/dd/dd.c b/bin/dd/dd.c index c43645fa0073..78a9e8b06720 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -91,12 +92,16 @@ char fill_char; /* Character to fill with if defined */ size_t speed = 0; /* maximum speed, in bytes per second */ volatile sig_atomic_t need_summary; volatile sig_atomic_t need_progress; +volatile sig_atomic_t kill_signal; int main(int argc __unused, char *argv[]) { struct itimerval itv = { { 1, 0 }, { 1, 0 } }; /* SIGALARM every second, if needed */ + (void)siginterrupt(SIGINT, 1); + (void)signal(SIGINT, terminate); + (void)setlocale(LC_CTYPE, ""); jcl(argv); setup(); @@ -110,7 +115,6 @@ main(int argc __unused, char *argv[]) (void)signal(SIGALRM, sigalarm_handler); setitimer(ITIMER_REAL, &itv, NULL); } - (void)signal(SIGINT, terminate); atexit(summary); @@ -154,7 +158,9 @@ setup(void) iflags = 0; if (ddflags & C_IDIRECT) iflags |= O_DIRECT; + check_terminate(); in.fd = open(in.name, O_RDONLY | iflags, 0); + check_terminate(); if (in.fd == -1) err(1, "%s", in.name); } @@ -191,7 +197,9 @@ setup(void) oflags |= O_FSYNC; if (ddflags & C_ODIRECT) oflags |= O_DIRECT; + check_terminate(); out.fd = open(out.name, O_RDWR | oflags, DEFFILEMODE); + check_terminate(); /* * May not have read access, so try again with write only. * Without read we may have a problem if output also does @@ -199,6 +207,7 @@ setup(void) */ if (out.fd == -1) { out.fd = open(out.name, O_WRONLY | oflags, DEFFILEMODE); + check_terminate(); out.flags |= NOREAD; cap_rights_clear(&rights, CAP_READ); } @@ -415,7 +424,9 @@ dd_in(void) in.dbrcnt = 0; fill: + check_terminate(); n = read(in.fd, in.dbp + in.dbrcnt, in.dbsz - in.dbrcnt); + check_terminate(); /* EOF */ if (n == 0 && in.dbrcnt == 0) @@ -596,7 +607,9 @@ dd_out(int force) pending = 0; } if (cnt) { + check_terminate(); nw = write(out.fd, outp, cnt); + check_terminate(); out.seek_offset = 0; } else { return; diff --git a/bin/dd/extern.h b/bin/dd/extern.h index 07c08e2ef8f2..e801722560f7 100644 --- a/bin/dd/extern.h +++ b/bin/dd/extern.h @@ -50,6 +50,7 @@ void summary(void); void sigalarm_handler(int); void siginfo_handler(int); void terminate(int); +void check_terminate(void); void unblock(void); void unblock_close(void); @@ -69,3 +70,4 @@ extern u_char casetab[]; extern char fill_char; extern volatile sig_atomic_t need_summary; extern volatile sig_atomic_t need_progress; +extern volatile sig_atomic_t kill_signal; diff --git a/bin/dd/misc.c b/bin/dd/misc.c index 405448eb1cb0..5fbea20b7049 100644 --- a/bin/dd/misc.c +++ b/bin/dd/misc.c @@ -147,11 +147,23 @@ sigalarm_handler(int signo __unused) need_progress = 1; } -/* ARGSUSED */ void -terminate(int sig) +terminate(int signo) { - summary(); - _exit(sig == 0 ? 0 : 1); + kill_signal = signo; +} + +void +check_terminate(void) +{ + + if (kill_signal) { + summary(); + (void)fflush(stderr); + signal(kill_signal, SIG_DFL); + raise(kill_signal); + /* NOT REACHED */ + _exit(128 + kill_signal); + } } diff --git a/bin/dd/position.c b/bin/dd/position.c index 21a100cd3b24..a7dd733f0bae 100644 --- a/bin/dd/position.c +++ b/bin/dd/position.c @@ -191,9 +191,10 @@ pos_out(void) /* Read it. */ for (cnt = 0; cnt < out.offset; ++cnt) { + check_terminate(); if ((n = read(out.fd, out.db, out.dbsz)) > 0) continue; - + check_terminate(); if (n == -1) err(1, "%s", out.name); @@ -208,7 +209,9 @@ pos_out(void) err(1, "%s", out.name); while (cnt++ < out.offset) { + check_terminate(); n = write(out.fd, out.db, out.dbsz); + check_terminate(); if (n == -1) err(1, "%s", out.name); if (n != out.dbsz) diff --git a/bin/dd/tests/dd2_test.sh b/bin/dd/tests/dd2_test.sh index 7632de3bde22..c4a3065763cd 100755 --- a/bin/dd/tests/dd2_test.sh +++ b/bin/dd/tests/dd2_test.sh @@ -1,5 +1,6 @@ # # Copyright (c) 2017 Spectra Logic Corporation +# Copyright (c) 2023 Klara, Inc. # # SPDX-License-Identifier: BSD-2-Clause # @@ -46,8 +47,51 @@ seek_overflow_body() dd if=f.in of=f.out bs=4096 seek=-1 } +atf_test_case sigint +sigint_open_head() +{ + atf_set "descr" "SIGINT while opening destination" +} +sigint_open_body() +{ + atf_check mkfifo fifo + set -m + dd if=fifo of=/dev/null 2>stderr & + pid=$! + sleep 3 + kill -INT $pid + wait $pid + rv=$? + atf_check test "$rv" -gt 128 + atf_check -o inline:"INT\n" kill -l $((rv-128)) + atf_check test -s stderr +} + +atf_test_case sigint +sigint_read_head() +{ + atf_set "descr" "SIGINT while reading source" +} +sigint_read_body() +{ + atf_check mkfifo fifo + (sleep 30 >fifo &) # ensures that dd does not block on open + set -m + dd if=fifo of=/dev/null 2>stderr & + pid=$! + sleep 3 + kill -INT $pid + wait $pid + rv=$? + atf_check test "$rv" -gt 128 + atf_check -o inline:"INT\n" kill -l $((rv-128)) + atf_check test -s stderr +} + atf_init_test_cases() { atf_add_test_case max_seek atf_add_test_case seek_overflow + atf_add_test_case sigint_open + atf_add_test_case sigint_read } From nobody Fri May 5 13:15:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCWQg1M96z49KK2; Fri, 5 May 2023 13:15: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 4QCWQg0tM1z3Mc9; Fri, 5 May 2023 13:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683292555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rikZ1ZgR7ishoKbrzge+S+sI4HGP+bvNb9QXSrcBMdY=; b=cOCKvm75SfqL5BhvDeNxk95peHDa84VtwWx1+F9AzOHWqOgerDW/nZhRs3JYPyEuR9wyur JUuEnia5WoRbDQpx4GeYcHzh9symN0LXUDOeLCnTmcOo7koReOBli46299qQs8l5ABLqu0 0HqJObQa4tpMLrS0AwgicnnAX+SquQzgLdEJDo2nvVnxHWZ0RUJzDX3CvcHU5z2mhcQ5bc scJHfJfIH21RZkW4gEQLgE1Nlp83vw2hU1NhKsuF+1/TkAyEOmuqKBE+bw52ofbSO2SkVj I6QssPcVAXU9D0E8tTHCgcOFm6zJ6epeYNCjDk4Sv+98bQ2AmdaecoMuQT/sJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683292555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rikZ1ZgR7ishoKbrzge+S+sI4HGP+bvNb9QXSrcBMdY=; b=h4K6cXF1UkDhL9WBxkC8ckX9ngMeoMKV2E2jzyKbkEzklqDoclN+t3F98TQ9uZ+NvF4qVa knIzXOoC4m1e2zihSYNfEApeUSyYZys9I0eKuv94+qgXYBprxZhJOyoJdtw653+UGkT8mH XmRxVAOHTfG7k+W0CrS/suZkGRvgSwi7af7BxaywinuHALjkM0f8A/DGFylcQ0xghZIKqb HP9rJQYPZirtyTghc8LEN+nW+4Q36+5Nl27XklISMn/wqeR1Uub8AqIYsTahiwbt4gBSWZ HHDo0dfEEYTcCNeJHWFHe9qiiufNfFREcbIkghcdpEW+y5MmnB8mwcsj9D2n/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683292555; a=rsa-sha256; cv=none; b=KiDGdXhrVNy5Yhj71UzPkAWHkTJa1lO4yGQ+PytvXUyF6xSttnZoaBBfRAnm1Hc3LBR24O gyu9/zYRXR0Zr3+9wpTQx0Xw9JUVcnQqLNx0x6nQ4cQcN+7HWUSrCWw930kWb7uiCjNvs6 fEY5XbYGvXvApPletSKMUm70X3Dik+U8n/hA79nlp75GHVeyCasguR3GCXkucoZipJRjCi /1KDsvUIIuxVAtIagVU7z+42GK1BG/mbu1T3lFmSDjS3f+gz5Qp0h2reD+X2xOWxP0rvb3 W0YkNe9Ozl2INjwOuAGJuQSpMdm6lIHCIk36nuwo+30F6fhQpZbMJqByPSEWyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCWQf71c5zwNG; Fri, 5 May 2023 13:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345DFs6P098552; Fri, 5 May 2023 13:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345DFsTf098551; Fri, 5 May 2023 13:15:54 GMT (envelope-from git) Date: Fri, 5 May 2023 13:15:54 GMT Message-Id: <202305051315.345DFsTf098551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: 66659955dafd - main - bhyve(8): fix typo in examples List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66659955dafd3effd37e292c36c5404318d388e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=66659955dafd3effd37e292c36c5404318d388e8 commit 66659955dafd3effd37e292c36c5404318d388e8 Author: Alexey Marchenko AuthorDate: 2023-05-05 12:56:50 +0000 Commit: Yuri Pankov CommitDate: 2023-05-05 13:08:51 +0000 bhyve(8): fix typo in examples PR: 271259 --- usr.sbin/bhyve/bhyve.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 72018912e2c5..321c014395fb 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2022 +.Dd May 5, 2023 .Dt BHYVE 8 .Os .Sh NAME @@ -988,7 +988,7 @@ Be sure to create a per-guest copy of the template VARS file from .Bd -literal -offset indent bhyve -c 2 -m 4g -w -H \\ -s 0,hostbridge \\ - -s 31,lpc -p com1,stdio \\ + -s 31,lpc -l com1,stdio \\ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd uefivm .Ed From nobody Fri May 5 13:34:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCWr757kQz49LYM; Fri, 5 May 2023 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCWr74fFWz3PWH; Fri, 5 May 2023 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683293671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lA2vWnUIwhQ07c02UNSvBlZSE2pgP0SiPoxJe+TvT1g=; b=YKnpNHBN1bt0AsHLbUCnOlrcQFnfc8dCin6vh3/ITPbohl95KHVPy9edyoT8Uf03kvvONZ C2uBPsaumgIBqGoxt5xmZerFXU+Yabe/eHQmLI7ugPAd2q7mlZzkHUe32lmEev2xVOu3AJ TNentWmoBtL4/fGg1H0bZDHQxoLabfbATR8iGIu6Gb/idnxLgAmK+8+70W6NHbUeNlmopP jje1HEcmSQNoo+ymUs/ac0qCJdMqQTMxqKDZ9o2U8276MYI5bnD77vhv4Gh9xlM/dDXxAD knhNob/4X2r78JR59pxZ1qXWaUhNPd9Gp1/uATGeGbM/LUYnnF+NuRDBmfzDxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683293671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lA2vWnUIwhQ07c02UNSvBlZSE2pgP0SiPoxJe+TvT1g=; b=CRZ71/Wd44b8TcKp9lq5HBOZCh2028TXaON8fwHQaQT1wWFxrcAJAFWcbzFACs+RoBZtDF AKz5+ufe7OdeeuAxh/VnCaYrHQfDYCBY21Pkrpr2QE+jptGgi2wkUnny+ZeT1hSzfjeLhk hmpZvChTQ9NiP7YVw5c/2Mb7HpE+T8+sPWGeAGXv0XtS+jXOVEyF4H7dLj1yPpv3MNbYWp 62MmZybaBnqt4WLuNxdjfV3Fj+mNgbLR7OLSXnMOOhAhtoVSm1pZBhvwHts6hjfZxA/3xZ t2MbdTaegs++PALrrFHrhJ6MhRqeoMp7FPQrQ55OPaBGlCcbFCr7BzuXojH8Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683293671; a=rsa-sha256; cv=none; b=arVRix3nC1ZizRkoDN13DuZYCqstV527DKA5CuthrJNPccYVv+brKGHb1tCX0efdv0hVtG xtK29z8rnS/pvC84ccvIK6pNvvH/6pGY/l3L3Z0ZtE+Y1OeJo8XBTdxrAKHYO92SMBiQ/h fktEyMkZElMF9+1cCaXsyY8bj3qKT+xrAJB/Sdkl/vdiAhDhKJIj0Kq5z3PXZyTeA9+aIU JcKs56vXEY+ZmKKN4NOLwdIzCuBL+ZIvwno5RzGgTmLymhUMzVPhkfnHa8ZebKWBc894NB fCP/2PkLTvXsGCytJPtN1vNkK3+PfWlOmbWj8isL5/LpKOXdy9CE6E8RExQndQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCWr73j5zzwLn; Fri, 5 May 2023 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345DYVPH031201; Fri, 5 May 2023 13:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345DYVG1031200; Fri, 5 May 2023 13:34:31 GMT (envelope-from git) Date: Fri, 5 May 2023 13:34:31 GMT Message-Id: <202305051334.345DYVG1031200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: b10e100d1696 - main - vmm: don't free unallocated memory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b10e100d1696782cfebef09b5870dfc6d1b3217b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=b10e100d1696782cfebef09b5870dfc6d1b3217b commit b10e100d1696782cfebef09b5870dfc6d1b3217b Author: Corvin Köhne AuthorDate: 2023-05-05 06:36:20 +0000 Commit: Corvin Köhne CommitDate: 2023-05-05 13:34:00 +0000 vmm: don't free unallocated memory If vmx or svm is disabled in BIOS or the device isn't supported by vmm, modinit won't allocate these state save areas. As kmem_free panics when passing a NULL pointer to it, loading the vmm kernel module causes a panic too. PR: 271251 Reviewed by: markj Fixes: 74ac712f72cfd6d7b3db3c9d3b72ccf2824aa183 ("vmm: Dynamically allocate a couple of per-CPU state save areas") MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39974 --- sys/amd64/vmm/amd/svm.c | 5 ++++- sys/amd64/vmm/intel/vmx.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 0af7342128f2..d295401a9043 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -166,7 +166,10 @@ svm_modcleanup(void) { smp_rendezvous(NULL, svm_disable, NULL, NULL); - kmem_free(hsave, (mp_maxid + 1) * PAGE_SIZE); + + if (hsave != NULL) + kmem_free(hsave, (mp_maxid + 1) * PAGE_SIZE); + return (0); } diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 55ed5fdf1a00..8b8f8fe6cb25 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -619,7 +619,9 @@ vmx_modcleanup(void) nmi_flush_l1d_sw = 0; smp_rendezvous(NULL, vmx_disable, NULL, NULL); - kmem_free(vmxon_region, (mp_maxid + 1) * PAGE_SIZE); + + if (vmxon_region != NULL) + kmem_free(vmxon_region, (mp_maxid + 1) * PAGE_SIZE); return (0); } From nobody Fri May 5 13:57:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCXLJ0MTFz49Mlx; Fri, 5 May 2023 13:57: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 4QCXLH6t4Nz3kf7; Fri, 5 May 2023 13:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683295032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QvmdUgwJ7G0fx4f2IrGSwIw6EBU/G8awIroWvriDMI4=; b=KhtrPbzz9A+2N4gYgQWMQPzD1Lzs7iq50oL7lYCB+7mn2CTddEPEJemwiUka7o/CZhx7HW Q1p6lrLcHI5yJMDHqva0LemTn7e25xK6khs0MyfkwF8RCvHV4IK3+xdVHQYEOegBmBAz1H T6B4sDbAV1H7+pYIdHeJBbo7qosRD3YQBkqFh6LrSBvtZN/YSod5ymnBK91IKvAY2tOLFx g78ljMLpRjxNMNppcy1So59ZCyxxVi0mmbX3aI28LEe/yxRb/fSmJ/codZ+qONw+uZe1Jf uefpmfpnikxGSMHFP3mgmLWZjA5+I6wp3nnwWgUD8uw9ix9xOjHYuzEuF7UC5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683295032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QvmdUgwJ7G0fx4f2IrGSwIw6EBU/G8awIroWvriDMI4=; b=vFNm1MyLfkhBn5MgoSkimd0GTb7WJhWiYFfQONMWWVF3RMd1P/GMNLCREVgm/DL3UnEaMo uadOGAcyieT3tdpHOop8qMPjb/MX+y2eeF1cJqU4wrTQlvIFyThR3lr2b/i6sDrmaWaii0 SZj1YI/mHn3f4n7K37TsRSz4rtWCGB7RNGOiTY1JTyGJ1xmyQLnTzQv7eeh8XsPbwuxDED p3MQaU/jgO5Xbno4xx1OpCE9DtvocCdqNCeMsEtgN9aC4U2o4m/3zTkgSwP7nmHz0ui6x+ BXPEktB4pS6oBHyuAZ0Jrr46Xo4DjqrXiouDVMzV416TEtZtes2SkzikIwDxTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683295032; a=rsa-sha256; cv=none; b=aNn8NnOliwr0uPJg1G50Wf25dQoFMbF3Rz7of6ceE188qpmKnP4zjq/O0sgT3YKQduje+6 0s1g8nvr0JRXCx5ByAcbnc9De0e8ZwuR+Zrcdmy5C/0/48IETdbt4LeGbDPHBPZrTRNIG3 /U9JGz4DBllhfoMAMzP3NCTJ4dL3Y3cSabraG79ypskrB9siDHTjJVZIg6pPjV6XsY25ZR T38UMWqEpo5BjvWqdM8cG/zF5yLUo6jXg0yuhDn0YQOCz52pvJzV+tf3aPHJD4gnb4Zdc8 4m6yYJU8clQ84JPzU9gRemaPIP/kOrmZkfw8/Z1NwPOReHmrmHUAsq1AGi0+8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCXLH5tnWzxK0; Fri, 5 May 2023 13:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345DvBUv064554; Fri, 5 May 2023 13:57:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345Dv8E2064545; Fri, 5 May 2023 13:57:08 GMT (envelope-from git) Date: Fri, 5 May 2023 13:57:08 GMT Message-Id: <202305051357.345Dv8E2064545@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: dd744a896be3 - main - libpcap: Update to 1.10.4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd744a896be358d6f001766188da6aed80e00378 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=dd744a896be358d6f001766188da6aed80e00378 commit dd744a896be358d6f001766188da6aed80e00378 Merge: b10e100d1696 6b96668d5b49 Author: Joseph Mingrone AuthorDate: 2023-05-05 13:56:10 +0000 Commit: Joseph Mingrone CommitDate: 2023-05-05 13:56:10 +0000 libpcap: Update to 1.10.4 Changelog: https://git.tcpdump.org/libpcap/blob/104271ba4a14de6743e43bcf87536786d8fddea4:/CHANGES Reviewed by: emaste Obtained from: https://www.tcpdump.org/release/libpcap-1.10.4.tar.gz Sponsored by: The FreeBSD Foundation contrib/libpcap/CHANGES | 38 ++++++++++----- contrib/libpcap/Makefile.in | 4 +- contrib/libpcap/README.md | 2 +- contrib/libpcap/VERSION | 2 +- contrib/libpcap/aclocal.m4 | 13 +++-- contrib/libpcap/config.guess | 12 +++-- contrib/libpcap/config.sub | 33 +++++++++---- contrib/libpcap/configure | 64 ++++++++++++------------- contrib/libpcap/configure.ac | 26 +++++----- contrib/libpcap/gencode.c | 16 +++---- contrib/libpcap/mkdep | 2 +- contrib/libpcap/msdos/makefile | 8 ++-- contrib/libpcap/nametoaddr.c | 40 ++++++++-------- contrib/libpcap/optimize.c | 16 +++---- contrib/libpcap/pcap-bt-linux.c | 6 +-- contrib/libpcap/pcap-common.c | 4 +- contrib/libpcap/pcap-libdlpi.c | 2 +- contrib/libpcap/pcap-linux.c | 8 ++-- contrib/libpcap/pcap-netfilter-linux.c | 4 +- contrib/libpcap/pcap-npf.c | 6 +-- contrib/libpcap/pcap-sita.c | 2 +- contrib/libpcap/pcap-sita.html | 22 ++++----- contrib/libpcap/pcap-snf.c | 20 ++++---- contrib/libpcap/pcap-usb-linux.c | 14 +++--- contrib/libpcap/pcap/bpf.h | 6 +-- contrib/libpcap/pcap/dlt.h | 4 +- contrib/libpcap/pcap/pcap.h | 4 +- contrib/libpcap/rpcapd/Makefile.in | 2 +- contrib/libpcap/rpcapd/org.tcpdump.rpcapd.plist | 2 +- contrib/libpcap/rpcapd/rpcapd.manadmin.in | 42 +++++++++++++++- contrib/libpcap/sockutils.c | 2 +- contrib/libpcap/testprogs/Makefile.in | 2 +- 32 files changed, 252 insertions(+), 176 deletions(-) diff --cc contrib/libpcap/README.md index 46c33c24125e,000000000000..e38b9a15d6b3 mode 100644,000000..100644 --- a/contrib/libpcap/README.md +++ b/contrib/libpcap/README.md @@@ -1,76 -1,0 +1,76 @@@ +# LIBPCAP 1.x.y by [The Tcpdump Group](https://www.tcpdump.org) + +**To report a security issue please send an e-mail to security@tcpdump.org.** + +To report bugs and other problems, contribute patches, request a +feature, provide generic feedback etc please see the +[guidelines for contributing](CONTRIBUTING.md). + +The [documentation directory](doc/) has README files about specific +operating systems and options. + +Anonymous Git is available via: + + https://github.com/the-tcpdump-group/libpcap.git + +This directory contains source code for libpcap, a system-independent +interface for user-level packet capture. libpcap provides a portable +framework for low-level network monitoring. Applications include +network statistics collection, security monitoring, network debugging, +etc. Since almost every system vendor provides a different interface +for packet capture, and since we've developed several tools that +require this functionality, we've created this system-independent API +to ease in porting and to alleviate the need for several +system-dependent packet capture modules in each application. + +```text - formerly from Lawrence Berkeley National Laboratory ++formerly from Lawrence Berkeley National Laboratory + Network Research Group + ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z +``` + +### Support for particular platforms and BPF +For some platforms there are `README.{system}` files that discuss issues +with the OS's interface for packet capture on those platforms, such as +how to enable support for that interface in the OS, if it's not built in +by default. + +The libpcap interface supports a filtering mechanism based on the +architecture in the BSD packet filter. BPF is described in the 1993 +Winter Usenix paper ``The BSD Packet Filter: A New Architecture for +User-level Packet Capture'' +([compressed PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.Z), +[gzipped PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.gz), +[PDF](https://www.tcpdump.org/papers/bpf-usenix93.pdf)). + +Although most packet capture interfaces support in-kernel filtering, +libpcap utilizes in-kernel filtering only for the BPF interface. +On systems that don't have BPF, all packets are read into user-space +and the BPF filters are evaluated in the libpcap library, incurring +added overhead (especially, for selective filters). Ideally, libpcap +would translate BPF filters into a filter program that is compatible +with the underlying kernel subsystem, but this is not yet implemented. + +BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly +BSD, macOS, and Solaris 11; an older, modified and undocumented version +is standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the +packetfilter interface but has been extended to accept BPF filters +(which libpcap utilizes). + +Linux has a number of BPF based systems, and libpcap does not support +any of the eBPF mechanisms as yet, although it supports many of the +memory mapped receive mechanisms. +See the [Linux-specific README](doc/README.linux) for more information. + +### Note to Linux distributions and *BSD systems that include libpcap: + +There's now a rule to make a shared library, which should work on Linux +and *BSD, among other platforms. + +It sets the soname of the library to `libpcap.so.1`; this is what it +should be, **NOT** `libpcap.so.1.x` or `libpcap.so.1.x.y` or something such as +that. + +We've been maintaining binary compatibility between libpcap releases for +quite a while; there's no reason to tie a binary linked with libpcap to +a particular release of libpcap. From nobody Fri May 5 14:20:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCXs35PLyz49NpG; Fri, 5 May 2023 14:20: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 4QCXs34yHpz3mFj; Fri, 5 May 2023 14:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683296423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Im6pwkfixBrGqkmaFIYS+906cZhzsQU4xOBL9Cntn9U=; b=EQcj+YtmaOzUsgFUoxeVc4VBf3n7E8DV1El5PIry2SoHFobUElGzIwPJpV7O0hVznbCawv 0WX+obVtyWDyV2RaO67pBpCSMVh5OaEB2JUZxn5fLTZDrvxahHVAifY3/rJr0yHbf41LoJ XYKPO+Hm80O3cO35cOThB5xb1zKin/mZBLdbzenCOc2uCK8Ol8j7oWgvil2tioBJqhed4D u67jnjRy2rF2rNLtQLuUHMx0dH4jqfzmcO31rHAssl7mS54GN5kgHUHAiBgv/oKhJLND0a 26EcUPi08jaxTGN2k26tcMau36RhWi/mO4XrPfEVsxxaW5RoCbOQJ+Idda0ETA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683296423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Im6pwkfixBrGqkmaFIYS+906cZhzsQU4xOBL9Cntn9U=; b=jPTOy9ITBW5XW5NeJwvVLukxGO4aNoijmuySVhzohFKl13nE4+lu7z9vjvUcc56IfuQay4 +z8OyKpxP7ZLmVETlwaUy3a6mWI4WIDphksphEyaQCZ5YO4uPNhBTAHB/umRjB7d8CYcj5 fVwX4nCjRPxRR3/p28IC7nN/H5jmN9082O9GBZozRwtqAzfw21Vh0Oz1Al3f12SMqkAj/R 3wBH+W4WLFSiw7jaJplc5D+JKyRGU/31w6EP/GgikpkbneE6LqDzjoQVugosLQViaKaq5u rWD14pPabGObRQEi9f4ToXeY3reUikhEL8xshGjV1LT2PRWTAZrAF/GW1Nu+Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683296423; a=rsa-sha256; cv=none; b=dIpXkXQfvfajCQ7oSJt4mPdmpLu8Ixg/LpwmfUMR92n9js5DhJPciY6s98AGjtT5SehWzi 08LHGd+Fh70V7yvCtjcyKqscgXmFA+V2nk+sO+ZeitOQkym3VxNolKUWvRM2XA9674kzmT 0koVrJyWnzhtUrYCdS9zru/hRiL99dvkGZmRH9p/SCc86KVYk8UAMxU1obPV8pCg61ebrQ forY8LJSxdEDKHijB9k6go17jzWuWICt223epajQNBd4wdANlQVdqrms5hEpgzBRxqRYNd qNXmhLDERNhWRP5iJF9R/hYf7HOy4BmnLzG8e0rAh8PSSCRXqgWAlz/jp8PXrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCXs342S8zxnc; Fri, 5 May 2023 14:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345EKNFC006849; Fri, 5 May 2023 14:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345EKN03006848; Fri, 5 May 2023 14:20:23 GMT (envelope-from git) Date: Fri, 5 May 2023 14:20:23 GMT Message-Id: <202305051420.345EKN03006848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 448045e4a787 - main - share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 448045e4a7873f4733cebda56df002acabb2aef1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=448045e4a7873f4733cebda56df002acabb2aef1 commit 448045e4a7873f4733cebda56df002acabb2aef1 Author: Piotr Kubaj AuthorDate: 2023-05-05 14:19:19 +0000 Commit: Piotr Kubaj CommitDate: 2023-05-05 14:20:28 +0000 share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU MFC after: 3 days Approved by: jhibbits Differential revision: https://reviews.freebsd.org/D39240 --- share/mk/bsd.cpu.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index dbd58a385b23..ba18204b9230 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -276,6 +276,25 @@ MACHINE_CPU += amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "powerpc" . if ${CPUTYPE} == "e500" MACHINE_CPU = booke softfp +. elif ${CPUTYPE} == "g4" +MACHINE_CPU = altivec +. endif +. elif ${MACHINE_ARCH} == "powerpc64" +. if ${CPUTYPE} == "e5500" +MACHINE_CPU = booke +. elif ${CPUTYPE} == power7 +MACHINE_CPU = altivec vsx +. elif ${CPUTYPE} == power8 +MACHINE_CPU = altivec vsx vsx2 +. elif ${CPUTYPE} == power9 +MACHINE_CPU = altivec vsx vsx2 vsx3 +. else +MACHINE_CPU = altivec +. endif +. elif ${MACHINE_ARCH} == "powerpc64le" +MACHINE_CPU = altivec vsx vsx2 +. if ${CPUTYPE} == power9 +MACHINE_CPU += vsx3 . endif ########## riscv . elif ${MACHINE_CPUARCH} == "riscv" From nobody Fri May 5 14:44:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCYP10pL0z49QPC; Fri, 5 May 2023 14:44: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 4QCYP10GkYz3nf8; Fri, 5 May 2023 14:44:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683297877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DhMK3Gw0qZf+kxJ3UnW/za0qQ/f8W9c659c7q2tce8=; b=iR1dnG4KXQV4jAyTrc3cEF8nNYimjpmCKjN5doIrtAwpvCs0MwnBQOEGd8ow3XC3zUKj8P If4E/aneLXvIzxMoy8x4lpQyPcYcW+mOO9hRKDHFi/Md8p04IxuDNZARrfu+b5lfrleF/O BrK/YojYsklnVSqXDptuzUqU/OS71amvlxZmtUtOr/dwR43qOyrQeAsUsGckhFHMufAtQ1 4C70XbHYI3URMLROU49/LIhVUdIVmmeCyUj9oiR4k8FGK2upl39lLdxNe+x5ZNSDnC3TyJ KpBqzJ8/tTlsuLwobVYUQv66OPS92Ym9Rxusz9S6TQbml5OYB69cx+bD/o4Hew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683297877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DhMK3Gw0qZf+kxJ3UnW/za0qQ/f8W9c659c7q2tce8=; b=YWYmhaK4sh+tn7waUaJrhskH3CJP6SxMHLLH3GjgyfJAvB41kmjp0VGNVn/uhasekvRsgT WpZ6fAW0bfq2V/BZbYVJvOjJWu0dNHk/5mj6naVWM1M7QSbSRXM74+uIQi8A2IYzp5R8Ug eGtjxqlb/yH0BJhylDEJqYer4VrM1rw8iLZBnCbRYvkJsMArRGNg66HPuJboK43x1DYusm q/ln7kUszgdPqs4bQZ7W8cCn878yRBQO5V6nE7pXXZ7ShpIVJfSgLYjt8zLLCN45srOI/s AeZEld50IHq+vTP2RoRhLqYNQTREP6Rx+BbMe3iHKEAL5lp92cj+clzeDsHsFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683297877; a=rsa-sha256; cv=none; b=Du74t18xmhw/Gf4o4l1WNmGPCxYDPm3OEDtB0SPs0sPNJQU8Rc2MaeIZutZRKXgr+Znbjy T/V/iIn4Q+hN8wrFzI9uwDrELzXm+KXfiqFwVUJul86NvpIeoSukgu/T3uLrGETH7SFIzw l60l5SslUSf9/zuyANVOe4Fs4S+HlNKnVXeomIphDRbtnvKRAqUowandzODRSGAUIbLApU KHg40JpCAjUToV49bpdFuRcXPT49luipianiTX31PigAwXyyrx4Y1FB7J86DYJAXBaXqN7 /dTiSLlwP5KcQ61A3qbxVw/FkToUgYwlzNKl9HNdhW2NLKvKEpKCkuyuuRrewg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCYP06R2wzypg; Fri, 5 May 2023 14:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345EiakB046693; Fri, 5 May 2023 14:44:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345EiajE046692; Fri, 5 May 2023 14:44:36 GMT (envelope-from git) Date: Fri, 5 May 2023 14:44:36 GMT Message-Id: <202305051444.345EiajE046692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Koshy Subject: git: c2eae5c39adc - main - man9: Add a manual page for kstack_contains(9). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkoshy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2eae5c39adcad87b9c04aaeefa0bef74e5ccf32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jkoshy: URL: https://cgit.FreeBSD.org/src/commit/?id=c2eae5c39adcad87b9c04aaeefa0bef74e5ccf32 commit c2eae5c39adcad87b9c04aaeefa0bef74e5ccf32 Author: Joseph Koshy AuthorDate: 2023-05-02 09:37:38 +0000 Commit: Joseph Koshy CommitDate: 2023-05-05 14:42:59 +0000 man9: Add a manual page for kstack_contains(9). Approved by: gnn (mentor) Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D39933 --- share/man/man9/Makefile | 1 + share/man/man9/kstack_contains.9 | 62 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 84b2fbf5e34d..2a320cf0fcba 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -204,6 +204,7 @@ MAN= accept_filter.9 \ kobj.9 \ kproc.9 \ kqueue.9 \ + kstack_contains.9 \ kthread.9 \ ktr.9 \ lock.9 \ diff --git a/share/man/man9/kstack_contains.9 b/share/man/man9/kstack_contains.9 new file mode 100644 index 000000000000..52a6ba9e2ca6 --- /dev/null +++ b/share/man/man9/kstack_contains.9 @@ -0,0 +1,62 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Joseph Koshy +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd May 2, 2023 +.Dt KSTACK_CONTAINS 9 +.Os +.Sh NAME +.Nm kstack_contains +.Nd determine if an address range lies within the kernel stack for a thread +.Sh SYNOPSIS +.In machine/stack.h +.Ft bool +.Fn kstack_contains "struct thread *td" "vm_offset_t va" "size_t len" +.Sh DESCRIPTION +This function can be used to determine whether a given address range +falls within the kernel stack for the thread pointed to by +.Fa td . +.Sh RETURN VALUES +The function +.Fn kstack_contains +returns +.Dv true +if the range of addresses +.Bo +.Fa va Ns .. Ns ( +.Fa va Ns + Ns +.Fa len Ns - Ns 1 ) +.Bc +(both addresses inclusive) lies within the kernel stack for the thread +pointed to by argument +.Fa td , +or returns +.Dv false +otherwise. +.Sh ERRORS +This function does not return an error. +.Sh SEE ALSO +.Xr kproc 9 , +.Xr kthread 9 From nobody Fri May 5 15:00:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCYl367WBz49QWD; Fri, 5 May 2023 15:00:15 +0000 (UTC) (envelope-from kevans@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 4QCYl35jsTz3qjk; Fri, 5 May 2023 15:00:15 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683298815; 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=D0dpFP8H0QRsCvptg6bdBiLGIP7VK2b48IMm41OKCuU=; b=fMPVeMCA3rh6tDWqE8JN5E9N0TxtUprCuLe14rrc5oVCcvqloPncfHKecJ348iNpW2XP9H 4yZ4Owz23anIRXtxCFeokqyE0pozf+nftptJMWGEzAH0J6+IgD/IzOXAEJ6GI4puzTtt/J NZOa3OiQAjGAjfzLxMl/BQu+s3vaSkAxwcT/hATCOdqC+eBd4gBfcbHjaRCD5YkL9LfVq/ uY+jwN3MoFM4QrxuHvNYso4iGsfXpDaCnWrr/7sNVVn7Y5fbVXNEZjszcWixzUfhjDc8RR NVButj4K8GBedH7J0HpMyjBHtry7SINxh+WtNvZivD/rTvUh5FRqFGauVV8/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683298815; 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=D0dpFP8H0QRsCvptg6bdBiLGIP7VK2b48IMm41OKCuU=; b=repiJVCC4MdkpR5sWHV5B80PDO7aZqM8VXt8PC3LVA9tWjdqw5nzBk5Xn3y9q+eYNPPA3Y GXIMwXId1PDsIpY2m5Bx9tf45mmdy3zZ0Gsno5D6TtlSpeFFJU6ySBd+aNjnU/4tHUCDz1 JQQPhhRXxukM6AG60ATjiXfWPXLOFlShyUq2/kDhaR0pIJiAuV3+dHZ93fhX+vucADN5Zu tx4pS94Is6tZHiB1isaL1EP/c76ZzL6N8Gjvn2PzWn0va8+SeWs9pFbeWtNTq2z94rUQhc zzKH2sNI3ZOrTS8hmW2eKsYu8oGx33rUZqfbwJM9R/gZanLoH+xNqs6uk+nIxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683298815; a=rsa-sha256; cv=none; b=ZrQNQC1urPL405/2c5HcppvrOx3l7HRa1bHSx0vlpDwHXVBuIzS+btzaxIWUdiyjpeRXD9 BZP7lYNp9iw71BYOkGfzvHw+R2J+U2VsRvxzcg0XYJqwE9BNUx9fqxHrFCBFjLylTTwOy/ RVFxjMzjxqYsKQl+0qGJfaAdQt/B4UZ/m4+uoJNWtPN4CuDnQA9PbY+AckTti5m2IXK41n 3sfT7JgR1Gb377UvSShOT65w3iKYxQcxS5f9qZ6TapTAjLinLmP1xlJPUcNGGnavlKzQAI Y/To37hp4qhoAhhgID1QMzMhn1e4DEz7rXZQKXMhkGEnegJ6NYh2vVktCaXKAA== Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QCYl34k8pzRrx; Fri, 5 May 2023 15:00:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-74fbf99adc2so84520385a.3; Fri, 05 May 2023 08:00:15 -0700 (PDT) X-Gm-Message-State: AC+VfDwsSQbwXCWRl2aGIE+4p4LQacWuP6VWnV6I3cV+geRWHbvnhD4N GZZtJpH8IOFC6jJy+vc99dpKPeRyJhdxz2ZJ6AE= X-Google-Smtp-Source: ACHHUZ44ZrmQx6+OREmzGa6fY3O5x18R7wtfDycdhrsfmYvx/p4lZEYjXZyk4ZNkDbVZACIEq0HRsKbePIhP9wQwevA= X-Received: by 2002:a05:6214:c47:b0:5ce:7b40:89bd with SMTP id r7-20020a0562140c4700b005ce7b4089bdmr2050815qvj.18.1683298815234; Fri, 05 May 2023 08:00:15 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> In-Reply-To: <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> From: Kyle Evans Date: Fri, 5 May 2023 10:00:04 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 8935a3993219 - main - daemon: use kqueue for all events To: Emmanuel Vadot Cc: ihor@antonovs.family, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Fri, May 5, 2023 at 3:59=E2=80=AFAM Emmanuel Vadot wrote: > > > Hello, > > On Fri, 14 Apr 2023 05:13:54 GMT > Kyle Evans wrote: > > > The branch main has been updated by kevans: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8935a3993219be76c7ea03e9= ad4509657d08af6c > > > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c > > Author: Ihor Antonov > > AuthorDate: 2023-04-14 05:10:29 +0000 > > Commit: Kyle Evans > > CommitDate: 2023-04-14 05:12:21 +0000 > > > > daemon: use kqueue for all events > > > > Refactor daemon to use kqueue/kevent instead of signals. > > > > This changes allows to simplify the code in several ways: > > - the execution flow is now linear, no async events. > > - several variables became redundant and got removed. > > - all event handling is now concentrated inside of the event loop, = which > > makes code reading and comprehension easier. > > - new kqueuex(2) call is used for CLOEXEC, but maintained closing t= he > > kq fd prior to execve() to ease later MFC > > > > No UX/API changes are intended. > > > > Reviewed by: kevans > > Pull Request: https://github.com/freebsd/freebsd-src/pull/701 > > This break sysutils/seatd when we resume and leaves the console is a > really sad state (impossible to use, keystroke don't match). > Don't really know how to properly debug but : > > 1/ Reverting the commit make seatd not exiting on resume (and so sway > doesn't exit). > 2/ If I start seatd without daemon it works > 3/ If I manually start saetd with daemon in tmux with > "daemon -s debug -T seatd -p /var/run/seatd.pid /usr/local/bin/seatd > -g video" (so same thing as the rc script) I see > "daemon: kevent wait: Interrupted system call" printed when I get back > network. > > Feel free to ask me any test you want to debug further ;) > Can you check if this is sufficient? https://people.freebsd.org/~kevans/daemon-kq.diff We shouldn't bail out if were simply interrupted, presumably we just want to resume waiting for an event. Thanks, Kyle Evans From nobody Fri May 5 15:07:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCYw06p0sz49RRY; Fri, 5 May 2023 15:08:00 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher 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 "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCYw01yHGz3s1j; Fri, 5 May 2023 15:08:00 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1683299276; 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=pKq8ij9JHz2/og2f3TciNCZePfyX5mb2+jCLzq6mKqE=; b=q1iVly2QlNeac67kGHydiUsAghmX7weQuktOdBaxwOdDsl2OEk5+5t0KBINsaIhGXwhiKI BB1o7V4J6v+rfV7sWaE4UvkHm23at94XMMtkTFcyGZJtnld/wcdJWk/FjbrLyOhJNNED46 1Xx1c6hEY1Hj52gV0MZNCvSW9BK1LuU= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id dba7125c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 5 May 2023 15:07:55 +0000 (UTC) Date: Fri, 5 May 2023 17:07:54 +0200 From: Emmanuel Vadot To: Kyle Evans Cc: ihor@antonovs.family, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8935a3993219 - main - daemon: use kqueue for all events Message-Id: <20230505170754.01f9e99fbc90e7afede80ae9@bidouilliste.com> In-Reply-To: References: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QCYw01yHGz3s1j X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, 5 May 2023 10:00:04 -0500 Kyle Evans wrote: > On Fri, May 5, 2023 at 3:59?AM Emmanuel Vadot wro= te: > > > > > > Hello, > > > > On Fri, 14 Apr 2023 05:13:54 GMT > > Kyle Evans wrote: > > > > > The branch main has been updated by kevans: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8935a3993219be76c7ea03= e9ad4509657d08af6c > > > > > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c > > > Author: Ihor Antonov > > > AuthorDate: 2023-04-14 05:10:29 +0000 > > > Commit: Kyle Evans > > > CommitDate: 2023-04-14 05:12:21 +0000 > > > > > > daemon: use kqueue for all events > > > > > > Refactor daemon to use kqueue/kevent instead of signals. > > > > > > This changes allows to simplify the code in several ways: > > > - the execution flow is now linear, no async events. > > > - several variables became redundant and got removed. > > > - all event handling is now concentrated inside of the event loop= , which > > > makes code reading and comprehension easier. > > > - new kqueuex(2) call is used for CLOEXEC, but maintained closing= the > > > kq fd prior to execve() to ease later MFC > > > > > > No UX/API changes are intended. > > > > > > Reviewed by: kevans > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/701 > > > > This break sysutils/seatd when we resume and leaves the console is a > > really sad state (impossible to use, keystroke don't match). > > Don't really know how to properly debug but : > > > > 1/ Reverting the commit make seatd not exiting on resume (and so sway > > doesn't exit). > > 2/ If I start seatd without daemon it works > > 3/ If I manually start saetd with daemon in tmux with > > "daemon -s debug -T seatd -p /var/run/seatd.pid /usr/local/bin/seatd > > -g video" (so same thing as the rc script) I see > > "daemon: kevent wait: Interrupted system call" printed when I get back > > network. > > > > Feel free to ask me any test you want to debug further ;) > > >=20 > Can you check if this is sufficient? > https://people.freebsd.org/~kevans/daemon-kq.diff >=20 > We shouldn't bail out if were simply interrupted, presumably we just > want to resume waiting for an event. >=20 > Thanks, >=20 > Kyle Evans Seems to work fine, thanks ! --=20 Emmanuel Vadot From nobody Fri May 5 15:29:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCZNL31t8z49SXD; Fri, 5 May 2023 15:29: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 4QCZNL2GScz3wBt; Fri, 5 May 2023 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683300546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkYXblIXfHPEj4f9jG6dDtEKtLvrFeW2YqDXVxGE33o=; b=p4HNHL5LOdnt82Hipn53Mk0bf9ED3qVfoPUBNU4GvXGchAafeeVdU/96Kz0zhNMjhSFxD6 FjnEls47wOrcguz8yN75MTpt7cfsHE8/5zATt1H/jV0xuan3vIQUy6mPXwGWQypbq150Cr XjbYbtV2CXquwJR/JjN37TqEvrT+b1bWnc50Mq0g1sjTUOp+c4IvCdgJhFJWJzbbTIlS92 z6yhiiCeRHXUPqT77rdpiE3k7tspOKvIbsTYVf29qxRfoAQB4DpY+ldztzjsQwFL4+cFOZ aJKcGjcnwS1RloXsRaV5wIZTSnbLktwGK18F4X40CVLk4EaJBDlWH+R8sNcMyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683300546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkYXblIXfHPEj4f9jG6dDtEKtLvrFeW2YqDXVxGE33o=; b=ya3dY9rEqjZe+HKS7rIwMgPdtzAU96X2feZ+drjbDZ0boyWXFVA3umkkhNvfqH17gdYw8z ObWU9TCu9Bbs1f1pXaDuSIAc0IWhRQ7Ou3mQR8pMVtPdFc+T/ONGvCRJ0zxoP5IixPL7pO b2TUNBVMGypxdqBayb4Z6O95yYCjlNEgZAa8bMfzJK3upvCIM+fyxeJ0EqiOd9KZjWJUBv 6q0wvh/IiTCpPr+ZqZymivIibWAo71GXF6gI57BrUoKlzEYM+BDffHCNB/oWkCw6f7Nt96 1oKSDSDSufg64Pe8fBMGeFKwqV8HLEzj7aOjGwdwh6IXrNg8QwMTP1gsh5nHfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683300546; a=rsa-sha256; cv=none; b=pqiJvQBPPItZpav9TkLBHWiquiitI/FJ1nBx7a2QNrNoHaweWCXpA5g6fipZ0xbUQxNirY SK+mdG7CaCdxn9mOtFWHc45Dwa82NZljo6yRFBNKVOz2IvFHjS+1+b8lmWfREalrm+m/wB LK7ySmfOxnYhKdDMDzXVUju/0JqpPIvEKU8OdioLBNDO1Zd0PMaGdon82Jt05EdnFgPqoX 9iN80BY8+myne0rdsNLon2PUHwhqQOLZpTyOIj9IrxcwOHNsFb9XDfFMlyvrRIa9JPuwqJ W/gX5KaU5liJ+MPsh31RhWvRJAfHxtJLvW7T6XxGd3xluVDn+w2BCZWNLo8nRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCZNL1FXWz10j5; Fri, 5 May 2023 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345FT6we013277; Fri, 5 May 2023 15:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345FT6IR013276; Fri, 5 May 2023 15:29:06 GMT (envelope-from git) Date: Fri, 5 May 2023 15:29:06 GMT Message-Id: <202305051529.345FT6IR013276@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: 494e7dfdbe6e - main - daemon: EINTR from kevent(2) is not a fatal 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 494e7dfdbe6ecfe572228ed39f5c794954da068c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=494e7dfdbe6ecfe572228ed39f5c794954da068c commit 494e7dfdbe6ecfe572228ed39f5c794954da068c Author: Kyle Evans AuthorDate: 2023-05-05 15:12:13 +0000 Commit: Kyle Evans CommitDate: 2023-05-05 15:28:40 +0000 daemon: EINTR from kevent(2) is not a fatal error Simply resume waiting for events rather than exiting if we took a signal here. This at least fixes running programs under daemon(8) in the face of suspend/resume, which I suspect hits us with a spurious EINTR rather than a signal anyways. Reported and tested by: manu Fixes: 8935a3993219b ("daemon: use kqueue for all events") --- usr.sbin/daemon/daemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 89adde8d5e83..92e640271d10 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -427,6 +427,8 @@ daemon_eventloop(struct daemon_state *state) ret = kevent(kq, NULL, 0, &event, 1, NULL); switch (ret) { case -1: + if (errno == EINTR) + continue; err(EXIT_FAILURE, "kevent wait"); case 0: continue; From nobody Fri May 5 16:20:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCbW928cjz49WQ7; Fri, 5 May 2023 16:20: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 4QCbW91RJ6z48b4; Fri, 5 May 2023 16:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ce5taeLs1YGMscnKltQYawjzrddIRCO5CiWNBjF00ck=; b=ws6IyJ5mQR2aUg87YalijZoRjlSs8VAtRWgx3MQiHObYEsDgpZcxe7NTRnYN/vsskz7blE n+GKnYM90lYCCHqAr7bw1Sr2ZBVVUptVm96An0VL2wU/BFmeJPQQmp7yi0PFRlUblwT6xf Ep2yP6He2f42xBWegRa+gXWnwke/DinItdMjzZgA/RFD5TQ7tejPo5pdaRWkBLVDttD9Q4 II6eK/y5J/dWZ6mwI4qBlxUysdg1ffjX7NgPVwi6UwVma4/AURoxk8tU/SPe8sMN2Gb5lI YhuiHg8gAFLI7fkoW5wZBaoCopuYr3AE+NN+pY0nSxyBLxOC7+9kCSSJluP9LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ce5taeLs1YGMscnKltQYawjzrddIRCO5CiWNBjF00ck=; b=FF/bbzlMb7Dfwls5b5DyqpodN1l01zfVnGsyzOzk0ZBUu/o0NJAr8hZZUnG4TMXXKdjRmW d8EBKUMdbdwTEmqFtizf48rE5dU/49Qx6+VTieHHfUaPzH/t0BdtHzsoZoYLcdGiu2BnmK SJz4eysweh0FHL8sAcItwesNOMCUX48Ig2G1DTSFIzBEd+z73u15oP47XamJt72C5nhlQt NS/eKYKCerS6LgzlVR1+DQmypdU5t67rU/mRjI9LDpUizCwZoJwZ3OExWR2hY+f0WENJFH T+6vnKGaI7JO+2D01geHVSdsPwXKgD7F2OFOftwdqZNtq8Xh2CrRwm7ycZqIYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683303605; a=rsa-sha256; cv=none; b=X7HkfaRDgs5/tR7ajeOkdI5X4EV9YPSU3mNlThOQLuVNvjiJjDGaVBRt+b9hsmBguBLX+y +ENdq5BpRWCG1yZhwR6MUcnHI1JDgwCmcoJlhycdut6EJNTnWQNfaBw/oKwLqyJjW3YeU5 k0Jj4jFSyZrMbhYe+CfDkjAC2605eB3SPsbX7DmweNwfcw/CBDnmtSyu8NVTd7kkvYkumg BKq6Ko6UQ514LSQhVWEdD09bNgH4XMDKYmV7nHu+MzCkXEy1lDz2Ed1BeAnFrg4G4gw6/N ZitrNmjyKBWUu+rEFDYvwyolSfqvcDfHlwlhZm/pVUokDgNZDPkJYaKT2ErCGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCbW90Nvjz11RL; Fri, 5 May 2023 16:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345GK4BD098962; Fri, 5 May 2023 16:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345GK4eD098958; Fri, 5 May 2023 16:20:04 GMT (envelope-from git) Date: Fri, 5 May 2023 16:20:04 GMT Message-Id: <202305051620.345GK4eD098958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 2df58f190731 - main - Apply libc++ fix for compiling with gcc 13 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2df58f190731634be67e90b7c453dee587b4ea27 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2df58f190731634be67e90b7c453dee587b4ea27 commit 2df58f190731634be67e90b7c453dee587b4ea27 Author: Dimitry Andric AuthorDate: 2023-05-05 16:19:40 +0000 Commit: Dimitry Andric CommitDate: 2023-05-05 16:19:40 +0000 Apply libc++ fix for compiling with gcc 13 Merge commit 484e64f7e7b2 from llvm-project (by Roland McGrath): [libc++] Use __is_convertible built-in when available https://github.com/llvm/llvm-project/issues/62396 reports that GCC 13 barfs on parsing because of the declarations of `struct __is_convertible`. In GCC 13, `__is_convertible` is a built-in, but `__is_convertible_to` is not. Clang has both, so using either should be fine. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D149313 Reported by: Mark Millard MFC after: 3 days --- .../llvm-project/libcxx/include/__type_traits/is_convertible.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h index 7e49cd4e6a31..7ce3c38b76de 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h @@ -24,11 +24,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) +#if __has_builtin(__is_convertible) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) + +template +struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant {}; + +#elif __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) template struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant {}; +// TODO: Remove this fallback when GCC < 13 support is no longer required. +// GCC 13 has the __is_convertible built-in. #else // __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) namespace __is_convertible_imp From nobody Fri May 5 16:20:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCbX667xFz49W6f; Fri, 5 May 2023 16:20: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 4QCbX65vl8z49VD; Fri, 5 May 2023 16:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqAUdwc+E9QKeSeWL/XKv73ZssKilMuKxJqY611O9YU=; b=s02hDinVy2njtFipET7qfGvZtxWcpzVsU1XJshvS4sm1LyBJ2IJ0M1Wx/smzeDpXmd28Ay eqRV2jKa2AB0wGmvOh1Ryynl3Fcmj8SnKVgoXx3GG8DNxOxD+47i0VgiHZTHt2CMP580Ec 1nKOghGfAtdS1ZkNa4QeZlRpGFRAqF6A0gPSq8g9i397L/M/tnbj5LhZVHhbnQMzvOhAM5 DNxDg4uE1j3wWelDXP1JdQNdnNBiGiK04xMmnARkm11RJ390WKJ3cFkkku04LgUkLY2ttT xRx41o5dS4MfX2is5OYOXkgkDKWPnhBG2uGu3RMVpyACafF+EJgmAuzG1CiKvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqAUdwc+E9QKeSeWL/XKv73ZssKilMuKxJqY611O9YU=; b=P2mX19dAf8d5UDbtQtzHsYnS0um2rLr4lRDCEUgf1eNYKPyenH0XMlIMu2ZSVDYH41CHoq V2GRo1D7wj2PhIVqzeswGt+K14zARDtCVbWFMQ6a67oCvvxuDQU7pRbHiOV+djEeQBrU0+ RvT9zClq/+y1axjpeOVn9r05ujGhy9wJZBDXw+rv9C+vxvbQQ2VzpgPz2QnUJ1MO1CetDS /e+y1RHexESuy2/pY6NeZc/hXdjnCAjqW/XWeVF0V7YFzCyvKjKg26L6Dx9T0OnWDGBFo8 SS/+cptokxNQg8JN/SyR4Ce4Mt+XHBr4do3xbi+QN/mtDE2N6gq5SzAeDf7AzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683303654; a=rsa-sha256; cv=none; b=dcg3gHg024YiqAa1emWeyVx4bXDnTGYStFuVTCP+lnieNCBBMXn0Cu03w2KOsLdDxAT8SW /TF8ECBnE+EWxZNGnL81Y27LdeMg9OCukG4TrHopl3LKV/8cGzoiUEId8+T1+uhvwdQDoo 9iHHp91oDuaVOevTZj3G0zI54tP216X1g7UF+8khx3emPzH8wsvwNA5Y0gm+Yvj60jslwa 1azZdMBbQ5zCyZ207XU2+zbVtGznmSxt17GtPqB7h7nmC3o5XbAY9hfS6u5gZNXaep8uON Z5YDNCdsO9AU/QgY3Qsf1lQUfIfw8aYBEs9FAKbgAsEFuS8sZt3SHd5+0VMKsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCbX6511Bz11TN; Fri, 5 May 2023 16:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345GKs3p005253; Fri, 5 May 2023 16:20:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345GKsNh005252; Fri, 5 May 2023 16:20:54 GMT (envelope-from git) Date: Fri, 5 May 2023 16:20:54 GMT Message-Id: <202305051620.345GKsNh005252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Ambrisko Subject: git: 7e0f8b79b773 - main - Add mrsasutil(8) as alias to mfiutil(8) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ambrisko X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e0f8b79b773276712234421f140c8c6ebc0f780 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ambrisko: URL: https://cgit.FreeBSD.org/src/commit/?id=7e0f8b79b773276712234421f140c8c6ebc0f780 commit 7e0f8b79b773276712234421f140c8c6ebc0f780 Author: Doug Ambrisko AuthorDate: 2022-08-24 22:38:43 +0000 Commit: Doug Ambrisko CommitDate: 2023-05-05 16:20:48 +0000 Add mrsasutil(8) as alias to mfiutil(8) mfiutil(8) in theory can work on devices attached to mrsas(4) but mrsas(4) is missing the FreeBSD mfi(4) ioctl support. Once that support is added to mrsas(4) then mrsasutil(8) can manage mrsas(4) attached devices. So this commit depends on that. When mrsasutil(8) is run it automatically opens /dev/mrsas0 instead of /dev/mfi0. Add -D and -t flag to optionally specify mrsas or mfi to work with the existing -u . Device is the device node with or without /dev/ PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265794 Differential Revision: https://reviews.freebsd.org/D36343 Tested by: Dan Mahoney Reviewed by: jhb --- usr.sbin/mfiutil/Makefile | 2 + usr.sbin/mfiutil/mfi_bbu.c | 4 +- usr.sbin/mfiutil/mfi_cmd.c | 29 +++++++---- usr.sbin/mfiutil/mfi_config.c | 91 ++++++++++++++++----------------- usr.sbin/mfiutil/mfi_drive.c | 14 ++--- usr.sbin/mfiutil/mfi_evt.c | 10 ++-- usr.sbin/mfiutil/mfi_flash.c | 4 +- usr.sbin/mfiutil/mfi_foreign.c | 58 ++++++++++----------- usr.sbin/mfiutil/mfi_patrol.c | 8 +-- usr.sbin/mfiutil/mfi_properties.c | 12 ++--- usr.sbin/mfiutil/mfi_show.c | 37 +++++++------- usr.sbin/mfiutil/mfi_volume.c | 10 ++-- usr.sbin/mfiutil/mfiutil.8 | 104 ++++++++++++++++++++++++++++++++++++-- usr.sbin/mfiutil/mfiutil.c | 43 ++++++++++++++-- usr.sbin/mfiutil/mfiutil.h | 11 ++-- 15 files changed, 294 insertions(+), 143 deletions(-) diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index dc6f3e481593..139e31d6c41d 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -1,10 +1,12 @@ # $FreeBSD$ PROG= mfiutil +LINKS= ${BINDIR}/mfiutil ${BINDIR}/mrsasutil SRCS= mfiutil.c mfi_bbu.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c \ mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c mfi_foreign.c \ mfi_properties.c MAN8= mfiutil.8 +MLINKS= mfiutil.8 mrsasutil.8 CFLAGS.gcc+= -fno-builtin-strftime diff --git a/usr.sbin/mfiutil/mfi_bbu.c b/usr.sbin/mfiutil/mfi_bbu.c index 343d101661da..6c1a76aeacc3 100644 --- a/usr.sbin/mfiutil/mfi_bbu.c +++ b/usr.sbin/mfiutil/mfi_bbu.c @@ -134,7 +134,7 @@ start_bbu_learn(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -171,7 +171,7 @@ update_bbu_props(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_cmd.c b/usr.sbin/mfiutil/mfi_cmd.c index 094c9017348b..d0df65ecb937 100644 --- a/usr.sbin/mfiutil/mfi_cmd.c +++ b/usr.sbin/mfiutil/mfi_cmd.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "mfiutil.h" #include @@ -209,15 +210,23 @@ mfi_volume_busy(int fd, uint8_t target_id) * configuration of the mfi controller. */ int -mfi_reconfig_supported(void) +mfi_reconfig_supported(const char *dev) { char mibname[64]; + const char *cp; size_t len; - int dummy; + int dummy, mfi_unit; + + cp = dev + strlen(_PATH_DEV); + if (strncmp(cp, MRSAS_TYPE, strlen(MRSAS_TYPE)) == 0) + return (1); + + cp += strlen(MFI_TYPE); + mfi_unit = strtol(cp, NULL, 10);; len = sizeof(dummy); - snprintf(mibname, sizeof(mibname), "dev.mfi.%d.delete_busy_volumes", - mfi_unit); + snprintf(mibname, sizeof(mibname), + "dev.mfi.%d.delete_busy_volumes", mfi_unit); return (sysctlbyname(mibname, &dummy, &len, NULL, 0) == 0); } @@ -239,7 +248,7 @@ mfi_lookup_volume(int fd, const char *name, uint8_t *target_id) if (mfi_dcmd_command(fd, MFI_DCMD_LD_GET_LIST, &list, sizeof(list), NULL, 0, NULL) < 0) - return (-1); + return (-1); for (i = 0; i < list.ld_count; i++) { if (mfi_query_disk(fd, list.ld_list[i].ld.v.target_id, @@ -304,12 +313,14 @@ mfi_ctrl_get_info(int fd, struct mfi_ctrl_info *info, uint8_t *statusp) } int -mfi_open(int unit, int acs) +mfi_open(char *dev, int acs) { - char path[MAXPATHLEN]; + int ret; - snprintf(path, sizeof(path), "/dev/mfi%d", unit); - return (open(path, acs)); + ret = open(dev, acs); + if (ret < 0) + warn("Couldn't open %s", dev); + return (ret); } static void diff --git a/usr.sbin/mfiutil/mfi_config.c b/usr.sbin/mfiutil/mfi_config.c index 0ee78fca0613..e2afbe52e0c3 100644 --- a/usr.sbin/mfiutil/mfi_config.c +++ b/usr.sbin/mfiutil/mfi_config.c @@ -35,6 +35,7 @@ #ifdef DEBUG #include #endif +#include #include #include #include @@ -52,30 +53,30 @@ static int remove_spare(int ac, char **av); static long dehumanize(const char *value) { - char *vtp; - long iv; - - if (value == NULL) - return (0); - iv = strtoq(value, &vtp, 0); - if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { - return (0); - } - switch (vtp[0]) { - case 't': case 'T': - iv *= 1024; - case 'g': case 'G': - iv *= 1024; - case 'm': case 'M': - iv *= 1024; - case 'k': case 'K': - iv *= 1024; - case '\0': - break; - default: - return (0); - } - return (iv); + char *vtp; + long iv; + + if (value == NULL) + return (0); + iv = strtoq(value, &vtp, 0); + if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { + return (0); + } + switch (vtp[0]) { + case 't': case 'T': + iv *= 1024; + case 'g': case 'G': + iv *= 1024; + case 'm': case 'M': + iv *= 1024; + case 'k': case 'K': + iv *= 1024; + case '\0': + break; + default: + return (0); + } + return (iv); } int @@ -162,16 +163,16 @@ clear_config(int ac __unused, char **av __unused) int ch, error, fd; u_int i; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); return (error); } - if (!mfi_reconfig_supported()) { - warnx("The current mfi(4) driver does not support " - "configuration changes."); + if (!mfi_reconfig_supported(mfi_device)) { + warnx("The current %s driver does not support " + "configuration changes.", mfi_device); close(fd); return (EOPNOTSUPP); } @@ -193,8 +194,8 @@ clear_config(int ac __unused, char **av __unused) } printf( - "Are you sure you wish to clear the configuration on mfi%u? [y/N] ", - mfi_unit); + "Are you sure you wish to clear the configuration on %s? [y/N] ", + mfi_device); ch = getchar(); if (ch != 'y' && ch != 'Y') { printf("\nAborting\n"); @@ -209,7 +210,7 @@ clear_config(int ac __unused, char **av __unused) return (error); } - printf("mfi%d: Configuration cleared\n", mfi_unit); + printf("%s: Configuration cleared\n", mfi_device); close(fd); return (0); @@ -587,16 +588,16 @@ create_volume(int ac, char **av) narrays = 0; error = 0; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); return (error); } - if (!mfi_reconfig_supported()) { - warnx("The current mfi(4) driver does not support " - "configuration changes."); + if (!mfi_reconfig_supported(mfi_device)) { + warnx("The current %s(4) driver does not support " + "configuration changes.", mfi_device); error = EOPNOTSUPP; goto error; } @@ -869,16 +870,16 @@ delete_volume(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); return (error); } - if (!mfi_reconfig_supported()) { - warnx("The current mfi(4) driver does not support " - "configuration changes."); + if (!mfi_reconfig_supported(mfi_device)) { + warnx("The current %s(4) driver does not support " + "configuration changes.", mfi_device); close(fd); return (EOPNOTSUPP); } @@ -937,7 +938,7 @@ add_spare(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -1027,7 +1028,7 @@ add_spare(int ac, char **av) ar->array_ref); error = EINVAL; goto error; - } + } spare->array_ref[i] = ar->array_ref; } } @@ -1062,7 +1063,7 @@ remove_spare(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -1120,7 +1121,7 @@ dump_config(int fd, struct mfi_config_data *config, const char *msg_prefix) msg_prefix = "Configuration (Debug)"; printf( - "mfi%d %s: %d arrays, %d volumes, %d spares\n", mfi_unit, + "%s %s: %d arrays, %d volumes, %d spares\n", mfi_device, msg_prefix, config->array_count, config->log_drv_count, config->spares_count); printf(" array size: %u\n", config->array_size); @@ -1211,7 +1212,7 @@ debug_config(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -1248,7 +1249,7 @@ dump(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index 4fd8fb93dd4c..17231af13fb0 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -74,7 +74,7 @@ mfi_drive_name(struct mfi_pd_info *pinfo, uint16_t device_id, uint32_t def) else snprintf(buf, sizeof(buf), "%2u", device_id); - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { warn("mfi_open"); return (buf); @@ -388,7 +388,7 @@ drive_set_state(char *drive, uint16_t new_state) uint8_t mbox[6]; int error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -503,7 +503,7 @@ start_rebuild(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -560,7 +560,7 @@ abort_rebuild(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -616,7 +616,7 @@ drive_progress(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -682,7 +682,7 @@ drive_clear(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -742,7 +742,7 @@ drive_locate(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_evt.c b/usr.sbin/mfiutil/mfi_evt.c index 915fbb7125bf..68b78ea6bfa9 100644 --- a/usr.sbin/mfiutil/mfi_evt.c +++ b/usr.sbin/mfiutil/mfi_evt.c @@ -77,7 +77,7 @@ show_logstate(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -91,13 +91,13 @@ show_logstate(int ac, char **av __unused) return (error); } - printf("mfi%d Event Log Sequence Numbers:\n", mfi_unit); + printf("%s Event Log Sequence Numbers:\n", mfi_device); printf(" Newest Seq #: %u\n", info.newest_seq_num); printf(" Oldest Seq #: %u\n", info.oldest_seq_num); printf(" Clear Seq #: %u\n", info.clear_seq_num); printf("Shutdown Seq #: %u\n", info.shutdown_seq_num); printf(" Boot Seq #: %u\n", info.boot_seq_num); - + close(fd); return (0); @@ -547,7 +547,7 @@ show_events(int ac, char **av) int ch, error, fd, num_events, verbose; u_int i; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -691,7 +691,7 @@ show_events(int ac, char **av) * need to know the size of the buffer somehow. */ seq = list->event[list->count - 1].seq + 1; - + } finish: if (first) diff --git a/usr.sbin/mfiutil/mfi_flash.c b/usr.sbin/mfiutil/mfi_flash.c index 239390acf7b5..fe2ccbd3d80f 100644 --- a/usr.sbin/mfiutil/mfi_flash.c +++ b/usr.sbin/mfiutil/mfi_flash.c @@ -58,7 +58,7 @@ display_pending_firmware(int fd) return (error); } - printf("mfi%d Pending Firmware Images:\n", mfi_unit); + printf("%s Pending Firmware Images:\n", mfi_device); strcpy(header.name, "Name"); strcpy(header.version, "Version"); strcpy(header.build_date, "Date"); @@ -122,7 +122,7 @@ flash_adapter(int ac, char **av) goto error; } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_foreign.c b/usr.sbin/mfiutil/mfi_foreign.c index ce4b8a704bea..f2662cb9de7a 100644 --- a/usr.sbin/mfiutil/mfi_foreign.c +++ b/usr.sbin/mfiutil/mfi_foreign.c @@ -48,7 +48,7 @@ foreign_clear(__unused int ac, __unused char **av) { int ch, error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -57,7 +57,7 @@ foreign_clear(__unused int ac, __unused char **av) printf( "Are you sure you wish to clear ALL foreign configurations" - " on mfi%u? [y/N] ", mfi_unit); + " on %s? [y/N] ", mfi_device); ch = getchar(); if (ch != 'y' && ch != 'Y') { @@ -74,7 +74,7 @@ foreign_clear(__unused int ac, __unused char **av) return (error); } - printf("mfi%d: Foreign configuration cleared\n", mfi_unit); + printf("%s: Foreign configuration cleared\n", mfi_device); close(fd); return (0); } @@ -86,7 +86,7 @@ foreign_scan(__unused int ac, __unused char **av) struct mfi_foreign_scan_info info; int error, fd; - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -101,7 +101,7 @@ foreign_scan(__unused int ac, __unused char **av) return (error); } - printf("mfi%d: Found %d foreign configurations\n", mfi_unit, + printf("%s: Found %d foreign configurations\n", mfi_device, info.count); close(fd); return (0); @@ -143,7 +143,7 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) ld_list = (char *)(config->array); - printf("%s: %d arrays, %d volumes, %d spares\n", prefix, + printf("%s: %d arrays, %d volumes, %d spares\n", prefix, config->array_count, config->log_drv_count, config->spares_count); @@ -152,28 +152,28 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) ld_list += config->array_size; for (i = 0; i < config->log_drv_count; i++) { - const char *level; - char size[6], stripe[5]; + const char *level; + char size[6], stripe[5]; struct mfi_ld_config *ld; ld = (struct mfi_ld_config *)ld_list; - format_stripe(stripe, sizeof(stripe), - ld->params.stripe_size); + format_stripe(stripe, sizeof(stripe), + ld->params.stripe_size); /* * foreign configs don't seem to have a secondary raid level * but, we can use span depth here as if a LD spans multiple * arrays of disks (2 raid 1 sets for example), we will have an * indication based on the spam depth. swb - */ - level = mfi_raid_level(ld->params.primary_raid_level, - (ld->params.span_depth - 1)); + */ + level = mfi_raid_level(ld->params.primary_raid_level, + (ld->params.span_depth - 1)); - humanize_number(size, sizeof(size), ld->span[0].num_blocks * 512, - "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + humanize_number(size, sizeof(size), ld->span[0].num_blocks * 512, + "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); printf(" ID%d ", i); - printf("(%6s) %-8s |", + printf("(%6s) %-8s |", size, level); printf("volume spans %d %s\n", ld->params.span_depth, (ld->params.span_depth > 1) ? "arrays" : "array"); @@ -183,9 +183,9 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) uint16_t device_id; printf(" array %u @ ", ld->span[j].array_ref); - humanize_number(size, sizeof(size), ld->span[j].num_blocks * 512, - "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - + humanize_number(size, sizeof(size), ld->span[j].num_blocks * 512, + "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + printf("(%6s)\n",size); ar_list = (char *)config->array + (ld->span[j].array_ref * config->array_size); @@ -196,7 +196,7 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) printf(" drive MISSING\n"); else { printf(" drive %u %s\n", device_id, - mfi_pdstate(ar->pd[k].fw_state)); + mfi_pdstate(ar->pd[k].fw_state)); } } @@ -222,7 +222,7 @@ display_format(int ac, char **av, int diagnostic, mfi_dcmd_t display_cmd) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -262,7 +262,7 @@ display_format(int ac, char **av, int diagnostic, mfi_dcmd_t display_cmd) return (error); } } - + close(fd); return (0); } @@ -294,7 +294,7 @@ foreign_import(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -318,7 +318,7 @@ foreign_import(int ac, char **av) if (ac == 1) { cfgidx = 0xff; printf("Are you sure you wish to import ALL foreign " - "configurations on mfi%u? [y/N] ", mfi_unit); + "configurations on %s? [y/N] ", mfi_device); } else { /* * While this is docmmented for MegaCli this failed with @@ -334,7 +334,7 @@ foreign_import(int ac, char **av) return (EINVAL); } printf("Are you sure you wish to import the foreign " - "configuration %d on mfi%u? [y/N] ", cfgidx, mfi_unit); + "configuration %d on %s? [y/N] ", cfgidx, mfi_device); } ch = getchar(); @@ -355,11 +355,11 @@ foreign_import(int ac, char **av) } if (ac == 1) - printf("mfi%d: All foreign configurations imported\n", - mfi_unit); + printf("%s: All foreign configurations imported\n", + mfi_device); else - printf("mfi%d: Foreign configuration %d imported\n", mfi_unit, - cfgidx); + printf("%s: Foreign configuration %d imported\n", + mfi_device, cfgidx); close(fd); return (0); } diff --git a/usr.sbin/mfiutil/mfi_patrol.c b/usr.sbin/mfiutil/mfi_patrol.c index a1dbb1336f1b..3071fa0a8ace 100644 --- a/usr.sbin/mfiutil/mfi_patrol.c +++ b/usr.sbin/mfiutil/mfi_patrol.c @@ -89,7 +89,7 @@ show_patrol(int ac __unused, char **av __unused) int error, fd; u_int i; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -199,7 +199,7 @@ start_patrol(int ac __unused, char **av __unused) { int error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -225,7 +225,7 @@ stop_patrol(int ac __unused, char **av __unused) { int error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -295,7 +295,7 @@ patrol_config(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_properties.c b/usr.sbin/mfiutil/mfi_properties.c index f5affe14bd50..2e49312d7867 100644 --- a/usr.sbin/mfiutil/mfi_properties.c +++ b/usr.sbin/mfiutil/mfi_properties.c @@ -3,7 +3,7 @@ * * Copyright (c) 2013 Yahoo!, Inc. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -64,7 +64,7 @@ mfi_ctrl_set_properties(int fd, struct mfi_ctrl_props *info) } /* - * aquite the controller properties data structure modify the + * aquire the controller properties data structure modify the * rebuild rate if requested and then retun */ static int @@ -77,8 +77,8 @@ mfi_ctrl_rebuild_rate(int ac, char **av) warn("mfi_ctrl_set_rebuild_rate"); return(-1); } - - fd = mfi_open(mfi_unit, O_RDWR); + + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -129,8 +129,8 @@ mfi_ctrl_alarm_enable(int ac, char **av) warn("mfi_ctrl_alarm_enable"); return(-1); } - - fd = mfi_open(mfi_unit, O_RDWR); + + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_show.c b/usr.sbin/mfiutil/mfi_show.c index 17c967762963..d1ab70cf641b 100644 --- a/usr.sbin/mfiutil/mfi_show.c +++ b/usr.sbin/mfiutil/mfi_show.c @@ -50,7 +50,7 @@ void format_stripe(char *buf, size_t buflen, uint8_t stripe) { - humanize_number(buf, buflen, (1 << stripe) * 512, "", HN_AUTOSCALE, + humanize_number(buf, buflen, (1 << stripe) * 512, "", HN_AUTOSCALE, HN_B | HN_NOSPACE); } @@ -66,7 +66,7 @@ show_adapter(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -79,7 +79,7 @@ show_adapter(int ac, char **av __unused) close(fd); return (error); } - printf("mfi%d Adapter:\n", mfi_unit); + printf("%s Adapter:\n", mfi_device); printf(" Product Name: %.80s\n", info.product_name); printf(" Serial Number: %.32s\n", info.serial_number); if (info.package_version[0] != '\0') @@ -155,7 +155,7 @@ show_battery(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -170,7 +170,7 @@ show_battery(int ac, char **av __unused) return (error); } if (status == MFI_STAT_NO_HW_PRESENT) { - printf("mfi%d: No battery present\n", mfi_unit); + printf("%s: No battery present\n", mfi_device); close(fd); return (0); } @@ -200,7 +200,7 @@ show_battery(int ac, char **av __unused) } show_props = (status == MFI_STAT_OK); - printf("mfi%d: Battery State:\n", mfi_unit); + printf("%s: Battery State:\n", mfi_device); printf(" Manufacture Date: %d/%d/%d\n", design.mfg_date >> 5 & 0x0f, design.mfg_date & 0x1f, design.mfg_date >> 9 & 0xffff); printf(" Serial Number: %d\n", design.serial_number); @@ -357,7 +357,7 @@ show_config(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -373,8 +373,8 @@ show_config(int ac, char **av __unused) } /* Dump out the configuration. */ - printf("mfi%d Configuration: %d arrays, %d volumes, %d spares\n", - mfi_unit, config->array_count, config->log_drv_count, + printf("%s Configuration: %d arrays, %d volumes, %d spares\n", + mfi_device, config->array_count, config->log_drv_count, config->spares_count); p = (char *)config->array; @@ -458,7 +458,7 @@ show_volumes(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -474,7 +474,7 @@ show_volumes(int ac, char **av __unused) } /* List the volumes. */ - printf("mfi%d Volumes:\n", mfi_unit); + printf("%s Volumes:\n", mfi_device); state_len = strlen("State"); for (i = 0; i < list.ld_count; i++) { len = strlen(mfi_ldstate(list.ld_list[i].state)); @@ -541,7 +541,7 @@ show_drives(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -576,7 +576,7 @@ show_drives(int ac, char **av __unused) } /* List the drives. */ - printf("mfi%d Physical Drives:\n", mfi_unit); + printf("%s Physical Drives:\n", mfi_device); for (i = 0; i < list->count; i++) { /* Skip non-hard disks. */ @@ -621,7 +621,7 @@ show_firmware(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -636,9 +636,9 @@ show_firmware(int ac, char **av __unused) } if (info.package_version[0] != '\0') - printf("mfi%d Firmware Package Version: %s\n", mfi_unit, + printf("%s Firmware Package Version: %s\n", mfi_device, info.package_version); - printf("mfi%d Firmware Images:\n", mfi_unit); + printf("%s Firmware Images:\n", mfi_device); strcpy(header.name, "Name"); strcpy(header.version, "Version"); strcpy(header.build_date, "Date"); @@ -681,7 +681,7 @@ show_progress(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -776,7 +776,8 @@ show_progress(int ac, char **av __unused) close(fd); if (!busy) - printf("No activity in progress for adapter mfi%d\n", mfi_unit); + printf("No activity in progress for adapter %s\n", + mfi_device); return (0); } diff --git a/usr.sbin/mfiutil/mfi_volume.c b/usr.sbin/mfiutil/mfi_volume.c index 2bc913374b86..8a0e911155c0 100644 --- a/usr.sbin/mfiutil/mfi_volume.c +++ b/usr.sbin/mfiutil/mfi_volume.c @@ -297,7 +297,7 @@ volume_cache(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -319,7 +319,7 @@ volume_cache(int ac, char **av) } if (ac == 2) { - printf("mfi%u volume %s cache settings:\n", mfi_unit, + printf("%s volume %s cache settings:\n", mfi_device, mfi_volume_name(fd, target_id)); printf(" I/O caching: "); switch (props.default_cache_policy & @@ -406,7 +406,7 @@ volume_name(int ac, char **av) return (ENOSPC); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -427,7 +427,7 @@ volume_name(int ac, char **av) return (error); } - printf("mfi%u volume %s name changed from \"%s\" to \"%s\"\n", mfi_unit, + printf("%s volume %s name changed from \"%s\" to \"%s\"\n", mfi_device, mfi_volume_name(fd, target_id), props.name, av[2]); bzero(props.name, sizeof(props.name)); strcpy(props.name, av[2]); @@ -457,7 +457,7 @@ volume_progress(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 29409ad53e46..6b92ce049b86 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -31,26 +31,37 @@ .Dt MFIUTIL 8 .Os .Sh NAME -.Nm mfiutil +.Nm mfiutil , +.Nm mrsasutil .Nd Utility for managing LSI MegaRAID SAS controllers .Sh SYNOPSIS .Nm .Cm version .Nm +.Op Fl D Ar device +.Op Fl t Ar type .Op Fl u Ar unit .Cm show adapter .Nm +.Op Fl D Ar device +.Op Fl t Ar type .Op Fl u Ar unit .Cm show battery .Nm .Op Fl d .Op Fl e +.Op Fl D Ar device +.Op Fl t Ar type *** 383 LINES SKIPPED *** From nobody Fri May 5 18:21:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCfCY0WJ0z49dTL; Fri, 5 May 2023 18:21:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCfCX4Mksz3Bvw; Fri, 5 May 2023 18:21:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 345ILat1040490 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 5 May 2023 21:21:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 345ILat1040490 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 345ILaYf040489; Fri, 5 May 2023 21:21:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 May 2023 21:21:36 +0300 From: Konstantin Belousov To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5807f35c541c - main - dd: Fix SIGINT handling. Message-ID: References: <202305051245.345CjNLE048275@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202305051245.345CjNLE048275@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4QCfCX4Mksz3Bvw X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, May 05, 2023 at 12:45:23PM +0000, Dag-Erling Smørgrav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5807f35c541c26bbd91a3ae12506cd8dd8f20688 > > commit 5807f35c541c26bbd91a3ae12506cd8dd8f20688 > Author: Dag-Erling Smørgrav > AuthorDate: 2023-05-05 11:17:44 +0000 > Commit: Dag-Erling Smørgrav > CommitDate: 2023-05-05 12:42:32 +0000 > > dd: Fix SIGINT handling. > > Currently, we handle SIGINT by calling summary() and _exit() directly from the signal handler, which we install after setup(). There are several issues with this: > > * summary() is not signal safe; > * the parent is not informed about the signal; > * setup() can block on open(), and catching SIGINT at that stage will produce the correct exit status but will not print anything to stderr as POSIX demands. > > Fix this by making SIGINT non-restartable, changing our signal handler to only set a flag, installing it before setup(), and checking the termination flag before and after every blocking operation, i.e. open(), read(), write(). > > Also add two test cases, one for catching SIGINT while opening the input and one for catching it while reading. I couldn't think of an easy way to test catching SIGINT while writing (it's certainly feasible, but perhaps not from a shell script). > This does not fix SIGINT handler, it only (significantly) reduces the window where the issue could occur. See my latest comment on the review. From nobody Fri May 5 22:45:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCm3m0fxfz49tcR; Fri, 5 May 2023 22:45: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 4QCm3m00zkz3nwF; Fri, 5 May 2023 22:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683326724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huy8AlVIJ1hgD+K5Qqufm0MmCn96jNxu2qWy1XGoQOg=; b=MX5QPCy7s+C682FfIoPt2O4jNwVXzLWeCwosHyXuUH9xZ2dzJHaljqtbQDdejmyTEAAH21 MkI9c9LP6e+twn2u1hrChmhJpbtvtRwlYwzHOSbv1usQUiptfXrzJAEpjwtiSGQzv2ao43 5zytyMLsYz1uJogvHGz6MSdimLmXpWEEu9X99VF6fhIANhailWwHbVkOtD8ldHpcu1vzSY uMJoH1ueNOcCoeiEJW5Fj63/xnJ9583rNeGI8UIzzcZMZ2kKH3h0iqnkbCIGGNpKqstRi6 YPJOIH6WATDIIPuQcB96eDjTJM35MroD2PV6+YpVLEsjPlFtJeW1RsByiF/fQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683326724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huy8AlVIJ1hgD+K5Qqufm0MmCn96jNxu2qWy1XGoQOg=; b=SGfRHYnW+8IWQPSor/5nRA9KXFGoraoHRhgtLmLjF3w61oFabxXnsF3fNYEi49QeA4IGBt 9pzjStqxXLsW9Oi8HG5V4fHxLem0QSv3CdzPgQeg+hzrPToIOxGdcR5t04l303wh8QgfV9 e1rZPZw19IYMingyRmeg9oXEHU/UVJ9CRUKYmTFdwMYDLIQcKepd0oQViFkxXOnd01OIRU 6+u8dSjwL+pQ4rLU2NVsSC9VqCEwGhHZvD6W4kYfnQigMO/KKshy4lBjOVytj853xguyoi /VjMoJ52JYnTjD7yXXZZXYRqICSJRbIrY+7RG+bHydM30I+H7ccIk+e8DRQu4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683326724; a=rsa-sha256; cv=none; b=yt4MXKXBZPJ7EstWXJqCmD2G5KYyQ4Kjxpq3c5N2xW7bKVjKBjCa5qYNoju2NVxJ22uyzx 5ehsJmJeotP1/WjnAlm/v30qL2PdpR8OFbFLznpRv167qBweZESojA5C6C2R5V0znX/+IN c6tznTk0gP7dJCxpLN17abVppHesuXyxSj3800bmRkpAWEEI6660G1QmscMuX0k5Sz7SCw Gvg4lR4dvuPkL7Qz8rGH02Nb4MhB0qsBWP9YfpZpTzzzOIMQg8utQwaRVKvH7cahVaVwfo gAgaLOrNZnCMtmzR7q5g4wR1q26V6207y7fUhNEF+AUDwqobhXwlrytR41Ji4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCm3l64csz1BvD; Fri, 5 May 2023 22:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345MjNxN037958; Fri, 5 May 2023 22:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345MjNlD037957; Fri, 5 May 2023 22:45:23 GMT (envelope-from git) Date: Fri, 5 May 2023 22:45:23 GMT Message-Id: <202305052245.345MjNlD037957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 648a208ef3a1 - main - nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 648a208ef3a171585f3446464646832f0e0ed3dc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=648a208ef3a171585f3446464646832f0e0ed3dc commit 648a208ef3a171585f3446464646832f0e0ed3dc Author: Rick Macklem AuthorDate: 2023-05-05 22:43:55 +0000 Commit: Rick Macklem CommitDate: 2023-05-05 22:43:55 +0000 nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers If the i-node number (d_fileno) for a file on the server did not fit in 32bits, it would be truncated to the low order 32bits for the NFSv3 Readdir and ReaddirPlus RPC replies. This is no longer correct, given that ino_t is now 64bits. This patch fixes this by sending the full 64bits of d_fileno on the wire in the NFSv3 Readdir/ReaddirPlus RPC reply. PR: 271174 Reported by: bmueller@panasas.com Tested by: bmueller@panasas.com MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdport.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 56f5c00d0aed..6b5f357ecaf9 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -2251,12 +2251,12 @@ again: if (nd->nd_flag & ND_NFSV3) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = newnfs_true; - *tl++ = 0; + txdr_hyper(dp->d_fileno, tl); } else { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = newnfs_true; + *tl = txdr_unsigned(dp->d_fileno); } - *tl = txdr_unsigned(dp->d_fileno); (void) nfsm_strtom(nd, dp->d_name, nlen); if (nd->nd_flag & ND_NFSV3) { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); @@ -2753,8 +2753,7 @@ again: if (nd->nd_flag & ND_NFSV3) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = newnfs_true; - *tl++ = 0; - *tl = txdr_unsigned(dp->d_fileno); + txdr_hyper(dp->d_fileno, tl); dirlen += nfsm_strtom(nd, dp->d_name, nlen); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); txdr_hyper(*cookiep, tl); From nobody Fri May 5 23:12:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCmfg6tMbz49w9V; Fri, 5 May 2023 23:12: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 4QCmfg6SRcz3scN; Fri, 5 May 2023 23:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683328331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aimmbnn5hn81rseJvzKZxqTp89KRr0ZZZGpLxkyzSis=; b=NI/vxsugrIe+/Nic7k/vWUnMwmLTLaNB2wVgNDjKmAsUQZmoEGeTI8pZycYYvoCciargbL raQbZHYjdMJfKVJ+GiAbHsZRzCgfOho23NQLBNa6hcS4f4o+64XxqamteZ8Q9q5sD20rOF CEJtfPlRsi7XYFD9l1A3AnYnJIvEKKA2Sh7MZthW4D+ANfzj2vQff6xLnVpwpHD3Jsk1B8 o9xIMpa85P6obOtpYuxd9oVdUS68CEdaCdQSv3aZIzRW/kEiWS8cDHMZfKXN56+kXrjmh7 XEXmbMCYDaq0zDL2QKmWQJ0rJB09PC91cfT/qNbiWReKNyD+TZUWN5p9IE7fvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683328331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aimmbnn5hn81rseJvzKZxqTp89KRr0ZZZGpLxkyzSis=; b=m2WIIQjXhoijKTNcLbK5DLwCQKeHbKnTpfCyv95CkO/0bPYWXe5s4cvMQ7dlG89BoR4lYV xv5JUgYYeREHXkmltDeMFlXRopq7AbxuVW+MJ6xTKcxDAI4rb/SA1OMJgmWFRXCSMAdAYI p1fwL1muM2J6iEv39bv5WkOffc4ZKXbsLIPP7jGQEaPkX0B3vzbDpJ93lIlh1nCcGJesRj EsYvPbg//oxV+hawyx7USXiVCH8xSdieZ6JqnwF6i6P3ua2plNxdTAnSJynjOu1i6JVQ1M WT9jdEWvZfHiVLFelKqLh6FnNGywhW8FMmNSo951VFMKoBoJvsWpcpkR4jvqVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683328331; a=rsa-sha256; cv=none; b=VWAc5TG08JRiLtVPAE5QLoPN2QGD152RZ8yj3WTV6FwatFTJ2rH95jMASiwg8ryTk/rSMr VFEoNmpykfAu2py7un7oRbvMmk4tiN5gePepGCqTOAlikqv6CwpVpgrAKy4dxwsR3UJNAD r8udkpKm4FtkVvbVFW4rK0UpjQSefCqGpBMmfvbAq5xrO90LI91gYzHne4EFpmdsvbYg+g BrPXOCaKhVtN5weoN0vURdmUWSz8KT6MuUaIBnAqCt/hz3eJBeBPWAaMe+G/pr+z3uO3s7 4KnrpLc1BqOVK+RYAVko3vpnW2ehYQM3H0CFoDsEH8mtY5E6GZWEgz+9IU4NWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCmfg5XHPz1Ckl; Fri, 5 May 2023 23:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345NCBsq083741; Fri, 5 May 2023 23:12:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345NCBOE083740; Fri, 5 May 2023 23:12:11 GMT (envelope-from git) Date: Fri, 5 May 2023 23:12:11 GMT Message-Id: <202305052312.345NCBOE083740@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: f540a43052c1 - main - libfido2: update to 1.9.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f540a43052c12c76d3453ead881248d5467a1ab0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f540a43052c12c76d3453ead881248d5467a1ab0 commit f540a43052c12c76d3453ead881248d5467a1ab0 Merge: 648a208ef3a1 7248ec417c7d Author: Ed Maste AuthorDate: 2023-05-05 23:11:52 +0000 Commit: Ed Maste CommitDate: 2023-05-05 23:11:52 +0000 libfido2: update to 1.9.0 Some highlights from NEWS: ** Added OpenSSL 3.0 compatibility. ** Removed OpenSSL 1.0 compatibility. ** Support for FIDO 2.1 "minPinLength" extension. ** Support for COSE_EDDSA, COSE_ES256, and COSE_RS1 attestation. ** Support for TPM 2.0 attestation. ** Support for device timeouts; see fido_dev_set_timeout(). ** New API calls: - es256_pk_from_EVP_PKEY; - fido_cred_attstmt_len; - fido_cred_attstmt_ptr; - fido_cred_pin_minlen; - fido_cred_set_attstmt; - fido_cred_set_pin_minlen; - fido_dev_set_pin_minlen_rpid; - fido_dev_set_timeout; - rs256_pk_from_EVP_PKEY. ** Reliability and portability fixes. ** Better handling of HID devices without identification strings; gh#381. Relnotes: Yes Sponsored by: The FreeBSD Foundation contrib/libfido2/CMakeLists.txt | 59 +- contrib/libfido2/NEWS | 22 + contrib/libfido2/README.adoc | 9 +- contrib/libfido2/examples/assert.c | 44 +- contrib/libfido2/examples/cred.c | 110 +- contrib/libfido2/examples/extern.h | 8 - contrib/libfido2/examples/reset.c | 13 +- contrib/libfido2/examples/util.c | 28 - contrib/libfido2/fuzz/Dockerfile | 6 +- contrib/libfido2/fuzz/Makefile | 16 +- contrib/libfido2/fuzz/clock.c | 79 ++ contrib/libfido2/fuzz/dummy.h | 83 ++ contrib/libfido2/fuzz/export.gnu | 12 + contrib/libfido2/fuzz/functions.txt | 1165 ++++++++++++---------- contrib/libfido2/fuzz/fuzz_assert.c | 48 +- contrib/libfido2/fuzz/fuzz_bio.c | 1 + contrib/libfido2/fuzz/fuzz_cred.c | 39 +- contrib/libfido2/fuzz/fuzz_credman.c | 1 + contrib/libfido2/fuzz/fuzz_hid.c | 30 +- contrib/libfido2/fuzz/fuzz_largeblob.c | 1 + contrib/libfido2/fuzz/fuzz_mgmt.c | 28 + contrib/libfido2/fuzz/fuzz_netlink.c | 94 +- contrib/libfido2/fuzz/mutator_aux.c | 5 +- contrib/libfido2/fuzz/mutator_aux.h | 5 +- contrib/libfido2/fuzz/report.tgz | Bin 303082 -> 320981 bytes contrib/libfido2/fuzz/summary.txt | 86 +- contrib/libfido2/fuzz/wrap.c | 201 ++-- contrib/libfido2/fuzz/wrapped.sym | 25 +- contrib/libfido2/man/CMakeLists.txt | 17 +- contrib/libfido2/man/es256_pk_new.3 | 18 +- contrib/libfido2/man/fido2-token.1 | 12 + contrib/libfido2/man/fido_cred_new.3 | 50 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 57 +- contrib/libfido2/man/fido_cred_verify.3 | 12 +- contrib/libfido2/man/fido_dev_enable_entattest.3 | 27 +- contrib/libfido2/man/fido_dev_info_manifest.3 | 10 + contrib/libfido2/man/fido_dev_set_io_functions.3 | 35 +- contrib/libfido2/man/rs256_pk_new.3 | 18 +- contrib/libfido2/openbsd-compat/hkdf.c | 124 --- contrib/libfido2/openbsd-compat/hkdf.h | 65 -- contrib/libfido2/openbsd-compat/openbsd-compat.h | 17 +- contrib/libfido2/openbsd-compat/strsep.c | 79 ++ contrib/libfido2/regress/CMakeLists.txt | 10 +- contrib/libfido2/regress/assert.c | 88 +- contrib/libfido2/regress/cred.c | 646 +++++++++++- contrib/libfido2/regress/dev.c | 154 ++- contrib/libfido2/src/CMakeLists.txt | 15 +- contrib/libfido2/src/assert.c | 168 +--- contrib/libfido2/src/authkey.c | 16 +- contrib/libfido2/src/bio.c | 77 +- contrib/libfido2/src/cbor.c | 107 +- contrib/libfido2/src/config.c | 74 +- contrib/libfido2/src/cred.c | 245 +++-- contrib/libfido2/src/credman.c | 62 +- contrib/libfido2/src/dev.c | 63 +- contrib/libfido2/src/ecdh.c | 12 +- contrib/libfido2/src/eddsa.c | 82 +- contrib/libfido2/src/es256.c | 62 +- contrib/libfido2/src/export.gnu | 9 + contrib/libfido2/src/export.llvm | 9 + contrib/libfido2/src/export.msvc | 9 + contrib/libfido2/src/extern.h | 55 +- contrib/libfido2/src/fido.h | 18 +- contrib/libfido2/src/fido/config.h | 2 + contrib/libfido2/src/fido/eddsa.h | 9 +- contrib/libfido2/src/fido/es256.h | 3 +- contrib/libfido2/src/fido/param.h | 8 +- contrib/libfido2/src/fido/rs256.h | 3 +- contrib/libfido2/src/fido/types.h | 14 +- contrib/libfido2/src/hid_freebsd.c | 8 +- contrib/libfido2/src/hid_linux.c | 4 +- contrib/libfido2/src/hid_openbsd.c | 17 +- contrib/libfido2/src/hid_osx.c | 32 +- contrib/libfido2/src/hid_unix.c | 3 +- contrib/libfido2/src/hid_win.c | 48 +- contrib/libfido2/src/info.c | 81 +- contrib/libfido2/src/io.c | 104 +- contrib/libfido2/src/largeblob.c | 65 +- contrib/libfido2/src/netlink.c | 4 +- contrib/libfido2/src/nfc_linux.c | 44 +- contrib/libfido2/src/pin.c | 72 +- contrib/libfido2/src/reset.c | 12 +- contrib/libfido2/src/rs1.c | 99 ++ contrib/libfido2/src/rs256.c | 127 ++- contrib/libfido2/src/time.c | 74 ++ contrib/libfido2/src/tpm.c | 286 ++++++ contrib/libfido2/src/types.c | 76 ++ contrib/libfido2/src/u2f.c | 158 ++- contrib/libfido2/src/webauthn.h | 839 ++++++++++++++++ contrib/libfido2/src/winhello.c | 387 +++---- contrib/libfido2/tools/CMakeLists.txt | 3 + contrib/libfido2/tools/config.c | 48 + contrib/libfido2/tools/extern.h | 3 +- contrib/libfido2/tools/fido2-token.c | 2 + contrib/libfido2/tools/token.c | 6 + contrib/libfido2/windows/build.ps1 | 390 ++++---- contrib/libfido2/windows/const.ps1 | 42 + contrib/libfido2/windows/release.ps1 | 84 ++ lib/libfido2/Makefile | 4 + 99 files changed, 5599 insertions(+), 2302 deletions(-) diff --cc contrib/libfido2/fuzz/clock.c index 000000000000,23803c2ee3e5..23803c2ee3e5 mode 000000,100644..100644 --- a/contrib/libfido2/fuzz/clock.c +++ b/contrib/libfido2/fuzz/clock.c diff --cc contrib/libfido2/fuzz/report.tgz index c8d4d3f38028,cf74f315cb80..cf74f315cb80 Binary files differ diff --cc contrib/libfido2/openbsd-compat/strsep.c index 000000000000,578668c8ac7b..578668c8ac7b mode 000000,100644..100644 --- a/contrib/libfido2/openbsd-compat/strsep.c +++ b/contrib/libfido2/openbsd-compat/strsep.c diff --cc contrib/libfido2/src/rs1.c index 000000000000,37aa9f073bed..37aa9f073bed mode 000000,100644..100644 --- a/contrib/libfido2/src/rs1.c +++ b/contrib/libfido2/src/rs1.c diff --cc contrib/libfido2/src/time.c index 000000000000,b82b61874498..b82b61874498 mode 000000,100644..100644 --- a/contrib/libfido2/src/time.c +++ b/contrib/libfido2/src/time.c diff --cc contrib/libfido2/src/tpm.c index 000000000000,74620a5e4865..74620a5e4865 mode 000000,100644..100644 --- a/contrib/libfido2/src/tpm.c +++ b/contrib/libfido2/src/tpm.c diff --cc contrib/libfido2/src/types.c index 000000000000,54c0ca582865..54c0ca582865 mode 000000,100644..100644 --- a/contrib/libfido2/src/types.c +++ b/contrib/libfido2/src/types.c diff --cc contrib/libfido2/src/webauthn.h index 000000000000,5fbdd6faa927..5fbdd6faa927 mode 000000,100644..100644 --- a/contrib/libfido2/src/webauthn.h +++ b/contrib/libfido2/src/webauthn.h diff --cc contrib/libfido2/windows/const.ps1 index 000000000000,6d2a8189d362..6d2a8189d362 mode 000000,100644..100644 --- a/contrib/libfido2/windows/const.ps1 +++ b/contrib/libfido2/windows/const.ps1 diff --cc contrib/libfido2/windows/release.ps1 index 000000000000,32e88e256274..32e88e256274 mode 000000,100644..100644 --- a/contrib/libfido2/windows/release.ps1 +++ b/contrib/libfido2/windows/release.ps1 diff --cc lib/libfido2/Makefile index edf737b9dafc,000000000000..9a0e4a57bd9a mode 100644,000000..100644 --- a/lib/libfido2/Makefile +++ b/lib/libfido2/Makefile @@@ -1,73 -1,0 +1,77 @@@ +PACKAGE=ssh +LIB= fido2 +PRIVATELIB= +DIST= ${SRCTOP}/contrib/libfido2 + +.PATH: ${DIST}/src ${DIST} + +SRCS+= aes256.c +SRCS+= assert.c +SRCS+= authkey.c +SRCS+= bio.c +SRCS+= blob.c +SRCS+= buf.c +SRCS+= cbor.c +SRCS+= compress.c +SRCS+= config.c +SRCS+= cred.c +SRCS+= credman.c +SRCS+= dev.c +SRCS+= ecdh.c +SRCS+= eddsa.c +SRCS+= err.c +SRCS+= es256.c +SRCS+= hid_freebsd.c +SRCS+= hid_unix.c +SRCS+= hid.c +SRCS+= info.c +SRCS+= io.c +SRCS+= iso7816.c +SRCS+= largeblob.c +SRCS+= log.c +SRCS+= pin.c +SRCS+= random.c +SRCS+= reset.c ++SRCS+= rs1.c +SRCS+= rs256.c ++SRCS+= time.c ++SRCS+= tpm.c ++SRCS+= types.c +SRCS+= u2f.c + +SRCS+= openbsd-compat/freezero.c +SRCS+= openbsd-compat/recallocarray.c + +CFLAGS+= -I ${DIST}/src -I${SRCTOP}/contrib/libcbor/src -I${.CURDIR}/../libcbor +CFLAGS+= -D_FIDO_INTERNAL +CFLAGS+= -DHAVE_ARC4RANDOM_BUF +CFLAGS+= -DHAVE_CLOCK_GETTIME +CFLAGS+= -DHAVE_DEV_URANDOM +CFLAGS+= -DHAVE_ERR_H +CFLAGS+= -DHAVE_EXPLICIT_BZERO +CFLAGS+= -DHAVE_GETLINE +CFLAGS+= -DHAVE_GETOPT +CFLAGS+= -DHAVE_GETPAGESIZE +CFLAGS+= -DHAVE_GETRANDOM +CFLAGS+= -DHAVE_OPENSSLV_H +CFLAGS+= -DHAVE_READPASSPHRASE +CFLAGS+= -DHAVE_SIGNAL_H +CFLAGS+= -DHAVE_STRLCAT +CFLAGS+= -DHAVE_STRLCPY +CFLAGS+= -DHAVE_STRSEP +CFLAGS+= -DHAVE_SYSCONF +CFLAGS+= -DHAVE_SYS_RANDOM_H +CFLAGS+= -DHAVE_TIMESPECSUB +CFLAGS+= -DHAVE_TIMINGSAFE_BCMP +CFLAGS+= -DHAVE_UNISTD_H +CFLAGS+= -DTLS=__thread +CFLAGS+= -D_FIDO_MAJOR=1 +CFLAGS+= -D_FIDO_MINOR=9 +CFLAGS+= -D_FIDO_PATCH=0 + +LIBADD= crypto z + +WARNS=2 +MAN= + +.include From nobody Fri May 5 23:58:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCngs4CG4z49y2P; Fri, 5 May 2023 23:58: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 4QCngs3dSgz3wyF; Fri, 5 May 2023 23:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683331097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejVAGicTMvSKjJNyBWVO4zVYkNaOgYtMJsn6ET4PuCw=; b=yipU9hqLxl/pt54Hif+BYkdHd1SuR8S25uVYT0QDfZkaE1w/MwVOcQOjQRBgp5zLphk68j DnL4pFnfgioA7o2iHLu44Fok6/Nt6nhVmQKAElvwDnTIaheHDPYW2MnSEnN6c/zrPQuuvb URDesEqsx7vVUbHiBM4MX77bNRwfcIqgNIkIjR2ahg6yqxd9f8fc+J/tdofBpkpoOgYSPS 5fGhoK99aPNWGYL4h+qPtPMRwZoegxot16HMqLGbnX/kWFZjGov+zvhnM23PV4JByTZuIW 0MX3lgByXbkc4fMyaJRNzqZqNhFkadKrBryUZNQyuA1VpAEv+mem2BJCey1CRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683331097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejVAGicTMvSKjJNyBWVO4zVYkNaOgYtMJsn6ET4PuCw=; b=sWQjWH6+NIe81WGV7B5lGtf6rVqT8HuS4S+tnCG4bOpDWrqknVDC12q3vafjIgRAdQuLbd slIqbwZqSYbohWU4blsFtAFOf37OdEhVr8OGQp7w4crdrH5+cmSi4CKrJau6cgogbasqJV XmDSxOGgkiJJb3PWJ6h59NtQPIQWCHF5v8m2QvipAI2vnqB6Xdfn0bJSaANpspKl/DhkI/ gIveTBS4GtwOgOmR7kspKmaOFauu9oKjf9dm33ZQDfk6Ecmr4T3MVon5tUQ70FrWq++NZo sFR9C/bSfyFlxM6ZTZ6jD1BoyRRmJe3MzK55SL8pFFMZcRRK9OLnXwCHjHNBwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683331097; a=rsa-sha256; cv=none; b=FfUtZd6coinmsFse7STEIJCowso7Hl3nBWXAfzSiS2w3UZfI4upqM9ZKrdsQSnP7Suxr83 CNcL0ZZqRPQMtKTE5PqK5RicP2m1J+UJfwGPbvRjhiDAaoFSR0m8qWEwhu4j9G7M1MCbNX dJ1lDUOwoJKBuIIs5+QYLwQUVwtH20VlIMyRFFBMTSYIymt41chCuOdMlA6euDlRKrTCaS XdJQpq/HZfBwv40G5/Lje8k2G+6n1+i7GNGMCEWzWxSfmCdTGn1IlRce2ji14fQSUmhwGa PAQCXUk/c6eDdqdZXMeFMK7BXceJ0m5nqSak+WKrfah//ylciBLD59Hc7NXxMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCngs2gkxzDgL; Fri, 5 May 2023 23:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345NwHIx053566; Fri, 5 May 2023 23:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345NwH8l053565; Fri, 5 May 2023 23:58:17 GMT (envelope-from git) Date: Fri, 5 May 2023 23:58:17 GMT Message-Id: <202305052358.345NwH8l053565@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: 3e696dfb7009 - main - libfido2: update to 1.10.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e696dfb7009cd8ffa12e36f48f4339bb7a2048d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3e696dfb7009cd8ffa12e36f48f4339bb7a2048d commit 3e696dfb7009cd8ffa12e36f48f4339bb7a2048d Merge: f540a43052c1 3a9b77fea280 Author: Ed Maste AuthorDate: 2023-05-05 23:57:34 +0000 Commit: Ed Maste CommitDate: 2023-05-05 23:57:34 +0000 libfido2: update to 1.10.0 Some highlights from NEWS: ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*(); gh#480. ** New API calls: - fido_dev_info_set; - fido_dev_io_handle; - fido_dev_new_with_info; - fido_dev_open_with_info. ** Documentation and reliability fixes. ** Support for TPM 2.0 attestation of COSE_ES256 credentials. Relnotes: Yes Sponsored by: The FreeBSD Foundation contrib/libfido2/CMakeLists.txt | 47 +- contrib/libfido2/LICENSE | 2 +- contrib/libfido2/NEWS | 14 + contrib/libfido2/README.adoc | 4 +- contrib/libfido2/SECURITY.md | 5 + contrib/libfido2/examples/README.adoc | 2 +- contrib/libfido2/fuzz/Dockerfile | 2 +- contrib/libfido2/fuzz/Makefile | 2 +- contrib/libfido2/fuzz/export.gnu | 1 + contrib/libfido2/fuzz/functions.txt | 35 +- contrib/libfido2/fuzz/fuzz_hid.c | 11 +- contrib/libfido2/fuzz/report.tgz | Bin 320981 -> 323706 bytes contrib/libfido2/fuzz/summary.txt | 14 +- contrib/libfido2/man/CMakeLists.txt | 17 +- contrib/libfido2/man/check.sh | 42 ++ contrib/libfido2/man/eddsa_pk_new.3 | 4 +- contrib/libfido2/man/es256_pk_new.3 | 8 +- contrib/libfido2/man/fido2-assert.1 | 6 +- contrib/libfido2/man/fido2-cred.1 | 6 +- contrib/libfido2/man/fido2-token.1 | 24 +- contrib/libfido2/man/fido_assert_allow_cred.3 | 4 +- contrib/libfido2/man/fido_assert_new.3 | 95 ++-- contrib/libfido2/man/fido_assert_set_authdata.3 | 57 ++- contrib/libfido2/man/fido_assert_verify.3 | 6 +- contrib/libfido2/man/fido_bio_dev_get_info.3 | 2 +- contrib/libfido2/man/fido_bio_enroll_new.3 | 4 +- contrib/libfido2/man/fido_bio_info_new.3 | 2 +- contrib/libfido2/man/fido_bio_template.3 | 4 +- contrib/libfido2/man/fido_cbor_info_new.3 | 3 +- contrib/libfido2/man/fido_cred_exclude.3 | 2 +- contrib/libfido2/man/fido_cred_new.3 | 10 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 20 +- contrib/libfido2/man/fido_cred_verify.3 | 44 +- contrib/libfido2/man/fido_credman_metadata_new.3 | 6 +- contrib/libfido2/man/fido_dev_enable_entattest.3 | 6 +- contrib/libfido2/man/fido_dev_get_assert.3 | 6 +- contrib/libfido2/man/fido_dev_get_touch_begin.3 | 4 +- contrib/libfido2/man/fido_dev_info_manifest.3 | 41 +- contrib/libfido2/man/fido_dev_largeblob_get.3 | 10 +- contrib/libfido2/man/fido_dev_make_cred.3 | 6 +- contrib/libfido2/man/fido_dev_open.3 | 71 ++- contrib/libfido2/man/fido_dev_set_io_functions.3 | 81 +++- contrib/libfido2/man/fido_dev_set_pin.3 | 2 +- contrib/libfido2/man/fido_init.3 | 28 +- contrib/libfido2/man/fido_strerr.3 | 2 +- contrib/libfido2/man/rs256_pk_new.3 | 4 +- contrib/libfido2/regress/cred.c | 576 ++++++++++++++++++++++- contrib/libfido2/src/CMakeLists.txt | 2 +- contrib/libfido2/src/bio.c | 4 +- contrib/libfido2/src/cbor.c | 1 - contrib/libfido2/src/dev.c | 7 + contrib/libfido2/src/eddsa.c | 6 +- contrib/libfido2/src/export.gnu | 4 + contrib/libfido2/src/export.llvm | 4 + contrib/libfido2/src/export.msvc | 4 + contrib/libfido2/src/extern.h | 1 - contrib/libfido2/src/fido.h | 8 +- contrib/libfido2/src/fido/types.h | 4 +- contrib/libfido2/src/hid.c | 56 ++- contrib/libfido2/src/hid_osx.c | 62 ++- contrib/libfido2/src/hid_win.c | 2 +- contrib/libfido2/src/tpm.c | 144 +++++- contrib/libfido2/src/webauthn.h | 88 +++- contrib/libfido2/src/winhello.c | 171 ++++--- contrib/libfido2/tools/test.sh | 6 +- contrib/libfido2/windows/build.ps1 | 2 +- contrib/libfido2/windows/const.ps1 | 6 +- contrib/libfido2/windows/cygwin.gpg | Bin 0 -> 2193 bytes contrib/libfido2/windows/cygwin.ps1 | 68 +++ contrib/libfido2/windows/release.ps1 | 19 +- lib/libfido2/Makefile | 2 +- 71 files changed, 1639 insertions(+), 374 deletions(-) diff --cc contrib/libfido2/SECURITY.md index 000000000000,e12a48a847ba..e12a48a847ba mode 000000,100644..100644 --- a/contrib/libfido2/SECURITY.md +++ b/contrib/libfido2/SECURITY.md diff --cc contrib/libfido2/fuzz/report.tgz index cf74f315cb80,d78f4628de59..d78f4628de59 Binary files differ diff --cc contrib/libfido2/man/check.sh index 000000000000,951afeb88e0b..951afeb88e0b mode 000000,100755..100755 --- a/contrib/libfido2/man/check.sh +++ b/contrib/libfido2/man/check.sh diff --cc contrib/libfido2/windows/cygwin.gpg index 000000000000,1e87237a6e03..1e87237a6e03 mode 000000,100755..100755 Binary files differ diff --cc contrib/libfido2/windows/cygwin.ps1 index 000000000000,aada60b6f06f..aada60b6f06f mode 000000,100755..100755 --- a/contrib/libfido2/windows/cygwin.ps1 +++ b/contrib/libfido2/windows/cygwin.ps1 diff --cc lib/libfido2/Makefile index 9a0e4a57bd9a,000000000000..a9e1c526d45d mode 100644,000000..100644 --- a/lib/libfido2/Makefile +++ b/lib/libfido2/Makefile @@@ -1,77 -1,0 +1,77 @@@ +PACKAGE=ssh +LIB= fido2 +PRIVATELIB= +DIST= ${SRCTOP}/contrib/libfido2 + +.PATH: ${DIST}/src ${DIST} + +SRCS+= aes256.c +SRCS+= assert.c +SRCS+= authkey.c +SRCS+= bio.c +SRCS+= blob.c +SRCS+= buf.c +SRCS+= cbor.c +SRCS+= compress.c +SRCS+= config.c +SRCS+= cred.c +SRCS+= credman.c +SRCS+= dev.c +SRCS+= ecdh.c +SRCS+= eddsa.c +SRCS+= err.c +SRCS+= es256.c +SRCS+= hid_freebsd.c +SRCS+= hid_unix.c +SRCS+= hid.c +SRCS+= info.c +SRCS+= io.c +SRCS+= iso7816.c +SRCS+= largeblob.c +SRCS+= log.c +SRCS+= pin.c +SRCS+= random.c +SRCS+= reset.c +SRCS+= rs1.c +SRCS+= rs256.c +SRCS+= time.c +SRCS+= tpm.c +SRCS+= types.c +SRCS+= u2f.c + +SRCS+= openbsd-compat/freezero.c +SRCS+= openbsd-compat/recallocarray.c + +CFLAGS+= -I ${DIST}/src -I${SRCTOP}/contrib/libcbor/src -I${.CURDIR}/../libcbor +CFLAGS+= -D_FIDO_INTERNAL +CFLAGS+= -DHAVE_ARC4RANDOM_BUF +CFLAGS+= -DHAVE_CLOCK_GETTIME +CFLAGS+= -DHAVE_DEV_URANDOM +CFLAGS+= -DHAVE_ERR_H +CFLAGS+= -DHAVE_EXPLICIT_BZERO +CFLAGS+= -DHAVE_GETLINE +CFLAGS+= -DHAVE_GETOPT +CFLAGS+= -DHAVE_GETPAGESIZE +CFLAGS+= -DHAVE_GETRANDOM +CFLAGS+= -DHAVE_OPENSSLV_H +CFLAGS+= -DHAVE_READPASSPHRASE +CFLAGS+= -DHAVE_SIGNAL_H +CFLAGS+= -DHAVE_STRLCAT +CFLAGS+= -DHAVE_STRLCPY +CFLAGS+= -DHAVE_STRSEP +CFLAGS+= -DHAVE_SYSCONF +CFLAGS+= -DHAVE_SYS_RANDOM_H +CFLAGS+= -DHAVE_TIMESPECSUB +CFLAGS+= -DHAVE_TIMINGSAFE_BCMP +CFLAGS+= -DHAVE_UNISTD_H +CFLAGS+= -DTLS=__thread +CFLAGS+= -D_FIDO_MAJOR=1 - CFLAGS+= -D_FIDO_MINOR=9 ++CFLAGS+= -D_FIDO_MINOR=10 +CFLAGS+= -D_FIDO_PATCH=0 + +LIBADD= crypto z + +WARNS=2 +MAN= + +.include From nobody Sat May 6 00:26:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCpK11DZJz4B0XF; Sat, 6 May 2023 00:27:01 +0000 (UTC) (envelope-from peterj@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 4QCpK10lfYz417c; Sat, 6 May 2023 00:27:01 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332821; 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=M+nDiOb47LO4iim4Y+HmyS4Wfh72R6QYgv9fahDybuA=; b=BnuK32+8dm9qqyKaVlSj1bjxhniFnvCqmP+NRi0SJ9Ktq2/K782Aalv8FshMTpIv8Xk50t ZDMI80rfLGw8r249RZKVRNzhXi44rpVrKmrBZKNxxKJ7wKGgsWs3iYOUFhKNHVhMHfRI+h /Ol4rpQ8QQXF44ICgFv6zrmy9hC5hyjWPnsUkam+KdlWubC6HyKDr11TMHfeUge8K6YWti lefrqyJdjFX86ZcfGMapcRwokJR8BF0IPfAn0vCxkkk42IaWRsVVS4HohpIycHHUBLalAn HwKZrFq/d6L4WXrsT0Cy3haBH3kUHjx7f1vvnP4O+eHkHjxghtCyaqXdxqsL0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332821; 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=M+nDiOb47LO4iim4Y+HmyS4Wfh72R6QYgv9fahDybuA=; b=sKPaTI3gKV/XMU8tMEcGuh0OuJC+veS+tkh/oA+L2XCOCTNA/mK2mkPcQnVE+DpGGUeS49 Bi19ZXnTnsNiD1tmHCPa9JS1MBwMFnFOjj07yP5vHlMUzLylynH2ocSk4oHOn4kXEXGaFh OL+ZfzGW04JrgfIkhw5eSPWbnuJpaNyF91IjNktXvAwh97NrXeZSwlutfjb/DNXoxBPMFS cmTWcj3Ceblq6c2/EnAfNX7zj0tLbzeER8UcpmNwxrNnhn+ZA1IK3pZCMKUTGjlSOxoDRS RG6KaAVRywIqOivW+sveclTMRAb96ZSVPWsACrECsMQ6TqtqjwK1DXqXY2C2pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683332821; a=rsa-sha256; cv=none; b=vlo5R3p3y+oZS4zb+7lmeHWFJkPtgVEWBLCT02KCWMy6HCARfKw1+i2w5H7l7uNKVRNVkq 7agNpygGS2dkB0TeXGxU7/AHdxeRsQ0kejq7kXJ8ulDrf58WUv14aPV5T+UUR5MkE5kqi3 jYkhVR8AUgcROKWQY57kG+Hm80RzTF84H+10qdPRU71khUpE76HPmBTOXyY0BL5Ipou8YS gOOcfnYC8xgvTLpavCbxa6HnaX0RxjZ812xgNBh9RP+alZq33hutpALszZQ5NkzAjMRVGh aAb1qsD86qDJMxL2xGsfN9OKPfvolOx3dETjElSww3B05eCZWKKCT30KaiWsHA== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QCpJz46lPzd1v; Sat, 6 May 2023 00:26:59 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sat, 6 May 2023 10:26:53 +1000 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 42f722e721cd - main - amd64: store pcids pmap data in pcpu zone Message-ID: References: <202305021139.342Bdtn7092368@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CB/PyJuI29xUfjOc" Content-Disposition: inline In-Reply-To: <202305021139.342Bdtn7092368@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-ThisMailContainsUnwantedMimeParts: N --CB/PyJuI29xUfjOc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2023-May-02 11:39:55 +0000, Konstantin Belousov wrote: >The branch main has been updated by kib: > >URL: https://cgit.FreeBSD.org/src/commit/?id=3D42f722e721cd010ae5759a4b0d3= b7b93c2b9cad2 > >commit 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 >Author: Konstantin Belousov >AuthorDate: 2023-05-01 05:17:45 +0000 >Commit: Konstantin Belousov >CommitDate: 2023-05-02 11:32:47 +0000 > > amd64: store pcids pmap data in pcpu zone > =20 > This change eliminates the struct pmap_pcid array embedded into struct > pmap and sized by MAXCPU, which would bloat with MAXCPU increase. Also > it removes false sharing of cache lines, since the array elements are > mostly locally accessed by corresponding CPUs. > =20 > Suggested by: mjg > Reviewed by: markj > Tested by: pho > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D39890 This breaks the !SMP case: Whilst references to pm_pcids have been replaced in the SMP case, there are still references to pmap->pm_pcids[0] in the !SMP cane. --=20 Peter Jeremy --CB/PyJuI29xUfjOc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKSBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmRVnshfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSPpw/4g+r2OztXiYuzQzfT+LhGLrPYSxS/RYx/OlTVSVuA2dAZUDbplKIj7gQ5 lRNjmgbLQK4nRTcmNhpJFJbrut34ALzhGOg8bOA7pmOlncBXwMFX4TKL3I3xMuaJ z0ivHEEWRvvbdSm03+QuyTUzjSfqcpj3aQzOwSzyZaKxDQB2pPC5L0j/AgNW9Qgl 61j/6tvlDD4oPldkEzO2iIprKGFhmjgQWUs8qL1xz3F171T8UKK5COd2uskQJC7H mGaxb814vg35KnbVecC+xYOEPjylQehb2bWnC630fXDV/tfvJZNAMFzVY2/BNUuf mw+IaSAvqhz4TIfcV82y4tVju9MH1b7s7EZpQiugyq3sA1wMMe1kwHyV5AThM3HR VecL0j8Ie4EisSmur8fdkr1c36ZXcXaO5u6moNixhhyzyFahNaQlXXck5GNdqtp4 fWmzJ4Q0XAWqUgoFEkE1y2zGoweZl/057s8HPwfJEYk6mitXCCCsD/BV68d2r9sB iPFeVIa8F/7cZOEZ8ADG/9fKvI9CasiqOoe9EZJcEzFamXtSF8JvWGAkJN78TEew iZupOzXR8x5kjhu5sCxEA0xnSHqzfyclxZzL8/3R5UkJ4iChcrpk3bQOzDwwt5q3 s6fzqT5GfwVauXCZqdTSavEv+D/G+6iv8lDyDdfG9YZdvcce5A== =Co19 -----END PGP SIGNATURE----- --CB/PyJuI29xUfjOc-- From nobody Sat May 6 09:04:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD1pb15rZz49KT5; Sat, 6 May 2023 09:04: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 4QD1pb0Jnbz3nvX; Sat, 6 May 2023 09:04:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683363895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5oox4J7YOPGsDYTGByXjCZqgH3WcH2c28M2lGVK88no=; b=ZBjrE5DG/UAbmVwbfQqp5BGdk8agnJ/63mU06IwEkum6c2UA8zQdAYHR5GbhALqgCxnV7T iCOK0pY14Tu2M9Ux+wKxYigX71qZ980iWSnWjpz/AOZJiL2WoQpeXP0+z9utbRCB4rNWGj Pv+H9sL9bx1DECxWiH6/Hbg1HF1W6/HIkpsADs59ZeUVu19KYCwWCRAmmDDa5U7tmZeZzn OSd4nR/6YUZbxMsncak//PHP4H8+rRHxhsekRb2ddc0yBUGB1ZJ2dkt1EZbhkCoxRi/uGi qslWgERqdRjZrd25pK5OSoW18RESf5My1dKLYgDcO6nwfmsv2CuNoDTdf/4dtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683363895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5oox4J7YOPGsDYTGByXjCZqgH3WcH2c28M2lGVK88no=; b=lBXnpxp3TrsZ9M9lEvKygFQZvbDs2ELO2EFa8ZSkdDl9WFSXLNQQ6ckKd1g04QXyRI8Q4H YQZPdnT8RYZaNr/0dS9WtWu81RoIC37jHfxGB7V3fV0mwhfH1xIttnz59NaUC6ItufS1JI xnOUHMKD+2Kt25UPmn58npWaIC9yZx+KviSnI6xPIuS3SPH7QW535PPtrrdNhKv+wKHvjZ +kSnpeHQgbGsarpixzhjJus6rXZYH2r7m378/osJufIuJpa7ZyeH4Bj+43+BAuKliawF1+ UkOqeYrC31CDg9iwdQfXb5Zw0Ba5uwlhCwyE28mrf1k7utJGcdIBIh4XVtw4Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683363895; a=rsa-sha256; cv=none; b=sKdAmrROe+IU9Cw6mrdO1XMlqTn8Ob3mGPglsUj7RMg3fHOlrAsvrMpdXDZkYvVDDOTUor DsJKT7LeHJyPRsPwpOw3s+2PVOWbJkrTnRrYmlqw4AKbSpaw3TCmbDdh68DkP67P1nNZFj mTvp9TiR7B2iVfzrsT6sw+96OrqknCGSN++FGykfiu70ATfDTWuPnGzffDYTkilACns70w y6YOtqCMOLy0KJkoQ38V/TBzUooAn0UnNyUkk12sL9iBTHnvtruluEobd7o0gRTr4MuErJ yLSPthPwJx+J09OUeXevoMlJP2D3ByJ2cjnzr5oRS76b1wScEGrgPL6y8XrYVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD1pZ6VPvzWW1; Sat, 6 May 2023 09:04:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34694s0o061640; Sat, 6 May 2023 09:04:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34694sc7061639; Sat, 6 May 2023 09:04:54 GMT (envelope-from git) Date: Sat, 6 May 2023 09:04:54 GMT Message-Id: <202305060904.34694sc7061639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 113f56ba4930 - main - tcp_rack: allow the module to be loaded without TCP_BLACKBOX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 113f56ba493037c752da15ed20eae18c9103ffa6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=113f56ba493037c752da15ed20eae18c9103ffa6 commit 113f56ba493037c752da15ed20eae18c9103ffa6 Author: Michael Tuexen AuthorDate: 2023-05-06 09:02:50 +0000 Commit: Michael Tuexen CommitDate: 2023-05-06 09:02:50 +0000 tcp_rack: allow the module to be loaded without TCP_BLACKBOX PR: 271091 Reviewed by: cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D39860 --- sys/netinet/tcp_log_buf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h index 4507507e5f63..11c4c25a3727 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -447,6 +447,7 @@ tcp_get_bblog_state(struct tcpcb *tp) static inline void tcp_trace_point(struct tcpcb *tp, int num) { +#ifdef TCP_BLACKBOX if (((tcp_trace_point_config == num) || (tcp_trace_point_config == 0xffffffff)) && (tcp_trace_point_bb_mode != 0) && @@ -461,6 +462,7 @@ tcp_trace_point(struct tcpcb *tp, int num) tcp_trace_point_count = 0; } } +#endif } #define TCP_LOG_BUF_DEFAULT_SESSION_LIMIT 5000 From nobody Sat May 6 09:15:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD23253Nnz49KtH; Sat, 6 May 2023 09:15: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 4QD2324WG7z3plf; Sat, 6 May 2023 09:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683364542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9K9Xj/VpqvY6dXG8FYRINSjjNeB1oEeMngt+iEvZDCM=; b=IkDRYPmSizwQ+pzekNKltIV9446KTWO6OcO32YBZRTGCWtadhO/67Dxs9b3X7yOdZ8P23f Gv58QygQ6n8f58lCytcy3Ru5c/R/eN6v880xuoRuVx5XBfnipMZFxyQmL07OwIQecygCaB N4/j5Fxpkc4PnzVRbYf/uFXfzdPS51Iz2lCwIimMMVbZAQE1uVevf2uOMkN5s90ngD7jp2 He1C96oETxZhvwFvNfBPFiEKCb5SDVzaGWzrz7KMqKmJytx4JFWttsSPEsh79CL3fiZLp7 nzfbKGHu+nwU7wyUI+R8somZ/tkLB+CMnnVHyg47JBDrcG2GFSM3QkMEMl8dUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683364542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9K9Xj/VpqvY6dXG8FYRINSjjNeB1oEeMngt+iEvZDCM=; b=veknetvTM/6hezrN7NtgSbZ8dapZMolHn0Uw7W52p3MzFyrj06oqONBuJ1A8I3O6JpzIRv AJ8kxlPGcQme0IhQqysLqkbQoK3c7LyEuqr+5TJBfbK9fwl8GkM4n9fL71fRpQFkFZHdAo t5s7++Hiaufptf809n3M2/y5Rg2cnalj8AOjIIA3+UcQ6nn1IAADDGWbRHPJO0f+Q71ckU QOq7iPbvttxDGyWEBnOVIyIuj5RGawTjAvFhfuok2cUpZp6rY37qCKmJRykeqRom5tPoHb xuCujJo01/CAi13t4XYR14iPXJnJYBy9PeeCiCpeO+6XKj+1fhc1E/DIHQA3zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683364542; a=rsa-sha256; cv=none; b=h0yn2udvTrtWU/Thtq4GvonagAPG70X7ABWtkPBUHXUcZhIJSY57wFvCCz7zl0g3rrzRCN tGyMa4xoqj3gzjedF+iqcyl46rdxEZQLHo5UKdTaO7Cg+o90p7a37N1YzRSKEgQfNSm1Ag s7QOd6HpTy+YLiD1/4TzEhPztb5POdHrJI0BRobDYcwgchwxLep5f/KMU4aDr3EmxhKTw0 l7FbmDJSn5Sj/jtZwwffV6/e6rL9F7RCKXzH2L919SEzs2tNDIFd3hb2iAWU/GTPFF+mDg XCVm/m8Nvlek7W4jCEx/g4LSrb2JRu9ALOYb9tiRY/X7yRd9G8eFtSM1LrdN1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD2323Zd5zWn8; Sat, 6 May 2023 09:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3469FgSv078028; Sat, 6 May 2023 09:15:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3469FgOo078027; Sat, 6 May 2023 09:15:42 GMT (envelope-from git) Date: Sat, 6 May 2023 09:15:42 GMT Message-Id: <202305060915.3469FgOo078027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: c2399dd2e227 - main - tcp: improve BBLoging for PRUs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2399dd2e2273df296b58781a6a3690d7b8f3715 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c2399dd2e2273df296b58781a6a3690d7b8f3715 commit c2399dd2e2273df296b58781a6a3690d7b8f3715 Author: Michael Tuexen AuthorDate: 2023-05-06 09:12:06 +0000 Commit: Michael Tuexen CommitDate: 2023-05-06 09:12:06 +0000 tcp: improve BBLoging for PRUs Log all errors for PRUs, except when INP_DROPPED is set. In that case, don't log it. Reviewed by: glebius, rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D39591 --- sys/netinet/tcp_usrreq.c | 255 +++++++++++++++++++++++++++-------------------- 1 file changed, 145 insertions(+), 110 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index d23dd9f97222..a9aee98f1332 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -136,9 +136,7 @@ tcp_bblog_pru(struct tcpcb *tp, uint32_t pru, int error) { struct tcp_log_buffer *lgb; - if (tp == NULL) { - return; - } + KASSERT(tp != NULL, ("tcp_bblog_pru: tp == NULL")); INP_WLOCK_ASSERT(tptoinpcb(tp)); if (tcp_bblogging_on(tp)) { lgb = tcp_log_event(tp, NULL, NULL, NULL, TCP_LOG_PRU, error, @@ -232,9 +230,18 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in *sinp; + inp = sotoinpcb(so); + KASSERT(inp != NULL, ("tcp_usr_bind: inp == NULL")); + INP_WLOCK(inp); + if (inp->inp_flags & INP_DROPPED) { + INP_WUNLOCK(inp); + return (EINVAL); + } + tp = intotcpcb(inp); + sinp = (struct sockaddr_in *)nam; if (nam->sa_family != AF_INET) { /* @@ -242,28 +249,24 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) */ if (nam->sa_family != AF_UNSPEC || nam->sa_len < offsetof(struct sockaddr_in, sin_zero) || - sinp->sin_addr.s_addr != INADDR_ANY) - return (EAFNOSUPPORT); + sinp->sin_addr.s_addr != INADDR_ANY) { + error = EAFNOSUPPORT; + goto out; + } nam->sa_family = AF_INET; } - if (nam->sa_len != sizeof(*sinp)) - return (EINVAL); - + if (nam->sa_len != sizeof(*sinp)) { + error = EINVAL; + goto out; + } /* * Must check for multicast addresses and disallow binding * to them. */ - if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) - return (EAFNOSUPPORT); - - inp = sotoinpcb(so); - KASSERT(inp != NULL, ("tcp_usr_bind: inp == NULL")); - INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; + if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) { + error = EAFNOSUPPORT; goto out; } - tp = intotcpcb(inp); INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbbind(inp, sinp, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); @@ -282,32 +285,39 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in6 *sin6; u_char vflagsav; - sin6 = (struct sockaddr_in6 *)nam; - if (nam->sa_family != AF_INET6) - return (EAFNOSUPPORT); - if (nam->sa_len != sizeof(*sin6)) + inp = sotoinpcb(so); + KASSERT(inp != NULL, ("tcp6_usr_bind: inp == NULL")); + INP_WLOCK(inp); + if (inp->inp_flags & INP_DROPPED) { + INP_WUNLOCK(inp); return (EINVAL); + } + tp = intotcpcb(inp); + + vflagsav = inp->inp_vflag; + sin6 = (struct sockaddr_in6 *)nam; + if (nam->sa_family != AF_INET6) { + error = EAFNOSUPPORT; + goto out; + } + if (nam->sa_len != sizeof(*sin6)) { + error = EINVAL; + goto out; + } /* * Must check for multicast addresses and disallow binding * to them. */ - if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) - return (EAFNOSUPPORT); - - inp = sotoinpcb(so); - KASSERT(inp != NULL, ("tcp6_usr_bind: inp == NULL")); - INP_WLOCK(inp); - vflagsav = inp->inp_vflag; - if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { + error = EAFNOSUPPORT; goto out; } - tp = intotcpcb(inp); + INP_HASH_WLOCK(&V_tcbinfo); inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; @@ -353,16 +363,17 @@ tcp_usr_listen(struct socket *so, int backlog, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_listen: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; - goto out; + INP_WUNLOCK(inp); + return (EINVAL); } tp = intotcpcb(inp); + SOCK_LOCK(so); error = solisten_proto_check(so); if (error != 0) { @@ -403,18 +414,20 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; u_char vflagsav; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_listen: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; - goto out; + INP_WUNLOCK(inp); + return (EINVAL); } - vflagsav = inp->inp_vflag; tp = intotcpcb(inp); + + vflagsav = inp->inp_vflag; + SOCK_LOCK(so); error = solisten_proto_check(so); if (error != 0) { @@ -469,37 +482,44 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) struct epoch_tracker et; int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in *sinp; - sinp = (struct sockaddr_in *)nam; - if (nam->sa_family != AF_INET) - return (EAFNOSUPPORT); - if (nam->sa_len != sizeof (*sinp)) - return (EINVAL); - - /* - * Must disallow TCP ``connections'' to multicast addresses. - */ - if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) - return (EAFNOSUPPORT); - if (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) - return (EACCES); - if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0) - return (error); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_connect: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNREFUSED; + INP_WUNLOCK(inp); + return (ECONNREFUSED); + } + tp = intotcpcb(inp); + + sinp = (struct sockaddr_in *)nam; + if (nam->sa_family != AF_INET) { + error = EAFNOSUPPORT; + goto out; + } + if (nam->sa_len != sizeof (*sinp)) { + error = EINVAL; + goto out; + } + /* + * Must disallow TCP ``connections'' to multicast addresses. + */ + if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) { + error = EAFNOSUPPORT; goto out; } + if (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) { + error = EACCES; + goto out; + } + if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0) + goto out; if (SOLISTENING(so)) { error = EOPNOTSUPP; goto out; } - tp = intotcpcb(inp); NET_EPOCH_ENTER(et); if ((error = tcp_connect(tp, sinp, td)) != 0) goto out_in_epoch; @@ -530,37 +550,43 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) struct epoch_tracker et; int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in6 *sin6; u_int8_t incflagsav; u_char vflagsav; - sin6 = (struct sockaddr_in6 *)nam; - if (nam->sa_family != AF_INET6) - return (EAFNOSUPPORT); - if (nam->sa_len != sizeof (*sin6)) - return (EINVAL); - - /* - * Must disallow TCP ``connections'' to multicast addresses. - */ - if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) - return (EAFNOSUPPORT); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_connect: inp == NULL")); INP_WLOCK(inp); + if (inp->inp_flags & INP_DROPPED) { + INP_WUNLOCK(inp); + return (ECONNREFUSED); + } + tp = intotcpcb(inp); + vflagsav = inp->inp_vflag; incflagsav = inp->inp_inc.inc_flags; - if (inp->inp_flags & INP_DROPPED) { - error = ECONNREFUSED; + + sin6 = (struct sockaddr_in6 *)nam; + if (nam->sa_family != AF_INET6) { + error = EAFNOSUPPORT; + goto out; + } + if (nam->sa_len != sizeof (*sin6)) { + error = EINVAL; + goto out; + } + /* + * Must disallow TCP ``connections'' to multicast addresses. + */ + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { + error = EAFNOSUPPORT; goto out; } if (SOLISTENING(so)) { error = EINVAL; goto out; } - tp = intotcpcb(inp); #ifdef INET /* * XXXRW: Some confusion: V4/V6 flags relate to binding, and @@ -672,10 +698,12 @@ tcp_usr_disconnect(struct socket *so) KASSERT(inp != NULL, ("tcp_usr_disconnect: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNRESET; - goto out; + INP_WUNLOCK(inp); + NET_EPOCH_EXIT(et); + return (ECONNRESET); } tp = intotcpcb(inp); + if (tp->t_state == TCPS_TIME_WAIT) goto out; tcp_disconnect(tp); @@ -696,23 +724,24 @@ static int tcp_usr_accept(struct socket *so, struct sockaddr **nam) { int error = 0; - struct inpcb *inp = NULL; - struct tcpcb *tp = NULL; + struct inpcb *inp; + struct tcpcb *tp; struct in_addr addr; in_port_t port = 0; - if (so->so_state & SS_ISDISCONNECTED) - return (ECONNABORTED); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_accept: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNABORTED; - goto out; + INP_WUNLOCK(inp); + return (ECONNABORTED); } tp = intotcpcb(inp); + if (so->so_state & SS_ISDISCONNECTED) { + error = ECONNABORTED; + goto out; + } /* * We inline in_getpeeraddr and COMMON_END here, so that we can * copy the data of interest and defer the malloc until after we @@ -735,28 +764,30 @@ out: static int tcp6_usr_accept(struct socket *so, struct sockaddr **nam) { - struct inpcb *inp = NULL; + struct inpcb *inp; int error = 0; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct in_addr addr; struct in6_addr addr6; struct epoch_tracker et; in_port_t port = 0; int v4 = 0; - if (so->so_state & SS_ISDISCONNECTED) - return (ECONNABORTED); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_accept: inp == NULL")); - NET_EPOCH_ENTER(et); + NET_EPOCH_ENTER(et); /* XXXMT Why is this needed? */ INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNABORTED; - goto out; + INP_WUNLOCK(inp); + NET_EPOCH_EXIT(et); + return (ECONNABORTED); } tp = intotcpcb(inp); + if (so->so_state & SS_ISDISCONNECTED) { + error = ECONNABORTED; + goto out; + } /* * We inline in6_mapped_peeraddr and COMMON_END here, so that we can * copy the data of interest and defer the malloc until after we @@ -794,7 +825,7 @@ tcp_usr_shutdown(struct socket *so) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct epoch_tracker et; inp = sotoinpcb(so); @@ -805,6 +836,7 @@ tcp_usr_shutdown(struct socket *so) return (ECONNRESET); } tp = intotcpcb(inp); + NET_EPOCH_ENTER(et); socantsendmore(so); tcp_usrclosed(tp); @@ -826,7 +858,7 @@ tcp_usr_rcvd(struct socket *so, int flags) { struct epoch_tracker et; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; int outrv = 0, error = 0; inp = sotoinpcb(so); @@ -837,6 +869,7 @@ tcp_usr_rcvd(struct socket *so, int flags) return (ECONNRESET); } tp = intotcpcb(inp); + NET_EPOCH_ENTER(et); /* * For passively-created TFO connections, don't attempt a window @@ -876,7 +909,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, struct epoch_tracker et; int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; #ifdef INET #ifdef INET6 struct sockaddr_in sin; @@ -891,15 +924,6 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, u_char vflagsav; bool restoreflags; - if (control != NULL) { - /* TCP doesn't do control messages (rights, creds, etc) */ - if (control->m_len) { - m_freem(control); - return (EINVAL); - } - m_freem(control); /* empty control, just free it */ - } - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_send: inp == NULL")); INP_WLOCK(inp); @@ -909,13 +933,23 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, INP_WUNLOCK(inp); return (ECONNRESET); } + tp = intotcpcb(inp); vflagsav = inp->inp_vflag; incflagsav = inp->inp_inc.inc_flags; restoreflags = false; - tp = intotcpcb(inp); NET_EPOCH_ENTER(et); + if (control != NULL) { + /* TCP doesn't do control messages (rights, creds, etc) */ + if (control->m_len > 0) { + m_freem(control); + error = EINVAL; + goto out; + } + m_freem(control); /* empty control, just free it */ + } + if ((flags & PRUS_OOB) != 0 && (error = tcp_pru_options_support(tp, PRUS_OOB)) != 0) goto out; @@ -1222,7 +1256,7 @@ static void tcp_usr_abort(struct socket *so) { struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct epoch_tracker et; inp = sotoinpcb(so); @@ -1260,7 +1294,7 @@ static void tcp_usr_close(struct socket *so) { struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct epoch_tracker et; inp = sotoinpcb(so); @@ -1318,16 +1352,17 @@ tcp_usr_rcvoob(struct socket *so, struct mbuf *m, int flags) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_rcvoob: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNRESET; - goto out; + INP_WUNLOCK(inp); + return (ECONNRESET); } tp = intotcpcb(inp); + error = tcp_pru_options_support(tp, PRUS_OOB); if (error) { goto out; From nobody Sat May 6 09:23:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD2DQ2LVQz49LQ2; Sat, 6 May 2023 09:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD2DQ1dCwz3r75; Sat, 6 May 2023 09:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683365030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqeBFCNnmpIpL6AzKweDnoNiMaoI2dvrkIxl9gybKTI=; b=IW9PegErOpRLC3mAObBcmAsslgKW4qf7l6eq/Cw8pupfIEuIrn/PNtT6BzfZoou5MKKldA +N6QLUSHhIoAZ1/yC7s+VUfUxEYNOnSl/9cpBRZ3OGYFMHGFGKiqrd3hyG9TPk/O9sBoXq mAnO+mnyJFVFYOSIdhWiSNUOicbfZVdfAB7AMkjemxXeFhi8pJOQCcWKMCHMzgahFcYzog yEtBSCNvex1nc42Dy/LoEOLEaX+HcfpmKbqoGM6+NEqKT1vt+VoFI0XFup0O3kFKkE2zWB 2dty9qhMf5A7kjLrgoHTPk0VFw2HD9nzEOTc6I4xnRXkD5G2j8UP4u/b0Uw4+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683365030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqeBFCNnmpIpL6AzKweDnoNiMaoI2dvrkIxl9gybKTI=; b=ppe7FshZl20gLIo58AkHL6b5mdn5eLPwPUXCBxkd5Q39YJAp3RSK+B7Zp8aru4N/BYdqAZ KaFZbp+gfoNHxv3b9v7zG4rjJrPGd7a1P1RJWMbLqKPh6xhI2ULgbA57T7wmAGB6kH7ka2 unr9pjT5kb9ZyHXae+ybiHHO8K/caVUbaPIwwB9uMIQ9X8FJDlbmG+6j9guotR+RyyzFNt XgLo0IqlAJhpY8oRXDO6vYQD/KtqJjLE5gy/8n5vy0Caag7nBg1LQLW/gfe/L3qbRceYpL wogDLtWxqlcqSgBYxn8RMvpWxM3WbAK+YduyoRpyCoL7dhtBX3DqaxFGO+6gew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683365030; a=rsa-sha256; cv=none; b=UEvOCEeZw1ludPoyXOns4isDI3qrpsbIHYtkzW2mNcbSN9GTnbgVmcqz3qOc3oj2xyByrc 8l8UgZuT3npGN4sBWPMcbpZYEFLRYr9lKt4vgAdNvwhruKHgI0D4pFf2YCe3hgVuskZ+7k hSWUIZxR/l1ZBDL3SA4VSq9Ifn5aT3LfXdqpAnvk5bwQJEa7e4Bl7k7kdTalmwV75BMA4J 7EPFVQOFh3RVkrs0s/Ibk3kJeREAVfPVFVDX6MgrKU7rb8MUcndhPU+tJuYwyYhOhJOV4I UtsCZKAgReR7yUlr+FvwDWEOrr4IzwZeAQEOwruyX4k+ePJdJR/kei3xGJ5BQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD2DQ0hDgzWp4; Sat, 6 May 2023 09:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3469NoFs094523; Sat, 6 May 2023 09:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3469NnZP094522; Sat, 6 May 2023 09:23:49 GMT (envelope-from git) Date: Sat, 6 May 2023 09:23:49 GMT Message-Id: <202305060923.3469NnZP094522@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e044a0bce495 - main - bblog: inherit TCP_LOG option from listener List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e044a0bce4953ed9a98af73fa98dd16d04a9c5ed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e044a0bce4953ed9a98af73fa98dd16d04a9c5ed commit e044a0bce4953ed9a98af73fa98dd16d04a9c5ed Author: Michael Tuexen AuthorDate: 2023-05-06 09:21:16 +0000 Commit: Michael Tuexen CommitDate: 2023-05-06 09:21:16 +0000 bblog: inherit TCP_LOG option from listener When the TCP_LOG option is used to enable logging on a listening socket, inherit this if the listener is not auto selected and does not have a log id set. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D38436 --- sys/netinet/tcp_syncache.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 54a347c2669e..5fc63d42b21a 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -90,6 +90,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef TCP_BLACKBOX +#include +#endif #ifdef TCP_OFFLOAD #include #endif @@ -1013,6 +1016,20 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) tod->tod_offload_socket(tod, sc->sc_todctx, so); } +#endif +#ifdef TCP_BLACKBOX + /* + * Inherit the log state from the listening socket, if + * - the log state of the listening socket is not off and + * - the listening socket was not auto selected from all sessions and + * - a log id is not set on the listening socket. + * This avoids inheriting a log state which was automatically set. + */ + if ((tcp_get_bblog_state(sototcpcb(lso)) != TCP_LOG_STATE_OFF) && + ((sototcpcb(lso)->t_flags2 & TF2_LOG_AUTO) == 0) && + (sototcpcb(lso)->t_lib == NULL)) { + tcp_log_state_change(tp, tcp_get_bblog_state(sototcpcb(lso))); + } #endif /* * Copy and activate timers. From nobody Sat May 6 11:24:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD4w60yv7z49StY; Sat, 6 May 2023 11:24: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 4QD4w60Xf9z441J; Sat, 6 May 2023 11:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WcUJ3L5ZxrFD3pPlMiAT7l5lds0BQS+YfWmFHBy/2K4=; b=VT2DH1WXzJN2gOOZTxUEK5I33oi0eo/mqpZhH3Dt6QTqeRFuO6y+biQmV4wiG5rDyqitrp go8XyHnmc+zbGcsOfi6IL+6yo0Y9tQvVn9ZsM4gExeqUHQVHGIPIQR0/MmrEWKeonL/lhx 0Nb8LoIppPU0ZLcGYbhK+BjPXsLoAbemktUq5YUU004laJd/YHYS24bpUtYjrJAAxPpmPV VmAPRhOYOMzk3wN+wO79J5wkZ8JvCwXy25+haDoXbAdkSVLF8b2J6EoatqVf9q2aEyczuU szpMbrUVaN9Bjlw7ItMAb1OdAJUnfiTjH+6BkywVXaNMMb+Yc24LJ4Jr99w70g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WcUJ3L5ZxrFD3pPlMiAT7l5lds0BQS+YfWmFHBy/2K4=; b=D1JvOqP7vUNOMHuLrdImSwXBonL1lnh9Gq7tZ4HXErz/+CIRNt9wzENzfZERiAp/bkPNfG qFbHumHLlFT2okE404QAClGXtA+2uSTPmCythF22u3WC0HmB2KWysoAZZ7Ca05BPo3kBN0 mvywjbc0aoj430A6b90xMVjaPnqjpfB7t827JLUH7hdlKBpDuJvwdQMN6D298l6maxwAYS 4GDqJAyuct8WHsLJLx8SlwdaEdCJ6F8Ufyt6VRYIN04tnT4NkObKg9X4UlaSW11KuYhla9 8QNN1n2TMi+ZWWf+ZbugD4MENJS+W/vtdwFFiLqJIWa2PZJMAF1p4zPcRUglSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683372294; a=rsa-sha256; cv=none; b=FEuyMbl4VQdGDGyUwWV0Z1iOFboaEAcNKz/z4AqzKBgb0scF+8T7FEmDsQuS/BCHqJCwW/ 7KtGzJg20KJuM5+Glspeuso/IhBCSVvQlqUgyCk2hbs8YnCb5rPsqfkAX7f0KivPDhV0HZ n9q2iq6wtsglbsMTwLoCrPASEja/YQ9TsFnijv2XJ0y9bBEabou2UnEHvGlV0F0DNGBCbL 2bZkIZwnvyb2wqjaVI32efGHF3/yK+DJAy/wnMv5KlnwZH6IRpUA9/fZloK5uaLPyHUIog rS7GZv0PskSLi6bAFemR9CyHkbaNIf89c3ZCQh63Irg5c24cuPxS0iE5Xt4zgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD4w56bLkzZgc; Sat, 6 May 2023 11:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346BOrlO091252; Sat, 6 May 2023 11:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346BOrgS091251; Sat, 6 May 2023 11:24:53 GMT (envelope-from git) Date: Sat, 6 May 2023 11:24:53 GMT Message-Id: <202305061124.346BOrgS091251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7c8e66ed8d9c - main - amd64: convert UP code to dynamically allocated pmap->pm_pcid List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c8e66ed8d9cbe49a4b8271883f2b2d5fdd37bce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7c8e66ed8d9cbe49a4b8271883f2b2d5fdd37bce commit 7c8e66ed8d9cbe49a4b8271883f2b2d5fdd37bce Author: Konstantin Belousov AuthorDate: 2023-05-06 11:20:15 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-06 11:24:07 +0000 amd64: convert UP code to dynamically allocated pmap->pm_pcid Reported by: peterj Sponsored by: The FreeBSD Foundation --- sys/amd64/amd64/pmap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 273c768559e1..6de7f955d624 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3467,7 +3467,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) if (pmap == PCPU_GET(curpmap) && pmap_pcid_enabled && pmap->pm_ucr3 != PMAP_NO_CR3) { critical_enter(); - pcid = pmap->pm_pcids[0].pm_pcid; + pcid = pmap->pm_pcidp->pm_pcid; if (invpcid_works) { d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -3482,7 +3482,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) critical_exit(); } } else if (pmap_pcid_enabled) - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } void @@ -3506,23 +3506,23 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) pmap->pm_ucr3 != PMAP_NO_CR3) { critical_enter(); if (invpcid_works) { - d.pcid = pmap->pm_pcids[0].pm_pcid | + d.pcid = pmap->pm_pcidp->pm_pcid | PMAP_PCID_USER_PT; d.pad = 0; d.addr = sva; for (; d.addr < eva; d.addr += PAGE_SIZE) invpcid(&d, INVPCID_ADDR); } else { - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[0]. + kcr3 = pmap->pm_cr3 | pmap->pm_pcidp-> pm_pcid | CR3_PCID_SAVE; - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[0]. + ucr3 = pmap->pm_ucr3 | pmap->pm_pcidp-> pm_pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlrng(ucr3, kcr3, sva, eva); } critical_exit(); } } else if (pmap_pcid_enabled) { - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } } @@ -3550,7 +3550,7 @@ pmap_invalidate_all(pmap_t pmap) if (pmap_pcid_enabled) { critical_enter(); if (invpcid_works) { - d.pcid = pmap->pm_pcids[0].pm_pcid; + d.pcid = pmap->pm_pcidp->pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, INVPCID_CTX); @@ -3559,10 +3559,10 @@ pmap_invalidate_all(pmap_t pmap) invpcid(&d, INVPCID_CTX); } } else { - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[0].pm_pcid; + kcr3 = pmap->pm_cr3 | pmap->pm_pcidp->pm_pcid; if (pmap->pm_ucr3 != PMAP_NO_CR3) { - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[ - 0].pm_pcid | PMAP_PCID_USER_PT; + ucr3 = pmap->pm_ucr3 | pmap->pm_pcidp-> + pm_pcid | PMAP_PCID_USER_PT; pmap_pti_pcid_invalidate(ucr3, kcr3); } else load_cr3(kcr3); @@ -3572,7 +3572,7 @@ pmap_invalidate_all(pmap_t pmap) invltlb(); } } else if (pmap_pcid_enabled) { - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } } @@ -3591,7 +3591,7 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) pmap_update_pde_invalidate(pmap, va, newpde); else - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } #endif /* !SMP */ From nobody Sat May 6 11:24:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD4w71f6Bz49SbN; Sat, 6 May 2023 11:24: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 4QD4w71D0qz43rK; Sat, 6 May 2023 11:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu0WJ9AE79oJ7tpRVOPBXqbOZrm7eW/Ex6YryAYlYGs=; b=yYnucUNBROUOFuLggO0qiqosO4A52/r4iquUoAGkbOMI1Ato5qburWd9pDWLjJbnAUddgN wqYs3reKXM0OtK6nzJ9Ps4A5fT0cK5qLJky9PXSA3s9HHvhKrw6HnPfrQYh5zxtGjpyrZP CxmjVsowFe8WXEpGwtcxJXSL6QBPHlL1wNCI4U7bCls56PJiq4B3Ncpqw/4ZrLxePBqEay ct6SW9sQU/7qg/FKhl+InzDz6p/sB3oCeHVvu4cBvKnm0ZSjy7ju0DBjH4y/ezQ3QaRn4G S57M3VOXpC1Glbbrkf+ERbEW3xy4lXYznHZ2n6bTqtR3I+RlDZ2nbwSZOfvddA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu0WJ9AE79oJ7tpRVOPBXqbOZrm7eW/Ex6YryAYlYGs=; b=WoOz11f7mvcPofhpsa9ghywUsIpRUCjyIdohJfXLQJH7apMWjqZgFWt2B6cOrxv5mgfxHE PwmNyir+8h3VUyYSdBQppludWN5rd3yNJJn4IoQrYIFQEfEUbJsCRmrrSunKkz+pRIisOc wBxd+FToDz6Rv7F8lt/XrV8DyetD7mPM47NkH3VBy20d+BT8cs4Xfw2W8p/rYbFQbjAN+F j42pzZdMP4bNrEKBJGOSNdQHHpyqJyb4ZZaWjcbYCbDyBJvF3Yoxwoe9/1NnKAWDEcJgP/ kAiRadJT7z1Jm0alhlLSX/fB1R7GeutPZVhl/TPy1eZRKM/hkQvXZBIspanRPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683372295; a=rsa-sha256; cv=none; b=E27m858q745kMvbos9V4SbvDi6q86wNmRdtiyxh0YIsZA4GkL4DZV56f6pm+rdsKsQ1HDw jy4Ch9vS7QDCQNVSKA1ftWj2xa2HFs7+dF6htjhtlRqybq4/sIg6dHBuNeyWMfgxcZBaGY STZF1DS14dMUmd6Hc1Zp87rZWk/Y7Qhn6xsItQR6Ta96XZzjsJ4KT4Ce8YaYhvcuwiPKLB arNBeUtu2HEyaLeUQIlEsfXy0CHNnVlr6OtbU1l1DSVBNs7zUTE0NnjGLMaJTiUDpw6o1/ zG3vh/XtuvfnKl2KnxDXsl7JP6dpM8n4XD8nbzv0xzP7mkd4QILhR7PaERUC2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD4w70DkNzZRL; Sat, 6 May 2023 11:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346BOs7g091271; Sat, 6 May 2023 11:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346BOsZ5091270; Sat, 6 May 2023 11:24:54 GMT (envelope-from git) Date: Sat, 6 May 2023 11:24:54 GMT Message-Id: <202305061124.346BOsZ5091270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3a8c69c1ff56 - main - amd64 MINIMAL config: remove sentence about acpi List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a8c69c1ff56b8f55a3ca87b1cb2513b5072a150 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3a8c69c1ff56b8f55a3ca87b1cb2513b5072a150 commit 3a8c69c1ff56b8f55a3ca87b1cb2513b5072a150 Author: Konstantin Belousov AuthorDate: 2023-05-06 11:21:13 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-06 11:24:07 +0000 amd64 MINIMAL config: remove sentence about acpi On amd64 ACPI is required to boot, it cannot work as a module, and we do not build the ACPI module for long time. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/conf/MINIMAL | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index e4d2d0febe94..7a3a6a61df8d 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -8,8 +8,6 @@ # Exceptions: # o While UFS is buildable as a module, the current module lacks # some features (ACL, GJOURNAL) that GENERIC includes. -# o acpi as a module has been reported flakey and not well tested, so -# is included in the kernel. # o (non-loaded) random is included due to uncertainty... # o Many networking things are included # From nobody Sat May 6 11:24:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD4w845wNz49T3r; Sat, 6 May 2023 11:24: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 4QD4w82C5zz43x7; Sat, 6 May 2023 11:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVPwj1k8pSNWbGDBh+mVHipazOMfOj/aBh70aazNPxA=; b=yrFg3y6ZryDAfG9QkNGPMUARqkXXkOcodlj7mAMYOzJQuwiufvMc8FVhw2t4R65BiuYrKG JvV0GiaFvxfYDU953CHBhzOO0rYGK6cS+xBFN38Ws+DdUuWQN9/E4cx6dVO3/hH9RVPchg Z/37DXkwGORrHgi3XnLHVx3AxCnjHmSCqtoWDEO9YFBWTWs2MzhemMo01M1bOH867sojho OHB2C3+52Y0v5I/KqN2C3N2uOJg3hLgY6nhFNUXh5P0zCNmvKCE18aCHzefLMUTNlmdVPF V2vMbf437Ep1HrTFz73tlBwlePpNXJUMhWH4WX5kl+cnge2B4f3sPexiF8oSMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVPwj1k8pSNWbGDBh+mVHipazOMfOj/aBh70aazNPxA=; b=lCbfW/MLLiAT4JZVjK3qFHwild2swNPBlZQG1Il+T6Jg4PGymY3v2l7/757qdqoowt/T8H CwgPgINv8VYITxauiuEgv+WEvqKouKxl5Nb+up6bbI52EQCFsKQEIFhjGq9nwWtYdScwnx 728TAHT13R1/KpOmeOpjDkUDFu3vDHjR5fBW5TfdtwRrh3v8CveXGFatgfJiL+6x0RdKQc MwxrPAR19YtVu3iVYwV9z2DFbU8z/69KbPura4yT5NsOQMBM2C49l7HLWpzpTzEeKekM5B gL6oFJpHnZIdX8m5pUdFYW1zyjE5MF0rz5FZIXdXPOL6uYQCyQWPDygbWtarMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683372296; a=rsa-sha256; cv=none; b=gFyPHRNJ4HxXTbECLLtaUt6b0meT+t+v/IhXZohTDmM2pRdo0Gvr0tOzyesS7VPAmZ/lGo +JVNdAL/1bngoek7xjAMdegLTB2MIXjQ9lpA6gqHDuGduY4rOQ55WXmacXaPloXh2SYYH7 XBlGme8PG4JWL5/thsKXTcSCJ8K7ZvrRif4AO4zSSqOqgRUy808RWRW0h3BAWIFabSknQD Vh1SwHIsuZQmd5UuCMBRrxBd9JH5+SPKim7Xkcc6oH1PpX1tM3zXQWXf46/9Kg3HXsrsqM uMwQrmav7F+JtEKj+acT40KCY9BfegtEdn/8qQqQH1M4A1FQfbGxtfkltbxtuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD4w818hJzZRM; Sat, 6 May 2023 11:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346BOutU091290; Sat, 6 May 2023 11:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346BOumL091289; Sat, 6 May 2023 11:24:56 GMT (envelope-from git) Date: Sat, 6 May 2023 11:24:56 GMT Message-Id: <202305061124.346BOumL091289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 38843fe0f27c - main - amd64: add MINIMALUP config List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38843fe0f27cb93dc50a3b0d7ba9a958c0581de7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=38843fe0f27cb93dc50a3b0d7ba9a958c0581de7 commit 38843fe0f27cb93dc50a3b0d7ba9a958c0581de7 Author: Konstantin Belousov AuthorDate: 2023-05-06 11:22:58 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-06 11:24:07 +0000 amd64: add MINIMALUP config This is the MINIMAL config with SMP/NUMA options turned off. Useful to ensure that UP configuration still builds, until it is removed finally. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/conf/MINIMALUP | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/amd64/conf/MINIMALUP b/sys/amd64/conf/MINIMALUP new file mode 100644 index 000000000000..0dbddbe5b341 --- /dev/null +++ b/sys/amd64/conf/MINIMALUP @@ -0,0 +1,4 @@ +include MINIMAL +ident MINIMALUP +nooptions SMP +nooptions NUMA From nobody Sat May 6 13:01:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD74F06gDz49ZFN; Sat, 6 May 2023 13:02:05 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [95.217.20.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD74C6L0bz4GBS; Sat, 6 May 2023 13:02:03 +0000 (UTC) (envelope-from des@des.no) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of des@des.no designates 95.217.20.81 as permitted sender) smtp.mailfrom=des@des.no; dmarc=none Received: from ltc.des.no (unknown [88.169.161.78]) by smtp.des.no (Postfix) with ESMTPSA id ACAF561A2A; Sat, 6 May 2023 13:01:54 +0000 (UTC) Received: by ltc.des.no (Postfix, from userid 1001) id EC8B570D9B; Sat, 6 May 2023 15:01:53 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5807f35c541c - main - dd: Fix SIGINT handling. In-Reply-To: (Konstantin Belousov's message of "Fri, 5 May 2023 21:21:36 +0300") References: <202305051245.345CjNLE048275@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (berkeley-unix) Date: Sat, 06 May 2023 15:01:53 +0200 Message-ID: <86a5yhy5oe.fsf@ltc.des.no> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.03 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.996]; NEURAL_HAM_SHORT(-0.73)[-0.733]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:24940, ipnet:95.217.0.0/16, country:DE]; FREEFALL_USER(0.00)[des]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[des.no]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4QD74C6L0bz4GBS X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Konstantin Belousov writes: > This does not fix SIGINT handler, it only (significantly) reduces the win= dow > where the issue could occur. Yes, it does. I think you fundamentally misunderstand the intent of the patch. I know there is a tiny race but it's still a vast improvement on the original. > See my latest comment on the review. See my reply. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From nobody Sat May 6 17:49:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFRz5dvWz49shK; Sat, 6 May 2023 17:49: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 4QDFRz5Bbmz3FQ9; Sat, 6 May 2023 17:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EU5leFTqzlIisNuYJIS+//RNpMc+oZS6zEUEXtlknwI=; b=Z7TfPaY42dO1qN56nNUkx6VpOFtJDRzoIM5bzF04HpSZkHOJDCz5E8yOcbedyve6jx7fU+ BgHR3mEwPtYeWXubq2KNF0uymtIxZHmwU3q1C/pwW6WyQAK6pq48q/IfFweYTX1eDTNgVY 4HTG8OLesIkfasp6q78m+kAqrZWGfJxboffM6bb3T1thEcsvJVDdUErxV25fPZ6QBmwXCo PCBO/o5QuxcQe5keeAa2eeLO6FCJh8iJkLdoKP5sGEQrKcprwki+nVW+vA1AJrWpnqh7un uQy2tPas1Bg3bBVFe/3wg1GtUFlSdGhfRSfGIUGNFkh3ZkpakWz4k5ZvyCHoTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EU5leFTqzlIisNuYJIS+//RNpMc+oZS6zEUEXtlknwI=; b=nXADm89oEug7aLUdiekqGRf0FPWaicq1SgVibBvXytgS8cIC5XAQPm8czQXR8YYlcwuRt3 V8R9PRxvLHkhXDNt2wfwcHy3fnHmqdSZOKlNvOwTr9+oFQJsEbEFGQNIJSRiLRFZYGeq7K uP8vv41L+hhPhu17Qo1A1aRezf9ES9LZzltupbKMobuVb0XOdXANJpFxAJJfpeTVhfqc3G CC/RsuO96HN0dIDU1IS9nGWiYSdbQSDxKC1Nn2Uf/oggYPO0NikDakJ0DnUzXU1TbsAKUr 9OKEd7+hQpdBf3YlMekz34qCq5os0RcenYIlrcBTznhIa38nBnBKiJ5BGPKBUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395375; a=rsa-sha256; cv=none; b=bkyDy1hhjXSb0pkHf/hBrbLHpmNBikJzgWYuK+0y2TIikCaE+cjGxwmOq2Y5Cl958zLGKH Jz0ewK+8rNRKxutUHHrXGROng2aD2LobOc9eEpODJFE8PbGtUyuPu9QRuGOhcR5aVbmU85 zXkaqJ7/eGClYEn0Z+wfD08mXVGB7UCPq26zVcqr2zWXVs5hWtkxsPNvpemJzuaQHWUFU/ fVa6gC4kJWV1HdS6v5WNTwD6lqFZXh6f+HPQnnFaamSoqksUECqXNyrqZSg1/I7S8Z4RbO xZHrBMqLpeV5l3REHQ4dsDBpL52tNADrP5ydqnErg7Xx6foarLtak/tge2+hXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFRz4HNQzlk3; Sat, 6 May 2023 17:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnZY6017753; Sat, 6 May 2023 17:49:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnZFO017752; Sat, 6 May 2023 17:49:35 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:35 GMT Message-Id: <202305061749.346HnZFO017752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 1be8ef26794d - main - hwpmc: drop vestigial IAP event definitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1be8ef26794dcf93e2f4851474808dc3b34dbcbd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1be8ef26794dcf93e2f4851474808dc3b34dbcbd commit 1be8ef26794dcf93e2f4851474808dc3b34dbcbd Author: Mitchell Horne AuthorDate: 2023-05-05 21:55:54 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: drop vestigial IAP event definitions These are maintained elsewhere. No functional change. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39900 --- sys/dev/hwpmc/pmc_events.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index e1b97f5a1948..dd31107de9e7 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -204,22 +204,6 @@ __PMC_EV_ALIAS("instruction-retired", IAF_INSTR_RETIRED_ANY) \ __PMC_EV_ALIAS("unhalted-core-cycles", IAF_CPU_CLK_UNHALTED_CORE) \ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) - -#define PMC_EV_IAP_FIRST PMC_EV_IAP_ARCH_BR_INS_RET -#define PMC_EV_IAP_LAST PMC_EV_IAP_EVENT_FDH_40H - -/* - * Map "architectural" event names to event ids. - */ -#define __PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ -__PMC_EV_ALIAS("branch-instruction-retired", IAP_ARCH_BR_INS_RET) \ -__PMC_EV_ALIAS("branch-misses-retired", IAP_ARCH_BR_MIS_RET) \ -__PMC_EV_ALIAS("instruction-retired", IAP_ARCH_INS_RET) \ -__PMC_EV_ALIAS("llc-misses", IAP_ARCH_LLC_MIS) \ -__PMC_EV_ALIAS("llc-reference", IAP_ARCH_LLC_REF) \ -__PMC_EV_ALIAS("unhalted-reference-cycles", IAP_ARCH_UNH_REF_CYC) \ -__PMC_EV_ALIAS("unhalted-core-cycles", IAP_ARCH_UNH_COR_CYC) - #define __PMC_EV_UCP() \ __PMC_EV(UCP, EVENT_0CH_04H_E) \ __PMC_EV(UCP, EVENT_0CH_04H_F) \ From nobody Sat May 6 17:49:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS111DFz49skW; Sat, 6 May 2023 17:49: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 4QDFS06lrSz3F1s; Sat, 6 May 2023 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grPlrCt8QZcHRfz//DccM7wWt9nV0OD4GsxRPoYTns8=; b=khXyydQdz3ZInW++clzjaIUPQeoRdi3sjE7MC3vHdxINRNBcbdn3GeKO/4Z4jJzCkfZbmt v2k0jjSjyXH/6R4xOe/ZLDhD1rxuayrm2KwkOkmocudFHGxHDbYCL7Nue1kaWQzlJu8Khc 20OPLMminmR/uKn78Y00llhoo9+xTYStja6u0Ca27hw2jQScXUes4KUzWmF+zr7as/JoKf o36dts6D7hWK/I44tU8cTbzLKlMUN0OjeXczHxE0CGVYqxWZ5EMSWm2V+2LTqn4WkBaz4g XAqk2cjXm82ku+0AxzSRpcuBFC/aYsfIko1W+t1WzOzrAbuulk5YcGpan3xVGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grPlrCt8QZcHRfz//DccM7wWt9nV0OD4GsxRPoYTns8=; b=lSULQ+X+IDFEmbMsOb4N95IgvdZLmjcgTatzupXdT+LEvm/8CqmVI/LJyuXDWSaCg/0WlT nHfUz/6D3x2pNwHIrsejv+vDM7uImYL0FijomhEPrM+kSgZENH0K0RmYwz0LGDU9I/xL4r cUS58X9zGzkqRQ7TV9Ivsq8p382U1w+drrxfkj/OzJjBuH3K7AhPEVoDfuHfuOKJ6sDW19 ZZh/zs3na8npnP8DSo2PTmcIQRdXbeJoJX97ceyRNzNatSPw7y0Ly43DZodnyUU8NDE8of S6LQJ809ZdMKOIF8TbbYvNm/Pc0JmsG6B2lxpSivzfR5TytGbenAXtps6F86Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395377; a=rsa-sha256; cv=none; b=OEbDgTLn+R62of45rkjA5rwrUxPyODSTc1szm3PFw1BZ4INovECUK3FvL4KCK4aIR1LxHD Y05Q1Iv2tysR6Qynt448XxzoRtUfkQ+1dHbLfeckY58le1yqBuKyVCJQwx5YKfGbojF/KL 2v55affR17PpfoofYFYiaDksmdouJrU/EmF61xuQBLbV87A6effmYYP+vKwQkAmN6ncWFq fL55+LoNgi7//0GNEmyhvWtFQOVaF+v5R8TNUUDM77cXpX/t+/ghvdjXAjLZVvrFuuLlgD 5NASw8drL1mnXI71hbKxM2XH79rA0IN7IBdZO4ET7aLu2t8xv3HUQiFc4Js0ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS059S0zmHx; Sat, 6 May 2023 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnaef017772; Sat, 6 May 2023 17:49:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hnahg017771; Sat, 6 May 2023 17:49:36 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:36 GMT Message-Id: <202305061749.346Hnahg017771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: d71a43902072 - main - hwpmc: remove remaining UCP event definitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d71a439020721a9abea5c353b9e03b5dc29d253e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d71a439020721a9abea5c353b9e03b5dc29d253e commit d71a439020721a9abea5c353b9e03b5dc29d253e Author: Mitchell Horne AuthorDate: 2023-05-05 21:56:34 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: remove remaining UCP event definitions Although this block has remained in __PMC_EVENTS(), there is no handling of UCP in libpmc/libpmc.c, so it is not possible to select one of these events. It should therefore be impossible to trigger the code removed from ucp_start_pmc(). Note that the GQ_SNOOP_MSF MSR exists only for Nehalem and Westmere architectures, and the related events do not exist for later generations. The Uncore support in hwpmc has severely atrophied in general. We have uncore event definitions in pmu-events, but the kernel support was written against Intel Performance Measurement Architecture version 2, and is disabled for processor generations later than Westmere. Nehalem and Westmere lack uncore event definitions in pmu-events. I'd be surprised if Uncore support is usable on any machine in its current state. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39901 --- sys/dev/hwpmc/hwpmc_uncore.c | 21 --------------------- sys/dev/hwpmc/pmc_events.h | 12 ------------ 2 files changed, 33 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 577969b47fb7..56373f383dda 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -667,27 +667,6 @@ ucp_start_pmc(int cpu, int ri) "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", cpu, ri, SELECTSEL(uncore_cputype) + ri, evsel); - /* Event specific configuration. */ - switch (pm->pm_event) { - case PMC_EV_UCP_EVENT_0CH_04H_E: - case PMC_EV_UCP_EVENT_0CH_08H_E: - wrmsr(MSR_GQ_SNOOP_MESF,0x2); - break; - case PMC_EV_UCP_EVENT_0CH_04H_F: - case PMC_EV_UCP_EVENT_0CH_08H_F: - wrmsr(MSR_GQ_SNOOP_MESF,0x8); - break; - case PMC_EV_UCP_EVENT_0CH_04H_M: - case PMC_EV_UCP_EVENT_0CH_08H_M: - wrmsr(MSR_GQ_SNOOP_MESF,0x1); - break; - case PMC_EV_UCP_EVENT_0CH_04H_S: - case PMC_EV_UCP_EVENT_0CH_08H_S: - wrmsr(MSR_GQ_SNOOP_MESF,0x4); - break; - default: - break; - } wrmsr(SELECTSEL(uncore_cputype) + ri, evsel); cc->pc_globalctrl |= (1ULL << ri); diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index dd31107de9e7..f0839aa49b5b 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -204,16 +204,6 @@ __PMC_EV_ALIAS("instruction-retired", IAF_INSTR_RETIRED_ANY) \ __PMC_EV_ALIAS("unhalted-core-cycles", IAF_CPU_CLK_UNHALTED_CORE) \ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) -#define __PMC_EV_UCP() \ - __PMC_EV(UCP, EVENT_0CH_04H_E) \ - __PMC_EV(UCP, EVENT_0CH_04H_F) \ - __PMC_EV(UCP, EVENT_0CH_04H_M) \ - __PMC_EV(UCP, EVENT_0CH_04H_S) \ - __PMC_EV(UCP, EVENT_0CH_08H_E) \ - __PMC_EV(UCP, EVENT_0CH_08H_F) \ - __PMC_EV(UCP, EVENT_0CH_08H_M) \ - __PMC_EV(UCP, EVENT_0CH_08H_S) \ - /* * ARMv7 Events */ @@ -2477,8 +2467,6 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) __PMC_EV_K7() \ __PMC_EV_BLOCK(K8, 0x2080) \ __PMC_EV_K8() \ - __PMC_EV_BLOCK(UCP, 0x12080) \ - __PMC_EV_UCP() \ __PMC_EV_BLOCK(PPC7450, 0x13000) \ __PMC_EV_PPC7450() \ __PMC_EV_BLOCK(PPC970, 0x13100) \ From nobody Sat May 6 17:49:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS223SGz49sqd; Sat, 6 May 2023 17:49: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 4QDFS20BFVz3FRK; Sat, 6 May 2023 17:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pFF9qCWaxfvW9Q1KNts0TwiUyaqkD8173EStMLrS7GE=; b=JYMsWUWFb7FQ0CccH2lKF50mnHU9vngQf23q0zxoDe7Ol/m2Ex2wnWttVkuw9BaW3JuQCJ tTnRu8NFRVBJYhc0MDLxiG3wjwg5VhdnEyGKZo1OJzKJ7MgnjNPtefevBOZW+b/qVl9ZJG fzs7B3rEQKuh9RPLjrkjpC+n5cvHU54jPJVOO7z3UhcZGrfpY1OtcyWRyEukU+VWrTSEMw LnD2vHMvyUXovFtBI7BfTtEOM7I5zS+HEeU1poPbWdiwrxdtjE3cvWffLcKFA9g3Y7LGmr DMudHIzoVAitWUuFL02F3Q1QJfYmSQWUW/uNCeMXHdzfL4TGVNeF4Wp1HyLvTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pFF9qCWaxfvW9Q1KNts0TwiUyaqkD8173EStMLrS7GE=; b=vvP8Weq/f7N5rTs6FXPwOYNqLfbwkXOY4+sHtKJati/M3y8rNgdtJpQ+uL7x1WFcLoh53N GG5sh0/CupXZDwcxZZ119MIkxSqeaWOVacJVwVa1kcfEklV7u7JP6f37hLalYkuFGwFh0q qagakOOX06Oa6eIVC76h8HiibczF8jtpjGfU4jeeK+pwFd0NzHW1CUbhBZxQXC4FgIh7OX j8uMk23bTxboGrdhegCXBTeTFGyKc6D6yPqtXvbBc0B/C6K2cYEKLpggnZrVN4RAXS7oe9 8uIUl9wjWUuqs5+hY6huTm+HKKVTzcqc7kMhut0O4t7fXsvwUSjWTHZZWBC9Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395378; a=rsa-sha256; cv=none; b=TYvEHBRDspyv0H28Q1qJLnCU+Z1MCV3D/5Y+GAN160Q3tfumheupb/Qe+3SUERkZRW65au 5YHz3Z2f4HDtCNuHV3s5yO1mMufMocoQvzeecWEb8hYiA00pgVYV/AJzhIPt6Km9tV5sTc IkjPwExhKOxIZiQvE9iMDzehUj/9/QkV4R9htmiLKPY65CJcvnlb4qci0OpZ6XvRlUUzWB l1mqpsjPZ8MDCa/FBYlsUwStwEli+jRWq5Kg4x/rKWRePq3s2RSIZlJtdZR7Hj5ww7KyR/ 9wn5QNr+N6RMWERHNV92Sj8O+BywLGA+atwKccs330/u4J4/a6rSDKziV9ygCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS165BJzlwX; Sat, 6 May 2023 17:49:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnbHS017794; Sat, 6 May 2023 17:49:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnbC5017793; Sat, 6 May 2023 17:49:37 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:37 GMT Message-Id: <202305061749.346HnbC5017793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 6bdf067890ed - main - pmc_events.h: update event list comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bdf067890ed1d1515ad0dbd105848bb11711210 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6bdf067890ed1d1515ad0dbd105848bb11711210 commit 6bdf067890ed1d1515ad0dbd105848bb11711210 Author: Mitchell Horne AuthorDate: 2023-05-05 21:56:55 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 pmc_events.h: update event list comment This comment is no longer in sync with the contents of __PMC_EVENTS(). Update to reflect the removal of various Intel event definitions from this list; these event definitions now come from Linux and live in lib/libpmc/pmu-events/. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39902 --- sys/dev/hwpmc/pmc_events.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index f0839aa49b5b..f7963d3b0789 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -2438,10 +2438,10 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) * 0x2000 0x0080 AMD K7 events * 0x2080 0x0100 AMD K8 events * 0x10000 0x0080 INTEL architectural fixed-function events - * 0x10080 0x0F80 INTEL architectural programmable events - * 0x11000 0x0080 INTEL Pentium 4 events - * 0x11080 0x0080 INTEL Pentium MMX events - * 0x11100 0x0100 INTEL Pentium Pro/P-II/P-III/Pentium-M events + * 0x10080 0x0F80 free (was INTEL architectural programmable events) + * 0x11000 0x0080 free (was INTEL Pentium 4 events) + * 0x11080 0x0080 free (was INTEL Pentium MMX events) + * 0x11100 0x0100 free (was INTEL Pentium Pro/P-II/P-III/Pentium-M events) * 0x11200 0x00FF free (was INTEL XScale events) * 0x11300 0x00FF free (was MIPS 24K events) * 0x11400 0x00FF free (was Octeon events) From nobody Sat May 6 17:49:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS322s5z49sMx; Sat, 6 May 2023 17:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFS30nJtz3FP9; Sat, 6 May 2023 17:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpAfjKFb8fTieYBLvCev6IN8vvfSljVrHcb6WABKzHs=; b=JzKc8gyYpFXZIwxkJIYEdH+LUIgLfCnRzrbwqbSnXqOJX7uibEpFCwOj+c2jw2RJuKvDMS 0KwETQVFf6r8lvWt+zROJArCJObMs45M/p77cdPLU1siS6cW+R8oeC2wZo+B4u19LPF6Pq m33Dzsb2JKKzmtiFbkA48Cxkg0vEVuC20e7DqPt+VvzHmU5I/O4Bo5qQGq0amdptQhcVi/ cnpcdY8ooCa9TaKREMX2ccB1CHo9X03pcZqx/ZN5u8pqyMFtCHS7lBhrm4mk0MvFxYg3he ybLpvamGSiM5qLcM9Jaz60NgYSpjSHEM1MffkECGfHmHVLoH2OEqDR8c6k2iAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpAfjKFb8fTieYBLvCev6IN8vvfSljVrHcb6WABKzHs=; b=vvkLeUTXWH+jZYcPv3PX7SkuboG0EUbW3ZXCdPKcVu2VbjEdBKxVN/uhs1DjPOT2PvKG0w +AWAJbOdmy/ojNGp0Z1AscHAfPC0n3+e2UOVJry9E4ko8hbKTVH8Yrhz7Tzo5+c5HTbqUd YBnD9FJOcu4qHtFKZiInVcnYpxWRAEC89UnMOQW/i//4g6WmXyJe1PwyGorpPZuR693pnR fAZ4E/IwvwcpH/O1BINwpB+WtkK0wkQMlMay9Z2YZrefNlCfLrxcNhICPnVkf/veLw6WAb x5zIM/lIBqAxeyi1AeZ8hOStW7ORFr0r+3WFZNmf5SEhZe1ql1t7uMfakpxT7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395379; a=rsa-sha256; cv=none; b=bf+t53jLamoLoFBs4I/nrzmddYab2OzqvWhWo47Q5W2tKen51TsHa/7wlVHHBpL0hx0wsU kt62rYuKcnjP8gZr+7TQB6aTur+Nb7esQC9WMeaONuSb4mFg6leZ9MqQ8A10vMPBYhc/I8 P9BmAQsu8cJflGnxaozInSzKNWoLOFk3SAYh/f3dJ9Q9/zd5zLga8SN4zPqRJxhkRRQfqU qbnkguMnkmkLSRRd5PsNad3SMqBjeZ0Vr6adwS2i/iz8qZp2aHMWJ+D5LLGb7IEuAv0HUW eqUu7zrFmTU4M6HYKaLYnDFutw97am5Jc+0NcC/n/EVzfr7eOkLtcm4qoBpcxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS270xGzlnG; Sat, 6 May 2023 17:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HncXC017825; Sat, 6 May 2023 17:49:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hncri017823; Sat, 6 May 2023 17:49:38 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:38 GMT Message-Id: <202305061749.346Hncri017823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: b6c9d2a3f892 - main - pmc_events.h: event list formatting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6c9d2a3f892169d4a6acc92869f9d9db52876ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b6c9d2a3f892169d4a6acc92869f9d9db52876ea commit b6c9d2a3f892169d4a6acc92869f9d9db52876ea Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:14 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 pmc_events.h: event list formatting Improve the legibility of the list. Bump overall indentation, fix some whitespace, and sort the IAF block. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39903 --- sys/dev/hwpmc/pmc_events.h | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index f7963d3b0789..5ab87d1be360 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -2458,30 +2458,30 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) * 0x14600 0x0100 ARM CMN-600 events * 0x20000 0x1000 Software events */ -#define __PMC_EVENTS() \ - __PMC_EV_BLOCK(TSC, 0x01000) \ - __PMC_EV_TSC() \ - __PMC_EV_BLOCK(IAF, 0x10000) \ - __PMC_EV_IAF() \ - __PMC_EV_BLOCK(K7, 0x2000) \ - __PMC_EV_K7() \ - __PMC_EV_BLOCK(K8, 0x2080) \ - __PMC_EV_K8() \ - __PMC_EV_BLOCK(PPC7450, 0x13000) \ - __PMC_EV_PPC7450() \ - __PMC_EV_BLOCK(PPC970, 0x13100) \ - __PMC_EV_PPC970() \ - __PMC_EV_BLOCK(E500, 0x13300) \ - __PMC_EV_E500() \ - __PMC_EV_BLOCK(ARMV7, 0x14000) \ - __PMC_EV_ARMV7() \ - __PMC_EV_BLOCK(ARMV8, 0x14100) \ - __PMC_EV_ARMV8() \ - __PMC_EV_BLOCK(DMC620_PMU_CD2, 0x14500) \ - __PMC_EV_DMC620_PMU_CD2() \ - __PMC_EV_BLOCK(DMC620_PMU_C, 0x14520) \ - __PMC_EV_DMC620_PMU_C() \ - __PMC_EV_BLOCK(CMN600_PMU, 0x14600) \ +#define __PMC_EVENTS() \ + __PMC_EV_BLOCK(TSC, 0x01000) \ + __PMC_EV_TSC() \ + __PMC_EV_BLOCK(K7, 0x02000) \ + __PMC_EV_K7() \ + __PMC_EV_BLOCK(K8, 0x02080) \ + __PMC_EV_K8() \ + __PMC_EV_BLOCK(IAF, 0x10000) \ + __PMC_EV_IAF() \ + __PMC_EV_BLOCK(PPC7450, 0x13000) \ + __PMC_EV_PPC7450() \ + __PMC_EV_BLOCK(PPC970, 0x13100) \ + __PMC_EV_PPC970() \ + __PMC_EV_BLOCK(E500, 0x13300) \ + __PMC_EV_E500() \ + __PMC_EV_BLOCK(ARMV7, 0x14000) \ + __PMC_EV_ARMV7() \ + __PMC_EV_BLOCK(ARMV8, 0x14100) \ + __PMC_EV_ARMV8() \ + __PMC_EV_BLOCK(DMC620_PMU_CD2, 0x14500) \ + __PMC_EV_DMC620_PMU_CD2() \ + __PMC_EV_BLOCK(DMC620_PMU_C, 0x14520) \ + __PMC_EV_DMC620_PMU_C() \ + __PMC_EV_BLOCK(CMN600_PMU, 0x14600) \ __PMC_EV_CMN600_PMU() #define PMC_EVENT_FIRST PMC_EV_TSC_TSC From nobody Sat May 6 17:49:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS42D5Jz49sqj; Sat, 6 May 2023 17:49: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 4QDFS41n1Zz3FjX; Sat, 6 May 2023 17:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2ViLG2XzC9wpRfzpT5jCpzwupRZhPbRm5h358seEAM=; b=fK6Qx8/LQrILNlR1P0oYEbdWVo79/dYz56mihu7H81jrq5vwtwq9afJa0sx/tn9pe2hlys Wk0/HTYU2d1ge3ggAEsBwV6XHdzv0bvpMd/QumMCKz9OWbIbHqptCV8JDHhYp4yhIylUBA ug5AcLk0E4pZgROmVhQv8AXCzfdlqWrvLDLtyyiPuFrmDEhnR4fRyjeb+V3ex1+AEpYXIB +oY6a+qXXI0KxmN9SSlijQvwqzXOCjADyEKWB8H5MAHXGB5/rJqipjRh2rHoLzyL8Tagxi cX1JjsVwuPAtRQ78u1doo8Rbtr0yr014j1RxRsWZm2QyHgae2Ey4/iKmDeW3cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2ViLG2XzC9wpRfzpT5jCpzwupRZhPbRm5h358seEAM=; b=B+Ku4I2cQMS9ihZgLDfeJcvjB1PGRZt5kysqwkCY3zHbJ7yCXTCfDdCP40i9c71FkfBE3F OwGcN2+dPItONfcTWh9JiFGaFeGQbZjZ8vTFnVoH7+bnzeQOt/CE+psF/rKFlxLniMtz1l K2I3tfjk2443O7S9IucG17jmFB3Bj28PnqET0+rRFJhGcvEiDuNeSkKBHWbh/WbFdTAJDd KqIBWkIQu75cc0EWpisEldFdgNWDpfUCD82KnaX4pefalPM0ZOCTOet+sI79dqZhD6ScDp iZfJQ7s1doYxFdtolJWrCLTb9T5jzzMWQLAjj/YpGDem6fCToIVTPiDaiAsE0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395380; a=rsa-sha256; cv=none; b=Uw2axOIBsFPZJfyXRm5UCz520Fjdof8F38CSC2WGxaq8XftOToZpt4Bkyy3PEWFDgaPeUJ S3XXcaooKJcE6so6SzyOozxmQ7cl+Jlo2j9w8kb8dN2g+Kq8DAONR8nM1u4kqgroIhHqHD pdaJfMx0OxODaVnEXqRiF9a+PXLy0AVYSiNp8MRPnQA24lBidVD+OX9XsgTHrNA4T6AO+1 tv3fTDTTW8kBSNOUCnEORJdRHXpetZbZGLCjUAl08BZVRbsSp7hy4x/2DbRwSq6Y221puv QA42Axae2CBjFRN5nAXDI//OnyL9i+ngLKYt+a+XO4z05eQzUxDnaWe4iI+M1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS40psMzmHy; Sat, 6 May 2023 17:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hneea017844; Sat, 6 May 2023 17:49:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hne2d017843; Sat, 6 May 2023 17:49:40 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:40 GMT Message-Id: <202305061749.346Hne2d017843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8bd4459560f3 - main - pmccontrol: drop Pentium 4 special case List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bd4459560f39bdbccba76a21539136a7a44b9d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8bd4459560f39bdbccba76a21539136a7a44b9d7 commit 8bd4459560f39bdbccba76a21539136a7a44b9d7 Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:23 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 pmccontrol: drop Pentium 4 special case This is dead code; we no longer support Pentium hardware in libpmc or hwpmc. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- usr.sbin/pmccontrol/pmccontrol.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c index 1130c2c07b20..c1a1040ecfbe 100644 --- a/usr.sbin/pmccontrol/pmccontrol.c +++ b/usr.sbin/pmccontrol/pmccontrol.c @@ -241,11 +241,6 @@ pmcc_do_list_state(void) ncpu = pc->pm_ncpu; for (c = cpu = 0; cpu < ncpu; cpu++) { -#if defined(__i386__) || defined(__amd64__) - if (pc->pm_cputype == PMC_CPU_INTEL_PIV && - CPU_ISSET(cpu, &logical_cpus_mask)) - continue; /* skip P4-style 'logical' cpus */ -#endif if (pmc_pmcinfo(cpu, &pi) < 0) { if (errno == ENXIO) continue; From nobody Sat May 6 17:49:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS53Swtz49skb; Sat, 6 May 2023 17:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFS52gZdz3FSJ; Sat, 6 May 2023 17:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxKiRcdVVL0AlDxbaYAL5sqLR5CEIojhL8CNEr4QA/4=; b=uZk6mSPvC9+y1aSo1ZpAxXUgO3DrKnxAj2fTzRn57/dN4DA1aJdz2d8lzmaVY81dGIyGFn 0czOuTdGowlUXnoTXNoc8q4BEXbonf6IdD7ROcavnqJyBhjYBSXEqjANlL+IjJ5R5cbhRR H3d36/Ox6Kr/B0VYKG+lR/cPLQts4ez2ak6PSzl+RkgVAIRa/BMXYBjzz07DSO0TZGJBpl wbME9nRMiG3D5CqfebFPx0prh3UgWjMHWiOvLuyFwJ+TKpnxpwCkfSnT/1EXB0+T+EKIpV iLu0NcdwZRAw4VnVq9fATmdjITsyA+ilig2nUpu01JGeRcPrsMiyyfUgzblnGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxKiRcdVVL0AlDxbaYAL5sqLR5CEIojhL8CNEr4QA/4=; b=tqUkC/dkdmZmr+9vuX13I0k1nGUz6/uEwkWIu8gDgnL9hIR1H4XkEyXC320jRsa4vi58cn wI9NFwN++ZztOdsW0mSysOYe6NHKMPRRM4vmjfdYTCgv6OE4dTG0cAXfTO1EkGVzOGPbef jfKwI+9zbYcQLkupuYPLOFmbeP2y+uiLeekXC1SwwyqXId+U2lgRE787dLG9BBtM7Jnz4U 3/ZNq1jMLKM6pNCCKaQ7BFd1K3TBDaPiqXn8Fcc/0avgYxijfS09TLFA+5QiqGcrMaNbIt BxdutKO0eL3IaijT4YsYDL+wrj4mFJhuIEHJSMvSAAv4+cmx6oJ8mOBTUvcKzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395381; a=rsa-sha256; cv=none; b=KJrTRSN9uh4lJd4eePUcrQf1x6flGEGb0AaMVhs8crARgjYSvncjAhqAPPi1DLH4B8SajU DDkLeV48Z1kmBvWMN0UhaciAkLVGc8gLSaScZWXIEcj3GOb9oGO7M5Zb3h1x0V0RlVmj1q nB1/ldZihMRVAqt6tLuLxQ6ot0dlWJcfcU3ESBKkm+/ua37wuqiIU8wDh0PqxNOE5CgxG7 tTr6Czc7f6kZekcPbk+ivhwlLo9ZfcmoeYOJ+63ooGhYPDRzGCjT6h2IiwMKra7m+xAlaO LB5S/RljIYbi9cg7RTSE7ieQKdgnmLhwbEXCkoPDpPNO/vp0R8oHEjiHv9V02g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS51l5gzm6Y; Sat, 6 May 2023 17:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnfVC017871; Sat, 6 May 2023 17:49:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hnfn1017870; Sat, 6 May 2023 17:49:41 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:41 GMT Message-Id: <202305061749.346Hnfn1017870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: ca43b2ae3ef2 - main - hwpmc: trim obsolete Intel CPU and class defs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca43b2ae3ef2ed86b0df36296464d7830b61b944 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ca43b2ae3ef2ed86b0df36296464d7830b61b944 commit ca43b2ae3ef2ed86b0df36296464d7830b61b944 Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:38 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: trim obsolete Intel CPU and class defs No functional change. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39904 --- sys/dev/hwpmc/hwpmc_intel.c | 2 +- sys/i386/include/pmc_mdep.h | 4 ---- sys/sys/pmc.h | 10 ---------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c index 894f9c07b622..c51e74f34516 100644 --- a/sys/dev/hwpmc/hwpmc_intel.c +++ b/sys/dev/hwpmc/hwpmc_intel.c @@ -99,7 +99,7 @@ pmc_intel_initialize(void) family, model, stepping); switch (cpu_id & 0xF00) { - case 0x600: /* Pentium Pro, Celeron, Pentium II & III */ + case 0x600: switch (model) { case 0xE: cputype = PMC_CPU_INTEL_CORE; diff --git a/sys/i386/include/pmc_mdep.h b/sys/i386/include/pmc_mdep.h index a868ce11c3ca..3d498e006a36 100644 --- a/sys/i386/include/pmc_mdep.h +++ b/sys/i386/include/pmc_mdep.h @@ -45,10 +45,6 @@ struct pmc_mdep; * TSC The timestamp counter * K7 AMD Athlon XP/MP and other 32 bit processors. * K8 AMD Athlon64 and Opteron PMCs in 32 bit mode. - * PIV Intel P4/HTT and P4/EMT64 - * PPRO Intel Pentium Pro, Pentium-II, Pentium-III, Celeron and - * Pentium-M processors - * PENTIUM Intel Pentium MMX. * IAP Intel Core/Core2/Atom programmable PMCs. * IAF Intel fixed-function PMCs. * UCP Intel Uncore programmable PMCs. diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 8d25ecad721d..fb99e22ff232 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -86,13 +86,6 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; #define __PMC_CPUS() \ __PMC_CPU(AMD_K7, 0x00, "AMD K7") \ __PMC_CPU(AMD_K8, 0x01, "AMD K8") \ - __PMC_CPU(INTEL_P5, 0x80, "Intel Pentium") \ - __PMC_CPU(INTEL_P6, 0x81, "Intel Pentium Pro") \ - __PMC_CPU(INTEL_CL, 0x82, "Intel Celeron") \ - __PMC_CPU(INTEL_PII, 0x83, "Intel Pentium II") \ - __PMC_CPU(INTEL_PIII, 0x84, "Intel Pentium III") \ - __PMC_CPU(INTEL_PM, 0x85, "Intel Pentium M") \ - __PMC_CPU(INTEL_PIV, 0x86, "Intel Pentium IV") \ __PMC_CPU(INTEL_CORE, 0x87, "Intel Core Solo/Duo") \ __PMC_CPU(INTEL_CORE2, 0x88, "Intel Core2") \ __PMC_CPU(INTEL_CORE2EXTREME, 0x89, "Intel Core2 Extreme") \ @@ -155,9 +148,6 @@ enum pmc_cputype { __PMC_CLASS(TSC, 0x00, "CPU Timestamp counter") \ __PMC_CLASS(K7, 0x01, "AMD K7 performance counters") \ __PMC_CLASS(K8, 0x02, "AMD K8 performance counters") \ - __PMC_CLASS(P5, 0x03, "Intel Pentium counters") \ - __PMC_CLASS(P6, 0x04, "Intel Pentium Pro counters") \ - __PMC_CLASS(P4, 0x05, "Intel Pentium-IV counters") \ __PMC_CLASS(IAF, 0x06, "Intel Core2/Atom, fixed function") \ __PMC_CLASS(IAP, 0x07, "Intel Core...Atom, programmable") \ __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ From nobody Sat May 6 17:49:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS64TMvz49ssG; Sat, 6 May 2023 17:49: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 4QDFS63d7Jz3FfW; Sat, 6 May 2023 17:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSi6dpIMQm1qys1MHxnNYw5jGZb4bDFs26u9f2gIIa4=; b=LdtCnfEkbmm/4Uy+7uwRiusrP29vvErF6huOTb9FzhRojck8Gk11/mRS0aIzHEA3VXu5SS QX5h6xarIzADsGe0+uI/YfMhHH/W+8g3jHNvBF1A+IJDosZvbvZplCqo6QRWioe1vd9v6z o5Td+c7ahYe59BPTv2wua44xp2vUYngoS9TllKSY+bJ+KUMx9k7zWdcu7yRl3PgDHXUbuV w9TXK8ujCvYyKGTb2BfvdRWR0sC/xFQS7nOCxKOBwY37lb7I6ICnA/GrDjiuLRC30Bdpkm E8O+9jOK3uteVmEeGNXn4ARmE82wK6ZhhMc7GQs1vp8HPTh+GxPV6IlrSFAdiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSi6dpIMQm1qys1MHxnNYw5jGZb4bDFs26u9f2gIIa4=; b=s0yWX0bqJ6JtSL3HdHOeep5SwPwBOPpIJ5dCo2ZwKbG6/Sgm7FNlih5vw7qbgFQUEqwW1e +zXlWm/OFZds/6bW9PDe3H+oA6Gn5kC8aL/RDKLe3JIWSqL1ruOnOPSfbciS8tue+gkT0v BNtLCEgCKQwG+ih5pUayXNp+xOycTSrgexmTrQ8Dj10agK1FAnPKVXTLtyUWqxGGNckXjw DGo+n9/vZQI1yl8dWF/8nO0TEHtnR2TDEZSrM8Us95P1VeVJVG+krFUmDSHfhVZl9Q3hQR 6wuSZuRR/J3vWtcshoiK/II6FjXi05d+o40wmu2AGmCqtJZVgXm7AESbzjzCog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395382; a=rsa-sha256; cv=none; b=LV79CRr/aNiGtS6Bk0nOG12Hcvwg1QeBgtKUiMiSOky+sewt/tHWqKvwf8UGnLkuGebUb8 N2Abpho8zy7PLsyNfMdVJZ0KmlHOAvSJgprySCKDCK2jMeJskHcBNN5OWKgMwU5NqLcfmV PryzFAA0MmGOhbvhyk84AfrJaxGNK9IHF7tml+JPEB7T58EBk15bnkXGfCGfLxcFLghhqu xi64Yl3M3OScLafjT6Q2CUw0Z3BHCM5onaRQ5Hq+i+bl7TEPLLDN/mHEDbmSH70HlY247b 5COMrt6g6wqUPY2vmO3PhMr6Fxa2U9Ck6GNQJEjN2/EapVC33jvWkRcBgkJWJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS62jZTzlwY; Sat, 6 May 2023 17:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hngvv017890; Sat, 6 May 2023 17:49:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HngwM017889; Sat, 6 May 2023 17:49:42 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:42 GMT Message-Id: <202305061749.346HngwM017889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 3c8b7f49d0eb - main - hwpmc: trim MIPS CPU and class defs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c8b7f49d0eb0eb448a68939aa7cccbd1f617520 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3c8b7f49d0eb0eb448a68939aa7cccbd1f617520 commit 3c8b7f49d0eb0eb448a68939aa7cccbd1f617520 Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:44 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: trim MIPS CPU and class defs MIPS is gone, and this is the last remaining bit in the pmc code. Reviewed by: jkoshy, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39905 --- sys/sys/pmc.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index fb99e22ff232..6a9f614bcbc8 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -112,10 +112,6 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; __PMC_CPU(INTEL_ATOM_GOLDMONT_P, 0x9E, "Intel Atom Goldmont Plus") \ __PMC_CPU(INTEL_ATOM_TREMONT, 0x9F, "Intel Atom Tremont") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ - __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ - __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ - __PMC_CPU(MIPS_74K, 0x202, "MIPS 74K") \ - __PMC_CPU(MIPS_BERI, 0x203, "BERI") \ __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ @@ -153,16 +149,12 @@ enum pmc_cputype { __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ __PMC_CLASS(UCP, 0x09, "Intel Uncore programmable") \ __PMC_CLASS(XSCALE, 0x0A, "Intel XScale counters") \ - __PMC_CLASS(MIPS24K, 0x0B, "MIPS 24K") \ - __PMC_CLASS(OCTEON, 0x0C, "Cavium Octeon") \ __PMC_CLASS(PPC7450, 0x0D, "Motorola MPC7450 class") \ __PMC_CLASS(PPC970, 0x0E, "IBM PowerPC 970 class") \ __PMC_CLASS(SOFT, 0x0F, "Software events") \ __PMC_CLASS(ARMV7, 0x10, "ARMv7") \ __PMC_CLASS(ARMV8, 0x11, "ARMv8") \ - __PMC_CLASS(MIPS74K, 0x12, "MIPS 74K") \ __PMC_CLASS(E500, 0x13, "Freescale e500 class") \ - __PMC_CLASS(BERI, 0x14, "MIPS BERI") \ __PMC_CLASS(POWER8, 0x15, "IBM POWER8 class") \ __PMC_CLASS(DMC620_PMU_CD2, 0x16, "ARM DMC620 Memory Controller PMU CLKDIV2") \ __PMC_CLASS(DMC620_PMU_C, 0x17, "ARM DMC620 Memory Controller PMU CLK") \ From nobody Sat May 6 17:49:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS8095Pz49skf; Sat, 6 May 2023 17:49: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 4QDFS74YfCz3FsT; Sat, 6 May 2023 17:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DrBiTKUoDcAjmJFRtKUYyT0sY4v3O1SMgxA2uocYbWc=; b=GrgqU1Y9IFgQgp3w1pwt2Dinp+17HSztB9dojO73qK/MY7mpwB5rCqO4B+sGlWElP008CW DXWJxlRKglOsJ2FEyRm+J+37ygcBP4ifQmsFMWHN/V0tCRqtesggTImY03Vin0rc4Mu14l C7zwtiDWo1OzXcs+dw8ozQ39rvF73b1XmQXETO+uOih+BcwdMEVDAWNdMBOA8gbNU/nOUR qXS2Su5YPZ9iGnOcVJRLmWHk/LphLZQta3dBnwA7dtg3d6F9y8SAJ3ohayp4zb7fvJA49D jU9k+M3PmtIH9SZIDTUKodMKiVUmQwVirbNeMIB8miMf66k3ndvdA5Lc7VRHXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DrBiTKUoDcAjmJFRtKUYyT0sY4v3O1SMgxA2uocYbWc=; b=CbVUCcbuXzPErTY74EsQji717p+FyQ2Nlonlw76WyZdBcqbWaMjrOZJ/H7mae64LMi4CSg p6Fzg0u4Qvht9DH+KhCXeJxSk4NpeDSjD8fsE1c68KAH7dtetM3aYs8yAkCP3ylRuDMQ5r tKka2lbXAwbIm2TaOf13nOwv9kV1coEMndrRUgofku475JjSu7CvBJN3e1R/xG27P/qakq uuMU/Yl8z6BlrCqnmeoiOu/8aDfW7gz/WyzlVGsx6hx7FTxUZ5Ok9N5qblqMRDaIEfKmzo eLufXs0oI6AuHFmtsusjO/dBkUYAXWfLjqysNb+4qNKBoNlMS8Egq2cA4mFV5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395383; a=rsa-sha256; cv=none; b=EPSnq2CR5HM5ohbDcKR6OoVAUNPOUSb3U8JNN+BJVUvsq5A5K03hRDNF53CXS9+mBp8QWc EKyRRhA8jw/XHi8GGbqeOQvBOc2zZ1brk8riCJwmKpse9+K9hHuwieiY2RdOMIZL/tpts+ o0eKX+qkfqv/d0+uW94gRiigndhpzdMdz5KJCJAeTCRX3bQMeFut2poMXgm7TNj5fHjkA8 f933uIcRodLe+Lgel/PlJoj3zFRMKVMn0wUIwCPtb6LQQqmN6bvQrvFT+iL6krcMLI30g0 DagN1AGuxzIeFThTL8xqO9TH5/W1cgmr35AqWirjHeb0wNy7c08fC5Yp4ovF1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS73SBszlFc; Sat, 6 May 2023 17:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnh22017910; Sat, 6 May 2023 17:49:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnhDd017909; Sat, 6 May 2023 17:49:43 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:43 GMT Message-Id: <202305061749.346HnhDd017909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 7253dc57a0b4 - main - hwpmc: formatting of CPU and class lists List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7253dc57a0b400ff745a43017928304ff8dcf33f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7253dc57a0b400ff745a43017928304ff8dcf33f commit 7253dc57a0b400ff745a43017928304ff8dcf33f Author: Mitchell Horne AuthorDate: 2023-05-05 21:58:13 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: formatting of CPU and class lists The end result is much more legible in both cases. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39906 --- sys/sys/pmc.h | 126 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 62 insertions(+), 64 deletions(-) diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 6a9f614bcbc8..558fe4b20d39 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -82,50 +82,49 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; * * Please keep the pmc(3) manual page in sync with this list. */ - -#define __PMC_CPUS() \ - __PMC_CPU(AMD_K7, 0x00, "AMD K7") \ - __PMC_CPU(AMD_K8, 0x01, "AMD K8") \ - __PMC_CPU(INTEL_CORE, 0x87, "Intel Core Solo/Duo") \ - __PMC_CPU(INTEL_CORE2, 0x88, "Intel Core2") \ - __PMC_CPU(INTEL_CORE2EXTREME, 0x89, "Intel Core2 Extreme") \ - __PMC_CPU(INTEL_ATOM, 0x8A, "Intel Atom") \ - __PMC_CPU(INTEL_COREI7, 0x8B, "Intel Core i7") \ - __PMC_CPU(INTEL_WESTMERE, 0x8C, "Intel Westmere") \ - __PMC_CPU(INTEL_SANDYBRIDGE, 0x8D, "Intel Sandy Bridge") \ - __PMC_CPU(INTEL_IVYBRIDGE, 0x8E, "Intel Ivy Bridge") \ - __PMC_CPU(INTEL_SANDYBRIDGE_XEON, 0x8F, "Intel Sandy Bridge Xeon") \ - __PMC_CPU(INTEL_IVYBRIDGE_XEON, 0x90, "Intel Ivy Bridge Xeon") \ - __PMC_CPU(INTEL_HASWELL, 0x91, "Intel Haswell") \ - __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ - __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ - __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ - __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ - __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ - __PMC_CPU(INTEL_BROADWELL_XEON, 0x97, "Intel Broadwell Xeon") \ - __PMC_CPU(INTEL_SKYLAKE, 0x98, "Intel Skylake") \ - __PMC_CPU(INTEL_SKYLAKE_XEON, 0x99, "Intel Skylake Xeon") \ - __PMC_CPU(INTEL_ATOM_GOLDMONT, 0x9A, "Intel Atom Goldmont") \ - __PMC_CPU(INTEL_ICELAKE, 0x9B, "Intel Icelake") \ - __PMC_CPU(INTEL_ICELAKE_XEON, 0x9C, "Intel Icelake Xeon") \ - __PMC_CPU(INTEL_ALDERLAKE, 0x9D, "Intel Alderlake") \ - __PMC_CPU(INTEL_ATOM_GOLDMONT_P, 0x9E, "Intel Atom Goldmont Plus") \ - __PMC_CPU(INTEL_ATOM_TREMONT, 0x9F, "Intel Atom Tremont") \ - __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ - __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ - __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ - __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ - __PMC_CPU(PPC_POWER8, 0x390, "IBM POWER8") \ - __PMC_CPU(GENERIC, 0x400, "Generic") \ - __PMC_CPU(ARMV7_CORTEX_A5, 0x500, "ARMv7 Cortex A5") \ - __PMC_CPU(ARMV7_CORTEX_A7, 0x501, "ARMv7 Cortex A7") \ - __PMC_CPU(ARMV7_CORTEX_A8, 0x502, "ARMv7 Cortex A8") \ - __PMC_CPU(ARMV7_CORTEX_A9, 0x503, "ARMv7 Cortex A9") \ - __PMC_CPU(ARMV7_CORTEX_A15, 0x504, "ARMv7 Cortex A15") \ - __PMC_CPU(ARMV7_CORTEX_A17, 0x505, "ARMv7 Cortex A17") \ - __PMC_CPU(ARMV8_CORTEX_A53, 0x600, "ARMv8 Cortex A53") \ - __PMC_CPU(ARMV8_CORTEX_A57, 0x601, "ARMv8 Cortex A57") \ - __PMC_CPU(ARMV8_CORTEX_A76, 0x602, "ARMv8 Cortex A76") +#define __PMC_CPUS() \ + __PMC_CPU(AMD_K7, 0x00, "AMD K7") \ + __PMC_CPU(AMD_K8, 0x01, "AMD K8") \ + __PMC_CPU(INTEL_CORE, 0x87, "Intel Core Solo/Duo") \ + __PMC_CPU(INTEL_CORE2, 0x88, "Intel Core2") \ + __PMC_CPU(INTEL_CORE2EXTREME, 0x89, "Intel Core2 Extreme") \ + __PMC_CPU(INTEL_ATOM, 0x8A, "Intel Atom") \ + __PMC_CPU(INTEL_COREI7, 0x8B, "Intel Core i7") \ + __PMC_CPU(INTEL_WESTMERE, 0x8C, "Intel Westmere") \ + __PMC_CPU(INTEL_SANDYBRIDGE, 0x8D, "Intel Sandy Bridge") \ + __PMC_CPU(INTEL_IVYBRIDGE, 0x8E, "Intel Ivy Bridge") \ + __PMC_CPU(INTEL_SANDYBRIDGE_XEON, 0x8F, "Intel Sandy Bridge Xeon") \ + __PMC_CPU(INTEL_IVYBRIDGE_XEON, 0x90, "Intel Ivy Bridge Xeon") \ + __PMC_CPU(INTEL_HASWELL, 0x91, "Intel Haswell") \ + __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ + __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ + __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ + __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ + __PMC_CPU(INTEL_BROADWELL_XEON, 0x97, "Intel Broadwell Xeon") \ + __PMC_CPU(INTEL_SKYLAKE, 0x98, "Intel Skylake") \ + __PMC_CPU(INTEL_SKYLAKE_XEON, 0x99, "Intel Skylake Xeon") \ + __PMC_CPU(INTEL_ATOM_GOLDMONT, 0x9A, "Intel Atom Goldmont") \ + __PMC_CPU(INTEL_ICELAKE, 0x9B, "Intel Icelake") \ + __PMC_CPU(INTEL_ICELAKE_XEON, 0x9C, "Intel Icelake Xeon") \ + __PMC_CPU(INTEL_ALDERLAKE, 0x9D, "Intel Alderlake") \ + __PMC_CPU(INTEL_ATOM_GOLDMONT_P, 0x9E, "Intel Atom Goldmont Plus") \ + __PMC_CPU(INTEL_ATOM_TREMONT, 0x9F, "Intel Atom Tremont") \ + __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ + __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ + __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ + __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ + __PMC_CPU(PPC_POWER8, 0x390, "IBM POWER8") \ + __PMC_CPU(GENERIC, 0x400, "Generic") \ + __PMC_CPU(ARMV7_CORTEX_A5, 0x500, "ARMv7 Cortex A5") \ + __PMC_CPU(ARMV7_CORTEX_A7, 0x501, "ARMv7 Cortex A7") \ + __PMC_CPU(ARMV7_CORTEX_A8, 0x502, "ARMv7 Cortex A8") \ + __PMC_CPU(ARMV7_CORTEX_A9, 0x503, "ARMv7 Cortex A9") \ + __PMC_CPU(ARMV7_CORTEX_A15, 0x504, "ARMv7 Cortex A15") \ + __PMC_CPU(ARMV7_CORTEX_A17, 0x505, "ARMv7 Cortex A17") \ + __PMC_CPU(ARMV8_CORTEX_A53, 0x600, "ARMv8 Cortex A53") \ + __PMC_CPU(ARMV8_CORTEX_A57, 0x601, "ARMv8 Cortex A57") \ + __PMC_CPU(ARMV8_CORTEX_A76, 0x602, "ARMv8 Cortex A76") enum pmc_cputype { #undef __PMC_CPU @@ -139,26 +138,25 @@ enum pmc_cputype { /* * Classes of PMCs */ - -#define __PMC_CLASSES() \ - __PMC_CLASS(TSC, 0x00, "CPU Timestamp counter") \ - __PMC_CLASS(K7, 0x01, "AMD K7 performance counters") \ - __PMC_CLASS(K8, 0x02, "AMD K8 performance counters") \ - __PMC_CLASS(IAF, 0x06, "Intel Core2/Atom, fixed function") \ - __PMC_CLASS(IAP, 0x07, "Intel Core...Atom, programmable") \ - __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ - __PMC_CLASS(UCP, 0x09, "Intel Uncore programmable") \ - __PMC_CLASS(XSCALE, 0x0A, "Intel XScale counters") \ - __PMC_CLASS(PPC7450, 0x0D, "Motorola MPC7450 class") \ - __PMC_CLASS(PPC970, 0x0E, "IBM PowerPC 970 class") \ - __PMC_CLASS(SOFT, 0x0F, "Software events") \ - __PMC_CLASS(ARMV7, 0x10, "ARMv7") \ - __PMC_CLASS(ARMV8, 0x11, "ARMv8") \ - __PMC_CLASS(E500, 0x13, "Freescale e500 class") \ - __PMC_CLASS(POWER8, 0x15, "IBM POWER8 class") \ - __PMC_CLASS(DMC620_PMU_CD2, 0x16, "ARM DMC620 Memory Controller PMU CLKDIV2") \ - __PMC_CLASS(DMC620_PMU_C, 0x17, "ARM DMC620 Memory Controller PMU CLK") \ - __PMC_CLASS(CMN600_PMU, 0x18, "Arm CoreLink CMN600 Coherent Mesh Network PMU") +#define __PMC_CLASSES() \ + __PMC_CLASS(TSC, 0x00, "CPU Timestamp counter") \ + __PMC_CLASS(K7, 0x01, "AMD K7 performance counters") \ + __PMC_CLASS(K8, 0x02, "AMD K8 performance counters") \ + __PMC_CLASS(IAF, 0x06, "Intel Core2/Atom, fixed function") \ + __PMC_CLASS(IAP, 0x07, "Intel Core...Atom, programmable") \ + __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ + __PMC_CLASS(UCP, 0x09, "Intel Uncore programmable") \ + __PMC_CLASS(XSCALE, 0x0A, "Intel XScale counters") \ + __PMC_CLASS(PPC7450, 0x0D, "Motorola MPC7450 class") \ + __PMC_CLASS(PPC970, 0x0E, "IBM PowerPC 970 class") \ + __PMC_CLASS(SOFT, 0x0F, "Software events") \ + __PMC_CLASS(ARMV7, 0x10, "ARMv7") \ + __PMC_CLASS(ARMV8, 0x11, "ARMv8") \ + __PMC_CLASS(E500, 0x13, "Freescale e500 class") \ + __PMC_CLASS(POWER8, 0x15, "IBM POWER8 class") \ + __PMC_CLASS(DMC620_PMU_CD2, 0x16, "ARM DMC620 Memory Controller PMU CLKDIV2") \ + __PMC_CLASS(DMC620_PMU_C, 0x17, "ARM DMC620 Memory Controller PMU CLK") \ + __PMC_CLASS(CMN600_PMU, 0x18, "Arm CoreLink CMN600 Coherent Mesh Network PMU") enum pmc_class { #undef __PMC_CLASS From nobody Sat May 6 17:49:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS86Tw3z49sqw; Sat, 6 May 2023 17:49: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 4QDFS85z00z3Fvl; Sat, 6 May 2023 17:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4nWuze1QBr54MbGv4N7djvR8lC6DO/UInv3QEeGExsw=; b=cA283xv2VS7ldmna4Q/YvFn5ME1T53AIQdxj0VC2XkJgO8Nj5MMMJs+e5WDdWFykBmKckT pPPP5Ufe2hrEoJrKmYNZGwIucKnOmnfTXaW1qTror5zKTpfekOxlefPM9lFrl5cOx05dvF AE6JNZco/IVdsOTgQH13mN8sY+pf4JhAm+EAiRyNkgpD+3vMD2LMb1UvlatqBmgps6MM0c LRhI92FwpHuapBjWXympOuR1H37pm/8zVOEvvXTN+TYnUTPBT2kHQL1RFsM84R9ZA2OmZU NBefBvUliI8YvAbkZV+bUZVp29RnCdF0XEPFx3PazWD/Wm3H5rFv0eB+gvbM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4nWuze1QBr54MbGv4N7djvR8lC6DO/UInv3QEeGExsw=; b=RoTYzVfsAcHhv+DLEgkKm1LKn6tzANFF+kclns7w7Q68zmWOfG5a/Z9sqzC/T/VSxZKfGi ZLuLisleuG6Z5KcQqjUr7iiI56gIYocD5waVxbuVvV68ZPHE9Osel4I5Pswwi5hIZBGg21 5VZR60NgO7SoXT5SPF2SOD3Lj9E+O65eZ4SdOScPyO9fCapNB1hG8klfOQZadzU/g+l7As i1fNhrcgcDW1KGSAkN5VsbU7qlgoLrisrTarK4rBCUSX4iZMi5io8ycbS74qc4qqmQXZuZ riiy3+iZ0+HTPBZSjILKJtUt5obzfxJPFZuWsq+m3XS66HqVMDnkPfQ/NY6OKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395384; a=rsa-sha256; cv=none; b=ddw6GheXF/3VOJNdaj7T+BDDHPXR7FbsvA9YnjwX8EYKekQnNK2mpIStBXje6/uFQKGU49 H2iQWYBc7dRJrjXb9b6Rhty4+A1dUwf3uvZqrOCNFgCl9AzSiodoA7CKS+z37GDZ0yiiZS w66ads3APenBOP+yCT647o+Koi1rNHrV8KUKxLbuUGW3/1PlTgZjuAOiVXv+NwNqcsoKu3 4+zJlOP2wlh+eyxOaxgzUEIV0xJNKqsn9El0GHGXWFDOq0zga6J8wuti1NjNrO6y8ri4Ph gNmISD4tphQLURcb68shlZgrN3rWHWMmB2Kpk5fJV7fVkaYA3SZWa3JSUYLD5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS84jjTzlgl; Sat, 6 May 2023 17:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hni79017935; Sat, 6 May 2023 17:49:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HniGp017934; Sat, 6 May 2023 17:49:44 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:44 GMT Message-Id: <202305061749.346HniGp017934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: bf66159342e8 - main - pmcstat: augment an error message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf66159342e86b1dba02f1c463b47dd96fb09969 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=bf66159342e86b1dba02f1c463b47dd96fb09969 commit bf66159342e86b1dba02f1c463b47dd96fb09969 Author: Mitchell Horne AuthorDate: 2023-05-05 21:58:23 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 pmcstat: augment an error message It also applies to the -t argument. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39907 --- usr.sbin/pmcstat/pmcstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index 81fa4c75d58e..ed3ee70e20ce 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -983,7 +983,7 @@ main(int argc, char **argv) if ((args.pa_required & FLAG_HAS_PROCESS_PMCS) && (args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0) errx(EX_USAGE, -"ERROR: options -d, -E, and -W require a process mode PMC to be specified." +"ERROR: options -d, -E, -t, and -W require a process mode PMC to be specified." ); /* check for -c cpu with no system mode PMCs or logfile. */ From nobody Sat May 6 17:49:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSB0M1zz49sT6; Sat, 6 May 2023 17:49: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 4QDFS96gflz3FnQ; Sat, 6 May 2023 17:49:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuE5dMddArkSVw/Uk8sdxHOEBC6ckdco0N6G8FeyrjA=; b=mWX5SErzoTCnNnAs5NJx7n9iiCwPFHiOQhGDKj5o/+QbRosGdAdVucBq7L1EgcHrLv/Eye ULyYHZL+7qMOtKQkwjay9t2RPLCPwUppNmPGAizM6cxRDEBMNZzZq5g/NkvKHQEgX2QEsL zGAIm50rfMMs8BQq1RU5pP1upD1vQc0isPTYorv9wSt80DpR9VhUl2eHVwrngmPdHKlaal TYpuA5ajLssnhL/sGnHJJd4uG9ucX+8AI84Hf1t90taVoieBrzWfIFKU+PSraqB+BbBR2S SirdPhzRkkOWYxhXi4blewjBSayi/5drbWrwYVSWsJhfxMkHn/S6OOuDrc8oyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuE5dMddArkSVw/Uk8sdxHOEBC6ckdco0N6G8FeyrjA=; b=IUaXAIM6H0LC7WNvASxGGOMEpKAU8v4VTSH0s2eRL9hoOQ5AEsodGv+3epM7jHvezsRlvU axhqoYznQ7SkRBqIhkDeN+u9UBB1u/feVgeh6cHrdoQsXr2VtWcoqSKG6dvBcX0UDZ5x/j QoM50wqSuitdGsd6ELDiP0OhA2YeUyO5MQjNESvVD8tLB6elDUhLVqswb5AYFeW4CSkhkm r7C+aneWgqz+VfegtHWh6Nh3bVzvlIRsWWuxv5ESJ+yX2pR2Pjn5HFABCh72VT9k57JQbg o0ILRSdfd7strb131383MIY90B0YPzQO48R3P8cdcTQwaxWPZwYqpNwID0gjZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395386; a=rsa-sha256; cv=none; b=Hy6KLliVcniXypqocRkj3tAuOsL38qEMiMj37fE1b3JwDUIN/IrBcQR0GNywIe/88Lj448 G8zywEASo6m88/gMo22sRemvpk6FvxYq72MgJ4HddiZ0OzPFBS8W5v3nxJA4Am+KnoNcZQ riOP90WlTtAjuWnWf6bba/d7z88RDW0WlHWhgigzYp8E3g8wUqgY3R4O0AzMn1/cAZodae n9DhZ0CEgJPvG4E34iB9ij9eBL0AiLkETP8aOa2kA9fTK/KCtkGoxL8c4O0wATY2t4JMCf Re6TfEYkQ9kLQRMg3SmxKOfcNm1f3vkjsjmX5ic/rHjphvcDJRx39KcXvnbLXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS95ltczm8k; Sat, 6 May 2023 17:49:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnjqD017956; Sat, 6 May 2023 17:49:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnjS9017955; Sat, 6 May 2023 17:49:45 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:45 GMT Message-Id: <202305061749.346HnjS9017955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 5387495773e9 - main - hwpmc: simplify arm64 kernel stack unwinding List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5387495773e9e92441b795c0eb8c2a3ecc25708a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5387495773e9e92441b795c0eb8c2a3ecc25708a commit 5387495773e9e92441b795c0eb8c2a3ecc25708a Author: Mitchell Horne AuthorDate: 2023-05-05 21:58:40 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: simplify arm64 kernel stack unwinding Use the unwind_frame() function, which properly validates the frame pointer and uses ADDR_MAKE_CANONICAL() for the pc, required when PAC is enabled. Reviewed by: andrew, markj, jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39934 --- sys/dev/hwpmc/hwpmc_arm64_md.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64_md.c b/sys/dev/hwpmc/hwpmc_arm64_md.c index 59d33ef34d06..dd51f7bd18d5 100644 --- a/sys/dev/hwpmc/hwpmc_arm64_md.c +++ b/sys/dev/hwpmc/hwpmc_arm64_md.c @@ -62,7 +62,8 @@ int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { - uintptr_t pc, r, stackstart, stackend, fp; + struct unwind_state frame; + uintptr_t stackstart, stackend; struct thread *td; int count; @@ -70,38 +71,26 @@ pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, __LINE__)); td = curthread; - pc = PMC_TRAPFRAME_TO_PC(tf); - *cc++ = pc; + frame.pc = PMC_TRAPFRAME_TO_PC(tf); + *cc++ = frame.pc; if (maxsamples <= 1) return (1); stackstart = (uintptr_t) td->td_kstack; stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; - fp = PMC_TRAPFRAME_TO_FP(tf); + frame.fp = PMC_TRAPFRAME_TO_FP(tf); - if (!PMC_IN_KERNEL(pc) || - !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(frame.pc) || + !PMC_IN_KERNEL_STACK(frame.fp, stackstart, stackend)) return (1); for (count = 1; count < maxsamples; count++) { - /* Use saved lr as pc. */ - r = fp + sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) - break; - pc = *(uintptr_t *)r; - if (!PMC_IN_KERNEL(pc)) - break; - - *cc++ = pc; - - /* Switch to next frame up */ - r = fp; - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + if (!unwind_frame(curthread, &frame)) break; - fp = *(uintptr_t *)r; - if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(frame.pc)) break; + *cc++ = frame.pc; } return (count); From nobody Sat May 6 17:49:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSC194Wz49skp; Sat, 6 May 2023 17:49: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 4QDFSC0ck6z3G8r; Sat, 6 May 2023 17:49:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i11sIVMsgx+/N88m4IuCoA7oaMvutuJoKFtjwzro8C0=; b=Wbxx99QJBOlznd9ROXNPwf9+R1Y/lOOe/maw9WlYw0RAEhQYFVVdSYDrSyMTEzRdubFkkb waemGptBnpRM1us2ZkL/kx0Kw/u3gsfvY5LsmNtKrxmDQWhUc0PxHXgkDdOQ6+QKr8ZuDS 5hwkei+20on6JMgmLKbiemkjvFHYULY6nhMyPaeXiwzUlvaonAmBmMk+12A3ekGii3OAwe 0hi8OP5xZypcCpGtG28m0qxhkcotEFnSu0rZfDyCD2f4KMvWviQlRnQdRzjEX6uM91SM46 fcBqORKKr40+RP9KR57/vN5gF1Et09eEctB6VcwJn4slt4oyPnySO0+YdpBIpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i11sIVMsgx+/N88m4IuCoA7oaMvutuJoKFtjwzro8C0=; b=tIV5qPk6oBuLLFz4bzE0JmJ150y31pKNteRR5oO7jlWCUu+noS25Qq6RK0Qe1fyApSWgDm s99q9DhEy0x6m+oUxKzltK8KEM6p0l9jQSfD6GAoQUK1KK3lEmzx2faWXZ6T/chMAoDrHW OHGL472BjAQKz/4rz2E/r+jUkEmYvtbsqZKqDSa4r1SjzvB3vJ9ETE7dj6J2RQZ4nqJusM XPIdG35wlSwOtSbQfaqllGe46oZ7sH/nUGeNqVGmBuoTYLRRSgGKZU+nO2oaguSUyYR9IM 30XpK0eu5O4W9ZBZEXijB35Q2EMaWP3lsV4+DOm/fsxC4mxM+cYXWQfyS4yPvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395387; a=rsa-sha256; cv=none; b=ZY7LCT2OSkUDXCEkycoBGD3bmi9bf99aMrZ0bkrEVXxgR4G/yaam1uxfnEL08nOoY8tbgy nHG0zDubDRwxC2ut8Np3iEKFf8j6a7aVni/Bvk4Gg0vZelVRgEg84sA7leE4MqqyN9luar FJyaWryLPIb44LBxPqw2lU2eO4QvPR4vNBwdzNVXcNtn7tCGOGdBiitdZf3fAvhY3C/mas lp6duV9sNWXKCe2OmsmbeyzqKstokm+MT15qkyouEDWfoTMHRLLNASeefXAXC6B4eCGVMS AmR+gtXv4EAo3sJDmGyyQ6tN7QHLlSf+hsxliBkrwwtRN9WzZ9Ytw6kikz7g5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSB6plQzm6Z; Sat, 6 May 2023 17:49:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnk0s017975; Sat, 6 May 2023 17:49:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnksB017974; Sat, 6 May 2023 17:49:46 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:46 GMT Message-Id: <202305061749.346HnksB017974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: aba91805aa92 - main - hwpmc: use kstack_contains() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aba91805aa92a47b2f3f01741a55ff9f07c42d04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=aba91805aa92a47b2f3f01741a55ff9f07c42d04 commit aba91805aa92a47b2f3f01741a55ff9f07c42d04 Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:01 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: use kstack_contains() This existing helper function is preferable to the hand-rolled calculation of the kstack bounds. Make some small style improvements while here. Notably, rename every instance of "r", the return address, to "ra". Tidy the includes in the affected files. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39909 --- sys/amd64/include/pmc_mdep.h | 8 +++--- sys/arm/include/pmc_mdep.h | 6 ++--- sys/arm64/include/pmc_mdep.h | 9 +++---- sys/dev/hwpmc/hwpmc_arm.c | 35 +++++++++++--------------- sys/dev/hwpmc/hwpmc_arm64_md.c | 23 ++++++----------- sys/dev/hwpmc/hwpmc_x86.c | 56 ++++++++++++++++++------------------------ sys/i386/include/pmc_mdep.h | 6 ++--- sys/riscv/include/pmc_mdep.h | 11 ++++----- 8 files changed, 61 insertions(+), 93 deletions(-) diff --git a/sys/amd64/include/pmc_mdep.h b/sys/amd64/include/pmc_mdep.h index 026a9ae2e669..5563f5b1bdbb 100644 --- a/sys/amd64/include/pmc_mdep.h +++ b/sys/amd64/include/pmc_mdep.h @@ -109,11 +109,9 @@ union pmc_md_pmc { ((PC) >= (uintptr_t) start_exceptions && \ (PC) < (uintptr_t) end_exceptions) -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) -#define PMC_IN_KERNEL(va) INKERNEL(va) - -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) +#define PMC_IN_KERNEL(va) INKERNEL(va) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) /* Build a fake kernel trapframe from current instruction pointer. */ #define PMC_FAKE_TRAPFRAME(TF) \ diff --git a/sys/arm/include/pmc_mdep.h b/sys/arm/include/pmc_mdep.h index 69cb0c84deca..d7b80abb64b0 100644 --- a/sys/arm/include/pmc_mdep.h +++ b/sys/arm/include/pmc_mdep.h @@ -52,11 +52,9 @@ union pmc_md_pmc { struct pmc_md_armv7_pmc pm_armv7; }; -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) #define PMC_IN_KERNEL(va) INKERNEL((va)) - -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) #define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_pc) #define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_r11) diff --git a/sys/arm64/include/pmc_mdep.h b/sys/arm64/include/pmc_mdep.h index d27bdbd5afc1..049bb2b22751 100644 --- a/sys/arm64/include/pmc_mdep.h +++ b/sys/arm64/include/pmc_mdep.h @@ -66,12 +66,11 @@ union pmc_md_pmc { struct pmc_md_dmc620_pmc pm_dmc620; }; -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) #define PMC_IN_KERNEL(va) INKERNEL((va)) -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) -#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_elr) -#define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_x[29]) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_elr) +#define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_x[29]) /* * Prototypes diff --git a/sys/dev/hwpmc/hwpmc_arm.c b/sys/dev/hwpmc/hwpmc_arm.c index c585a6cefd1e..a0e2e6823219 100644 --- a/sys/dev/hwpmc/hwpmc_arm.c +++ b/sys/dev/hwpmc/hwpmc_arm.c @@ -31,18 +31,17 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include + +#include +#include #include #include #include #include - -#include -#include -#include +#include /* XXX: Userland code compiled with gcc will need an heuristic * to be correctly detected. @@ -78,45 +77,39 @@ int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { - uintptr_t pc, r, stackstart, stackend, fp; - struct thread *td; + uintptr_t pc, ra, fp; int count; KASSERT(TRAPF_USERMODE(tf) == 0,("[arm,%d] not a kernel backtrace", __LINE__)); - td = curthread; pc = PMC_TRAPFRAME_TO_PC(tf); *cc++ = pc; if (maxsamples <= 1) return (1); - stackstart = (uintptr_t) td->td_kstack; - stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; fp = PMC_TRAPFRAME_TO_FP(tf); - - if (!PMC_IN_KERNEL(pc) || - !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(pc) || !PMC_IN_KERNEL_STACK(fp)) return (1); for (count = 1; count < maxsamples; count++) { /* Use saved lr as pc. */ - r = fp + PC_OFF * sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + ra = fp + PC_OFF * sizeof(uintptr_t); + if (!PMC_IN_KERNEL_STACK(ra)) break; - pc = *(uintptr_t *)r; + pc = *(uintptr_t *)ra; if (!PMC_IN_KERNEL(pc)) break; *cc++ = pc; /* Switch to next frame up */ - r = fp + FP_OFF * sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + ra = fp + FP_OFF * sizeof(uintptr_t); + if (!PMC_IN_KERNEL_STACK(ra)) break; - fp = *(uintptr_t *)r; - if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + fp = *(uintptr_t *)ra; + if (!PMC_IN_KERNEL_STACK(fp)) break; } diff --git a/sys/dev/hwpmc/hwpmc_arm64_md.c b/sys/dev/hwpmc/hwpmc_arm64_md.c index dd51f7bd18d5..4220badb30a6 100644 --- a/sys/dev/hwpmc/hwpmc_arm64_md.c +++ b/sys/dev/hwpmc/hwpmc_arm64_md.c @@ -31,18 +31,17 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include + +#include +#include #include #include #include #include - -#include -#include -#include +#include struct pmc_mdep * pmc_md_initialize(void) @@ -59,30 +58,22 @@ pmc_md_finalize(struct pmc_mdep *md) } int -pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, - struct trapframe *tf) +pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { struct unwind_state frame; - uintptr_t stackstart, stackend; - struct thread *td; int count; KASSERT(TRAPF_USERMODE(tf) == 0,("[arm64,%d] not a kernel backtrace", __LINE__)); - td = curthread; frame.pc = PMC_TRAPFRAME_TO_PC(tf); *cc++ = frame.pc; if (maxsamples <= 1) return (1); - stackstart = (uintptr_t) td->td_kstack; - stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; frame.fp = PMC_TRAPFRAME_TO_FP(tf); - - if (!PMC_IN_KERNEL(frame.pc) || - !PMC_IN_KERNEL_STACK(frame.fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(frame.pc) || !PMC_IN_KERNEL_STACK(frame.fp)) return (1); for (count = 1; count < maxsamples; count++) { diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c index e427139244ad..913c8f756815 100644 --- a/sys/dev/hwpmc/hwpmc_x86.c +++ b/sys/dev/hwpmc/hwpmc_x86.c @@ -34,21 +34,22 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include -#include + +#include +#include #include #include -#include -#include -#include +#include /* For x86/apicvar.h */ #include +#include +#include +#include -#include -#include -#include +#include #include "hwpmc_soft.h" @@ -155,36 +156,29 @@ pmc_save_user_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) int __nosanitizeaddress __nosanitizememory pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) { - int n; + uintptr_t fp, pc, ra, sp; uint32_t instr; - uintptr_t fp, pc, r, sp, stackstart, stackend; - struct thread *td; + int n; KASSERT(TRAPF_USERMODE(tf) == 0,("[x86,%d] not a kernel backtrace", __LINE__)); - td = curthread; pc = PMC_TRAPFRAME_TO_PC(tf); fp = PMC_TRAPFRAME_TO_FP(tf); sp = PMC_TRAPFRAME_TO_KERNEL_SP(tf); *cc++ = pc; - r = fp + sizeof(uintptr_t); /* points to return address */ + ra = fp + sizeof(uintptr_t); /* points to return address */ if (nframes <= 1) return (1); - stackstart = (uintptr_t) td->td_kstack; - stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; - - if (PMC_IN_TRAP_HANDLER(pc) || - !PMC_IN_KERNEL(pc) || - !PMC_IN_KERNEL_STACK(r, stackstart, stackend) || - !PMC_IN_KERNEL_STACK(sp, stackstart, stackend) || - !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (PMC_IN_TRAP_HANDLER(pc) || !PMC_IN_KERNEL(pc) || + !PMC_IN_KERNEL_STACK(ra) || !PMC_IN_KERNEL_STACK(sp) || + !PMC_IN_KERNEL_STACK(fp)) return (1); - instr = *(uint32_t *) pc; + instr = *(uint32_t *)pc; /* * Determine whether the interrupted function was in the @@ -205,15 +199,15 @@ pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) * and the caller's address is therefore at sp[1]. */ sp += sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(sp, stackstart, stackend)) + if (!PMC_IN_KERNEL_STACK(sp)) return (1); - pc = *(uintptr_t *) sp; + pc = *(uintptr_t *)sp; } else { /* * Not in the function prologue or epilogue. */ - pc = *(uintptr_t *) r; - fp = *(uintptr_t *) fp; + pc = *(uintptr_t *)ra; + fp = *(uintptr_t *)fp; } for (n = 1; n < nframes; n++) { @@ -222,12 +216,11 @@ pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) if (PMC_IN_TRAP_HANDLER(pc)) break; - r = fp + sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend) || - !PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + ra = fp + sizeof(uintptr_t); + if (!PMC_IN_KERNEL_STACK(fp) || !PMC_IN_KERNEL_STACK(ra)) break; - pc = *(uintptr_t *) r; - fp = *(uintptr_t *) fp; + pc = *(uintptr_t *)ra; + fp = *(uintptr_t *)fp; } return (n); @@ -236,7 +229,6 @@ pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) /* * Machine dependent initialization for x86 class platforms. */ - struct pmc_mdep * pmc_md_initialize(void) { diff --git a/sys/i386/include/pmc_mdep.h b/sys/i386/include/pmc_mdep.h index 3d498e006a36..15bdd7a65dc8 100644 --- a/sys/i386/include/pmc_mdep.h +++ b/sys/i386/include/pmc_mdep.h @@ -121,11 +121,9 @@ struct pmc_mdep; #define PMC_TRAPFRAME_TO_USER_SP(TF) ((TF)->tf_esp) #define PMC_TRAPFRAME_TO_KERNEL_SP(TF) ((uintptr_t) &((TF)->tf_esp)) -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) #define PMC_IN_KERNEL(va) INKERNEL(va) - -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) #define PMC_IN_TRAP_HANDLER(PC) \ ((PC) >= (uintptr_t)start_exceptions + setidt_disp && \ diff --git a/sys/riscv/include/pmc_mdep.h b/sys/riscv/include/pmc_mdep.h index 10dc5c8b98ed..b192d75ec14b 100644 --- a/sys/riscv/include/pmc_mdep.h +++ b/sys/riscv/include/pmc_mdep.h @@ -48,12 +48,11 @@ union pmc_md_pmc { struct pmc_md_riscv_pmc pm_riscv; }; -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) -#define PMC_IN_KERNEL(va) INKERNEL((va)) -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) -#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_ra) -#define PMC_TRAPFRAME_TO_FP(TF) (0) /* stub */ +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) +#define PMC_IN_KERNEL(va) INKERNEL((va)) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_ra) +#define PMC_TRAPFRAME_TO_FP(TF) (0) /* stub */ /* * Prototypes From nobody Sat May 6 17:49:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSD39ZBz49shZ; Sat, 6 May 2023 17:49: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 4QDFSD1hcBz3G7P; Sat, 6 May 2023 17:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rx6c37zfX2KXMSNUtTCGDEki4Xs7yDhla7aXfQtZLN4=; b=gvZo2ZvJqyHi2p661nvelapFAH7oVKMtiSFsNF6S3ZE/Fu+1TiAh/SIT7yHwrY+S2KmOuI pleZjYmVmPbN0vAdab2wsWrFSye8QJmM/EZL0YCP2ej9RgYt5RfrI7FCT/x655ePWFzljt nNqUhKrVEU80+J8cKsmb4fSGWALBZHPBt0cKXQ14qt2BTXL8qe5uDuX8jwQ5e1ouDRoVv/ ByGL9pLXiI44QAzHHMviMIEx55VhSWJpZNY1/wcslIVbIexU9p/mh1ivgNAiuRLmGcenps rvkSCYek2gpkhON45tvCDT9bQPwxqlwQzCAHvoGHT8oSnjgjSHWFWb7x65Qtog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rx6c37zfX2KXMSNUtTCGDEki4Xs7yDhla7aXfQtZLN4=; b=Pn2RjMF3hkLJOT3r1Dz0hGDplvqqjxfDy6IMTGp3UsIGdchEnJrkbzmogbR2doJ4H8fvr3 kVrOc2Li2RXw88sCPfxfNSrmufAp+ONZo2lzvDW9HEmbhQrVik6uQwvvEJjMKbNLAnkyNF FvaNX2tf0DRJTzYb/JCNRnRjwHcPhTSzU6TrBhBfSe1cQCoWPBrwpzJ49jSn8vZN6hm67t 2vOVQA+pQE1HAkVhjRi6+HEg6iQ8z1Cdkji3ivBmIWS5Mt1H69WJFrsppcst3IsxQj1Km2 T3NX7KsPmc2dEU3dqAf9hq5GHhTGk4Xr4NkzdmKK7EhiyrVBd8kxbAR7+bNDmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395388; a=rsa-sha256; cv=none; b=mRWVJA/OxBy+n4q/U2iiPmIEWDrN4wcY5ab6r5MNJtp3sXwmO+vCo7czPNpcKcIDU8SIUY jADBVRPU46Bv7/JYj5/OjGIU5W7R2S9HnIFgJqJi83duvMimle/3WANPhaZuDt1hNgpXIr ISnHodDD831HBQ1xfSU9nct5uj18RArKLN1Iy8oIlH6hV3/c7e1f1g2y/YmfqwfkoPL98k FbFmykCXaFC0aUFjiyGbb1jyIQ+lmeRN1+3PpcR7Nb807aNPOsBQiEgFpa8ZJcZLMKUg1F 2RnT/bwkRINZfBWEMZQCwMYQ2osNph6NdKQE39wlKpweXRf/rgDV7gieaRGg1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSD0nzTzlnH; Sat, 6 May 2023 17:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnmVs017994; Sat, 6 May 2023 17:49:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnmxQ017993; Sat, 6 May 2023 17:49:48 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:48 GMT Message-Id: <202305061749.346HnmxQ017993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 31610e34b7e3 - main - hwpmc: don't use deprecated copystr(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31610e34b7e39d573d927ea98346c88f23cabdab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=31610e34b7e39d573d927ea98346c88f23cabdab commit 31610e34b7e39d573d927ea98346c88f23cabdab Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:15 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: don't use deprecated copystr(9) It is just wrapper around strlcpy(), but results in more complicated code. Clean this up to use strlcpy() or snprintf() as appropriate. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39910 --- sys/dev/hwpmc/hwpmc_amd.c | 7 +------ sys/dev/hwpmc/hwpmc_arm64.c | 9 +++------ sys/dev/hwpmc/hwpmc_armv7.c | 9 +++------ sys/dev/hwpmc/hwpmc_cmn600.c | 11 ++++------- sys/dev/hwpmc/hwpmc_core.c | 16 ++-------------- sys/dev/hwpmc/hwpmc_dmc620.c | 11 ++++------- sys/dev/hwpmc/hwpmc_powerpc.c | 9 +++------ sys/dev/hwpmc/hwpmc_soft.c | 7 +------ sys/dev/hwpmc/hwpmc_tsc.c | 7 +------ sys/dev/hwpmc/hwpmc_uncore.c | 16 ++-------------- 10 files changed, 24 insertions(+), 78 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 936974080fed..c35f5fd4f095 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -905,8 +905,6 @@ amd_intr(struct trapframe *tf) static int amd_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; - size_t copied; const struct amd_descr *pd; struct pmc_hw *phw; @@ -918,10 +916,7 @@ amd_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; pd = &amd_pmcdesc[ri]; - if ((error = copystr(pd->pm_descr.pd_name, pi->pm_name, - PMC_NAME_MAX, &copied)) != 0) - return error; - + strlcpy(pi->pm_name, pd->pm_descr.pd_name, sizeof(pi->pm_name)); pi->pm_class = pd->pm_descr.pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index ec796bcc8ff5..baf05e52b42a 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -416,9 +416,7 @@ arm64_intr(struct trapframe *tf) static int arm64_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - char arm64_name[PMC_NAME_MAX]; struct pmc_hw *phw; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[arm64,%d], illegal CPU %d", __LINE__, cpu)); @@ -426,11 +424,10 @@ arm64_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) ("[arm64,%d] row-index %d out of range", __LINE__, ri)); phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; - snprintf(arm64_name, sizeof(arm64_name), "ARMV8-%d", ri); - if ((error = copystr(arm64_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); + + snprintf(pi->pm_name, sizeof(pi->pm_name), "ARMV8-%d", ri); pi->pm_class = PMC_CLASS_ARMV8; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; *ppmc = phw->phw_pmc; diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 1ba1dbb6e695..34f3fd009c9d 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -384,9 +384,7 @@ armv7_intr(struct trapframe *tf) static int armv7_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - char armv7_name[PMC_NAME_MAX]; struct pmc_hw *phw; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d], illegal CPU %d", __LINE__, cpu)); @@ -394,11 +392,10 @@ armv7_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) ("[armv7,%d] row-index %d out of range", __LINE__, ri)); phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; - snprintf(armv7_name, sizeof(armv7_name), "ARMV7-%d", ri); - if ((error = copystr(armv7_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return error; + + snprintf(pi->pm_name, sizeof(pi->pm_name), "ARMV7-%d", ri); pi->pm_class = PMC_CLASS_ARMV7; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; *ppmc = phw->phw_pmc; diff --git a/sys/dev/hwpmc/hwpmc_cmn600.c b/sys/dev/hwpmc/hwpmc_cmn600.c index fe98fdf969fc..82b6e553801a 100644 --- a/sys/dev/hwpmc/hwpmc_cmn600.c +++ b/sys/dev/hwpmc/hwpmc_cmn600.c @@ -587,9 +587,8 @@ cmn600_stop_pmc(int cpu, int ri) static int cmn600_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { + struct pmc_descr *pd; struct pmc_hw *phw; - size_t copied; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[cmn600,%d] illegal CPU %d", __LINE__, cpu)); @@ -597,12 +596,10 @@ cmn600_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) ri)); phw = cmn600desc(ri)->pd_phw; + pd = &cmn600desc(ri)->pd_descr; - if ((error = copystr(cmn600desc(ri)->pd_descr.pd_name, - pi->pm_name, PMC_NAME_MAX, &copied)) != 0) - return (error); - - pi->pm_class = cmn600desc(ri)->pd_descr.pd_class; + strlcpy(pi->pm_name, pd->pd_name, sizeof(pi->pm_name)); + pi->pm_class = pd->pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 5d29931c90f0..ad9d323bdb9a 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -330,17 +330,11 @@ iaf_config_pmc(int cpu, int ri, struct pmc *pm) static int iaf_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char iaf_name[PMC_NAME_MAX]; phw = &core_pcpu[cpu]->pc_corepmcs[ri + core_iaf_ri]; - (void) snprintf(iaf_name, sizeof(iaf_name), "IAF-%d", ri); - if ((error = copystr(iaf_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "IAF-%d", ri); pi->pm_class = PMC_CLASS_IAF; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { @@ -814,17 +808,11 @@ iap_config_pmc(int cpu, int ri, struct pmc *pm) static int iap_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char iap_name[PMC_NAME_MAX]; phw = &core_pcpu[cpu]->pc_corepmcs[ri]; - (void) snprintf(iap_name, sizeof(iap_name), "IAP-%d", ri); - if ((error = copystr(iap_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "IAP-%d", ri); pi->pm_class = PMC_CLASS_IAP; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_dmc620.c b/sys/dev/hwpmc/hwpmc_dmc620.c index a6a1dfb44ca4..6152e264a169 100644 --- a/sys/dev/hwpmc/hwpmc_dmc620.c +++ b/sys/dev/hwpmc/hwpmc_dmc620.c @@ -454,9 +454,8 @@ CLASSDEP_FN2(dmc620_stop_pmc, int, cpu, int, ri) CLASSDEP_FN4(dmc620_describe, int, cpu, int, ri, struct pmc_info *, pi, struct pmc **, ppmc) { + struct pmc_descr *pd; struct pmc_hw *phw; - size_t copied; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU %d", __LINE__, cpu)); @@ -464,12 +463,10 @@ CLASSDEP_FN4(dmc620_describe, int, cpu, int, ri, struct pmc_info *, pi, ri)); phw = dmc620desc(class, cpu, ri)->pd_phw; + pd = &dmc620desc(class, cpu, ri)->pd_descr; - if ((error = copystr(dmc620desc(class, cpu, ri)->pd_descr.pd_name, - pi->pm_name, PMC_NAME_MAX, &copied)) != 0) - return (error); - - pi->pm_class = dmc620desc(class, cpu, ri)->pd_descr.pd_class; + strlcpy(pi->pm_name, pd->pd_name, sizeof(pi->pm_name)); + pi->pm_class = pd->pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c index aeb7285ead2c..3d65d8753fcb 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.c +++ b/sys/dev/hwpmc/hwpmc_powerpc.c @@ -122,19 +122,16 @@ powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) int powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char powerpc_name[PMC_NAME_MAX]; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[powerpc,%d], illegal CPU %d", __LINE__, cpu)); phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; - snprintf(powerpc_name, sizeof(powerpc_name), "POWERPC-%d", ri); - if ((error = copystr(powerpc_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return error; + + snprintf(pi->pm_name, sizeof(pi->pm_name), "POWERPC-%d", ri); pi->pm_class = powerpc_pcpu[cpu]->pc_class; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; *ppmc = phw->phw_pmc; diff --git a/sys/dev/hwpmc/hwpmc_soft.c b/sys/dev/hwpmc/hwpmc_soft.c index c96a41457a66..3b602cfee89d 100644 --- a/sys/dev/hwpmc/hwpmc_soft.c +++ b/sys/dev/hwpmc/hwpmc_soft.c @@ -159,8 +159,6 @@ soft_config_pmc(int cpu, int ri, struct pmc *pm) static int soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; - size_t copied; const struct soft_descr *pd; struct pmc_hw *phw; @@ -172,10 +170,7 @@ soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) phw = &soft_pcpu[cpu]->soft_hw[ri]; pd = &soft_pmcdesc[ri]; - if ((error = copystr(pd->pm_descr.pd_name, pi->pm_name, - PMC_NAME_MAX, &copied)) != 0) - return (error); - + strlcpy(pi->pm_name, pd->pm_descr.pd_name, sizeof(pi->pm_name)); pi->pm_class = pd->pm_descr.pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_tsc.c b/sys/dev/hwpmc/hwpmc_tsc.c index d59c8908f4ca..25b2e9f8fd57 100644 --- a/sys/dev/hwpmc/hwpmc_tsc.c +++ b/sys/dev/hwpmc/hwpmc_tsc.c @@ -115,8 +115,6 @@ tsc_config_pmc(int cpu, int ri, struct pmc *pm) static int tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; - size_t copied; const struct tsc_descr *pd; struct pmc_hw *phw; @@ -127,10 +125,7 @@ tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) phw = &tsc_pcpu[cpu]->tc_hw; pd = &tsc_pmcdesc[ri]; - if ((error = copystr(pd->pm_descr.pd_name, pi->pm_name, - PMC_NAME_MAX, &copied)) != 0) - return (error); - + strlcpy(pi->pm_name, pd->pm_descr.pd_name, sizeof(pi->pm_name)); pi->pm_class = pd->pm_descr.pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 56373f383dda..7f61deedfd79 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -233,17 +233,11 @@ ucf_config_pmc(int cpu, int ri, struct pmc *pm) static int ucf_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char ucf_name[PMC_NAME_MAX]; phw = &uncore_pcpu[cpu]->pc_uncorepmcs[ri + uncore_ucf_ri]; - (void) snprintf(ucf_name, sizeof(ucf_name), "UCF-%d", ri); - if ((error = copystr(ucf_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "UCF-%d", ri); pi->pm_class = PMC_CLASS_UCF; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { @@ -560,17 +554,11 @@ ucp_config_pmc(int cpu, int ri, struct pmc *pm) static int ucp_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char ucp_name[PMC_NAME_MAX]; phw = &uncore_pcpu[cpu]->pc_uncorepmcs[ri]; - (void) snprintf(ucp_name, sizeof(ucp_name), "UCP-%d", ri); - if ((error = copystr(ucp_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "UCP-%d", ri); pi->pm_class = PMC_CLASS_UCP; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { From nobody Sat May 6 17:49:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSF4GWMz49sl1; Sat, 6 May 2023 17:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFSF2z9Wz3GGB; Sat, 6 May 2023 17:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/oHp43lVVxxnq5TC0StC6gjIyLlw7YlmwbOvNGXB4PE=; b=EC2Np4skNZsmXOPI4l42k+xtFcV3RHWF5R5ONR67qHBv03ZfUPypLoHqLAWsccl72UaTsy /iTXWZbpiTxZhgeSPNB6PPNwgjSFVieT/uPoSWEaKoTAPFbj4Jy5fAPsuo/7EpaORyaYNS rhxfob+kz/GLliPyVMVt2rTMpKfxvZcatbCGVKiDW0jRuoCcNKs9bHILxDQ/dVFggvKOSk T+goOEq6Uwp9BJNfRd6WUYYpBITLEUS4lr8HaDFybvHhVYJfIc7UnbPM0RTtPEwpQic5i6 aitSjm5HiQ/XIUX+R8E8FQkG2nu9vMjo/8J7cB4u/vV09EtL/RWfPKwwXI6Grg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/oHp43lVVxxnq5TC0StC6gjIyLlw7YlmwbOvNGXB4PE=; b=x3hHgcGO0PAw+tD4XQthmwobhZDqtAA1E2FCm8YLSi4aWliAP8hS/l1s4kvtrouew4Aap5 ksP+xGMNEstMMEEFnpGPDb6obY+FP63wvthv13rytP62sllLEtcks79b6cH/XC8kv10s+I k2ehbi8il1CIpMQXaTqOlp73/RqP8hBGUbZRpz1uiaXzGVBis2TzXKq+ZSopjK0b2gXWmy VSyauM4QHNP/g/jxprK8DZbbLUJsz+MGI7ANE9OEyYbgFZse9yS7vicugD4K63WgyVYkay 7Rc3j6RkpTAqy5DldTD9G0QAMNT8DPGgsW1H+wB5sllziarmffUl4/g76H7zCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395389; a=rsa-sha256; cv=none; b=k2K/QimOoFepmMIJHYMh+yEtEOqQNkfqEN9AJy+oW6PHfH9I6UMh2hwYVEPbb6j3zChXys ijCDC2LhojH/xq6NyB1vwuXknBFhM1HyefIJD6ppOUZ/0zWE+hyLEj8tkUxpXJp20IoDfg bInxUNZk2mComxtPY3EK0kQBLy+9xLZmhpXexgGREXaJXeCFyMH1CylZgjgmRYkN3DqZid fhnYIEiI8SQ6mQKyTfi2KhgR95qhLFfqWcHLsUUdo2egIY2LNi2HlVxwg7TtU086J1zSan UY3lBMMB0gOOxgTY0iPc/9P2KivJCG1Cn1XlWSW3aAoFQxVlpPIm4kJa2h6Ikw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSF1wPbzm8l; Sat, 6 May 2023 17:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnnZP018013; Sat, 6 May 2023 17:49:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hnn30018012; Sat, 6 May 2023 17:49:49 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:49 GMT Message-Id: <202305061749.346Hnn30018012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 3a7c9fc01bda - main - hwpmc_logging: less macro magic for type names List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a7c9fc01bdae13edbd5724745b748e6a61065eb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3a7c9fc01bdae13edbd5724745b748e6a61065eb commit 3a7c9fc01bdae13edbd5724745b748e6a61065eb Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:27 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc_logging: less macro magic for type names Provide the log type names in their entirely, rather than relying on the macro to prepend the prefix. This improves their searchability; for example, if I see PMCLOG_TYPE_PMCALLOCATE in libpmc I will now be able to find where that is emitted in the kernel with a simple grep. Reviewed by: jkoshy, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39911 --- sys/dev/hwpmc/hwpmc_logging.c | 57 +++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index 1c48089a58dc..e0ff87619137 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -110,9 +110,7 @@ static struct mtx pmc_kthread_mtx; /* sleep lock */ * Log file record constructors. */ #define _PMCLOG_TO_HEADER(T,L) \ - ((PMCLOG_HEADER_MAGIC << 24) | \ - (PMCLOG_TYPE_ ## T << 16) | \ - ((L) & 0xFFFF)) + ((PMCLOG_HEADER_MAGIC << 24) | (T << 16) | ((L) & 0xFFFF)) /* reserve LEN bytes of space and initialize the entry header */ #define _PMCLOG_RESERVE_SAFE(PO,TYPE,LEN,ACTION, TSC) do { \ @@ -716,7 +714,7 @@ pmclog_configure_log(struct pmc_mdep *md, struct pmc_owner *po, int logfd) PROC_UNLOCK(p); nanotime(&ts); /* create a log initialization entry */ - PMCLOG_RESERVE_WITH_ERROR(po, INITIALIZE, + PMCLOG_RESERVE_WITH_ERROR(po, PMCLOG_TYPE_INITIALIZE, sizeof(struct pmclog_initialize)); PMCLOG_EMIT32(PMC_VERSION); PMCLOG_EMIT32(md->pmd_cputype); @@ -916,7 +914,7 @@ pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) ps->ps_nsamples * sizeof(uintfptr_t); po = pm->pm_owner; flags = PMC_CALLCHAIN_TO_CPUFLAGS(ps->ps_cpu,ps->ps_flags); - PMCLOG_RESERVE_SAFE(po, CALLCHAIN, recordlen, ps->ps_tsc); + PMCLOG_RESERVE_SAFE(po, PMCLOG_TYPE_CALLCHAIN, recordlen, ps->ps_tsc); PMCLOG_EMIT32(ps->ps_pid); PMCLOG_EMIT32(ps->ps_tid); PMCLOG_EMIT32(pm->pm_id); @@ -929,14 +927,16 @@ pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) void pmclog_process_closelog(struct pmc_owner *po) { - PMCLOG_RESERVE(po,CLOSELOG,sizeof(struct pmclog_closelog)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_CLOSELOG, + sizeof(struct pmclog_closelog)); PMCLOG_DESPATCH_SYNC(po); } void pmclog_process_dropnotify(struct pmc_owner *po) { - PMCLOG_RESERVE(po,DROPNOTIFY,sizeof(struct pmclog_dropnotify)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_DROPNOTIFY, + sizeof(struct pmclog_dropnotify)); PMCLOG_DESPATCH(po); } @@ -952,7 +952,7 @@ pmclog_process_map_in(struct pmc_owner *po, pid_t pid, uintfptr_t start, recordlen = offsetof(struct pmclog_map_in, pl_pathname) + pathlen; - PMCLOG_RESERVE(po, MAP_IN, recordlen); + PMCLOG_RESERVE(po, PMCLOG_TYPE_MAP_IN, recordlen); PMCLOG_EMIT32(pid); PMCLOG_EMIT32(0); PMCLOG_EMITADDR(start); @@ -966,7 +966,7 @@ pmclog_process_map_out(struct pmc_owner *po, pid_t pid, uintfptr_t start, { KASSERT(start <= end, ("[pmclog,%d] start > end", __LINE__)); - PMCLOG_RESERVE(po, MAP_OUT, sizeof(struct pmclog_map_out)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_MAP_OUT, sizeof(struct pmclog_map_out)); PMCLOG_EMIT32(pid); PMCLOG_EMIT32(0); PMCLOG_EMITADDR(start); @@ -985,7 +985,7 @@ pmclog_process_pmcallocate(struct pmc *pm) PMCDBG1(LOG,ALL,1, "pm=%p", pm); if (PMC_TO_CLASS(pm) == PMC_CLASS_SOFT) { - PMCLOG_RESERVE(po, PMCALLOCATEDYN, + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCALLOCATEDYN, sizeof(struct pmclog_pmcallocatedyn)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pm->pm_event); @@ -1000,7 +1000,7 @@ pmclog_process_pmcallocate(struct pmc *pm) pmc_soft_ev_release(ps); PMCLOG_DESPATCH_SYNC(po); } else { - PMCLOG_RESERVE(po, PMCALLOCATE, + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCALLOCATE, sizeof(struct pmclog_pmcallocate)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pm->pm_event); @@ -1024,7 +1024,7 @@ pmclog_process_pmcattach(struct pmc *pm, pid_t pid, char *path) pathlen = strlen(path) + 1; /* #bytes for the string */ recordlen = offsetof(struct pmclog_pmcattach, pl_pathname) + pathlen; - PMCLOG_RESERVE(po, PMCATTACH, recordlen); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCATTACH, recordlen); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pid); PMCLOG_EMITSTRING(path, pathlen); @@ -1040,7 +1040,8 @@ pmclog_process_pmcdetach(struct pmc *pm, pid_t pid) po = pm->pm_owner; - PMCLOG_RESERVE(po, PMCDETACH, sizeof(struct pmclog_pmcdetach)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCDETACH, + sizeof(struct pmclog_pmcdetach)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pid); PMCLOG_DESPATCH_SYNC(po); @@ -1050,13 +1051,15 @@ void pmclog_process_proccreate(struct pmc_owner *po, struct proc *p, int sync) { if (sync) { - PMCLOG_RESERVE(po, PROC_CREATE, sizeof(struct pmclog_proccreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROC_CREATE, + sizeof(struct pmclog_proccreate)); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); PMCLOG_EMITSTRING(p->p_comm, MAXCOMLEN+1); PMCLOG_DESPATCH_SYNC(po); } else { - PMCLOG_RESERVE(po, PROC_CREATE, sizeof(struct pmclog_proccreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROC_CREATE, + sizeof(struct pmclog_proccreate)); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); PMCLOG_EMITSTRING(p->p_comm, MAXCOMLEN+1); @@ -1081,7 +1084,8 @@ pmclog_process_proccsw(struct pmc *pm, struct pmc_process *pp, pmc_value_t v, st po = pm->pm_owner; - PMCLOG_RESERVE_SAFE(po, PROCCSW, sizeof(struct pmclog_proccsw), pmc_rdtsc()); + PMCLOG_RESERVE_SAFE(po, PMCLOG_TYPE_PROCCSW, + sizeof(struct pmclog_proccsw), pmc_rdtsc()); PMCLOG_EMIT64(v); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pp->pp_proc->p_pid); @@ -1100,7 +1104,7 @@ pmclog_process_procexec(struct pmc_owner *po, pmc_id_t pmid, pid_t pid, pathlen = strlen(path) + 1; /* #bytes for the path */ recordlen = offsetof(struct pmclog_procexec, pl_pathname) + pathlen; - PMCLOG_RESERVE(po, PROCEXEC, recordlen); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROCEXEC, recordlen); PMCLOG_EMIT32(pid); PMCLOG_EMIT32(pmid); PMCLOG_EMITADDR(startaddr); @@ -1124,7 +1128,8 @@ pmclog_process_procexit(struct pmc *pm, struct pmc_process *pp) po = pm->pm_owner; - PMCLOG_RESERVE(po, PROCEXIT, sizeof(struct pmclog_procexit)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROCEXIT, + sizeof(struct pmclog_procexit)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pp->pp_proc->p_pid); PMCLOG_EMIT64(pp->pp_pmcs[ri].pp_pmcval); @@ -1138,7 +1143,8 @@ pmclog_process_procexit(struct pmc *pm, struct pmc_process *pp) void pmclog_process_procfork(struct pmc_owner *po, pid_t oldpid, pid_t newpid) { - PMCLOG_RESERVE(po, PROCFORK, sizeof(struct pmclog_procfork)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROCFORK, + sizeof(struct pmclog_procfork)); PMCLOG_EMIT32(oldpid); PMCLOG_EMIT32(newpid); PMCLOG_DESPATCH(po); @@ -1151,7 +1157,7 @@ pmclog_process_procfork(struct pmc_owner *po, pid_t oldpid, pid_t newpid) void pmclog_process_sysexit(struct pmc_owner *po, pid_t pid) { - PMCLOG_RESERVE(po, SYSEXIT, sizeof(struct pmclog_sysexit)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_SYSEXIT, sizeof(struct pmclog_sysexit)); PMCLOG_EMIT32(pid); PMCLOG_DESPATCH(po); } @@ -1163,7 +1169,8 @@ pmclog_process_threadcreate(struct pmc_owner *po, struct thread *td, int sync) p = td->td_proc; if (sync) { - PMCLOG_RESERVE(po, THR_CREATE, sizeof(struct pmclog_threadcreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_THR_CREATE, + sizeof(struct pmclog_threadcreate)); PMCLOG_EMIT32(td->td_tid); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); @@ -1171,7 +1178,8 @@ pmclog_process_threadcreate(struct pmc_owner *po, struct thread *td, int sync) PMCLOG_EMITSTRING(td->td_name, MAXCOMLEN+1); PMCLOG_DESPATCH_SYNC(po); } else { - PMCLOG_RESERVE(po, THR_CREATE, sizeof(struct pmclog_threadcreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_THR_CREATE, + sizeof(struct pmclog_threadcreate)); PMCLOG_EMIT32(td->td_tid); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); @@ -1185,7 +1193,8 @@ void pmclog_process_threadexit(struct pmc_owner *po, struct thread *td) { - PMCLOG_RESERVE(po, THR_EXIT, sizeof(struct pmclog_threadexit)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_THR_EXIT, + sizeof(struct pmclog_threadexit)); PMCLOG_EMIT32(td->td_tid); PMCLOG_DESPATCH(po); } @@ -1203,7 +1212,7 @@ pmclog_process_userlog(struct pmc_owner *po, struct pmc_op_writelog *wl) error = 0; - PMCLOG_RESERVE_WITH_ERROR(po, USERDATA, + PMCLOG_RESERVE_WITH_ERROR(po, PMCLOG_TYPE_USERDATA, sizeof(struct pmclog_userdata)); PMCLOG_EMIT32(wl->pm_userdata); PMCLOG_DESPATCH(po); From nobody Sat May 6 17:49:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSG4vBZz49sl5; Sat, 6 May 2023 17:49: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 4QDFSG461Fz3GNC; Sat, 6 May 2023 17:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aE0oY8lDEeg/gdq9mjCCEMBpFmIFLH8jGHFpwfCcc0k=; b=UgwVeaTAEIzYWZ2ZU5jkI1XARvROOrKtMUfI2/kvKwEW0sxBtr87geG4YOr/OO514yAKja 0ZAmxWYRQJd/UNM8tpAZpBIZHwnE3PhhGO+mPLXpOlJPOUqfwPXmh5iTSNNWUd16+7okYi AV8lEz+wVV1h3m4+9AzZOSpBbiB4aFyO6flUjprH9x23QjlWTVTHfsiHC1dMUa+mnXoFy4 8tadVroU+YdPz8rzTJR8NAiNJ3hQNJppZwWMrNyWipT5sh/fR5lg1uFelGl5qdkAfgMrqh ZmIBQYX0IUlTssEitEdqceIp07W8jZYDvgPzczLx6vuEZ3UhugVdD+scw3wV6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aE0oY8lDEeg/gdq9mjCCEMBpFmIFLH8jGHFpwfCcc0k=; b=WwefMituxrxgoCscXWPGFwulD7QsonzEyN8xUpXpW8hd5skLs2IclzJEpbAV9YRkStYT3Q BWVMc0mMaMVDqKhS9HXlqj0MY5Yrvy1I9q18/vUGZwR4CXdJSjOqEYxL50XGLR1hEi7TkX MO+LwHMrt8nuK4i6GGNebPMTLhQPs2qemgUI0TANRtnw64pUT4LKBbYteemhu6gjPzZFqO KcgNcxNbA3ZmtAAR3vCtgP9YoJltTeWvvN3DNCt/3cWsEU0iw8ia5v+UdbZIG19poXxLmj I9kbpbdyVIaVR8PKOl009kV05Qng2aQBN8PqkYCdi2MHwm0/ZnGSLcY4OUfmLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395390; a=rsa-sha256; cv=none; b=xV1WXYa4ssk7fBuw4NkfhgIQyqN7nnomplxodosbNcueZYf9mPO5czApEu9ssHTaZGx51S TtgfE+IERm2Nr521vYQEr2XqdarnZs9aKLwNZ463BcB0lmaOaTxtpp0Dpnm2pBLHrZO4SL t3xXWfkeB3VePVaTkH30EdrsIUaG8ClLtpkihJKpfAIbmdqwvGP7zeeLJctS/RGhZQ8LmI vJtf3HNRImnLQguTSzVVtFtSlt/cWmuK31A5+6isoGQWBmLN81Edmg8Rc+9E6Jao+/B2kD W12eEUbFmpBfj4gSEKOtmWSN5e+PA01+3SH19mXU/zej8rfQk3dyQiXwhfLZoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSG34JTzlk4; Sat, 6 May 2023 17:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hno3G018042; Sat, 6 May 2023 17:49:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnoQl018041; Sat, 6 May 2023 17:49:50 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:50 GMT Message-Id: <202305061749.346HnoQl018041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 772b2dc3abc5 - main - hwpmc: remove pmd_pcpu_{init,fini} callbacks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 772b2dc3abc5072743e7598d35e0a8ad621e7b0d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=772b2dc3abc5072743e7598d35e0a8ad621e7b0d commit 772b2dc3abc5072743e7598d35e0a8ad621e7b0d Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:33 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: remove pmd_pcpu_{init,fini} callbacks These are unused on all platforms. Reviewed by: jkoshy, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39912 --- sys/dev/hwpmc/hwpmc_amd.c | 2 -- sys/dev/hwpmc/hwpmc_core.c | 3 --- sys/dev/hwpmc/hwpmc_mod.c | 6 ------ sys/sys/pmc.h | 4 ---- 4 files changed, 15 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index c35f5fd4f095..43812951a8e5 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -1175,8 +1175,6 @@ pmc_amd_initialize(void) pcd->pcd_stop_pmc = amd_stop_pmc; pcd->pcd_write_pmc = amd_write_pmc; - pmc_mdep->pmd_pcpu_init = NULL; - pmc_mdep->pmd_pcpu_fini = NULL; pmc_mdep->pmd_intr = amd_intr; pmc_mdep->pmd_switch_in = amd_switch_in; pmc_mdep->pmd_switch_out = amd_switch_out; diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index ad9d323bdb9a..76ffbdb9b0d2 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -1294,9 +1294,6 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) else md->pmd_intr = core_intr; - md->pmd_pcpu_fini = NULL; - md->pmd_pcpu_init = NULL; - return (0); } diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index e5a12b666e1b..d5de1874c59b 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -5490,8 +5490,6 @@ pmc_generic_cpu_initialize(void) md->pmd_cputype = PMC_CPU_GENERIC; - md->pmd_pcpu_init = NULL; - md->pmd_pcpu_fini = NULL; md->pmd_switch_in = generic_switch_in; md->pmd_switch_out = generic_switch_out; @@ -5634,8 +5632,6 @@ pmc_initialize(void) pmc_pcpu[cpu] = malloc(sizeof(struct pmc_cpu) + md->pmd_npmc * sizeof(struct pmc_hw *), M_PMC, M_WAITOK|M_ZERO); - if (md->pmd_pcpu_init) - error = md->pmd_pcpu_init(md, cpu); for (n = 0; error == 0 && n < md->pmd_nclass; n++) if (md->pmd_classdep[n].pcd_num > 0) error = md->pmd_classdep[n].pcd_pcpu_init(md, @@ -5879,8 +5875,6 @@ pmc_cleanup(void) if (md->pmd_classdep[c].pcd_num > 0) md->pmd_classdep[c].pcd_pcpu_fini(md, cpu); - if (md->pmd_pcpu_fini) - md->pmd_pcpu_fini(md, cpu); } if (md->pmd_cputype == PMC_CPU_GENERIC) diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 558fe4b20d39..3a6052594fda 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -1043,10 +1043,6 @@ struct pmc_mdep { * Machine dependent methods. */ - /* per-cpu initialization and finalization */ - int (*pmd_pcpu_init)(struct pmc_mdep *_md, int _cpu); - int (*pmd_pcpu_fini)(struct pmc_mdep *_md, int _cpu); - /* thread context switch in/out */ int (*pmd_switch_in)(struct pmc_cpu *_p, struct pmc_process *_pp); int (*pmd_switch_out)(struct pmc_cpu *_p, struct pmc_process *_pp); From nobody Sat May 6 17:49:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSJ0gcyz49syV; Sat, 6 May 2023 17:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFSH5XgRz3GSb; Sat, 6 May 2023 17:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UPKqcP6mgdY0vdEGK3iOOM21zT4qO7fYbIySkRGQkKU=; b=yLioIo+0iWn/ThZC+1JmMxpgWJ3II5KSZj33DQ+OPMUZpY4/LW5KzSB9KWNrC9C0ZfBS0V hSVEgm8gRhIcbd+DmN3uPFehYln0CH14Syg3GDPhfvwHMjUJZRx0nzdsxiMhs995W2ZM6m unrCNSlD/dPmRGAGOmgyB9rQBu7ngiHrRI72mgO/EQsZXiPRDck7owwrun0GQylaxpzk83 5R8TNUFQ9qG56OsWlV8NHwAaF4t38r9A6jdP7gnnpcr3EPJd3S5q4JePGFTjd8O8FyKYNV U3UnZRlbb07PLJeahK1/BrUTKiMS7bVQMXb5GSE0jGizcqYjlSCuMcNJaLNoHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UPKqcP6mgdY0vdEGK3iOOM21zT4qO7fYbIySkRGQkKU=; b=NZqIFH9igTOFpIT1KWhgTPd4vScpGd0Pb7NdF/vIsVlpC2YQL+nT5Uc0i8LGCri8qB11nF PhCmrbDZ1RVvWaSBk0FCQi1+IL5RfTHAzKzdP16FZmxzHbUj3GGVgPrVGfvj80xmI2x6/r 5CvInk4Mb0KBKwDB6TScIxLNMaUIcxMtHs0OaOyX1VgXNh/ch1NL5eWIiQTY5y1Muo/WTg fIivHYOJrVv21CqNzS/YpZ/4DhyAyPMX6c3uiNSUO8MKDUJwJDmYFlRM1sUbhd4+pmgoUa BHcMmeELvCvppp58vYrhotS1JdCMghoSDtn8HUIhzSW8YK8URhizBv0br/SRDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395391; a=rsa-sha256; cv=none; b=lhUtS3vyOIDGO6mKuGsXyvALDZwIuPPT6wecr6RsmzPfZoK65Pkp1kB6qNuCv+Zt+ccTKL X9riQ2d9e/X41vjBw24x/tXbAQH+pkYjiuR2MyaWe3NIjPyKThaW8+Zld3IOhCfFvZNydn 4ceANeFfDFU0gQk7pREbZ/rjYYSdcRdZOSTW1WtxJfoRVUig2G9XKDbTnJLtoOR4iUE4ha ZFh+hDwNy05yZAytLyTfdnTma68RA6TQf0S47FlQPQokm5psXZHzhIWuGpJRwCgvYiuM9E ALoS/vjp1GFsUvdjmmECby8Y9APc3/1ndBJ4jx9sdSo2Vcp9G6Ii+/95CuLb9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSH496rzlwZ; Sat, 6 May 2023 17:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnpjj018063; Sat, 6 May 2023 17:49:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnpM2018062; Sat, 6 May 2023 17:49:51 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:51 GMT Message-Id: <202305061749.346HnpM2018062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: fa88954fd8f1 - main - hwpmc: remove stub pmd_switch_{in,out} methods List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa88954fd8f16ef60084a73d446a23e791ed22e5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=fa88954fd8f16ef60084a73d446a23e791ed22e5 commit fa88954fd8f16ef60084a73d446a23e791ed22e5 Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:41 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: remove stub pmd_switch_{in,out} methods Most platforms (non-x86) don't require these methods and implement stub versions. If we initialize the pmc_mdep structure to always point to the generic versions, then we can purge the duplicate stubs. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39913 --- sys/dev/hwpmc/hwpmc_arm64.c | 24 ++---------------------- sys/dev/hwpmc/hwpmc_armv7.c | 24 ++---------------------- sys/dev/hwpmc/hwpmc_mod.c | 7 ++++--- sys/dev/hwpmc/hwpmc_powerpc.c | 17 ----------------- 4 files changed, 8 insertions(+), 64 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index baf05e52b42a..e3fefc96ff8f 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -448,23 +448,6 @@ arm64_get_config(int cpu, int ri, struct pmc **ppm) return (0); } -/* - * XXX don't know what we should do here. - */ -static int -arm64_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - -static int -arm64_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - static int arm64_pcpu_init(struct pmc_mdep *md, int cpu) { @@ -614,11 +597,8 @@ pmc_arm64_initialize(void) pcd->pcd_stop_pmc = arm64_stop_pmc; pcd->pcd_write_pmc = arm64_write_pmc; - pmc_mdep->pmd_intr = arm64_intr; - pmc_mdep->pmd_switch_in = arm64_switch_in; - pmc_mdep->pmd_switch_out = arm64_switch_out; - - pmc_mdep->pmd_npmc += arm64_npmcs; + pmc_mdep->pmd_intr = arm64_intr; + pmc_mdep->pmd_npmc += arm64_npmcs; #ifdef DEV_ACPI if (pmc_cmn600_nclasses() > 0) diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 34f3fd009c9d..526f9c59b4c8 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -416,23 +416,6 @@ armv7_get_config(int cpu, int ri, struct pmc **ppm) return 0; } -/* - * XXX don't know what we should do here. - */ -static int -armv7_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return 0; -} - -static int -armv7_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return 0; -} - static int armv7_pcpu_init(struct pmc_mdep *md, int cpu) { @@ -551,11 +534,8 @@ pmc_armv7_initialize(void) pcd->pcd_stop_pmc = armv7_stop_pmc; pcd->pcd_write_pmc = armv7_write_pmc; - pmc_mdep->pmd_intr = armv7_intr; - pmc_mdep->pmd_switch_in = armv7_switch_in; - pmc_mdep->pmd_switch_out = armv7_switch_out; - - pmc_mdep->pmd_npmc += armv7_npmcs; + pmc_mdep->pmd_intr = armv7_intr; + pmc_mdep->pmd_npmc += armv7_npmcs; return (pmc_mdep); } diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index d5de1874c59b..fd90e62e3f2c 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -5453,6 +5453,10 @@ pmc_mdep_alloc(int nclasses) sizeof(struct pmc_classdep), M_PMC, M_WAITOK|M_ZERO); md->pmd_nclass = n; + /* Default methods */ + md->pmd_switch_in = generic_switch_in; + md->pmd_switch_out = generic_switch_out; + /* Add base class. */ pmc_soft_initialize(md); return md; @@ -5490,9 +5494,6 @@ pmc_generic_cpu_initialize(void) md->pmd_cputype = PMC_CPU_GENERIC; - md->pmd_switch_in = generic_switch_in; - md->pmd_switch_out = generic_switch_out; - return (md); } diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c index 3d65d8753fcb..e2ce979d0ba8 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.c +++ b/sys/dev/hwpmc/hwpmc_powerpc.c @@ -105,20 +105,6 @@ pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, return (frames); } -static int -powerpc_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - -static int -powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - int powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { @@ -564,9 +550,6 @@ pmc_md_initialize(void) vers = mfpvr() >> 16; - pmc_mdep->pmd_switch_in = powerpc_switch_in; - pmc_mdep->pmd_switch_out = powerpc_switch_out; - switch (vers) { case MPC7447A: case MPC7448: From nobody Sat May 6 17:49:52 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSK08tpz49slF; Sat, 6 May 2023 17:49: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 4QDFSJ68F3z3GFF; Sat, 6 May 2023 17:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxIxMGvShTPNzNwTKZx8yIv+VkAQ0DtFZIjU6IWdsao=; b=FqeSMC8nFF4tjRwqjMbc5ndkSIoEnz6IE4Y0EHVBq4yaOLLN5O0G+l70Dh9DLcZFOqS2N5 PiNJ6t/b8k9JsApdnu9AfBv0Pwyj5ISEkLfAr5JfgEdBemXfxbuiI20J+ETBFLkgy7t5Ce myUjCv8nHOiY0X2MVdbY77JievCLJQo4jE93cYebHMHxcBFazct4dpJqrjGQlWXva6e7lQ PX9UccRaUUnWdit56PARAGmZxLMbiO5rKgye+GBzv1Er1i53Q6XVY9WGrJYzVTHUGPUwcs w4i7jzHGOR5VOIxC6FF7ZlnCk6CqGczQi/gfcIrVoWyROQfI3NPzPCgol7tWHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxIxMGvShTPNzNwTKZx8yIv+VkAQ0DtFZIjU6IWdsao=; b=Ijl/5v7sVLCisYng/Y7uGxt31HFi+3S/dFQcyiRtrOq0TxCiSdkgWNibFPsx3UTbiMVKuq 5DGyGGi6ZMX3ZvNgMtjGoaGrvucGU0pE0mS7kKp1PDR4GhonD0SFvWAam5P+SPta2C2GA2 rhcI4chxM62eygaQ0VdBbUA9verjfZBOJo6od2liC/CAUFupeMDR7iMFgijQ0q9LIrDVjL 4WEE9MfBNkbqY/Go+jH0z6GqamdEg3r2pT1r2uzchhR1tlWTNH65l7m/bT/Uq3tmHZBoJd QRr/N5tB3KnnuXTuD+en9oS3PCPfUlB/hsuiSlfOViHPgEMcwTAbF5RBjrjCQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395392; a=rsa-sha256; cv=none; b=pGwOuEXSZMME2Z1lPbAOBUFamkY44Kc6DiXT3qXZhgayVGoI7XxsYcH1gw47XrFJewA6g9 AW0by2t3wFQsvBRSjlYmgteYfZwLtKsh6mrpFu0ibAjadSrsg4I6JC8W2OHvOkat4ZS5WH 3k7qyI8E4HtxLrbakDizKgcM/oiAC2AWJQfq3UTYKt2ixCVu1aPRAc9wQ8xduj4+hL0w5z EuWpdMQjEnE02HU9jNt8+RT4m11lqz3N1I+UhMSWLLdbNHheqbBHXHq95TiUXHNs1H/B/o XJTYsiS0/EeP6QvsYWuzAfVuCz+/hPhx83l5xG70P8dyKTldWLjCA5jj6laeMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSJ5D24zlgm; Sat, 6 May 2023 17:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnqXZ018082; Sat, 6 May 2023 17:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnqMP018081; Sat, 6 May 2023 17:49:52 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:52 GMT Message-Id: <202305061749.346HnqMP018081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: a35453b9c764 - main - hwpmc: unused/diagused annotations in tsc class List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a35453b9c7644f11df83d0c7e73da488f521e56e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a35453b9c7644f11df83d0c7e73da488f521e56e commit a35453b9c7644f11df83d0c7e73da488f521e56e Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:53 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: unused/diagused annotations in tsc class These are preferred over casts to void. No functional change. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39914 --- sys/dev/hwpmc/hwpmc_tsc.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_tsc.c b/sys/dev/hwpmc/hwpmc_tsc.c index 25b2e9f8fd57..3c95ceb080a5 100644 --- a/sys/dev/hwpmc/hwpmc_tsc.c +++ b/sys/dev/hwpmc/hwpmc_tsc.c @@ -70,10 +70,9 @@ struct tsc_cpu { static struct tsc_cpu **tsc_pcpu; static int -tsc_allocate_pmc(int cpu, int ri, struct pmc *pm, +tsc_allocate_pmc(int cpu __diagused, int ri __diagused, struct pmc *pm __unused, const struct pmc_op_pmcallocate *a) { - (void) cpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -140,9 +139,8 @@ tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) } static int -tsc_get_config(int cpu, int ri, struct pmc **ppm) +tsc_get_config(int cpu, int ri __diagused, struct pmc **ppm) { - (void) ri; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU %d", __LINE__, cpu)); @@ -154,9 +152,8 @@ tsc_get_config(int cpu, int ri, struct pmc **ppm) } static int -tsc_get_msr(int ri, uint32_t *msr) +tsc_get_msr(int ri __diagused, uint32_t *msr) { - (void) ri; KASSERT(ri >= 0 && ri < TSC_NPMCS, ("[tsc,%d] ri %d out of range", __LINE__, ri)); @@ -252,12 +249,10 @@ tsc_read_pmc(int cpu, int ri, pmc_value_t *v) } static int -tsc_release_pmc(int cpu, int ri, struct pmc *pmc) +tsc_release_pmc(int cpu, int ri __diagused, struct pmc *pmc __unused) { struct pmc_hw *phw __diagused; - (void) pmc; - KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri == 0, @@ -275,9 +270,8 @@ tsc_release_pmc(int cpu, int ri, struct pmc *pmc) } static int -tsc_start_pmc(int cpu, int ri) +tsc_start_pmc(int cpu __diagused, int ri __diagused) { - (void) cpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -287,9 +281,8 @@ tsc_start_pmc(int cpu, int ri) } static int -tsc_stop_pmc(int cpu, int ri) +tsc_stop_pmc(int cpu __diagused, int ri __diagused) { - (void) cpu; (void) ri; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -299,9 +292,8 @@ tsc_stop_pmc(int cpu, int ri) } static int -tsc_write_pmc(int cpu, int ri, pmc_value_t v) +tsc_write_pmc(int cpu __diagused, int ri __diagused, pmc_value_t v __unused) { - (void) cpu; (void) ri; (void) v; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -354,7 +346,7 @@ pmc_tsc_initialize(struct pmc_mdep *md, int maxcpu) } void -pmc_tsc_finalize(struct pmc_mdep *md) +pmc_tsc_finalize(struct pmc_mdep *md __diagused) { #ifdef INVARIANTS int i, ncpus; @@ -366,9 +358,6 @@ pmc_tsc_finalize(struct pmc_mdep *md) KASSERT(md->pmd_classdep[PMC_MDEP_CLASS_INDEX_TSC].pcd_class == PMC_CLASS_TSC, ("[tsc,%d] class mismatch", __LINE__)); - -#else - (void) md; #endif free(tsc_pcpu, M_PMC); From nobody Sat May 6 17:49:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSL0ln2z49sw4; Sat, 6 May 2023 17:49: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 4QDFSK73MLz3GWW; Sat, 6 May 2023 17:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuBguxfgg+zLQ+53NeuB8Yv/d4YuuL9HB+oEZP3aJ6E=; b=I5pRLxpvT5h3cwTvQrGbxZQ2GTKirY/fnWZmnMvKxJgympuvswYeO+MKb7PQ+FzE2mzjta LDXbd0tJw5ObjXrfm9vdWjSQeuO/XlTlfYjrP+NdUJHSBKwPJCwxbJ7sYYxoFByI/YYCa4 OywqxdM91BV3EEUTXux7uaPWhetBAnxpapx1IKqUMunVEJalYJmnGtw8IzWEDual5N+Fcs eGOoOEkCVB4wZsInAwaW7HKLT6y23eoInwE9xWHHcpndykJ37Hxzr7y1x6r8ToDuhvC9rC wNUcUh6Lg/bsg0KEHhgl8PdYVY6wLawuWxWlshXVFWok0md4lFZ7yFFdF7VVPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuBguxfgg+zLQ+53NeuB8Yv/d4YuuL9HB+oEZP3aJ6E=; b=ZOQ0VhmZhjYbU1zX1tAUpvy2JN7DdOg9d466Nqe0QWaxFM44sZlAUPPRwv9TSNiL1M339L 3tKH1nnOoAUrk27sItemXoUcLoxOWrNeth/Q4kYpINwAybSASt9dQgJeJJYz2S5D7j+ZDu +puKJRW8hb6jTRtMggBb0dkX1n4RF20JdeLzd01BX0v8iBkl2L87gdUxdK10PRVG0bVJJo gWkk/OMvM1psfE1UxpP8rqRp65RetJNyEPm/5EsinXf/Ydr7hbGMf5FMslOfVRBe0QeaW4 jYoGj1iV/vjzPtp0X/NsVfpswDp9N5D+qCA0bneDf8SKmzTzI13MdhDYvqRgOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395394; a=rsa-sha256; cv=none; b=JMaUqTV7fxGZPPlrcUMJ2EISsGNOHPD2AR8Cy8kJVaocCo7QEFvOTWtDYvImMRI9k+SS+x VLtrnjaoINIdJwn/PZMNqp0HVZ9/2uc7/5+IKt6PHcYJcymgpu629h+Rvo+CVJ96fGcGkW lJkn4STrbH/+3HU5UFGe2rF0wlXuG4TTy/4IRiDzeODQn8qTS1HcrbA2WeZQ27dbYDI5Fn CdYmy5ZEPy2oG5w/1LrytldvSX0QnayIgZhTGH/LKnJKz9DVNiLCimyX6+CLFpApWyC1Ff Llg1PdMrefg/yqEbHgi/e9o7xqS8X72JpTJAr+gChVPhC5eTkoCeiHOQRTc6Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSK68n7zlnJ; Sat, 6 May 2023 17:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnr2f018104; Sat, 6 May 2023 17:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnrUw018103; Sat, 6 May 2023 17:49:53 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:53 GMT Message-Id: <202305061749.346HnrUw018103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 39f92a76a99a - main - hwpmc: pass pmc pointer to more class methods List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39f92a76a99a2ceb747250da4f2d627b9c317f8c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=39f92a76a99a2ceb747250da4f2d627b9c317f8c commit 39f92a76a99a2ceb747250da4f2d627b9c317f8c Author: Mitchell Horne AuthorDate: 2023-05-05 22:00:02 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: pass pmc pointer to more class methods In many cases this avoids an extra lookup, since the callers always have pm at hand. We can also eliminate several assertions, mostly for pm != NULL. The class methods are an internal interface, and the callers already handle such a scenario. No functional change intended. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39915 --- sys/dev/hwpmc/hwpmc_amd.c | 39 ++++----------------------- sys/dev/hwpmc/hwpmc_arm64.c | 22 +++++---------- sys/dev/hwpmc/hwpmc_armv7.c | 26 +++++------------- sys/dev/hwpmc/hwpmc_cmn600.c | 36 +++++-------------------- sys/dev/hwpmc/hwpmc_core.c | 62 ++++++------------------------------------- sys/dev/hwpmc/hwpmc_dmc620.c | 42 ++++++----------------------- sys/dev/hwpmc/hwpmc_e500.c | 2 +- sys/dev/hwpmc/hwpmc_mod.c | 34 +++++++++++++----------- sys/dev/hwpmc/hwpmc_powerpc.c | 25 +++++------------ sys/dev/hwpmc/hwpmc_powerpc.h | 8 +++--- sys/dev/hwpmc/hwpmc_soft.c | 41 ++++------------------------ sys/dev/hwpmc/hwpmc_tsc.c | 17 ++++-------- sys/dev/hwpmc/hwpmc_uncore.c | 62 ++++++------------------------------------- sys/sys/pmc.h | 12 +++++---- 14 files changed, 94 insertions(+), 334 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 43812951a8e5..9fe1f4f8ed87 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -397,11 +397,10 @@ static struct amd_cpu **amd_pcpu; */ static int -amd_read_pmc(int cpu, int ri, pmc_value_t *v) +amd_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { enum pmc_mode mode; const struct amd_descr *pd; - struct pmc *pm; pmc_value_t tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -411,13 +410,7 @@ amd_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(amd_pcpu[cpu], ("[amd,%d] null per-cpu, cpu %d", __LINE__, cpu)); - pm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; pd = &amd_pmcdesc[ri]; - - KASSERT(pm != NULL, - ("[amd,%d] No owner for HWPMC [cpu%d,pmc%d]", __LINE__, - cpu, ri)); - mode = PMC_TO_MODE(pm); PMCDBG2(MDP,REA,1,"amd-read id=%d class=%d", ri, pd->pm_descr.pd_class); @@ -456,24 +449,17 @@ amd_read_pmc(int cpu, int ri, pmc_value_t *v) */ static int -amd_write_pmc(int cpu, int ri, pmc_value_t v) +amd_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { const struct amd_descr *pd; enum pmc_mode mode; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - pm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; pd = &amd_pmcdesc[ri]; - - KASSERT(pm != NULL, - ("[amd,%d] PMC not owned (cpu%d,pmc%d)", __LINE__, - cpu, ri)); - mode = PMC_TO_MODE(pm); #ifdef HWPMC_DEBUG @@ -705,11 +691,9 @@ amd_release_pmc(int cpu, int ri, struct pmc *pmc) */ static int -amd_start_pmc(int cpu, int ri) +amd_start_pmc(int cpu, int ri, struct pmc *pm) { uint64_t config; - struct pmc *pm; - struct pmc_hw *phw; const struct amd_descr *pd; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -717,14 +701,8 @@ amd_start_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; - pm = phw->phw_pmc; pd = &amd_pmcdesc[ri]; - KASSERT(pm != NULL, - ("[amd,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, - cpu, ri)); - PMCDBG2(MDP,STA,1,"amd-start cpu=%d ri=%d", cpu, ri); KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), @@ -745,10 +723,8 @@ amd_start_pmc(int cpu, int ri) */ static int -amd_stop_pmc(int cpu, int ri) +amd_stop_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; - struct pmc_hw *phw; const struct amd_descr *pd; uint64_t config; int i; @@ -758,13 +734,8 @@ amd_stop_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; - pm = phw->phw_pmc; - pd = &amd_pmcdesc[ri]; + pd = &amd_pmcdesc[ri]; - KASSERT(pm != NULL, - ("[amd,%d] cpu%d,pmc%d no PMC to stop", __LINE__, - cpu, ri)); KASSERT(!AMD_PMC_IS_STOPPED(pd->pm_evsel), ("[amd,%d] PMC%d, CPU%d \"%s\" already stopped", __LINE__, ri, cpu, pd->pm_descr.pd_name)); diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index e3fefc96ff8f..bbd3edf84ea0 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -211,10 +211,9 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, static int -arm64_read_pmc(int cpu, int ri, pmc_value_t *v) +arm64_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { pmc_value_t tmp; - struct pmc *pm; register_t s; int reg; @@ -223,8 +222,6 @@ arm64_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < arm64_npmcs, ("[arm64,%d] illegal row index %d", __LINE__, ri)); - pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; - /* * Ensure we don't get interrupted while updating the overflow count. */ @@ -260,17 +257,14 @@ arm64_read_pmc(int cpu, int ri, pmc_value_t *v) } static int -arm64_write_pmc(int cpu, int ri, pmc_value_t v) +arm64_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[arm64,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < arm64_npmcs, ("[arm64,%d] illegal row-index %d", __LINE__, ri)); - pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; - if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = ARMV8_RELOAD_COUNT_TO_PERFCTR_VALUE(v); @@ -306,14 +300,10 @@ arm64_config_pmc(int cpu, int ri, struct pmc *pm) } static int -arm64_start_pmc(int cpu, int ri) +arm64_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc_hw *phw; uint32_t config; - struct pmc *pm; - phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; - pm = phw->phw_pmc; config = pm->pm_md.pm_arm64.pm_arm64_evsel; /* @@ -334,7 +324,7 @@ arm64_start_pmc(int cpu, int ri) } static int -arm64_stop_pmc(int cpu, int ri) +arm64_stop_pmc(int cpu, int ri, struct pmc *pm __unused) { /* * Disable the PMCs. @@ -404,10 +394,10 @@ arm64_intr(struct trapframe *tf) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - arm64_stop_pmc(cpu, ri); + arm64_stop_pmc(cpu, ri, pm); /* Reload sampling count */ - arm64_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + arm64_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount); } return (retval); diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 526f9c59b4c8..89cb27457bd2 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -160,10 +160,9 @@ armv7_allocate_pmc(int cpu, int ri, struct pmc *pm, static int -armv7_read_pmc(int cpu, int ri, pmc_value_t *v) +armv7_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { pmc_value_t tmp; - struct pmc *pm; register_t s; u_int reg; @@ -172,8 +171,6 @@ armv7_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < armv7_npmcs, ("[armv7,%d] illegal row index %d", __LINE__, ri)); - pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; - s = intr_disable(); tmp = armv7_pmcn_read(ri, pm->pm_md.pm_armv7.pm_armv7_evsel); @@ -212,17 +209,14 @@ armv7_read_pmc(int cpu, int ri, pmc_value_t *v) } static int -armv7_write_pmc(int cpu, int ri, pmc_value_t v) +armv7_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < armv7_npmcs, ("[armv7,%d] illegal row-index %d", __LINE__, ri)); - pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; - if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = ARMV7_RELOAD_COUNT_TO_PERFCTR_VALUE(v); @@ -261,14 +255,10 @@ armv7_config_pmc(int cpu, int ri, struct pmc *pm) } static int -armv7_start_pmc(int cpu, int ri) +armv7_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc_hw *phw; uint32_t config; - struct pmc *pm; - phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; - pm = phw->phw_pmc; config = pm->pm_md.pm_armv7.pm_armv7_evsel; /* @@ -290,14 +280,10 @@ armv7_start_pmc(int cpu, int ri) } static int -armv7_stop_pmc(int cpu, int ri) +armv7_stop_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc_hw *phw; - struct pmc *pm; uint32_t config; - phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; - pm = phw->phw_pmc; config = pm->pm_md.pm_armv7.pm_armv7_evsel; if (config == PMC_EV_CPU_CYCLES) ri = 31; @@ -372,10 +358,10 @@ armv7_intr(struct trapframe *tf) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - armv7_stop_pmc(cpu, ri); + armv7_stop_pmc(cpu, ri, pm); /* Reload sampling count */ - armv7_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + armv7_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount); } return (retval); diff --git a/sys/dev/hwpmc/hwpmc_cmn600.c b/sys/dev/hwpmc/hwpmc_cmn600.c index 82b6e553801a..762063a4a173 100644 --- a/sys/dev/hwpmc/hwpmc_cmn600.c +++ b/sys/dev/hwpmc/hwpmc_cmn600.c @@ -141,11 +141,10 @@ cmn600_pmu_writecntr(void *arg, u_int nodeid, u_int xpcntr, u_int dtccntr, * read a pmc register */ static int -cmn600_read_pmc(int cpu, int ri, pmc_value_t *v) +cmn600_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { int counter, local_counter, nodeid; struct cmn600_descr *desc; - struct pmc *pm; void *arg; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -155,15 +154,10 @@ cmn600_read_pmc(int cpu, int ri, pmc_value_t *v) counter = ri % CMN600_COUNTERS_N; desc = cmn600desc(ri); - pm = desc->pd_phw->phw_pmc; arg = desc->pd_rw_arg; nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid; local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; - KASSERT(pm != NULL, - ("[cmn600,%d] No owner for HWPMC [cpu%d,pmc%d]", __LINE__, - cpu, ri)); - *v = cmn600_pmu_readcntr(arg, nodeid, local_counter, counter, 4); PMCDBG3(MDP, REA, 2, "%s id=%d -> %jd", __func__, ri, *v); @@ -174,11 +168,10 @@ cmn600_read_pmc(int cpu, int ri, pmc_value_t *v) * Write a pmc register. */ static int -cmn600_write_pmc(int cpu, int ri, pmc_value_t v) +cmn600_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { int counter, local_counter, nodeid; struct cmn600_descr *desc; - struct pmc *pm; void *arg; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -188,7 +181,6 @@ cmn600_write_pmc(int cpu, int ri, pmc_value_t v) counter = ri % CMN600_COUNTERS_N; desc = cmn600desc(ri); - pm = desc->pd_phw->phw_pmc; arg = desc->pd_rw_arg; nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid; local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; @@ -424,13 +416,11 @@ cmn600_encode_source(int node_type, int counter, int port, int sub) */ static int -cmn600_start_pmc(int cpu, int ri) +cmn600_start_pmc(int cpu, int ri, struct pmc *pm) { int counter, local_counter, node_type, shift; uint64_t config, occupancy, source, xp_pmucfg; struct cmn600_descr *desc; - struct pmc_hw *phw; - struct pmc *pm; uint8_t event, port, sub; uint16_t nodeid; void *arg; @@ -442,14 +432,8 @@ cmn600_start_pmc(int cpu, int ri) counter = ri % CMN600_COUNTERS_N; desc = cmn600desc(ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; arg = desc->pd_rw_arg; - KASSERT(pm != NULL, - ("[cmn600,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, - cpu, ri)); - PMCDBG3(MDP, STA, 1, "%s cpu=%d ri=%d", __func__, cpu, ri); config = pm->pm_md.pm_cmn600.pm_cmn600_config; @@ -541,11 +525,9 @@ cmn600_start_pmc(int cpu, int ri) */ static int -cmn600_stop_pmc(int cpu, int ri) +cmn600_stop_pmc(int cpu, int ri, struct pmc *pm) { struct cmn600_descr *desc; - struct pmc_hw *phw; - struct pmc *pm; int local_counter; uint64_t val; @@ -555,12 +537,6 @@ cmn600_stop_pmc(int cpu, int ri) ri)); desc = cmn600desc(ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; - - KASSERT(pm != NULL, - ("[cmn600,%d] cpu%d,pmc%d no PMC to stop", __LINE__, - cpu, ri)); PMCDBG2(MDP, STO, 1, "%s ri=%d", __func__, ri); @@ -696,10 +672,10 @@ cmn600_pmu_intr(struct trapframe *tf, int unit, int i) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - cmn600_stop_pmc(cpu, ri); + cmn600_stop_pmc(cpu, ri, pm); /* Reload sampling count */ - cmn600_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + cmn600_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount); return (0); } diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 76ffbdb9b0d2..02165898aeed 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -368,9 +368,8 @@ iaf_get_msr(int ri, uint32_t *msr) } static int -iaf_read_pmc(int cpu, int ri, pmc_value_t *v) +iaf_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { - struct pmc *pm; pmc_value_t tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -378,12 +377,6 @@ iaf_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < core_iaf_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - pm = core_pcpu[cpu]->pc_corepmcs[ri + core_iaf_ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu %d ri %d(%d) pmc not configured", __LINE__, cpu, - ri, ri + core_iaf_ri)); - tmp = rdpmc(IAF_RI_TO_MSR(ri)); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) @@ -421,9 +414,8 @@ iaf_release_pmc(int cpu, int ri, struct pmc *pmc) } static int -iaf_start_pmc(int cpu, int ri) +iaf_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; struct core_cpu *cc; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -434,8 +426,6 @@ iaf_start_pmc(int cpu, int ri) PMCDBG2(MDP,STA,1,"iaf-start cpu=%d ri=%d", cpu, ri); cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri + core_iaf_ri].phw_pmc; - cc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; wrmsr(IAF_CTRL, cc->pc_iafctrl); @@ -450,7 +440,7 @@ iaf_start_pmc(int cpu, int ri) } static int -iaf_stop_pmc(int cpu, int ri) +iaf_stop_pmc(int cpu, int ri, struct pmc *pm) { struct core_cpu *cc; @@ -476,10 +466,9 @@ iaf_stop_pmc(int cpu, int ri) } static int -iaf_write_pmc(int cpu, int ri, pmc_value_t v) +iaf_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { struct core_cpu *cc; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -487,10 +476,6 @@ iaf_write_pmc(int cpu, int ri, pmc_value_t v) ("[core,%d] illegal row-index %d", __LINE__, ri)); cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri + core_iaf_ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, ri)); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); @@ -846,9 +831,8 @@ iap_get_msr(int ri, uint32_t *msr) } static int -iap_read_pmc(int cpu, int ri, pmc_value_t *v) +iap_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { - struct pmc *pm; pmc_value_t tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -856,12 +840,6 @@ iap_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - pm = core_pcpu[cpu]->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, - ri)); - tmp = rdpmc(ri); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) *v = iap_perfctr_value_to_reload_count(tmp); @@ -894,9 +872,8 @@ iap_release_pmc(int cpu, int ri, struct pmc *pm) } static int -iap_start_pmc(int cpu, int ri) +iap_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; uint64_t evsel; struct core_cpu *cc; @@ -906,11 +883,6 @@ iap_start_pmc(int cpu, int ri) ("[core,%d] illegal row-index %d", __LINE__, ri)); cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] starting cpu%d,ri%d with no pmc configured", - __LINE__, cpu, ri)); PMCDBG2(MDP,STA,1, "iap-start cpu=%d ri=%d", cpu, ri); @@ -943,23 +915,14 @@ iap_start_pmc(int cpu, int ri) } static int -iap_stop_pmc(int cpu, int ri) +iap_stop_pmc(int cpu, int ri, struct pmc *pm __unused) { - struct pmc *pm __diagused; - struct core_cpu *cc; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row index %d", __LINE__, ri)); - cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, - cpu, ri)); - PMCDBG2(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); wrmsr(IAP_EVSEL0 + ri, 0); @@ -970,23 +933,14 @@ iap_stop_pmc(int cpu, int ri) } static int -iap_write_pmc(int cpu, int ri, pmc_value_t v) +iap_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; - struct core_cpu *cc; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row index %d", __LINE__, ri)); - cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, - cpu, ri)); - if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iap_reload_count_to_perfctr_value(v); diff --git a/sys/dev/hwpmc/hwpmc_dmc620.c b/sys/dev/hwpmc/hwpmc_dmc620.c index 6152e264a169..f32199df15e7 100644 --- a/sys/dev/hwpmc/hwpmc_dmc620.c +++ b/sys/dev/hwpmc/hwpmc_dmc620.c @@ -192,10 +192,10 @@ class_ri2unit(int class, int ri) * read a pmc register */ -CLASSDEP_FN3(dmc620_read_pmc, int, cpu, int, ri, pmc_value_t *, v) +CLASSDEP_FN4(dmc620_read_pmc, int, cpu, int, ri, struct pmc *, pm, + pmc_value_t *, v) { struct dmc620_descr *desc; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU value %d", __LINE__, cpu)); @@ -203,11 +203,6 @@ CLASSDEP_FN3(dmc620_read_pmc, int, cpu, int, ri, pmc_value_t *, v) ri)); desc = dmc620desc(class, cpu, ri); - pm = desc->pd_phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] No owner for HWPMC [cpu%d,pmc%d]", __LINE__, - cpu, ri)); PMCDBG3(MDP,REA,1,"%s id=%d class=%d", __func__, ri, class); @@ -229,10 +224,10 @@ CLASSDEP_FN3(dmc620_read_pmc, int, cpu, int, ri, pmc_value_t *, v) * Write a pmc register. */ -CLASSDEP_FN3(dmc620_write_pmc, int, cpu, int, ri, pmc_value_t, v) +CLASSDEP_FN4(dmc620_write_pmc, int, cpu, int, ri, struct pmc *, pm, + pmc_value_t, v) { struct dmc620_descr *desc; - struct pmc *pm __diagused; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU value %d", __LINE__, cpu)); @@ -240,11 +235,6 @@ CLASSDEP_FN3(dmc620_write_pmc, int, cpu, int, ri, pmc_value_t, v) ri)); desc = dmc620desc(class, cpu, ri); - pm = desc->pd_phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] PMC not owned (cpu%d,pmc%d)", __LINE__, - cpu, ri)); PMCDBG4(MDP, WRI, 1, "%s cpu=%d ri=%d v=%jx", __func__, cpu, ri, v); @@ -374,12 +364,10 @@ CLASSDEP_FN3(dmc620_release_pmc, int, cpu, int, ri, struct pmc *, pmc) * start a PMC. */ -CLASSDEP_FN2(dmc620_start_pmc, int, cpu, int, ri) +CLASSDEP_FN3(dmc620_start_pmc, int, cpu, int, ri, struct pmc *, pm) { struct dmc620_descr *desc; - struct pmc_hw *phw; uint64_t control; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU value %d", __LINE__, cpu)); @@ -387,12 +375,6 @@ CLASSDEP_FN2(dmc620_start_pmc, int, cpu, int, ri) ri)); desc = dmc620desc(class, cpu, ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, - cpu, ri)); PMCDBG3(MDP, STA, 1, "%s cpu=%d ri=%d", __func__, cpu, ri); @@ -418,11 +400,9 @@ CLASSDEP_FN2(dmc620_start_pmc, int, cpu, int, ri) * Stop a PMC. */ -CLASSDEP_FN2(dmc620_stop_pmc, int, cpu, int, ri) +CLASSDEP_FN3(dmc620_stop_pmc, int, cpu, int, ri, struct pmc *, pm) { struct dmc620_descr *desc; - struct pmc_hw *phw; - struct pmc *pm; uint64_t control; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -431,12 +411,6 @@ CLASSDEP_FN2(dmc620_stop_pmc, int, cpu, int, ri) ri)); desc = dmc620desc(class, cpu, ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] cpu%d,pmc%d no PMC to stop", __LINE__, - cpu, ri)); PMCDBG2(MDP, STO, 1, "%s ri=%d", __func__, ri); @@ -564,10 +538,10 @@ dmc620_intr(struct trapframe *tf, int class, int unit, int i) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - dmc620_stop_pmc(class, cpu, ri); + dmc620_stop_pmc(class, cpu, ri, pm); /* Reload sampling count */ - dmc620_write_pmc(class, cpu, ri, pm->pm_sc.pm_reloadcount); + dmc620_write_pmc(class, cpu, ri, pm, pm->pm_sc.pm_reloadcount); return (0); } diff --git a/sys/dev/hwpmc/hwpmc_e500.c b/sys/dev/hwpmc/hwpmc_e500.c index b82bada95fe3..020337830eb5 100644 --- a/sys/dev/hwpmc/hwpmc_e500.c +++ b/sys/dev/hwpmc/hwpmc_e500.c @@ -341,7 +341,7 @@ e500_pcpu_init(struct pmc_mdep *md, int cpu) for (i = 0; i < E500_MAX_PMCS; i++) /* Initialize the PMC to stopped */ - powerpc_stop_pmc(cpu, i); + e500_set_pmc(cpu, i, PMCN_NONE); /* Unfreeze global register. */ mtpmr(PMR_PMGC0, PMGC_PMIE | PMGC_FCECE); diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index fd90e62e3f2c..0c39271cf991 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -1488,7 +1488,7 @@ pmc_process_csw_in(struct thread *td) PMCDBG3(CSW,SWI,1,"cpu=%d ri=%d new=%jd", cpu, ri, newvalue); - pcd->pcd_write_pmc(cpu, adjri, newvalue); + pcd->pcd_write_pmc(cpu, adjri, pm, newvalue); /* If a sampling mode PMC, reset stalled state. */ if (PMC_TO_MODE(pm) == PMC_MODE_TS) @@ -1498,7 +1498,7 @@ pmc_process_csw_in(struct thread *td) pm->pm_pcpu_state[cpu].pps_cpustate = 1; /* Start the PMC. */ - pcd->pcd_start_pmc(cpu, adjri); + pcd->pcd_start_pmc(cpu, adjri, pm); } /* @@ -1601,7 +1601,7 @@ pmc_process_csw_out(struct thread *td) */ pm->pm_pcpu_state[cpu].pps_cpustate = 0; if (pm->pm_pcpu_state[cpu].pps_stalled == 0) - pcd->pcd_stop_pmc(cpu, adjri); + pcd->pcd_stop_pmc(cpu, adjri, pm); KASSERT(counter_u64_fetch(pm->pm_runcount) > 0, ("[pmc,%d] pm=%p runcount %ld", __LINE__, (void *) pm, @@ -1625,7 +1625,7 @@ pmc_process_csw_out(struct thread *td) ("[pmc,%d] pp refcnt = %d", __LINE__, pp->pp_refcnt)); - pcd->pcd_read_pmc(cpu, adjri, &newvalue); + pcd->pcd_read_pmc(cpu, adjri, pm, &newvalue); if (mode == PMC_MODE_TS) { PMCDBG3(CSW,SWO,1,"cpu=%d ri=%d val=%jd (samp)", @@ -2824,7 +2824,7 @@ pmc_release_pmc_descriptor(struct pmc *pm) PMCDBG2(PMC,REL,2, "stopping cpu=%d ri=%d", cpu, ri); critical_enter(); - pcd->pcd_stop_pmc(cpu, adjri); + pcd->pcd_stop_pmc(cpu, adjri, pm); critical_exit(); } @@ -3246,7 +3246,7 @@ pmc_start(struct pmc *pm) pm->pm_state = PMC_STATE_RUNNING; critical_enter(); - if ((error = pcd->pcd_write_pmc(cpu, adjri, + if ((error = pcd->pcd_write_pmc(cpu, adjri, pm, PMC_IS_SAMPLING_MODE(mode) ? pm->pm_sc.pm_reloadcount : pm->pm_sc.pm_initial)) == 0) { @@ -3256,7 +3256,7 @@ pmc_start(struct pmc *pm) /* Indicate that we desire this to run. Start it. */ pm->pm_pcpu_state[cpu].pps_cpustate = 1; - error = pcd->pcd_start_pmc(cpu, adjri); + error = pcd->pcd_start_pmc(cpu, adjri, pm); } critical_exit(); @@ -3321,8 +3321,9 @@ pmc_stop(struct pmc *pm) pm->pm_pcpu_state[cpu].pps_cpustate = 0; critical_enter(); - if ((error = pcd->pcd_stop_pmc(cpu, adjri)) == 0) - error = pcd->pcd_read_pmc(cpu, adjri, &pm->pm_sc.pm_initial); + if ((error = pcd->pcd_stop_pmc(cpu, adjri, pm)) == 0) + error = pcd->pcd_read_pmc(cpu, adjri, pm, + &pm->pm_sc.pm_initial); critical_exit(); pmc_restore_cpu_binding(&pb); @@ -4400,7 +4401,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args) if ((pm->pm_flags & PMC_F_ATTACHED_TO_OWNER) && (pm->pm_state == PMC_STATE_RUNNING)) error = (*pcd->pcd_read_pmc)(cpu, adjri, - &oldvalue); + pm, &oldvalue); else oldvalue = pm->pm_gv.pm_savedvalue; } @@ -4425,13 +4426,14 @@ pmc_syscall_handler(struct thread *td, void *syscall_args) critical_enter(); /* save old value */ - if (prw.pm_flags & PMC_F_OLDVALUE) + if (prw.pm_flags & PMC_F_OLDVALUE) { if ((error = (*pcd->pcd_read_pmc)(cpu, adjri, - &oldvalue))) + pm, &oldvalue))) goto error; + } /* write out new value */ if (prw.pm_flags & PMC_F_NEWVALUE) - error = (*pcd->pcd_write_pmc)(cpu, adjri, + error = (*pcd->pcd_write_pmc)(cpu, adjri, pm, prw.pm_value); error: critical_exit(); @@ -5028,7 +5030,7 @@ pmc_process_samples(int cpu, ring_type_t ring) continue; pm->pm_pcpu_state[cpu].pps_stalled = 0; - (*pcd->pcd_start_pmc)(cpu, adjri); + (*pcd->pcd_start_pmc)(cpu, adjri, pm); } } @@ -5162,11 +5164,11 @@ pmc_process_exit(void *arg __unused, struct proc *p) if (pm->pm_pcpu_state[cpu].pps_cpustate) { pm->pm_pcpu_state[cpu].pps_cpustate = 0; if (!pm->pm_pcpu_state[cpu].pps_stalled) { - (void) pcd->pcd_stop_pmc(cpu, adjri); + (void) pcd->pcd_stop_pmc(cpu, adjri, pm); if (PMC_TO_MODE(pm) == PMC_MODE_TC) { pcd->pcd_read_pmc(cpu, adjri, - &newvalue); + pm, &newvalue); tmp = newvalue - PMC_PCPU_SAVED(cpu,ri); diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c index e2ce979d0ba8..7c9a9395ab46 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.c +++ b/sys/dev/hwpmc/hwpmc_powerpc.c @@ -248,19 +248,17 @@ powerpc_release_pmc(int cpu, int ri, struct pmc *pmc) } int -powerpc_start_pmc(int cpu, int ri) +powerpc_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; PMCDBG2(MDP,STA,1,"powerpc-start cpu=%d ri=%d", cpu, ri); - pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; powerpc_set_pmc(cpu, ri, pm->pm_md.pm_powerpc.pm_powerpc_evsel); return (0); } int -powerpc_stop_pmc(int cpu, int ri) +powerpc_stop_pmc(int cpu, int ri, struct pmc *pm __unused) { PMCDBG2(MDP,STO,1, "powerpc-stop cpu=%d ri=%d", cpu, ri); powerpc_set_pmc(cpu, ri, PMCN_NONE); @@ -363,9 +361,8 @@ powerpc_pmcn_write_default(unsigned int pmc, uint32_t val) } int -powerpc_read_pmc(int cpu, int ri, pmc_value_t *v) +powerpc_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { - struct pmc *pm; pmc_value_t p, r, tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -373,11 +370,6 @@ powerpc_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < ppc_max_pmcs, ("[powerpc,%d] illegal row index %d", __LINE__, ri)); - pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; - KASSERT(pm, - ("[core,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, - ri)); - /* * After an interrupt occurs because of a PMC overflow, the PMC value * is not always MAX_PMC_VALUE + 1, but may be a little above it. @@ -416,9 +408,8 @@ powerpc_read_pmc(int cpu, int ri, pmc_value_t *v) } int -powerpc_write_pmc(int cpu, int ri, pmc_value_t v) +powerpc_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; pmc_value_t vlo; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -426,8 +417,6 @@ powerpc_write_pmc(int cpu, int ri, pmc_value_t v) KASSERT(ri >= 0 && ri < ppc_max_pmcs, ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); - pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; - if (PMC_IS_COUNTING_MODE(PMC_TO_MODE(pm))) { PPC_OVERFLOWCNT(pm) = v / (POWERPC_MAX_PMC_VALUE + 1); vlo = v % (POWERPC_MAX_PMC_VALUE + 1); @@ -482,7 +471,7 @@ powerpc_pmc_intr(struct trapframe *tf) if ((pm = pc->pc_ppcpmcs[i].phw_pmc) != NULL && PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { if (pm->pm_state != PMC_STATE_RUNNING) { - powerpc_write_pmc(cpu, i, + powerpc_write_pmc(cpu, i, pm, pm->pm_sc.pm_reloadcount); continue; } @@ -504,11 +493,11 @@ powerpc_pmc_intr(struct trapframe *tf) PMCDBG3(MDP,INT,3, "cpu=%d ri=%d: error %d processing interrupt", cpu, i, error); - powerpc_stop_pmc(cpu, i); + powerpc_stop_pmc(cpu, i, pm); } /* Reload sampling count */ - powerpc_write_pmc(cpu, i, pm->pm_sc.pm_reloadcount); + powerpc_write_pmc(cpu, i, pm, pm->pm_sc.pm_reloadcount); } if (retval) diff --git a/sys/dev/hwpmc/hwpmc_powerpc.h b/sys/dev/hwpmc/hwpmc_powerpc.h index 25b041327b84..efd7aca1b9ef 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.h +++ b/sys/dev/hwpmc/hwpmc_powerpc.h @@ -101,13 +101,13 @@ int powerpc_pcpu_fini(struct pmc_mdep *md, int cpu); int powerpc_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a); int powerpc_release_pmc(int cpu, int ri, struct pmc *pmc); -int powerpc_start_pmc(int cpu, int ri); -int powerpc_stop_pmc(int cpu, int ri); +int powerpc_start_pmc(int cpu, int ri, struct pmc *pm); +int powerpc_stop_pmc(int cpu, int ri, struct pmc *pm); *** 389 LINES SKIPPED *** From nobody Sat May 6 17:56:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFcT2j9xz49tHY; Sat, 6 May 2023 17:56:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFcS6nWnz3Mjl; Sat, 6 May 2023 17:56:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 346Huepf092455 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 6 May 2023 20:56:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 346Huepf092455 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 346HueJv092454; Sat, 6 May 2023 20:56:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 6 May 2023 20:56:40 +0300 From: Konstantin Belousov To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5807f35c541c - main - dd: Fix SIGINT handling. Message-ID: References: <202305051245.345CjNLE048275@gitrepo.freebsd.org> <86a5yhy5oe.fsf@ltc.des.no> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86a5yhy5oe.fsf@ltc.des.no> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4QDFcS6nWnz3Mjl X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, May 06, 2023 at 03:01:53PM +0200, Dag-Erling Smørgrav wrote: > Konstantin Belousov writes: > > This does not fix SIGINT handler, it only (significantly) reduces the window > > where the issue could occur. > > Yes, it does. I think you fundamentally misunderstand the intent of the > patch. I know there is a tiny race but it's still a vast improvement on > the original. > > > See my latest comment on the review. > > See my reply. I do not see a reply to my last comment in the review. From nobody Sat May 6 19:11:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDHH24n6Pz490P4; Sat, 6 May 2023 19:11: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 4QDHH24LVWz3khg; Sat, 6 May 2023 19:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683400318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n2lsTTo7hG9z0UWpt7ALreJgDojxmYhJIrAwIZRN2c=; b=OwNxVncZzLi1je4BtHDP1C45efyupez4cnsCqs8jZsD6GXsR0b9CtJgauKdjfJtiq+2zch mWRuIOUkwrNNNgV6RGefuO49E7XQuF86EDVXgjL/VRx6wOHDuVCvW4PKNaqUaxizBJpbqE 684qgV4UOy9ZzXi2zKovddjXvp83R6O993WRrttnT8+Ll5Rv0IHGWyz+RHgxHh3A6aGx5Q wiPFymoW8K2H6ipn0Mki0rC0nJU8jcTDdONorJuBKpUpcO1bt1zg9fJok/jNcv8Dnqdqil KEICpcISjeQ2CP+rb8HXRtqbZF5LaPpNiriAYo0JV8gTz3+KaECnGMCK8SS8yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683400318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n2lsTTo7hG9z0UWpt7ALreJgDojxmYhJIrAwIZRN2c=; b=CSiZLcgQ6ABe6DJF4q04tnRlMucJnp0alw9hgxPrDFxPK+JZazT3zdbwM3tntbUFR4dSie gayuOhifKKqViVLMnfRXc83h2/76AFe6D6toqQmXrQ0ikGPvFVZG1Gbverj+zB9qwF6cGT ntnMi40pLATVFB84TkAIUQMOIAuAxjY8EmphQKNy6niOA+IZXES1v3Dxp3DWQ1TSnyb2Kc TqJnhGnP9ujlzOXHnRlts9NyIfztMM8X+V+5i2n5MAOTUQxEle678oJn6IaPm4x3FR1nQs vOr3c+TT1UOFJrw4/Ji2KefbCf4Yxj6d4jk/VYOfrJ87bM/Nb2GthfgHfD8UNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683400318; a=rsa-sha256; cv=none; b=m8E9e2mV2YNWbDMehD9m41p74RzeDwyxiLJ5omBBQMJd+K2ZCAaxaWaAUEG55RM61Q3Udr v2lA7eZXXNOFsYWEvJi/Ikrzq4qAp/iPGlBrnYgirN7LXXoRhKFsg10YWYU9dVjmk2CGUL PP3mmHr6vBbxlWKauB3jILCAVv/qYaGD/DdklrlD8koVS0MfdhOQjH8R0mZ8W7iBhTRABF 4XNfyXEJI58/wDXLEZeIhPidC0KwLdptM1mbLq9F+QyS0wSHiMguX2KEL3mdAFaMfqqoie 33NYeyPcqIrI6tbxaTstK/CjbNOLpBQnxDso+emKf0Lx3AipdLdjNDd8Q2NeLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDHH23P1pzpM6; Sat, 6 May 2023 19:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346JBw3T064881; Sat, 6 May 2023 19:11:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346JBw5L064880; Sat, 6 May 2023 19:11:58 GMT (envelope-from git) Date: Sat, 6 May 2023 19:11:58 GMT Message-Id: <202305061911.346JBw5L064880@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 572b77f8da5e - main - mountd: Improve error message for exports lines List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 572b77f8da5e93ad8f42dbce90b5bfc18d507169 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=572b77f8da5e93ad8f42dbce90b5bfc18d507169 commit 572b77f8da5e93ad8f42dbce90b5bfc18d507169 Author: Alexander Motin AuthorDate: 2023-05-06 18:57:14 +0000 Commit: Alexander Motin CommitDate: 2023-05-06 19:02:08 +0000 mountd: Improve error message for exports lines Currently mountd print error message "symbolic link in export path or statfs failed" in case some path component in an exports line fails validation. This revision improves the error message by giving more information about the precise error as well as the path component that caused the issue. Submitted by: Andrew Walker Reviewed by: mav, rmacklem Differential Revision: https://reviews.freebsd.org/D39840 --- usr.sbin/mountd/mountd.c | 87 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 15 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index d985dd00acf8..f64505f8602f 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -210,7 +210,9 @@ static void add_dlist(struct dirlist **, struct dirlist *, struct grouplist *, int, struct exportlist *, struct expcred *, uint64_t); static void add_mlist(char *, char *); -static int check_dirpath(char *); +static int check_path_component(const char *, char **); +static int check_dirpath(char *, char **); +static int check_statfs(const char *, struct statfs *, char **); static int check_options(struct dirlist *); static int checkmask(struct sockaddr *sa); static int chk_host(struct dirlist *, struct sockaddr *, int *, int *, @@ -1557,6 +1559,7 @@ get_exportlist_one(int passno) struct statfs fsb; struct expcred anon; char *cp, *endcp, *dirp, *hst, *usr, *dom, savedc; + char *err_msg = NULL; int len, has_host, got_nondir, dirplen, netgrp; uint64_t exflags; @@ -1635,8 +1638,8 @@ get_exportlist_one(int passno) goto nextline; } } - if (check_dirpath(cp) && - statfs(cp, &fsb) >= 0) { + if (check_dirpath(cp, &err_msg) && + check_statfs(cp, &fsb, &err_msg)) { if ((fsb.f_flags & MNT_AUTOMOUNTED) != 0) syslog(LOG_ERR, "Warning: exporting of " "automounted fs %s not supported", cp); @@ -1701,8 +1704,15 @@ get_exportlist_one(int passno) dirplen = len; } } else { - getexp_err(ep, tgrp, - "symbolic link in export path or statfs failed"); + if (err_msg != NULL) { + getexp_err(ep, tgrp, err_msg); + free(err_msg); + err_msg = NULL; + } else { + getexp_err(ep, tgrp, + "symbolic link in export path or " + "statfs failed"); + } goto nextline; } *endcp = savedc; @@ -3786,29 +3796,76 @@ check_options(struct dirlist *dp) return (0); } +static int +check_path_component(const char *path, char **err) +{ + struct stat sb; + + if (lstat(path, &sb)) { + asprintf(err, "%s: lstat() failed: %s.\n", + path, strerror(errno)); + return (0); + } + + switch (sb.st_mode & S_IFMT) { + case S_IFDIR: + return (1); + case S_IFLNK: + asprintf(err, "%s: path is a symbolic link.\n", path); + break; + case S_IFREG: + asprintf(err, "%s: path is a file rather than a directory.\n", + path); + break; + default: + asprintf(err, "%s: path is not a directory.\n", path); + } + + return (0); +} + /* - * Check an absolute directory path for any symbolic links. Return true + * Check each path component for the presence of symbolic links. Return true */ static int -check_dirpath(char *dirp) +check_dirpath(char *dirp, char **err) { char *cp; - int ret = 1; - struct stat sb; cp = dirp + 1; - while (*cp && ret) { + while (*cp) { if (*cp == '/') { *cp = '\0'; - if (lstat(dirp, &sb) < 0 || !S_ISDIR(sb.st_mode)) - ret = 0; + + if (!check_path_component(dirp, err)) { + *cp = '/'; + return (0); + } + *cp = '/'; } cp++; } - if (lstat(dirp, &sb) < 0 || !S_ISDIR(sb.st_mode)) - ret = 0; - return (ret); + + if (!check_path_component(dirp, err)) + return (0); + + return (1); +} + +/* + * Populate statfs information. Return true on success. + */ +static int +check_statfs(const char *dirp, struct statfs *fsb, char **err) +{ + if (statfs(dirp, fsb)) { + asprintf(err, "%s: statfs() failed: %s\n", dirp, + strerror(errno)); + return (0); + } + + return (1); } /*