From nobody Sat Sep 23 22:58:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtPgv58hNz4vNLS; Sat, 23 Sep 2023 22:58: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 4RtPgv4d9Gz3g0x; Sat, 23 Sep 2023 22:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695509915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qGwFD8TShnH750iSp134PTV5QYT6tbLDW2BE2GCT91Y=; b=yCL+H86EVVtwBagCOcp/L3FKJ1ViZZFewihVKl8SRaJ2SZcYNdN+kgbWa++s8mRpCcyw3X E/4ov1A28kB903+p96wzt8oOPNRF9eUWDF+idyFr98RrFanrHk+/ZUfql36JOzh/tt2s8W Edq9CixQ4/ci0UtCai8hNY3CCnhIRNr4OB2f+PFI1YdDGv1DIjP9Or7fHBZ7jpVY3Fth/y zkVyq+qIWERYwClnwx6SrEcwTChrN1M8m7Rkc8Tlbh/SEj7WCJVIwr5kNpq6LPZ64oUogd 2NLCM5UWycsqrGUk7Ux0H9ua+dCA1ExN921Vz8etRSB0jH7mNy7WLz0B3yGsIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695509915; a=rsa-sha256; cv=none; b=k2zIJFGYYE8JX07OoRRGELbX0PMeUTt4POSkps69DA8ZNoiJyXIud3y5Xzkc/Ib25FyxaZ bTOyEFNOTQNTLwqiFlHyqMnxxf3M27uGu8xJjWZm1tPsQEh5yihFEZZGSJ/rFq0+N8boDl 2kwuIann1rzBjcpZikj130w7txXm5ZUCS/G1ZEKMlPlnSDl7jafLXJzX2EkGuae6ZOl/nU v72qBV22ugrsqGP7jIz/JjEDbcX4QAS9I9Y9L3cpfym/qblcXv+jmag87nTZc/RS5KZ4Vi RmOUZPM0mpOxhwQOZpUSIu7nhdUO0FrJ2B0jQhggRRxNARTq0hg1JaDdWZVBsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695509915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qGwFD8TShnH750iSp134PTV5QYT6tbLDW2BE2GCT91Y=; b=fW4drysWEJSMp9CyZjOYEd+neU+c4KsXUlCH60kvCMAA/ht8ulZcqEEead+mnJjWbJ24AZ KZ8oxRBp9+cBy0e/w1N2gQXjw9ww6hGEdhoGkZET9XeLhcZSxOHhqN28oGNlCfeS6VysTV gnhOdHC5GrSlfyIypSis2aZeUUYxBmM1w+P1c5+IpfbmagPoQSf69G6LNp1wKnzT64o22l LxwwxE4UGaoTyj4zrHrZv0Waxejh3yeOL8ZzUdGYbnlw45OSpW9tHq+rkUUgZTllqVbgKm ywRALu7WWmWa1R464M8tHpZuXh2TDSomiM92heH4ic2KMAcNIct8vM5QfankAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtPgv3ZQmz7ZY; Sat, 23 Sep 2023 22:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38NMwZS2052629; Sat, 23 Sep 2023 22:58:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38NMwZlh052626; Sat, 23 Sep 2023 22:58:35 GMT (envelope-from git) Date: Sat, 23 Sep 2023 22:58:35 GMT Message-Id: <202309232258.38NMwZlh052626@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: f174619c38c3 - main - Guard CROSS_TARGET_FLAGS from buildworld List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f174619c38c309e172344f5d21b324d47819f5fd Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f174619c38c309e172344f5d21b324d47819f5fd commit f174619c38c309e172344f5d21b324d47819f5fd Author: Simon J. Gerraty AuthorDate: 2023-09-23 22:58:13 +0000 Commit: Simon J. Gerraty CommitDate: 2023-09-23 22:58:13 +0000 Guard CROSS_TARGET_FLAGS from buildworld Until a better arrangment is worked out, guard the setting of CROSS_TARGET_FLAGS in local.sys.mk with check for DIRDEPS_BUILD. Using a separate flag for CROSS_TARGET that can be reset by bsd.compat.mk is probably the right thing. --- share/mk/local.sys.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index eb21380f051c..d5d3ff75a3c4 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -95,11 +95,13 @@ META_COOKIE_RM?= META_COOKIE_TOUCH?= META_DEPS+= ${META_NOPHONY} +.if ${MK_DIRDEPS_BUILD} == "yes" .if ${MACHINE:Nhost*:Ncommon} != "" && ${MACHINE} != ${HOST_MACHINE} # cross-building CROSS_TARGET_FLAGS?= -target ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION} CFLAGS+= ${CROSS_TARGET_FLAGS} ACFLAGS+= ${CROSS_TARGET_FLAGS} .endif +.endif .endif From nobody Sun Sep 24 03:04:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtW7C0PP7z4vg0Y; Sun, 24 Sep 2023 03:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtW7B6vnTz4cpc; Sun, 24 Sep 2023 03:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695524647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vxVMNlXswh/slzBzvG1EfJAovVXuqCXXoAl9l6+dKZ8=; b=lIbDXC4nWBhFcWUF2c69/d5b6jmTca8WdMGfDSuU6pkRiiGb+yoiIQmdvUiaSbKsGmxaV5 kyiCml7g6rAWC8XVTtb3p18dMFKc/U3e8zrsdlZQtICS/qXwSvxmE5+Y5uPqpPI2VYpeRi hgqnRp2WA8t2AdHfkSDWquz9HUzmupookAKkvocdbS9D3kGmTImin8uHf9A3RcZGChk++9 zNps9gaKjhTjuxQNz3wDwXSlwpr9P3z7AovXb9JoGBOmW7kMuLdH0bNTwzd99EkYOxpime n+0uIJwmOCcWlT4m+YHkOBiGFR22rDDtZkWDm6cjUe/Yvx246ryZ2Mdybg2JgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695524647; a=rsa-sha256; cv=none; b=QZGBcxEgD+axyL3RcsuIYoswelBVm+/3Io4DdsLPrTsrSWb06XSsW4CBwHuVjIOC/NiRfj fCjDtci7MD+Idj4w8TvGPohJvcPNkJZjr9+pGTB3791nF3wEcQHH3usq/g3zZFONbRlkon 4OGKczOVAcCnFs55nGHRFCtb18iMrQvYJHSbXx+L/Vb/DEzUBIsof3WRRjS7ToS/BwMh47 FsIOdYepaEh+X7qCvcUYdfzHPATaOY6U/qYcKzBHA2BgSNwnPmAEOfkBI12tlMbGI9qIfM IoXWMbocJlaNAKUO4/EWFeIddH89PEohbHau/YTEmwGwdhRGxz2R6Zv4Y/SzJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695524647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vxVMNlXswh/slzBzvG1EfJAovVXuqCXXoAl9l6+dKZ8=; b=mdQXOdJzCrf/qRGyeOEswWId0DPppvYoTEJRfsSuK9MrLoBIaXmiOSKXspDhxlftwgF6nU tpOPZhXxEoxihfNr28mY/aXxW2cWNkyTvukysSUm0uepFgz3O4CgVj5SPalqguuM9zXa7V NdaX3XvEU35J9SSk7IkHvop/yRhaWnTZDt38yjjEBopxWMnMHEt5pG0oIRomB5aoi2E+w5 r8Wq5PK1XEPAWco3byz6WmGtc1uFZ31juIqowI6wlKoQ+nsz4XzD9cdYdtDekCuGQkNCdV Jv0upffJpZIB/K5rxus1qnw8SV29IV1Mg2KDxsUIe48UB1sw6hVFz9Nb8vHwuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtW7B5yv3zVbF; Sun, 24 Sep 2023 03:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38O346dM067566; Sun, 24 Sep 2023 03:04:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38O3463q067563; Sun, 24 Sep 2023 03:04:06 GMT (envelope-from git) Date: Sun, 24 Sep 2023 03:04:06 GMT Message-Id: <202309240304.38O3463q067563@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: 855e0457396c - main - ports(7): Update the default setting of MASTER_SITE_INDEX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 855e0457396c7addb1df6fc1d14200cc8de286c0 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=855e0457396c7addb1df6fc1d14200cc8de286c0 commit 855e0457396c7addb1df6fc1d14200cc8de286c0 Author: Li-Wen Hsu AuthorDate: 2023-09-24 02:58:33 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-24 02:59:34 +0000 ports(7): Update the default setting of MASTER_SITE_INDEX MFC after: 3 days --- share/man/man7/ports.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 7dc729bd112a..911135a8b631 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 1, 2023 +.Dd September 24, 2023 .Dt PORTS 7 .Os .Sh NAME @@ -504,7 +504,7 @@ cluster (for .Cm fetchindex target). Defaults to -.Pa https://www.FreeBSD.org/ports/ . +.Pa https://download.FreeBSD.org/ports/index/ . .It Va FETCHINDEX Command to get .Pa INDEX From nobody Sun Sep 24 03:18:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtWS22Cp4z4vh6k; Sun, 24 Sep 2023 03:18: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 4RtWS21jrrz4fDQ; Sun, 24 Sep 2023 03:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695525522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeKR9A0FhmYI2HuuQAlgAWoA99DHSUquFIScMQLHs6I=; b=isJ2kZGNwLDsELc5qg7hUwWR32DuxcHJ9DJ7iKsIX/0HiM66rnPRjcCRyKnvb2XbsyUYPx 1lk0QzUuo4AXyh08jT6Y7212dNAv1SxlV9DNxBtptpvnLLCHPT80qrp5zRSlMEhh/GAivZ gMdfe7jG2E1EHj/zRJcZsYbz5OqFMFN3Lbo+CwkrsWjjQEDnPc5r09qJ/3WJY3Y5M/N2sl hnpJFHtywxzmaaKcON8dS1vKKhEKNxtj+3qQ/oZHhGXxxEErb4kezZ4qdUEUwyYOIBqUxz SYU/elBpAbhplrkvuoZmZtpfJKaNxTvnpH0SK3D+aIkC2sXrjCOQpkXPOiNuMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695525522; a=rsa-sha256; cv=none; b=djEgVeVKJbseYAWwuggZ8r5RS0YZlXO7dwFclsDqe7eFppbGEgz+xAmjLAr55S5VZXbUy7 QGMYI+oT/DbeGJ4nA9MFcCRddGcHJWKqXsHsXiKsaUfcDJjGpqU8pX1jRGKVuAkSExhprG 1nC9g0LtVW+tZletGvWzgUXUns1L2weMNM5PiOxZDPZi0bhH3Nst7O/5Qewu1ElFvzJQB6 SbXBz5dK0QwyR76oyThWgbUDrY6CTejJW/oaXIm5oSeIUVAi/t5GjsvuYgtk6/fz3F+hFj NXZLw+D3JaN4q0xBhgU23L/Rcqm6BmxCkXit/LdyNY4F1GA5feprT4TnnNsRyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695525522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeKR9A0FhmYI2HuuQAlgAWoA99DHSUquFIScMQLHs6I=; b=bhMUPi9GPP3VKcwX3PhuKB6V1Vof2Ruq9zrLVAUQZD9Gs93rPkIlT8Sl1GPiI+kyiM4l9N T1nJ+RVnmYwPPTp8vl+pk2trVeevg+ZIwBU9qS48LcU6XARuemvErAFfaFISknMzRTqYQx TtLVU15mlLWFYcg+TtVxikH6IJhMu4glrOholFbWCDz2jicy3M97UeLDDi5v9zIogN/18c X5ZF2ALx3TILWcIbnso8vFO3hRV10eNS/ugSagFJiTJl/5b6Mr4ruW936J28kwbA5w7EMf hishWMlBME588u2qBEfIkRTSLqcMiBtFSPFSc7OGrkn4nCSNl+KS5g+50DYraA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtWS20mSyzWdS; Sun, 24 Sep 2023 03:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38O3IgIK084762; Sun, 24 Sep 2023 03:18:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38O3IgY8084759; Sun, 24 Sep 2023 03:18:42 GMT (envelope-from git) Date: Sun, 24 Sep 2023 03:18:42 GMT Message-Id: <202309240318.38O3IgY8084759@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: 2373e704aa1a - main - Untie strchrnul() from gdb. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2373e704aa1a5dcb7609badfdb0be4ceb4966d74 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=2373e704aa1a5dcb7609badfdb0be4ceb4966d74 commit 2373e704aa1a5dcb7609badfdb0be4ceb4966d74 Author: Alexander Motin AuthorDate: 2023-09-24 03:17:29 +0000 Commit: Alexander Motin CommitDate: 2023-09-24 03:18:20 +0000 Untie strchrnul() from gdb. MFC after: 10 days --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 2d429c11f523..4e72eac77e68 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4037,7 +4037,7 @@ libkern/strcasecmp.c standard libkern/strcasestr.c standard libkern/strcat.c standard libkern/strchr.c standard -libkern/strchrnul.c optional gdb +libkern/strchrnul.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard From nobody Sun Sep 24 08:29:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtfL54cTcz4tc8G; Sun, 24 Sep 2023 08:29: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 4RtfL544W7z3Z89; Sun, 24 Sep 2023 08:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695544141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YN4Wev5cUFyZObmua8gfXXO14Scie7QGl35UKAsZVmY=; b=mBUKbPKMdhLk7P7CCrYqPvw9pb7Hiyr/Qig+DBtJSuXvdazt9CgMNIEM4ncc9YJaYh9mAz EllWPJoq/frpScPM7k78noXu1knW/zrj2zatRfAN5ZVM7D9btJBlJvikO7vW4eY9S6iNW7 xz8QTjg6hBk0JPtGeDxYuxbN47s41RHJM66mgKtO7yraLkT9JbL4+F+HchrQ+9hVwPHqpx pRCgw3TCsyw3GjN5hrOUVO9YKx8KgfS5mFv0kHyFqq7iVerc3R30qEhJVN/MbjUfQl8Z1L ElJ/tybH2OreA3vpK9cOP+y7Q9R0KxBpgnzO0qbRdwAA63Ldl/lu2KObM+Zd5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695544141; a=rsa-sha256; cv=none; b=pgPMcokftuq6UpcmYkT7hYzSMMe+x5raeSHV/Ajtxrtl5D2jBCC2kX1cmoO8rK3ijh33PD fvBEEiub59gCocvCrAzyr05t+MwJzy01ByCKrthY8vjETADK3wX8diD4s1Sz0m7sOecS1g SBCLQ3zIIi0CUKXhSLsg3iS+Cti/5RpQ5paJx5K2eLIJWYZx8nOoUuc6tISrsScAu/wQsF DBuo+tqSN7mIj1hDvWeEtv1rVIPoSz0iGMo6POHf6TsbzPECLxAAEnzmbNDbOiwQzRjqIT 5hZX8GTf62XvGcmiLQOmKxovk2vcZGyq0XfVcL0P7jyuzUJuNzU9+HojzxkwqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695544141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YN4Wev5cUFyZObmua8gfXXO14Scie7QGl35UKAsZVmY=; b=e+TPS9mHNIrmMNOyeDZs9glgjPGHgtsURyVcAeGfhprM5BNe7wZYJAy4kXCfcqde6g5iIo nxA58/WYjj9lkQ8wWHV1EP0Z+qOgNBdDVfP1VstiwgK5yQuyo8IRVIdKoqx+YTJyLziGD3 djs7eaH5YzX1MQeSXQg9YyDhVqyqLekJ3WG5gZXXjHw5nVfqCcLtuqdNGrYqOR4tTihmt0 mVQzZ2grMfLc/H1WvZPK+k+S/1PNmcdfTCXiWwaeKri+YIlOHTO29rz6wmhjGaavLVH6lj blz6lWl34J6f4qW62FINS/IXmTZAFSrVCtvL2qc2HSb9lclNd5spYwRuFtYtxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtfL537xvzftl; Sun, 24 Sep 2023 08:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38O8T19v097620; Sun, 24 Sep 2023 08:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38O8T1uc097617; Sun, 24 Sep 2023 08:29:01 GMT (envelope-from git) Date: Sun, 24 Sep 2023 08:29:01 GMT Message-Id: <202309240829.38O8T1uc097617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: bb438c08b86a - stable/14 - zfs: update share/zfs/compatibility.d to match current ZFS code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bb438c08b86a32f13da16b2e7801f2cbd45bc5c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=bb438c08b86a32f13da16b2e7801f2cbd45bc5c1 commit bb438c08b86a32f13da16b2e7801f2cbd45bc5c1 Author: Martin Matuska AuthorDate: 2023-09-21 23:34:47 +0000 Commit: Martin Matuska CommitDate: 2023-09-24 08:27:38 +0000 zfs: update share/zfs/compatibility.d to match current ZFS code MFC after: 3 days (cherry picked from commit 7a0e9e3f8f3a9379df793284f719f1a7ee5734c2) --- cddl/share/zfs/compatibility.d/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile index e60bd172dcce..13d88fef184d 100644 --- a/cddl/share/zfs/compatibility.d/Makefile +++ b/cddl/share/zfs/compatibility.d/Makefile @@ -22,6 +22,7 @@ FILES= \ openzfs-2.0-linux \ openzfs-2.1-freebsd \ openzfs-2.1-linux \ + openzfs-2.2 \ zol-0.6.1 \ zol-0.6.4 \ zol-0.6.5 \ @@ -42,12 +43,17 @@ LINKS= \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.0 \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.1 \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.2 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.3 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.4 \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freenas-11.3 \ ${FILESDIR}/freenas-11.0 ${FILESDIR}/freenas-11.1 \ ${FILESDIR}/openzfsonosx-1.9.3 ${FILESDIR}/openzfsonosx-1.9.4 \ ${FILESDIR}/openzfs-2.0-freebsd ${FILESDIR}/truenas-12.0 \ ${FILESDIR}/zol-0.7 ${FILESDIR}/ubuntu-18.04 \ - ${FILESDIR}/zol-0.8 ${FILESDIR}/ubuntu-20.04 + ${FILESDIR}/zol-0.8 ${FILESDIR}/ubuntu-20.04 \ + ${FILESDIR}/openzfs-2.1-linux ${FILESDIR}/ubuntu-22.04 \ + ${FILESDIR}/openzfs-2.2 ${FILESDIR}/openzfs-2.2-linux \ + ${FILESDIR}/openzfs-2.2 ${FILESDIR}/openzfs-2.2-freebsd LINKMODE= ${NOBINMODE} From nobody Sun Sep 24 08:53:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtfsx2Ld6z4tdtB for ; Sun, 24 Sep 2023 08:53: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 4Rtfsx1q5Lz3dRG; Sun, 24 Sep 2023 08:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695545589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=En9VO1gdpO/aY5snCQhfA/nfBXBl7HbE1BYTx6CKxb8=; b=Y7ywVkbNrxAxNHsPfcsXUacper5FRFN31kiBF5AK+8/N9Oxejh0XQq6zEBCubvvr3jGof1 8GY/DXvVC+nKRC01LP0ZltK4AwPrcP7AwZ0AsSIa2QtjcvAGSnJy9Z9HUxXw4WFrW33Pdp 1GoKnruKhGzoAK45LOgcg9Jt/9BZwijWQMs8jEJ0RgmeGE1zZbVjW6o03iSEA4IEcXoWBM 2LaDS3D/HION8bDK/yZ3UsBl1tFB445g0K+cna/t2L2YR5Md83oHudYIIigltNMTlIyOGk wXeNiS/8vBuKBGrkL3FXpa+Mq85xKvO6h0kUparFTPwT6L7fpOZJ8Y2UbpLbog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695545589; a=rsa-sha256; cv=none; b=CFA8Z94vTv6CLANjnu44d9f1JXrqxJmYL7TRfvxHY9omvXy0luW7lI6GbozRlFApp8mgng kJJnq3W93+Eft3ZVp0iNPl9n/g+/Zhq+pVkcrEoUxiXy9nmxc/w4LZumuh7Ta5vjLo5h8c ym7d8mnn5h5ZqnM5EmxwaIm7Uw7bStndGOiCKPe3uSevkqQP7u6PZ8NIXjC6C8Mx4JpTPe eLQfLAdpmcO+e9/sEy5duyfaiIrzH1rU1g4gTHEIZ7HJTH9JKv/4nzlvE6/t+G6OK5b1pz HXgEhqgCqDt+qiAfX4QAZ6QoVKSK/oIeNspuypkiVCp0nMxGBophEW8JX7FESA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695545589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=En9VO1gdpO/aY5snCQhfA/nfBXBl7HbE1BYTx6CKxb8=; b=u/Z0y0x16qPV9i5PjJR6gfxGw3E2iDsiLccaMOAqgo8gSip6Y7x9udK0/qbKNcgA0m9UpU /ZnI9zyqcOBFu4izk//fvBxMmoudfG8zOAgnxJpHUd8y3d44iLv16T5kzg4aWlwcnMVFo0 kTizEEXsCNlIqi6bQmiKtCYKCkkwt1dvwrb3vmeDVlaMM9fkyzvEUCqe200Xx+fZwBSKim wS/YHEX5W3cAqp5rPjDE8GH8GcAreHk8XjrVmzRIYXPapeYUyu0f3LXS6xqX4DWxS9iWVA 9P9arrLDV1VEymAZxkT3WVfX36DqJCYjHSms8QW20MTo6pt+C/d7ZLV2An3MCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtfsx0wknzgRR; Sun, 24 Sep 2023 08:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38O8r9IO046012; Sun, 24 Sep 2023 08:53:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38O8r9u5046011; Sun, 24 Sep 2023 08:53:09 GMT (envelope-from git) Date: Sun, 24 Sep 2023 08:53:09 GMT Message-Id: <202309240853.38O8r9u5046011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 4647353c8b2b..2e2a46e0a597 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 2e2a46e0a597b3ee606ea7dc5bc527459077322f X-Git-Oldrev: 4647353c8b2b5ca506da45bb9b01e1f3ef521847 X-Git-Newrev: 2e2a46e0a597b3ee606ea7dc5bc527459077322f Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=4647353c8b2b..2e2a46e0a597 b53077a9e751 Add zfs_prepare_disk script for disk firmware install 2dc89b922bd1 tests/block_cloning: try harder to stay on same txg in fallback test b37f29341b9a Linux 6.6 compat: use inode_get/set_ctime*(...) 01d00dfa9e47 Linux 6.6 compat: generic_fillattr has a new u32 request_mask added at arg2 7ac56b86cd69 Linux 6.6 compat: fsync_bdev() has been removed in favor of sync_blockdev() e5d70f4677af ZIL: Avoid dbuf_read() in ztest_get_data() 2e2a46e0a597 Invoke zdb by guid to avoid import errors From nobody Sun Sep 24 08:53:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtftn5bSqz4tf1w for ; Sun, 24 Sep 2023 08:53: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 4Rtftn50lVz3dvf; Sun, 24 Sep 2023 08:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695545633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLS6GJtr9YrWVCADCshRhI/XfxRJ8gdkW1fWGrmiICQ=; b=fKu7BdIXestdcBGnqNn7KkbDU+QKAtBIgW+l57hwId0QaOff0Rma5ZTztwhB39RMmIxcxZ Cp67imQm4f7lCE8v7X+PFoGNLL3sevXzvzRSKFMimfwBJX54Ro65aTyf54xI/6ve7C7J2a GOLR+jk7mvFAQc6oaAXVKkK2KIGo16ftrWyjUDoZBGADNa8JfGnQH0WgWwNWlWJvnuTSug 1YraiQkJtrd5d5E3fsV2P2F5ORijZSXuF7PMkTrtHqtijZRt975XZfdjkfSQqqPSnfb8CZ TpbPA9/94J8kETOj8gvo6FoXP9/3D9XA2j5T01odrW6XTLMjpCnYXfwNwh2nLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695545633; a=rsa-sha256; cv=none; b=MFIFONPKy8BQd+G5pq+KnmrqsP6B+fPYVzfpM+jiLrmLD19lZBSXR9rSTON6WqFaBetM4R J0sxrd9+RLyBKLvPeVj+7YlWWhJ3Wz5MkuJDJ1K/xV+wcGadD/5tKHzjsORAFM8TRh2AdO aLGikfK51LoayUsJDPkZ0PQGwKCBorpP2uC86AB/XQcLZpi6CgNbc90yJAmJKuhFNfxfGZ kvH6tRkZ8S6gRyLOZdiJZvcl0w08cW9viCTiUE13gxmQ4qE2UQ194bowmVX07QSrc/THil ZV16ex0EzDkPqAzxIL6qczDFUexWm7K6+eSLb3JqNuxSiN1Kvq+4k64e9Nf+VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695545633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLS6GJtr9YrWVCADCshRhI/XfxRJ8gdkW1fWGrmiICQ=; b=nvaX7EO/29FyDsIDWOWNMprKrZKGM1hCGI3d6xQJ57QKzWaKlCN3+BxwcomOhR62+ERxlU EjerL6PoO2lFv3BZYExOUTPOAZGqta2nstJznAEFAKj4gzTpf+PjH5BN6CUwR6WZNVNSgG AToLbLvurwFg4BlnhVljsocRSy6/UlVoLhn3QbXYcmRDqdAaon9M+1lQXLayzBE1pombNN Xt75xnxeD6FqqHJRpJTERAJMow3ykezvvRUtbS7ZYFLmGYUt0h7gCN3sleCr5AL51hBtj/ AK912N8ldPzdWBmDoM78GSyFQhlhTaEXkWsmoDfvmQVJREFn1RCL4V+P4mV2NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtftn42dhzgRS; Sun, 24 Sep 2023 08:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38O8rrWP046242; Sun, 24 Sep 2023 08:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38O8rroP046241; Sun, 24 Sep 2023 08:53:53 GMT (envelope-from git) Date: Sun, 24 Sep 2023 08:53:53 GMT Message-Id: <202309240853.38O8rroP046241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 62677576a75e..5f30698670de - vendor/openzfs/zfs-2.2-release - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/openzfs/zfs-2.2-release X-Git-Reftype: branch X-Git-Commit: 5f30698670dec3fc2085663677021f0a592cf081 X-Git-Oldrev: 62677576a75e94396e945c4ecd9372f5d34e50cb X-Git-Newrev: 5f30698670dec3fc2085663677021f0a592cf081 Auto-Submitted: auto-generated The branch vendor/openzfs/zfs-2.2-release has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=62677576a75e..5f30698670de 1c2aee7a5222 tests: install missing PAM tests cc75c816c539 Fix l2arc_apply_transforms ztest crash 9aa1a2878ea9 Fix incorrect expected error in ztest 3af63683fe07 cmd: add 'help' subcommand to zpool and zfs 729507d309d4 Fix occasional rsend test crashes a199cac6cdd7 status: report pool suspension state under failmode=continue 5f30698670de tests/block_cloning: try harder to stay on same txg in fallback test From nobody Sun Sep 24 10:44:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtjLD43F0z4tnGw; Sun, 24 Sep 2023 10:44: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 4RtjLD34zXz4Jlk; Sun, 24 Sep 2023 10:44:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmhkI+4/AxWoloDxpgNTfB/bJvElpGvfJ0pICrmPRJs=; b=lVuzLv69JNb9cekQEDdiH7nme2uc+cDUFzNNB6uaYgD8HQQXpLi2x/cmuM0RmkKotxb8Kp poqxwQzgsNJ1SH4bWd/ljocbne6u+13zN0c7+wS49OkPRKYtCcZTQACf89fYAkWudOzaaK 7OmG8JgxWnjEX2BWP+MLnSLU8hTSTAC79BgohN8EfY69KDVW3rcoI7CIE4Y5ZiSHfOC61E cyWPCynAVtWim8OfHO99e81fdTQvv5gGM3Ado+X4ebcajuNAl8a46A3CKgsnaoIE5dNhv6 uvJ4U1SBuBNsszu4S6ts+DULXiWJKcNZguUqr7D5QVKZ5946cO2an07L6Kk9jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695552260; a=rsa-sha256; cv=none; b=RX5+iBlTJ4XulmL4Hwo1mWOZmcksKyqO7MHtB+KFIp5l0LLpNysx+7FGEDXyCuIp/BDKGy lVLDD1phVvgh8l88tVvC57VE/1fj2var53xqA81nIdxqpVXlqEJKLP/vdpSBi152+gQsRy ISUYR3MggMEgBx/V+OsK7DBKKCKbtjfKU3PatyovlLc4nO2x8eQJa57v8TLiwDK+/GUx3i 1ANAofk4pLBE/f1pxYD8ZiSzvQjZ4urzAGOmw688Ys5t2za3rEx+MO28Jc8lDVASpltWah wOwzj2nB68BAFlvLHaze3u/eMaIOmIkiR6cGRKHzAkIHnttozSW+OlshP0Za7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmhkI+4/AxWoloDxpgNTfB/bJvElpGvfJ0pICrmPRJs=; b=kDXyNZUakD3A4JTmABS8vV4pCs4gonNR2R4swle/mDil2U1qMRsYpgy9VGd/sT4Pav1Kfq brZHvq8abdCkIhHNfPnNroEBvgbh8yW54Iz9HzRvN3+1nid2+6dO6k7rpTkRr5GkCY2xCd ve7TDzSH+YPdlBqyeF05GMc4DmsatZFP4+wuvylDnQvyTHp9NoT2KzSsp45Pd0ADin/DWK c9i4TtJGqXB5tDcFo7KEgURraVUnmXVdMzJCmrdmpaSOluxiajL5B9ebbI+m3RiCmtK6bg mgfjpGIfb0KS+siCnV51CWz4a13QKHOIdNp40/wmKPYHHSKKzniEy0ynDke4YA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtjLD27Dszk3f; Sun, 24 Sep 2023 10:44:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OAiKX3029581; Sun, 24 Sep 2023 10:44:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OAiKSJ029578; Sun, 24 Sep 2023 10:44:20 GMT (envelope-from git) Date: Sun, 24 Sep 2023 10:44:20 GMT Message-Id: <202309241044.38OAiKSJ029578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: c76dfb929e70 - stable/14 - vfs: fix reference counting/locking on LK_UPGRADE error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c76dfb929e70c80a2d0280a1371c07738d910c11 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c76dfb929e70c80a2d0280a1371c07738d910c11 commit c76dfb929e70c80a2d0280a1371c07738d910c11 Author: Olivier Certner AuthorDate: 2023-09-22 20:57:20 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 10:44:11 +0000 vfs: fix reference counting/locking on LK_UPGRADE error Factoring out this code unfortunately introduced reference and lock leaks in case of failure in the lock upgrade path under VV_CROSSLOCK. In terms of practical use, this impacts unionfs (and nullfs in a corner case). Fixes: 80bd5ef07025 ("vfs: factor out mount point traversal to a dedicated routine") MFC after: 3 days MFC to: stable/14 releng/14.0 Sponsored by: The FreeBSD Foundation Reviewed by: mjg [mjg: massaged the commit message a little bit] Differential Revision: https://reviews.freebsd.org/D41731 (cherry picked from commit 02cbc029dac936b4ddbc38cef969c4b30c9a7d1f) --- sys/kern/vfs_lookup.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 151253ffa0f5..d75351c34314 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -905,8 +905,15 @@ vfs_lookup_cross_mount(struct nameidata *ndp) crosslkflags |= LK_EXCLUSIVE | LK_CANRECURSE; } else if ((crosslkflags & LK_EXCLUSIVE) != 0) { error = vn_lock(dp, LK_UPGRADE); - if (error != 0) + if (error != 0) { + MPASS(error == ENOENT); + vrele(dp); + if (dp != ndp->ni_dvp) + vput(ndp->ni_dvp); + else + vrele(ndp->ni_dvp); break; + } if (dp->v_mountedhere != mp) { continue; } From nobody Sun Sep 24 10:54:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtjYS10PQz4tnS8; Sun, 24 Sep 2023 10:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtjYS0F8Dz4L5Q; Sun, 24 Sep 2023 10:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3E9LTD+xrJCp894TUYIJn5HdAtXNuX0iKn7r/2fQ+I=; b=D1WHmRVFOuka7L7r7i1gks5pE9KhdiUOunRcu6NbORpe3wPLHWIW3WiicOt2tcq0dzRHHy E0RDb0LylMwWM/FVaRVkr7K9YLfuLAILQkdCvQHccmVrNmAnEazL/8krx1cBbKtoU+2Ow2 yayCfaPV9FiaVNL7VvHT6kmCkJFDE2SFhNInYJHDGTsa9AKoLpLKsXHACH27fvWIO9tkD9 S5ebU5A6xPJo2WUjUT5iCLX88Ajz8Go40nkfbbvdDWKVVSOHj923DCyWOl7JgBATSe94Hf P+CQOZt8ykoqrTkxWOXTfKCltpLWRYyPH6xVRH8804rDey7Vm9jjxg3UaRXM2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695552844; a=rsa-sha256; cv=none; b=XoV4SqtFboFcnI+P3q4W2U/MyY6d6fTAVQEPZfq7aTsJn+MRsFXBkE1hcDPI72mUbHBYXP IqfjS/nqrDuhQowZgemZ+f0CumHevPWx08pfOFPdi2O3uR6C6hsFo/1LgJhr1lUIt4Yh6r z4sZH/cnYWYP4arDVEZLaSidAVfRWluZsNTiRB+28kusMnE26ewAg1aaVC024/ON3cxjS2 3LshW8zatC6ypzhgRKVslzUnLGUq9qnkQ932RbGS+Y3/v/wLP5e1NKDqE3kPAgzTgomPVr 1kj2caNCOqqVrXxtc6NKrA9wX0On8RbmB5k5dNIj6QVAy+mYzCFS16+FZTPbNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3E9LTD+xrJCp894TUYIJn5HdAtXNuX0iKn7r/2fQ+I=; b=AKvIZKMQxf+NxXq2VHr1EAxPET8jpFWVuToTP882Ff0S6aisD4byBHtdPDzdJPD3QGlAAD hRTsUWzLznsT37H+skBNTF+cwmBzhCHeOR3za4D+znouGsAPS1sbl01FPlTiTh/rBPxMN1 FW5cR5YmqeCXP2qwV05XlhP7tYU2Gqf16WESloEPXzMXpjgWzxZOjSJ1d77ZlEU0idsOYW jkUheDu7XeQ+off9Cj7mRIkCOmhiSK4qK0hvegdLIdjZzgqVd6s8irFTZsyxoh7B1eV8kw x/YT7N+Qf3L+geezFHE/utERebdZo5Eb/pGGrj/L+oBxEjIwb+F4uCLfqcW85w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtjYR6Q0szk0x; Sun, 24 Sep 2023 10:54:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OAs3sw046097; Sun, 24 Sep 2023 10:54:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OAs37N046094; Sun, 24 Sep 2023 10:54:03 GMT (envelope-from git) Date: Sun, 24 Sep 2023 10:54:03 GMT Message-Id: <202309241054.38OAs37N046094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: e68a2f18b64a - stable/14 - linux(4): Validate exec_setregs on arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e68a2f18b64a0b3b6e17f4a8ada68c6332e14423 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e68a2f18b64a0b3b6e17f4a8ada68c6332e14423 commit e68a2f18b64a0b3b6e17f4a8ada68c6332e14423 Author: Dmitry Chagin AuthorDate: 2023-09-05 18:19:08 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-24 10:51:36 +0000 linux(4): Validate exec_setregs on arm64 The lr register is cleared at the beginning of the _dl_start and _start, so there is no need to initialize it. Gnu libc _start takes an rtld_fini pointer in x0 which is set by ld.so for __libc_start_main, the kernel does not register any atexit pointers. While here fix whitespaces. MFC after: 1 week (cherry picked from commit 20845a6994c548977874d1f413044d43c8474f0a) --- sys/arm64/linux/linux_sysvec.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 885ac4657380..3072732de768 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -51,7 +51,6 @@ #include #include -#include #include #include #include @@ -107,12 +106,6 @@ static void linux_exec_sysvec_init(void *param); static int linux_on_exec_vmspace(struct proc *p, struct image_params *imgp); -/* DTrace init */ -LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); - -/* DTrace probes */ -LIN_SDT_PROBE_DEFINE0(sysvec, linux_exec_setregs, todo); - LINUX_VDSO_SYM_CHAR(linux_platform); LINUX_VDSO_SYM_INTPTR(kern_timekeep_base); LINUX_VDSO_SYM_INTPTR(__user_rt_sigreturn); @@ -178,19 +171,9 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp, struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; - /* LINUXTODO: validate */ - LIN_SDT_PROBE0(sysvec, linux_exec_setregs, todo); - memset(regs, 0, sizeof(*regs)); - /* glibc start.S registers function pointer in x0 with atexit. */ - regs->tf_sp = stack; -#if 0 /* LINUXTODO: See if this is used. */ - regs->tf_lr = imgp->entry_addr; -#else - regs->tf_lr = 0xffffffffffffffff; -#endif - regs->tf_elr = imgp->entry_addr; - + regs->tf_sp = stack; + regs->tf_elr = imgp->entry_addr; pcb->pcb_tpidr_el0 = 0; pcb->pcb_tpidrro_el0 = 0; WRITE_SPECIALREG(tpidrro_el0, 0); From nobody Sun Sep 24 10:54:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtjYT1q4bz4tnVj; Sun, 24 Sep 2023 10:54: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 4RtjYT1K5Gz4KmQ; Sun, 24 Sep 2023 10:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sAqsg8zHqfHTJ16eOAtH+WjatCIIQH+RnR5XnjNUvnU=; b=uFydvYYWSfvwlButIOA+hiX4FP7RIiaEhwW/IdOAIbrgHNxM69Lr3G3oK0aCQ1t/p/pSUS 4+Xnmp4ympDFoKJQHwMmDmrM2E4UE7wcIcCjeiz+LsIH3E6DASkqnr0BpBTexuMDt3nbpw oG1kzIH8k0VaXVDH/jLh5v0ISfol1gPZyd1aYPpeLFSm2t/yPAINICkEk4CVv63fuSuaJU TaU0oUPEaaMCLsUqN/BbRV6uE9oYYdnuTtqAwmdO33XOlEib+N1EOwbHkl/0kKfB7qRp9h 6uMK4NEbRG4ZCWYtsKAvzlhBpvz7xn3IhzoKi9mR7HWAmErPoOpXMQHrp3SbOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695552845; a=rsa-sha256; cv=none; b=a8FfpjQtHYjpUzWXR9c3xLR/4MsLnT3rZ9CigeAD5uZNKLCAt/BXA926Oi3eVngAKZA8yW zyuvQ4HJuwwb7T1jIvmkrBWAxR+NuS0Bt5lMtHyVFf1ZPeZ/kup1BzdOm4GfUOIbOR/LGO 1Ahbo0hsJaaUOcmqDHRcE4Fol6obHxa3zN2R3iYjpCgh6Idq17Eg8EDlKTsk1vwtV9Dc3f WIDYxsrmSlh3nnxPPMnWP1wxuZNBVmIzIP+puZK1APdezNdfryAXjPvV8zhRWzzWt/NNi7 Xx8PPzI3TWKgDQk9U/sdjniAbeb00Vs8TAlT6kz475t8kwCiyfO/XuHBS47zbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sAqsg8zHqfHTJ16eOAtH+WjatCIIQH+RnR5XnjNUvnU=; b=DvzfwXIlhE0gyO8ErrLs22YDfoXs3in1nL+9MFuy9gaYo53bX3xIvILJbxyubX3JEj3hJX OCxTQrYaZYoCTpcawtLmRSgvP76H/JvnQUZVUBvhuKb2Yfyw2V6XKUV9FZXXyaIdD6R1HC eyoVKFniuTlvqqtjhAp8+Gj2eEvALaMoWfkA/twAVqrJ84N/LYHl+/VJxCqgfJ83FgEt/2 7jPAgiURrQ9A9PUeXzGIpLCYi+iS44yGtmnZdZGpCgY1Z4/ZoiBeZTeoacawTvujdTOfXZ rZS/MpjLxFXrv8+4PkdJg6iXCo/dnswEJkgY8p6tEtFHd55LEQBOvxQg9ysQNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtjYT0KzBzkmC; Sun, 24 Sep 2023 10:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OAs43b046140; Sun, 24 Sep 2023 10:54:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OAs4mR046137; Sun, 24 Sep 2023 10:54:04 GMT (envelope-from git) Date: Sun, 24 Sep 2023 10:54:04 GMT Message-Id: <202309241054.38OAs4mR046137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: cce0625cdf4f - stable/14 - linux(4): Cleanup includes under arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cce0625cdf4f014b819b1a9665a299f127eae48a Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cce0625cdf4f014b819b1a9665a299f127eae48a commit cce0625cdf4f014b819b1a9665a299f127eae48a Author: Dmitry Chagin AuthorDate: 2023-09-11 18:29:28 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-24 10:51:36 +0000 linux(4): Cleanup includes under arm64 No functional changes. MFC after: 1 week (cherry picked from commit 027d727d4071435376017d3789fe603a8aec805a) --- sys/arm64/linux/linux_machdep.c | 2 -- sys/arm64/linux/linux_sysvec.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 3ba5683941b5..3bc2923b9d4d 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -27,8 +27,6 @@ */ #include -#include -#include #include #include #include diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 3072732de768..5f9252accb5f 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -44,10 +44,8 @@ #include #include -#include #include -#include -#include +#include #include #include From nobody Sun Sep 24 10:54:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtjYV4T1Kz4tnPv; Sun, 24 Sep 2023 10:54: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 4RtjYV2CxDz4LH6; Sun, 24 Sep 2023 10:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdvQoWR+3WRnMcxzHQsMM9BfJJDCwbWqvwUQFlOpknM=; b=Wl7UQW36Fz/W5Nb1F2eQzLbnC0ikfjyz1y/1EXSBtfQCuf/3tABMQZY2y8ZNmaJaRtx4wM UHdbhCs1DIsXLCd6TQUCESGgyiFVVOyk4pRv7AmGcHw0vY0CGNQTWbADcLIqOCtuBF32QO m+Eyp1Ane7Wan4dlt2/grBMVg2Na9BavYCN2j8Ic12YEGVxAyaJRFqbMfZxt3qfKDfDLKY NAh9bsku+4ODZJbQL0edcjAZzUu1s52TqWOGQNe7Yo0K2vb5ZboYwMXPo7fwEqIXEt3rXK v7xXr0VAJoW25a9ktGCYNia80S7cYdUQeVNY8bivrV+seyPw+0IuzvmBb92KUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695552846; a=rsa-sha256; cv=none; b=tK3nmAhYEpMByAiVmu+V1g7UeeQQfJmTJxWLMUH1fhKsnhUyDW4egyTnnNdguWcwoW4dNt 6fJnu3jAVwKUvMn7FRBkt/kTA0jJFEOBQOAULcfO/t3Jb3ugCrtEwi6qI5VOnYTYt+69kn BhsWj+ao+EUCkn7ES9ExoykCP4HRgqmkryonJjYx3DOKycBfnCfjnNux3ALCcr+ZHObkrn 9aYeXK16MyUGHckIBtEa6siEespx7HtlojKfYzNF/YWn+rtdO+s0YSLGPMZ0Hhv7PL8rTo nQwot7UWqlgn07HuKePGoB+K0F4+sEDsFfukajTCKEgct0bGCq0IWWhaIKo1Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdvQoWR+3WRnMcxzHQsMM9BfJJDCwbWqvwUQFlOpknM=; b=MOGdBjEC5f48yrJzSmPLdEMsX4zbdi43SqubLsVxcKjEhmEvRtoE6oDCaQTu1jr2+C7CVa iGVVUWmLSjwMNATMRkxDGJbvVLA8DYalBQtdztkFLphO3eN4EBY8Ko7KBD+k+GYl232253 b53qasXWwhj1zsbqixa3reIX/NgpYAF5p+3KYTGz6bJlaD4o+P2k3eAUR+Udaov04rurv3 rHgF2wKRSgFZp4X1y0CC4b1frb5x2QlBZNAYpL7hUnb7RWdIXCiQ+LQJhZa4ZOmSfhfPU/ 2LkzZ3pkFy69gFNufawxaes54UlYL1AGGfRMu9trXGbuhccx2OFPLb1EXBQcDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtjYV1DZvzk10; Sun, 24 Sep 2023 10:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OAs6DQ046187; Sun, 24 Sep 2023 10:54:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OAs6iV046184; Sun, 24 Sep 2023 10:54:06 GMT (envelope-from git) Date: Sun, 24 Sep 2023 10:54:06 GMT Message-Id: <202309241054.38OAs6iV046184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 41a4122b7b78 - stable/14 - linux(4): Cleanup includes under amd64/linux List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 41a4122b7b78e49fbcd91a8abb409dad9f3ac2d2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=41a4122b7b78e49fbcd91a8abb409dad9f3ac2d2 commit 41a4122b7b78e49fbcd91a8abb409dad9f3ac2d2 Author: Dmitry Chagin AuthorDate: 2023-09-11 18:29:34 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-24 10:51:36 +0000 linux(4): Cleanup includes under amd64/linux No functional changes. MFC after: 1 week (cherry picked from commit 68df2376e0e50cea0f8c3c04dc2d8a7b63515773) --- sys/amd64/linux/linux_machdep.c | 13 ------------- sys/amd64/linux/linux_sysvec.c | 7 +------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index 33ce902a45bd..7ec1ec56bb95 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -41,25 +40,13 @@ #include #include -#include - -#include -#include -#include - -#include #include #include -#include -#include #include #include #include #include -#include -#include -#include #include #include diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 55eb34b6d329..2907323d903c 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -51,13 +50,9 @@ #include #include -#include -#include +#include -#include #include -#include -#include #include #include From nobody Sun Sep 24 10:54:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtjYW50xrz4tnPx; Sun, 24 Sep 2023 10:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtjYW35wbz4LKc; Sun, 24 Sep 2023 10:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tCvBNEdSXuttWE27bulODoZbpdrHTYCmZbbRdvJIjB8=; b=o0S30VYGFo977prBGiICjJFyzuilWXYKpNbl9BktXbOl/1yUYMYAwgZTmr03GDgUuWmwOP 51SCF1EquKWic0IoHC+VhCzPNgI/HqZ7nw+n3V2TxOEAG1MrZSz9Y2UsmA1DgCRgFE/i4+ Qlkc+L1mFw2dgzdPUYf5WjDr+cA53bmXES9oo2LevNf7z/pvU5lmLcOgSmyfo2Wgk/TPlz Hrz+3doawN4mH2ZEQb4rsylceWVxfls1fIZYvoBcLGsptQq2Mzy/xodBOSLC/dvctq1d69 gSefoKUu+maqSXY6x5sWwqppnj1VFjE0wPbog4TW1T6ZyX9xY/FrzC/pvPnLUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695552847; a=rsa-sha256; cv=none; b=anwddYRQ62JjF3eYVnMDhY6IjuqEcqP2lJvYdQgVzoiTAlI4utGLWmWnvIaUBS7/HhnpNU gBFFig5vgsNJYtIq240afKsxczMaiTp4NILO5ZbOiQ6e2S3kdpU77fHW7ljP4VJ4g57Vl3 exk9D2NGXGkQivtV0J5giO0jPpXKQngzjGcMEHwcUsu4KchmaW6yaInb7X4KE3kTzhSq+T bfsegafbHkZDvsNXQmA75vBGYEh9Rt/2j4OUYNKOFWGftI4PWvVrdELSpNLQsbjplKImoT 7UKV/XuRQrf4/rZbWpPP0qox0j+KjbjEy7QWi7WoyMvIIB4jNvdEex+8RkbhDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695552847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tCvBNEdSXuttWE27bulODoZbpdrHTYCmZbbRdvJIjB8=; b=KjI1VHzNdA7PZf6woRFLu0mdy8hAd0AwjxgIZVIuZE98jPetvrLSGmJoQoLcVqYDQhazPL XnTBy041WLTDpZOfyTalAlEbqgdQGYA0htu9SSuPh1ppTErI4ND00hkxLwTdNrpL+DnOMU JiXb37JWgiqa/Sc0qcgPD5fx3L3UeR9eLPwgIiwWin2pclZUC/x5RNYOkTItB4aTkRbPKT /DKwJ774GfzSqA7mUcdXSU4Kk9mpEZUCt6NSrWFlJx//S0WLRvB4bmjG4G6ECChvpMQUeQ 0ZFeSyHtdtqieQ8gb1vhiJBzAxYixEJ9aMlFfh6vrml0BDwHRJ8lxyDViw1n0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtjYW2C0nzkkj; Sun, 24 Sep 2023 10:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OAs7xF046231; Sun, 24 Sep 2023 10:54:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OAs764046228; Sun, 24 Sep 2023 10:54:07 GMT (envelope-from git) Date: Sun, 24 Sep 2023 10:54:07 GMT Message-Id: <202309241054.38OAs764046228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: cba7b3b9563c - stable/14 - linux(4): Cleanup includes under amd64/linux32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cba7b3b9563cefd73a90c7a044ebc7827de1eed8 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cba7b3b9563cefd73a90c7a044ebc7827de1eed8 commit cba7b3b9563cefd73a90c7a044ebc7827de1eed8 Author: Dmitry Chagin AuthorDate: 2023-09-11 18:29:40 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-24 10:51:36 +0000 linux(4): Cleanup includes under amd64/linux32 No functional changes. MFC after: 1 week (cherry picked from commit ba90a31d08e413b82c1d1d4d697c2cdb32a13674) --- sys/amd64/linux32/linux32_machdep.c | 14 -------------- sys/amd64/linux32/linux32_sysvec.c | 7 +------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index e10502f9bd80..ba4dcc61af76 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -31,31 +31,17 @@ */ #include -#include -#include -#include #include -#include #include #include #include #include #include -#include #include -#include -#include -#include #include #include -#include -#include -#include - -#include - #include #include #include diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index f2a379a66860..31436ee7162a 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -40,12 +40,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include @@ -57,12 +55,9 @@ #include #include #include -#include +#include -#include #include -#include -#include #include #include From nobody Sun Sep 24 13:19:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmnk3r4cz4tyHn; Sun, 24 Sep 2023 13:19: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 4Rtmnk3LnPz4WGj; Sun, 24 Sep 2023 13:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4O+7J/WpIHswDgkDeBF1qczhxypPtMhrC0ITIAau8F8=; b=W8+jyHintSak5SETVGPDnqoZaxNoES58R5xU3BjiRhovRYQLTXTtN6fM7p+3W3NxLLNifF YT2jEK9XyaZUPiwYJsPpwX1VoESh/A/ypyrkosxipPHYPm1I0xX0sR8povNYVrq0jGqwRi PSNNQfl8KIv9acjp0vws/zK9/9MsZvXYRW80DESmA0448lro0Bz8+Nfd75cHf4vNVnDmnj k8TUUZsdl1i1UnXvNid4O1rnSFPMgwmIp6D8otZoTqsQ8Upok9a+7ELjgrimZXY9AJthSe hOIAu16OWPKt+bTS2gqi90us/wrZOB9nefrMCPHEgm8j8lVSCUSSJWN8kh+LxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561594; a=rsa-sha256; cv=none; b=CcCU51zxlA0DzncH7IrQRzSyIzXglpjApgwd7IoMRTj1bemOyNRQjAyCkddtkwHKYgEG35 DRtVahMpxt0V6HNsIzCoAnmYgjxs2klL25xNDG1zyfyFCIXl76737NV1UK6vvNi+6qLy8e 5BYt/X0d2/JcldQnMF1WQIwRbKY7vRBo7GQQiT1oJaimyCRqEtFGgWeBWbr3WoJ+QZ3oNh 85b9ZNg6k5crVZ+cUutLXyFPeT3CkYH3ArSuEY3iEak51UBfDLHv+I4i/ifq/+i3BzU6m2 1fLw5Fe+lnmYNmAuYswcS/hn6GPzqZ4Vc8YxyWNp1cm7J8lLj38rLRlAi1YZKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4O+7J/WpIHswDgkDeBF1qczhxypPtMhrC0ITIAau8F8=; b=EhnwOTVgucXuQSJY87R9KNgGXcIu2w9/x7KXKtjJxrl4L9NiKSPTYCYgFIKp2rTNMcHA2Y O6KhyNL3R+DwyEouQ8/6gSH2QExEYAIJXoUljOnbRBne+FG2J29zwRQGxniJqiQHYCHUsC hHcm8jBuI46XKlXypSx/969r1fq6tdpLJOcjSDH9FQftIQl1XrIqUjSISxHWuESB6VtA4H B57SDt1JDlCiYPV76t694O2gulvlfP6QJJWx2JSc3CxIiPCNrqnyaCCeIurnOdXX8wReN4 9VrfPNJI5ARIEyallGXVWSN/oXydXBGG+VRrsNvnkGrAsqQwdtcBkAj23/Obww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmnk2Q3mznQ0; Sun, 24 Sep 2023 13:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODJsLY079646; Sun, 24 Sep 2023 13:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODJsml079643; Sun, 24 Sep 2023 13:19:54 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:19:54 GMT Message-Id: <202309241319.38ODJsml079643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: be31bd59895e - stable/14 - makefs: Handle missing link keyword in mtree spec List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: be31bd59895e57fb7359de870ea3ecc19e3d1ae1 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=be31bd59895e57fb7359de870ea3ecc19e3d1ae1 commit be31bd59895e57fb7359de870ea3ecc19e3d1ae1 Author: Stéphane Rochoy AuthorDate: 2023-09-21 07:14:20 +0000 Commit: Ed Maste CommitDate: 2023-09-24 13:17:43 +0000 makefs: Handle missing link keyword in mtree spec PR: 241178 Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/850 (cherry picked from commit d26c1a0f8bceb6748436fe3fc57bac3ef8179dd3) --- usr.sbin/makefs/mtree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 45588e202542..3e62afbc1137 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -740,7 +740,10 @@ read_mtree_keywords(FILE *fp, fsnode *node) type = S_IFREG; } else if (node->type != 0) { type = node->type; - if (type == S_IFREG) { + if (type == S_IFLNK && node->symlink == NULL) { + mtree_error("%s: link type requires link keyword", node->name); + return (0); + } else if (type == S_IFREG) { /* the named path is the default contents */ node->contents = mtree_file_path(node); } From nobody Sun Sep 24 13:19:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmnl5L1Pz4ty9G; Sun, 24 Sep 2023 13:19: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 4Rtmnl4cSbz4WML; Sun, 24 Sep 2023 13:19:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u81/sb1gGcHAwEcsPnh1uFVIibn9jiW/pfBEsNDpTdA=; b=orZowJ20vg9aKWtVb8mysEfuRyiSrNp2z7xKJn3lyjMdi3SN4Xe06MbTS/UjQlSkeO1/hM E14NxnuCV2VPQ8QnOpSkv+1jXXxLcZXJCn6u5GlfYycuy+fmRnJg8HBHef3375QEZFJ3xE GjBzySxRwhwewNz/0sZ0Owulyyt78IhRxvDRmTX2Wv5FzPEIwDPHb0CvTjRFD4bT6gFGiE 4qYK6d4GmEis+zR4f6ODJaF4feXmYYWs5B0B1NujmVwbVgIlo8rvE2uKwq+3AUjpRh7moV N61Xr078x92X4K48F1kbJqeVmffz5U+0nHnzz/96oUk7vkcTOjlbZDvs38AkuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561595; a=rsa-sha256; cv=none; b=kUvkI5eiXgWM2v8SO0usyxgljOxluReY9wCPlX+Fc8BSnYOVxBUUDvUJKKB1mXro/FDsgC mb9ccsd1J8btYc7sDCNThQn2su98SJ43cXRLtOTPA+sT7+MmZ4urt0JB+jfM8lGokGIGc4 QJ8aPJHkZttw+GmGLjvHMUgRXwWdL8N6AxiKfoQHb86MbrUamL8XnKCxjiYazcHb4hzmUQ NuDDY3WDVZaNDtmIoepjBIC8hf7dAA8lrHpV18DmvtUD0tgBO25UrAvQ19fXEy2YDHhcIB nptCzfiJIS2a4pR6HLnyh57ns8QsIpoOo7tqTm90U5MIhZeAiN0L7eG7Ft1ztg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u81/sb1gGcHAwEcsPnh1uFVIibn9jiW/pfBEsNDpTdA=; b=LB7S/PQ2kY6d1Xje2SGodoInFSQ+AZ02aX9SI27trjlrj/BXEWLw4PrPDEhvf2OC+wNWz3 okgDYl2FsC/Ui6cXeggBr9WnbP6ADYgpdxyGtPOq8NPTQ9w4M2YKbC3C3shaeXIPcdL23m FdjqQ5KV4T5GfspXYmL1MlVMhirMc7mCfiKhMVO29tNzJRr+k8eDrqK92bl3Gpwr5VgBTA Dc8aCsMJmu0R0Mx/IbS4Q8Lg/WUSLaXLBgvTNsZVLGZJ8erSUMfOmkdgu8tq4/fZ5PR037 ROeO8OBpcznqEv96WvYb3yoOeT4l1d32fxGzpb0ntwwReyhVOZZaJ/vSFLV/6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmnl3Q0Gznvw; Sun, 24 Sep 2023 13:19:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODJtDo079701; Sun, 24 Sep 2023 13:19:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODJtol079698; Sun, 24 Sep 2023 13:19:55 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:19:55 GMT Message-Id: <202309241319.38ODJtol079698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f701d9da1d94 - stable/14 - rc.subr: don't require service to be enabled for `status` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f701d9da1d94891dd2edad607a989cad6eb10313 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f701d9da1d94891dd2edad607a989cad6eb10313 commit f701d9da1d94891dd2edad607a989cad6eb10313 Author: Daniel Tameling AuthorDate: 2023-07-01 08:43:40 +0000 Commit: Ed Maste CommitDate: 2023-09-24 13:17:43 +0000 rc.subr: don't require service to be enabled for `status` For a service that sets an rcvar, there is a check whether it has been enabled before the actual command is executed. If the check fails, one gets a message to enable it and the returned exit status is 0. However, this is usually undesirable for the status command, which is a) supposed to check whether the service is running anyway and b) returns a non-zero exit code if that is not the case. Thus, skip the check for the status command. PR: 272282 Reviewed by: emaste (cherry picked from commit ba793728a840041e93e38bcbff4a7233dc63b722) --- libexec/rc/rc.subr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 17ca904ff1e7..332718dc6f2c 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1041,13 +1041,14 @@ run_rc_command() continue fi # if ${rcvar} is set, $1 is not "rcvar", "describe", - # "enable" or "delete", and ${rc_pid} is not set, run: + # "enable", "delete" or "status", and ${rc_pid} is + # not set, run: # checkyesno ${rcvar} # and return if that failed # if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" \ -a "$rc_arg" != "delete" -a "$rc_arg" != "enable" \ - -a "$rc_arg" != "describe" ] || + -a "$rc_arg" != "describe" -a "$rc_arg" != "status" ] || [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then From nobody Sun Sep 24 13:19:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmnm5yM2z4ty9K; Sun, 24 Sep 2023 13:19: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 4Rtmnm5S34z4WS0; Sun, 24 Sep 2023 13:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g1jCY4m6TAh4NXmBs9ekebh9S+sAsScKtCOXyHVZdGk=; b=h9QampkuUl2itqzSRaCgLa+IW/QDkZ3H9YnxDHPBIqWiuUvvlR9CBa3OvGbuodgb8dxUg7 vA6YYo1p+rfjHRJuOzgXPwoSJY6kre+YYnVQ8I4HIkjfytdTq2klwA4owbvXW7Um1Pneug QelHlFwIfZDG6Hgd1DYwr+va2ihBj33/3brI5KKkX/OnEEAWySneZVDA9wjoXUwFSdn2xV 219pmawYZ8KjPF/sHNsW4bD7dj8N11SuUP56SL7cjtVuLDTUNZ5PoO3zsaoFg3Z60iuI3V LyPS0vB0X6PnBAwY2J1doLSN6GYKydoDZuLu6hjjjnJdWdNtUsBb5zJr0B4Tig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561596; a=rsa-sha256; cv=none; b=USzAbQIbY1pVRX2qDxEnGcZdmgZpmOUhgcG8N2yHI0YkmJKKF6zTW41KJx8cApEKuQqdPV 8PscZR7zBGi16LT/ckczXKIfEI5D/bQ9/sI+Vy/8PsbJN7OaL+qeWQpnKWmF+j53X6CgwI 3BI0diyy+RbtESBsp1ZpsGXfUCA811lBsYT1lDxtOIoktbJtxkMq2moFxj5JWJAkiw9pEK qmqp4x4ADUaKwsMDP2pUri0Q+66cIOjYMT4JnpKbZlqzbDRSEI73xF85/2x3cvywFdJxrh Yd+QCtSyZk0+c2sRDH4F1wG74RGUSG8S2CVRMbFhzi686f6ZmPzm+g5vbB49UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g1jCY4m6TAh4NXmBs9ekebh9S+sAsScKtCOXyHVZdGk=; b=LtAqEqHUm3LmSmtQX+HpIahmARB+OuOPQU3dvDskzgeJpFqoetwGIKBMWe0qD+Qig4erV2 DZ49hgANC+wQr15/zU0QYonSW3lR7oX8jEiCcILIpfZWTbZR93QWACypdoH+doUbw94S8P SdPXyG8JIz4YHhpBmb0JykdBvY3H47QyhabscJroKfMBKD8XhGVfkXgnta+5W24eQzui/F nSJQZax6IEiZFpy35l0LHUova8/mU0MzfXJBkR2PdiA9NMzox/SB6wmEw8J121BFoFJ0xF FkX5oP1ZcLAe2gFUQ/oamtJWr6WqNiy4cHxGlyLSmMFUaNRdsHsHFDwkMFAX/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 4Rtmnm4R8dznQ1; Sun, 24 Sep 2023 13:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODJuTu079756; Sun, 24 Sep 2023 13:19:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODJuFD079753; Sun, 24 Sep 2023 13:19:56 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:19:56 GMT Message-Id: <202309241319.38ODJuFD079753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ab64f100ca5d - stable/14 - libcrypto: complete the support for the 0.9.8 API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab64f100ca5ddd37029695646003abaf49c3065e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ab64f100ca5ddd37029695646003abaf49c3065e commit ab64f100ca5ddd37029695646003abaf49c3065e Author: Pierre Pronchery AuthorDate: 2023-09-21 11:42:06 +0000 Commit: Ed Maste CommitDate: 2023-09-24 13:17:43 +0000 libcrypto: complete the support for the 0.9.8 API When importing OpenSSL 3 in base, some but not all source files implementing the deprecated 0.9.8 API were imported. With this change, it becomes possible again to compile software targeting this API. PR: 272220 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Reviewed by: emaste Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/851 (cherry picked from commit b15b39521644ebffdcc091bd283ed410b0ae9274) --- secure/lib/libcrypto/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index d8ae91bb3272..dc701d90451e 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -196,14 +196,14 @@ SRCS+= des_enc.c fcrypt_b.c .endif # dh -SRCS+= dh_ameth.c dh_asn1.c dh_backend.c dh_check.c dh_err.c dh_gen.c +SRCS+= dh_ameth.c dh_asn1.c dh_backend.c dh_check.c dh_depr.c dh_err.c dh_gen.c SRCS+= dh_group_params.c dh_kdf.c dh_key.c dh_lib.c dh_meth.c dh_pmeth.c SRCS+= dh_prn.c dh_rfc5114.c # dsa -SRCS+= dsa_ameth.c dsa_asn1.c dsa_backend.c dsa_check.c dsa_err.c dsa_gen.c -SRCS+= dsa_key.c dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c dsa_prn.c -SRCS+= dsa_sign.c dsa_vrf.c +SRCS+= dsa_ameth.c dsa_asn1.c dsa_backend.c dsa_check.c dsa_depr.c dsa_err.c +SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c +SRCS+= dsa_prn.c dsa_sign.c dsa_vrf.c # dso SRCS+= dso_dlfcn.c dso_err.c dso_lib.c From nobody Sun Sep 24 13:19:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmnn6rvBz4tyLG; Sun, 24 Sep 2023 13:19: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 4Rtmnn6Q26z4WkL; Sun, 24 Sep 2023 13:19:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CCCJsSaWvZJ7YNFLE8gr1G+hroBOvt52vBv1rVvWh4A=; b=URzZN1lkB4DPZOBIs0gsXPlTvbqjrxsChBWNsZxB0TVyRpnOZYXDuO84NrCddVy0zZDQxO 0VB++7+xtPfU45NBSN33r7NBMlToyX0QjB/0nGT5OuUOBe3qPTPPgXCtaSbmxxw3fiYlRD IkS1m4nAQoz4FI7ObHbEpi9bUue6ZKb6XFTwDpC+fuzqsg7Z6ago24hNftvKnrrh9Oh1uM ZfpJtdMJIv++yhedZojXeBANYA6slvPFWVFyhVPlxQHpGCXtbfEekLBfRH8uZ5mzZaGrp0 YfQiH1GeG4B10ZIYfQgfuX6a4Ewwo1TFsrgneLGv1XysLF7qvJhnpPUOTwaQ4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561597; a=rsa-sha256; cv=none; b=ODRQOsTFoFw7KAyyPKMC8W/MBcSEMZ/Gg2NcjOkpLQJ528+iPTNkMqUB31cy4VUr+x0b/L s12gRfDDMBlQDWfID8NpEK2ahtz01gu+3eiA9eAkoM/1nRj81/CnTcmDuxISGFwmhmd/zS plgjswycVoW72V8WJDk2pZ7MUzkUIWmnC8xR/AtlHU4oyOldPKMDRW/dbxWfRvrYH5f9Go +GNg0RqxnCQc8xi4Iju6l+oeoMa5xzXIL7iENUQ0ZgEQnyy3nPU4XwNHnlndF2tF22on47 WVjJp8HJYkT33kie81uUHiDT0PGaCkDDWvJlOiikOuSeaXhbIfWhWnMsdCxIlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CCCJsSaWvZJ7YNFLE8gr1G+hroBOvt52vBv1rVvWh4A=; b=CqOGe4rEYOnWpAxn2HZ8+UUTPxH0zfsVoqQCNFT8MhF3mwFFJZeyL6P7kIo4VszB8NG2CK jSTBPpQBaYgbr4G5pQ8yFwgSiEDjgHM0ftUcMNHU9GioaIlA4EfvGce8ZRM0jsT8E4OufC JqR0RCa6xqgQlmIpLwR2sIyg1Tt9T21cEV0SXfDtgYMjZRmYjaSwkHecEBiDrfZA5DN/+n 4TLKANT9rPSjlc38k4slAz03QOCMnYsrluhiXpkJEbtglOab8eGJHeM6jXzyqnyUBVG6qA fJpFkyzGMFuyZ9FcWbbXshBk28LGHg0dpM48aX6HM7CmqBJt9RzZoXccFRyaCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmnn5TRkzp5j; Sun, 24 Sep 2023 13:19:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODJv6B079807; Sun, 24 Sep 2023 13:19:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODJv5J079804; Sun, 24 Sep 2023 13:19:57 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:19:57 GMT Message-Id: <202309241319.38ODJv5J079804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9200ca25d9d2 - stable/14 - udl.4: note that "device videomode" is also required List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9200ca25d9d251d720e8b5263e5aa2fb8ba2e68d Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9200ca25d9d251d720e8b5263e5aa2fb8ba2e68d commit 9200ca25d9d251d720e8b5263e5aa2fb8ba2e68d Author: Archimedes Gaviola AuthorDate: 2023-09-09 17:39:17 +0000 Commit: Ed Maste CommitDate: 2023-09-24 13:17:44 +0000 udl.4: note that "device videomode" is also required Reviewed by: emaste (cherry picked from commit 9888a79adad22ba06b5aff17d05abac0029c537a) --- share/man/man4/udl.4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/man/man4/udl.4 b/share/man/man4/udl.4 index fa6e96343a2a..b2cfeba2489c 100644 --- a/share/man/man4/udl.4 +++ b/share/man/man4/udl.4 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 15, 2015 +.Dd September 9, 2023 .Dt UDL 4 .Os .Sh NAME @@ -22,10 +22,11 @@ .Nd DisplayLink DL-120 / DL-160 USB display devices .Sh SYNOPSIS To compile this driver into the kernel, -place the following line in your +place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device udl" +.Cd "device videomode" .Ed .Pp Alternatively, to load the driver as a From nobody Sun Sep 24 13:19:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmnq1CX9z4tyC5; Sun, 24 Sep 2023 13:19:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rtmnq0PQRz4WjK; Sun, 24 Sep 2023 13:19:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKE13mTnrfJ2BQVjxXd736IomTNHDyyoxuz33AVPUf8=; b=eGs15ioojCJNM6On6BrJeqTgo/OVqZqVhI+KwUo8ziU5K/RebXhTyvCpJvAxPc0ouIxSVr W/QksflrmTJ3Xu3qpwmAquy1rpRZc0wnps8kaFMtuLt9d0C4y1Rcydzq/N+kWQuWQ52rRy 1WHJ0145WQuSQnFeYLeLgaqopTFPeDN/cnqKlSLo9RQf873DVe2U5hPg+54UGO6NHiNrKB AzZWfPGJMMsgajOZ9pFkkSnTHG71kEDcS9p4hRzesbtBxF8pI2reWNMwK5L8N+o6VFIGYl jv5RaI0d/tx4AdFA/3LwGPyd6KgiGhku3usvE6judWrGveHPURpJuDNVRyTKqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561599; a=rsa-sha256; cv=none; b=KoyZ2uE75OCQEeDcNavTECl8kD/zYxgCBS23OfpbI/XZuTkBoDggHutnjHGYIg4IbaliwN a9MGLwBNdKV2hsu0yNJGqNyAhF7j4Ycy/+RD6A4qHyTgm3QCP7hRyOzK7QnlsHcHVOYYEW TjGLPUBh4f1YkE7Nb65jh4i3o0+VUL3mcPddoCQjbrbaXPLl9gtCe5c6yjQoOQSrKqmhh3 GDWTprBBdw5w5AaKGa7U9rsJZX3fRhAoomSW4HFZ1DdAXUt2GDMvqwetQ7MGsuwE66QvHf gz3TvFdg+ckDCFWdOot+/mFHtHXqRbWT99D2270Yt83CtsYeXQSJs4eIcyMqfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKE13mTnrfJ2BQVjxXd736IomTNHDyyoxuz33AVPUf8=; b=XPXUWW1CKfmOTySIre1++cH7AFvTdNYSCPyPQjQG40IskP9C0J61YGnsRAMqTW2cG43G9S pc6knpBchoNUhmmpuyxwiXlQyGgXEBWPcBVSghpxwzXWMVMVb5+hAXTo0bFXTnnZtzJt3Q /uwShFStvQQ9Z6qTzeIzRzWXOOL4X9fGmrfmSv2dMJ3HqQRYmKL1csKkrKnEUg+w1a1JaA WCp/6rg3eELuXvr34O9pWOkfyAE0bCZd/wDQG3eKrvPSJJxJfiP1AdfROSrmjCjd4VbDvp jsbNPuNECsK2Y0z5bBv0wf7hdV9M5auTSyr6VZQK6uHCKYHu/3EQNyNCNDiBiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmnp6T3FznsW; Sun, 24 Sep 2023 13:19:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODJwtk079849; Sun, 24 Sep 2023 13:19:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODJwmP079846; Sun, 24 Sep 2023 13:19:58 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:19:58 GMT Message-Id: <202309241319.38ODJwmP079846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9b12f3763f24 - stable/14 - axge: Skip dummy packet headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b12f3763f2463732b4353ebd000ecb34d3f6322 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9b12f3763f2463732b4353ebd000ecb34d3f6322 commit 9b12f3763f2463732b4353ebd000ecb34d3f6322 Author: Damien Broka AuthorDate: 2023-09-13 08:23:47 +0000 Commit: Ed Maste CommitDate: 2023-09-24 13:18:06 +0000 axge: Skip dummy packet headers Newer versions of the AX88179 interweave dummies alongside valid packet headers in bulk IN transfer data. This was probably done for backward compatibility with existing drivers. However current driver records these dummy headers as dropped frames, leading to stats misreporting one Ierr per Ipkt. This skips those dummy headers silently, thereby not generating Ierrs for them. Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/842 (cherry picked from commit 70fbcd451b68b7f6038d8a602cd8d5e1bb890f1d) --- sys/dev/usb/net/if_axge.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/net/if_axge.c b/sys/dev/usb/net/if_axge.c index a3b459a553e0..385a982afd9d 100644 --- a/sys/dev/usb/net/if_axge.c +++ b/sys/dev/usb/net/if_axge.c @@ -959,8 +959,16 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) hdr_off = pkt_end = (rxhdr >> 16) & 0xFFFF; /* + * On older firmware: * <----------------------- actlen ------------------------> * [frame #0]...[frame #N][pkt_hdr #0]...[pkt_hdr #N][rxhdr] + * + * On newer firmware: + * <----------------------- actlen ----------------- + * [frame #0]...[frame #N][pkt_hdr #0][dummy_hdr]... + * --------------------------------> + * ...[pkt_hdr #N][dummy_hdr][rxhdr] + * * Each RX frame would be aligned on 8 bytes boundary. If * RCR_IPE bit is set in AXGE_RCR register, there would be 2 * padding bytes and 6 dummy bytes(as the padding also should @@ -968,6 +976,10 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) * IP header on 32bits boundary. Driver don't set RCR_IPE bit * of AXGE_RCR register, so there should be no padding bytes * which simplifies RX logic a lot. + * + * Further, newer firmware interweaves dummy headers that have + * pktlen == 0 and should be skipped without being seen as + * dropped frames. */ while (pkt_cnt--) { /* verify the header offset */ @@ -978,6 +990,12 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) usbd_copy_out(pc, hdr_off, &pkt_hdr, sizeof(pkt_hdr)); pkt_hdr.status = le32toh(pkt_hdr.status); pktlen = AXGE_RXBYTES(pkt_hdr.status); + hdr_off += sizeof(pkt_hdr); + + /* Skip dummy packet header. */ + if (pktlen == 0) + continue; + if (pos + pktlen > pkt_end) { DPRINTF("Data position reached end\n"); break; @@ -989,7 +1007,6 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) } else axge_rxeof(ue, pc, pos, pktlen, pkt_hdr.status); pos += (pktlen + 7) & ~7; - hdr_off += sizeof(pkt_hdr); } } From nobody Sun Sep 24 13:19:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmnr2QFwz4tyLM; Sun, 24 Sep 2023 13:20: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 4Rtmnr0Z34z4WlK; Sun, 24 Sep 2023 13:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F0kkIa9zIbEP6eCfvq6Oh3uo5oo9AFGY8dcvIOIYFX8=; b=gqWYRr8+JkjdHXSkfiyZMOluJb4MEUi+hwHc2YLJHHhLVXs/UgstUDmfVwkvioOdNbMQP1 VuT1QJFMjrpMWCVIQbD0ywwQDk7fcqa1AlhKqibk1NXE+GV+Vg/Fc+rU8ARrecCXjXAinS oyKG+JgQyM9WJ5Xz1K6wy2AX2n1EGQ1st33ON601KKjY9ajGUMZaLqxZ2eJqmKeIj5Lh6b 2mN0k8q6ZtWNhDuOopyI/x7H0ZxTygjy7eZJq92LY1iC3qCduGfnBOvrAqLQw0DtXVS4Xp OIYFMCxObFma55koWO7MwXEBn5WxIn2vsLOLeJX5yNWCldYTw8YObI/PefU96g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561600; a=rsa-sha256; cv=none; b=boj/M0fANzzjW/7nPXTmGgjnzU9qyLtfp8v45+orqFHP+6vaoqRHaXCjkzeIAMqg+X/3G5 sknZPlojBPosEYOMRHbOH+4VkxozMBohzucF/kz1DGg1/cpFAcneh5rTzmkXaPLFXiF8gR vurusCUvVWFWzo4cxApcnPO5XafjHvnnym7QZnQmzbu615wvfupAu+46Lt3udrWZIsweKU RPRqWRRwp01GX51R2+RzsyFLURUM7ognXkqeG0WY/6SgL07UOxf3NtZRRI9J0Loy38EsVW WRka5WF+J1i1dfgVBryBQpa+yGDHzHB3QdUq9bS2+vRhJB1MQyTVpx6bLNEDvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F0kkIa9zIbEP6eCfvq6Oh3uo5oo9AFGY8dcvIOIYFX8=; b=lrwXbqOEDplj1ROtTSx/7QUHdnPHGpXhKPWw8f44SijzI/TNQKu5/TBTiyfo3I7aQZC0eK tvN3rK8Bx2sYPgg3lmb5UJz5W9ET66xmamZ7zIIEuKROYDyRNcNoZaVFF43YU88thxGCEK 39cBGFQLywCGEKYlJi7pSHe9CfOg4auGp9i6jONbAxhJ9TxKLxTlq6VibP16qJEf63ZsuP YcC6S0x1tgmFL6WouPjhq0R9ISLtS67j+dsSkYJO2bGf+rULCaiYSX8uEB1uOe/dO3C+70 CoGX6SOqGHqkTla8sAQ6mXcJqYa0PZ0XQ7wosAirWJq44dLxSWJk+teOQPNwvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmnq6mynznVn; Sun, 24 Sep 2023 13:19:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODJxtD079908; Sun, 24 Sep 2023 13:19:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODJxd8079905; Sun, 24 Sep 2023 13:19:59 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:19:59 GMT Message-Id: <202309241319.38ODJxd8079905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 0de10f10c474 - stable/14 - Fix typo in RELNOTES (objump -> objdump) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0de10f10c474a722b3a9197e607ca2ba33b3634c Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0de10f10c474a722b3a9197e607ca2ba33b3634c commit 0de10f10c474a722b3a9197e607ca2ba33b3634c Author: Kenta Kubo AuthorDate: 2023-09-17 13:55:16 +0000 Commit: Ed Maste CommitDate: 2023-09-24 13:18:21 +0000 Fix typo in RELNOTES (objump -> objdump) Pull Request: https://github.com/freebsd/freebsd-src/pull/847 (cherry picked from commit 501edb1cc76bcdefa1032ea5f28655b115bb2560) --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index f3d717525929..c5686a4f30fb 100644 --- a/RELNOTES +++ b/RELNOTES @@ -128,7 +128,7 @@ d198b8774d2c: swap. See growfs(7). 86edb11e7491: - llvm-objump is now always installed as objdump. + llvm-objdump is now always installed as objdump. 616f32ea6da7: mta_start_script along with othermta rc.d script has been retired. From nobody Sun Sep 24 13:20:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmns2RT4z4ty9X; Sun, 24 Sep 2023 13:20: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 4Rtmns1lG9z4WyZ; Sun, 24 Sep 2023 13:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eRXB7/Y0CMvgb4ApF8cvA1IamRJZZzAAGzQN0TipAkM=; b=HSWj3eG5puFd9kbG4zeCs5HE3B/VJVSRctl3g0gXxvo37Qg2piiROnETksOKAeLojlYmDR ulkNvf4LUyqEj9U9GBwRjKUf7ZH0Ul3HRRSGhXSmEdQZ68eD8JpFq2m5NQk9+1mteK8yeZ Ljya9u8HogCd3zSsW0XfzQV2s75JyIsiwFicxnoxrBCBbYM+x2q3P45fIwcPgjGMweFtcp a0t0aJOjRuPl/HiB2KavTj6fs4osFcPat0MLnMMPwNV3F8xYs+iLBLcFNuv9fWnPpBTIZz VXUA6BLrqA7OHMJu/vCC2evkMdpDl4kuJikMfLYIYUS4WQ0siCaZTk5HvwiIRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561601; a=rsa-sha256; cv=none; b=hAxno36/NSwBqq08WFaicCLIqoXfY1gzcu2nSGq8Qqdq5gV9ykSLzt60hzIbl+2pH1t7kb QYrTPXxH3WBo7GsEfrEcYCdeOr7x3neHlA8rde36+iAa0KPhQ9jQ/BIS2TCl6oukZQhyDm yo4+wK2Mz139Amqxk5BvyFPIsFwr6LALW5dawvg2g+g9Ov9pJGa7KB81xflXNWvYaRVknE 9CyOZE5Qf6QBGCUWzWVQxIVGKJWUZ18PZ6aUGRNiO8FoPiwsuMz828c2AAyfnrFTfRKPQK sUk4RpIFdhWn1yNtz50NH8amjGnFdT/TgBF7dj8fPGX7D5tjZauPw/uwXcA5KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eRXB7/Y0CMvgb4ApF8cvA1IamRJZZzAAGzQN0TipAkM=; b=Ztk7XdAibEsT2z5W47GBnKEEhXgHfDrEZAAL7EOaaT+FGLmg8mws+pDDsxzNRAunrxp5f9 EZvPzVMNN5fbQe3rpErVO074XrqfHrCnx2NomfHEzwYpbdW6e2VOHEOApeBQR7qltmpG6Q ieQBNLKNjW/dPqoztczjhppZeO7lbkNPhflQb5HgRGfllG+9CCE1IV5K+irpHT1c+pJoaF 23BiSWGQiDNCvVZWhmOr2zARqtptk50o+hWpSSPHri0Jok9Fji3w4Ca8K2is/yD87EB3aY qNw1cz+9r8cP0eyYncxAXyiWiXobIqiRMTZuuJ7imUht0rTq+aqfgOC8wFbf2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmns0TJYzp5k; Sun, 24 Sep 2023 13:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODK0v9081717; Sun, 24 Sep 2023 13:20:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODK0jJ081713; Sun, 24 Sep 2023 13:20:00 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:20:00 GMT Message-Id: <202309241320.38ODK0jJ081713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3024443da584 - stable/14 - dummynet: fix comment typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3024443da5846739488ae51f2a1eabbd069eddbd Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3024443da5846739488ae51f2a1eabbd069eddbd commit 3024443da5846739488ae51f2a1eabbd069eddbd Author: Igor Ostapenko AuthorDate: 2023-09-19 11:18:36 +0000 Commit: Ed Maste CommitDate: 2023-09-24 13:18:53 +0000 dummynet: fix comment typo Signed-off-by: Igor Ostapenko Pull-request: https://github.com/freebsd/freebsd-src/pull/848 (cherry picked from commit 75556db552c993dd4948c8e0ae83cc386c350451) --- sys/netpfil/ipfw/ip_dn_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c index a8957bcb479f..3e6bd0e229b5 100644 --- a/sys/netpfil/ipfw/ip_dn_io.c +++ b/sys/netpfil/ipfw/ip_dn_io.c @@ -865,7 +865,7 @@ tag_mbuf(struct mbuf *m, int dir, struct ip_fw_args *fwa) dt->if_index = fwa->ifp->if_index; dt->if_idxgen = fwa->ifp->if_idxgen; } - /* dt->output tame is updated as we move through */ + /* dt->output_time is updated as we move through */ dt->output_time = V_dn_cfg.curr_time; dt->iphdr_off = (dir & PROTO_LAYER2) ? ETHER_HDR_LEN : 0; return 0; From nobody Sun Sep 24 13:21:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmqn3g57z4tyP4; Sun, 24 Sep 2023 13:21: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 4Rtmqn38h0z4YDS; Sun, 24 Sep 2023 13:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCTB6GFbTgqSFy6oBeseJ89Dn+N7ifDCrCEpp6GUAa4=; b=BM9WMwZdPzmdG0maLpUW8CBM3NnnCMoiHr1bLzpNqh6py2PmGpPkpZ7zziwqnhuphqf/g6 tFBcr6Jl7gd2dgBZzecoMqOWh4JWJf/Pgub3QtXH9c+9nn1+EXTc+Ah+jwq+I6M9zJPRaj jdEbcZpOyq6Ek4iErWPSRB5h4E+ZoRPgNZqTZFUU4n4aH+/Fk94/q9FORuDcx2iTs1pFLu esZTcQOBtEuJuHlAYVgFHqne7kZrq/ADTJEnQQFYwvOjS7nRtD+wG19Td1DdSjTEg/QvHR AfYQV6eNwZ5qV/4nH/At1Nh9nX2iWrNgyrA8/s6+TeUJl8UM/e5dOhOMTHSm1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561701; a=rsa-sha256; cv=none; b=VXwzO1dzTD9ePJRAS/sxCQHnklksp6FbnmgAmCbgtBfBnjdk3Hw+Gh0KfXo6Oqx4s4SDor BQx05c6CuVru91RV5OdQKmnBqCCWh0j9ot7dqEOFCmJ4zwsq/6I88WMjz++rVM1eDf7pY+ om1MjYFZW8H/9bLXDVJX/fhqi8lci9GZLfmhsGGcbRfnBX6S4bMXMjF9F7SH8GdF4iZlo4 YIwLqM+ClKJGIzJL0PrTuZXdktwOUUpvILnw/jA78DiF+jRGrzjqOVWQ00wKYlX8zdtNnh 1ktCCGM2j483JbfO8gqzUPt7f9vz+F1+mUuliQc7ibzzSpNuHqzgUezifCFXBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCTB6GFbTgqSFy6oBeseJ89Dn+N7ifDCrCEpp6GUAa4=; b=H2wDD0L6YS4j8EFDOuSEIPC4ZIP6KjrECX9wFCpitQag3bQNSKHqNn09uHYoYZIviN0B7b b17gistgr/fSvuKLx7MyuswnMHnFPZZySS/Z1CTUL4DL/fQrNxHZPhnYXQvfdKk/DUsfe2 mjpEnU9Sp2rfb3iEly3LZQxjlO1PssvEAo68XILeY3ONgO96Bbc6aqIn3gffpLk07itEH9 HiyJBSH0mNzUpNwXjZfHYBYj9T2PMeN2+PpwMtt/T5ith75FhXWhKLrK1buYKrC0VhYVEE 4vWQzpxbYpoGHFGQIQhjnKaxzCuz6UAZ3bCTSLlJOWXy+VJWb6y7Z60n4zXy/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 4Rtmqn2DKvznSV; Sun, 24 Sep 2023 13:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODLfIJ090509; Sun, 24 Sep 2023 13:21:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODLf43090506; Sun, 24 Sep 2023 13:21:41 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:21:41 GMT Message-Id: <202309241321.38ODLf43090506@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: da8324a9258f - main - nvme: Fix locking protocol violation to fix suspend / resume List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: da8324a9258f1791cd10423103c1746646e33104 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=da8324a9258f1791cd10423103c1746646e33104 commit da8324a9258f1791cd10423103c1746646e33104 Author: Warner Losh AuthorDate: 2023-09-24 12:57:07 +0000 Commit: Warner Losh CommitDate: 2023-09-24 13:17:18 +0000 nvme: Fix locking protocol violation to fix suspend / resume Currently, when we suspend, we need to tear down all the qpairs. We call nvme_admin_qpair_abort_aers with the admin qpair lock held, but the tracker it will call for the pending AER also locks it (recursively) hitting an assert. This routine is called without the qpair lock held when we destroy the device entirely in a number of places. Add an assert to this effect and drop the qpair lock before calling it. nvme_admin_qpair_abort_aers then locks the qpair lock to traverse the list, dropping it around calls to nvme_qpair_complete_tracker, and restarting the list scan after picking it back up. Note: If interrupts are still running, there's a tiny window for these AERs: If one fires just an instant after we manually complete it, then we'll be fine: we set the state of the queue to 'waiting' and we ignore interrupts while 'waiting'. We know we'll destroy all the queue state with these pending interrupts before looking at them again and we know all the TRs will have been completed or rescheduled. So either way we're covered. Also, tidy up the failure case as well: failing a queue is a superset of disabling it, so no need to call disable first. This solves solves some locking issues with recursion since we don't need to recurse.. Set the qpair state of failed queues to RECOVERY_FAILED and stop scheduling the watchdog. Assert we're not failed when we're enabling a qpair, since failure currently is one-way. Make failure a little less verbose. Next, kill the pre/post reset stuff. It's completely bogus since we disable the qparis, we don't need to also hold the lock through the reset: disabling will cause the ISR to return early. This keeps us from recursing on the recovery lock when resuming. We only need the recovery lock to avoid a specific race between the timer and the ISR. Finally, kill NVME_RESET_2X. It'S been a major release since we put it in and nobody has used it as far as I can tell. And it was a motivator for the pre/post uglification. These are all interrelated, so need to be done at the same time. Sponsored by: Netflix Reviewed by: jhb Tested by: jhb (made sure suspend / resume worked) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D41866 --- sys/dev/nvme/nvme_ctrlr.c | 49 +++++-------------------------------------- sys/dev/nvme/nvme_private.h | 1 + sys/dev/nvme/nvme_qpair.c | 51 ++++++++++++++++++++++++++++++++------------- 3 files changed, 42 insertions(+), 59 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index c4a750901743..30a5ee81b2a4 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -217,12 +217,15 @@ nvme_ctrlr_fail(struct nvme_controller *ctrlr) { int i; + /* + * No need to disable queues before failing them. Failing is a superet + * of disabling (though pedantically we'd abort the AERs silently with + * a different error, though when we fail, that hardly matters). + */ ctrlr->is_failed = true; - nvme_admin_qpair_disable(&ctrlr->adminq); nvme_qpair_fail(&ctrlr->adminq); if (ctrlr->ioq != NULL) { for (i = 0; i < ctrlr->num_io_queues; i++) { - nvme_io_qpair_disable(&ctrlr->ioq[i]); nvme_qpair_fail(&ctrlr->ioq[i]); } } @@ -416,34 +419,6 @@ nvme_ctrlr_disable_qpairs(struct nvme_controller *ctrlr) } } -static void -nvme_pre_reset(struct nvme_controller *ctrlr) -{ - /* - * Make sure that all the ISRs are done before proceeding with the reset - * (and also keep any stray interrupts that happen during this process - * from racing this process). For startup, this is a nop, since the - * hardware is in a good state. But for recovery, where we randomly - * reset the hardware, this ensure that we're not racing the ISRs. - */ - mtx_lock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_lock(&ctrlr->ioq[i].recovery); - } -} - -static void -nvme_post_reset(struct nvme_controller *ctrlr) -{ - /* - * Reset complete, unblock ISRs - */ - mtx_unlock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_unlock(&ctrlr->ioq[i].recovery); - } -} - static int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { @@ -1236,9 +1211,7 @@ nvme_ctrlr_reset_task(void *arg, int pending) int status; nvme_ctrlr_devctl_log(ctrlr, "RESET", "resetting controller"); - nvme_pre_reset(ctrlr); status = nvme_ctrlr_hw_reset(ctrlr); - nvme_post_reset(ctrlr); if (status == 0) nvme_ctrlr_start(ctrlr, true); else @@ -1725,19 +1698,8 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (ctrlr->is_failed) return (0); - nvme_pre_reset(ctrlr); if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; -#ifdef NVME_2X_RESET - /* - * Prior to FreeBSD 13.1, FreeBSD's nvme driver reset the hardware twice - * to get it into a known good state. However, the hardware's state is - * good and we don't need to do this for proper functioning. - */ - if (nvme_ctrlr_hw_reset(ctrlr) != 0) - goto fail; -#endif - nvme_post_reset(ctrlr); /* * Now that we've reset the hardware, we can restart the controller. Any @@ -1754,7 +1716,6 @@ fail: * the controller. However, we have to return success for the resume * itself, due to questionable APIs. */ - nvme_post_reset(ctrlr); nvme_printf(ctrlr, "Failed to reset on resume, failing.\n"); nvme_ctrlr_fail(ctrlr); (void)atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index a6239f30f3bf..496bd8229e0a 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -150,6 +150,7 @@ struct nvme_tracker { enum nvme_recovery { RECOVERY_NONE = 0, /* Normal operations */ RECOVERY_WAITING, /* waiting for the reset to complete */ + RECOVERY_FAILED, /* We have failed, no more I/O */ }; struct nvme_qpair { struct nvme_controller *ctrlr; diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 4e37aa0e1020..9806096de81d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -945,22 +945,38 @@ nvme_admin_qpair_abort_aers(struct nvme_qpair *qpair) { struct nvme_tracker *tr; + /* + * nvme_complete_tracker must be called without the qpair lock held. It + * takes the lock to adjust outstanding_tr list, so make sure we don't + * have it yet (since this is a general purpose routine). We take the + * lock to make the list traverse safe, but have to drop the lock to + * complete any AER. We restart the list scan when we do this to make + * this safe. There's interlock with the ISR so we know this tracker + * won't be completed twice. + */ + mtx_assert(&qpair->lock, MA_NOTOWNED); + + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); while (tr != NULL) { if (tr->req->cmd.opc == NVME_OPC_ASYNC_EVENT_REQUEST) { + mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0, ERROR_PRINT_NONE); + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); } else { tr = TAILQ_NEXT(tr, tailq); } } + mtx_unlock(&qpair->lock); } void nvme_admin_qpair_destroy(struct nvme_qpair *qpair) { + mtx_assert(&qpair->lock, MA_NOTOWNED); nvme_admin_qpair_abort_aers(qpair); nvme_qpair_destroy(qpair); @@ -1011,17 +1027,6 @@ nvme_qpair_timeout(void *arg) mtx_assert(&qpair->recovery, MA_OWNED); - /* - * If the controller has failed, give up. We're never going to change - * state from a failed controller: no further transactions are possible. - * We go ahead and let the timeout expire in many cases for simplicity. - */ - if (qpair->ctrlr->is_failed) { - nvme_printf(ctrlr, "Controller failed, giving up\n"); - qpair->timer_armed = false; - return; - } - switch (qpair->recovery_state) { case RECOVERY_NONE: /* @@ -1108,6 +1113,11 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; + case RECOVERY_FAILED: + KASSERT(qpair->ctrlr->is_failed, + ("Recovery state failed w/o failed controller\n")); + idle = true; /* nothing to monitor */ + break; } /* @@ -1297,6 +1307,8 @@ nvme_qpair_enable(struct nvme_qpair *qpair) mtx_assert(&qpair->recovery, MA_OWNED); if (mtx_initialized(&qpair->lock)) mtx_assert(&qpair->lock, MA_OWNED); + KASSERT(qpair->recovery_state != RECOVERY_FAILED, + ("Enabling a failed qpair\n")); qpair->recovery_state = RECOVERY_NONE; } @@ -1421,12 +1433,13 @@ void nvme_admin_qpair_disable(struct nvme_qpair *qpair) { mtx_lock(&qpair->recovery); - mtx_lock(&qpair->lock); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); + mtx_unlock(&qpair->lock); + nvme_admin_qpair_abort_aers(qpair); - mtx_unlock(&qpair->lock); mtx_unlock(&qpair->recovery); } @@ -1451,18 +1464,27 @@ nvme_qpair_fail(struct nvme_qpair *qpair) if (!mtx_initialized(&qpair->lock)) return; + mtx_lock(&qpair->recovery); + qpair->recovery_state = RECOVERY_FAILED; + mtx_unlock(&qpair->recovery); + mtx_lock(&qpair->lock); + if (!STAILQ_EMPTY(&qpair->queued_req)) { + nvme_printf(qpair->ctrlr, "failing queued i/o\n"); + } while (!STAILQ_EMPTY(&qpair->queued_req)) { req = STAILQ_FIRST(&qpair->queued_req); STAILQ_REMOVE_HEAD(&qpair->queued_req, stailq); - nvme_printf(qpair->ctrlr, "failing queued i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_request(qpair, req, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); mtx_lock(&qpair->lock); } + if (!TAILQ_EMPTY(&qpair->outstanding_tr)) { + nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); + } /* Manually abort each outstanding I/O. */ while (!TAILQ_EMPTY(&qpair->outstanding_tr)) { tr = TAILQ_FIRST(&qpair->outstanding_tr); @@ -1470,7 +1492,6 @@ nvme_qpair_fail(struct nvme_qpair *qpair) * Do not remove the tracker. The abort_tracker path will * do that for us. */ - nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); From nobody Sun Sep 24 14:08:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtnsF5Llwz4v1ny; Sun, 24 Sep 2023 14:08: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 4RtnsF4prtz4cDr; Sun, 24 Sep 2023 14:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695564481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1p2MnHP5D7hOAf8+pDlQRzNIudk5UxMqBzOTtaclXEY=; b=mT2lKwFFLC6UmftRw8ZoOLyIJTCvliRkUEGdhTYjZG+iDRaWdRKYRm9xYnU3eACVjyTjKD UtKLZO/rqVsD5wHo7SPjVDBd2j0GXlUNsDtjfUS39RfmRF/YDpb66YOqko6kXa5pXLUkjw bpLvWhCQqbfpZnSzKJYLLG+cu0WicdOeqWJQnJaXQ7FiajXjbKzPwUopHmoaSlVmCx5ufA tXp/oIMAfu7N3gONjmt0JSpGvg46yDw0RCYz3RSsj08nj8MYLa56/rFqkFKoaOTWdN4VGW /uYibIL/OeJUuv5mWdNHFk5usDtmyuBy5UE9diQgbOI9FWB9/Y6e9vBdTqsXQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695564481; a=rsa-sha256; cv=none; b=thFZ3fVxjNCzSUggOCypx0w/x2N0BMDEpGab2ERBmlVi7b6gkOAmquXgUZPJhyI142itRa 7W3fSx6zjM49l43jjyafNKnkX9XTFgG82pJjNrrTcZoPDuozPvdiLpwgdS3FY5vp6Gwnco rUxtmZf2CtrkzaGrQTWvH0cO5tjZrht4tvmHks1xRgF3yLXgQ8ffT6KqGUqGR7M6lEW+mm +nZk4u9zHudzEHrGHM8Y/MEtrBnrdIMWM49F+BlGqol4oI5NEOK98pyxkRgII3smvbujE9 jzthe6AyzMA2eIgTwYEY9iD1abaQ293cuRwFVV8yK0c+gVII8O4e1HtSnFCoBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695564481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1p2MnHP5D7hOAf8+pDlQRzNIudk5UxMqBzOTtaclXEY=; b=fVOhIrxJZphOAWneWyK0R7P7bwvZ5b89a45O2XmDsV6a0oSccPX6sFNme/KGga3DxFo6Tw BbQc+bdpH+HT0xZPTegQi2RWd2tVFMzWgLMQAQAHSuETTHnp/RgOZe5BUlDDUFIkJeVv1Z c6QkHzdU15CKhMavbelvOKFMP7NzwxKQk37uBGZLfjxdo5wdjFojyuoZdWhRZ+u6/oZeYg sa+QU1f5Zi0ll/NTrjkeKYqJGAZfyTl4lfdIMZXAOXFKn5QutTSh70IF8sUr6stfk65SsJ 18SgPb3sO4XydMpxjRWD3xBHLwuIzfRMUNoJSFD0RRiHYrci0z+xEntfmbGveg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtnsF3svvzqNf; Sun, 24 Sep 2023 14:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OE81r2062600; Sun, 24 Sep 2023 14:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OE81XJ062597; Sun, 24 Sep 2023 14:08:01 GMT (envelope-from git) Date: Sun, 24 Sep 2023 14:08:01 GMT Message-Id: <202309241408.38OE81XJ062597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 0674fb66667b - stable/13 - Update WITH_/WITHOUT_SSP descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0674fb66667ba9e03c76dd21a279bb83bedb1a91 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0674fb66667ba9e03c76dd21a279bb83bedb1a91 commit 0674fb66667ba9e03c76dd21a279bb83bedb1a91 Author: Ed Maste AuthorDate: 2023-08-30 20:49:44 +0000 Commit: Ed Maste CommitDate: 2023-09-24 14:07:08 +0000 Update WITH_/WITHOUT_SSP descriptions ProPolice refers to a specific implementation by Hiroaki Etoh and Kunikazu Yoda. The implementation in contemporary Clang and GCC is somewhat different and newer, so use a generic term in the src.conf descriptions. Sponsored by: The FreeBSD Foundation (cherry picked from commit b461276d75488fe50c1503db85d43cbb8c3c3067) --- tools/build/options/WITHOUT_SSP | 2 +- tools/build/options/WITH_SSP | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/options/WITHOUT_SSP b/tools/build/options/WITHOUT_SSP index 9dc19c117995..88162cecf14a 100644 --- a/tools/build/options/WITHOUT_SSP +++ b/tools/build/options/WITHOUT_SSP @@ -1 +1 @@ -Do not build world with propolice stack smashing protection. +Do not build world with stack smashing protection. diff --git a/tools/build/options/WITH_SSP b/tools/build/options/WITH_SSP index 22aba26fd6cc..0088dd133782 100644 --- a/tools/build/options/WITH_SSP +++ b/tools/build/options/WITH_SSP @@ -1 +1 @@ -Build world with propolice stack smashing protection. +Build world with stack smashing protection. From nobody Sun Sep 24 14:08:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtnsG6Pvqz4v20L; Sun, 24 Sep 2023 14:08: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 4RtnsG5x0Cz4cN5; Sun, 24 Sep 2023 14:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695564482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z2cVrVNH2zYFIj7oee3J+71UCGtKevqhsNFz/sCsy7o=; b=l+LdNwfn4229h4mfck2VkmiSbstxG3/7CtYsjlUqHhPVtFPorH/Cq4FcgvgYXPb9mNTcON ijEOtG95hVZohkTEUzN3NJOA6vHeuFrimiz2qQFuudNLxCTpZywWBW4+/XgttIt9my3RYr d7aA77y98xHrDLsnA5LRJV6LnOMaBamb9H0qKxihapXYecSOJbwD/lrRuUQaYRQfqqNQWU dH5mjKS2vObAM0sw8GypJRn+Yr+I7qfuFB+ADpPgdD6eygsw3E2Cb/oPGlv19c+0oNhRue ZWSyqO/EC+dch948oJUWlN94GkbZ3Elu+qfbHekZ9HUE8nTqq9r7NVGCOnDf0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695564482; a=rsa-sha256; cv=none; b=TguwI4s0Vw7fAtwbE9hJP28nHGCs6v0imkkF8imhaVtXFv3HQjdO5qWIZ1BH/T9zFoDUbC zIYaavWxZwoaMNRQewOt9mbeCjuewZhH4nIPvkM73wPZcyRuh3zvUzGI3DAQ1fmt1L9NwC GKTfwbfUMUH4Z4lf9jXdPi6LvrXn8qqzorXXvNTgBl09WftcVFN3h32OMImjYhJ6AW4+BT RMy32dUlOFacouIX+vXW6XP3YBspK1N8ZOQp4hcx45A6Iel/vb+vBJGvhnLctdk/l/T64n mpnZCvLCRNUni5Dub+FiJiBrFlNqNO1OFp/kizDLY8CPgVN8nKhRrjFiYYN8SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695564482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z2cVrVNH2zYFIj7oee3J+71UCGtKevqhsNFz/sCsy7o=; b=UDulfR4zAGCIT7J+D41uiGMaiQsnyVE/Lr6OVDtod0kpLX31WMNHmXFhbOHUgpgesf318N i9y8y+flMpZvsmvSw6PTOdz16JZ75q/v/qRVhR/C9ldWmpmsKy+P5KbGhY2URjKEhS2UTC cI2U/+f8o84U6Rda5cA8K/4bkgyEQpoy7SbsC3TFrE28TW1iNn4ijPfyw0v3NQNHAORgax L+aQcdN+GaWsWUS+WTOxE0E5H986EVRXbOL2Teu1oOJ80CHCPqYxnm3TMGddkzXHtqVcAF NmepzeiP8h0RXFAd1YqpnZCW1h+s9E9l/ZcgNm9+Uausri0co8GUqBgXrvdW5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtnsG4l0QzpwB; Sun, 24 Sep 2023 14:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OE82HI062655; Sun, 24 Sep 2023 14:08:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OE82l2062652; Sun, 24 Sep 2023 14:08:02 GMT (envelope-from git) Date: Sun, 24 Sep 2023 14:08:02 GMT Message-Id: <202309241408.38OE82l2062652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 06bcd6142af1 - stable/13 - src.conf.5: regen after SSP option description update List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 06bcd6142af1c5f220f9e4e0d5029c0df6408d0f Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=06bcd6142af1c5f220f9e4e0d5029c0df6408d0f commit 06bcd6142af1c5f220f9e4e0d5029c0df6408d0f Author: Ed Maste AuthorDate: 2023-09-07 15:57:46 +0000 Commit: Ed Maste CommitDate: 2023-09-24 14:07:08 +0000 src.conf.5: regen after SSP option description update Also pick up missing note about SSP being disabled for MIPS. (cherry picked from commit 5449d0144d612d7b7b3b85ab292d514db4e300c3) --- share/man/man5/src.conf.5 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 37edfc1f0861..9aab6fc459c1 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd July 7, 2023 +.\" $FreeBSD$ +.Dd September 24, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1503,12 +1504,12 @@ When set, it enforces these options: .Va WITHOUT_KERNEL_SYMBOLS .El .It Va WITHOUT_SSP -Do not build world with propolice stack smashing protection. +Do not build world with stack smashing protection. .Pp This is a default setting on mips/mips and mips/mips64. .It Va WITH_SSP -Build world with propolice stack smashing protection. +Build world with stack smashing protection. .Pp This is a default setting on amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. From nobody Sun Sep 24 14:21:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtp8v1pHfz4v2Wv; Sun, 24 Sep 2023 14:21: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 4Rtp8v1M2yz4fGk; Sun, 24 Sep 2023 14:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695565295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2SsD9/cOlLfw9bpVNPjNuz9B7BBnkiyWdIx8Xuds3k0=; b=ak9rKJVBHbuosvFC+zA3PxSvjKfwXpNhyA9KZsw1go9FGl7upAtNkRJJ3GIf+Y2WOP/dk4 ZHI2q35768p8AQ9+u9/MuoYxJo4vGisJaovN5CPv97YcFgeAARPn4tNAi1E91baU2Z2Pss cmbSDPZfzfhbeLuqt7dekIvHNcH4AYiKPFWXaa8RMkwbTKVYpTSbn9/nKu6puKF/q8nKoP a+zOKsfyvu/XZTjV4nVY35Tzw1ML6Ic2dGxVGie4dMocw86jbsVzY+kXa1xLMF24Qitw8Q GMdIp55pAl8gqR4GpWYMR/qM8cNhXCBViI3M7I+d6l1NJECIpHSHkrx7HMuunQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695565295; a=rsa-sha256; cv=none; b=FwKlt9CEZjwsVxVGoeCGsT2dues2Wbd9qL0C8vuci8gqZGcR8dfHWoMSRg+y2h1/Ou/vOK uZ/sINf7XA9v6+yEJXMGTVQ52FPP0nFrVswY/vqUuYprBaDjaIlFy9GReYpBdTjt+/RByB TuQWBcs57z26rpfvmSbeLGpLGA5eze7mhjeQcsQeymfynTRMY4kUrd6rDr3PSzTxaIbX6C DV770ydjpu8aOL6neB0IV/+Nk6K2+cPNfEDULBxyLF/IFxfxCgEOyY6sZKJ2PnwTuj+r5C gPN7Yt67ELOotcjn6dXfmpswk/uxQUIBObNJ7bWnnpKlF1wbR+hbk/9XURi84A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695565295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2SsD9/cOlLfw9bpVNPjNuz9B7BBnkiyWdIx8Xuds3k0=; b=AUpQZcXV/xrGpXN42HP4ExRRTEIwjg1x8YWNLy8fC0QE0gU3z6rArRZ0oAFNPZOnZTRgs9 N2GVcpk0ABRSjVykwx9QqcvDNu5EkT5bL8YMoOxyaAogIAhQIYVfTk5dyxta6mfirEKNO2 R7zEZjVxdw5S9BNYjjgcu2AhQdpgkocFkTJE1KVv704NZtnX3Qh5KxnbdFylSWSAd1DNzb 4aNiJqc/NH7fUbKXTzldyrGzQELjKGWfG4OalJwwOdJtcD8nyHcIfxyRk/OE606OkeL5kV C9tiBso45Rl1xtgtvH6NsQ0uodpRnvpKONQmbzJIc1zo20aaw1xKCKEDRlJigw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtp8v0QjFzqZR; Sun, 24 Sep 2023 14:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OELYid088511; Sun, 24 Sep 2023 14:21:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OELYDZ088508; Sun, 24 Sep 2023 14:21:34 GMT (envelope-from git) Date: Sun, 24 Sep 2023 14:21:34 GMT Message-Id: <202309241421.38OELYDZ088508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 95d4529fb06b - stable/13 - rc.subr: don't require service to be enabled for `status` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 95d4529fb06b6121a87ee06b0ab982fe49e3ce82 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=95d4529fb06b6121a87ee06b0ab982fe49e3ce82 commit 95d4529fb06b6121a87ee06b0ab982fe49e3ce82 Author: Daniel Tameling AuthorDate: 2023-07-01 08:43:40 +0000 Commit: Ed Maste CommitDate: 2023-09-24 14:07:40 +0000 rc.subr: don't require service to be enabled for `status` For a service that sets an rcvar, there is a check whether it has been enabled before the actual command is executed. If the check fails, one gets a message to enable it and the returned exit status is 0. However, this is usually undesirable for the status command, which is a) supposed to check whether the service is running anyway and b) returns a non-zero exit code if that is not the case. Thus, skip the check for the status command. PR: 272282 Reviewed by: emaste (cherry picked from commit ba793728a840041e93e38bcbff4a7233dc63b722) (cherry picked from commit f701d9da1d94891dd2edad607a989cad6eb10313) --- libexec/rc/rc.subr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index d679584768d0..37a614e122a4 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1009,13 +1009,14 @@ run_rc_command() continue fi # if ${rcvar} is set, $1 is not "rcvar", "describe", - # "enable" or "delete", and ${rc_pid} is not set, run: + # "enable", "delete" or "status", and ${rc_pid} is + # not set, run: # checkyesno ${rcvar} # and return if that failed # if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" \ -a "$rc_arg" != "delete" -a "$rc_arg" != "enable" \ - -a "$rc_arg" != "describe" ] || + -a "$rc_arg" != "describe" -a "$rc_arg" != "status" ] || [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then From nobody Sun Sep 24 14:21:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtp8w2VfGz4v2Ly; Sun, 24 Sep 2023 14:21: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 4Rtp8w21Hhz4dpf; Sun, 24 Sep 2023 14:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695565296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hAB/sEz5XmLepf/7j9GvQRB0XqX1Hex1eikVNo/7m6Y=; b=wyfkU79ArDOGOeakUD9Ls2lRwjkgjf3SncluHiYRKL2+dK9gOUULtKx5RmlMG2BYpWWsrq j7FjQYz25erWTjK5OxYtRutLreeUKXufgz/bGTv+H0HbYpXs6HUycaZR7pnk+jD2LbTnIb YJ/8GXwcfhizEJFZP0G+qn5BPHt4vHxqQXsx43Mk5YMgqf2/RLxNnpmwOhlPTvOZkWQPiB bAO5rP+sRaRaqcjX/zrwvjiOZX6ltqm5rKBs1CpEdnMqCug+AWZgfOh423olHk97Z4yPtb eaSccd8E+kUp21BnxMsIrxmQabq55BW+MM1p7Iwtev4HmeOlM/pwKLg3KbyB3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695565296; a=rsa-sha256; cv=none; b=RpwPh4YWx5B8m/p8rM8/gr1PDZXz1WTcazTBUl3zmd4sSr0Zj2oow71irQEKkFN7cgkTa0 eWys/0S81qLxM1ELE4h2AmzewPieiz1shrExL+9/Ve0IxAj+wl5pRsHw4+ZttF37fWzKV6 0CPB5Wi+AsVdpp/GPp+py1cM4SAXy49rybHhQK2f5rMPTns6N3YlMHpW+3rWGMIHWgtc+2 TNcvcL0/L4FGaa8B22vj5YfVdP9V70t2dXXyU3GZFMTwxlP00Z3Ilf5xUCODwfm13gtEtt FQXirwwK0H+q8AtTa567UKx3BU46hdwPXJf7FhkBNcJB9GssWgRZxsg/ug2r1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695565296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hAB/sEz5XmLepf/7j9GvQRB0XqX1Hex1eikVNo/7m6Y=; b=qA20Qj9F6J4A+l+Rp+xzQe7LrSdqEhYBvKK3U6iQ3K7033+JezfGlhrQB0YZOl7zDxVj8l 66HI5VsGRq+2MUXxLidy1Ed+2cNQluv7gr8M5NaY3Y0JAaAuFKm6IsEUoDAG1/98arzRTy DCXINFg5+gpolA/m0Hd+Y9955WLfYUg7qC9xxOCFumeF5fyPHjBrukIyMewFUaNRwsGjRN VhDpprO7UR+vA8TbP+7EPrk3mxYyxYd6AFJCoKevZKwZZHWvtgHv4eZryiBXRyzdquOd2n 1W8aD0TZUfhqbAfMs2P+YJevKuF9Lohj/sfS/A/KPdFjH+h2LGPRKzSoC3sCtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtp8w15grzqmr; Sun, 24 Sep 2023 14:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OELaAZ088563; Sun, 24 Sep 2023 14:21:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OELaJM088560; Sun, 24 Sep 2023 14:21:36 GMT (envelope-from git) Date: Sun, 24 Sep 2023 14:21:36 GMT Message-Id: <202309241421.38OELaJM088560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6ac81f5bb60a - stable/13 - Add deprecation notices to publickey(5) tools List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ac81f5bb60a5f1e026305831214be3b370e2c6e Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6ac81f5bb60a5f1e026305831214be3b370e2c6e commit 6ac81f5bb60a5f1e026305831214be3b370e2c6e Author: Ed Maste AuthorDate: 2023-09-20 11:31:14 +0000 Commit: Ed Maste CommitDate: 2023-09-24 14:07:40 +0000 Add deprecation notices to publickey(5) tools Reviewed by: imp, manu MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40144 (cherry picked from commit d5ef73a71f0e2fbc4dc9b907a6e59a15599c50b3) --- usr.bin/chkey/chkey.1 | 4 ++++ usr.bin/keylogin/keylogin.1 | 4 ++++ usr.bin/keylogout/keylogout.1 | 4 ++++ usr.bin/newkey/newkey.8 | 4 ++++ usr.sbin/keyserv/keyserv.8 | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/usr.bin/chkey/chkey.1 b/usr.bin/chkey/chkey.1 index 0721c07e8c14..508227ba9601 100644 --- a/usr.bin/chkey/chkey.1 +++ b/usr.bin/chkey/chkey.1 @@ -9,6 +9,10 @@ .Nd change your encryption key .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/keylogin/keylogin.1 b/usr.bin/keylogin/keylogin.1 index a8a429e6c786..32a3e8e1b5b4 100644 --- a/usr.bin/keylogin/keylogin.1 +++ b/usr.bin/keylogin/keylogin.1 @@ -9,6 +9,10 @@ .Nd decrypt and store secret key .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/keylogout/keylogout.1 b/usr.bin/keylogout/keylogout.1 index 54cd5a575c51..1480a83aece5 100644 --- a/usr.bin/keylogout/keylogout.1 +++ b/usr.bin/keylogout/keylogout.1 @@ -8,6 +8,10 @@ .Sh SYNOPSIS .Nm .Op Fl f +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/newkey/newkey.8 b/usr.bin/newkey/newkey.8 index 966692b5968c..51dca6688bd0 100644 --- a/usr.bin/newkey/newkey.8 +++ b/usr.bin/newkey/newkey.8 @@ -10,6 +10,10 @@ .Fl h Ar hostname .Nm .Fl u Ar username +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/keyserv/keyserv.8 b/usr.sbin/keyserv/keyserv.8 index af8acd2fd642..17007c7d8f40 100644 --- a/usr.sbin/keyserv/keyserv.8 +++ b/usr.sbin/keyserv/keyserv.8 @@ -16,6 +16,10 @@ .Op Fl n .Op Fl p Ar path .Op Fl v +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm From nobody Sun Sep 24 14:21:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtp8x5VGGz4v2ZC; Sun, 24 Sep 2023 14:21: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 4Rtp8x3KmJz4f1c; Sun, 24 Sep 2023 14:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695565297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=olC2Nc7SARcxNO3BqkQ0HnKEWg/YrIHaymuB/5RlvCs=; b=uhfQyod7/OxdZ45ZMLPaHeudMZADm9oP3dSeSt8x4jfeZgb7bSNmMqmf6f7/SWQAmRuCbV zUZnMZDqzyG4bVT5F08fOtVqlP80sWUej6SJbS5m46Yl6Ky31O0vBAVGbxXbDSMdHKZPk6 64rW7it0/IubATJ3v/G6qTz11kIw3DlBGsZq1bU9D7hF4ckuKO5Rq7RdDxp9mOVaK5HIEX +uZpRzi8SpL3g2F/Rqt527Rzp1pE4x9TG/eykV2iCJWjmykdK1DaUxveTW07kgRvce9g8N YSwg5dW/hTQ6KAfXf7VBp4lJDCuT4GDpWxe6no+7kjCU/vx4/Uc1hMPkaVS1ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695565297; a=rsa-sha256; cv=none; b=MGSl9MRKA5jhiTvuYZzQAtTqBlWEBhZ/JFIYRkYMO9Ee9VkT09dYy22a4aO+CNidrQfVjj kXNiRtS9b2hoKj37YssmQrqU//a8FhE3mTEkURI3mKQmvcw/ZDg/J07GXcmLrZsl1u44Jq zuJuqH14NwQKhE+J8HWLBrFbjQvMYvJepm3SPQrGWzOR/QA8xEXeZa8C5LSHXpVfJnyuve SkakXB8+iUW75vOhvN9osN7X1GCbsUUgmZ01hIg0viI+0eibK/tPsqDPqJkabIV/P/PE5V uyeSKxMMlbKL/ZLO04dOnx8Ap/kO9u446WFo5hJiEo7IyyNBKBG2IwBu3s5a4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695565297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=olC2Nc7SARcxNO3BqkQ0HnKEWg/YrIHaymuB/5RlvCs=; b=lPwGQUZah9rgWLBg+SUb6fWExYg1sd/yMrMTuCTfbP5k4CFmaFV53Y3iKQ90FZ8nucM+Gl qhfWykjMoBS8XrdhhVsbFACXfE+GCyUcGQJYIzBpWo1W+lERSx/T0hGPTaYWAdehwwX8pL H1h/kOYcs9/M/6Zv2cq81CLBiBh3eugA+hr5Vc4dvCIduY7/kzNtPM7GLf0DfEI8/DNTeV r+85Uez48qrJpYkkk8skRZDkqHSpeh1z7keNNzhmoc3H2OArY+SJiG/4y9wPrFPgF0MvDn KF+tFv+cnpHmE42hetm03cJn28rli6YVhLuJjFVCaKXHcp6yNEgj+YalE2hEjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtp8x2MSrzq9J; Sun, 24 Sep 2023 14:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OELbpm088626; Sun, 24 Sep 2023 14:21:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OELbI7088623; Sun, 24 Sep 2023 14:21:37 GMT (envelope-from git) Date: Sun, 24 Sep 2023 14:21:37 GMT Message-Id: <202309241421.38OELbI7088623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 4db191160107 - stable/13 - udl.4: note that "device videomode" is also required List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4db19116010707158f2ff5c74cf73a0a5378f5df Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4db19116010707158f2ff5c74cf73a0a5378f5df commit 4db19116010707158f2ff5c74cf73a0a5378f5df Author: Archimedes Gaviola AuthorDate: 2023-09-09 17:39:17 +0000 Commit: Ed Maste CommitDate: 2023-09-24 14:07:40 +0000 udl.4: note that "device videomode" is also required Reviewed by: emaste (cherry picked from commit 9888a79adad22ba06b5aff17d05abac0029c537a) --- share/man/man4/udl.4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/man/man4/udl.4 b/share/man/man4/udl.4 index fa6e96343a2a..b2cfeba2489c 100644 --- a/share/man/man4/udl.4 +++ b/share/man/man4/udl.4 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 15, 2015 +.Dd September 9, 2023 .Dt UDL 4 .Os .Sh NAME @@ -22,10 +22,11 @@ .Nd DisplayLink DL-120 / DL-160 USB display devices .Sh SYNOPSIS To compile this driver into the kernel, -place the following line in your +place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device udl" +.Cd "device videomode" .Ed .Pp Alternatively, to load the driver as a From nobody Sun Sep 24 15:49:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtr6n3LRZz4v7Kc; Sun, 24 Sep 2023 15: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 4Rtr6n2rKXz3L3N; Sun, 24 Sep 2023 15: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=1695570593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aGmKqAqDyn+NaQzJ7cRxudt84ggpvPY6kd0yxZyP2OA=; b=yLAcrywXMxkcN0VIAa5KSHgAsewsquOcahAQQIbwSsay39Pts0UDfwuEyCztUItdez/5mL VpRTEXbuQ0URd2RQj+Zt/poOb0sGqeWfMnVLxF2QH/eIGt98MaGxqK3/n/VEyrgTS8J6xJ yH47XoVqziZwPL35r6TaIJ0rAnlEfGjR6uCbY06Li1zv+VyT4XEu1WqZW2AvxP9oQRA11R ipRq/0n8cir+2vSBuPtDmJ3pspDaZFWuM9PA7oIl5EVWdEAjgseOFejAu2lvbayIE1t+N7 F+86P912O66onj6qD2dYPF2/lSxGGy6/wLn6e0+8w8iMUrN5/TUIfn/hTOSyXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695570593; a=rsa-sha256; cv=none; b=sAF6k2WGv5opJYOrGFLtFmuc+Mi2jEK1qIVWDhlhL6EqBrj45q8orfooyRZXFkzPsSah/q ImrJj5qutLiGrrcZ+EzcCNuYVPOUKxo8FJx/5NiZ03U7KvNimUIhnuKHDEg183pKAU8eey t3aB+bQz6WmxULSL2z74+9q0Mx+8wMbkGCSKtv0VJUIt9LNpEd1q3sdU/YOq4yz0bdP3Gk NMFB39j2Qlszequzwkv/0+uptEkftGJfOO6oO5wlUG6d+ImN3sRdHYhtWp/uG+PR196uTI PdngB+XErmf1R06WjuQB6RcIzAczX+ZiIv6zexe1lD7TlCavaZ+f1fRerYCq/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695570593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aGmKqAqDyn+NaQzJ7cRxudt84ggpvPY6kd0yxZyP2OA=; b=smjUwt9DYP4CmQs4CAj9n9T0bB/V1cXcPncK24D6qGF78Hruv36cgDiAmDdRjtNAuB6Wdu dQ27lIepgzHMMQz39/Ci0tKriTdQd2wjgPZNtVGp7x7cYW62XSD/rgKTq7n0xbxdsV50fw Uc4W1cJp+0lAi19Jqh0zgTAwpRNt2K71xJ3Xiyzq3V4igE/CSItseaOJW3Myvcnn1Q0P8c ymyb/cYFrBrMiFVVHmpgtSqf5wNpbcj3CmHr5axtQkaPZnhk3lUgfqHhZNBAv9vSBSzsDd UwKCoWZH8tuP0U6JszqrJlj2k1bt+Ui/rLCAkoMQSCuu+wj07voWAA132BagLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtr6n1tffzsfG; Sun, 24 Sep 2023 15:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OFnrRH028658; Sun, 24 Sep 2023 15:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OFnr1R028655; Sun, 24 Sep 2023 15:49:53 GMT (envelope-from git) Date: Sun, 24 Sep 2023 15:49:53 GMT Message-Id: <202309241549.38OFnr1R028655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: db9863a7975d - stable/13 - rescue: include ping iff at least one of INET & INET6 is enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: db9863a7975ddc22609c07e7273790c852efd8b6 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=db9863a7975ddc22609c07e7273790c852efd8b6 commit db9863a7975ddc22609c07e7273790c852efd8b6 Author: Ed Maste AuthorDate: 2021-12-31 01:11:31 +0000 Commit: Ed Maste CommitDate: 2023-09-24 15:48:33 +0000 rescue: include ping iff at least one of INET & INET6 is enabled Ping does not build (and serves no purpose) if neither is enabled (i.e., building WITHOUT_INET and WITHOUT_INET6). This is equvalent to a4ef9e58bc0c but for rescue/. PR: 260082 Fixes: a4ef9e58bc0c ("sbin: build ping if at least one of...") Sponsored by: The FreeBSD Foundation (cherry picked from commit daf481f3d508e7497b456e8df7db17c90b623ee0) --- rescue/rescue/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index fc5e54adacf0..92411336b83f 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -105,7 +105,7 @@ CRUNCH_PROGS_sbin= \ md5 mdconfig mdmfs mknod mount mount_cd9660 \ mount_msdosfs mount_nfs mount_nullfs \ mount_udf mount_unionfs newfs \ - newfs_msdos nos-tun ping reboot \ + newfs_msdos nos-tun reboot \ restore rcorder route savecore \ shutdown spppcontrol swapon sysctl tunefs umount @@ -113,6 +113,10 @@ CRUNCH_PROGS_sbin= \ CRUNCH_PROGS_sbin+= ccdconfig .endif +.if ${MK_INET} != "no" || ${MK_INET6} != "no" +CRUNCH_PROGS_sbin+= ping +.endif + .if ${MK_INET6_SUPPORT} != "no" CRUNCH_ALIAS_ping= ping6 CRUNCH_PROGS_sbin+= rtsol From nobody Sun Sep 24 15:49:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtr6p4r0Kz4v7SG; Sun, 24 Sep 2023 15: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 4Rtr6p3pGFz3KsX; Sun, 24 Sep 2023 15:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695570594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h+JEAyoCCKNlpeOjB9CVDL41N3YgFEVjX+7Ufdw0Y5o=; b=Oc5HputFS+8DFeS10unPwBkGuIsfbmIRMq6CsDI6POgSl/lsXx9l4C+prdBF4BQf/r35C8 uTNlMyeaYg7MgkS4p9aYABa7kdZ93Q8rTk+rCs91JfY0GtOQ2dxOU60RQDG6kJH5Cicjme P3ITsmeYEuLXgtt8dF5zR72lmfA64wvgpFaROd4xqAgwKu9oiBIuwaSPUJLEpSPemmgeZ8 16K3N5eQVnFxh17FkveveDmGyQL09sFuzZdiAsFcK1T7j2wLVscTLEfNqadyX9B42KUjUm g9R+2xsdOTGCILvDiAZx8vRUHilAjZs0X+JvE7bEy6sbDH4REpAk9vqvvNkM+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695570594; a=rsa-sha256; cv=none; b=SF1AgkUuyGj/7ectbOOfVKiJhi29AcCjON40WsKUbRVLJoSIB+xKmetpLX65TM6c41zzBe +3cYVEZ4Gltf44vaT/CBPEP6DQQUSHAMMCUM5m4RvphNzJYlrS1o1wKfUO2WAfy0Wddswm cziP0qA1J6NDjCTq6oVZzwIhDGhamW/FLWTzF20tDvak1/g7JlyugBVPoeFyFt9a8hMQzW aXjaZ5ptEQkTCxfvDWLp51Hhi9aWjKEsRefAVzWAhedchDqG2oKxvIrloo1SF/V1XxfKkc 4AaVG2IZtQs9rXLcd8p4khPYtbVSHYJGl0L6AB5hpL5HSmZad4DAUeZ6TV41/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695570594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h+JEAyoCCKNlpeOjB9CVDL41N3YgFEVjX+7Ufdw0Y5o=; b=IJICeWkXdWaMCZzj+yS5ZJn0kCrGKUJfw8cByvPbG3kWZOykOQTNLtfXHacTHrINUxCh2E okcLd7o3C6H3Qo1DDQLg1uo3Z4cwWNsR/gA76pQgBbphxlu/H4oe6HALUhSsfRlxw4fVAf fmTj5OIcAO/aZbNh9IDUZXFrMzacH3FIGVwnR7sWqkBP+ZZ9jarR5q915hYScauVTjabF1 0ngSoA+UKbkWM1DzpRJ110qEOWNHRfLi6R05ecGjH+fIEcWFbZ8/TwdtH9aWxkTBMbw9PH vaYlzQwBbKZeoTU1dZ6ZJiS5JN2KcgB78/tP8NOsKlSWaV2bhAbp9EJhiu6BQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtr6p2tHRzsmg; Sun, 24 Sep 2023 15:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OFnsxq028710; Sun, 24 Sep 2023 15:49:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OFnsFU028707; Sun, 24 Sep 2023 15:49:54 GMT (envelope-from git) Date: Sun, 24 Sep 2023 15:49:54 GMT Message-Id: <202309241549.38OFnsFU028707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 0e6bf38b578b - stable/13 - memcpy.3: remove BUGS section allowing overlapping strings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0e6bf38b578b7b0a5bef0d8dbfb1fe6b1d9868f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0e6bf38b578b7b0a5bef0d8dbfb1fe6b1d9868f9 commit 0e6bf38b578b7b0a5bef0d8dbfb1fe6b1d9868f9 Author: Ed Maste AuthorDate: 2021-08-24 13:20:18 +0000 Commit: Ed Maste CommitDate: 2023-09-24 15:48:33 +0000 memcpy.3: remove BUGS section allowing overlapping strings The removed text claimed that memcpy is implemented using bcopy and thus strings may overlap. Use of bcopy is an implementation detail that is no longer true, even if the implementation (on some archs) does allow overlap. In any case behaviour is undefined per the C standard if memcpy is called with overlapping objects, and this man page already claimed that src and dst may not overlap. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31192 (cherry picked from commit 37296464defda0aa769c39ab554deb4875aef000) --- lib/libc/string/memcpy.3 | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3 index c1aa2d4dd8f5..5ce43d5dfe75 100644 --- a/lib/libc/string/memcpy.3 +++ b/lib/libc/string/memcpy.3 @@ -85,19 +85,3 @@ The function conforms to .St -isoC . -.Sh BUGS -In this implementation -.Fn memcpy -and -.Fn mempcpy -are implemented using -.Xr bcopy 3 , -and therefore the strings may overlap. -On other systems, copying overlapping strings may produce surprises. -Programs intended to be portable should use -.Xr memmove 3 -when -.Fa src -and -.Fa dst -may overlap. From nobody Sun Sep 24 15:49:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtr6q69fpz4v7Gx; Sun, 24 Sep 2023 15:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rtr6q4FCcz3LBr; Sun, 24 Sep 2023 15:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695570595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kd7i4veUjMgV72EChwRkD8pgtHNCbPnvNFTBoYhRLhA=; b=KJQAalZssttrktVCWVxImDuxERYuXQHD9sOYKSZqwv3X62NzyNqtluhl2FwTlW74Cd5qCQ AZldHvhZOTKxCjmmdYHnr6fOJ0xsNtl5FsExm+Q2Ay0hyvz7dBiYw9oTR7rSDlWHo3TnVQ a//Qhy6qur/c+3YZxNzEEpLxgFqu4dE4mtrE6GHZ118UK2Q5j50L6X9Vcyzu979IAMc4L6 tgBWM3xtEh/CDbbyPSZd1TPemDMYlZ942o2lmgaIzqlICWAoPCOImrQTrXuKqTb8QG5Knt mXWw5VubInTF5i+2maq+TIWLPRSmAk1G7GCwPY4Btw4iVa5eBTZ3O3q5IYUxHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695570595; a=rsa-sha256; cv=none; b=cOELS9HzGfi4dutonxPl0sK5MvtYjBhY6OsT58GCNo6NA/KJdGa8CD6ws2Qn1lS5mr1P/v 22rou60KpdtnuRb+N1CnyIhiJUy9n4uwAOamsAIv2Syr3uAUjGRJibJGXSufxncedbRQ4S XbdPXDn1uZ8II9r80N4rO2tQcagYL6oIcu+yo3B0CHVWnTKiP50utEJRfklr75c6Weg1Tf o46yRF01bY0S+8KQGNeMMGNcgLIjUwhcLxl8BiuoSqu/dTqbZOkloV9sE5rmIRQ69S5lAy 2VvdFtyynWCsPA9hFar3zvZALrrL/wCJtcnjhM/Gs+UdWo5EuRoilPCOi9sR6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695570595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kd7i4veUjMgV72EChwRkD8pgtHNCbPnvNFTBoYhRLhA=; b=tU8H08NQDjGFFtDm82dWC6iybdLSDTR0nvVRyL1GFxHpZ9pI1M1XPKlJYqvpq/x3/wBLTk mCVAHmy7T/KhJZFZNDSfE/GDzQbnbRQXTfnK263OJ7tOlKuo6E4gG3w044yOfPRgXT5+OP th8p8ZZpao0IIfsXAqilb7G+4Vo/FOv+iQ0Bun/xyojBfKL49XgSd0g78mJHPoMHqcM5VX V1GdXch5VrVlwZXM9lKKzq52/heb4qkDdyA3LYXTIrHjVFYIn80QXzx/Wt3N6poYetW9bZ oaYLUROf/we1XiyI/AshrPQr5NMe6FL+b3pw9KXffyp+k2QOplROC8qvjeLgpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtr6q3GVvzsd4; Sun, 24 Sep 2023 15:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OFntZQ028756; Sun, 24 Sep 2023 15:49:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OFntZc028753; Sun, 24 Sep 2023 15:49:55 GMT (envelope-from git) Date: Sun, 24 Sep 2023 15:49:55 GMT Message-Id: <202309241549.38OFntZc028753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1b4d7a2ee761 - stable/13 - vt: clarify comments on kbd add/release List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1b4d7a2ee76121cada89d6f17fab0feed42c3bff Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1b4d7a2ee76121cada89d6f17fab0feed42c3bff commit 1b4d7a2ee76121cada89d6f17fab0feed42c3bff Author: Ed Maste AuthorDate: 2022-02-24 15:38:16 +0000 Commit: Ed Maste CommitDate: 2023-09-24 15:48:34 +0000 vt: clarify comments on kbd add/release PR: 247498 (cherry picked from commit a2774a9264eb11b26fc6be4127a8c0da1ead297d) --- sys/dev/vt/vt_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index c8e9865be32f..b27628d17732 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -2410,8 +2410,8 @@ skip_thunk: case KDGKBTYPE: case KDGETREPEAT: /* get keyboard repeat & delay rates */ case KDSETREPEAT: /* set keyboard repeat & delay rates (new) */ - case KBADDKBD: /* add/remove keyboard to/from mux */ - case KBRELKBD: { + case KBADDKBD: /* add keyboard to mux */ + case KBRELKBD: { /* release keyboard from mux */ error = 0; mtx_lock(&Giant); From nobody Sun Sep 24 15:49:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtr6r5kMBz4v7Py; Sun, 24 Sep 2023 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rtr6r566Mz3L90; Sun, 24 Sep 2023 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695570596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4w0Z3jXsAfU5IpcKO+9FriD/oP7Gxy/n1tLGEEeD7Lg=; b=t0mDV2YFR3FqwtajtuDtUPK+053PxaCxFyijJ7oGs3KPtwzD1bSdvZLBFaDk1W9m5jQf18 ha/xg4i3TQ9cAUEsER0e0vv8DvAlbxRhLs++kG7tTzgKeh9RzFSx+f3h371zrzde9OUp8q tabcV4Og3YyL0UDoDRppAXSDWvD4rOgEEasMWRAuEf4Vkv0JTSspibwr4hoJtrfszunXWB FjjoNJZajrUtO73HmYVVpS+Fk4z0BjpKZybx8Eiu3k82xQSEivBv6rgQ+FrQCgIMPdUdoX UwOwBMuBxhtRMqetPAZRUZzdQcVO6MEX+LNXUEXA/7jbn0yKBMHShn4VNThB6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695570596; a=rsa-sha256; cv=none; b=yrrftrsg/KVYEAGp7FKQ/e2UDhZvPjmzXzAbhDmadALjEOrweaLZgCKSO7U9WRLbSS+ByC RblFu+7RDcoD0gOgL6ex5PD2x3QtZWMbGY56PIplpkH2uYzbojL6t4zawJziHFt21gJPlL 6J9LsSrlk9DvZ7ntXT0GKzmv7mBj2h2ipliqqlJ5hkHcj2hT9WPIB2Lm6TQ8dVGuaT4647 x+gjAJgWVV2Yp2cWzurNf9LGjJ3PpGt+ofteS4sO6zw4SGfOP6pw2gcg0NhamfQwKl3cQh vsBXz8ebmP0aF0IqIGmSeERtqDJvC3wD1G9C0tQlP6W55U+J4DoawIq59DbwVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695570596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4w0Z3jXsAfU5IpcKO+9FriD/oP7Gxy/n1tLGEEeD7Lg=; b=l8pSt8hP5AtrGf8FFeyRt4Z5TdeaT8GJzXRMU2VQFA5JZywbUpBMoDS4Y4xNwKgIBa0oKZ uEjno10dqiFHF6+YMYd1tJgmxhXwvy+OWS3OdZXDYrFt+RmdyK11Yhd8ML5zvOcTfzCd9S ypOSKuRQr0sgRKiQcN/abjoz9gDjK2I+KG1Tx62bqUU5wK2G0LCksNdLdAtrvzgz5EdEsh 1frXAvfJE5OumFHyRGGnZZ4csQ6L3f4K5OJKOxDZCN32cvmsqgiqiREPa8MBXKTSfABdIe U40AkabjH9GcVKmYZ08TJBNei+bsbds8yVeV3S8QgXVpGPbyJhTRonL3eC94sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtr6r49hHzsd5; Sun, 24 Sep 2023 15:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OFnu7W028796; Sun, 24 Sep 2023 15:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OFnuce028793; Sun, 24 Sep 2023 15:49:56 GMT (envelope-from git) Date: Sun, 24 Sep 2023 15:49:56 GMT Message-Id: <202309241549.38OFnuce028793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 7af7a0d1b14e - stable/13 - rc.d/hostid: remove useless cat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7af7a0d1b14e669277f704eac0b8d3f82d327a9b Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7af7a0d1b14e669277f704eac0b8d3f82d327a9b commit 7af7a0d1b14e669277f704eac0b8d3f82d327a9b Author: наб AuthorDate: 2022-05-30 23:18:12 +0000 Commit: Ed Maste CommitDate: 2023-09-24 15:48:34 +0000 rc.d/hostid: remove useless cat We've already read it and validated it ‒ re-reading is wasteful PR: 264376 (cherry picked from commit 11bd40d04af59daa7ae7feea0518081a35f07053) --- libexec/rc/rc.d/hostid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/hostid b/libexec/rc/rc.d/hostid index b28e0fc9240e..1d6337e1e28c 100755 --- a/libexec/rc/rc.d/hostid +++ b/libexec/rc/rc.d/hostid @@ -137,7 +137,7 @@ hostid_start() if [ -r ${hostid_file} ]; then read saved_hostid < ${hostid_file} if valid_hostid ${saved_hostid}; then - hostid_set `cat ${hostid_file}` + hostid_set ${saved_hostid} exit 0 fi fi From nobody Sun Sep 24 16:19:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtrmq0fBGz4v8th; Sun, 24 Sep 2023 16:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rtrmp73t0z3PT8; Sun, 24 Sep 2023 16:19:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3/ERNWDo22SLkkW/3nm50MLGS81d5Uvkjuej4rjnCmY=; b=Iyuu0KlCEeMe87EIQK4+9pyqFZGIcj4kaP4qmDQX0YIoPaF6na7TI+32ZUZJlnG/33GG2/ o1fA90b0K42SVFUvHwwK45ElT+Wj2q7lqfKU0HNBlYWRY4KaRuFNygFWi8br2Jb9UI5ajT Lb1XdnOzVUoNfg1pi6rKaHiMGPuOtGrexWbMT4Ms6eIlvJc5/W4h/RamLjd5/TZG9XzZZN 5L1FpcmB8hLbgcLMpTHWFZ55VmEmuF6OivZ9mzP7Eu38ZEnI4Mc8wkc7wzZkh711KxLhUe eecVynCdK5CkHqUD5/R+xv19Xtw76tqY5YsNDD3iUHhaF/QBHTNJwyXyNqMhBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695572363; a=rsa-sha256; cv=none; b=tdEv4GZkSy7MpMVZx+MQlC9bRAI5BpsYjQjKFDSUlisq4p9AkdOSZrYDXmwHpdI9/41H7l w0NmU1ea4qfKxJE0rqzAWECF1aZu+QeZL74g2E74GprpampshfF03PLnr8x7Qvrc2jOI4T Z1MxnC42oAuiuJhea/vi4zACLEgSZmmkE8VbeMnEXDF3mAh+xdbav0aNh4Bjn+F6nUfj+7 1v5OibNATjoHv2rwqgFNoPH0qE+iTiKjspTErBo3SCvVEa0uhr0adPcGBlx4z9BdjtF+UG 63jcYFGUICbP3ZHa/1s04HhgppfzaZfriwd7imGlQQiZVhW/9BC5TFce+u1LXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3/ERNWDo22SLkkW/3nm50MLGS81d5Uvkjuej4rjnCmY=; b=dRWkhMuX6zRvc+/JXkTnkB7wUNwWKahTiGdpnvWwU99hMa4LgbdYtR8HXZ84C9CmZa8fll KPArM83wMnKWBz/CMSQ1zVvCPsW5ICOhBWi8kPqwEm/ezDjObjnVqfMfcKd7ErUo4yJy1M Nmv+tlMuR+6js/wHYxwHdByoNC4MlzZ5wGSI5eb966yHkcI1q9oT5nkhy3xem8FA6zDUo5 MKdj/XF8H4y2TKPY4UYqD5G8N36TR2pwjo2ksOL17PXkU3xPnNJnSpIVR7cwnzzW8SiJvu P9LXIQ9jSELOpQA0DEFMsyC5VeLIn2ubk3j4oYPckTeuI7XNk0yBlCEuk08iZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtrmp67JNztZy; Sun, 24 Sep 2023 16:19:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OGJMac079298; Sun, 24 Sep 2023 16:19:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OGJMs6079295; Sun, 24 Sep 2023 16:19:22 GMT (envelope-from git) Date: Sun, 24 Sep 2023 16:19:22 GMT Message-Id: <202309241619.38OGJMs6079295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: cd8cd03403cc - releng/14.0 - OpenSSL: Fix handling of the "0:" label in arm-xlate.pl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: cd8cd03403cc74f4e55dbc9f55ff0271a5b0a2d0 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cd8cd03403cc74f4e55dbc9f55ff0271a5b0a2d0 commit cd8cd03403cc74f4e55dbc9f55ff0271a5b0a2d0 Author: Tom Cosgrove AuthorDate: 2023-08-29 21:38:11 +0000 Commit: Ed Maste CommitDate: 2023-09-24 16:18:09 +0000 OpenSSL: Fix handling of the "0:" label in arm-xlate.pl When $label == "0", $label is not truthy, so `if ($label)` thinks there isn't a label. Correct this by looking at the result of the s/// command. Verified that there are no changes in the .S files created during a normal build, and that the "0:" labels appear in the translation given in the error report (and they are the only difference in the before and after output). Obtained from: OpenSSL commit 9607f5ccf285ac9988a86f95c5ad9f92b556a843 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41587 (cherry picked from commit eba6abafc1988dc8753b08822abff333d4810e75) (cherry picked from commit e99406a2bb3234e2a05eef5e63be3054ffac3371) Approved by: re (gjb) --- crypto/openssl/crypto/perlasm/arm-xlate.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/openssl/crypto/perlasm/arm-xlate.pl b/crypto/openssl/crypto/perlasm/arm-xlate.pl index a90885905c0f..57b75c4e5dad 100755 --- a/crypto/openssl/crypto/perlasm/arm-xlate.pl +++ b/crypto/openssl/crypto/perlasm/arm-xlate.pl @@ -159,9 +159,8 @@ while(my $line=<>) { } { - $line =~ s|(^[\.\w]+)\:\s*||; - my $label = $1; - if ($label) { + if ($line =~ s|(^[\.\w]+)\:\s*||) { + my $label = $1; printf "%s:",($GLOBALS{$label} or $label); } } From nobody Sun Sep 24 16:19:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtrmr18pbz4v97D; Sun, 24 Sep 2023 16:19: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 4Rtrmr0gz8z3PTQ; Sun, 24 Sep 2023 16:19:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dd173VF0RNeYQP2IK9+l8QSmuDFZTWRwFHX9+k/FZn8=; b=MtxxgyknC1xkM2eNtEw1LYpP2YeXxQkbQMSM5iDZ/CXRofgTxrnfQAygWDjkxwZYLVFy7R DN5l6URlAwXF5sgLXxXfLnQcfW7laLJ6OOcKV9MGb9QCIUSfwehCa+EfDBShjQyK+hcKtd ewXKg0N8Ix3lS1FlfRqtJLVbVrs08MDjY4fBx79TYnRaHdfR4/osaleLfMmiOZFf3YCyue tXG3qxqNaYpNeXNX8OEPxwN0fVBIwwRF0QBHyDLvg3HYF+qUYkK7D4o7AysfRQxR5P6fzb CunBh1otbrdVktjsghDuCeXJcaZgZWb47mi3BMhSlbfiQ8Vut3XlRkuMfGwLzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695572364; a=rsa-sha256; cv=none; b=h75ViYSIafiArBz68LoyYeo8vNX3t7GarXlXLozgVyIkpZC37N2fmrHOT+tmcrDa29ZJj9 CBRpgQPvh8NjsPl49xSS6Vj4KP5rZOh+OQ7X2ndGjA6mgotDJgKLmV4qKFO2SgeSTmi+eh ZNpGffLJySLEW8dSBUBNio76suK4R8blGoaCdy5yZfEwE7nck6IWZ7z8M/qMENaVPY9ESW hIN0Ehz8K5YewImDls2dGjRdcwztPyQH+19AWDAY8mBx85WSXCSQ0zKrBQssLck5FIC//m z2uzIeZ/NHB9RV/Th9WTcIHygvAXEP6W7mwEk8y2NFk20y0liBMWfF9UyspGvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dd173VF0RNeYQP2IK9+l8QSmuDFZTWRwFHX9+k/FZn8=; b=NOTdg4HvqihtjOeGmSdvsgo8AYXhjvf4Mdn8dI49irmU6e309/7rQso/Au+oeMvIeqWg2t 7zL9y27roINa0kbDTCdPqzNCWv815GLHfTB9pyLihCr4Gwqsm4i3FQpujlNXF9lGBz07nj jxVJ+fTU/gP/HnO1qCI5WkJ8ImEbFmGsnA74S5BOQSC16Zy90PR+MrSPIOUv6/WulbjfhZ M1y1j+cMEgSWj2fOc9npvAKLLLOeBgTCrA8o/bKhRQNcQ4IfA2zhgcez116eeviMGUFdJ3 VKucuZa53DIzvyFWaCWsnxBpzqq/PH5tVKBjklj3KklyswR2pZPbh1r+Uo/ndA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtrmq6tNJztXQ; Sun, 24 Sep 2023 16:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OGJNiJ079346; Sun, 24 Sep 2023 16:19:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OGJN7L079343; Sun, 24 Sep 2023 16:19:23 GMT (envelope-from git) Date: Sun, 24 Sep 2023 16:19:23 GMT Message-Id: <202309241619.38OGJN7L079343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f5892bbbaf54 - releng/14.0 - libcrypto: fix the FIPS provider on amd64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f5892bbbaf54bfd40638359621265c47d1e419c3 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f5892bbbaf54bfd40638359621265c47d1e419c3 commit f5892bbbaf54bfd40638359621265c47d1e419c3 Author: Pierre Pronchery AuthorDate: 2023-09-04 17:57:35 +0000 Commit: Ed Maste CommitDate: 2023-09-24 16:18:20 +0000 libcrypto: fix the FIPS provider on amd64 This corrects the list of source files required for the FIPS provider. To test: ``` INSTALL PASSED enter AES-128-CBC encryption password: Verifying - enter AES-128-CBC encryption password: U2FsdGVkX1+MGm7LbZou29UWU+KAyBX/PxF5T1pO9VM= ``` Reviewed by: emaste Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/837 Differential Revision: https://reviews.freebsd.org/D41720 (cherry picked from commit 8f37b3a142f2f7197896cd283c44c7e4fb64aaf3) (cherry picked from commit abd9da936335eca88d670ad35a94ed67d911bdb1) Approved by: re (gjb) --- secure/lib/libcrypto/modules/fips/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 145cb5993786..b77bcf785454 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -32,25 +32,25 @@ SRCS+= mem_clr.c .endif # crypto/aes -SRCS+= aes_cbc.c aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c +SRCS+= aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c .if defined(ASM_aarch64) -SRCS+= aes_core.c aesv8-armx.S vpaes-armv8.S +SRCS+= aes_cbc.c aes_core.c aesv8-armx.S vpaes-armv8.S ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto .elif defined(ASM_amd64) -SRCS+= aes_core.c aesni-mb-x86_64.S aesni-sha1-x86_64.S aesni-sha256-x86_64.S -SRCS+= aesni-x86_64.S vpaes-x86_64.S +SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S +SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S .elif defined(ASM_arm) -SRCS+= aes-armv4.S aesv8-armx.S bsaes-armv7.S +SRCS+= aes_cbc.c aes-armv4.S aesv8-armx.S bsaes-armv7.S .elif defined(ASM_i386) -SRCS+= aes_core.c aesni-x86.S vpaes-x86.S +SRCS+= aes-586.S aesni-x86.S vpaes-x86.S .elif defined(ASM_powerpc) -SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S .elif defined(ASM_powerpc64) -SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S .elif defined(ASM_powerpc64le) -SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S .else -SRCS+= aes_core.c +SRCS+= aes_cbc.c aes_core.c .endif # crypto/bn From nobody Sun Sep 24 16:19:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtrms2JFsz4v951; Sun, 24 Sep 2023 16:19: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 4Rtrms1mvvz3PZk; Sun, 24 Sep 2023 16:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQhB60dtdjyPdTyc6803Cnt+CQLMGEwHrqVXd+5eH50=; b=AbpY4l8HSqxl0vdMWGggt371TlaD9hrTjVqipvcdc9LONWVJ5DfJDdk9YTS3UsHjn878US ph/SK9XihHcz4NLSXdUVW+R+BAFpVeRoCNUAyNZ5j3Z3PkFS70M4hyCYr7DidQEoGksv9S TS7LyL5Lwdis5rJaeOVc28xZbaredGF47pYIi72q55He2aLFav9yluFeDCCRvX5kfFvT1w 7uE7ET9ouJrtbLAzESWNbXhum6lyj2feH16P3K4SlAngBTrSc3wrbemmJsSL818G+ocIJu T2WG4MFfQw8G6bVWTZV+1WcdnQP2Xh/EjgakhTu7oBtdVvzjfQJBDdzg20jBlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695572365; a=rsa-sha256; cv=none; b=XP+8aVzyumyzPgDtJgEfgoeSYW3h6tS4nZjbxQxaniY7jU0rPt42i6zA8jb8/EATqei70l soD94oezLP5DxcKqPsJXEMZBp6nhWPXJFV4vegvtIQXZmel5z4wrPV1a6WRcnaM1PoiS4q 2N5ljS14FM4ej6QBpryQBuVunfoQkxRcqay0UKzsVHURy7U8J0Tr6lD6jvLdOt6+C53pJm ojmFWHYD3zL6AARyIRliD9lzyb4n8BpVhRFqeftb8r80FCBQ4McAZU3JrsUAgH61S291/h CDkc2NtzrAkj7Osx2msXSRuD/XiGoqsCamkbEIoV6tz7Bj8zu7jSeWP9Xkm6Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQhB60dtdjyPdTyc6803Cnt+CQLMGEwHrqVXd+5eH50=; b=GKrGjCD8FZqQffWchpg84EXjHXhzq0J6D5GykqCh676qnMf3AmPoTRmKnfg65gm73Di3ox vmummsb9tGbbTbYgDPsgIQnpoDTJOSrA/iUgfvesiPJUveU/9RwyWo34zFkQXdL2vaUdb9 OWFDXM4o3sLbpxuxuHW0dlDs1PSM7+c3mo2H/R0aUDB2sk9W8DsGcyEITvoD5JsyNRNNp9 QiuV9qFHq0qR42mLTzCobF1qMK56/CB0e53LW7M6eo+3lUgW8/cIXA6bdkgp8Xc8l6tyC8 wqJxJdgTecfb6BdkR9MHqJMc6xB+A/tdY06IUtLBNA5w2cfQgAzVOSZDdvALMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtrms0qC4ztb0; Sun, 24 Sep 2023 16:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OGJPqY079398; Sun, 24 Sep 2023 16:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OGJPEk079395; Sun, 24 Sep 2023 16:19:25 GMT (envelope-from git) Date: Sun, 24 Sep 2023 16:19:25 GMT Message-Id: <202309241619.38OGJPEk079395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 444eda0dda64 - releng/14.0 - libcrypto: complete the support for the 0.9.8 API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 444eda0dda6407c56c80638f2218ce80e7c90a1f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=444eda0dda6407c56c80638f2218ce80e7c90a1f commit 444eda0dda6407c56c80638f2218ce80e7c90a1f Author: Pierre Pronchery AuthorDate: 2023-09-21 11:42:06 +0000 Commit: Ed Maste CommitDate: 2023-09-24 16:18:28 +0000 libcrypto: complete the support for the 0.9.8 API When importing OpenSSL 3 in base, some but not all source files implementing the deprecated 0.9.8 API were imported. With this change, it becomes possible again to compile software targeting this API. PR: 272220 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Reviewed by: emaste Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/851 (cherry picked from commit b15b39521644ebffdcc091bd283ed410b0ae9274) (cherry picked from commit ab64f100ca5ddd37029695646003abaf49c3065e) Approved by: re (gjb) --- secure/lib/libcrypto/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 827dee41201d..70208cd17c8a 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -196,14 +196,14 @@ SRCS+= des_enc.c fcrypt_b.c .endif # dh -SRCS+= dh_ameth.c dh_asn1.c dh_backend.c dh_check.c dh_err.c dh_gen.c +SRCS+= dh_ameth.c dh_asn1.c dh_backend.c dh_check.c dh_depr.c dh_err.c dh_gen.c SRCS+= dh_group_params.c dh_kdf.c dh_key.c dh_lib.c dh_meth.c dh_pmeth.c SRCS+= dh_prn.c dh_rfc5114.c # dsa -SRCS+= dsa_ameth.c dsa_asn1.c dsa_backend.c dsa_check.c dsa_err.c dsa_gen.c -SRCS+= dsa_key.c dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c dsa_prn.c -SRCS+= dsa_sign.c dsa_vrf.c +SRCS+= dsa_ameth.c dsa_asn1.c dsa_backend.c dsa_check.c dsa_depr.c dsa_err.c +SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c +SRCS+= dsa_prn.c dsa_sign.c dsa_vrf.c # dso SRCS+= dso_dlfcn.c dso_err.c dso_lib.c From nobody Sun Sep 24 16:19:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtrmt4JQVz4v97J; Sun, 24 Sep 2023 16:19: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 4Rtrmt3Q8rz3Q12; Sun, 24 Sep 2023 16:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fA8s56MdG4oI6NIweJqkxIHeppn9VfIAHWwABEYlWLg=; b=W1ZdO1rPCG+wbcjoYhVNnqJNB4Au0IrRFJWWN2IF0n1TdTyEXXOAvAncQW1IQr5LZ5RKxj VdQSi2VDbNsOJadw4fL3mAG+XJb3hK96pH6F79msDbl9U5WvVU81J/j9tLwO+McfeUaH4a VAyKImehpJTP2XBoHankSv5AuZo5TEe9iSyzJmNYXMG4g065Da+gwCkAYaNNyLXZKdxD+H EYbML0Fa+MlljmYFc9mxd11qLi4DjZ7fQmcBirmJs8qDioGk12qaIeeABk5URbT8HTYM8N MSU+KFcNvGcNFaxqYDU2rJiAGC49iCTavEwfJyPKdvncWE94c5x0C1GrYE65Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695572366; a=rsa-sha256; cv=none; b=uBgDeH/B/c7LXMHSDwnSAoCakA/qv+4unEuOE+AVm56PIvFujyMXtHYwBAiHdrt65+sek6 ftbEVknSPmy+BTWAiqoPr/HQjZ4yPCat7+6cdE/UtC9j9buHLmcXaKuJlX4f59XBYd2nOD 1ktpSC4CNOMbc3ekIY9+CkkXlipgicnWu9vmFD6PjnKfIXL7gqMD+kgqeyq76BvHFx94lU pI6mm6+JfNXJWfw6oJzTtJPKeqHHF4aIV2TTcVglGZsdZz09VvLnuQL3qAWHLxDyAAgw04 QocHLTFwUzrJ6Rq7givPwrJ9RNse5Gq2xa/OuzsPvTVK/uTMeZaucSuSpKBjiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fA8s56MdG4oI6NIweJqkxIHeppn9VfIAHWwABEYlWLg=; b=GfVjnKXZtVn66JefnJpXz0IPWRWzbKA+b8dPKiQwxlRHHiN0jPS8LofWPW81FmFe6CEWn7 qHCgLah7wbRivugmX6ZKjIjZWD2oB19vvnTeurDg6CNwaBh/xMDo1MSxYtiVXVKRvB5+R5 2IUI1YeoyShGKKAyZ5ogNCeSjyGPrVvNuRwcAN0+rx3SNVr7OZlWD3f8WTiy3/A/sZOU6B KaLjmOidmGIz9PFFymbv0BSniruSZzQgsmOhVjfMkvsEnp3z78NqhFGIRlK4eyAIirCZZt vgjrxoAhOJq21H3mu1yX1UpkeudU1Bi91rSJinL25741+PlX6899dVu7vkawRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtrmt22zlzt1k; Sun, 24 Sep 2023 16:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OGJQqK079443; Sun, 24 Sep 2023 16:19:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OGJQHE079440; Sun, 24 Sep 2023 16:19:26 GMT (envelope-from git) Date: Sun, 24 Sep 2023 16:19:26 GMT Message-Id: <202309241619.38OGJQHE079440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5b980017909a - releng/14.0 - Add deprecation notices to publickey(5) tools List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5b980017909a40179ab6f11d739cea8b450b6bf6 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5b980017909a40179ab6f11d739cea8b450b6bf6 commit 5b980017909a40179ab6f11d739cea8b450b6bf6 Author: Ed Maste AuthorDate: 2023-09-20 11:31:14 +0000 Commit: Ed Maste CommitDate: 2023-09-24 16:18:35 +0000 Add deprecation notices to publickey(5) tools Reviewed by: imp, manu MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40144 (cherry picked from commit d5ef73a71f0e2fbc4dc9b907a6e59a15599c50b3) (cherry picked from commit 84266fb897e6e75569a81418f146f134af04046b) Approved by: re (gjb) --- usr.bin/chkey/chkey.1 | 4 ++++ usr.bin/keylogin/keylogin.1 | 4 ++++ usr.bin/keylogout/keylogout.1 | 4 ++++ usr.bin/newkey/newkey.8 | 4 ++++ usr.sbin/keyserv/keyserv.8 | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/usr.bin/chkey/chkey.1 b/usr.bin/chkey/chkey.1 index 0721c07e8c14..508227ba9601 100644 --- a/usr.bin/chkey/chkey.1 +++ b/usr.bin/chkey/chkey.1 @@ -9,6 +9,10 @@ .Nd change your encryption key .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/keylogin/keylogin.1 b/usr.bin/keylogin/keylogin.1 index a8a429e6c786..32a3e8e1b5b4 100644 --- a/usr.bin/keylogin/keylogin.1 +++ b/usr.bin/keylogin/keylogin.1 @@ -9,6 +9,10 @@ .Nd decrypt and store secret key .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/keylogout/keylogout.1 b/usr.bin/keylogout/keylogout.1 index 54cd5a575c51..1480a83aece5 100644 --- a/usr.bin/keylogout/keylogout.1 +++ b/usr.bin/keylogout/keylogout.1 @@ -8,6 +8,10 @@ .Sh SYNOPSIS .Nm .Op Fl f +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.bin/newkey/newkey.8 b/usr.bin/newkey/newkey.8 index 966692b5968c..51dca6688bd0 100644 --- a/usr.bin/newkey/newkey.8 +++ b/usr.bin/newkey/newkey.8 @@ -10,6 +10,10 @@ .Fl h Ar hostname .Nm .Fl u Ar username +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/keyserv/keyserv.8 b/usr.sbin/keyserv/keyserv.8 index af8acd2fd642..17007c7d8f40 100644 --- a/usr.sbin/keyserv/keyserv.8 +++ b/usr.sbin/keyserv/keyserv.8 @@ -16,6 +16,10 @@ .Op Fl n .Op Fl p Ar path .Op Fl v +.Sh DEPRECATION NOTICE +.Nm +is deprecated and is not available as of +.Fx 15.0. .Sh DESCRIPTION The .Nm From nobody Sun Sep 24 16:19:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtrmv43G3z4v8yw; Sun, 24 Sep 2023 16:19: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 4Rtrmv3Qn4z3Q3x; Sun, 24 Sep 2023 16:19:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tq1+w8rji4NdMdNbb+jjLaq/+asXBd5HnlLq1ElU0s=; b=UKOMfheBkrRO/mScUa3NMDs7a24MEewv9JcHFeFUo+dbi2yTkqITZ5fbG4i/rw0OyO8ies IIxwyqSWfr0Wkc4aGFdVi93ij2VPUsLftL5+mh/MzQrmxk1p+v9heovpjSt2tZoWORSL9z Bqrr+AML+dyoZdSuhriX9fQqhyLgiWg+nFrkcN9XQs43+PgRh5BOzEaJ6ns63d1PWsvEl1 TlPHh7647DO0OPNQ54HcV06K+szAlJ4vUMzcKXCyOB7XHfAEQYi7Y/1aZa7ORTQ6OuB9JE iwDViV3yVvE6gcrLmiCpOIiWwONRqJE03HKv5EJnwA5Qu3bABFegc1RnFdxjjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695572367; a=rsa-sha256; cv=none; b=cKdguj/kUkBZ0sVdnd75z7AU87hcjlpFu+iifX+ZK0SK4H7QXLyRcw3I5NVW56NHE3Fa0p aVDC3LDZwJ7edviOMD5ZF/Ru4hAcZDV21LP6TgOlrFXcNsFghTztkP8Ij8+d5AQRsuwlbj 0moLq7JvVWbyJQmYoNelZA05Zt98ffW4hZkWXnsgTHYF4a8PI4/JH98f8ciK9RLemH42V/ 1Xjoa+wYw6hdIv4KKRUaOx4jU4GorY5kcYH3i3e4UfRddK2mgLm6x21OtdRQctTev1yyKE b0pICMu7lxkXXC1oGTGLWOyAUQRiSHd4pAKa+5hF0rb8hcOKCZ4U7kQ1fR2naw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695572367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1tq1+w8rji4NdMdNbb+jjLaq/+asXBd5HnlLq1ElU0s=; b=EeDSbHSlePN53lFTh66Xmh1pQuj8dtnDq3dvBu8xa+cVqkL6Rr4/Q5potgdwt3Keh3+TIg bZPMF8inuNwTDKvG/mOAt83fFkALGodNGg7aaXDzC7rPnTNLSIIL18il3T7dD9KP5meMho OUOYvLIuRyeE0yf1Cydb3+7VHgEfUNbjoRSvaK02CEJaXOF5ljwHVSmGunpcxBfVbKBI8Z a3IjLPO2Yh/lxX5XziUsP6hZcQje1T7kYP8UkVOLelkkEHjq0FgoWs/E+joHfempnJa2zp wDDdIm4yrg7b3J5AqokVlmuuyQlob6darkJproh69mXmZK8PH/6/AQ/wa3vN1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtrmv2TGnztVn; Sun, 24 Sep 2023 16:19:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OGJRKi079503; Sun, 24 Sep 2023 16:19:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OGJRdK079500; Sun, 24 Sep 2023 16:19:27 GMT (envelope-from git) Date: Sun, 24 Sep 2023 16:19:27 GMT Message-Id: <202309241619.38OGJRdK079500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 20f6af198e72 - releng/14.0 - rc.subr: don't require service to be enabled for `status` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 20f6af198e728262472bd347d68ea264b8cf37eb Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=20f6af198e728262472bd347d68ea264b8cf37eb commit 20f6af198e728262472bd347d68ea264b8cf37eb Author: Daniel Tameling AuthorDate: 2023-07-01 08:43:40 +0000 Commit: Ed Maste CommitDate: 2023-09-24 16:18:41 +0000 rc.subr: don't require service to be enabled for `status` For a service that sets an rcvar, there is a check whether it has been enabled before the actual command is executed. If the check fails, one gets a message to enable it and the returned exit status is 0. However, this is usually undesirable for the status command, which is a) supposed to check whether the service is running anyway and b) returns a non-zero exit code if that is not the case. Thus, skip the check for the status command. PR: 272282 Reviewed by: emaste (cherry picked from commit ba793728a840041e93e38bcbff4a7233dc63b722) (cherry picked from commit f701d9da1d94891dd2edad607a989cad6eb10313) Approved by: re (gjb) --- libexec/rc/rc.subr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 17ca904ff1e7..332718dc6f2c 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1041,13 +1041,14 @@ run_rc_command() continue fi # if ${rcvar} is set, $1 is not "rcvar", "describe", - # "enable" or "delete", and ${rc_pid} is not set, run: + # "enable", "delete" or "status", and ${rc_pid} is + # not set, run: # checkyesno ${rcvar} # and return if that failed # if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" \ -a "$rc_arg" != "delete" -a "$rc_arg" != "enable" \ - -a "$rc_arg" != "describe" ] || + -a "$rc_arg" != "describe" -a "$rc_arg" != "status" ] || [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then From nobody Sun Sep 24 17:32:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RttP54CMTz4vDbJ; Sun, 24 Sep 2023 17:32: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 4RttP53tf0z3Xsd; Sun, 24 Sep 2023 17:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695576745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4TDj8I3h906594hl8+5Nj1+o+y3OYz9+ImicVA8bSXY=; b=GUdMNeH0mK4aaPMt77M9iF2zBj9VuCtSKqY668gabcZQx2upGYaPknvva/2CZti6xWzpG9 oqk/9pdVKFYJq6N+SP73sseFhP8EaJVl8iHSl809W2sgzYlfSEpPR2SUKzyfCz8t0NLqbe E+Lh5v2eix9Eiejn7og8UUTW25DGkNxdxjKKdP+JohMTsHie9XEwRCxK3nT5Rg3ZiwlevV IiN8QQpLnt0TPiOVZYkoi9tl+qtvCvoPdAKXe+UryDibsvsh2diZgrEC/7dk/uL5spzyXX 4+IfuayHxEZ1dVTeK4z3Ipl8KofF30Gm3Ce8MhlNHr2+/rYur+HWPIjLcJlgMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695576745; a=rsa-sha256; cv=none; b=j7u2E30Lp0qRZYRDvhmpk0lU019eyh2jsMKAIp+GGmmxR13yABKuh2pCI3gS473xLotVtz 3Bi6SoX2DPGtA+FvvPgjjaCC+an8DUNHpbaARhlaWIH4ynQtxNpp3flXhCPiAk6xSnBoff mp9ZtK8mCzR0hAEQWCLGDx3PrFRg0j2u89ceULsukAmr9cXaVTYTXsQfFF/ngwPcjIz+rO WmZObWxZ2nl2hZE8NDH7KFX8idJn9nId+F0qJtE/eJcmdY7jiRP1VoviIoLkJLLw6/qRjE eWt1oKVey3ny7lmVuvKn6AIiOmuAdKTon6yQrd4L8Vgdw3wJvRkmVfgPASIqJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695576745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4TDj8I3h906594hl8+5Nj1+o+y3OYz9+ImicVA8bSXY=; b=Nx2L098+K8P/MNdakA74zfl2LK6xPGLPs8GvsX0rW6ix8k2O2X548KAWsd3CI8j6YnHJIy /nqwuKWCXJiueTO3tg4mWeKlfsMPf84hzpmGcm7gVqAIdMMvgrZUc+F0EP4pxLAAh+sZWn uIZ8iFCA88dJ5Z/8XKMlEcSLVf+faseiA6Q+nD0mSn9b4CIYot5lgfr7+o1WqfOGCop4ph lYbHkT+M8Dc9PD0y1hMk7f4x03jrCkgXx1k1Yn2yop8D/mqAWwhW0mra0PQGgP2rH9sHmM zI2psGL97X71hsQpPbvA3EMT0v1KnC5BT8H8hj1w0vQN5DSDHYGuXGXCCrYkYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RttP52wwmzwbt; Sun, 24 Sep 2023 17:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OHWPOa011044; Sun, 24 Sep 2023 17:32:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OHWPl6011041; Sun, 24 Sep 2023 17:32:25 GMT (envelope-from git) Date: Sun, 24 Sep 2023 17:32:25 GMT Message-Id: <202309241732.38OHWPl6011041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 4afaeab99e9e - releng/14.0 - zfs: merge openzfs/zfs@62677576a (zfs-2.2-release) into stable/14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4afaeab99e9e4e8e4d8306aff51f9557d8d14cdf Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=4afaeab99e9e4e8e4d8306aff51f9557d8d14cdf commit 4afaeab99e9e4e8e4d8306aff51f9557d8d14cdf Author: Martin Matuska AuthorDate: 2023-09-21 09:29:21 +0000 Commit: Martin Matuska CommitDate: 2023-09-24 17:30:02 +0000 zfs: merge openzfs/zfs@62677576a (zfs-2.2-release) into stable/14 Notable upstream pull request merges: #15274 f7a07d76e Retire z_nr_znodes #15278 62677576a ZIL: Fix potential race on flush deferring #15279 11943656f Update the MOS directory on spa_upgrade_errlog() #15281 54c6fbd37 zed: Allow autoreplace and fault LEDs for removed vdevs Obtained from: OpenZFS Approved by: re (gjb) OpenZFS commit: 62677576a75e94396e945c4ecd9372f5d34e50cb (cherry picked from commit 35e5fd1b286c18371ec6f66addf678cd4429302c) (cherry picked from commit 646c82e08a433b61b97073051fd558e42c64603c) --- sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 1 + .../openzfs/cmd/zed/zed.d/statechange-led.sh | 2 +- sys/contrib/openzfs/config/kernel-blkdev.m4 | 84 +++++++++++++++++++++- .../config/kernel-block-device-operations.m4 | 35 ++++++++- .../openzfs/config/kernel-filemap-splice-read.m4 | 25 +++++++ .../openzfs/config/kernel-register_sysctl_table.m4 | 27 +++++++ sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 ++++++- sys/contrib/openzfs/config/kernel.m4 | 4 ++ .../include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 1 - .../include/os/linux/kernel/linux/blkdev_compat.h | 7 ++ sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 ++++ .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 1 - sys/contrib/openzfs/man/man7/zpoolconcepts.7 | 8 +-- sys/contrib/openzfs/module/Makefile.in | 2 +- .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 8 +-- .../openzfs/module/os/freebsd/zfs/zfs_znode.c | 2 - sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 77 ++++++++++++++------ .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 ++++++++++++++--- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 1 - .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 2 +- .../openzfs/module/os/linux/zfs/zfs_znode.c | 2 - .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 15 ++-- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 ++++++-- sys/contrib/openzfs/module/zfs/spa_errlog.c | 9 +++ sys/contrib/openzfs/module/zfs/zil.c | 9 +++ .../cli_root/zdb/zdb_block_size_histogram.ksh | 8 +-- sys/modules/zfs/zfs_config.h | 27 ++++++- sys/modules/zfs/zfs_gitrev.h | 2 +- 31 files changed, 419 insertions(+), 82 deletions(-) diff --git a/sys/contrib/openzfs/META b/sys/contrib/openzfs/META index 0953cc51922f..9ffe90458dbd 100644 --- a/sys/contrib/openzfs/META +++ b/sys/contrib/openzfs/META @@ -6,5 +6,5 @@ Release: rc4 Release-Tags: relext License: CDDL Author: OpenZFS -Linux-Maximum: 6.4 +Linux-Maximum: 6.5 Linux-Minimum: 3.10 diff --git a/sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c b/sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c index a8d084bb4bd3..2f040ff7582c 100644 --- a/sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c +++ b/sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c @@ -372,6 +372,7 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled) /* Only autoreplace bad disks */ if ((vs->vs_state != VDEV_STATE_DEGRADED) && (vs->vs_state != VDEV_STATE_FAULTED) && + (vs->vs_state != VDEV_STATE_REMOVED) && (vs->vs_state != VDEV_STATE_CANT_OPEN)) { zed_log_msg(LOG_INFO, " not autoreplacing since disk isn't in " "a bad state (currently %llu)", vs->vs_state); diff --git a/sys/contrib/openzfs/cmd/zed/zed.d/statechange-led.sh b/sys/contrib/openzfs/cmd/zed/zed.d/statechange-led.sh index 46bfc1b866f1..40cb61f17307 100755 --- a/sys/contrib/openzfs/cmd/zed/zed.d/statechange-led.sh +++ b/sys/contrib/openzfs/cmd/zed/zed.d/statechange-led.sh @@ -121,7 +121,7 @@ state_to_val() { state="$1" case "$state" in - FAULTED|DEGRADED|UNAVAIL) + FAULTED|DEGRADED|UNAVAIL|REMOVED) echo 1 ;; ONLINE) diff --git a/sys/contrib/openzfs/config/kernel-blkdev.m4 b/sys/contrib/openzfs/config/kernel-blkdev.m4 index 887acee670ba..e04a2bd2c3b6 100644 --- a/sys/contrib/openzfs/config/kernel-blkdev.m4 +++ b/sys/contrib/openzfs/config/kernel-blkdev.m4 @@ -16,12 +16,63 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH], [ ]) ]) +dnl # +dnl # 6.5.x API change, +dnl # blkdev_get_by_path() takes 4 args +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG], [ + ZFS_LINUX_TEST_SRC([blkdev_get_by_path_4arg], [ + #include + #include + ], [ + struct block_device *bdev __attribute__ ((unused)) = NULL; + const char *path = "path"; + fmode_t mode = 0; + void *holder = NULL; + struct blk_holder_ops h; + + bdev = blkdev_get_by_path(path, mode, holder, &h); + ]) +]) + AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [ - AC_MSG_CHECKING([whether blkdev_get_by_path() exists]) + AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 3 args]) ZFS_LINUX_TEST_RESULT([blkdev_get_by_path], [ AC_MSG_RESULT(yes) ], [ - ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()]) + AC_MSG_RESULT(no) + AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 4 args]) + ZFS_LINUX_TEST_RESULT([blkdev_get_by_path_4arg], [ + AC_DEFINE(HAVE_BLKDEV_GET_BY_PATH_4ARG, 1, + [blkdev_get_by_path() exists and takes 4 args]) + AC_MSG_RESULT(yes) + ], [ + ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()]) + ]) + ]) +]) + +dnl # +dnl # 6.5.x API change +dnl # blk_mode_t was added as a type to supercede some places where fmode_t +dnl # is used +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T], [ + ZFS_LINUX_TEST_SRC([blk_mode_t], [ + #include + #include + ], [ + blk_mode_t m __attribute((unused)) = (blk_mode_t)0; + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T], [ + AC_MSG_CHECKING([whether blk_mode_t is defined]) + ZFS_LINUX_TEST_RESULT([blk_mode_t], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BLK_MODE_T, 1, [blk_mode_t is defined]) + ], [ + AC_MSG_RESULT(no) ]) ]) @@ -41,12 +92,35 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT], [ ]) ]) +dnl # +dnl # 6.5.x API change. +dnl # blkdev_put() takes (void* holder) as arg 2 +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER], [ + ZFS_LINUX_TEST_SRC([blkdev_put_holder], [ + #include + #include + ], [ + struct block_device *bdev = NULL; + void *holder = NULL; + + blkdev_put(bdev, holder); + ]) +]) + AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [ AC_MSG_CHECKING([whether blkdev_put() exists]) ZFS_LINUX_TEST_RESULT([blkdev_put], [ AC_MSG_RESULT(yes) ], [ - ZFS_LINUX_TEST_ERROR([blkdev_put()]) + AC_MSG_CHECKING([whether blkdev_put() accepts void* as arg 2]) + ZFS_LINUX_TEST_RESULT([blkdev_put_holder], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BLKDEV_PUT_HOLDER, 1, + [blkdev_put() accepts void* as arg 2]) + ], [ + ZFS_LINUX_TEST_ERROR([blkdev_put()]) + ]) ]) ]) @@ -495,7 +569,9 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [ ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH + ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG ZFS_AC_KERNEL_SRC_BLKDEV_PUT + ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART ZFS_AC_KERNEL_SRC_BLKDEV_INVALIDATE_BDEV ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV @@ -510,6 +586,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [ ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE ZFS_AC_KERNEL_SRC_BLKDEV_BLK_STS_RESV_CONFLICT + ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T ]) AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [ @@ -530,4 +607,5 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [ ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT + ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T ]) diff --git a/sys/contrib/openzfs/config/kernel-block-device-operations.m4 b/sys/contrib/openzfs/config/kernel-block-device-operations.m4 index 84e39dc8a2f6..d13c1337b1fb 100644 --- a/sys/contrib/openzfs/config/kernel-block-device-operations.m4 +++ b/sys/contrib/openzfs/config/kernel-block-device-operations.m4 @@ -49,12 +49,42 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [ ], [], []) ]) +dnl # +dnl # 5.9.x API change +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG], [ + ZFS_LINUX_TEST_SRC([block_device_operations_release_void_1arg], [ + #include + + void blk_release(struct gendisk *g) { + (void) g; + return; + } + + static const struct block_device_operations + bops __attribute__ ((unused)) = { + .open = NULL, + .release = blk_release, + .ioctl = NULL, + .compat_ioctl = NULL, + }; + ], [], []) +]) + AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [ - AC_MSG_CHECKING([whether bops->release() is void]) + AC_MSG_CHECKING([whether bops->release() is void and takes 2 args]) ZFS_LINUX_TEST_RESULT([block_device_operations_release_void], [ AC_MSG_RESULT(yes) ],[ - ZFS_LINUX_TEST_ERROR([bops->release()]) + AC_MSG_RESULT(no) + AC_MSG_CHECKING([whether bops->release() is void and takes 1 arg]) + ZFS_LINUX_TEST_RESULT([block_device_operations_release_void_1arg], [ + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG], [1], + [Define if release() in block_device_operations takes 1 arg]) + ],[ + ZFS_LINUX_TEST_ERROR([bops->release()]) + ]) ]) ]) @@ -92,6 +122,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS], [ ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID + ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK ]) diff --git a/sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 b/sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 new file mode 100644 index 000000000000..4c83b31d738a --- /dev/null +++ b/sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 @@ -0,0 +1,25 @@ +AC_DEFUN([ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ], [ + dnl # + dnl # Kernel 6.5 - generic_file_splice_read was removed in favor + dnl # of copy_splice_read for the .splice_read member of the + dnl # file_operations struct. + dnl # + ZFS_LINUX_TEST_SRC([has_copy_splice_read], [ + #include + + struct file_operations fops __attribute__((unused)) = { + .splice_read = copy_splice_read, + }; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_COPY_SPLICE_READ], [ + AC_MSG_CHECKING([whether copy_splice_read() exists]) + ZFS_LINUX_TEST_RESULT([has_copy_splice_read], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_COPY_SPLICE_READ, 1, + [copy_splice_read exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 b/sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 new file mode 100644 index 000000000000..a5e934f56d29 --- /dev/null +++ b/sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 @@ -0,0 +1,27 @@ +dnl # +dnl # Linux 6.5 removes register_sysctl_table +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE], [ + ZFS_LINUX_TEST_SRC([has_register_sysctl_table], [ + #include + + static struct ctl_table dummy_table[] = { + {} + }; + + ],[ + struct ctl_table_header *h + __attribute((unused)) = register_sysctl_table(dummy_table); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE], [ + AC_MSG_CHECKING([whether register_sysctl_table exists]) + ZFS_LINUX_TEST_RESULT([has_register_sysctl_table], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_REGISTER_SYSCTL_TABLE, 1, + [register_sysctl_table exists]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) diff --git a/sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 b/sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 index e0617faab02c..ff560ff3eef0 100644 --- a/sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 +++ b/sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 @@ -6,8 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [ #include #include ],[ - int type __attribute__ ((unused)) = - ITER_IOVEC | ITER_KVEC | ITER_BVEC | ITER_PIPE; + int type __attribute__ ((unused)) = ITER_KVEC; ]) ZFS_LINUX_TEST_SRC([iov_iter_advance], [ @@ -93,6 +92,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [ struct iov_iter iter = { 0 }; __attribute__((unused)) enum iter_type i = iov_iter_type(&iter); ]) + + ZFS_LINUX_TEST_SRC([iter_iov], [ + #include + #include + ],[ + struct iov_iter iter = { 0 }; + __attribute__((unused)) const struct iovec *iov = iter_iov(&iter); + ]) ]) AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [ @@ -201,4 +208,19 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [ AC_DEFINE(HAVE_VFS_IOV_ITER, 1, [All required iov_iter interfaces are available]) ]) + + dnl # + dnl # Kernel 6.5 introduces the iter_iov() function that returns the + dnl # __iov member of an iov_iter*. The iov member was renamed to this + dnl # __iov member, and is intended to be accessed via the helper + dnl # function now. + dnl # + AC_MSG_CHECKING([whether iter_iov() is available]) + ZFS_LINUX_TEST_RESULT([iter_iov], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ITER_IOV, 1, + [iter_iov() is available]) + ],[ + AC_MSG_RESULT(no) + ]) ]) diff --git a/sys/contrib/openzfs/config/kernel.m4 b/sys/contrib/openzfs/config/kernel.m4 index 1487fa2e7793..df194ec72207 100644 --- a/sys/contrib/openzfs/config/kernel.m4 +++ b/sys/contrib/openzfs/config/kernel.m4 @@ -160,6 +160,8 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_FILEMAP ZFS_AC_KERNEL_SRC_WRITEPAGE_T ZFS_AC_KERNEL_SRC_RECLAIMED + ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE + ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ case "$host_cpu" in powerpc*) ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE @@ -299,6 +301,8 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_FILEMAP ZFS_AC_KERNEL_WRITEPAGE_T ZFS_AC_KERNEL_RECLAIMED + ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE + ZFS_AC_KERNEL_COPY_SPLICE_READ case "$host_cpu" in powerpc*) ZFS_AC_KERNEL_CPU_HAS_FEATURE diff --git a/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h b/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h index 5948e44daab1..56a0ac96ac19 100644 --- a/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h +++ b/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h @@ -93,7 +93,6 @@ struct zfsvfs { zfs_teardown_lock_t z_teardown_lock; zfs_teardown_inactive_lock_t z_teardown_inactive_lock; list_t z_all_znodes; /* all vnodes in the fs */ - uint64_t z_nr_znodes; /* number of znodes in the fs */ kmutex_t z_znodes_lock; /* lock for z_all_znodes */ struct zfsctl_root *z_ctldir; /* .zfs directory pointer */ boolean_t z_show_ctldir; /* expose .zfs in the root dir */ diff --git a/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h b/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h index e0f20ba32008..f111e648ccf7 100644 --- a/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h +++ b/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h @@ -347,6 +347,7 @@ zfs_check_media_change(struct block_device *bdev) #define vdev_bdev_reread_part(bdev) zfs_check_media_change(bdev) #elif defined(HAVE_DISK_CHECK_MEDIA_CHANGE) #define vdev_bdev_reread_part(bdev) disk_check_media_change(bdev->bd_disk) +#define zfs_check_media_change(bdev) disk_check_media_change(bdev->bd_disk) #else /* * This is encountered if check_disk_change() and bdev_check_media_change() @@ -397,6 +398,12 @@ vdev_lookup_bdev(const char *path, dev_t *dev) #endif } +#if defined(HAVE_BLK_MODE_T) +#define blk_mode_is_open_write(flag) ((flag) & BLK_OPEN_WRITE) +#else +#define blk_mode_is_open_write(flag) ((flag) & FMODE_WRITE) +#endif + /* * Kernels without bio_set_op_attrs use bi_rw for the bio flags. */ diff --git a/sys/contrib/openzfs/include/os/linux/spl/sys/uio.h b/sys/contrib/openzfs/include/os/linux/spl/sys/uio.h index fe2b5c07a018..cce097e16fbc 100644 --- a/sys/contrib/openzfs/include/os/linux/spl/sys/uio.h +++ b/sys/contrib/openzfs/include/os/linux/spl/sys/uio.h @@ -173,4 +173,16 @@ zfs_uio_iov_iter_init(zfs_uio_t *uio, struct iov_iter *iter, offset_t offset, } #endif +#if defined(HAVE_ITER_IOV) +#define zfs_uio_iter_iov(iter) iter_iov((iter)) +#else +#define zfs_uio_iter_iov(iter) (iter)->iov +#endif + +#if defined(HAVE_IOV_ITER_TYPE) +#define zfs_uio_iov_iter_type(iter) iov_iter_type((iter)) +#else +#define zfs_uio_iov_iter_type(iter) (iter)->type +#endif + #endif /* SPL_UIO_H */ diff --git a/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_vfsops_os.h b/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_vfsops_os.h index e320b8de4222..b4d5db21f5e5 100644 --- a/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_vfsops_os.h +++ b/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_vfsops_os.h @@ -105,7 +105,6 @@ struct zfsvfs { rrmlock_t z_teardown_lock; krwlock_t z_teardown_inactive_lock; list_t z_all_znodes; /* all znodes in the fs */ - uint64_t z_nr_znodes; /* number of znodes in the fs */ unsigned long z_rollback_time; /* last online rollback time */ unsigned long z_snap_defer_time; /* last snapshot unmount deferral */ kmutex_t z_znodes_lock; /* lock for z_all_znodes */ diff --git a/sys/contrib/openzfs/man/man7/zpoolconcepts.7 b/sys/contrib/openzfs/man/man7/zpoolconcepts.7 index db3fd4926236..98f3ee7cd660 100644 --- a/sys/contrib/openzfs/man/man7/zpoolconcepts.7 +++ b/sys/contrib/openzfs/man/man7/zpoolconcepts.7 @@ -203,11 +203,9 @@ For more information, see the section. .El .Pp -Virtual devices cannot be nested, so a mirror or raidz virtual device can only -contain files or disks. -Mirrors of mirrors -.Pq or other combinations -are not allowed. +Virtual devices cannot be nested arbitrarily. +A mirror, raidz or draid virtual device can only be created with files or disks. +Mirrors of mirrors or other such combinations are not allowed. .Pp A pool can have any number of virtual devices at the top of the configuration .Po known as diff --git a/sys/contrib/openzfs/module/Makefile.in b/sys/contrib/openzfs/module/Makefile.in index 5b71e1abf79e..9b34b3dfaec7 100644 --- a/sys/contrib/openzfs/module/Makefile.in +++ b/sys/contrib/openzfs/module/Makefile.in @@ -168,4 +168,4 @@ gen-zstd-symbols: for obj in $(addprefix zstd/,$(ZSTD_UPSTREAM_OBJS)); do echo; echo "/* $${obj#zstd/}: */"; @OBJDUMP@ -t $$obj | awk '$$2 == "g" && !/ zfs_/ {print "#define\t" $$6 " zfs_" $$6}' | sort; done >> zstd/include/zstd_compat_wrapper.h check-zstd-symbols: - @OBJDUMP@ -t $(addprefix zstd/,$(ZSTD_UPSTREAM_OBJS)) | awk '/file format/ {print} $$2 == "g" && !/ zfs_/ {++ret; print} END {exit ret}' + @OBJDUMP@ -t $(addprefix zstd/,$(ZSTD_UPSTREAM_OBJS)) | awk '/file format/ {print} $$2 == "g" && (!/ zfs_/ && !/ __pfx_zfs_/) {++ret; print} END {exit ret}' diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c index 49b97ae8f590..8969fd6a54bd 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -1158,7 +1158,6 @@ zfsvfs_free(zfsvfs_t *zfsvfs) mutex_destroy(&zfsvfs->z_znodes_lock); mutex_destroy(&zfsvfs->z_lock); - ASSERT3U(zfsvfs->z_nr_znodes, ==, 0); list_destroy(&zfsvfs->z_all_znodes); ZFS_TEARDOWN_DESTROY(zfsvfs); ZFS_TEARDOWN_INACTIVE_DESTROY(zfsvfs); @@ -1562,12 +1561,11 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting) * may add the parents of dir-based xattrs to the taskq * so we want to wait for these. * - * We can safely read z_nr_znodes without locking because the - * VFS has already blocked operations which add to the - * z_all_znodes list and thus increment z_nr_znodes. + * We can safely check z_all_znodes for being empty because the + * VFS has already blocked operations which add to it. */ int round = 0; - while (zfsvfs->z_nr_znodes > 0) { + while (!list_is_empty(&zfsvfs->z_all_znodes)) { taskq_wait_outstanding(dsl_pool_zrele_taskq( dmu_objset_pool(zfsvfs->z_os)), 0); if (++round > 1 && !unmounting) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c index c4f2b722ef4e..0d4c94555c6b 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c @@ -537,7 +537,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz, mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); - zfsvfs->z_nr_znodes++; zp->z_zfsvfs = zfsvfs; mutex_exit(&zfsvfs->z_znodes_lock); @@ -1286,7 +1285,6 @@ zfs_znode_free(znode_t *zp) mutex_enter(&zfsvfs->z_znodes_lock); POINTER_INVALIDATE(&zp->z_zfsvfs); list_remove(&zfsvfs->z_all_znodes, zp); - zfsvfs->z_nr_znodes--; mutex_exit(&zfsvfs->z_znodes_lock); #if __FreeBSD_version >= 1300139 diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c b/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c index 01f5619e1893..f0f929d3ce90 100644 --- a/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c +++ b/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c @@ -47,6 +47,10 @@ static unsigned long table_min = 0; static unsigned long table_max = ~0; static struct ctl_table_header *spl_header = NULL; +#ifndef HAVE_REGISTER_SYSCTL_TABLE +static struct ctl_table_header *spl_kmem = NULL; +static struct ctl_table_header *spl_kstat = NULL; +#endif static struct proc_dir_entry *proc_spl = NULL; static struct proc_dir_entry *proc_spl_kmem = NULL; static struct proc_dir_entry *proc_spl_kmem_slab = NULL; @@ -624,6 +628,7 @@ static struct ctl_table spl_table[] = { .mode = 0644, .proc_handler = &proc_dohostid, }, +#ifdef HAVE_REGISTER_SYSCTL_TABLE { .procname = "kmem", .mode = 0555, @@ -634,9 +639,11 @@ static struct ctl_table spl_table[] = { .mode = 0555, .child = spl_kstat_table, }, +#endif {}, }; +#ifdef HAVE_REGISTER_SYSCTL_TABLE static struct ctl_table spl_dir[] = { { .procname = "spl", @@ -648,21 +655,64 @@ static struct ctl_table spl_dir[] = { static struct ctl_table spl_root[] = { { - .procname = "kernel", - .mode = 0555, - .child = spl_dir, + .procname = "kernel", + .mode = 0555, + .child = spl_dir, }, {} }; +#endif + +static void spl_proc_cleanup(void) +{ + remove_proc_entry("kstat", proc_spl); + remove_proc_entry("slab", proc_spl_kmem); + remove_proc_entry("kmem", proc_spl); + remove_proc_entry("taskq-all", proc_spl); + remove_proc_entry("taskq", proc_spl); + remove_proc_entry("spl", NULL); + +#ifndef HAVE_REGISTER_SYSCTL_TABLE + if (spl_kstat) { + unregister_sysctl_table(spl_kstat); + spl_kstat = NULL; + } + if (spl_kmem) { + unregister_sysctl_table(spl_kmem); + spl_kmem = NULL; + } +#endif + if (spl_header) { + unregister_sysctl_table(spl_header); + spl_header = NULL; + } +} int spl_proc_init(void) { int rc = 0; +#ifdef HAVE_REGISTER_SYSCTL_TABLE spl_header = register_sysctl_table(spl_root); if (spl_header == NULL) return (-EUNATCH); +#else + spl_header = register_sysctl("kernel/spl", spl_table); + if (spl_header == NULL) + return (-EUNATCH); + + spl_kmem = register_sysctl("kernel/spl/kmem", spl_kmem_table); + if (spl_kmem == NULL) { + rc = -EUNATCH; + goto out; + } + spl_kstat = register_sysctl("kernel/spl/kstat", spl_kstat_table); + if (spl_kstat == NULL) { + rc = -EUNATCH; + goto out; + } +#endif proc_spl = proc_mkdir("spl", NULL); if (proc_spl == NULL) { @@ -703,15 +753,8 @@ spl_proc_init(void) goto out; } out: - if (rc) { - remove_proc_entry("kstat", proc_spl); - remove_proc_entry("slab", proc_spl_kmem); - remove_proc_entry("kmem", proc_spl); - remove_proc_entry("taskq-all", proc_spl); - remove_proc_entry("taskq", proc_spl); - remove_proc_entry("spl", NULL); - unregister_sysctl_table(spl_header); - } + if (rc) + spl_proc_cleanup(); return (rc); } @@ -719,13 +762,5 @@ out: void spl_proc_fini(void) { - remove_proc_entry("kstat", proc_spl); - remove_proc_entry("slab", proc_spl_kmem); - remove_proc_entry("kmem", proc_spl); - remove_proc_entry("taskq-all", proc_spl); - remove_proc_entry("taskq", proc_spl); - remove_proc_entry("spl", NULL); - - ASSERT(spl_header != NULL); - unregister_sysctl_table(spl_header); + spl_proc_cleanup(); } diff --git a/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c b/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c index 925ee9d9fe9c..48ac55f07034 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c @@ -80,9 +80,22 @@ typedef struct dio_request { static unsigned int zfs_vdev_failfast_mask = 1; +#ifdef HAVE_BLK_MODE_T +static blk_mode_t +#else static fmode_t +#endif vdev_bdev_mode(spa_mode_t spa_mode) { +#ifdef HAVE_BLK_MODE_T + blk_mode_t mode = 0; + + if (spa_mode & SPA_MODE_READ) + mode |= BLK_OPEN_READ; + + if (spa_mode & SPA_MODE_WRITE) + mode |= BLK_OPEN_WRITE; +#else fmode_t mode = 0; if (spa_mode & SPA_MODE_READ) @@ -90,6 +103,7 @@ vdev_bdev_mode(spa_mode_t spa_mode) if (spa_mode & SPA_MODE_WRITE) mode |= FMODE_WRITE; +#endif return (mode); } @@ -197,12 +211,47 @@ vdev_disk_kobj_evt_post(vdev_t *v) } } +#if !defined(HAVE_BLKDEV_GET_BY_PATH_4ARG) +/* + * Define a dummy struct blk_holder_ops for kernel versions + * prior to 6.5. + */ +struct blk_holder_ops {}; +#endif + +static struct block_device * +vdev_blkdev_get_by_path(const char *path, spa_mode_t mode, void *holder, + const struct blk_holder_ops *hops) +{ +#ifdef HAVE_BLKDEV_GET_BY_PATH_4ARG + return (blkdev_get_by_path(path, + vdev_bdev_mode(mode) | BLK_OPEN_EXCL, holder, hops)); +#else + return (blkdev_get_by_path(path, + vdev_bdev_mode(mode) | FMODE_EXCL, holder)); +#endif +} + +static void +vdev_blkdev_put(struct block_device *bdev, spa_mode_t mode, void *holder) +{ +#ifdef HAVE_BLKDEV_PUT_HOLDER + return (blkdev_put(bdev, holder)); +#else + return (blkdev_put(bdev, vdev_bdev_mode(mode) | FMODE_EXCL)); +#endif +} + static int vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize, uint64_t *logical_ashift, uint64_t *physical_ashift) { struct block_device *bdev; +#ifdef HAVE_BLK_MODE_T + blk_mode_t mode = vdev_bdev_mode(spa_mode(v->vdev_spa)); +#else fmode_t mode = vdev_bdev_mode(spa_mode(v->vdev_spa)); +#endif hrtime_t timeout = MSEC2NSEC(zfs_vdev_open_timeout_ms); vdev_disk_t *vd; @@ -252,15 +301,15 @@ vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize, reread_part = B_TRUE; } - blkdev_put(bdev, mode | FMODE_EXCL); + vdev_blkdev_put(bdev, mode, zfs_vdev_holder); } if (reread_part) { - bdev = blkdev_get_by_path(disk_name, mode | FMODE_EXCL, - zfs_vdev_holder); + bdev = vdev_blkdev_get_by_path(disk_name, mode, + zfs_vdev_holder, NULL); if (!IS_ERR(bdev)) { int error = vdev_bdev_reread_part(bdev); - blkdev_put(bdev, mode | FMODE_EXCL); + vdev_blkdev_put(bdev, mode, zfs_vdev_holder); if (error == 0) { timeout = MSEC2NSEC( zfs_vdev_open_timeout_ms * 2); @@ -305,8 +354,8 @@ vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize, hrtime_t start = gethrtime(); bdev = ERR_PTR(-ENXIO); while (IS_ERR(bdev) && ((gethrtime() - start) < timeout)) { - bdev = blkdev_get_by_path(v->vdev_path, mode | FMODE_EXCL, - zfs_vdev_holder); + bdev = vdev_blkdev_get_by_path(v->vdev_path, mode, + zfs_vdev_holder, NULL); if (unlikely(PTR_ERR(bdev) == -ENOENT)) { /* * There is no point of waiting since device is removed @@ -382,8 +431,8 @@ vdev_disk_close(vdev_t *v) return; if (vd->vd_bdev != NULL) { - blkdev_put(vd->vd_bdev, - vdev_bdev_mode(spa_mode(v->vdev_spa)) | FMODE_EXCL); + vdev_blkdev_put(vd->vd_bdev, spa_mode(v->vdev_spa), + zfs_vdev_holder); } rw_destroy(&vd->vd_lock); diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c index c45a3eb5a4eb..02cb379ea840 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c @@ -537,7 +537,6 @@ zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id, mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); - zfsvfs->z_nr_znodes++; membar_producer(); mutex_exit(&zfsvfs->z_znodes_lock); diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c index 464c12e1108d..a1db5c57c18b 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c @@ -1330,12 +1330,11 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting) * may add the parents of dir-based xattrs to the taskq * so we want to wait for these. * - * We can safely read z_nr_znodes without locking because the - * VFS has already blocked operations which add to the - * z_all_znodes list and thus increment z_nr_znodes. + * We can safely check z_all_znodes for being empty because the + * VFS has already blocked operations which add to it. */ int round = 0; - while (zfsvfs->z_nr_znodes > 0) { + while (!list_is_empty(&zfsvfs->z_all_znodes)) { taskq_wait_outstanding(dsl_pool_zrele_taskq( dmu_objset_pool(zfsvfs->z_os)), 0); if (++round > 1 && !unmounting) diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c index 234c4d5ef0e0..33baac9db06b 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c @@ -186,7 +186,7 @@ zfs_open(struct inode *ip, int mode, int flag, cred_t *cr) return (error); /* Honor ZFS_APPENDONLY file attribute */ - if ((mode & FMODE_WRITE) && (zp->z_pflags & ZFS_APPENDONLY) && + if (blk_mode_is_open_write(mode) && (zp->z_pflags & ZFS_APPENDONLY) && ((flag & O_APPEND) == 0)) { zfs_exit(zfsvfs, FTAG); return (SET_ERROR(EPERM)); diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode.c index 335ae3460c58..52c8e51df659 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode.c @@ -390,7 +390,6 @@ zfs_inode_destroy(struct inode *ip) mutex_enter(&zfsvfs->z_znodes_lock); if (list_link_active(&zp->z_link_node)) { list_remove(&zfsvfs->z_all_znodes, zp); - zfsvfs->z_nr_znodes--; } mutex_exit(&zfsvfs->z_znodes_lock); @@ -641,7 +640,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz, mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); - zfsvfs->z_nr_znodes++; mutex_exit(&zfsvfs->z_znodes_lock); if (links > 0) diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zpl_ctldir.c b/sys/contrib/openzfs/module/os/linux/zfs/zpl_ctldir.c index 68a7de78f471..7786444fea35 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zpl_ctldir.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zpl_ctldir.c @@ -42,7 +42,7 @@ static int zpl_common_open(struct inode *ip, struct file *filp) { - if (filp->f_mode & FMODE_WRITE) + if (blk_mode_is_open_write(filp->f_mode)) return (-EACCES); return (generic_file_open(ip, filp)); diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c b/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c index 73526db731c4..3caa0fc6c214 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c @@ -301,15 +301,10 @@ zpl_uio_init(zfs_uio_t *uio, struct kiocb *kiocb, struct iov_iter *to, #if defined(HAVE_VFS_IOV_ITER) zfs_uio_iov_iter_init(uio, to, pos, count, skip); #else -#ifdef HAVE_IOV_ITER_TYPE - zfs_uio_iovec_init(uio, to->iov, to->nr_segs, pos, - iov_iter_type(to) & ITER_KVEC ? UIO_SYSSPACE : UIO_USERSPACE, + zfs_uio_iovec_init(uio, zfs_uio_iter_iov(to), to->nr_segs, pos, + zfs_uio_iov_iter_type(to) & ITER_KVEC ? + UIO_SYSSPACE : UIO_USERSPACE, count, skip); -#else - zfs_uio_iovec_init(uio, to->iov, to->nr_segs, pos, - to->type & ITER_KVEC ? UIO_SYSSPACE : UIO_USERSPACE, - count, skip); -#endif #endif } @@ -1328,7 +1323,11 @@ const struct file_operations zpl_file_operations = { .read_iter = zpl_iter_read, .write_iter = zpl_iter_write, #ifdef HAVE_VFS_IOV_ITER +#ifdef HAVE_COPY_SPLICE_READ + .splice_read = copy_splice_read, +#else .splice_read = generic_file_splice_read, +#endif .splice_write = iter_file_splice_write, #endif #else diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c index 38bc8e2c4eeb..7a95b54bdf0d 100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c @@ -671,7 +671,11 @@ zvol_request(struct request_queue *q, struct bio *bio) } static int +#ifdef HAVE_BLK_MODE_T +zvol_open(struct gendisk *disk, blk_mode_t flag) +#else zvol_open(struct block_device *bdev, fmode_t flag) +#endif { zvol_state_t *zv; int error = 0; @@ -686,10 +690,14 @@ retry: /* * Obtain a copy of private_data under the zvol_state_lock to make * sure that either the result of zvol free code path setting - * bdev->bd_disk->private_data to NULL is observed, or zvol_os_free() + * disk->private_data to NULL is observed, or zvol_os_free() * is not called on this zv because of the positive zv_open_count. */ +#ifdef HAVE_BLK_MODE_T + zv = disk->private_data; +#else zv = bdev->bd_disk->private_data; +#endif if (zv == NULL) { rw_exit(&zvol_state_lock); return (SET_ERROR(-ENXIO)); @@ -769,14 +777,15 @@ retry: } } - error = -zvol_first_open(zv, !(flag & FMODE_WRITE)); + error = -zvol_first_open(zv, !(blk_mode_is_open_write(flag))); if (drop_namespace) mutex_exit(&spa_namespace_lock); } if (error == 0) { - if ((flag & FMODE_WRITE) && (zv->zv_flags & ZVOL_RDONLY)) { + if ((blk_mode_is_open_write(flag)) && + (zv->zv_flags & ZVOL_RDONLY)) { if (zv->zv_open_count == 0) *** 204 LINES SKIPPED *** From nobody Sun Sep 24 17:35:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RttSC6fGGz4vDfg; Sun, 24 Sep 2023 17:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RttSC641Xz3YJ4; Sun, 24 Sep 2023 17:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695576907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO1nkZ3JPHbEA13mW2ql2vpyqQ+r1y3YT9dBBbJ2ty0=; b=o7U02tlf2avPlMvkGRGYQmh9HBVTR1oiCC6bx0jtBe8HGQXZ3Ns3QOw5xFR8TvFjaQUSjn O+GVgWwAvKuW6ZCNvgvaO+Na2yYkAnwAxGu5GMCnRuXzQhGs9IyNJ+DFrjoIAWbYVOHRtD lmymI9folSe8gox1biJYhZU2HdElflhznKQFwUQGth57f0wJnJSNVNjzm6iZkU6WutaesR WMBYOi6usAq+bJ71ozehIHMvvYJvjTcTuhmrhzdYbumARDJDkZEF2pkO+bJf7/O5zCa/3c SJSf6OvdkiNzrd12y5Of/xuVq9RhBhmeUA3orWg+XMTI+NEuwA7NLHQd4vhFCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695576907; a=rsa-sha256; cv=none; b=UriSVStz4MRNxdfN7nVKZ5EtjLTEoEj1EHwNTs1O5vljaCyEKxOEVkIUXsQ/T9jVOOY8qC t4S8Yq107U0Bircru5TeJFfAhMAZQoxakEYUgY+09SS7bTMPAaAuiuxHiJpA8xLzJsDMXt Nb9DMXsp96dppnGhnH0Tj9wi7fpYStjVZfJG7/dwRW5z1NiuII8rqoEqeZEje10pADO7mv MzqXC1tj80W2PXP3NvUAfgi/71zg0sP5Mh5epgoxrz8+icmsJ3snQpAXN7uuB//uT2vGYB fKzQm2M9qnyOwbVkZicdOxiDikSaLcr8UH7hhz9vDxSLjYUQdopJ5UXP1uSWYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695576907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO1nkZ3JPHbEA13mW2ql2vpyqQ+r1y3YT9dBBbJ2ty0=; b=Ilvrpxvp1amH74p3SH8P8VTaM6y69AZFmGxV2Yh9P9tKrjY05Xj70CxgsWqtej8L+8K6DG pfnxf4BWrczEem66u+rWHjphA8gQVgyLhAZ4U0BN9QzZmyjDoCgDlQil3jjqd1wfLV1rRB ZSoX4+unIJEg7CVpNgjx45lXq/3jKDJEPRIYaXHxNi5QZ10pe5EAICYSk9BGf4KmBqvKIK ZKzwnzht1EBMN2dwItcVBYy+OmrMONx1YVZCS/V11Dn9rsRsp62RXOiTQG3xj9ajT8Ugbm NoT6120WIgSRC+Xr4PsjM6cYjiSVGyT9g79LP/AK7KWLHl+alCmfrXn4v35xsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RttSC57RLzwfF; Sun, 24 Sep 2023 17:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OHZ7CX011739; Sun, 24 Sep 2023 17:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OHZ7rr011736; Sun, 24 Sep 2023 17:35:07 GMT (envelope-from git) Date: Sun, 24 Sep 2023 17:35:07 GMT Message-Id: <202309241735.38OHZ7rr011736@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: 0a5d2802b41f - main - vge: correct pause_frames sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0a5d2802b41fd216d9a345f749af1a6ccbe9f382 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0a5d2802b41fd216d9a345f749af1a6ccbe9f382 commit 0a5d2802b41fd216d9a345f749af1a6ccbe9f382 Author: Priit Trees AuthorDate: 2023-07-28 21:41:22 +0000 Commit: Ed Maste CommitDate: 2023-09-24 17:34:36 +0000 vge: correct pause_frames sysctl description Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/806 --- sys/dev/vge/if_vge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 04c1c764cdd5..fcc47598454e 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -2564,7 +2564,7 @@ vge_sysctl_node(struct vge_softc *sc) VGE_SYSCTL_STAT_ADD32(ctx, child, "crcerrs", &stats->rx_crcerrs, "CRC errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "pause_frames", - &stats->rx_pause_frames, "CRC errors"); + &stats->rx_pause_frames, "Pause frames"); VGE_SYSCTL_STAT_ADD32(ctx, child, "align_errs", &stats->rx_alignerrs, "Alignment errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "nobufs", From nobody Sun Sep 24 21:46:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02Z69dvz4tX5Z; Sun, 24 Sep 2023 21:46: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 4Rv02Z5TNPz4Z2v; Sun, 24 Sep 2023 21:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M4pC4K86M0CfrLuGw5+WNlKfpYK82853FQkmsbwl3fU=; b=FDs4ftyYvmmn48RiytD+M7+1HYSrhNe60+B0FfrFCszXiVcrtWZ7mW7EhPAWUmwoJmim+V 375IpYtD2GYaMVcpDw5BTFjgovp54p9oB9v9C0pQxuhLC7wL0rzD/S0KoRfzRBYnRiZQuA OrLwvuBNb94efn/o/uSBz5nSrVT8MchRrfJWQ2zBGrHgNXoWc7N+WEd/PtrKHtuG0DGo8N GZdkp3hHxW9lLBNbok7D7f0CMn3L3q1ASIVsrVwtBN9mYi/Irl3tM5gSkdOdk1AyY0+H2J Gfy2Pm3QnBzqlKsTjmcrAJJngge8c0Fprj3i6vhfmgHoCN3ywITZ2NEzAZhJpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592006; a=rsa-sha256; cv=none; b=a5xcTAqgKjbTWhAktX7NnTCqcCEE+Ry8BfCAtV9rG+/0AjuxGvHc9Lkou8VKpcGq9kna0h IJwIZRmOynYvat4bQNwEdWEuKrFI2w3/gDGaOsu+4hEH0m/cUlum0JUIp9MIJtBCywjPY9 ksN5XTMn1K7lTIOfKctGuQJu1j1abOn026Tqmf8ynGVwIeU90HWEfAU35IYFnsHSiAFg8B wBmpPzLg1zI8ShO/5gLqhe9kiCMBsgRAaqQiKqB6BCETaVE2+OYsLNBT4neqdytFRFvNZl iQsYj2OuCmw3tfYTU1rxWLT+N9UCeaN3EGnHG5U1jWs3VG/o+uzrcXmBOJd1FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M4pC4K86M0CfrLuGw5+WNlKfpYK82853FQkmsbwl3fU=; b=A4ehjxsAowFHnMg4u2sKDfIi2zEuwJgCsr1056USKh3IX3NPMo4aYssNGmpmfpf1KcAhhD u6ElvMWCs7R9XVRvQAoHl/ZRnQKUuUewGNCYixOFvCSsWGuSeMtK7GJVr5JoaMidFXvgsj vBFelMeDYd9hSyT4xpQ7nguJc4gYVqya7ihPo/09Hd3H58pkHlev4IjTzSwcZsznX0JjMs hhYlOokEaM5nlFaP18EWexjBWnB9JHDVhaEmnslQKfm8TGce3zxCZrAC6zS6TnJMbJMVu1 rhGrM46Pg3AVyPndd6hLYZTer4MJ0NkJmX2rIKEzxL/GDxeA19BHLSY8J2UwJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02Z4XKVz13ff; Sun, 24 Sep 2023 21:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkkxp030279; Sun, 24 Sep 2023 21:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkkBW030276; Sun, 24 Sep 2023 21:46:46 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:46 GMT Message-Id: <202309242146.38OLkkBW030276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: fb4c1757a920 - releng/14.0 - drm2: whack set-but-not-used warns List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: fb4c1757a920be7194fed954e799cfd2a0959be0 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fb4c1757a920be7194fed954e799cfd2a0959be0 commit fb4c1757a920be7194fed954e799cfd2a0959be0 Author: Mateusz Guzik AuthorDate: 2023-09-18 21:11:26 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:06 +0000 drm2: whack set-but-not-used warns immediate MFC to unbreak the build Approved by: re (gjb) (cherry picked from commit c9130a46bca272492b4f29429ed340504b8eced7) (cherry picked from commit be6f70428d6c918998e5430d2b60b9a8897ea9d8) --- sys/dev/drm2/drm_fops.c | 2 +- sys/dev/drm2/ttm/ttm_lock.c | 2 +- sys/dev/drm2/ttm/ttm_tt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/drm2/drm_fops.c b/sys/dev/drm2/drm_fops.c index 5d040e92ed12..316d21a8e731 100644 --- a/sys/dev/drm2/drm_fops.c +++ b/sys/dev/drm2/drm_fops.c @@ -536,7 +536,7 @@ void drm_event_wakeup(struct drm_pending_event *e) { struct drm_file *file_priv; - struct drm_device *dev; + struct drm_device *dev __diagused; file_priv = e->file_priv; dev = file_priv->minor->dev; diff --git a/sys/dev/drm2/ttm/ttm_lock.c b/sys/dev/drm2/ttm/ttm_lock.c index 9a8cafbf2abc..1884acb12118 100644 --- a/sys/dev/drm2/ttm/ttm_lock.c +++ b/sys/dev/drm2/ttm/ttm_lock.c @@ -245,7 +245,7 @@ static void ttm_vt_lock_remove(struct ttm_base_object **p_base) { struct ttm_base_object *base = *p_base; struct ttm_lock *lock = container_of(base, struct ttm_lock, base); - int ret; + int ret __diagused; *p_base = NULL; ret = __ttm_vt_unlock(lock); diff --git a/sys/dev/drm2/ttm/ttm_tt.c b/sys/dev/drm2/ttm/ttm_tt.c index 55131c73bdc3..d52df50adeb3 100644 --- a/sys/dev/drm2/ttm/ttm_tt.c +++ b/sys/dev/drm2/ttm/ttm_tt.c @@ -243,7 +243,7 @@ void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma) void ttm_tt_unbind(struct ttm_tt *ttm) { - int ret; + int ret __diagused; if (ttm->state == tt_bound) { ret = ttm->func->unbind(ttm); From nobody Sun Sep 24 21:46:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02b71fCz4tX89; Sun, 24 Sep 2023 21:46: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 4Rv02b6Rdmz4Ys8; Sun, 24 Sep 2023 21:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W9LM3rfhSVlF/BkaVxDnU2UlcrtWDPgpMbhKeC6tLhI=; b=aAqcDNyWt7AOsQpdRIr/ldgPDJZy7vYsv2TrfbF9BmRMwUZl+5FWpJkv5tnQaiNeM2Ofyy E3jXgG82rY4q2RX4P+6pULLkvOpiYoHUqOqyRIQh5SYX1oYtrGIWpqWwuimQHjieaYjiUE 1vEGut5bF35U9HACWHfkriMDscPjLCVyGWmvgLiUn4obreLF+G0i/jaZTkpX+U0mERvGMd AF7kwV0Z4IJmBW3OUrgHNFqRT2oKHyMK0wTIm7u4BA3DPdxsT1elFzYjzfQ3JOpd9wmVfX LBrKj7BW89UOS2YVCjEKYY65QOYdimDhZD7TGeUC4OBUrOgan096wgF0ZnfDpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592007; a=rsa-sha256; cv=none; b=ck/VIiZP/P0cRqFDEUD1IFPWXDZbtqUiJEaoLVxFNUubqa5m0EcCi+DtS/ZxVA8545UIOy t2RmQLRQ/UusoqmQklQXnMsqMJyHXYpK/2nllcW/p5M8DVIP/VO5jJKg/qyjfGkEIj6pLW qEVO/1WO1f5SERx+kqjcrACoT6HAZIZ0mRUX1+oKLPKpJwtlStFbVo74pq0Pt1r732aZ3Q 9CtU6rBSxMNIePt+9h6wCZj/PKAVc+lJVv1CldYLH/tYBu4AXXAESa3mubMW+t10Mb1kik op4oEr5YD0qxTuK3aS0yCB02zSL2ssXifeY8ozMbAfPsHHjs36bFCf5sltWdjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W9LM3rfhSVlF/BkaVxDnU2UlcrtWDPgpMbhKeC6tLhI=; b=HpHwSLshLkFNnfeWeXYbnoHDSrtkRpVzF3Nk9xKaikqergKsrGx3hdGRHHgPRNj7s8Np2v jydDCgR4MYWJ4XZSUsiyfeqEkAjwma3SWOj1wcCiHhgFHxQnnh37tVqO28tBHf19kwFRBr 57JSGm97q2fz0ovdqEb+3eGg7IPReQ47Ye9GvYZ5YnpSjYLxgR2UxgU/9j8Z5hOmsubPc5 TA4/lGqkK59y95PwwZfcvCGu+P/ZGLEmd06+uq4MfuD2WhIJMybFESEAG8g8DZzoxvRTPt d0zNon8t4Bg0fWUnFs0OSwrAIkvwwSi4C3Okd/Mdio7VeJbnyWCIo3EMDJUYeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02b5YS7z13fg; Sun, 24 Sep 2023 21:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkl68030348; Sun, 24 Sep 2023 21:46:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkluf030345; Sun, 24 Sep 2023 21:46:47 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:47 GMT Message-Id: <202309242146.38OLkluf030345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 2701cbf16165 - releng/14.0 - vfs cache: fix a hang when bumping vnode limit too high List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 2701cbf16165adbd782c6eea816d4b7214a1d2b8 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2701cbf16165adbd782c6eea816d4b7214a1d2b8 commit 2701cbf16165adbd782c6eea816d4b7214a1d2b8 Author: Mateusz Guzik AuthorDate: 2023-09-02 14:27:33 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:23 +0000 vfs cache: fix a hang when bumping vnode limit too high Overflow in cache_changesize would make the value flip to 0 and stay there as 0 << 1 does not do anything. Note callers limit the outcome to something below u_int. Also note there entire vnode handling thing both in vfs layer as a whole and this file can't decide whether to long, u_long or u_int. Approved by: re (gjb) (cherry picked from commit 32988c1499f8698b41e15ed40a46d271e757bba3) (cherry picked from commit 41fad6503c1e5259e65d4f14110a5decb7653b02) --- sys/kern/vfs_cache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 92c926a16afb..5b0cd64146ad 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -2597,10 +2597,10 @@ cache_enter_time_flags(struct vnode *dvp, struct vnode *vp, struct componentname cache_enter_time(dvp, vp, cnp, tsp, dtsp); } -static u_int -cache_roundup_2(u_int val) +static u_long +cache_roundup_2(u_long val) { - u_int res; + u_long res; for (res = 1; res <= val; res <<= 1) continue; @@ -2616,7 +2616,7 @@ nchinittbl(u_long elements, u_long *hashmask) hashsize = cache_roundup_2(elements) / 2; - hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); + hashtbl = malloc(hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); for (i = 0; i < hashsize; i++) CK_SLIST_INIT(&hashtbl[i]); *hashmask = hashsize - 1; @@ -2762,7 +2762,7 @@ cache_changesize(u_long newmaxvnodes) struct namecache *ncp; uint32_t hash; u_long newncsize; - int i; + u_long i; newncsize = newmaxvnodes * ncsizefactor; newmaxvnodes = cache_roundup_2(newmaxvnodes * 2); From nobody Sun Sep 24 21:46:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02d0sC0z4tWfr; Sun, 24 Sep 2023 21:46: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 4Rv02d04Lgz4Ymf; Sun, 24 Sep 2023 21:46:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=exRroulhWS+3yf8+DNuZolB/Ltf4WMaPMaSu10VbdfU=; b=VMwEVZTC5Y/t6USEcOuXkRWzwR+qn7mHznNwphdXIfLfLdPZ9CRD+W5dxd5r1nagdgCveI GSjLsf70fQCmgNqbOck9x6NCRPUnrtCE5pcY+Ubaqo4rOQ1ZGa4/BcUFBmQuODAHiN4nTp iQ88MnzxOBTcgbT3qdc3uZkA/Z5xzLF59ithDcFF1/zxwZ7jk0F/Q/RB/ZCrkExh34S/HR pfW5VBxeSWbUhrF+0keID4zBE89fn1E2qnPGVkTBXAMgfgdid3rz2uaUdjWwMXk+pv0MeO X1w7ZIqd2gwIO1RuFYLA6n4ouu5JZLh/hwWz89VJTlEvZiEGgH/nV7lQcqV2/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592009; a=rsa-sha256; cv=none; b=WhMzglcpIlmljHsrFRNWfwEhCAf4zqdI1RjSzyLo+PQ0y9AP6fuGk6fzmgp7jxRZ42EBbW Bl1e/nBtv2kc0O5bW1RztrHMfZBMhWIc8+GaBL5OwdDxF71Gk3jRUfnbrHxuQGXe+jwEWm Wb/BiN/xY7R+mMIYdFgS+Z7s5lGUrxZu+B826A5MTo/ZbtZZch0/7pwKm/ae8wZhCox7Za O0Ly3Cb6Zw8c8pDnItcIKP8dqT5NgPcb0RIain5axHAj2aV5KRWCDwqMUoj5v4Prv+li2n aLUCfoia1NE32bNL9QeadGqxH/EwYG60+z2LXcEC6boEjzlMcyCnFxDEGuOItQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=exRroulhWS+3yf8+DNuZolB/Ltf4WMaPMaSu10VbdfU=; b=jg9nV5X4hchemKWMOW7JmJwSk6skIcziF9FHdYqbWbFngQX6Lm/XDqjeXXEicXM1d/MHe2 Lgy9lnO9miq1fjh3CJgBSewjMRJVCoHqj7AOwTyZdc3dbKzOAMBhSLaq2Qoxk4BwbpwrI2 a+18vOcEDo42mcAZcnVcFFbuj2YvIxwJuzJLH1gNFmvlqepkOzt6ShurHuNt3QQqUjOy/B rrkBpY/08eBNNzaAUIrLfhDGH8h3iY1OdLN+HSRNed8BuMCZALoyJKoSzZ1O+UMLEH53nM eUw5IoacIsak/b3KmOLOA5IhdRGktGbh4SLB5/Lyw4VyNgtxxAYydOxdiVX8BQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02c6Hb1z13hy; Sun, 24 Sep 2023 21:46:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkmLD030399; Sun, 24 Sep 2023 21:46:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkmud030396; Sun, 24 Sep 2023 21:46:48 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:48 GMT Message-Id: <202309242146.38OLkmud030396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: efc027d99c76 - releng/14.0 - ufs: restore name cache fast path lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: efc027d99c76dd8d4d1a7de232142c7d54632faf Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=efc027d99c76dd8d4d1a7de232142c7d54632faf commit efc027d99c76dd8d4d1a7de232142c7d54632faf Author: Mateusz Guzik AuthorDate: 2023-09-09 21:48:57 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:27 +0000 ufs: restore name cache fast path lookup Found by: dchagin Fixes: f3c81b973897 ("ufs: add missing vop_fplookup ops") Approved by: re (gjb) (cherry picked from commit a87c6962affc2d1994d8f30806c934eb4cb7af22) (cherry picked from commit 25d8cf225ac29bb450bf52866aa6d169b9193178) --- sys/ufs/ffs/ffs_vnops.c | 6 ++++-- sys/ufs/ufs/ufs_vnops.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 0dd64f696e0c..2b11a15c46c9 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -135,6 +135,8 @@ static vop_setextattr_t ffs_setextattr; static vop_vptofh_t ffs_vptofh; static vop_vput_pair_t ffs_vput_pair; +vop_fplookup_vexec_t ufs_fplookup_vexec; + /* Global vfs data structures for ufs. */ struct vop_vector ffs_vnodeops1 = { .vop_default = &ufs_vnodeops, @@ -151,7 +153,7 @@ struct vop_vector ffs_vnodeops1 = { .vop_write = ffs_write, .vop_vptofh = ffs_vptofh, .vop_vput_pair = ffs_vput_pair, - .vop_fplookup_vexec = VOP_EAGAIN, + .vop_fplookup_vexec = ufs_fplookup_vexec, .vop_fplookup_symlink = VOP_EAGAIN, }; VFS_VOP_VECTOR_REGISTER(ffs_vnodeops1); @@ -192,7 +194,7 @@ struct vop_vector ffs_vnodeops2 = { .vop_setextattr = ffs_setextattr, .vop_vptofh = ffs_vptofh, .vop_vput_pair = ffs_vput_pair, - .vop_fplookup_vexec = VOP_EAGAIN, + .vop_fplookup_vexec = ufs_fplookup_vexec, .vop_fplookup_symlink = VOP_EAGAIN, }; VFS_VOP_VECTOR_REGISTER(ffs_vnodeops2); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index a7d5e8ba96fc..79cca75fc563 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -101,7 +101,7 @@ VFS_SMR_DECLARE; #include static vop_accessx_t ufs_accessx; -static vop_fplookup_vexec_t ufs_fplookup_vexec; +vop_fplookup_vexec_t ufs_fplookup_vexec; static int ufs_chmod(struct vnode *, int, struct ucred *, struct thread *); static int ufs_chown(struct vnode *, uid_t, gid_t, struct ucred *, struct thread *); @@ -475,7 +475,7 @@ ufs_accessx( * VOP_FPLOOKUP_VEXEC routines are subject to special circumstances, see * the comment above cache_fplookup for details. */ -static int +int ufs_fplookup_vexec( struct vop_fplookup_vexec_args /* { struct vnode *a_vp; From nobody Sun Sep 24 21:46:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02f2FpBz4tWjN; Sun, 24 Sep 2023 21: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 4Rv02f1Wrgz4ZFX; Sun, 24 Sep 2023 21: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=1695592010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QSx/LXuVAClD9+8q7i6FxDKbIZE5u2+C5Ud3nlKpn4=; b=DnkX01S7xbod2eTXeNFlpLFnwqrrVelz9m6xoYnixXfmaeGWU1wXjssknqrmSsOl98D1q3 fw4/c6jJdUwKpCyn6i0T7NFbOEyxK+w74cC8YhZUIXhBc/EMtzxqENzISbhF/6QBwcfOD7 RcZAyylKTjBuyquMD376tHHvlF21Ae/v2K5cPuso5kItFxtlPknZR8PlUP/xsIiW6AVqnV zxYy4WZv2grmNQv1ef7i6UqfRr1K949SnfAqFebeLYvJvJjcyfM/FxlNWuN+GvW/QPPDkq RLV2upzM8ieVjURQ1M33WbsJiU0Zib1+FanbRRFov9tJpTtaBPdIiZFFoppiMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592010; a=rsa-sha256; cv=none; b=lQxNI6riaZ/AG9R3iqeSDZigl62m4ZRrZE/TCoDrc1BsCkE3wU6vwFxuRZHqcsITsVVkt2 9vecEj1pZADSsQ2TDuAbvKqWgH6UHiN3H1rcb2M0JATp0ZtJGZMFoQw3jcbOGQKNQptlQl pgd2pE7L/ZLtIMgV3Ja5DZW9TtSJCuNUC4PJO4pUA8vmKYQFivg9KoGtAXIG8KZG/Mizh6 qnaPlpImE5AnnmpIWmWr4qiqXPYFii4VKaq90gVYezh/rinRZqj5bI6vZ9KK64Iv8fEPG+ AJBuAqGf0iegYkC1H+959iF6plpoZmrxVqu4HFZCwuJAD0ekvyoNsTTAOjj0yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QSx/LXuVAClD9+8q7i6FxDKbIZE5u2+C5Ud3nlKpn4=; b=V7NLEJLdOe2qeIlcKOiEYveph8frAF3wzQEQ1vUE/UxBljM7XjIhlpoBHdI1fhsDKf10Gk wj5Ih3ajy8YBPoHrQeHIJ/wGPJ+Wlrojjs6BSM8JXKf9wo0KKZgeOZZcDEpuPp+l6ErW4a fMF4HGrTBNB5Qnn5NdGfGK7TJWc2//PKu+nR8bgCbJJo0d8R/Z9cA0nx8lB2FbM2k3JQSo Rq7YwTcIHxE/CkPH1xh9UA/meYEdYHfFqLA8EI9rXGA2clhSQQ1c7ys1qyReJ7KihUGV/s Q5q5s2SP7unmYgHAfNH+5XRGLcbkfnK8pqYTPWgHwMRnQ1SdwBuIQrsfWkFjMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02f0VwCz13fh; Sun, 24 Sep 2023 21:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLknVt030467; Sun, 24 Sep 2023 21:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLknQS030464; Sun, 24 Sep 2023 21:46:49 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:49 GMT Message-Id: <202309242146.38OLknQS030464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: aeb0da3771a5 - releng/14.0 - vfs: drop one vnode list lock trip during vnlru free recycle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: aeb0da3771a504de37c2311ea838b0edc9fdee98 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=aeb0da3771a504de37c2311ea838b0edc9fdee98 commit aeb0da3771a504de37c2311ea838b0edc9fdee98 Author: Mateusz Guzik AuthorDate: 2023-09-14 14:35:40 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:35 +0000 vfs: drop one vnode list lock trip during vnlru free recycle vnlru_free_impl would take the lock prior to returning even though most frequent caller does not need it. Unsurprisingly vnode_list mtx is the primary bottleneck when recycling and avoiding the useless lock trip helps. Setting maxvnodes to 400000 and running 20 parallel finds each with a dedicated directory tree of 1 million vnodes in total: before: 4.50s user 1225.71s system 1979% cpu 1:02.14 total after: 4.20s user 806.23s system 1973% cpu 41.059 total That's 34% reduction in total real time. With this the block *remains* the primary bottleneck when running on ZFS. Approved by: re (gjb) (cherry picked from commit 74be676d87745eb727642f6f8329236c848929d5) (cherry picked from commit 206dd9d1a82df140a6071545a2dc558e8d9f5ad0) --- sys/kern/vfs_subr.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 1c6827ba0587..80ec15f78028 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1290,13 +1290,14 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) mtx_assert(&vnode_list_mtx, MA_OWNED); if (count > max_vnlru_free) count = max_vnlru_free; + if (count == 0) { + mtx_unlock(&vnode_list_mtx); + return (0); + } ocount = count; retried = false; vp = mvp; for (;;) { - if (count == 0) { - break; - } vp = TAILQ_NEXT(vp, v_vnodelist); if (__predict_false(vp == NULL)) { /* @@ -1319,6 +1320,7 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) */ TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); TAILQ_INSERT_TAIL(&vnode_list, mvp, v_vnodelist); + mtx_unlock(&vnode_list_mtx); break; } if (__predict_false(vp->v_type == VMARKER)) @@ -1366,18 +1368,28 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) */ vtryrecycle(vp); count--; + if (count == 0) { + break; + } mtx_lock(&vnode_list_mtx); vp = mvp; } + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); return (ocount - count); } +/* + * XXX: returns without vnode_list_mtx locked! + */ static int vnlru_free_locked(int count) { + int ret; mtx_assert(&vnode_list_mtx, MA_OWNED); - return (vnlru_free_impl(count, NULL, vnode_list_free_marker)); + ret = vnlru_free_impl(count, NULL, vnode_list_free_marker); + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); + return (ret); } void @@ -1389,7 +1401,7 @@ vnlru_free_vfsops(int count, struct vfsops *mnt_op, struct vnode *mvp) VNPASS(mvp->v_type == VMARKER, mvp); mtx_lock(&vnode_list_mtx); vnlru_free_impl(count, mnt_op, mvp); - mtx_unlock(&vnode_list_mtx); + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); } struct vnode * @@ -1534,7 +1546,7 @@ vnlru_under_unlocked(u_long rnumvnodes, u_long limit) } static void -vnlru_kick(void) +vnlru_kick_locked(void) { mtx_assert(&vnode_list_mtx, MA_OWNED); @@ -1544,6 +1556,15 @@ vnlru_kick(void) } } +static void +vnlru_kick(void) +{ + + mtx_lock(&vnode_list_mtx); + vnlru_kick_locked(); + mtx_unlock(&vnode_list_mtx); +} + static void vnlru_proc(void) { @@ -1574,6 +1595,7 @@ vnlru_proc(void) */ if (rnumvnodes > desiredvnodes) { vnlru_free_locked(rnumvnodes - desiredvnodes); + mtx_lock(&vnode_list_mtx); rnumvnodes = atomic_load_long(&numvnodes); } /* @@ -1751,6 +1773,7 @@ vn_alloc_hard(struct mount *mp) rnumvnodes = atomic_load_long(&numvnodes); if (rnumvnodes + 1 < desiredvnodes) { vn_alloc_cyclecount = 0; + mtx_unlock(&vnode_list_mtx); goto alloc; } rfreevnodes = vnlru_read_freevnodes(); @@ -1770,22 +1793,26 @@ vn_alloc_hard(struct mount *mp) */ if (vnlru_free_locked(1) > 0) goto alloc; + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); if (mp == NULL || (mp->mnt_kern_flag & MNTK_SUSPEND) == 0) { /* * Wait for space for a new vnode. */ - vnlru_kick(); + mtx_lock(&vnode_list_mtx); + vnlru_kick_locked(); vn_alloc_sleeps++; msleep(&vnlruproc_sig, &vnode_list_mtx, PVFS, "vlruwk", hz); if (atomic_load_long(&numvnodes) + 1 > desiredvnodes && vnlru_read_freevnodes() > 1) vnlru_free_locked(1); + else + mtx_unlock(&vnode_list_mtx); } alloc: + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; if (vnlru_under(rnumvnodes, vlowat)) vnlru_kick(); - mtx_unlock(&vnode_list_mtx); return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } From nobody Sun Sep 24 21:46:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02g2rYmz4tX11; Sun, 24 Sep 2023 21: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 4Rv02g1wJfz4ZJP; Sun, 24 Sep 2023 21: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=1695592011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1xn26coI1oiYtCXQZyzC9mqE4FY5Liz4DRHTqg6Riw=; b=lRkPP3htMtxj+Cn+GTKy/fBmRpijPFj9KfUegeXH9mCyn1EQkfX6YOLe/OH/JMjOMk8BlQ V/3eCNsymeU3J8K8yacw4I6rDAyLg3WnveVDPNxWHenlkr22wykpHOQImYT1IiUn8tNnUX ylrMRlbXPvh8Yo1/tHhH7rVja2JgrSHjY0C0xtkmWIP8i3F4+sQfXfBt08hc2TzFMRArMW 8iby0e6Zfod9raHrdSdXpp8RlB6rRdjvMovEypIlERIGx9AsMZ0vF8cZws57JSTGoi9whj 1+L5RvEbGGGgJ+1TXfhUtXNdortLbBCKeL0G6qO8YMdM4BYs3euq7HPKZw2O8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592011; a=rsa-sha256; cv=none; b=Z8/rGEEimfYVuhWoc7e0K8avXhv9hUp3TnTifmnbhgfdlkb+Nbthpct5BXpq1GagWpJvmw 99WS3FZfgI/dxmmTPXJOMswJd5qG4UqKr17Udhz/0IZOemSpMR7nYo3lZY1T27Qc+z3Jb1 wnXU6Gd3TfaprGMgpR06oNqaLoOMAUFm/KoiD84Z2i5z0XO5dBpliLW5dXF83MlyRsrfcs ZBC/7QQwy7CnRXB0A5TzVXg/gkjdgeUa/W6BhZ30JLbLTWcZxwXc/LJpDMvBYEtWgQCuID rHsGxCrwxfPcWHlAp8/51nXyCtO5zNzDlbMv2rY7jl2O9dFLnQwvgTTbhsr+Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1xn26coI1oiYtCXQZyzC9mqE4FY5Liz4DRHTqg6Riw=; b=GDPQxSKTjuRewAbSkFfyMdZJYPFWGQqoGvK0zjQJ8rj1wCoQfFvQbpu6l7q63caqKov5E4 AzCuzOjafIJkZENN+YnbsCu3UXdtVcpW+l7QA4vEaYiOu/EG3c9QuLdg2Bd/IyOdzWFsAK ndoQfOyTqJBnO1uf/FCm0m4NNw1LShthNfSsA7GmzXdUbQmNWHu3xEnzjlh9C14mKrYTJw BXRFb7zZ9rIRIfsL3iSswkM/uo39OUIzL6xDdfJLwr8H16LZEBkz59uEMw/dfxt5+Lwj67 6tZCmFDDMgu9xHB1cnkXidiEGw2lCSTG84YAwRR5hfTmS+ad0VNAQcymYBhogg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02g0yM7z13j0; Sun, 24 Sep 2023 21:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkpxM030521; Sun, 24 Sep 2023 21:46:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkpBI030518; Sun, 24 Sep 2023 21:46:51 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:51 GMT Message-Id: <202309242146.38OLkpBI030518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 3e8f649ec351 - releng/14.0 - vfs: don't kick vnlru if it is already running List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 3e8f649ec3516a5506bbd3fd95051448e3b1b6d5 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3e8f649ec3516a5506bbd3fd95051448e3b1b6d5 commit 3e8f649ec3516a5506bbd3fd95051448e3b1b6d5 Author: Mateusz Guzik AuthorDate: 2023-09-14 16:27:47 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:41 +0000 vfs: don't kick vnlru if it is already running Further shaves some lock trips. Approved by: re (gjb) (cherry picked from commit 76f1153790b6d2e1a4f0389c3ac24e41d08f9ba6) (cherry picked from commit 2ea531b264df97bfea7d74c7f9414b2d3c5d4277) --- sys/kern/vfs_subr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 80ec15f78028..4c9cb6200f10 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1557,9 +1557,11 @@ vnlru_kick_locked(void) } static void -vnlru_kick(void) +vnlru_kick_cond(void) { + if (vnlruproc_sig) + return; mtx_lock(&vnode_list_mtx); vnlru_kick_locked(); mtx_unlock(&vnode_list_mtx); @@ -1812,7 +1814,7 @@ alloc: mtx_assert(&vnode_list_mtx, MA_NOTOWNED); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; if (vnlru_under(rnumvnodes, vlowat)) - vnlru_kick(); + vnlru_kick_cond(); return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } From nobody Sun Sep 24 21:46:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02h42zMz4tWvf; Sun, 24 Sep 2023 21: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 4Rv02h2qYdz4ZGY; Sun, 24 Sep 2023 21: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=1695592012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UVPZsZctgfe5jgXCj8jw24a+VPajrmNsb6GShSGar8c=; b=kAdgNFzZQ/oouZ5G/Oc2K9M9/DxS45Bi3oJlxxtVXqNVEeCY+KF6rMj8YizptmtW3WNiwA 0Gpt6zJLjLNFj543723wwkWr0/L6l3VSSINNgMYA1cw+ETuQYU2CnAfQNABk+RdbeOJNaw /NdK8jrjnZbzb9CS5E6SSlzkzulTQ6Z0zim5HaUEqM8NwaBF6ySq2kBnOus0ffiTW5I8xY f0AcTqOJw0soE/k5OMX6LHMQiThKxfgfud+MzXB4Z476B5LIt6MhXJsvdXUcut0qrYVs9Z uuYcrROOiRXseXn51M8Kai77OQrbJY5q+RmrqPdIk9p05C6HhpeAxilaNBSc6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592012; a=rsa-sha256; cv=none; b=s6makEfx1KNA0XziwwD9PFx6WM9UnQ6rKOt/fVho31fmxc6GLw+BGwoXcEMdeV1Sq7HQRH IJAejNvu6CiZaatjxDK+xSJ+kiqVEtHqgLe1HqD6+3Fr/hgKA8WURDCpjxjh9JGLZ10tgL fuPBUNW0jCgevp6JF/gpUtsLLhelaCLWUHruetcnVeiHsXncqGnGN5dKhuaxonuQ1rh6E0 h9a2Zc2x8pH2Vo7kofDotsqw5E7N2SGHGAYq/pBTmsfb7sMsXw90M5u+cUyptZa0pM5SPz qTAOKODbsr4idvu0fSeqKKGazLT4uCpi+wBa7n3V7BqcxsPMLfXQwpQQw7x2iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UVPZsZctgfe5jgXCj8jw24a+VPajrmNsb6GShSGar8c=; b=dRpY7OqdeLe/WaWiv4k8ozfgjEyQ41UfSrpi+UAMGLRkw5MgYYzyq8a3/rOPp4DssHryoE 3EjKqbr8deFhJsaL3og9KQyzN/7Ge3BaIG9PSX3RMJBAvuoXH7Jo7rHDlOAo/R1vt+0LNo k233bPA6JtTbt/9NhPeQg368mgaGS7dLdgJnGXGzYIVvH8q5tnCpIiPTcuVdWa83euS/c+ EFBSpw1Tkts2eIkKH/fbDSQD4tctWXd0MFHyWjAaayoDBuzStkmzcFriekWFTNlDBrf4w2 /SY1Alsxnc+OiLqhnOsj+BszV4SJJy5UFwonAN533DTv5ZEOGUIYX4y/NfN4kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02h1xB5z13Vf; Sun, 24 Sep 2023 21:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkqMH030569; Sun, 24 Sep 2023 21:46:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkqQD030566; Sun, 24 Sep 2023 21:46:52 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:52 GMT Message-Id: <202309242146.38OLkqQD030566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 6d5db9c5239b - releng/14.0 - vfs: fix stale comment about freevnodes management List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 6d5db9c5239b3ed27fec9d52420443ab800353ea Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6d5db9c5239b3ed27fec9d52420443ab800353ea commit 6d5db9c5239b3ed27fec9d52420443ab800353ea Author: Mateusz Guzik AuthorDate: 2023-09-14 17:28:32 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:46 +0000 vfs: fix stale comment about freevnodes management Approved by: re (gjb) (cherry picked from commit 9dc0c983b0931f359c2ff10d47ad835ef74e929a) (cherry picked from commit 210dd7aa1f48848707b09a172a957f0f4b7aacab) --- sys/kern/vfs_subr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4c9cb6200f10..ed478d33aed0 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1444,12 +1444,12 @@ static struct proc *vnlruproc; static int vnlruproc_sig; /* - * The main freevnodes counter is only updated when threads requeue their vnode - * batches. CPUs are conditionally walked to compute a more accurate total. + * The main freevnodes counter is only updated when a counter local to CPU + * diverges from 0 by more than VNLRU_FREEVNODES_SLOP. CPUs are conditionally + * walked to compute a more accurate total. * - * Limit how much of a slop are we willing to tolerate. Note: the actual value - * at any given moment can still exceed slop, but it should not be by significant - * margin in practice. + * Note: the actual value at any given moment can still exceed slop, but it + * should not be by significant margin in practice. */ #define VNLRU_FREEVNODES_SLOP 126 From nobody Sun Sep 24 21:46:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02j5622z4tWg1; Sun, 24 Sep 2023 21:46: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 4Rv02j4Bqtz4ZMX; Sun, 24 Sep 2023 21:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LNJ+KSAtMvRUa5ad5MYXVmFWvCgfAUZm4lrYmfv2Fmk=; b=V/fAbgzt5rr+K1IRjoVkC5MCFCurY2M9AbppRIpSk6OLXkkvCoRfMBRO3x8Y+WTjTl0pF0 KPvJTYRwrLVKugfL0d1AfOblAZ0UJJlsFCYUe9vnKc83zYNOm8ZsZ8Xe16tLE5IA+pGecw ROQg/e+g640lZQhkQtYXYE++Upb/cGZ3SfNy7fj3Ph1NU0tVWddwSuLKGSYejZIDx97s8a tjqecVAUB3D551VCjmJSXGb0wvwiWqf4Ze8WrVQhMvUu5LAST1rzjZO38e1QbdCLReMSRO BhwZhHj905hZDr/+SWZ81IPKwPOZYdoMsPYhQewD06LhZDvRILrPYYh9fU1gTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592013; a=rsa-sha256; cv=none; b=O55kHlfEjG7iJyLYxGmlg841lxRBLByL11D6Zx3h47Wm/Bmfgmf5CQXKBAWorI75808zH8 /Dbt0NhdXcnxhM0vL8Zx8eMAwwGl+jMPmrtjmsU4glLVaQm8Sa2bPJINdTtNVXG/nRy+V0 osDgipRyxaX5h8ohOxd3u8Pza6K+KPoiJF2AqQkkncBErDpZrfjSmwNkQgDDHOS58718sV dC5H0wI30sBZfW9wMkexxqHcwZWY8LGfQV8tKZe1xx4R7LNIymZAd+mdVyd8Uem5ExuoM4 Q/BY6p+qtvXsCXBCrwDClkHs96s0e0GzKBnk2n4amzChfnh8TJQ/J1scN3jDmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LNJ+KSAtMvRUa5ad5MYXVmFWvCgfAUZm4lrYmfv2Fmk=; b=ofokaPDUfyltAVKfT10g940gHInbHt8N3p6wjMLEeY0B70oq7EzB2HqtQ7ckHJ3a1hMvu7 CuFant6TigFCy2TGW12nvh4SXgasds4sxtYWZz9x7BJYWFs3vinMD+ItlFjDka4aMiQ58E 4rnhyft7xIxDOazXUDDoL59D2PbTXaA5ejci6cxjnnrPbVZ+WURbF63lmwC2CwPk0AHRfI cvgGzxeZa/p6bI89/iLBzrfOX185TqDm5SQhWXvxKGHwn8eErMzzkVS9s5oZhg99exqiEc 16EVh/CLKImBdWbYG/wJyqf7+XKEQzoMgRHcMge8HjHvTg4Ref3BkwzymFdRdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02j3CrQz133Q; Sun, 24 Sep 2023 21:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkrn9030618; Sun, 24 Sep 2023 21:46:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkrSe030615; Sun, 24 Sep 2023 21:46:53 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:53 GMT Message-Id: <202309242146.38OLkrSe030615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: dc804471fa88 - releng/14.0 - vfs cache: garbage collect the fullpathfail2 counter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: dc804471fa88a60d8112d7beea59c39cf2c1d123 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=dc804471fa88a60d8112d7beea59c39cf2c1d123 commit dc804471fa88a60d8112d7beea59c39cf2c1d123 Author: Mateusz Guzik AuthorDate: 2023-09-14 20:25:54 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:51 +0000 vfs cache: garbage collect the fullpathfail2 counter The conditions it checks cannot legally be true (modulo races against forced unmount), so assert on it instead. Approved by: re (gjb) (cherry picked from commit 07f52c4b5a4f7a658bf7ed29eadd5c4d52a4f3b2) (cherry picked from commit 8e4a043bad750d85e0028ae6ceb9c9e37842bf4a) --- sys/kern/vfs_cache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 5b0cd64146ad..0f4d7526ebb5 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -542,7 +542,6 @@ STATNODE_COUNTER(negzaps, numnegzaps, STATNODE_COUNTER(neghits, numneghits, "Number of cache hits (negative)"); /* These count for vn_getcwd(), too. */ STATNODE_COUNTER(fullpathcalls, numfullpathcalls, "Number of fullpath search calls"); -STATNODE_COUNTER(fullpathfail1, numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); STATNODE_COUNTER(fullpathfail2, numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE_COUNTER(fullpathfail4, numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); @@ -3400,14 +3399,7 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, vp = vp1; continue; } - if (vp->v_type != VDIR) { - vrele(vp); - counter_u64_add(numfullpathfail1, 1); - error = ENOTDIR; - SDT_PROBE3(vfs, namecache, fullpath, return, - error, vp, NULL); - break; - } + VNPASS(vp->v_type == VDIR || VN_IS_DOOMED(vp), vp); error = vn_vptocnp(&vp, buf, &buflen); if (error) break; From nobody Sun Sep 24 21:46:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02k5jgvz4tX5r; Sun, 24 Sep 2023 21:46: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 4Rv02k540tz4ZdB; Sun, 24 Sep 2023 21:46:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKddRBsCjmynQZduCxMigkMi0rlW1+07q8j3+RzMcqg=; b=XnAN1fQ/y6/F0kxczFj5RNUsEtSfOmcrq7Z3YDEzOhjjq4UYvqYhYKhDzZvnN5yVvpFRpH 5f6IBEjPDQi9LBbz+bX9r4VxF/BSlvrArkvlXo31zjtGkruidYId9pgsZ1AVUeHPVYfWn+ TK7dDs88Yq4iQG2nf9nF1G0vXWRtoyIrWxxELqLTC8TnyR4hhN4Hr8E08TaDIZ98J+DXoD RH/56jF0f2VytK/iAjbZBk4qEZtJFMeOl2jkBC0wa20WuUAxiSY1eztrsS50KcBiSbxXEX LfMQ8c4M8NJet6RTVO3WwVsAAlW62Hm1nz03Z4+VoICFa+CqVjOr0i46P9auVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592014; a=rsa-sha256; cv=none; b=fLmhSjGi6I05RawIgHu0J8GSVXQQBrv/1tyc1IpfFM3MqkCfSuAaLPGLVnA/aLQQqrMNAd Mc3p/jqCiSzvu/rkGAiGBBIJkgpNFo0755lQ1d7BUOHs7PP0MGOOUZm3VUgVod3JtOaf97 jyE/sMA92V8hpMZXCNQNE8VkrYp+WuC/+THqMgZj499DeGLVQNPqfJ/Ku1VVhg+qqiT+D4 vQe0i+6mqwI9PgSXpuEc+/yEKJ/DQv5dhUnU92wurUnp2PNobBpMW5EgkJiI48XwfLJyax RaLYU13zO6xXTnlS/hhOf1Q8ym7ZbpdZcvXYg5kA2JR9ny0Qz7gEN2Hj9BcbrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKddRBsCjmynQZduCxMigkMi0rlW1+07q8j3+RzMcqg=; b=NR8dYkaq6qT5t/N/Bkew3o4zliKWhn65jb0eR0+i7tvjt8w+tgEkCuwoYB6207oio9pfy9 x8QbyNT6hb4zRAccScTGps6Frfh8IG3mcEQ3UQ8D7GP0vQrL4dK8mXjUyP+XObNxwbr51I 2l1RQzbUL1tiOxdV4yHk0lVjHFN98qvNpLjcW9oc9ZYuVIjuY6bpR0GChbmDZvkBoHGIsG 45FYJY+GhycFu18KtwU40ZNZdLauOyPwVEWWtcLJEvM0DowhVJCJOjHAZOjc+dBl8r0s79 2idlQSCgCIHwQwU2kq0Dq+zOD2dXqSNVq6dvEZ5WigNllCAc4fb6ku3JVGYjzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02k48dFz13j1; Sun, 24 Sep 2023 21:46:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLksR2030659; Sun, 24 Sep 2023 21:46:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLksT7030656; Sun, 24 Sep 2023 21:46:54 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:54 GMT Message-Id: <202309242146.38OLksT7030656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: f4f4f48e1293 - releng/14.0 - vfs: retire vnlru_under_unlocked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f4f4f48e12931f73565790c54f6ae2d54cf92d35 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f4f48e12931f73565790c54f6ae2d54cf92d35 commit f4f4f48e12931f73565790c54f6ae2d54cf92d35 Author: Mateusz Guzik AuthorDate: 2023-09-14 23:05:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:56 +0000 vfs: retire vnlru_under_unlocked It only looks at the centralized value which in corner cases can end up being negative. Approved by: re (gjb) (cherry picked from commit ba5dc166e0f390c703042910b637a83c705c8af3) (cherry picked from commit b5210f3fb26031e24f2f4c465aa3eab64002353a) --- sys/kern/vfs_subr.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ed478d33aed0..84219f3b5c12 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1528,23 +1528,6 @@ vnlru_under(u_long rnumvnodes, u_long limit) return (space < limit); } -static bool -vnlru_under_unlocked(u_long rnumvnodes, u_long limit) -{ - long rfreevnodes, space; - - if (__predict_false(rnumvnodes > desiredvnodes)) - return (true); - - space = desiredvnodes - rnumvnodes; - if (space < limit) { - rfreevnodes = atomic_load_long(&freevnodes); - if (rfreevnodes > wantfreevnodes) - space += rfreevnodes - wantfreevnodes; - } - return (space < limit); -} - static void vnlru_kick_locked(void) { @@ -1826,7 +1809,7 @@ vn_alloc(struct mount *mp) if (__predict_false(vn_alloc_cyclecount != 0)) return (vn_alloc_hard(mp)); rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; - if (__predict_false(vnlru_under_unlocked(rnumvnodes, vlowat))) { + if (__predict_false(vnlru_under(rnumvnodes, vlowat))) { atomic_subtract_long(&numvnodes, 1); return (vn_alloc_hard(mp)); } From nobody Sun Sep 24 21:46:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02l6cMVz4tWyS; Sun, 24 Sep 2023 21:46: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 4Rv02l67YGz4ZVY; Sun, 24 Sep 2023 21:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PG/PWF0yk4Ef05S6HKPGkI1Mg9xw57XgFnbTCATCm6U=; b=usfl81NA/7KCtMR+XWSjxQe01oQuNms+PXILnC+FIo3RR9rzXgluPdOWK1Ysm9KEeaKVsb yeJjrqPDg9iDdl6el2RFz7G+ERJsaUY4oHinkGzmFCkK3ZjiGvcKU6oCw8V5RmRHnWsnNF jCkz49x/eDisJ78U+iSvCRet6YYzZ9pN+jIUikgEC7FV6ZrZRw5ZKgGKZ2qATOZeb/L5NJ o0v3/hVxT4ZqkRW2tTm8mcId+Yx9jKPKBMfM2+uITtudfoZ1ROie2tHP4C0lAtEuT/wnQH j8vjKmNJsJV8UuNhZHk+50osnMoxfjqZdpPbYCu2EKHZUMjEill78Ngl2eDCEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592015; a=rsa-sha256; cv=none; b=cnh9H1a3/Z3txXNiOiRmdfYiYmgpDPGS9e33xwVcd3H7Wyr9xpNGzIV8Q5N6UK+uNZLwZf FUjzH4E4LMEnNTnhpEe0NLXzluEU43C7LsKWYuJrieEiWV5Ka6/lVxdAjYF99mTj7dJctQ tD9/bSo5BvQpinXHfl5Aab1KHdgheZjjk14ZHhu1kKVIyBOPVOegNtAo1djXFc/o/jjz7a RagIfw3wkY1CZCAqiQKs/lLMI5esYG/GWcILMaWlzRBClT7PYDUf3GQzOV9OP6cVdE9CLL HZPe8eWKZmmiNC8ioM27N7pLSoKdBLhuZ4eK31jOgxjtOv6b+sDFH5KIpCHMHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PG/PWF0yk4Ef05S6HKPGkI1Mg9xw57XgFnbTCATCm6U=; b=OMZhkLfaKVxZ0qSmcNOfUvPCrmUGSbr3KY0mig6RqdrKkjlwvTcoCqY51hJp13IYUk3JrI TEksX8SQWFNMZ/O2Q3DbGA1nk1SLDBjlbiHbuGUbf6WtuW6loE5IsBZItTiPff1r3vmd4Z t6hRvJZG75mVo493Bltx/qdbyJckK1BSwHGSRPp/HkbaZ87MDzfXP5oaZVQnM0dojOzBS6 WvpM+NbPaZQWW4hM6n9SX+n/T4hSMi/bSgMbMfL1HUcwVhP8bnPJqR4rAoFwirKJBjk/ff o1QRtl5XtymMMDTyHRHBVncjPeC4XeH5QUxw7SyZDpb1BXT3y5Tbn9IHSvsrUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02l51T7z133R; Sun, 24 Sep 2023 21:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLktCK030709; Sun, 24 Sep 2023 21:46:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLktjF030706; Sun, 24 Sep 2023 21:46:55 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:55 GMT Message-Id: <202309242146.38OLktjF030706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 4e5833d9aeb9 - releng/14.0 - vfs: use vnlru_read_freevnodes for the freevnodes sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4e5833d9aeb9c7cb94aa70f40ddc96aecd84bba1 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4e5833d9aeb9c7cb94aa70f40ddc96aecd84bba1 commit 4e5833d9aeb9c7cb94aa70f40ddc96aecd84bba1 Author: Mateusz Guzik AuthorDate: 2023-09-14 23:53:11 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:45:59 +0000 vfs: use vnlru_read_freevnodes for the freevnodes sysctl For a more accurate result. Approved by: re (gjb) (cherry picked from commit 03bfee175269960c67cab64d761bbb5eb9ac5878) (cherry picked from commit 07c081e59232433ce522cfdf37bc4a8afad75330) --- sys/kern/vfs_subr.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 84219f3b5c12..823b8005aa4d 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -184,8 +184,6 @@ static struct vnode *vnode_list_reclaim_marker; */ static long wantfreevnodes; static long __exclusive_cache_line freevnodes; -SYSCTL_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, - &freevnodes, 0, "Number of \"free\" vnodes"); static long freevnodes_old; static counter_u64_t recycles_count; @@ -350,6 +348,19 @@ SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, "LU", "Target for maximum number of vnodes"); +static int +sysctl_freevnodes(SYSCTL_HANDLER_ARGS) +{ + u_long rfreevnodes; + + rfreevnodes = vnlru_read_freevnodes(); + return (sysctl_handle_long(oidp, &rfreevnodes, 0, req)); +} + +SYSCTL_PROC(_vfs, OID_AUTO, freevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, + "LU", "Number of \"free\" vnodes"); + static int sysctl_wantfreevnodes(SYSCTL_HANDLER_ARGS) { From nobody Sun Sep 24 21:46:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02n2wWMz4tWvw; Sun, 24 Sep 2023 21:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv02m6p5Gz4Zbs; Sun, 24 Sep 2023 21: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=1695592016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=upkVd3iHzrCNdrBTRtqYKhCKmFqsOzoYy1xo1pKBwbs=; b=iS0NYK0fe0p/sbFxJIQ6XgjOCYQ0mP0RFUBo2T7ENFwB/dRb2ujbpI+YBEla6i2CKR10Eo vTf9QaMnxCDhycdnxMa1vusDbBXNpICB+XkVWRuWuSYfuYK7yJEWaEArJwerAxC/7Czy/H zINaL/qZ63XhpX3BoflpIiAaNT5CYL7Q6iPlPmZZHgYJ6SU4wYTHPKLvXOHc2OQRPncaP/ JZuKg/1Tg0VqeOvzE+8gZTK0sYn3OBRTOYQeSRDro9Cep2LIppwgiVh5lKA/tdsojaWy/f Sy6z89IrwVMYMAStjltcEhcnvqDclg/4rWt4WN2Y12B8S70UY4VELjyHdXGncg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592017; a=rsa-sha256; cv=none; b=eedWN5yzNP1Rt6yHMe4DvtLrlMnQiAJ6GVPzmmWDvdTupyCC5maO7do48cHN1HzJDrtNZB XlbCRU10tdGEPrRoqL+pwhhUIotpkzHD5TVqJA/Z/ShCn4YpnKQEe8GsxwitBw3/ych2Jl XZw1IpCNzJZHhmatMLRQoavyPBmPovkZd54lehTsMRAWrC+lrK8aFrK3FkIVJWRZw8peGp 7LR7+JJ9QkyqevThkx/YM4nCLmshp8yshVD5KCEi06yPAl2z0IWYPErRNML9de5llBcRPb O7m8D5kvmi1D5AoU9iybqHFa6q8nhQ6+52WiSTBmYfHj7HVEffFun5984LcHBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=upkVd3iHzrCNdrBTRtqYKhCKmFqsOzoYy1xo1pKBwbs=; b=K4D5aJFHOPh+SnT7k3gwlkH+UIAx7DB4UIhgQPZt5KBQ25N42rDMwN4o+e7cy6QjlnXJ32 Hy0R92tZVD3oUX0Ed81DWcoJtNRjxdgMKN4GarwmYASOn4tkvlOGP11/xJgOowgRIkYEgB 7JrxT3l/QuK7Vc7kbbpK5FMxcrVpS1W3CTxUR3hjB6MqLnMIAMfYBjIRDiOTNJeFJ1bHvz O1pm3tn8D8+87KdvUQPrflviW8kt5dUXKQad4GEwW6AvJEVvsFSje0NoeZxsBnlfDO8Zy0 lfM+GunAZAk2SYQCGciDZVl9OYsn1cBXxOs6BMHp+MOpWC0NRNBVnhU8am6Gmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02m5tXQz133S; Sun, 24 Sep 2023 21:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkupN030747; Sun, 24 Sep 2023 21:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLku7n030744; Sun, 24 Sep 2023 21:46:56 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:56 GMT Message-Id: <202309242146.38OLku7n030744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: a5e0eea4ca51 - releng/14.0 - vfs: retire kern.minvnodes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: a5e0eea4ca5152f965558fe310da6877f76c8b31 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a5e0eea4ca5152f965558fe310da6877f76c8b31 commit a5e0eea4ca5152f965558fe310da6877f76c8b31 Author: Mateusz Guzik AuthorDate: 2023-09-16 07:33:36 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:46:03 +0000 vfs: retire kern.minvnodes It was marked as legacy in 2005. Approved by: re (gjb) (cherry picked from commit 2a689cadf092a3319d7619c3f4aa242011c20c8e) (cherry picked from commit b93b1b93938154baf86adbade6496d5b183d71f3) --- sys/kern/vfs_subr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 823b8005aa4d..f4cccf2b4e1f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -385,8 +385,6 @@ SYSCTL_PROC(_vfs, OID_AUTO, wantfreevnodes, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, "LU", "Target for minimum number of \"free\" vnodes"); -SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, - &wantfreevnodes, 0, "Old name for vfs.wantfreevnodes (legacy)"); static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW | CTLFLAG_STATS, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); From nobody Sun Sep 24 21:46:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02p3Dkqz4tX5x; Sun, 24 Sep 2023 21:46: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 4Rv02p0nprz4Zkq; Sun, 24 Sep 2023 21:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84WykRFVQUzdtJTaxhGmVhNR8kcPK2vnDtoqtPLmYSE=; b=OPi21MX/lA+5jyPczTqxtnO4Z063PW74dhmmBtRuCBSx4mqfl9ks+k9HJXCOffKBqjThEr qDe+ScvvZWZI1qMihekuWt9lW4xI/5+kmkWfPLTVTisa/L6nAyF+45eKOn96WTMqAmJBKx /orO0RowgpR5iqeqzTNrDvKG1/rB+VctpFHIG24wx7Y782pS16ug6uQamQAlBfRHLuwbgi n/1St18Wvwj725BEe+IVunS/E0utjgTfu555QPmC4G+S31YdWw2PtRL9erK2+zR7wf2FOR A4mNvquNq+Rr9GHWKhQENpGCE05QnypHHrFMHaRDqKEjU3wuymDD3Pnysmpu6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592018; a=rsa-sha256; cv=none; b=LX3rJj5FlPm5AWv7t88JobN/DR19OeQtdFawxhIXigskx9ISdA8MoHGolQaEkfJ8VSKu+a 6Hx/yN++e3F0WvzwkQgfz3irJaRxxmO718Mh5I7xxCbQ4E1tcl4DbZxW5X8Kt7zYyeWjkt 7w34+l5XiGmeid6lSIl16qfkiuusCF3StkJnSWoCVXxkdKgUY+9k0DylbtJ1XldgugrhVD 9mfz0tNMi9ohYh6dHuyo3Kr5MZ98W9gK5w4asy+1MDc6oUvASt3kKFCp8mimiAgvfErmHj /8S9MBnWaLGTeYg5X3P5tP42h9DCuUQpJCpEBboYCD9JWB6gxDfer8zKHeDFww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84WykRFVQUzdtJTaxhGmVhNR8kcPK2vnDtoqtPLmYSE=; b=ByndKAGmbfZQ+Aa8PsRzC2fD+xLTZBOx/61zTxafkOCFpuDTeeTEgkVhxkRz2RCYQ0NFmB qEJZxToWDWiZzYslywZNKNe3bfMazZY2fG3jKJ4+ErCwhNq4O9GQDKqxu0xUrOl6/7T24L uiEPAwZLKAAzABi81vOBUo5xDUigZvmk0atOmMFO5xi0libsIOB+nsAL1RYnjfAt9WpBpE 1DsSC8/BdybnCLs6k6iHA/BTmt/TyH0isDLkCuBIJisx07QnGau6Iof4dnZZBFce2+LlB+ I/stm5P0yWCYfojXl4pVHu6CvWKK0rRXdS5EJgJUT8krVYyzik29I8nUDZ0zUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02n70spz13j2; Sun, 24 Sep 2023 21:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkvCd030794; Sun, 24 Sep 2023 21:46:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkv8n030791; Sun, 24 Sep 2023 21:46:57 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:57 GMT Message-Id: <202309242146.38OLkv8n030791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 5034749bd436 - releng/14.0 - vfs: group vnode-related sysctls under vfs.vnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5034749bd4365e483e21e4bcf4fe92e04b02b387 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5034749bd4365e483e21e4bcf4fe92e04b02b387 commit 5034749bd4365e483e21e4bcf4fe92e04b02b387 Author: Mateusz Guzik AuthorDate: 2023-09-15 21:08:38 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:46:06 +0000 vfs: group vnode-related sysctls under vfs.vnode Instead of having things scattered through vfs, debug and kern trees. Old names remain for compatibility. Sample output of "sysctl vfs.vnode": vfs.vnode.vnlru.failed_runs: 0 vfs.vnode.vnlru.recycles_free: 0 vfs.vnode.vnlru.recycles: 0 vfs.vnode.stats.alloc_sleeps: 0 vfs.vnode.stats.free: 1310 vfs.vnode.stats.skipped_requeues: 0 vfs.vnode.stats.created: 1686 vfs.vnode.stats.count: 1641 vfs.vnode.param.wantfree: 2097152 vfs.vnode.param.limit: 8388608 Approved by: re (gjb) (cherry picked from commit d3e6478912431309aad36211b6c39b0d741312dc) (cherry picked from commit b757ea2bb27c4035d28009d4a9906c66301d8e3e) --- sys/kern/vfs_subr.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f4cccf2b4e1f..a8477e4b691e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -126,6 +126,15 @@ static int v_inval_buf_range_locked(struct vnode *vp, struct bufobj *bo, daddr_t startlbn, daddr_t endlbn); static void vnlru_recalc(void); +static SYSCTL_NODE(_vfs, OID_AUTO, vnode, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode configuration and statistics"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, param, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode configuration"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, stats, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode statistics"); +static SYSCTL_NODE(_vfs_vnode, OID_AUTO, vnlru, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "vnode recycling"); + /* * Number of vnodes in existence. Increased whenever getnewvnode() * allocates a new vnode, decreased in vdropl() for VIRF_DOOMED vnode. @@ -133,10 +142,14 @@ static void vnlru_recalc(void); static u_long __exclusive_cache_line numvnodes; SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, + "Number of vnodes in existence (legacy)"); +SYSCTL_ULONG(_vfs_vnode_stats, OID_AUTO, count, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); static counter_u64_t vnodes_created; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created, + "Number of vnodes created by getnewvnode (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_stats, OID_AUTO, created, CTLFLAG_RD, &vnodes_created, "Number of vnodes created by getnewvnode"); /* @@ -188,14 +201,18 @@ static long freevnodes_old; static counter_u64_t recycles_count; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, + "Number of vnodes recycled to meet vnode cache targets (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, "Number of vnodes recycled to meet vnode cache targets"); static counter_u64_t recycles_free_count; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, + "Number of free vnodes recycled to meet vnode cache targets (legacy)"); +SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, "Number of free vnodes recycled to meet vnode cache targets"); static counter_u64_t vnode_skipped_requeues; -SYSCTL_COUNTER_U64(_vfs, OID_AUTO, vnode_skipped_requeues, CTLFLAG_RD, &vnode_skipped_requeues, +SYSCTL_COUNTER_U64(_vfs_vnode_stats, OID_AUTO, skipped_requeues, CTLFLAG_RD, &vnode_skipped_requeues, "Number of times LRU requeue was skipped due to lock contention"); static u_long deferred_inact; @@ -345,6 +362,9 @@ sysctl_maxvnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, + "LU", "Target for maximum number of vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_param, OID_AUTO, limit, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes, "LU", "Target for maximum number of vnodes"); @@ -358,6 +378,9 @@ sysctl_freevnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_vfs, OID_AUTO, freevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, + "LU", "Number of \"free\" vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_stats, OID_AUTO, free, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes, "LU", "Number of \"free\" vnodes"); @@ -382,11 +405,14 @@ sysctl_wantfreevnodes(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_vfs, OID_AUTO, wantfreevnodes, + CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, + "LU", "Target for minimum number of \"free\" vnodes (legacy)"); +SYSCTL_PROC(_vfs_vnode_param, OID_AUTO, wantfree, CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_wantfreevnodes, "LU", "Target for minimum number of \"free\" vnodes"); static int vnlru_nowhere; -SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW | CTLFLAG_STATS, +SYSCTL_INT(_vfs_vnode_vnlru, OID_AUTO, failed_runs, CTLFLAG_RD | CTLFLAG_STATS, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); static int @@ -1755,7 +1781,7 @@ vtryrecycle(struct vnode *vp) static u_long vn_alloc_cyclecount; static u_long vn_alloc_sleeps; -SYSCTL_ULONG(_vfs, OID_AUTO, vnode_alloc_sleeps, CTLFLAG_RD, &vn_alloc_sleeps, 0, +SYSCTL_ULONG(_vfs_vnode_stats, OID_AUTO, alloc_sleeps, CTLFLAG_RD, &vn_alloc_sleeps, 0, "Number of times vnode allocation blocked waiting on vnlru"); static struct vnode * __noinline From nobody Sun Sep 24 21:46:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02q2p83z4tX1J; Sun, 24 Sep 2023 21:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv02q26vgz4Zfn; Sun, 24 Sep 2023 21:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oojIZeHDHJW3/1gOfuXjOIWM9GlyMeGlHV6e04Nad5s=; b=qzIsY4bfvbT9+s8CABKTmpIjP3z43gIPcmhtk73yGjLuoDJgjj8WgXp4ww0Fet/OhJ9ITn n27GT5PdwvNsxk2lI8a22Y0SyAVhyhFlwnyXysZXiPmkhaL0pYC3ZwO89eawHdnyOwgr9w 4TesOE9I5EA5U/Xi5BGoOmPNT3eNxCmzl0F9nMuWLQ27WjQ7t1cHoUvrYFFOXB3oLtDz+x Ia2hcQR+BdXKKbNZgfMLzf6Jve5vII43TuxS3ubZkvErRNF4NfpPN+ip2W9qEqwBQJPZUk QRGCNXKF3Ur/tEnqhrBEFZOs9G7y8ZBaRUSlvr3fGrd4aGKKELRpOuf2DOEcyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592019; a=rsa-sha256; cv=none; b=X4a8SCAfanxPMhv0A3bQr1Gamk/mLId9i0agro40LEcmPP1bToLFiWVBnCx+BhSha7oV5F R9HNTYHf+wbV/ZDZ4zunvnzRaa2sriswYx2bV40Je5tPLVpJIKZs1JuvHHNBCUS51rL8fJ Ph+24L3BbNKKAKDr1HopUZ8onlMV54Oe5JTUGeZTd4AJo69CtlOPw15dELE7gcsJVXMuKE wzQ1+MytvmROW4KVjUqIO0F4gg7sBCxwDmPNd8DtfB2QU5ZhOtrqaxVqGca3EhM0gghlbs fUxTal1x0nZ6+6P7iTaJKE9ZM0f/C5P5GhVhW9hiod97Fs0qCBH2US6hyMAbAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oojIZeHDHJW3/1gOfuXjOIWM9GlyMeGlHV6e04Nad5s=; b=esnXd9t5mqauME6DP1RxuAjjWO2f1ncTYxl1wX2NVOE3irVRNJd8nZkPoofb4Wy2pgb0U/ e6HgIdkR8dvjO+Bkp9lJpGVHqIw63DdRyiHVNr8x8id+utO11sol9uPQFEMcMg6gl+Btxm NoGsh6HPINbK3vxjq5N1FYz2HpoAIIte/vr3fpkiVoL0hH0w9rKS1vb2OE5YBvm+Z5ML7W VlRu3lrI5vJ0KmQW9olIeYj/IPOj0MOOoilBe57+8NY4pXngL1ymR11KdTxeFmYzoquPGU ZD57FJqB41egay7ZG3ziNOkZW1wazOneKAEZeHjLIM/WqZVh5BYc7mt4bSa8bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02q11b5z13HM; Sun, 24 Sep 2023 21:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLkxe2030835; Sun, 24 Sep 2023 21:46:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLkxFh030833; Sun, 24 Sep 2023 21:46:59 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:46:59 GMT Message-Id: <202309242146.38OLkxFh030833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: cd132f8578f2 - releng/14.0 - vfs: s/u_long vstir/bool vstir/ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: cd132f8578f288836c4302df243e64bfe9d6fc94 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cd132f8578f288836c4302df243e64bfe9d6fc94 commit cd132f8578f288836c4302df243e64bfe9d6fc94 Author: Mateusz Guzik AuthorDate: 2023-09-16 08:19:24 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:46:12 +0000 vfs: s/u_long vstir/bool vstir/ Approved by: re (gjb) (cherry picked from commit 509d843a982b39a531a558c65794ffffcdf93ae8) (cherry picked from commit 1a644e8b68bef9b207eea67ccec190c7ccd26a39) --- sys/kern/vfs_subr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a8477e4b691e..9d5b1b7e472e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -325,7 +325,7 @@ u_long desiredvnodes; static u_long gapvnodes; /* gap between wanted and desired */ static u_long vhiwat; /* enough extras after expansion */ static u_long vlowat; /* minimal extras before expansion */ -static u_long vstir; /* nonzero to stir non-free vnodes */ +static bool vstir; /* nonzero to stir non-free vnodes */ static volatile int vsmalltrigger = 8; /* pref to keep if > this many pages */ static u_long vnlru_read_freevnodes(void); @@ -1627,7 +1627,7 @@ vnlru_proc(void) */ if (vstir && force == 0) { force = 1; - vstir = 0; + vstir = false; } if (force == 0 && !vnlru_under(rnumvnodes, vlowat)) { vnlruproc_sig = 0; @@ -1799,7 +1799,7 @@ vn_alloc_hard(struct mount *mp) rfreevnodes = vnlru_read_freevnodes(); if (vn_alloc_cyclecount++ >= rfreevnodes) { vn_alloc_cyclecount = 0; - vstir = 1; + vstir = true; } /* * Grow the vnode cache if it will not be above its target max From nobody Sun Sep 24 21:47:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02r3ygRz4tX8V; Sun, 24 Sep 2023 21:47: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 4Rv02r3GV5z4ZlT; Sun, 24 Sep 2023 21:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IkOOMavPEF2MoCTd1EjBLxVTuZyUHv46UiBPaxpquwU=; b=NErU4Xx5qcYLg+ScnTiml8w1GulXJn7kqsSgsYDj0HMwelUdFv+qe79EqBkjdLmVqyv7SQ BqOkmGjzfP6FU0VmE0gFgPbVChiyGjc2K5VeDE7FUFmou0CtIDRFMSz01FhFRdJBrf05t8 vVv9grZxxFgZoe7ELj5Py2SGOZw2kBCC6CqFvB4X190RpqUBZ0WIZhj6RlBWMy+vR4Dx4W 2Q66gi/hsEXANgGVGGk4mMGF7q0aTGJS06woc15RaDfvKy7l7A8Qnf03zj8pJ23R+wmFAL x+ybXphzBLp6Z2cupgpWlOnXkTrRE/rIjczj+lxpFimeQL0ALY2uypqq3D8VRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592020; a=rsa-sha256; cv=none; b=PHmhkTfotLaxOalIF9+BnlnWIZ7mM5ifliED35OASIBWjDgdM+wmFamwGKuPa/5X9r3plF 5zwdqhBTZTw8OoE/mwpgss8VPEokzu2msDI3mMmoKMdpZUMBF+N7qoohtr8OCVcF5mjDvc X8jLWP3b2r+oQJ49jJqLqWdR3jpHArsQJhaKHYJ9MPpf+pzkHl8JwDes2uIxRr5FmNXSiF Cdi6c0PJg6Bw6p+vLCXVZdlGUv2l0MZh/1otr2b7iki8zCxF8pACtfrOtxjeoiV2JilXlh EH1nuZi0JFtYbouhmeTuXE84gB30b/ZykMx7banHF+MgSDBcZU6isDR1Igk7HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IkOOMavPEF2MoCTd1EjBLxVTuZyUHv46UiBPaxpquwU=; b=UH/C8xa5lkvX4/Wj2dbU1jp5GgNjEkeYxMI/4vMqb20ywS1QFSCeaYdoy9T4pLFzkrfkod T9je6MC9M8BXe/qie6R1xIHWzVtv8QnSEo9XtAjTVSswo+2wbOI85Q+DyvNF5kFyNkugBi xEKLTVYowhL+sFMp9VlUfVMujtuPrHethBHKyGGXn7EDTg6uns1xtS8R4dKtriJYTH0Xrm y4XK9u2Nsj+P9zU9udPut++iySd2c9gij3GaTkpfR5dsPfwIVzwt6kgrOa767LDl3Iorlf R0qK0SsaUQFXqdVJaJz6lXjLKcDLXp5WhPcl8Z+tnwGDP0bH0fHvrupoTqvNHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02r27l5z13dQ; Sun, 24 Sep 2023 21:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLl0b2030882; Sun, 24 Sep 2023 21:47:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLl0pp030879; Sun, 24 Sep 2023 21:47:00 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:47:00 GMT Message-Id: <202309242147.38OLl0pp030879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 0e60950b4a44 - releng/14.0 - vfs: stabilize freevnodes_old List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 0e60950b4a44bf10b4994c256546d0820f9fe137 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0e60950b4a44bf10b4994c256546d0820f9fe137 commit 0e60950b4a44bf10b4994c256546d0820f9fe137 Author: Mateusz Guzik AuthorDate: 2023-09-16 15:41:12 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:46:17 +0000 vfs: stabilize freevnodes_old In face of parallel callers. Approved by: re (gjb) (cherry picked from commit ef89b78bb1f60484cc743fa590d623ad896ca8e9) (cherry picked from commit 873b6cd6204376e844815b4698e0f674634bc1c0) --- sys/kern/vfs_subr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9d5b1b7e472e..11cdea5a7dc1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1528,21 +1528,22 @@ vfs_freevnodes_dec(void) static u_long vnlru_read_freevnodes(void) { - long slop, rfreevnodes; + long slop, rfreevnodes, rfreevnodes_old; int cpu; rfreevnodes = atomic_load_long(&freevnodes); + rfreevnodes_old = atomic_load_long(&freevnodes_old); - if (rfreevnodes > freevnodes_old) - slop = rfreevnodes - freevnodes_old; + if (rfreevnodes > rfreevnodes_old) + slop = rfreevnodes - rfreevnodes_old; else - slop = freevnodes_old - rfreevnodes; + slop = rfreevnodes_old - rfreevnodes; if (slop < VNLRU_FREEVNODES_SLOP) return (rfreevnodes >= 0 ? rfreevnodes : 0); - freevnodes_old = rfreevnodes; CPU_FOREACH(cpu) { - freevnodes_old += cpuid_to_pcpu[cpu]->pc_vfs_freevnodes; + rfreevnodes += cpuid_to_pcpu[cpu]->pc_vfs_freevnodes; } + atomic_store_long(&freevnodes_old, rfreevnodes); return (freevnodes_old >= 0 ? freevnodes_old : 0); } From nobody Sun Sep 24 21:47:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02s6mYHz4tWgG; Sun, 24 Sep 2023 21:47: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 4Rv02s4Gxkz4ZrC; Sun, 24 Sep 2023 21:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqORKNHgXJ0Zyl0kjY09VKQ7mcVqj61p2xusFu8gGPA=; b=cm0R3/Fjn2KtfJVceluv9haBm0frvc6bgqeAATnacSXqRW43mQOZsmAPa86ZfeLTx7P2uc 7NL4fq9FdqFRu6eBJOjFEtStK9AoMgCH9lAIOakfzK5eCyoAMgXsv4rJi5Ab/IYKAuHw6l n4nTniQVwpXnMM5f57w4h9Wku5pv48crdW0WtkNUlk32LgNkPpIXBrs9qJoz95528JW+hc c7mne/e5z/qeLeBgAFbyBBVml6j+QYukeDMzv8UYs/lmPWtQ0w77sOqMPA4QFp1bn4F5NZ lMby6GDLpulEaJronjwIeznZ01For9Tk05DjmfN2qqUX1Q6tNjFIj/B5b575EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592021; a=rsa-sha256; cv=none; b=VN8yhHHa65Zul2OfyhyrAeyBVfAxvkmgkL2wHhqoV8tluUlgO4LVoc85a48Vsj9GUpqPbS JbeEeNeIZSyBhnEiAQ/Y0AJUpbN0igGcJQQmHbfqosv2sX7RyJcV9OdshYBRt/lyQYTXco NxWOMg4UvJKxYiPNyNFd6CxWgJBEmZYMapLZaK0cfuoDDuSLkRJ4ANHaojG8q/qbxCmkFK GyA+zPTvhV8XlLAjSM0S+yOQ7Oj9vo2yLnmvQ5zWMGcaXuScb1KqUIl65RcWW3pGaviKuX 4GKSR3JF6BFyRujxtWAYPiVMKetWf8HcGaAgSrgWviZHFeGeg53HgGAj/005dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqORKNHgXJ0Zyl0kjY09VKQ7mcVqj61p2xusFu8gGPA=; b=x2DzmgCie7h+Bi+DEjZaLxv7Y5MmnB/OWCBhWrb4eQnPg3wrhVCrpm+fnG+5hzDoAiJb9h qfXLFZYsx+sC5R7cPiZ/lrVjWjchdG0mpmJ7JaU5kTx2VZHOSHbovLCBzYWb0hdScPRese Fufs4fCvFYPKTIsf5JOBWRPRfaujewlAoAVKq3QP6DMlGfj+MQMR/YJo/a9/RwIln971v3 oq0N8I8vMk3sv+7+MvXzNUVVD1lWyozTUMeuuHE3kuRXzhoGE07zXIS84APNQLLIeBdlzu 98wm84prYNkiGZuezW4qexcC+ig+gQZopq8S8Jn1vHmggrJfoZAf7nBlB6ReLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02s3LXyz13dR; Sun, 24 Sep 2023 21:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLl1ar030948; Sun, 24 Sep 2023 21:47:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLl14O030945; Sun, 24 Sep 2023 21:47:01 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:47:01 GMT Message-Id: <202309242147.38OLl14O030945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: ba4d4882ce72 - releng/14.0 - vfs: count how many times vnlru got woken up due to vnode shortage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ba4d4882ce72d60b82e09c6060edf054917eec39 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ba4d4882ce72d60b82e09c6060edf054917eec39 commit ba4d4882ce72d60b82e09c6060edf054917eec39 Author: Mateusz Guzik AuthorDate: 2023-09-16 17:26:39 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:46:21 +0000 vfs: count how many times vnlru got woken up due to vnode shortage Approved by: re (gjb) (cherry picked from commit 9080190b970c7026695571f90b95fdcf7056ec67) (cherry picked from commit e5114cc203a6bef23b072d9f98f6b8501e4ce6d9) --- sys/kern/vfs_subr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 11cdea5a7dc1..0251525a50c7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1477,6 +1477,10 @@ vnlru_recalc(void) */ static struct proc *vnlruproc; static int vnlruproc_sig; +static u_long vnlruproc_kicks; + +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, kicks, CTLFLAG_RD, &vnlruproc_kicks, 0, + "Number of times vnlru got woken up due to vnode shortage"); /* * The main freevnodes counter is only updated when a counter local to CPU @@ -1571,6 +1575,7 @@ vnlru_kick_locked(void) mtx_assert(&vnode_list_mtx, MA_OWNED); if (vnlruproc_sig == 0) { vnlruproc_sig = 1; + vnlruproc_kicks++; wakeup(vnlruproc); } } From nobody Sun Sep 24 21:47:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv02t6MVCz4tWwP; Sun, 24 Sep 2023 21:47: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 4Rv02t5HhRz4ZrS; Sun, 24 Sep 2023 21:47:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T5Rf20rUmcEM3uisYW/6Ab7e1fUxgRYxgNhh5s858OU=; b=em5S4kxHUWWWo73pig9nH3c6VwmMRHhCp9ESduWdx0ckgtXxFhMpJU1+GBwdjC1JIkSf52 kqpqVzavNzZCgYz6ndl3yR00iVRb6Rp0sp7oDDhAVM44Ui2HnbAZPYJmX2QSZ4U4bDeStT dgfaM7UHUvgHMlRZupxX1RIhJnavBTE9Q3NtzwXOobZpqDzS61/ZSIkrkmQWDfQCwa99YQ Y1ylYcMGlnC24l0a1U83WLnER2Pm8XSwFh2IeVdzJ0lhUgd06mztfvCWhpDdsM/Rw76GeX il3D2j+f7T7SK2CxJ1X/I5Sh0+DWc9mfhOxKFJU3gE0Ot9w9SxledmSrm+FMmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695592022; a=rsa-sha256; cv=none; b=Yd3ZUW/sOGSl/y2aOqrCQw59B2M5MWmMSjan5scuGMKL3m1gqpdCWEf5XpCvGmRfA7ZTQk fGdx9Q55s2rBrVutGtpOr10sV37yGJH693J5hTHONArIbHJfKCQQkt1XD/TzM3gEnUvaFv Isk+4ikw6fRt4/uVFtTVIVc21D3olPkOfq0fOGZyoxnSjsTE+RaN6+zDD5Y4/jB4fhF/p9 U/0f3+hWVIffJTRx/a5+88OjhMLdL4KgxAhxR8JXP89tAqp6TW56SZG3DkzGgOH17K7bTy 9re7B8nqcgHzC5FRqbwxvjE9tSGqoMl6WgBj0LQmiAZi3tqMljLEfOnKRh0LJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695592022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T5Rf20rUmcEM3uisYW/6Ab7e1fUxgRYxgNhh5s858OU=; b=SNNoLzV67W3JXh19GqmoAQzo507JL1Ec2hbUTVE/VY6YO0bwLgJLcaU/sZzR4+y7JRNQSw fFoc6o+KStERzVcN+WyZRSMjyT1B6w8EZvDztU+Q2U1x8GN9sNyFbaBHz+2BC0OMe9j+Rr 4g3fy35UJhCykPg2G9sUI6PWLcpUMwb53H4ks5MEbGbg+O0v8UHcDZA93mSrE3eEOd10rO JhZZbG452WA0IbjcfYuOUje+pOPV2TAypDfMWoXIXJDjZkVkNgVfaunDpCYPSl8s4AsjQM NIL60PRAi4NRFUYguoqyK+kwQSZ9Xxk+RPMVqmZ2Js/BLS4DqLq1j4GPHRoo2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv02t4MdPz13j3; Sun, 24 Sep 2023 21:47:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OLl2E7031003; Sun, 24 Sep 2023 21:47:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OLl2iv031000; Sun, 24 Sep 2023 21:47:02 GMT (envelope-from git) Date: Sun, 24 Sep 2023 21:47:02 GMT Message-Id: <202309242147.38OLl2iv031000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: aaeaba324335 - releng/14.0 - vfs: fix reference counting/locking on LK_UPGRADE error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: aaeaba3243354f02a7a7c4ff519efd88edc22572 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=aaeaba3243354f02a7a7c4ff519efd88edc22572 commit aaeaba3243354f02a7a7c4ff519efd88edc22572 Author: Olivier Certner AuthorDate: 2023-09-22 20:57:20 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-24 21:46:25 +0000 vfs: fix reference counting/locking on LK_UPGRADE error Factoring out this code unfortunately introduced reference and lock leaks in case of failure in the lock upgrade path under VV_CROSSLOCK. In terms of practical use, this impacts unionfs (and nullfs in a corner case). Fixes: 80bd5ef07025 ("vfs: factor out mount point traversal to a dedicated routine") MFC after: 3 days MFC to: stable/14 releng/14.0 Sponsored by: The FreeBSD Foundation Reviewed by: mjg [mjg: massaged the commit message a little bit] Differential Revision: https://reviews.freebsd.org/D41731 Approved by: re (gjb) (cherry picked from commit 02cbc029dac936b4ddbc38cef969c4b30c9a7d1f) (cherry picked from commit c76dfb929e70c80a2d0280a1371c07738d910c11) --- sys/kern/vfs_lookup.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 151253ffa0f5..d75351c34314 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -905,8 +905,15 @@ vfs_lookup_cross_mount(struct nameidata *ndp) crosslkflags |= LK_EXCLUSIVE | LK_CANRECURSE; } else if ((crosslkflags & LK_EXCLUSIVE) != 0) { error = vn_lock(dp, LK_UPGRADE); - if (error != 0) + if (error != 0) { + MPASS(error == ENOENT); + vrele(dp); + if (dp != ndp->ni_dvp) + vput(ndp->ni_dvp); + else + vrele(ndp->ni_dvp); break; + } if (dp->v_mountedhere != mp) { continue; } From nobody Sun Sep 24 22:24:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv0tS42whz4tZHF; Sun, 24 Sep 2023 22:24: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 4Rv0tS3rYlz3BxQ; Sun, 24 Sep 2023 22:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695594288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BaEjROLpqF9u5ukj0v6PeAvf9aiK6JpBpTOTN+waN5Y=; b=lEyhC//iG1314cdGZEgD1v28lGbpil977MDpL/Hl7RbyJrloIZ1zrw3vDfyTZdU1JR6OMA 9c9mtShX8g0HMRCeb0v7sSDB1lCJb/HaTKavjHlSwpzydX+zX4ApckhY9/ruptOXmqcrRb yzwiNHeLnMKN/hQHWRGanr2vRe50lm4mEKoYDYlWqrRxM+LpCsCYJDesaMabqbiE6eWZkX nqT0OPLR6423onAGDxgE5Q3B4REmK1mtWQsn7utl060inYeztZKOzW0TrdXhPp0VGkZ0Md A7OwCJmyYzkrOlnVIXJnlJCWgKTGUliITN8WMIzV0IxnjJ3lYkTUAFhiV1sTow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695594288; a=rsa-sha256; cv=none; b=GFp6VLshnDrj5DAMfuBtU920jZAoCC46ocHH1IjtvhczSOWD8FeYzRZpbWcPKQgmgezxle HKfnejoNzzEJ4W8UAi6ME4ZbNoWYOh1CjLeZTU5w3qlsab6wv1mbsTP7em986vt6o3pqbW i4803qh3qyHopkwlqqzOkKf97vaISwQIfz1nb0VsLJT+JhSaZbwNCgFyI7JlC0U/uP1e3J uVdHULJECHgUbbP8Q7IQvXkNdppqWeN/4CHfWkZGYAdkf0/OGZZ0zXL5RzonDer/NaqjIM v7h2+gPBb9bKTLEhhCr1/MP0sttO52N3JKDRCspiuON/NsPD5VrG+wduowDV7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695594288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BaEjROLpqF9u5ukj0v6PeAvf9aiK6JpBpTOTN+waN5Y=; b=XEnGcVPg0JS4OJzB13cxkLPQtKyEU927jF7BDpwJUQzIc0qcLqpYepqbCzwEdUwBEHPUVV AV4qsDEmXfN3rntnXO5lKWcyQFqP7pcR8NiAstplsIqu3LDfZ1OtYe5K8yzxFq+ms0C6HZ 5HzouZxg1UmZn04X7YISvo6XwsTz/3LkTGojlwr/F9qoH8ORqf4yC8I5FKOtcGGuBMSDbA BU8S0Ld69JspKn0rxxFvWlKVrNIgObwWa9BaTYhP2TRKWFDLK4n95YfwX2Ufz9FVVjjiPo nzv/Nt4wNJQG60Aa4UpeF2BkBm8DKeS7MpoEZxDyxiL5qnyBFtUn74K2GEyN1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv0tS2pQ1z14Dg; Sun, 24 Sep 2023 22:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OMOmDW096923; Sun, 24 Sep 2023 22:24:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OMOgV3096908; Sun, 24 Sep 2023 22:24:42 GMT (envelope-from git) Date: Sun, 24 Sep 2023 22:24:42 GMT Message-Id: <202309242224.38OMOgV3096908@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: abcdc1b9aed7 - main - zfs: merge openzfs/zfs@2e2a46e0a List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: abcdc1b9aed7e0b7b07b47ae14c960c9cefe882f Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=abcdc1b9aed7e0b7b07b47ae14c960c9cefe882f commit abcdc1b9aed7e0b7b07b47ae14c960c9cefe882f Merge: 0a5d2802b41f 2e2a46e0a597 Author: Martin Matuska AuthorDate: 2023-09-24 21:32:11 +0000 Commit: Martin Matuska CommitDate: 2023-09-24 21:58:34 +0000 zfs: merge openzfs/zfs@2e2a46e0a Notable upstream pull request merges: #15243 b53077a9e Add zfs_prepare_disk script for disk firmware install #15298 2e2a46e0a Invoke zdb by guid to avoid import errors #15301 e5d70f467 ZIL: Avoid dbuf_read() in ztest_get_data() Obtained from: OpenZFS OpenZFS commit: 2e2a46e0a597b3ee606ea7dc5bc527459077322f cddl/lib/libzfs/Makefile | 2 +- cddl/usr.libexec/Makefile | 1 + cddl/usr.libexec/zfs_prepare_disk/Makefile | 20 +++ sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 43 ++++- sys/contrib/openzfs/cmd/zpool/zpool_iter.c | 33 +--- sys/contrib/openzfs/cmd/zpool/zpool_util.h | 4 + sys/contrib/openzfs/cmd/zpool/zpool_vdev.c | 43 ++++- sys/contrib/openzfs/cmd/ztest.c | 24 +-- sys/contrib/openzfs/config/Rules.am | 1 + sys/contrib/openzfs/config/kernel-fsync-bdev.m4 | 36 ++++ .../openzfs/config/kernel-generic_fillattr.m4 | 39 ++++- sys/contrib/openzfs/config/kernel-inode-times.m4 | 43 +++++ sys/contrib/openzfs/config/kernel.m4 | 2 + .../contrib/debian/openzfs-zfsutils.install | 2 + sys/contrib/openzfs/include/libzfs.h | 9 + .../include/os/linux/kernel/linux/vfs_compat.h | 6 + .../include/os/linux/zfs/sys/zfs_vnops_os.h | 5 + sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 11 ++ sys/contrib/openzfs/lib/libzfs/libzfs.abi | 4 + sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 193 +++++++++++++++++++++ sys/contrib/openzfs/man/Makefile.am | 1 + sys/contrib/openzfs/man/man8/.gitignore | 1 + sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in | 70 ++++++++ .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 2 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 21 ++- .../openzfs/module/os/linux/zfs/zfs_znode.c | 18 +- .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 11 +- .../openzfs/module/os/linux/zfs/zpl_inode.c | 6 +- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 7 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 6 + sys/contrib/openzfs/scripts/Makefile.am | 2 + sys/contrib/openzfs/scripts/zfs_prepare_disk | 17 ++ ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 1 + sys/modules/zfs/zfs_config.h | 19 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 35 files changed, 629 insertions(+), 76 deletions(-) diff --cc cddl/lib/libzfs/Makefile index 6f8965e4c14a,000000000000..ee57c30cc6ca mode 100644,000000..100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@@ -1,107 -1,0 +1,107 @@@ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare +.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib + +PACKAGE= zfs +LIB= zfs +LIBADD= \ + avl \ + bsdxml \ + crypto \ + geom \ + m \ + md \ + nvpair \ + pthread \ + rt \ + umem \ + util \ + uutil \ + z \ + zfs_core \ + zutil + +INCS= libzfs.h +USER_C = \ + libzfs_changelist.c \ + libzfs_config.c \ + libzfs_crypto.c \ + libzfs_dataset.c \ + libzfs_diff.c \ + libzfs_import.c \ + libzfs_iter.c \ + libzfs_mount.c \ + libzfs_pool.c \ + libzfs_sendrecv.c \ + libzfs_status.c \ + libzfs_util.c + +# FreeBSD +USER_C += \ + libzfs_compat.c \ + libzfs_zmount.c + +# libshare +USER_C += \ + libshare.c \ + nfs.c \ + os/freebsd/nfs.c \ + os/freebsd/smb.c + +KERNEL_C = \ + cityhash.c \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ + zpool_prop.c \ + zprop_common.c + + +ARCH_C = +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ARCH_C += zfs_fletcher_intel.c \ + zfs_fletcher_sse.c +CFLAGS += -DHAVE_SSE2 +.endif +.if ${MACHINE_ARCH} == "amd64" +ARCH_C += zfs_fletcher_avx512.c +CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F +.endif +.if ${MACHINE_CPUARCH} == "aarch64" +ARCH_C += zfs_fletcher_aarch64_neon.c +.endif + +SRCS= $(USER_C) $(KERNEL_C) $(ARCH_C) + +WARNS?= 2 +SHLIB_MAJOR= 4 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare +CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +CFLAGS+= -DSYSCONFDIR=\"/etc\" +CFLAGS+= -DPKGDATADIR=\"/usr/share/zfs\" - ++CFLAGS+= -DZFSEXECDIR=\"${LIBEXECDIR}/zfs\" + +.include diff --cc cddl/usr.libexec/Makefile index 692f16d33717,000000000000..9eb4872b69d5 mode 100644,000000..100644 --- a/cddl/usr.libexec/Makefile +++ b/cddl/usr.libexec/Makefile @@@ -1,9 -1,0 +1,10 @@@ + +.include + +SUBDIR.${MK_ZFS}+= \ ++ zfs_prepare_disk \ + zpool_influxdb + +SUBDIR_PARALLEL= + +.include diff --cc cddl/usr.libexec/zfs_prepare_disk/Makefile index 000000000000,000000000000..e75484c6dc59 new file mode 100644 --- /dev/null +++ b/cddl/usr.libexec/zfs_prepare_disk/Makefile @@@ -1,0 -1,0 +1,20 @@@ ++ ++ZFSTOP= ${SRCTOP}/sys/contrib/openzfs ++ ++.PATH: ${ZFSTOP}/scripts ++ ++PACKAGE= zfs ++SCRIPTS= zfs_prepare_disk ++SCRIPTSDIR= ${LIBEXECDIR}/zfs ++ ++.PATH: ${ZFSTOP}/man/man8 ++MAN= zfs_prepare_disk.8 ++ ++CLEANFILES+= zfs_prepare_disk.8 ++ ++zfs_prepare_disk.8: zfs_prepare_disk.8.in ++ sed ${MAN_SUB} ${.ALLSRC} >${.TARGET} ++ ++MAN_SUB+= -e 's|@zfsexecdir@|${LIBEXECDIR}/zfs|g' ++ ++.include diff --cc sys/contrib/openzfs/config/kernel-fsync-bdev.m4 index 000000000000,c47e236f705f..c47e236f705f mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-fsync-bdev.m4 +++ b/sys/contrib/openzfs/config/kernel-fsync-bdev.m4 diff --cc sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in index 000000000000,2a741531e415..2a741531e415 mode 000000,100644..100644 --- a/sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in +++ b/sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in diff --cc sys/contrib/openzfs/scripts/zfs_prepare_disk index 000000000000,02aa9f8a7728..02aa9f8a7728 mode 000000,100755..100755 --- a/sys/contrib/openzfs/scripts/zfs_prepare_disk +++ b/sys/contrib/openzfs/scripts/zfs_prepare_disk diff --cc sys/modules/zfs/zfs_config.h index f0c1dd4726a8,000000000000..1accbe621d17 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1134 -1,0 +1,1149 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + ++/* fsync_bdev() is declared in include/blkdev.h */ ++/* #undef HAVE_FSYNC_BDEV */ ++ +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + ++/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ ++/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ ++ +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + ++/* inode_get_ctime() exists in linux/fs.h */ ++/* #undef HAVE_INODE_GET_CTIME */ ++ +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + ++/* inode_set_ctime_to_ts() exists in linux/fs.h */ ++/* #undef HAVE_INODE_SET_CTIME_TO_TS */ ++ +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ *** 407 LINES SKIPPED *** From nobody Sun Sep 24 22:40:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv1DZ1dSWz4tbGf; Sun, 24 Sep 2023 22:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv1DZ14vTz3DhN; Sun, 24 Sep 2023 22:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695595230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9XTnVIdgg4RhAAHPyg7Txq50gPdwN4P98R2jTMdap0=; b=PYAk2TqpioXEIFBSHvXpsC0ZpJJpnF38zmCO4STU88/G0AcfHzmWzsM9m3/slP7FZnTABF a9yafUIous/SBs1TAyKrA8o/klFn6l4Y9t3g+m9l8XoYmAT+akbxUapccRPh9hZHIOa71g C6DLt0THRyhtth8dEYndtvHZCmupe/uFhSSrByOq1mStN9AxvXRLjV20vAuU3xXgNihgbE RZidhRBjIh1FG/ZPramMLtVfZPS0GDBVLAYHCcCGd21sBcqEZuf/bjTO9nNhtLzH/Aeds6 +7KNUW6AYtOZuSE0wijQ89mPZSeCw3927hXzYs5s22gkKPfHmco2mpQXUbGwCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695595230; a=rsa-sha256; cv=none; b=kopvX7nr1KmqxTz3/+VMUaxLuM2YwZGDxHxlVnutQ0yZ8axLzf0lCqtBQ1OwX3bzuAdL4K U49qvtsse4+jn3UBs78W9CsJffsgcLIgqHZE8FXet7noVx4lu4TDpfF9QAESMS1c9LoSPG nyi2SyUP8fSUl0ozQxvVYkukcDPIqIdRHCPGSbXuGUvFAfuDHTv8B+c2Su+Tglx0jfZHUa Nkfp1ofSXlxbNtbIsL2hNXaj/NycslyHzEVygjSH+v/xqwy4HylW2a/7EcF92ECAbLofM0 TKEw7O7ZX9JJZTyjC/3Fe7JRht4czZCFMWZRyTNVWmd2bpLme7G8C3XQA5UX2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695595230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9XTnVIdgg4RhAAHPyg7Txq50gPdwN4P98R2jTMdap0=; b=FOWYpxdTFm52K70U74WEKxyob2LCkQU491D193jJBan6v6cgCdACjkiQj7Xrj9uOu455Uv +2m8+Yeau7hpgMI+UZa3CVS5WaIgXgHyJ3WvNHhWkI5yZocBMCXF/r7EAoP2qDXdGF3Nbz yzdGtv/A4xTRKYx5ckGS+6PMyBE6DGUz6HqiUuAofgVAdsNtiTqiqXWyGYIfnkftd27yJC OHlBWx+o93N8GCby0fJRtrw6WE+l/CjBc+Gn2qr1vbKP1nxu85MCeoTOARJSMVslUCdmus xmnAfNDv8tWEwVPfMVc4xpGZa0vZw76ioz4BgYLTZEnVDgHXVZQWmoczhSw22Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv1DZ08ZCz150B; Sun, 24 Sep 2023 22:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OMeTcZ022272; Sun, 24 Sep 2023 22:40:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OMeTR4022269; Sun, 24 Sep 2023 22:40:29 GMT (envelope-from git) Date: Sun, 24 Sep 2023 22:40:29 GMT Message-Id: <202309242240.38OMeTR4022269@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: 5e29272bf57e - main - syscalls.master: Fix SAL annotation for getdirentires basep argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5e29272bf57e24a16f3a17f037f9a5e7cf25ed90 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5e29272bf57e24a16f3a17f037f9a5e7cf25ed90 commit 5e29272bf57e24a16f3a17f037f9a5e7cf25ed90 Author: Haoyu Gu AuthorDate: 2023-09-24 22:34:43 +0000 Commit: Ed Maste CommitDate: 2023-09-24 22:37:58 +0000 syscalls.master: Fix SAL annotation for getdirentires basep argument getdirentires last argument "off_t *basep" is an optional output argument. It returns the value only when the passed-in value(pointer) is non-NULL. This is a part of the research work at RCSLab, University of Waterloo. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41969 --- sys/kern/syscalls.master | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 69a669844629..f7c235ced26c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -999,7 +999,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 157 AUE_STATFS COMPAT4 { @@ -1185,7 +1185,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 197 AUE_MMAP COMPAT6|CAPENABLED { @@ -3097,7 +3097,7 @@ int fd, _Out_writes_bytes_(count) char *buf, size_t count, - _Out_ off_t *basep + _Out_opt_ off_t *basep ); } 555 AUE_STATFS STD { From nobody Sun Sep 24 22:56:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv1b0311Tz4tcNY; Sun, 24 Sep 2023 22:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv1b01HtLz3FmW; Sun, 24 Sep 2023 22:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695596188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XYhefEKX0R5nCQu1sioUKTr42y4mguOH3P+v7z4Cptk=; b=RzGht7dQ9NnBU0Lf9rYNR3+AaZQ7Ut2jPXThPJvjqnjgrPq9Yxy5c9yJ1Rsg8A9Wuw+YyU LEFAvH1H7CwFtg41WNahVbomOiEZW2OwRy2dz2FbCBHYtDMIiOxL0bTYDEgFoV2icIeAEN /DYF4kaDyuQCKKXcwsMkNJqgHXYBhjHVSkxKjyB7U++gMJwSs2T+pYk/PkVWRtYFiJpvx1 YGEpCUk8wEicxBn0hwbgoI1qIIiAZIkk9++jRPx4r+JkJJCgZRp4BdW4Kgp78EMFTDe+tK V3UVn0fGvqHmmUdIu3//6XSoQH8NaP2vtk0Z/NrWKRZAJibGlcPYg87jdtEWRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695596188; a=rsa-sha256; cv=none; b=lHh1rIykAQhM3SLT6Yb8HOJM452qinKIKzFJ0SirEmIX3OvnDsIJy+RajxMEuvhuEobMLD u1tK0LKyeZXbI1q5CK4QVg3jZAxaEOqIHi5noyy+s8tS7cLWcAG9Ywe/TVmWbVDHZP0fbe zcZvIWmr+nyjb2Ux2rpnuhPJDHzKNgAgEdtzoElUc+Qhu28nWj4E/FDXer72GfLB8OWmvF uEXtNTZ0/ezNQJ4zF40dwfw/4CSSJEjUSYcvaU98ZaCih2bI8J4WHkBpv5z3wnin3oeLsO UHwg87WEfcNYkOKUuvxDUGe8PzI3elRl8E5LzIkmWqQQVOH7yo3Qy7sHxJm9gA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695596188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XYhefEKX0R5nCQu1sioUKTr42y4mguOH3P+v7z4Cptk=; b=UnZ2Y2gbGX7F2qxS5N6xemrWhe9NEvNd4hx2uM9+L5L8P9rkgciuMjixyVik79r5mSIYvH XLIVnU0EeQY3hfLi5q+Kz02A6FYdYEfxrOhIatYks+aNL40wdGQ5ePwojlx5Df/bTpjrcQ SzTmBS31UaL4Kwmtxwec8tcsOWC5x9sUyq+5t0Ft+9yklzq1OCa2qQeE08EMgbZibpO0m5 etckVZ2dwRHoQqfbVRKde4HuVeDpQV0IYi09uZBrvzyMGOX8xRJdhhkJSifYpUgbXnhZwI Y77RXjm33R+2Jww4fAHIavioCesb0CZiqBrceZcvdQr+eYiS2pbsisOoe12+zQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv1b00LmNz14yD; Sun, 24 Sep 2023 22:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OMuRt8045934; Sun, 24 Sep 2023 22:56:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OMuMN9045923; Sun, 24 Sep 2023 22:56:22 GMT (envelope-from git) Date: Sun, 24 Sep 2023 22:56:22 GMT Message-Id: <202309242256.38OMuMN9045923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 6cfb90c6ebe4 - stable/14 - zfs: merge openzfs/zfs@5f3069867 (zfs-2.2-release) into stable/14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6cfb90c6ebe4c2eb8de4abad679289b9a6c7aae2 Auto-Submitted: auto-generated The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=6cfb90c6ebe4c2eb8de4abad679289b9a6c7aae2 commit 6cfb90c6ebe4c2eb8de4abad679289b9a6c7aae2 Merge: 3024443da584 5f30698670de Author: Martin Matuska AuthorDate: 2023-09-24 22:26:28 +0000 Commit: Martin Matuska CommitDate: 2023-09-24 22:55:30 +0000 zfs: merge openzfs/zfs@5f3069867 (zfs-2.2-release) into stable/14 Notable upstream pull request merges: #15248 cc75c816c Fix l2arc_apply_transforms ztest crash #15273 6d9bc3ec9 Fix occasional rsend test crashes #15288 f63683fe0 cmd: add 'help' subcommand to zpool and zfs #15297 a199cac6c status: report pool suspension state under failmode=continue Obtained from: OpenZFS OpenZFS commit: 5f30698670dec3fc2085663677021f0a592cf081 sys/contrib/openzfs/cmd/zfs/zfs_main.c | 30 +++++++++++++++++++++ sys/contrib/openzfs/cmd/zpool/zpool_main.c | 31 ++++++++++++++++++++++ sys/contrib/openzfs/cmd/ztest.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 3 ++- sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c | 10 ++++--- sys/contrib/openzfs/module/zfs/arc.c | 11 ++++---- sys/contrib/openzfs/module/zfs/spa_misc.c | 4 +-- .../openzfs/tests/zfs-tests/tests/Makefile.am | 2 ++ ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 1 + .../cli_root/zfs_program/zfs_program_json.ksh | 4 ++- sys/modules/zfs/zfs_config.h | 4 +-- sys/modules/zfs/zfs_gitrev.h | 2 +- 12 files changed, 87 insertions(+), 17 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index f5d0a4d6d7d1,000000000000..059989a79d1c mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1134 -1,0 +1,1134 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ +/* #undef HAVE_VFS_FILE_OPERATIONS_EXTEND */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->remap_file_range() is available */ +/* #undef HAVE_VFS_REMAP_FILE_RANGE */ + +/* fops->read/write_iter() are available */ +/* #undef HAVE_VFS_RW_ITERATE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* yes */ +/* #undef HAVE_WAIT_ON_BIT_ACTION */ + +/* wait_queue_entry_t exists */ +/* #undef HAVE_WAIT_QUEUE_ENTRY_T */ *** 201 LINES SKIPPED *** From nobody Mon Sep 25 00:13:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rv3JR0v7sz4thv9; Mon, 25 Sep 2023 00:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv3JQ66hwz3JlK; Mon, 25 Sep 2023 00:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695600838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t6SxypLw9UxuTu0/p6UVXJ7JsrBpB9o62PRi9mi28ZY=; b=xzAKKYZJ/rR65jfqe7YI6eTOpTxjdhfq6rZI98/SQcgchHMAbOVjOotvvqPLeADApvk5lS 43Rx1YG+rSht1LMqm2Y7NWDj+hd/piCHoA0s6MALUtxuNshlx3rxY13A+G/o6v46bBB0p2 AVK+95DEDOUF7mUiuy1xUWfGldDE0663hXzyRx/7uTC7Awjg2/l+yL8Q+co8rGIxDxoBGn J19pO4WEKBhN4gl2y4nGxxCI6e0dygchnNhPaDMZMqdjUV8zusuFe7MFQexpyzIub+wd21 Ixt2CLsmv3R4XvRG8p47gZJhZ78qOiALtshgyZMPlQxU24na/gO9M9axCPCHJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695600838; a=rsa-sha256; cv=none; b=k0a/HDFg1JZKpvdizVUwf1K84711f8uBSLmTczm8U4XnW7Rnu3t2hHSnHtqfe7+oK1ntOJ OZmLwL1ZxImyXOsnAJWOdUnEbeZSPRb5S+y8ND270FoDIE7obOwYXnjfKbcVtKi8BcTJbh AyShmgXedX8Di0lN3kwkfxchEeNm3V4wuiek1uez6oM+taPhyB56W39z5OtjvhPnG/BQCB nhoMYF99th4jn5Bsaqe4+uQk79avuFWqaItnRrX66m2hN6GG52Of2LQrMaVvlYudr4j0nq 7n9TxKVYPb03p7Ec46a2S9Ylv7xNXax+zJGKt1vGO/o5bmNWzEa4tKwm/hqCGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695600838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t6SxypLw9UxuTu0/p6UVXJ7JsrBpB9o62PRi9mi28ZY=; b=y3+aKZD8OlrVy6P4oHqQnJPIGKoBjc0yOss9Ar4SsLdew8Uzbqn7vrhS9eNf5YXFAprvL4 oNSMzpIYvbSnmhhPWk1TE4zkwwPhIRlfxW8MPAInotU2BUKBPzaTUjEG5Aj+RVooHxGFRf vYGhmViJs4+uRNSURzQGOHapHjnFkI88oc8FxpIKjzPiKhPUWK8JmW0A8RpYk6dGUaIOpm qHEvufvk3Vv6fNi26M9G+oeRYoFsQUQXUZiwJzFAy1xIQhHK71Rff6x4Hu4FiwV9nb9DKa O47ga636XB1guWU4EYRyfslVk4iEDEHqzzTzpYCMdjdsLoYvWH/ys3vbk2gi7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv3JQ5B3hz170Y; Mon, 25 Sep 2023 00:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P0DwoL078789; Mon, 25 Sep 2023 00:13:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P0Dw4U078786; Mon, 25 Sep 2023 00:13:58 GMT (envelope-from git) Date: Mon, 25 Sep 2023 00:13:58 GMT Message-Id: <202309250013.38P0Dw4U078786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: a2440348eed7 - main - jail: avoid a clash with /etc/jail.conf.d between rc and jail(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2440348eed75bb7682579af0905b652747fd016 Auto-Submitted: auto-generated The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=a2440348eed75bb7682579af0905b652747fd016 commit a2440348eed75bb7682579af0905b652747fd016 Author: Jamie Gritton AuthorDate: 2023-09-25 00:03:09 +0000 Commit: Jamie Gritton CommitDate: 2023-09-25 00:03:09 +0000 jail: avoid a clash with /etc/jail.conf.d between rc and jail(8) Since 13.1, /etc/rc.d/jail has looked for a per-jail config file in /etc/jail.conf.d. For RELENG 14, the ".include" directive was added to jail(8), with a sample line in the jail.conf(5) man page that includes "/etc/jail.conf.d/*.conf". These two use cases don't work together. When the jail.conf.d files are included from a master jail.conf, the files in jail.conf.d are likely to hold only partial configurations, and shouldn't be directly loaded by rc.d/jail. But there are existing configurations that depend on the current rc.d behavior. While users could be advised not to include from /etc/jail.conf.d, it's the natural choice even if not mentioned in jail.conf.5. The workaround is for rc.d/jail to continue to load the individual files, but only when /etc/jail.conf doesn't include from that directory (via a simple grep test), This allows the current use while not breaking the previous use. Reported by: antranigv at freebsd.am Differential Revision: https://reviews.freebsd.org/D41962 --- libexec/rc/rc.d/jail | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail index f8995c7e3b00..f12dae280bb0 100755 --- a/libexec/rc/rc.d/jail +++ b/libexec/rc/rc.d/jail @@ -126,7 +126,9 @@ parse_options() if [ -r "$_jconf" ]; then _conf="$_jconf" return 0 - elif [ -r "$_jconfdir" ]; then + elif [ -r "$_jconfdir" ] && ! egrep -q \ + '^\s*\.include\s*["'\'']?/etc/jail.conf.d/' "$jail_conf" \ + 2>/dev/null; then _conf="$_jconfdir" return 0 elif [ -r "$jail_conf" ]; then From nobody Mon Sep 25 09:26:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvHZH1ysrz4vHc5; Mon, 25 Sep 2023 09:26: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 4RvHZH1Gkfz4dch; Mon, 25 Sep 2023 09:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9afAVKgm7O9hwg4+TBDFivDay6+OB0gVxKs/H070VbE=; b=MfiyqaW2xi+rJcrTRq6LJCbkNAYj4GnTDKcI4r/6qdxlNw6Nzcr9idAui17dhLykIp9Jop UIXldoAovdC/emqh5d2AwsKEIurvA/gz3VStbl0zBQrRlWXsvA/PsrrElppizraz1LXXoT lUjoCQSKLpjf5PLewCCMNKmlQYuvMZ0JB2SgKfY6njUn7kJ17jd6M/UuWO4gx566YCuE57 CPv74dYUR48NCgVYQpbUsMP15UgdjKA6dNykAwIbSe4KFq6ctNXOfbQiWEyPoH5znst+x5 ZeBCWCiuIz7FyqKCgoIbKurQ9CgtJDEvVkaBh2b3LWeJtNTDYKeg+0FGKzoi2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695634007; a=rsa-sha256; cv=none; b=Rmgsqs/S2+NYSGHjkmF18Gwg7qDmuwjs893lattIb43Q95wvby10ICdtCVTcqEoDznA7Fu sXtGEiBcV97leUJhFlcLDhHvv1fEQp401mjRZ+X0gqWBaPVb/xUIeY5DgIDNP341+r5Xx4 PY8buUDtY4Pp3aSxVgmL2xHPKmOxxbZTBsdb4SCdNnqobXF9X+lO5oes+oIAglaaebvjiL hYyB6zDgNNQtLsp+wrhNKNuvjUEIbwOEBSZa8bM5xT/Np94faod8CR1lZpeK42iCDHEApo MyJpMvxXz1Qrz1TeXZWRWvymANaV+FiltoyFXzVbnRJ3P3rqm90XUG6jPQoPWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9afAVKgm7O9hwg4+TBDFivDay6+OB0gVxKs/H070VbE=; b=DR5abqOUqRH500esx0SG4726PmCvcnsCjllUKyiCOyvUJVmItMot9tQLBM/9vRCfxg3cr9 eeQtYVByK++NHBHtZFMkjbO3hzAmn7NSvITaQFY8Bm2zC2+mjsHLUtNnc5ChSxP4/d5ECO bSY1C3/AtSlwX7yjUHr5/37koUOW2mtQxgbhVAosjvniedh+lp06gKVCnyT2cpDNn9yfLo ySNz4wXenxf4UdOpg5a0aYvE/OTg7ILn4ETuPvqH6EJ24EqiScFqkiNKbdSwFjrOvVeOm8 I+bzIeOVf1psrL+NbH6FGoV0gBlTIF/QLMxJ3HDCC7xPsLCQptW6vuFFufKQ7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvHZH0Cf1z1MbT; Mon, 25 Sep 2023 09:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P9QkOI093098; Mon, 25 Sep 2023 09:26:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P9QklR093095; Mon, 25 Sep 2023 09:26:46 GMT (envelope-from git) Date: Mon, 25 Sep 2023 09:26:46 GMT Message-Id: <202309250926.38P9QklR093095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 0a16d3d14db6 - main - linux(4): Update syscalls.master to 6.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0a16d3d14db67c89ee08f954c670ec4f447a7ab5 commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 Author: Dmitry Chagin AuthorDate: 2023-09-25 09:24:58 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 09:24:58 +0000 linux(4): Update syscalls.master to 6.5 MFC after: 1 week --- sys/amd64/linux/linux_dummy_machdep.c | 2 ++ sys/amd64/linux/syscalls.master | 53 ++++++++++++++++++++++++++++++++-- sys/amd64/linux32/syscalls.master | 54 ++++++++++++++++++++++++++++++++--- sys/arm64/linux/syscalls.master | 53 ++++++++++++++++++++++++++++++++-- sys/compat/linux/linux_dummy.c | 35 ++++++++++++++++++----- sys/i386/linux/syscalls.master | 54 ++++++++++++++++++++++++++++++++--- 6 files changed, 231 insertions(+), 20 deletions(-) diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c index 4737386cb7f7..759586d9f1fc 100644 --- a/sys/amd64/linux/linux_dummy_machdep.c +++ b/sys/amd64/linux/linux_dummy_machdep.c @@ -66,3 +66,5 @@ DUMMY(readahead); DUMMY(restart_syscall); /* Linux 3.15: */ DUMMY(kexec_file_load); +/* Linux 6.6: */ +DUMMY(map_shadow_stack); diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 88caaa49367b..437066d1655b 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -2059,7 +2059,7 @@ uint32_t sig ); } -; Linux 5.0: +; Linux 5.1: 335-423 AUE_NULL UNIMPL nosys 424 AUE_NULL STD { int linux_pidfd_send_signal( @@ -2078,6 +2078,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2096,6 +2097,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2105,6 +2107,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2112,12 +2115,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2126,9 +2131,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2( l_int epfd, @@ -2139,9 +2146,51 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } +453 AUE_NULL STD { + int linux_map_shadow_stack(void); + } ; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys +454 AUE_NULL UNIMPL nosys ; vim: syntax=off diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 679eda14202a..32ed678fe0c6 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2281,6 +2281,7 @@ uint32_t sig ); } +; Linux 5.1: 387-392 AUE_NULL UNIMPL nosys 393 AUE_NULL STD { int linux_semget( @@ -2353,7 +2354,6 @@ struct l_msqid_ds *buf ); } -; Linux 5.0: 403 AUE_NULL STD { int linux_clock_gettime64( clockid_t which, @@ -2506,6 +2506,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2524,6 +2525,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2533,6 +2535,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2540,12 +2543,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2554,9 +2559,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2_64( l_int epfd, @@ -2567,9 +2574,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index daaeeef1acc2..9ba548359c46 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -1736,6 +1736,7 @@ 294 AUE_NULL STD { int linux_kexec_file_load(void); } +; Linux 5.1: 295-423 AUE_NULL UNIMPL unimpl_md_syscall 424 AUE_NULL STD { int linux_pidfd_send_signal( @@ -1754,6 +1755,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -1772,6 +1774,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -1781,6 +1784,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -1788,12 +1792,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -1802,9 +1808,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2( l_int epfd, @@ -1815,9 +1823,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 4fdab6daab48..35d6debe0da9 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -123,21 +123,42 @@ DUMMY(pwritev2); DUMMY(pkey_mprotect); DUMMY(pkey_alloc); DUMMY(pkey_free); +/* Linux 4.18: */ +DUMMY(io_pgetevents); +/* Linux 5.1: */ +DUMMY(pidfd_send_signal); +DUMMY(io_uring_setup); +DUMMY(io_uring_enter); +DUMMY(io_uring_register); +/* Linux 5.2: */ DUMMY(open_tree); DUMMY(move_mount); DUMMY(fsopen); DUMMY(fsconfig); DUMMY(fsmount); DUMMY(fspick); +/* Linux 5.3: */ DUMMY(pidfd_open); +/* Linux 5.6: */ DUMMY(openat2); DUMMY(pidfd_getfd); +/* Linux 5.10: */ DUMMY(process_madvise); +/* Linux 5.12: */ DUMMY(mount_setattr); -/* Linux 4.18: */ -DUMMY(io_pgetevents); -/* Linux 5.0: */ -DUMMY(pidfd_send_signal); -DUMMY(io_uring_setup); -DUMMY(io_uring_enter); -DUMMY(io_uring_register); +/* Linux 5.13: */ +DUMMY(landlock_create_ruleset); +DUMMY(landlock_add_rule); +DUMMY(landlock_restrict_self); +/* Linux 5.14: */ +DUMMY(memfd_secret); +DUMMY(quotactl_fd); +/* Linux 5.15: */ +DUMMY(process_mrelease); +/* Linux 5.16: */ +DUMMY(futex_waitv); +DUMMY(set_mempolicy_home_node); +/* Linux 6.5: */ +DUMMY(cachestat); +/* Linux 6.6: */ +DUMMY(fchmodat2); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 6144deeb31ab..3f37cc2fc485 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2293,6 +2293,7 @@ uint32_t sig ); } +; Linux 5.1: 387-392 AUE_NULL UNIMPL nosys 393 AUE_NULL STD { int linux_semget( @@ -2365,7 +2366,6 @@ struct l_msqid_ds *buf ); } -; Linux 5.0: 403 AUE_NULL STD { int linux_clock_gettime64( clockid_t which, @@ -2518,6 +2518,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2536,6 +2537,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2545,6 +2547,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2552,12 +2555,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2566,9 +2571,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2_64( l_int epfd, @@ -2579,9 +2586,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off From nobody Mon Sep 25 09:26:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvHZJ2gsGz4vHkn; Mon, 25 Sep 2023 09:26: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 4RvHZJ1ykcz4f72; Mon, 25 Sep 2023 09:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSqDVQnj0VlJrQnAv4Rcz+jTpcXh9Q7s7pnCAnU4X4M=; b=aIJ3QimVdHpVkywUa9liUGR+7gGbxdev9MECnt3QmsEY+erC3nGmSdGUNCgjmIfGeuWI21 dPTsyYEvXgwBXzyIanPRSJkkJquEexX2sIhbxw0AuyNGJB2FVNCyArkLPe9di1riNWrKJz GCNBDxDf9vt41Lt1OR1Ls2Whozk+GpST4MNWq8zyk/L94e/laXiMn2wH3e1gf5AVjSIgi8 KNwtRcMppSfc7bR4IxdIRTN9u4YuK6LiYSJdnsR7+Sk5Lr2qEr+7eYaFm522ky0HQT5RQX Mvo6iCFgibyk1b0uUjNCTRdrGlKoo1GaMb65fPdmJ384/7sBguY/1IO3AKnSjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695634008; a=rsa-sha256; cv=none; b=XTEZf1vwY0hHNmcpvR1UnQksP790a/Doz/a5IgRLPAiebsofkrPw/3WQNVMR7AWJz8ujru pSxihqqjzcPxsAYdAzTW2Tv+nt2KjqWD4vtoivm/PlTH16qtinJVahfCvlIoOTDn6olVJf tLCcA3xnAYapb4q69UbhN40HA70FfsbqxA8kCXBn80Rt0lltT2psfUZsWZX24LuphB/ZGu poLp8W1ppLOeqvGUNpOZXJXEw8QxqWKOdf1pLVUJ5yGKeKqah/Nx4H+J94+J9vRKT5AzyI xsZD//gIuit6bC+aTnjRCiAoaELGWGHvAdAOIMIvhSDGmA4nGVCMfYLJLcLOAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSqDVQnj0VlJrQnAv4Rcz+jTpcXh9Q7s7pnCAnU4X4M=; b=Fz/3Mk8yCJg/sqqF9AYByxtHpMb1BtEY3Gzl5kRYEoz1RVyTJbnaiAmSF+3SeAYXaG1Rgp eeenycFURDqP2izBLcV+Rw0khbjqvkAD1pK3wjr7RMSL01PnJcmv6rpXJ2iuSIcoOjSUK0 DXY8cJxIcZEJzS17EVJp0NrohoDVQsbddmUIYZXT4BnLLnZEdaeOvVr0tJmlF0jRXTF88r 9nYnPJuXxtckm4VzZd9jiJ3IbMIq2PgC5j7QnOsp+cuvpNNOuQLS3FRygPnuVV65sgYB1K yBdx6Vl1ypG1avYQrAfIXIBL4ZSWNzr8Wx8ov5KHNyFPif1vysUJwlPzwuI9zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvHZJ0nNXz1N1m; Mon, 25 Sep 2023 09:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P9QmAl093131; Mon, 25 Sep 2023 09:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P9QmG3093128; Mon, 25 Sep 2023 09:26:48 GMT (envelope-from git) Date: Mon, 25 Sep 2023 09:26:48 GMT Message-Id: <202309250926.38P9QmG3093128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 28035f675b85 - main - linux(4): Regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28035f675b8590a24fddb418083788609ef75cc8 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=28035f675b8590a24fddb418083788609ef75cc8 commit 28035f675b8590a24fddb418083788609ef75cc8 Author: Dmitry Chagin AuthorDate: 2023-09-25 09:26:34 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 09:26:34 +0000 linux(4): Regen MFC after: 1 week --- sys/amd64/linux/linux_proto.h | 55 +++++++++++++++ sys/amd64/linux/linux_syscall.h | 13 +++- sys/amd64/linux/linux_syscalls.c | 13 +++- sys/amd64/linux/linux_sysent.c | 13 +++- sys/amd64/linux/linux_systrace_args.c | 110 ++++++++++++++++++++++++++++++ sys/amd64/linux32/linux32_proto.h | 50 ++++++++++++++ sys/amd64/linux32/linux32_syscall.h | 12 +++- sys/amd64/linux32/linux32_syscalls.c | 12 +++- sys/amd64/linux32/linux32_sysent.c | 12 +++- sys/amd64/linux32/linux32_systrace_args.c | 100 +++++++++++++++++++++++++++ sys/arm64/linux/linux_proto.h | 50 ++++++++++++++ sys/arm64/linux/linux_syscall.h | 12 +++- sys/arm64/linux/linux_syscalls.c | 12 +++- sys/arm64/linux/linux_sysent.c | 12 +++- sys/arm64/linux/linux_systrace_args.c | 100 +++++++++++++++++++++++++++ sys/i386/linux/linux_proto.h | 50 ++++++++++++++ sys/i386/linux/linux_syscall.h | 12 +++- sys/i386/linux/linux_syscalls.c | 12 +++- sys/i386/linux/linux_sysent.c | 12 +++- sys/i386/linux/linux_systrace_args.c | 100 +++++++++++++++++++++++++++ 20 files changed, 750 insertions(+), 12 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 2a9dbf6fbe12..0759ce282499 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -1405,6 +1405,39 @@ struct linux_epoll_pwait2_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; +struct linux_map_shadow_stack_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1705,6 +1738,17 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); +int linux_map_shadow_stack(struct thread *, struct linux_map_shadow_stack_args *); #define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_newstat AUE_STAT @@ -2004,6 +2048,17 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL +#define LINUX_SYS_AUE_linux_map_shadow_stack AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h index 4755c673ab0f..efd3413f91ce 100644 --- a/sys/amd64/linux/linux_syscall.h +++ b/sys/amd64/linux/linux_syscall.h @@ -343,4 +343,15 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_linux_map_shadow_stack 453 +#define LINUX_SYS_MAXSYSCALL 455 diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c index 201daec24f67..6851612ec749 100644 --- a/sys/amd64/linux/linux_syscalls.c +++ b/sys/amd64/linux/linux_syscalls.c @@ -449,5 +449,16 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "linux_map_shadow_stack", /* 453 = linux_map_shadow_stack */ + "#454", /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index 694a22060125..ecb4ebb85b3a 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -459,5 +459,16 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_map_shadow_stack, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 453 = linux_map_shadow_stack */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 9d53132063fa..2b0cf1df7e40 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2751,6 +2751,61 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } + /* linux_map_shadow_stack */ + case 453: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -7181,6 +7236,39 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; + /* linux_map_shadow_stack */ + case 453: + break; default: break; }; @@ -8681,6 +8769,28 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: + /* linux_map_shadow_stack */ + case 453: default: break; }; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 8767199f2342..ae52fb81c560 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1706,6 +1706,36 @@ struct linux_epoll_pwait2_64_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); @@ -2071,6 +2101,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX32_SYS_AUE_linux_exit AUE_EXIT #define LINUX32_SYS_AUE_linux_fork AUE_FORK #define LINUX32_SYS_AUE_linux_write AUE_NULL @@ -2435,6 +2475,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX32_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX32_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX32_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX32_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX32_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX32_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX32_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX32_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX32_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index e24080e3c2e7..b6d74578cdfd 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -403,4 +403,14 @@ #define LINUX32_SYS_linux_process_madvise 440 #define LINUX32_SYS_linux_epoll_pwait2_64 441 #define LINUX32_SYS_linux_mount_setattr 442 -#define LINUX32_SYS_MAXSYSCALL 444 +#define LINUX32_SYS_linux_quotactl_fd 443 +#define LINUX32_SYS_linux_landlock_create_ruleset 444 +#define LINUX32_SYS_linux_landlock_add_rule 445 +#define LINUX32_SYS_linux_landlock_restrict_self 446 +#define LINUX32_SYS_linux_memfd_secret 447 +#define LINUX32_SYS_linux_process_mrelease 448 +#define LINUX32_SYS_linux_futex_waitv 449 +#define LINUX32_SYS_linux_set_mempolicy_home_node 450 +#define LINUX32_SYS_linux_cachestat 451 +#define LINUX32_SYS_linux_fchmodat2 452 +#define LINUX32_SYS_MAXSYSCALL 454 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index cdeda60a1577..3f1e0425e224 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -449,5 +449,15 @@ const char *linux32_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index a3570b9bfe5b..c1656a124026 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -460,5 +460,15 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index de00b970027b..29940f4ed8a3 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3265,6 +3265,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -8560,6 +8610,36 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; default: break; }; @@ -10347,6 +10427,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: default: break; }; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index f24b7f25669d..d002ad5a824f 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -1215,6 +1215,36 @@ struct linux_epoll_pwait2_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_setxattr(struct thread *, struct linux_setxattr_args *); int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *); @@ -1466,6 +1496,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX_SYS_AUE_linux_setxattr AUE_NULL #define LINUX_SYS_AUE_linux_lsetxattr AUE_NULL #define LINUX_SYS_AUE_linux_fsetxattr AUE_NULL @@ -1716,6 +1756,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h index f331bec5dc4f..c45f3ded47a2 100644 --- a/sys/arm64/linux/linux_syscall.h +++ b/sys/arm64/linux/linux_syscall.h @@ -291,4 +291,14 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_MAXSYSCALL 454 diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c index 8bf57f971c54..81fed4cc0227 100644 --- a/sys/arm64/linux/linux_syscalls.c +++ b/sys/arm64/linux/linux_syscalls.c @@ -449,5 +449,15 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 3bc2e2ad96d9..c0b495482040 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -459,5 +459,15 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 60daffbb420f..ff58a287ee88 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -2373,6 +2373,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -6256,6 +6306,36 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; default: break; }; @@ -7541,6 +7621,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: default: break; }; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 5baec9364d5b..6cbab6b1e8d8 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1700,6 +1700,36 @@ struct linux_epoll_pwait2_64_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); @@ -2067,6 +2097,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX_SYS_AUE_linux_exit AUE_EXIT #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_write AUE_NULL @@ -2433,6 +2473,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 96aa0fbc1815..19b1714fb5d9 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -409,4 +409,14 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2_64 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_MAXSYSCALL 454 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index ebb3fafca78d..112e6505bd00 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -449,5 +449,15 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index c293f2173e8c..5aa7f4921774 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -459,5 +459,15 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 0bd681c68b6c..76781af18124 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3296,6 +3296,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { *** 115 LINES SKIPPED *** From nobody Mon Sep 25 09:51:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJ6x2Ncmz4vK8n; Mon, 25 Sep 2023 09:51: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 4RvJ6x1rF5z3Bsb; Mon, 25 Sep 2023 09:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695635497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wt46WR117OEinsDFMq0CCCy/SHdK3zU16LBwcmF9vm0=; b=na+mZha2eCmiFHtSlk1ubpOxxcp+8Jmlpp5zA1K2+Thcd+pAZEYAIomno6eRXzH/ED0ajq osJDrGAfsLztdg0aVfIFOwt77ETa1mn3R+AvIiw4CnQWJW9ZyMRBD2k9NhS+VzEcgaJM23 Cf0zjuz5rK/qSPmLwT3B5VeWm/MnwPIsZYzbLnWd+BlcFUlCyRuqfk3vlWsEreNA2lDcf8 Ym6sq436rQeuiN7MYOqWaxOYK/u6+wdFG3cHomDsToltUxOXSYAWlvT6mFQa94hSjrlu1c Yz42NJmBnEcDHO7g4+2xSlh3c3amwAKoYFWhumMYwNlfKGqcqdclAhQK5FKYaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695635497; a=rsa-sha256; cv=none; b=XW1qpfQV2cbeu93Yq3L2la+dR1MUyZVmyUwEr0iR+33OjXL3Sp9Gjx4OPJjpydUXWOYScM nDwlArZIE/jHh959iwvuPVGkZThJUommmhwGaxV5nP7wlKxQEYk77+t3UOujDwIEXsU/v8 WUzYagj7R0DN0fy2GJfAc9SSkEVF1nTPfQ1P4gbfv9AngJ4XtO65DWo0kRtixNUUtwl9LX xM5vgj4oVXh3ixdVicDYUTi5oz+bezXseTqGmhFKCHC0Kt9/hbV2IAafwqlvWDGMphkSRA RmxMqTqi/HLBrlCVPM+g6AKDSzcl0iP6nbH0weIzJ7tosd8U9srWqBRP2pUAYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695635497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wt46WR117OEinsDFMq0CCCy/SHdK3zU16LBwcmF9vm0=; b=MBiZtwbxLBoqOdb5PnnmhYw9XX1nyoK0LXUKzqCKXAYjgn4uVJmM6MgdllSan3+kyNOzWh tvtoNognHbY+Bh3iS8POBE/HOO1pG37E5yG8UN05F5QEKUOOxGTmYKclYrwBXvKk+M77yK AwGVLguEhVfyhtJ+kVbt9G+rF23vfAywSwcVXjLNWrasFSlecqwzAiLP6WUEFFSBdYWKfn Sw/t2a7/PpmW4i/7yOkLwyMQ6uL7BFcSwkKVw4vuVgtjZlknFlo8zJQUOgMLlLUw47I2Y/ avTlOnX2HTMQP03bOfXqtCk//OB+ODuvSl7AS8mRT1rJbutZzgxbaisi6GF1fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJ6x0v8bz1Nwg; Mon, 25 Sep 2023 09:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P9pb8X038080; Mon, 25 Sep 2023 09:51:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P9pbfe038077; Mon, 25 Sep 2023 09:51:37 GMT (envelope-from git) Date: Mon, 25 Sep 2023 09:51:37 GMT Message-Id: <202309250951.38P9pbfe038077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 7f9f15230765 - stable/14 - switch groff parameter -man to -mandoc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f9f152307652d1cb454acb8b9018f29672b452f Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=7f9f152307652d1cb454acb8b9018f29672b452f commit 7f9f152307652d1cb454acb8b9018f29672b452f Author: Wolfram Schneider AuthorDate: 2023-09-07 06:28:24 +0000 Commit: Wolfram Schneider CommitDate: 2023-09-25 09:47:49 +0000 switch groff parameter -man to -mandoc groff 1.23.0 changed the semantics of the -man parameter, and many manual pages are not rendered. The -mandoc parameter brings back the old behavior, as in groff 1.22.4 and earlier. PR: 273565, 273245 Reviewed by: emaste, bapt MFC after: 1 week for all supported branches (stable/12, 13, 14) Differential Revision: https://reviews.freebsd.org/D41737 (cherry picked from commit 035f7c9a3653d91564a5513f1311aa3b6e14a17e) --- usr.bin/man/man.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index dd327cc5d1d8..b18895a91d96 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -1071,11 +1071,11 @@ do_whatis() { # User's PATH setting decides on the groff-suite to pick up. EQN=eqn -NROFF='groff -S -P-h -Wall -mtty-char -man' +NROFF='groff -S -P-h -Wall -mtty-char -mandoc' PIC=pic REFER=refer TBL=tbl -TROFF='groff -S -man' +TROFF='groff -S -mandoc' VGRIND=vgrind LOCALE=/usr/bin/locale From nobody Mon Sep 25 09:51:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJ6y4y1yz4vJy9; Mon, 25 Sep 2023 09:51: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 4RvJ6y2sRlz3Bsw; Mon, 25 Sep 2023 09:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695635498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UVuxKKt3Dho7X8wTiPgc/pfV8vVMKTFZkBBannZSP4M=; b=IEqMIotV0NLrn21mk2PWtNKPhxeXQxPl0JizDN+lJtGUz48SqU/1OHh8dVZk9M6N8R57St b380ec0Dkup/kggSN1+sC/V4cyszgJTtxaX1cW834mHrOK2gdtd3OscuuuJhZI8XEnwjmj P/lYNrYaAwIKd9MBfDHNVQVP7ipctbNGIhkQbEoERDtgWu2BYp1y7RybYmyaQ1A4V3myRr 173HCECaK5B19EuYTx74Kp9Z7lC3gJmROEVu7mumKx0tTk7ca7jcqzmA9qoxxmTEoTwZiN Ku5T1e0UqWfsl2cXOmr/PJPGsKZlYopaMMOUhjeCHZ+M0Xim+OSsgXtfh1Zw6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695635498; a=rsa-sha256; cv=none; b=RDX042p2xztzh7OXJcqBBULbEtO1TGi+Seu+SvgBm+H0GajvejzqlgRCfRfLpDh5Sg3mKE Nl0/MqPPc6Ea5bOwLkM9yR2SOb4RxrM/tPW+WeCI1i2OPaRTSzaecFf2fh02sIqWF1QLih vVPlFjLWQlP82FNrCsla2AabyLKIgKCX87NrFnL+wNKQaE8YK3+c/ECFadbkWdnMcSdJeK 6ghTZT/OGUgUrXCH+VWwpActPPHcfiiOjhMiRML5eSfT/ae1AMpp/bDWdBwKjRM5LnR3C3 8LT2FNHgiiWLiRE4ih4v1H6MIQzRunyrEHr75hv6qKwyQOWaXGhW4wtYR8cBaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695635498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UVuxKKt3Dho7X8wTiPgc/pfV8vVMKTFZkBBannZSP4M=; b=vbvRA00nPklUUG0IzF1nVNCxBpvafMsaqB+GU5Mgy9LnzPEiMkQz/qenkT/7BhN8DtlAg+ 81/Blu1C7DFS6Pn2BxThB2G1+gFqhWF1ivf93NJOZNeFqGBZJBAGLEIhuRJB/saeuyJL6W rrQajnZTM9zgHkHsD/8bXqvKJjgtm1fzSxonp2E3W43z8Ug0j7lHKEfc70bqMihqBMyGMr ExdS1/3Zy84I7tTIDBgQuqDAO1muo8RpP+V1GBInYAqsTzvT4Jqpdd7Cvos5hkKJJSgP7F npPjxRNS95lczssNkltmaaUt0Fx+8NCYvSMzjpFZ5I6Qqu/gMQiygS2QNZKPyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJ6y1vzYz1NfN; Mon, 25 Sep 2023 09:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P9pcI3038154; Mon, 25 Sep 2023 09:51:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P9pck7038151; Mon, 25 Sep 2023 09:51:38 GMT (envelope-from git) Date: Mon, 25 Sep 2023 09:51:38 GMT Message-Id: <202309250951.38P9pck7038151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: b8acbf417699 - stable/14 - switch groff parameter -man to -mandoc for new groff release 1.23.0 PR: 273565 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b8acbf417699d7a164c4874a822e030d06216387 Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=b8acbf417699d7a164c4874a822e030d06216387 commit b8acbf417699d7a164c4874a822e030d06216387 Author: Wolfram Schneider AuthorDate: 2023-09-07 14:59:12 +0000 Commit: Wolfram Schneider CommitDate: 2023-09-25 09:51:13 +0000 switch groff parameter -man to -mandoc for new groff release 1.23.0 PR: 273565 (cherry picked from commit cd89fe3923e92ab090cbdff7eb215c2d85b51718) --- usr.bin/man/man.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.conf.5 b/usr.bin/man/man.conf.5 index 5bffbf96bec2..90595bb6d498 100644 --- a/usr.bin/man/man.conf.5 +++ b/usr.bin/man/man.conf.5 @@ -113,8 +113,8 @@ MANLOCALE ja_JP.eucJP EQN_JA /usr/local/bin/geqn PIC_JA /usr/local/bin/gpic TBL_JA /usr/local/bin/gtbl -NROFF_JA /usr/local/bin/groff -man -dlang=ja_JP.eucJP -TROFF_JA /usr/local/bin/groff -man -dlang=ja_JP.euc.jp +NROFF_JA /usr/local/bin/groff -mandoc -dlang=ja_JP.eucJP +TROFF_JA /usr/local/bin/groff -mandoc -dlang=ja_JP.euc.jp .Ed .Pp If the system administrator decides to override the From nobody Mon Sep 25 10:12:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJZz2hT0z4vLQp; Mon, 25 Sep 2023 10:12: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 4RvJZz2H6wz3DtM; Mon, 25 Sep 2023 10:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4cEa9m88mGntfacrZ02R0tXBX4kSamtNU0FWgTxOoA=; b=yat4x0olGGhVugZrYU6bhz/N+0R8yeLRIYR999NUuu04bNHlcnFMaU9fO5Vm09Q+HiiSS0 brhz6p4jL5WrVbd+lXgPUuGIe5887tT100UL8HAu2I+VX5UAOTuQW8Q0EkSb5dbyqlT466 +N71vv3AwTiAsLQblWT7T/wyCjkC/HFAtKy5gnm3O+3Cn0Q2/PBmkQAR97kfQU7MmRW4d3 cVunMaM6YhbL07Vm44jVTLiBURz9okU+Zds6pxIB6gY1B/zGBZM3rJxLuFfm2O3wofPe6Y jQvyG9umVtcG0ASyG1bScfpGR3kBjo6tjIa9P9LXGcFdqBGQ5Mp8O8V67tuR3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695636747; a=rsa-sha256; cv=none; b=Vlrau5twSWIpmCN4qRbH75Ahmsx3YLnsImeI8orYFFlGtMOFXZZZrd9sb2/V7DEbBqDVQU BSc1a3p5xU4sPM+r+E96tRZVVKVCSRM9hKAfIMb+Nb9R9v3uNgf4KdcYd+pjVbaCNtXUFZ avqGhkB7cEVlsTVbU0jYeLH4rRLtY3CwD5pcNYQZgrTcLun5HkRalsq//BLPoOOoCucTfr hIlgW0cC8OBnr5M1zWVehwxrBMbYwxxUuIycOShDwCPylFGJTRLGUqDcU4c5YbDca7lwMv Ri5mjXwL/cM70muXCdMiDE2D+SqepDUT0QJGvGsss0q3uiztk0jV3DQJCm3A3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4cEa9m88mGntfacrZ02R0tXBX4kSamtNU0FWgTxOoA=; b=JBzTxHEIc5EwZhRj73EkYQncRE8RXAj91PmIeDo+aiso9Q0sXwpLLXnmb42rtM0EDW+AwH Le/u5hVuGObfyI7e9hFQ37X1k2SJWUQKTHuDp7dWuMCKr8tLuGsleG56DpOK/Dx9E6TzOj wdAU5F80V5adJ6kU2nNhGss4WgXLjInRxFBSKGoj32RwQsRTf9E7s4eCdhMZFlADl1abPW /FZs2F7PTQ6HEJutEqrXWp7D464JUrGmJBSG69IPEyIoxjZ+9Lz68YaVh1ebNnW1uV0lWW FHZYEepQceah/vLSPLX+Nr5r89+7Ly4VH+eVqbHUmGYHlFtdJePnIFBbDf5FJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJZz1LCfz1PCY; Mon, 25 Sep 2023 10:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PACRpe075475; Mon, 25 Sep 2023 10:12:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PACRbW075472; Mon, 25 Sep 2023 10:12:27 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:12:27 GMT Message-Id: <202309251012.38PACRbW075472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 21a722d9593e - main - rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21a722d9593eb477f4ccdad011a2b4df0727fc62 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=21a722d9593eb477f4ccdad011a2b4df0727fc62 commit 21a722d9593eb477f4ccdad011a2b4df0727fc62 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:46 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-25 10:10:46 +0000 rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.route.netisr_maxqlen` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 --- sys/net/rtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 1a83fc2d8abe..019b9e80291c 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -241,7 +241,7 @@ sysctl_route_netisr_maxqlen(SYSCTL_HANDLER_ARGS) return (netisr_setqlimit(&rtsock_nh, qlimit)); } SYSCTL_PROC(_net_route, OID_AUTO, netisr_maxqlen, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, 0, 0, sysctl_route_netisr_maxqlen, "I", "maximum routing socket dispatch queue length"); From nobody Mon Sep 25 10:12:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJb04w66z4vLK4; Mon, 25 Sep 2023 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvJb03VyKz3DgF; Mon, 25 Sep 2023 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7GGgZAceh3h78VfwDmgh4Om8al8+XaeM+lXLvzvuww=; b=PNKzAWS6a4576uw6vB2tzd3Qtgnc8tLt7fCx8K6ph63vgd5ufujw22y14Nn00iIIalXyfl WSYWARG8x2YR/EdrdyT2XKV4/DSLn8LsGuw1eFfidPuPMm4rAnXh2OHRA0sMCp1mOYDo2D 5b1TigueLiaGx0oZjOwTFE375fX2TVLbirbkIBNT/slBa3q+z/dQHzgiZ1bGopvLM/QVZu nZQ0JPDXtJE7Goc6+jJmuYlnKYbQrhJ31aCKQIx/JvQs34imSoeHMxspgrgtzZhhWm6Rxd AUBz8sKrkDEJoeLRFxaIm017UujXN1D+zq7co7osyNlNjM6vsgcFDeX82Mub5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695636748; a=rsa-sha256; cv=none; b=DNipF7Bpq2qIFiK+sWQBZiefEZXSN3WSfsfEI6l5rOnKWlYnozxbkYXbMYceElVF2MLLMK 8sbkbpk1dHvFdc8M6R4sTRooVX/VZiav/TW3jabj0qn6JUUSUavjDaPUQshQ2kI+2rMKVN QEmRYX+jXSj6MwHbXjPJXGFxpPmThHu61nZShSnxpoDcyjcmnGDdi08DAR1o1klLa2DrZx UKQdOrfSJ4GKwrtbMVMTetehBPyt+7+cJdjVPOC/mpz4vulNk/mVtuMcssGw1XDc7ohCI1 arfjLcoVl5/HrYXdQZtFT7ssWvOmpUVQ4HTtqmGDi/W2CVMEh2jzxDuiFSGtVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7GGgZAceh3h78VfwDmgh4Om8al8+XaeM+lXLvzvuww=; b=VdnJy64qe243Ngwdz1mUE+3deZUmEXYIUd1mRa+L+XShASw0CcCH3zHaOdkyE6uERLhw8P hp859I7BauVNjmIqbBkDF9ObXDuvBCYl4qIeXEzojOw+GtQeqqAjJlYac0lft4gjPZeJRX tdLFAvKJunDNuKpP7Y5E99L/eonsj8pkrHyUDe7fNBB61dYSx6reK17LYJiVV/iDjM+wL0 nmNhc50ddCMI2JvAqo5UH3C55ehLt9w/d6isXiGY7x3HIDWhvw1guWTxMILCFkKb+wmzPT FK2Oisus+x2IXW0xVQS1G5WI3bXUuaZiFEjLM+dp/ExVV+wtn+L/EhIRGKu6FQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJb02TZMz1PZR; Mon, 25 Sep 2023 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PACSWs075530; Mon, 25 Sep 2023 10:12:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PACS5k075527; Mon, 25 Sep 2023 10:12:28 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:12:28 GMT Message-Id: <202309251012.38PACS5k075527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 03dac3e37993 - main - netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03dac3e37993801dab4418087bfedacce0526e66 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=03dac3e37993801dab4418087bfedacce0526e66 commit 03dac3e37993801dab4418087bfedacce0526e66 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-25 10:10:47 +0000 netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet6.ip6.auto_linklocal 2. net.inet6.ip6.accept_rtadv 3. net.inet6.ip6.no_radr No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 --- sys/netinet6/in6_proto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 1d67577f8055..6e7ffedc3dcd 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -278,10 +278,10 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_NO_RADR, no_radr, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_no_radr), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_no_radr), 0, "Default value of per-interface flag to control whether routers " "sending ICMPv6 RA messages on that interface are added into the " "default router list"); @@ -334,7 +334,7 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_v6only), 0, "Restrict AF_INET6 sockets to IPv6 addresses only"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_auto_linklocal), 0, "Default value of per-interface flag for automatically adding an IPv6 " "link-local address to interfaces when attached"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, From nobody Mon Sep 25 10:12:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJb16grkz4vLSt; Mon, 25 Sep 2023 10:12: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 4RvJb14Y3wz3DwN; Mon, 25 Sep 2023 10:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G5714zCqHW8dvt3Ftsl2zlSmBM5pXLULWht2JQMz8cQ=; b=O8a+yWApxuaYE8dV6j5NRg9riS+pS2QScfc9CPnCrzk31thWDqN2rUwigY/jqQpOh0AG2N FXK2pA+75nWGcPK5ch2iA+mpCRut9424XvomvlAf0WaE3xN2ndwUo0tf2pe1c3+Ini44uS B8umiGQte/pSa3A3F8/aOhrxznYDtTMWDQDG8171H66yk4tsWPzwXZ/FuymBpXf9G0RZZ+ iUlPVQSzjlplapFYCKjxyCn1aA3U0eiYxtseUk1qgAdWkXxOa724/H1HauCmY82o+cbnpd DS5z926w816MOifR0xDkhkt1usy1L+5gDxxrCxXuiMh6b7fLv6OOPWNIXqM04A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695636749; a=rsa-sha256; cv=none; b=tt0CgE9PhwGeXEJx6LOMa3iTGRCnHCPu4oDr1ZC3cwril8Qo9WkjCGY++W87FjpTA4Q32b CipQv3//8z6ql6IMp7JCDh78aD7v8hJCAN70bDP4g27mXguVenDZPS0zvdYftNLp0v3gMr eok1sIQZMwIdwzDKbYnd6KeHuxhSbha8YYG0CQuz1qemWrHf+ZcAGzK3W9/D35Vff6Uo+q Tm7wB1X6m9bo7V/QW9MZDRjQqXgLeEHCVfNF6xp2owyKW4pUa7a9yW5aY3pzm3h9ESr3ml pZYOU7STt6ESKSv6rIJGu9aCe0g9fsxa4NZWTMkGK1lM96Htss19zJOrCgbcEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G5714zCqHW8dvt3Ftsl2zlSmBM5pXLULWht2JQMz8cQ=; b=i6KlzehCB32Qk4GKyJSP1SmUfrshd+IeCbA1SkenL6wHSTmRMPzsH4XIrL30Vi9Hbhuv77 15VwcT+mbcxs8DwEBnp/+mcvwVoDLwLm7HEUdTDtP69ODwDNsI+T1OM7nozaGS9cn6s0tQ GEnGJhGcHRRn2Sf2QD9tsqJuk/xfM8LVB9di3ieKH59yu+es7kEIFW1YcHSnF0UZ/UmdHh 48pyLjpOkpAS/q6bqRzy+debiY0LjkPFONJ4dpyU3/JKv5T/B5k9jeDzj+KDyKpYaRJBtS 5KyEfWy1F0uH1uXzMnXM4/rB63Jkpdow1H5pucHJm5gwOKi6/iLfsQwqh6esvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJb13X34z1PCZ; Mon, 25 Sep 2023 10:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PACT1u075588; Mon, 25 Sep 2023 10:12:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PACTt9075585; Mon, 25 Sep 2023 10:12:29 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:12:29 GMT Message-Id: <202309251012.38PACTt9075585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 49197c391b3d - main - ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49197c391b3d49a33bcd08471bf64d533cd10f9d Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=49197c391b3d49a33bcd08471bf64d533cd10f9d commit 49197c391b3d49a33bcd08471bf64d533cd10f9d Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-25 10:10:47 +0000 ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.ip.fw.enable 2. net.inet6.ip6.fw.enable 3. net.link.ether.ipfw No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 --- sys/netpfil/ipfw/ip_fw_pfil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index 1cfff1870d7f..4dae28aa0544 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -91,20 +91,20 @@ SYSBEGIN(f1) SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw_enable), 0, ipfw_chg_hook, "I", "Enable ipfw"); #ifdef INET6 SYSCTL_DECL(_net_inet6_ip6_fw); SYSCTL_PROC(_net_inet6_ip6_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw6_enable), 0, ipfw_chg_hook, "I", "Enable ipfw+6"); #endif /* INET6 */ SYSCTL_DECL(_net_link_ether); SYSCTL_PROC(_net_link_ether, OID_AUTO, ipfw, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fwlink_enable), 0, ipfw_chg_hook, "I", "Pass ether pkts through firewall"); From nobody Mon Sep 25 10:24:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJsK49Vfz4vLbL; Mon, 25 Sep 2023 10:24: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 4RvJsK3gyKz3GtN; Mon, 25 Sep 2023 10:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695637493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B2nw1e81XNeI17WMI9bfQWvGaOaRB/MyNZdILUt9ifc=; b=ky3fnWih2XucQKwdsrwI4WNTVWJAHHYdOOIkJwmqNXOwsFAuRdjaAfzDiToFWE3eZp+bgy fuBdNPzMtZNk6xjAUsPlizhE4U+X07GnY11FysS6Y4W27SICb3Sw0grWo6DDSWThwFuzEg yNs3pXwzOz37TTVmQloephmsLg0r3Madd6/e1VLFA0ZPNaF5og3XOuzHnVxv2EUR5VsKhC eMLtFEMrtDAcQe5bNKKdLBmL4nO1XjvhkH9DyIfgdppFH5bJFC2glwk4mbfaQJSDUVtgT4 WIjGUJhZeheebg6OLuZSpE+PL04T03W0E+Mrotutl3CqvCTznvy9Kc/ZjpgEdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695637493; a=rsa-sha256; cv=none; b=BrD7ZfU02hNaT37lxGS6Bn7bmsKo9R3ATRmAZSWQ2HBVsEa9ylDBYsyQoHQS24X3yDCyfM KANErm8oLMMMP1P6kr9P8gLZOn0tvuBy+ycAS1u57Dsgi+rk1nQDvN5YQVtEsvD7iN3lBS UnvfFvnFmF3gAbis8DJYbfXBT2NDCIeNf70EgVDJ61pZoNmyvDl85dzzfj03Mb8mZL3nvy 2ee5smvBTu6NGIx3bdze3p1VCbxi5B7R4UQHeRC+m0Pmyiq9U5rVd+Wxt2satOMD3MCung StRULyNYTbPqZTvPZbNWU9CuLBiqyqm+wfANwnrndM1nr5btS7GgaeAtuSh4hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695637493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B2nw1e81XNeI17WMI9bfQWvGaOaRB/MyNZdILUt9ifc=; b=rfmI3xHdZ9xnfW0+am+rESQ8p/u3H39HdUFWisvBfn4+V3kCoWLfPCPoTywjo8uC7AlJ+e mNdRixBDSMZw8rZmXQYPdcQiCNSr2vcFavISF7PJfrnzahBKkcfrczzcHjy84eLQ/ezDdY aov/8+egI9kbHzJaLn9L3ZjOYnJPvRwwy1lfg68Kfp8l0/HYTv3IJVnB4cFyHZPQonkwwI MlObZODRkMrgBbqk6xFQgEWQ1cO/RU+wiqmrGdf0qYN1poZABp08aS/JUFZg5W+ovGB0Gw 8xnt4+zdNdftEAKGz2EeIGg5Oxdm7A4Wky+DoO0DecvS3zcWFUNzjyTgYRtVdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJsK2kxxz1PJx; Mon, 25 Sep 2023 10:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PAOrIo092742; Mon, 25 Sep 2023 10:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PAOrdJ092739; Mon, 25 Sep 2023 10:24:53 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:24:53 GMT Message-Id: <202309251024.38PAOrdJ092739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 058e9c13e309 - stable/14 - linux(4): Cleanup dummy syscall list on arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 058e9c13e3096ff4e9b53cee83b8764d2cc9a85f Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=058e9c13e3096ff4e9b53cee83b8764d2cc9a85f commit 058e9c13e3096ff4e9b53cee83b8764d2cc9a85f Author: Dmitry Chagin AuthorDate: 2023-09-12 10:37:45 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 10:18:54 +0000 linux(4): Cleanup dummy syscall list on arm64 These syscalls do not exist on arm64 Linux. MFC after: 1 week (cherry picked from commit d0266fbab9b8eafc1aedffbedf66dedb4774794c) --- sys/arm64/linux/linux_dummy_machdep.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/arm64/linux/linux_dummy_machdep.c b/sys/arm64/linux/linux_dummy_machdep.c index d38cea2ff1a4..a7a7795f573d 100644 --- a/sys/arm64/linux/linux_dummy_machdep.c +++ b/sys/arm64/linux/linux_dummy_machdep.c @@ -42,11 +42,6 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); * Before adding new stubs to this file, please check if a stub can be added to * the machine-independent code in sys/compat/linux/linux_dummy.c. */ - -UNIMPLEMENTED(get_thread_area); -UNIMPLEMENTED(set_thread_area); -UNIMPLEMENTED(uselib); - DUMMY(mq_open); DUMMY(mq_unlink); DUMMY(mq_timedsend); From nobody Mon Sep 25 10:24:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJsL5Pp0z4vL9n; Mon, 25 Sep 2023 10: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 4RvJsL4yGXz3HCx; Mon, 25 Sep 2023 10: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=1695637494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NR+JtCz7A37p0F4Cc0u2Y2G8K8B4kCpxbxFEkhRwgPs=; b=V6I48ILD6Ej/KMlKxlgADM19+onXweiwis6rV/sDDJL2GnQt5/TaErUODnF6hl8AiUhiXO 1whIHmVZAjBhboEGSo7UWMuBwENYhcdEo6JMCgJN6wMHPCDxyAL88xjB1aOlubT+eLCzfQ KqKtDISSgXWQy+2Ff3iRCad0EOTs3AqTLQfzcwuwqBlWqee3Bk4KyteLHxDi6lXP1ywsCu EZ17mTY5FjY60dN6huOfte9VLo8y4o9g9e1KaSNwrTU2VIgFfRpp9X5kAZG4Abqup2KHzc mkbwXpO2qvUA+P15jznjLsYvTZJpKsqAolXonSSckHmZzP8wgXor9aKUooUGCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695637494; a=rsa-sha256; cv=none; b=KwJ139EzHiu+mq1Lru6a0HaZX96ZFZ1VZnXDNMyCx5Q45P52KnqDh1Qso0JTkic0XayvS7 4gmrNpgl7NNZDmUnNTx6wLup0pbQcNM3QhyGXjx2jDOjyiujruDnr9CZnGtHLQputi4I4r /PDcK6iaho4kW/dOgO+4CCVFobI8Gghfk8LzddXc5N+ncEVFXW+UdLppq3c+ts6yx6OPOS DNBxMdUSc5JRl1fq6YZUc9oaZmr9n1f4+MF3PKyyfoffqQZy9bBlmQgEtmHotKSmvETq5u dQZ0fcdxF1CrErLRO7sx4B+qkaU4AEoEJLvDH6fEOIIPIFftg3GYEmRfhabhNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695637494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NR+JtCz7A37p0F4Cc0u2Y2G8K8B4kCpxbxFEkhRwgPs=; b=e91hHP6TT0g4gN8h96qKsFwslqJ5GK8ZouO1BtMYK85blLPxBcXinhbF9nnW5vLNW/7cU3 UZEOo+fjdo7EgRhw29L5B4fyAN43Q5S5STYQR/4n9uYETfTGChCw7X4SkwPI80LGsTY12J strIpVfOOc7PzDlzpV3oKlCTAWNpJzzz/BNTsl6ifH+HgEEio4uM5zo6GaSf8hdFNuYFUC JZ/sFJBvVXfGU4UWHZY7Yiat5LSYv7FTEO27wFEaC66plrAk447vNNF0o15IxLgtVuSa46 8gX4z6WV5fEqGAA/QpmXzFcY1SjRE38OyUBPhxStqAFYSnboXF1F5TnIGjJdeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJsL3hJSz1PsF; Mon, 25 Sep 2023 10:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PAOsng092779; Mon, 25 Sep 2023 10:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PAOsJ7092776; Mon, 25 Sep 2023 10:24:54 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:24:54 GMT Message-Id: <202309251024.38PAOsJ7092776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 5ce9df199d7c - stable/14 - linux(4): Staticize lsiginfo_to_siginfo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5ce9df199d7c5f70b4bcaac1ccb26254ddc72d83 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5ce9df199d7c5f70b4bcaac1ccb26254ddc72d83 commit 5ce9df199d7c5f70b4bcaac1ccb26254ddc72d83 Author: Dmitry Chagin AuthorDate: 2023-09-18 14:52:43 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 10:18:54 +0000 linux(4): Staticize lsiginfo_to_siginfo It's not used outside of linux_signal.c While here fix the indentation. MFC after: 1 week (cherry picked from commit 794328fbc174360a09b6ad341624e9bce46f0d2e) --- sys/compat/linux/linux_signal.c | 2 +- sys/compat/linux/linux_signal.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 5b4f9c2adc6a..e3e3fc74a6a9 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -766,7 +766,7 @@ siginfo_to_lsiginfo(const siginfo_t *si, l_siginfo_t *lsi, l_int sig) } } -int +static int lsiginfo_to_siginfo(struct thread *td, const l_siginfo_t *lsi, siginfo_t *si, int sig) { diff --git a/sys/compat/linux/linux_signal.h b/sys/compat/linux/linux_signal.h index 3ef64c0007fb..3f3599f4027e 100644 --- a/sys/compat/linux/linux_signal.h +++ b/sys/compat/linux/linux_signal.h @@ -31,9 +31,7 @@ int linux_do_sigaction(struct thread *, int, l_sigaction_t *, l_sigaction_t *); void siginfo_to_lsiginfo(const siginfo_t *si, l_siginfo_t *lsi, l_int sig); -int lsiginfo_to_siginfo(struct thread *td, const l_siginfo_t *lsi, - siginfo_t *si, int sig); int linux_copyin_sigset(struct thread *td, l_sigset_t *, l_size_t, sigset_t *, - sigset_t **); + sigset_t **); #endif /* _LINUX_SIGNAL_H_ */ From nobody Mon Sep 25 10:24:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvJsM65Whz4vLfC; Mon, 25 Sep 2023 10: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 4RvJsM5dBDz3HRq; Mon, 25 Sep 2023 10: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=1695637495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TefoKLiiA3ZMCDnfnUv6q5z/GTs/wcAQyPTc4++2Rq4=; b=RPbbWoU3mzy7EEcLt58MikvN5sr94zX3DzKyNrBG2kQkCuYSRXoU4GeXd+tCseIL5RZV3k sypZ7KkYCfQEcOwsb/aOpIA1xz0AfdwjWF+IRkz/U3f675w66aa592Pt+2ttHmvzfxsA5L PQsVfSVFJRxtzDBy3d70jmbC1e2ncsB13EaQ9c4HBs/hvmAuEczeW3vYr7+C6lwmKTSYFx zkqNMj0wH/K+dW9KXwKk0vtsI76dyrCt/gVfG+Sa4QdhTMIYifx6MT73KjJAgS7vsJDOs0 QhrZrjhBCFI91arYzCqYm7gatdPnPgVJd/1QWEHkiIgweu+5YmD6My+qHWUB7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695637495; a=rsa-sha256; cv=none; b=K0pkyQmQ9zP/sI9wcieaQBJJQBXjpUQfd05TZ/u9G9y5DM41To3MVlA5ke0FFhihkZqAEI +38k8mqlTfop4WhMByzAVlzEOwoc0nm07u38KaIvCsdkRF3MEyAUHUxtn++Y/Yu41ZXSAQ rvR2rTxqqZRQCUSPVnz3nUtpYckpmxhpYRnvTvHxENjXbEFbdY5Ee+g0Fzme21OaLVvCta Hx8AmIzepg+x4VeeL5spMR/729DFwQVAqoqBZd1DBgnjFaEKXw7aZyseBBuk8vX6wMmcz5 MLep2QSx7sucOJEDN7bU8sZdpQZW3lHmf/PdOn/yZ3bg4gmP15yimpnLxljBmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695637495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TefoKLiiA3ZMCDnfnUv6q5z/GTs/wcAQyPTc4++2Rq4=; b=Xq927YaZw2WjRprvW1745hwPH/qzLOtuk7cY7v0Z8MaI1YRD4Jzq02iBZ7FIcHp8M1pu42 PPmtStoagsceT6QI4G0W5MKl7J3F7+GaS+QYKu80ZpOqn5ssC90l0G6537tHUlYvayvM5U 6cPQDCcRpje7z8ScubMjMQaUx303m7OjCoy/Fg1bq+IQHdVIj/aNpmBqMVxJ7K3pYU4IWT 6Z6FzcR62c5CF3o12JC0hcbEQ4UFr0qVvHhCfk2M2mIql++qj0h1TJIgir7AgJdYGJJka5 CaH6wkDyBM9OHNwX+GNzc1FNgVt7aHnnqil0/E4XTUYEbv7cUBQwmsMH3kWp3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJsM4kj3z1Ppx; Mon, 25 Sep 2023 10:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PAOt3N092840; Mon, 25 Sep 2023 10:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PAOtK5092837; Mon, 25 Sep 2023 10:24:55 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:24:55 GMT Message-Id: <202309251024.38PAOtK5092837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: a08bb9bdd20b - stable/14 - linux(4): On Linux SIGKILL can not be reset to default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a08bb9bdd20b4226d83f1f643116275e7af7e3f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a08bb9bdd20b4226d83f1f643116275e7af7e3f9 commit a08bb9bdd20b4226d83f1f643116275e7af7e3f9 Author: Dmitry Chagin AuthorDate: 2023-09-18 14:53:01 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 10:18:55 +0000 linux(4): On Linux SIGKILL can not be reset to default MFC after: 1 week (cherry picked from commit 227d01c1bc7caf2e838ee6eef1e6a3cc81d79d1b) --- sys/compat/linux/linux_signal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index e3e3fc74a6a9..9a84700b3949 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -170,6 +170,7 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa, if (!LINUX_SIG_VALID(linux_sig)) return (EINVAL); + sig = linux_to_bsd_signal(linux_sig); osa = (linux_osa != NULL) ? &oact : NULL; if (linux_nsa != NULL) { @@ -180,9 +181,11 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa, linux_ktrsigset(&linux_nsa->lsa_mask, sizeof(linux_nsa->lsa_mask)); #endif + if ((sig == SIGKILL || sig == SIGSTOP) && + nsa->sa_handler == SIG_DFL) + return (EINVAL); } else nsa = NULL; - sig = linux_to_bsd_signal(linux_sig); error = kern_sigaction(td, sig, nsa, osa, 0); if (error != 0) From nobody Mon Sep 25 11:00:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfd5c9jz4vMZK; Mon, 25 Sep 2023 11:00: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 4RvKfd5150z3LPY; Mon, 25 Sep 2023 11:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SJ6dokyUgLbf/HZ201+ZjCeeDXb0Duj1IJO+utusBcI=; b=FE07fSpq6oQkxiALX2bXwDsvzvRkeq9So+4mFzEz4gkcT+D6hvXqpQxFuXKdegVKGJZ2TU Bw6xtWkTo/FOyJUk95U8jxp64bPfnxr9vgh43PX9dl9E5RqJ8WERyh9cI9oJ49qgr06QbA NCC2tZRQjz9Nk8uK8cep/vUN903LL7HTw56kvlJllr7x0oyrovi8LL1mzhjrZLlAnpo7ok iDsVygNpPUq1NdJ/E6ZlU2tKfzqCmmBgpO3qVX5GUqZUXUb/kKU/s5NBBqTA21T7wwP3qT aKHSbS7gGHfIHtO/VeuDg8ZYnxBQ6iw6azoIKLDMlXoeIb77+gQYO/CCjPrZqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639641; a=rsa-sha256; cv=none; b=euu13dpLqNhy41cV5raLeRo1ymIl+w1JCYXuvgMhoG8H8NpAlQypgQvQzWYWSo1K5moafU fkP1NyZWhoiIt+5UGpTAuoYLP3TcbhLYyXt7R3fArPZ7/nu7dxNFOsWcl4argoDRX433lO HAww3rmS8RviBrj2dmf68PS8T09tt+kmH4LIyJVd9zCV1zPb0qt1B+LIrdLfKt7Boeq83U fArqaqU7jJDx3xj5KtjYsbZjD/KS5rGROqRWvEhwKiZqXvOufTJvQZeIwgaQRm3VTD+9/V yWAu0N6KzK+MyaRhqK3jwOUvXcMyZKfR4tqc++ClF3Mz0zc4aUXe2cCe6amkYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SJ6dokyUgLbf/HZ201+ZjCeeDXb0Duj1IJO+utusBcI=; b=kRRfhZp0BWMydJ/1TlcivDV5lKemXeU358fArJSDR1R5Fof4xYNckR9ffNwQLSW8GcGo1P YHWJF7zaOfODn+uBFZSIUXN7lHJcOby/kKTMrbaW/a2UUHF0oMofzsM0Fhm2UvYjfh2dZK cwOeDzD+ua6GGdV02lDie0hOOyhHjFJDfz+Ayhk/9O8AoQ6pIJmm227t33Zd3Ab7I1qz4U i+EY830Re3GmkLmS22eS81Y7QmBOI2YMUjSx5GLuVR+j99grPd1cJ+d+7ufOl5PVCSinpo 2x1Kd9C3LINSBhkXPKkVkE3W/1FjzSy9VqpNbA4SsnsenAgaN+xgDkHuAO07dA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfd44rZz1QQ4; Mon, 25 Sep 2023 11:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0fRM052257; Mon, 25 Sep 2023 11:00:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0f1R052254; Mon, 25 Sep 2023 11:00:41 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:41 GMT Message-Id: <202309251100.38PB0f1R052254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: a2228dc70153 - stable/13 - Allow psci.h to be used by userspace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a2228dc7015344b4d8d532f75c3eb175c56ac513 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a2228dc7015344b4d8d532f75c3eb175c56ac513 commit a2228dc7015344b4d8d532f75c3eb175c56ac513 Author: Andrew Turner AuthorDate: 2023-03-16 12:08:32 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:15 +0000 Allow psci.h to be used by userspace Wrap parts of psci.h that aren't usable by userspace in _KERNEL checks. This allows it to be used to implement PSCI and SMCCC by bhyve in userspace. Sponsored by: Arm Ltd Sponsored by: Innovate UK Sponsored by: The FreeBSD Foundation (cherry picked from commit 473ab212dc1f72c1765f112568237d229d4e0441) --- sys/dev/psci/psci.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/psci/psci.h b/sys/dev/psci/psci.h index 6eeab8ab6071..c34b5d0b104f 100644 --- a/sys/dev/psci/psci.h +++ b/sys/dev/psci/psci.h @@ -30,6 +30,7 @@ #include #include +#ifdef _KERNEL typedef int (*psci_initfn_t)(device_t dev, int default_version); typedef int (*psci_callfn_t)(register_t, register_t, register_t, register_t, register_t, register_t, register_t, register_t, @@ -50,6 +51,7 @@ psci_call(register_t a, register_t b, register_t c, register_t d) return (psci_callfn(a, b, c, d, 0, 0, 0, 0, NULL)); } +#endif /* * PSCI return codes. @@ -100,6 +102,7 @@ psci_call(register_t a, register_t b, register_t c, register_t d) #define PSCI_VER_MAJOR(v) (((v) >> 16) & 0xFF) #define PSCI_VER_MINOR(v) ((v) & 0xFF) +#ifdef _KERNEL enum psci_fn { PSCI_FN_VERSION, PSCI_FN_CPU_SUSPEND, @@ -113,5 +116,6 @@ enum psci_fn { PSCI_FN_SYSTEM_RESET, PSCI_FN_MAX }; +#endif #endif /* _MACHINE_PSCI_H_ */ From nobody Mon Sep 25 11:00:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKff6kZfz4vMZN; Mon, 25 Sep 2023 11:00: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 4RvKff662Yz3LdD; Mon, 25 Sep 2023 11:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZdff3B47xjhfQ3jgowH2Q1d/jUvIqSqQx8fb9RoQxw=; b=DJHvzfeIefzR4JjpgWvTdikJkBc9ZvC4wxLP2MZAfN+xNKepUZjuLdwn7Y6TfvMG9Ko3iL IznL4FMkYUW2P8zwe0pqLY7cyRf1mXJxdp6AFH2U7TvKabJ5XjFbThQ3yVGVzhD7UM0tQV v8rOuJtRIwVtp9HyXH9lydKoThAK/ms/WUmgg5SP/VKeSATXhUmRdIPL4+2DCCC54pRAYK f/ULlDONSsI0WL+StOie8xasbts5fUhdpI4CP+Ew7sj/O3NQ2aTxmCusrSza7gJrFn3oJ6 NPWtFXPVlfSTRbfDpVw9591EEoVsQCO48ntPnOxhyL42cge5dJFGVnukHf/ZdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639642; a=rsa-sha256; cv=none; b=C/dWhImHOP+y3dE5src+5mkHAS+rYeO202V5fWD/n05M2h0O5/PentQz5JiJejHXtBd8mX XtZ58PSrtHBH6akhp9TxkiBeelJedXKVRx5rbMJFjTSM4UrkJcvOP2eBUXr8RKXdEKwpIr Ey1KvTqSJvVwme+ndI53Dy/q3sECfOiy+wMimjFJLmKCBnyJGncEH5I8K5JACTiCYzuL/W +GaRJKLImUhJr+KqEZ/nMRnsWpJH7QYx7HV69ZJvChDBPjqU1dDDkrxf6jujowypEq7+0x KYVjruOwJnlRi/oYjFFx5LnR2hqZOo7w+2SM4dzWbiA98+Mc6bUgDUjKOp2gSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZdff3B47xjhfQ3jgowH2Q1d/jUvIqSqQx8fb9RoQxw=; b=simFBq4b1AD92lSuqtxwIGnHPakii1zoADgGMbsyTCr/kaM28aWJlq7tJf1I3q6Gsnty/x Qhqym+4BGJuJ2rN/OgT+AwXovP1O9x4lARsvTS6nVMEai3WiYnMM6CprdSkFKvU4vVF9Gj sDPQ+AFCxdy+sMcn2W31wa2iEDLCI1D6Qrj6N6ooKsUmDjEVAssX5hBc7wWdrXeM+e5HJo EcXObSQebKngQkPXod1aiT+BOlgsdhB9DwSaO+/pYkdR/1PJxfym73g+mJaNpXe7J19X2u yhL++KVWp83zvvA9GycM7e58rZshRqxiChnnOfW5ocTi0Onz3gL3/VO/vbl/4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKff55K0z1QMb; Mon, 25 Sep 2023 11:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0g1G052314; Mon, 25 Sep 2023 11:00:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0gSS052311; Mon, 25 Sep 2023 11:00:42 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:42 GMT Message-Id: <202309251100.38PB0gSS052311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 4401550f74ba - stable/13 - Add a psci macro to build a version value List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4401550f74ba50f34e9f443307d170c6b05ba62f Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4401550f74ba50f34e9f443307d170c6b05ba62f commit 4401550f74ba50f34e9f443307d170c6b05ba62f Author: Andrew Turner AuthorDate: 2023-03-16 12:14:01 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:15 +0000 Add a psci macro to build a version value Add PSCI_VER that takes a major and minor version and builds the value returned by the firmware. This will be used by bhyve. Sponsored by: Arm Ltd (cherry picked from commit e89be21854b3aa33efd2e06529a181343281659d) --- sys/dev/psci/psci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/psci/psci.h b/sys/dev/psci/psci.h index c34b5d0b104f..9f95cb535336 100644 --- a/sys/dev/psci/psci.h +++ b/sys/dev/psci/psci.h @@ -101,6 +101,7 @@ psci_call(register_t a, register_t b, register_t c, register_t d) #define PSCI_VER_MAJOR(v) (((v) >> 16) & 0xFF) #define PSCI_VER_MINOR(v) ((v) & 0xFF) +#define PSCI_VER(maj, min) (((maj) << 16) | (min)) #ifdef _KERNEL enum psci_fn { From nobody Mon Sep 25 11:00:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfh0fXSz4vMys; Mon, 25 Sep 2023 11:00: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 4RvKfg7437z3LkC; Mon, 25 Sep 2023 11:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HlDCuha76hWjDlfOJPHbsqcBGZOpYibww706bQq/kdA=; b=uHnC/EvmxWrUpb6uqefwPjppoc1YjabERhS89mza5c+Yi4mHREctJJ+2okJeEv//UWps6Z roHW0Fcg86O9x7FPCYs2ROe2QLmdc+MkBjst+BShwKo3sPX09qrF26yMzsoVzvOVNXuBDB Yc8Wjg2PWcWP//e3mgM03f5+5i+IqUtCtMU2yQ716Ho5flr8c6PvnX/C89EfDanb4xNWvm 2ZrUKRk4g1I4V9FxoG9YSuCM7psVDbiVbma1Y1G9UfIJErDDtif/g50cHkxzvWRiJ3ITYH +b7nhlENVbRY2caeOeejsEmUaRS1QXD0LnkWpBQqX/8FHhnEqyhz+JGOpAc1vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639644; a=rsa-sha256; cv=none; b=xOZkpGYzO2mBensH3y1xJUH1SJGpcI9aamSzvv7FISFsw3k6Q6cHg+5LG+wDR3shHjXYgh wskkVb8aHyOJsanhDxVHa5d7FAzl8lQ3HMZzMCPUZYmfnGpgmcBYdH/oRHwzwQ/opBXX++ d8i3Af42bGgfA9J8r60Zp0nXlufbTgZcOHhZepv0tDS5w2yyPXGn+P6o0fvmnCBV2Lqrs7 l9siCIZJX3dowvo94ARI3J2lSqZYbWC89a1GuKPSPFdKHzE4ozwJCB7yJ/BPvIR4sxroaw zTtZmX1o/mNWm3/p4myjegHJK8vjHwsndnVa2e/65OnDOJm8/mMQ+gC8fq7LOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HlDCuha76hWjDlfOJPHbsqcBGZOpYibww706bQq/kdA=; b=IncvEttPs2pblr7N+lrx89Z7ufV0oFjBb0HjypahMqZCxJx6pyuUzc7NPkYYM7lnmP/2+4 TyMO9/K7jZieIw3RzH3+94vb/rCm1C8BNqJX3e6kC/aBzVK3WxVYNxyU4RDd7u7n2fgRW9 OWr/wD0BHmFHA587tTUKUlpsG9S/wrt/9qatI7KaawRyDoKt7Wq2aDD0xCV0JvGKTeBnBR fzUSFOBGGsXNjZyB+jcKxPrOXGaeo5Nojye+AD77Yv8bPyQl+OGVzGJ6HLX/ukQli8vwXT jKrFbc3BflaCH2+rE6NA0To9oBjRBB6x0IZhdCzed3hPk9o1pAAheje/r7dnqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfg65slz1QMc; Mon, 25 Sep 2023 11:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0hNY052359; Mon, 25 Sep 2023 11:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0hP1052356; Mon, 25 Sep 2023 11:00:43 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:43 GMT Message-Id: <202309251100.38PB0hP1052356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 8753f9e7b2bc - stable/13 - Add PSCI affinity info return values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8753f9e7b2bc5e482608939fc07513e60b479846 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8753f9e7b2bc5e482608939fc07513e60b479846 commit 8753f9e7b2bc5e482608939fc07513e60b479846 Author: Andrew Turner AuthorDate: 2023-03-16 12:16:59 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:15 +0000 Add PSCI affinity info return values These can be returned from the PSCI AFFINITY_INFO call. This is not marked as optional so bhyve will need to implement it & can use these macros. Sponsored by: Arm Ltd (cherry picked from commit 7d0b915919665cb43107b36ad103791515eade5b) --- sys/dev/psci/psci.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/psci/psci.h b/sys/dev/psci/psci.h index 9f95cb535336..451d40c0178d 100644 --- a/sys/dev/psci/psci.h +++ b/sys/dev/psci/psci.h @@ -103,6 +103,10 @@ psci_call(register_t a, register_t b, register_t c, register_t d) #define PSCI_VER_MINOR(v) ((v) & 0xFF) #define PSCI_VER(maj, min) (((maj) << 16) | (min)) +#define PSCI_AFFINITY_INFO_ON 0 +#define PSCI_AFFINITY_INFO_OFF 1 +#define PSCI_AFFINITY_INFO_ON_PENDING 2 + #ifdef _KERNEL enum psci_fn { PSCI_FN_VERSION, From nobody Mon Sep 25 11:00:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfj1c75z4vNGd; Mon, 25 Sep 2023 11:00: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 4RvKfj0vz1z3LX0; Mon, 25 Sep 2023 11:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X21NIbzR1R0ZnUPKCuUKePA86hGPiUHkMg/6HG4Bg1E=; b=ZnJ5DNONrzYkmkLS9gkNz+2VLQUmlAJnacRXldLP960VYBNFIPHbO+y6Aba/e8kAKCU9KO uvfrMmXipwVjfGtqUvR712ag6aA88nfht62rtsqdp9TUxwTokprEydjg6YyeTBvq918Gyv 1cEfx7ZbIEhQMsdR38WeMYrONZhabu32Tn+CQK0R0EAaAQWt5olC8J4RGWhGDE5sIRvjGy nDVfZ8gXF7P/rXa7cq9SrnhlEtXlWh38y15P7BzVwc9cC5H11F6zrFTiw0BWeZnDsoPZUQ dDA4RvLYXc6AlK9DOaCAp9CuAhiTT2cfF+A6/f7LoxmjiEqwcxbOSEw+Z9uSog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639645; a=rsa-sha256; cv=none; b=yW/Lur4OdUvC1KEou40iRf3pLbSryhh6+j4YQWke3XcqQTZknotfZ9hKwpkuwitE4lDEQR /lJpIslhWnlud6Y2FWMoJYSkoiIIgLEAHL6ZVtVuEL8CyuzTmk+G5KCgEzVAJBqruvvokp Xsu9ZZinZzBeYVR+sWmzq1f8GmF1q9dlj2pgxJjDX5gZ0qHN/dw6jjslEcSc4MLKV7Acqm ggFyb3ZnjI3hy0RpcY9sNHt3yVJWcCVt2wB7NpxMWyykOgDIHy1bnX0AJzvvJEeiPjAp0Q LcdUGsND/I50K156VL58wdUVoCa8mvVKoK9Y5k3sXdUo0QLS48ELL/DsQl2P6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X21NIbzR1R0ZnUPKCuUKePA86hGPiUHkMg/6HG4Bg1E=; b=W1HNG4fhcA1NmrngRm8L/ZSZLm+BDr8O/hsRFgv9R90KiNtH0/mZn5xsUS2/NpBx6ySM12 XqdKwkRzf54UALsTioIRiRBaKs1f6e4Z5DD2dP44SXJcnALuALbw0Ixa/i+nr/pB5b9OH5 vA8/Jtmq7XVWqt0rXL3ifO+93Q+9FlvO+pl8JPMDc/Vi57JaK/+2egKG07T2T1NittWkjs S+45kpr8N4ThhZ9w2JTQeuuS2YegRMghyzg87F4hMZXiBuEUZUqVq4ZdhK2A03GcBEElGI RXoFF/OaIh8uBiXaNniInMC+UMInD4C4HEJf+UrLYyrDmwhO9L9QWRjLaglpww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfj019cz1QMd; Mon, 25 Sep 2023 11:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0ijk052411; Mon, 25 Sep 2023 11:00:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0iBC052408; Mon, 25 Sep 2023 11:00:44 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:44 GMT Message-Id: <202309251100.38PB0iBC052408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: c1a1e8368b53 - stable/13 - Mark arm64 mair_el1 fields as unsigned long List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c1a1e8368b53009efe11fd31990182de2d9f5962 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c1a1e8368b53009efe11fd31990182de2d9f5962 commit c1a1e8368b53009efe11fd31990182de2d9f5962 Author: Andrew Turner AuthorDate: 2023-03-16 16:19:21 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:15 +0000 Mark arm64 mair_el1 fields as unsigned long The register is 64-bit so the upper bits could be shifted past the signed 32-bit size of an int the values were before. Sponsored by: Arm Ltd (cherry picked from commit a671f96d9319d63e4a634f88ae277c4d682bba69) --- sys/arm64/include/armreg.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 6ca4454a3806..6996ea4556ae 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -1173,13 +1173,13 @@ #define ID_ISAR5_VCMA_IMPL (UL(0x1) << ID_ISAR5_VCMA_SHIFT) /* MAIR_EL1 - Memory Attribute Indirection Register */ -#define MAIR_ATTR_MASK(idx) (0xff << ((n)* 8)) +#define MAIR_ATTR_MASK(idx) (UL(0xff) << ((n)* 8)) #define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8)) -#define MAIR_DEVICE_nGnRnE 0x00 -#define MAIR_DEVICE_nGnRE 0x04 -#define MAIR_NORMAL_NC 0x44 -#define MAIR_NORMAL_WT 0xbb -#define MAIR_NORMAL_WB 0xff +#define MAIR_DEVICE_nGnRnE UL(0x00) +#define MAIR_DEVICE_nGnRE UL(0x04) +#define MAIR_NORMAL_NC UL(0x44) +#define MAIR_NORMAL_WT UL(0xbb) +#define MAIR_NORMAL_WB UL(0xff) /* MDCCINT_EL1 */ #define MDCCINT_EL1 MRS_REG(MDCCINT_EL1) From nobody Mon Sep 25 11:00:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfk5HlLz4vNGh; Mon, 25 Sep 2023 11:00: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 4RvKfk26ddz3Lcp; Mon, 25 Sep 2023 11:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RakWQJ84KbOat6qt/dPUQQ3jlzUUtFDnm9TW83vJcFI=; b=IMulmUXzqUVAFFNyKRa+g7yEnmUjT8kO8fNTq3xl2/XA1RYjdMmhgl3dQDl4fsBBXIbiuJ AaN1MGqOt87F5BAcZN/mRE8buzhblD15mndOAc/WneQsGCLi3aiqMXCSszI7iNZiVKdpv0 8+5A4N0C1CZ+A6jv+6JXixqa7cE18zkFcaiSBMh8Z5A5QhZN7RJaXuNbPaS1Leno7DAoAr oRGoUvUetUH1xRAzRBrSJ9ZNEmkUfa3cshvtgJG2DHjPW9TCQ2wX1fi1TjSFcgJkq+muAE s5GUvXfQQYcdvp+ClKEz9OBXp/RurogWKq7b6VHn5Wu1usLT2hOigwgz9mRXVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639646; a=rsa-sha256; cv=none; b=LsrREyhFG98ajXh9R1yfWKMYoABJba5mqh3BMDQZenx9Fu3lhjZX2iU5O/cAyX+XW+mT0M T+WHY0eHqfQ44N2aIelVypvmEa9m0ed4dqZ6IABtBhTdmjzEjQPXOJ8Jj3DVG/0qcv+/V7 wYc+mr5Xubx4Zbj9Qbr9uLkLvPFMi12KF4V26skEO+7akhcKGOZ90u9u7ybOxmET/rH32h zvKCD+EjoE+z40svZFmGzHoJKqRla52EHKZtSsN0h9WxFigH2aoQbjAT6XYnf1UF4alxzL 7KdSivCJzKbCRNUASMK8HEBxLloNhEwcUZY+v3Z4HbiZTFTti0TAVJm2AqfLYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RakWQJ84KbOat6qt/dPUQQ3jlzUUtFDnm9TW83vJcFI=; b=PDCnrbew9fTWJtPEWAYFQHMWXGTZhtV2Ny4a8lFOeV042Y8B6PfCxi51a+ykc09W1ueI2r 0Kz2X4YkjHtM4MUyMVG2SL3mMFX9j7gAZpUeLBSj3P5B5mTBM9mLdo4jlw15F93FV0ZZIP VN8xHxHisGA1N6NbJ41LpBvcEd2aVmPNQPDDvwOlw+5XehSG7PzyfNgCluxUg6WBEyMltA BKan71lgl0a6VnuZUx3vdFY3gw+RgTyYvU8gqBFd6Qnf5ATjTgwwSn66NhMW9X7FErS4V3 +ocUNgsSUKT+u+tc8xvzBBZ4X3idbL0Rn9TKVq50ty4QfGoqf43zp7SEYA+ZtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfk11rwz1QMg; Mon, 25 Sep 2023 11:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0k6Y052459; Mon, 25 Sep 2023 11:00:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0kX8052456; Mon, 25 Sep 2023 11:00:46 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:46 GMT Message-Id: <202309251100.38PB0kX8052456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 9cab59fe05b4 - stable/13 - Handle the arm64 unknown exception separately List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9cab59fe05b492b23e10ff9c507511cdaa97bae4 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9cab59fe05b492b23e10ff9c507511cdaa97bae4 commit 9cab59fe05b492b23e10ff9c507511cdaa97bae4 Author: Andrew Turner AuthorDate: 2023-03-31 09:15:45 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:15 +0000 Handle the arm64 unknown exception separately Rather than falling through to the default case handle the unknown exception with its own panic message. As ESR_EL1 is zero for this exception stop printing it. Sponsored by: Arm Ltd (cherry picked from commit 3a0cc6fe61ea29334c17dfb71bf24ba9e604ab4c) --- sys/arm64/arm64/trap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index bc2136cb9e80..10a2138d9625 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -513,9 +513,12 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) case EXCP_UNKNOWN: if (undef_insn(1, frame)) break; - printf("Undefined instruction: %08x\n", + far = READ_SPECIALREG(far_el1); + print_registers(frame); + print_gp_register("far", far); + panic("Undefined instruction: %08x", *(uint32_t *)frame->tf_elr); - /* FALLTHROUGH */ + break; default: print_registers(frame); print_gp_register("far", READ_SPECIALREG(far_el1)); From nobody Mon Sep 25 11:00:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfl3YYwz4vNPZ; Mon, 25 Sep 2023 11:00: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 4RvKfl2zDqz3Lld; Mon, 25 Sep 2023 11:00:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWMM62KjwXuOXtXBLGp3dELepN24wQNJ5UW1mQiaTgM=; b=W11DrQDPsmp+Lb2Ea45XSMBumMdow5K/lYvix6O7u1K7yfzmaXue5G6hGp9JLSTO5ckhSW Ku0/Hydob7zMKGx6rNTLlGrbNzgHG8uzusse5QKtVnxbmtSf+LfWmpUMJ1chR2CvwsOHF2 POEbHJoJK69F16RlGsGc2e9r/YO6i2bzytEQmeA+xyvknG4N+pSAzKFBcVXVFCnRVDNgnQ SS6z82KaeE7s3DqigUmUeqm4/9gjXzMPfGICRWF/FrqZGkgkkx1LnVOcvQEXU5H78MIzAr vut44IMNvFzWBu4NNNP+SsR4vnbZet8m5zwWBOBO1AMk4R4GpdRPbU9FI9J37Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639647; a=rsa-sha256; cv=none; b=P4LNjrN83swbgWojywTr2A8U/7ozp1bYPnOMgIiN54NoAet/iB0UuuiPMPSClKp9GLagpl 2srNTFvL9gj6NvEw4xi5R4PrZflNI1hFL9+/ZiDjjm1pPaTb/+Fqzdn0v4A5poFHS77ELS RFhMAYFCnmE1N7SOtThQ8Xu5/nsv3zhUL5JW2tcZ+t96kQ9jart4xTFEyut7q4+Cdo3Uj2 F/pwP2YQ1mXBKdXhqRNZ/uJ5v5qoKCh3RZAUqPKzzYmLgs3QLwZvy0jlIZRXSVtdr9ov3i W/xzkoaKPriEZ1gXGOahZCqgyOwbdP3Nnd69HD+C7TDc0W42eJU+2h5yzLnyFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWMM62KjwXuOXtXBLGp3dELepN24wQNJ5UW1mQiaTgM=; b=wNY0dKj3VOXjlE5+EoWbGFsha7BWr4FTqToyFCCmPDdZ37g+5V0pigOyh0yT6RlVN56LCZ Sa2th0GtWoix+GvsXWF77R1piN6EtxTcnVkKFJEZH2VhbhIETGgEZbTUWIH395K8D1UQ6j 14SfwW4/KRXO55GtaRA+oP4CJsfmZDyfzNRvthp9BHszqeiK7SyYDUzkWQAvHYe7lcD7eD AYQvnPbu/jnmV5tdATyH+TFcaemKPXwAe9iisa7ICe8sjSwGBrV7p6pWDELNcmIrABb+w7 6f5mSqz7HOFGk8Zxc+baKpDpxVWdeox+ScAEQCecE4sNjzvrviZsrv1D8gujmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfl23Sqz1Qd2; Mon, 25 Sep 2023 11:00:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0llr052504; Mon, 25 Sep 2023 11:00:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0lwV052501; Mon, 25 Sep 2023 11:00:47 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:47 GMT Message-Id: <202309251100.38PB0lwV052501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 27ceb260a1c1 - stable/13 - Move arm64 EENTRY uses before ENTRY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 27ceb260a1c189b0aa0ea59be8ab6b924f7f6a40 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=27ceb260a1c189b0aa0ea59be8ab6b924f7f6a40 commit 27ceb260a1c189b0aa0ea59be8ab6b924f7f6a40 Author: Andrew Turner AuthorDate: 2023-03-31 12:34:51 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:15 +0000 Move arm64 EENTRY uses before ENTRY The ENTRY macro adds instructions to the start of a function but not EENTRY. To use these instructions in both functions move the EENTRY use before the ENTRY use. Sponsored by: Arm Ltd (cherry picked from commit 47ff149afaea6a403b8d044e26673bc3cd605fe4) --- sys/arm64/arm64/memcpy.S | 4 ++-- sys/arm64/arm64/support.S | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arm64/arm64/memcpy.S b/sys/arm64/arm64/memcpy.S index d5fbfa64e0fa..b394d6c1d30a 100644 --- a/sys/arm64/arm64/memcpy.S +++ b/sys/arm64/arm64/memcpy.S @@ -55,8 +55,8 @@ The loop tail is handled by always copying 64 bytes from the end. */ -ENTRY(memcpy) EENTRY(memmove) +ENTRY(memcpy) add srcend, src, count add dstend, dstin, count cmp count, 128 @@ -237,6 +237,6 @@ L(copy64_from_start): stp B_l, B_h, [dstin, 16] stp C_l, C_h, [dstin] ret -EEND(memmove) END(memcpy) +EEND(memmove) diff --git a/sys/arm64/arm64/support.S b/sys/arm64/arm64/support.S index eb2976ee8ce7..805867fd5d17 100644 --- a/sys/arm64/arm64/support.S +++ b/sys/arm64/arm64/support.S @@ -173,15 +173,15 @@ END(fueword32) * long fueword(volatile const void *, int64_t *) * int64_t fueword64(volatile const void *, int64_t *) */ -ENTRY(fueword) EENTRY(fueword64) +ENTRY(fueword) check_user_access 0, (VM_MAXUSER_ADDRESS-7), fsu_fault_nopcb fsudata ldtr, x0, 0 str x0, [x1] /* Save the data in kernel space */ mov x0, #0 /* Success */ ret /* Return */ -EEND(fueword64) END(fueword) +EEND(fueword64) /* * int subyte(volatile void *, int) @@ -216,14 +216,14 @@ END(suword32) /* * int suword(volatile void *, long) */ -ENTRY(suword) EENTRY(suword64) +ENTRY(suword) check_user_access 0, (VM_MAXUSER_ADDRESS-7), fsu_fault_nopcb fsudata sttr, x1, 0 mov x0, #0 /* Success */ ret /* Return */ -EEND(suword64) END(suword) +EEND(suword64) ENTRY(setjmp) /* Store the stack pointer */ From nobody Mon Sep 25 11:00:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfm4Pmsz4vMZd; Mon, 25 Sep 2023 11:00: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 4RvKfm3lZ4z3Ljm; Mon, 25 Sep 2023 11:00:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEX+47cqQahinGd2PzrAnsPEy/WCfzn3A+vk3jvr2oY=; b=wqTm7hz78aC9Jwhy1YhZxWHGHxdoTuerS3q2JR5zj2+pxIj7QydGatiAzk/M1fGlDeU7SO QFnH/F6h2LBjh7Cs4cNeUEzmI3qkS1fezm/jhJuEJP5pGLTGV0Py/tLASZxVVLvSe6gmq3 ctHx9p+Qfw+n3aN752z7C3Q7FlINyvAw2HtFexa8WS2t3QtbLC56oxM1EYLmdRdwUaAZDT 6EZJxCjKf10bMhmaaTIuIKiDEsO0MzOEG/Hes9Nmrb5uIJYHioBi8Vdg2k9cr/iAJXrBTk 4e1PNtP+BtpUpzzYlkrVieKGCm4X+7oy1FgW+jzCaruQxlPBeqN/HOnqYVIBcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639648; a=rsa-sha256; cv=none; b=FSf42yJKrX9TzSiMRw57Rd4fgJsXGbr6cVY9ZkApXH+/7pEnzFHMNhPwB3hZrRC64Fphog XS8tUZDrerotT2/xPsw5FJ875G767aLlvTtMjzn7DD7moxyD8cpvzRKl5aZRvicxEiDRT8 kp+B49kNMY+Xyb7e1IMm5E5zY29gmtpRpVJWclY1bvAf2ycI86wVJT4BmKv1FLFh6ykfoY SBZdcx2eBNVUvkL9R3bhj4tvhN6BS7PndtoT9smCZzHIrG8Vc6+dXFZ03XrArlx4ufe3oa n6rOS744cc+1jeMxASwyEPX3yJ/9blWmHitOObKl8v+h+BZbK7y9yZpGmp8ofA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEX+47cqQahinGd2PzrAnsPEy/WCfzn3A+vk3jvr2oY=; b=mpMRUzF6xzWKe3mMBNatG19yNE81/pqDVjgO/QXcypS3TnAs+P3mOhGN72PzlOSo8cUe3K uzkuNAhHUpamF4S8xO5kiLoz7QUPVf+yRNvdjAdTTCjV+gkuyOqNQ9eMErgraF4iM6Xx5k zm7W5bo/oe1u6QP21Xw9SvC4zMw3iZPGmkf5aD4DwS8G8MSe/1BnRyrdP8W8z4fo6ne3S9 zYq4HmyHdPMSpRJb36FkMPL5s9QUBwrqiMNZTaAq1SF5k+xhygZ/gVbFjdPskoDpEbt/hD WZXaQ7dHNianwkKqofraq2UfOI7t+4Lc+unpYVnYibzp6idenM/p2OKYczjlJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfm2rXPz1QMh; Mon, 25 Sep 2023 11:00:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0mgP052543; Mon, 25 Sep 2023 11:00:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0mP0052540; Mon, 25 Sep 2023 11:00:48 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:48 GMT Message-Id: <202309251100.38PB0mP0052540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: b70553860764 - stable/13 - Mark EENTRY as .text List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b705538607640722e1290859dd0a916e6cd1eeb2 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b705538607640722e1290859dd0a916e6cd1eeb2 commit b705538607640722e1290859dd0a916e6cd1eeb2 Author: Andrew Turner AuthorDate: 2023-04-06 15:36:15 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:15 +0000 Mark EENTRY as .text To allow it to be used before ENTRY we need to ensure the symbol is in the .text section. It also needs to be aligned correctly. While here mark the symbol type as a function as in the ENTRY macro. Reported by: jrtc27 Sponsored by: Arm Ltd (cherry picked from commit 04b4655997d2d10e3f3748f3a1a1d84c4ae95740) --- sys/arm64/include/asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h index 1ae22d9e91ee..783e8ee82c66 100644 --- a/sys/arm64/include/asm.h +++ b/sys/arm64/include/asm.h @@ -48,7 +48,7 @@ #define ENTRY(sym) \ .globl sym; LENTRY(sym) #define EENTRY(sym) \ - .globl sym; sym: + .globl sym; .text; .align 2; .type sym,#function; sym: #define LEND(sym) .ltorg; .cfi_endproc; .size sym, . - sym #define END(sym) LEND(sym) #define EEND(sym) From nobody Mon Sep 25 11:00:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfn5bJpz4vNPg; Mon, 25 Sep 2023 11: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 4RvKfn4k8Kz3Lxx; Mon, 25 Sep 2023 11: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=1695639649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ygaEuVSsothqGZWZcLZWtKzK/OX6C5QuB6fit/t74g=; b=MV8BUkpxZCrdQqctRCwJjzyGWyspPRlKdA/sGGdRgyVSvZ761a2pIqrLff4nZ8gJ1doWys In9hcFqIpmZ//X8qq9YpOYqNfhDgtGKOBQP7o8Q+riarIrIFyK0KB9q2+sgSCIEV+suBps kzFWq09lXGIrCSG1BjbjJxRWn+qI4lAjpbYsGGONsV5iDaty7WBbmPqRz2P8OgzsrO+mFO JTTxQmrCocSytEZw2Xb93GBFzWf3ss3cT5SauewEZKVZGuDZ4zqwF+OTy/5s4doGuP8GdM JtTTMBE6qkOMkTh9ElWwl0QOiCwpaaPhRSdodUiS6An9dp50WhguS/Tj1b/Vug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639649; a=rsa-sha256; cv=none; b=keTm/aqG7GG1+ahthXOKI4JYBGICM4S+fIaY38bgXEJRJaLZTIv/kL6eFRI0FXAbfmenNi 4+nHTO+EIPNYlKfAxX1g/reZ/uxl0WtSTyzwQi733hQllEOahaojJyTqV/nhqa+nXpotjZ 3hPTYwtqiOMP4Nn5a4XF7BVR3Z1zXvlrCEA+xlH97piy7/TAjTuLH1ul781KgBJitBylXZ mlKTQM5l4sI2spBM0kBIS3O8WzoBwk03BUSXEPunap58xUXfRmqoW+V6KvLziRoOMXI2Bl /ySXaE6TLv2Vk6HX6qWx67BhV/4EPIC6eeiY8KHAXgriX0gx5NebO6T+rROcVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ygaEuVSsothqGZWZcLZWtKzK/OX6C5QuB6fit/t74g=; b=A3NZqs8cz4a+5H/q6ohMSw3xo+T7wlo0J7drNkGLzL2Zz9rSEnocMKU14PflDagq+6iWx9 OTzmVcyQFbW/pxLWPf6aUfhd6VJFmNqCpuR/Hy8ZQEHzkWsVeFZaSuQPPa7l9MFNFsiJI8 0Eh4MSvAqVizUnJFVEktmqzdT9el92vjCj9jUvFa4iMryKd+Qj9Ps54beh/zNMOvWgTh5d NDti8OJVW7Zv4hrqPtNZuWsP9sP3tm1laLey8NpCNgara5qr4HMdgKSF7XSSmnN+v/NIhL AgZu6LNpyJepbuVZuOVwIgxzPcSwOp1XmwMRDNWWpI9aKp6lVjcQDfoEOFTA9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfn3qMfz1QMj; Mon, 25 Sep 2023 11:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0nJI052582; Mon, 25 Sep 2023 11:00:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0nZa052579; Mon, 25 Sep 2023 11:00:49 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:49 GMT Message-Id: <202309251100.38PB0nZa052579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 2a88ca31330c - stable/13 - Create pmap_mask_set_locked on arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a88ca31330c24cdb364218c5e0404b8878fa9f5 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2a88ca31330c24cdb364218c5e0404b8878fa9f5 commit 2a88ca31330c24cdb364218c5e0404b8878fa9f5 Author: Andrew Turner AuthorDate: 2023-04-12 12:09:06 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 Create pmap_mask_set_locked on arm64 Create a locked version of pmap_mask_set. We will need this for BTI support. Sponsored by: Arm Ltd (cherry picked from commit 421516f25e9cfa91b33841f633a463889bc10af7) --- sys/arm64/arm64/pmap.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index cee9ddffddda..edd34bcd5e68 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3449,14 +3449,14 @@ pmap_protect_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, pt_entry_t mask, * pmap and range */ static void -pmap_mask_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, +pmap_mask_set_locked(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, pt_entry_t nbits, bool invalidate) { vm_offset_t va, va_next; pd_entry_t *l0, *l1, *l2; pt_entry_t *l3p, l3; - PMAP_LOCK(pmap); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); for (; sva < eva; sva = va_next) { l0 = pmap_l0(pmap, sva); if (pmap_load(l0) == 0) { @@ -3549,6 +3549,14 @@ pmap_mask_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, if (va != va_next && invalidate) pmap_invalidate_range(pmap, va, sva, true); } +} + +static void +pmap_mask_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, + pt_entry_t nbits, bool invalidate) +{ + PMAP_LOCK(pmap); + pmap_mask_set_locked(pmap, sva, eva, mask, nbits, invalidate); PMAP_UNLOCK(pmap); } From nobody Mon Sep 25 11:00:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfq1XNgz4vMZp; Mon, 25 Sep 2023 11:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvKfp61tSz3M82; Mon, 25 Sep 2023 11:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xabEW/ik/AqwdAkCvPs8NvA8hgW0X7O5swk1E2vlFL0=; b=Zxsb+JiZWWnH5ZU0KdVA/fZsdqwnX9ZudB1nXnRDzw9x9fbcivhr4l/p/Ed4SXPM+2ugBM AGtaGoLR167clAO1jm3HB1U6T9TOlgcyCo8iph7IPzuLgMSQxGG7aLtNNEhE1Jcj/T9akl jEnEVt/6j9OtyTCX5ggD9HjNxTmWwX3A2fM7THqUimsXmrB6uwViGl5ylqo17A0xx3yn0v qx9GwiJQDMiPHikbAjhQ4AiDnfCluG8wr/ne9E70rTVaOvOZ7bkJ9qp9yUgAREaj7YJqBV cMOSimouUajc/2OMT5heEVPH4iP0YmwlyO0/CjqdoD+gRUFuqvMkU3mn4lo6Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639650; a=rsa-sha256; cv=none; b=PD00z0+10ohcGATzFWrZq4DzFL9QbnMCKSLWujpEprbdrqC38T5LV6E0CnFlUSCni6CeQK mlovWE+wUiHb1lbYGyXq6p1SEW9zoTWPFFr/d3orAn2eCJJkGOeA0VDSrACQzDaWp0YIET Uix9tAMOr+8hnvrGLTwP2gVcqRxvkEyr0t9YMmmkFgpfkNWo7Uy0UCrvFtIXAmYmzNiw6y 85Maa+wEiE1ZMXPXRZUm5891/IorNWmTYn1LxO8dW84HJIZqAxiuWtaIJeWBbhJBYMqI5e kj/EfSPHPqr6BaLhtyWZfg1VNJeQ+12QzRr8D31MQ1gb7puw6C3vWhUpxadOqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xabEW/ik/AqwdAkCvPs8NvA8hgW0X7O5swk1E2vlFL0=; b=c5yVuVCxmDT6Q3UMAFiN3DzInjmUFiqKJ38VCcmKOKrgNX+A0wt4kFFBhXfTatLqt1+gPp y9CipZeIOvVezhxP5V4qS//d6mICcGE1xnpHi4QdEfbdO0TacRmlLdN1wSZ0dV4wLrL4B2 L03tbM/fY3MT7c0iyA2HGtDpjMij28U73d9nkZpu9u7zj79ZYo0azvYpFguCNdlOUeWPsa PWys5g+3VE1RMbcrzFVy3Kcns9Hrjs/XrnhCiwPnMhTMcM5uKG662SAx5VVWOXmyrrotsD 1DBUxNp8eG3Bu/YgE1GiKml0Hly39BAJphBwaeQbpiQjuzejGaFhHeS6FZyDag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfp538dz1QSd; Mon, 25 Sep 2023 11:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0oBR052627; Mon, 25 Sep 2023 11:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0oRA052624; Mon, 25 Sep 2023 11:00:50 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:50 GMT Message-Id: <202309251100.38PB0oRA052624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: e19bdeccc89a - stable/13 - Split out pmap_map_delete on arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e19bdeccc89a76727ddb56c9c2dbfc66daf9003a Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e19bdeccc89a76727ddb56c9c2dbfc66daf9003a commit e19bdeccc89a76727ddb56c9c2dbfc66daf9003a Author: Andrew Turner AuthorDate: 2023-04-28 10:54:19 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 Split out pmap_map_delete on arm64 This will be used when supporting some extensions, e.g. Branch Target Identification (BTI). Sponsored by: Arm Ltd (cherry picked from commit 020edaea2ab05c9cea7d83872f28a4e5e65407e2) --- sys/arm64/arm64/pmap.c | 12 ++++++++++++ sys/arm64/include/pmap.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index edd34bcd5e68..037f1d5a805f 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3294,6 +3294,18 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) vm_page_free_pages_toq(&free, true); } +/* + * Remove the given range of addresses as part of a logical unmap + * operation. This has the effect of calling pmap_remove(), but + * also clears any metadata that should persist for the lifetime + * of a logical mapping. + */ +void +pmap_map_delete(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + pmap_remove(pmap, sva, eva); +} + /* * Routine: pmap_remove_all * Function: diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 95e43eada9cc..7305b8d32e87 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -177,7 +177,7 @@ int pmap_pinit_stage(pmap_t, enum pmap_stage, int); bool pmap_ps_enabled(pmap_t pmap); uint64_t pmap_to_ttbr0(pmap_t pmap); void pmap_disable_promotion(vm_offset_t sva, vm_size_t size); -#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) +void pmap_map_delete(pmap_t, vm_offset_t, vm_offset_t); void *pmap_mapdev(vm_offset_t, vm_size_t); void *pmap_mapbios(vm_paddr_t, vm_size_t); From nobody Mon Sep 25 11:00:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfr2nZxz4vN00; Mon, 25 Sep 2023 11:00: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 4RvKfq6rTNz3MKk; Mon, 25 Sep 2023 11:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/uD/f2Ms3wic6Lq/AOilC92Qd0dNQ9HPM/J/yttBYNU=; b=x4ddhbFl/VPEjnQM983q6Snj9kLeeYadnL05jiS6uZbk2sG/pGwNjdBA82DnI/OlbMzjlK cDt4qbOp7n/qx5YG+h2IWDuauhjN8aEQcasO75fOCBLuL7zxP2DVv4gxY2eTfQK02izwQp 6kiI8cCgPERkCTrCAdsQm5/qj/97wuHstxdbHCAdQ+h8dTI7H9k6Mn4OOx3qzQtUQAfnrB gRwQHlJj6pu8s5/AWXDmxyK2w6NMx0aRndEHXJmtiPyUwKvKd92xXTyxk5YATNavD5Djdx XC0/uUcBryAF4s566ZMmq3GlYVNHf1L47mR+wf1UFdpnn1e0cHG33cb35dy0bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639652; a=rsa-sha256; cv=none; b=QzWtSNH4paAJl++tBMVnjuLw19J4P1YT5WZYCXk0ZZ9f20KQQtV5UVzZzVcpBVJWxQC26k ra6zdj2bhstCfBMIKTGBJdF5eXJIj+ci7GqmoFH65hYYKDKC1T7p4YiNAS9tXV+va6GTBC 68Ngy+Rj0XHU2N5Z+XNSlPMOUM/MHd8yOz4mzR4wII+61FJ7GJd1l6N6brFtgaOtznK6aA Vi6jNOenO0NYkAnaSETH7lcnzkT2HieZiKEjDoxhmsAsl+eIlyMYZuovgyRYEOipsmJPlf GirymprW9cHuN3s5zmK2YYPcc1Tx2q6SRUr4rETPVCz3HC/3yQ0UDbG5H1KL3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/uD/f2Ms3wic6Lq/AOilC92Qd0dNQ9HPM/J/yttBYNU=; b=BI5JrfNcsQKTwxpVXE1NatHR5WCtgvAxUTPrFq0hN6E3XsHQm78kQE5281RpfrZVCZS2ef RXOxHnT8dU6vPB9q0Fqd8xDKkGBlSpsglildlUo9UcpxAjvkAjTOf8FEnAaQd7dok7H1CK mSqRvwSFkCQAY5pyLPu9Pyeys0JehcyxTK39Xt28p7v3IcvhJQQsFnlfq5zgv8UAXVy3ZF Ioa2+clWD0pypZ80TtNybuPpnXk/+rnaz9HsR8x0CJHfsa/IB4qJBBj5ETanbUAp9dOfsb pK3VPcIvjTWzLTBNbJDY7uWSr6393ahxc2cCvxRPhKGFHQ79sk9fsb7nKfOCVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfq5yMdz1Q5k; Mon, 25 Sep 2023 11:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0pow052677; Mon, 25 Sep 2023 11:00:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0por052675; Mon, 25 Sep 2023 11:00:51 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:51 GMT Message-Id: <202309251100.38PB0por052675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 6d0d501a7f58 - stable/13 - Add more arm64 special registers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6d0d501a7f580cc010759e5235e6fc89cb2037ca Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=6d0d501a7f580cc010759e5235e6fc89cb2037ca commit 6d0d501a7f580cc010759e5235e6fc89cb2037ca Author: Andrew Turner AuthorDate: 2023-05-04 10:30:57 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 Add more arm64 special registers These will be used by bhyve Reviewed by: markj Sponsored by: Arm Ltd Sponsored by: Innovate UK Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40128 (cherry picked from commit 419f8fc7fbc8b860df92db58d13ac9c9aafa1c10) --- sys/arm64/include/armreg.h | 48 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 6996ea4556ae..f3bfda15e908 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -453,12 +453,24 @@ #define ICC_SGI1R_EL1_CRn 12 #define ICC_SGI1R_EL1_CRm 11 #define ICC_SGI1R_EL1_op2 5 -#define ICC_SGI1R_EL1_TL_MASK 0xffffUL +#define ICC_SGI1R_EL1_TL_SHIFT 0 +#define ICC_SGI1R_EL1_TL_MASK (0xffffUL << ICC_SGI1R_EL1_TL_SHIFT) +#define ICC_SGI1R_EL1_TL_VAL(x) ((x) & ICC_SGI1R_EL1_TL_MASK) #define ICC_SGI1R_EL1_AFF1_SHIFT 16 +#define ICC_SGI1R_EL1_AFF1_MASK (0xfful << ICC_SGI1R_EL1_AFF1_SHIFT) +#define ICC_SGI1R_EL1_AFF1_VAL(x) ((x) & ICC_SGI1R_EL1_AFF1_MASK) #define ICC_SGI1R_EL1_SGIID_SHIFT 24 +#define ICC_SGI1R_EL1_SGIID_MASK (0xfUL << ICC_SGI1R_EL1_SGIID_SHIFT) +#define ICC_SGI1R_EL1_SGIID_VAL(x) ((x) & ICC_SGI1R_EL1_SGIID_MASK) #define ICC_SGI1R_EL1_AFF2_SHIFT 32 +#define ICC_SGI1R_EL1_AFF2_MASK (0xfful << ICC_SGI1R_EL1_AFF2_SHIFT) +#define ICC_SGI1R_EL1_AFF2_VAL(x) ((x) & ICC_SGI1R_EL1_AFF2_MASK) +#define ICC_SGI1R_EL1_RS_SHIFT 44 +#define ICC_SGI1R_EL1_RS_MASK (0xful << ICC_SGI1R_EL1_RS_SHIFT) +#define ICC_SGI1R_EL1_RS_VAL(x) ((x) & ICC_SGI1R_EL1_RS_MASK) #define ICC_SGI1R_EL1_AFF3_SHIFT 48 -#define ICC_SGI1R_EL1_SGIID_MASK 0xfUL +#define ICC_SGI1R_EL1_AFF3_MASK (0xfful << ICC_SGI1R_EL1_AFF3_SHIFT) +#define ICC_SGI1R_EL1_AFF3_VAL(x) ((x) & ICC_SGI1R_EL1_AFF3_MASK) #define ICC_SGI1R_EL1_IRM (0x1UL << 40) /* ICC_SRE_EL1 */ @@ -521,6 +533,14 @@ #define ID_AA64DFR0_TraceFilt_NONE (UL(0x0) << ID_AA64DFR0_TraceFilt_SHIFT) #define ID_AA64DFR0_TraceFilt_8_4 (UL(0x1) << ID_AA64DFR0_TraceFilt_SHIFT) +/* ID_AA64DFR1_EL1 */ +#define ID_AA64DFR1_EL1 MRS_REG(ID_AA64DFR0_EL1) +#define ID_AA64DFR1_EL1_op0 3 +#define ID_AA64DFR1_EL1_op1 0 +#define ID_AA64DFR1_EL1_CRn 0 +#define ID_AA64DFR1_EL1_CRm 5 +#define ID_AA64DFR1_EL1_op2 1 + /* ID_AA64ISAR0_EL1 */ #define ID_AA64ISAR0_EL1 MRS_REG(ID_AA64ISAR0_EL1) #define ID_AA64ISAR0_EL1_op0 0x3 @@ -1211,6 +1231,30 @@ #define MDSCR_MDE_SHIFT 15 #define MDSCR_MDE (UL(0x1) << MDSCR_MDE_SHIFT) +/* MPIDR_EL1 - Multiprocessor Affinity Register */ +#define MPIDR_EL1 MRS_REG(MPIDR_EL1) +#define MPIDR_EL1_op0 3 +#define MPIDR_EL1_op1 0 +#define MPIDR_EL1_CRn 0 +#define MPIDR_EL1_CRm 0 +#define MPIDR_EL1_op2 5 +#define MPIDR_AFF0_SHIFT 0 +#define MPIDR_AFF0_MASK (UL(0xff) << MPIDR_AFF0_SHIFT) +#define MPIDR_AFF0_VAL(x) ((x) & MPIDR_AFF0_MASK) +#define MPIDR_AFF1_SHIFT 8 +#define MPIDR_AFF1_MASK (UL(0xff) << MPIDR_AFF1_SHIFT) +#define MPIDR_AFF1_VAL(x) ((x) & MPIDR_AFF1_MASK) +#define MPIDR_AFF2_SHIFT 16 +#define MPIDR_AFF2_MASK (UL(0xff) << MPIDR_AFF2_SHIFT) +#define MPIDR_AFF2_VAL(x) ((x) & MPIDR_AFF2_MASK) +#define MPIDR_MT_SHIFT 24 +#define MPIDR_MT_MASK (UL(0x1) << MPIDR_MT_SHIFT) +#define MPIDR_U_SHIFT 30 +#define MPIDR_U_MASK (UL(0x1) << MPIDR_U_SHIFT) +#define MPIDR_AFF3_SHIFT 32 +#define MPIDR_AFF3_MASK (UL(0xff) << MPIDR_AFF3_SHIFT) +#define MPIDR_AFF3_VAL(x) ((x) & MPIDR_AFF3_MASK) + /* MVFR0_EL1 */ #define MVFR0_EL1 MRS_REG(MVFR0_EL1) #define MVFR0_EL1_op0 0x3 From nobody Mon Sep 25 11:00:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfs1kqVz4vNDf; Mon, 25 Sep 2023 11:00: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 4RvKfs1Bzmz3MBd; Mon, 25 Sep 2023 11:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+7kmc2RhDLsDrlXitXbF9Hc2SjGLcUKs2bti8XsBvdc=; b=qGVkUrN97+70BsozfCzUDYCmlwZ1+MZS38TbuOZHO2nJJspMSk3dBg4UYaMLRCPbJYa1Xl UjEUBbRtHmvBg4TXcUyQrZBnQ0hXYr79PF2fafanL11HJI4PgPhkwzzjO3iyaZif1SX6hE Q1MzziCXiKxRZcnp3EjBkuat1hIBz3qOX7+lu4wr2JQJOgZ2twqT85tUmOD4DfU8hKQRMY EunkPRZWGlGuJP2k0PX1E5nRJoWhcjMJGvlOIS3X7XQP9zJrvgvk1FRxQkN+xrhpic+/1q CPGy6uuqoU5ZBGyKWgDYPacw0PXEoS0D7N5cI6McxX5QNf0Y4z5FTH/ZbPPwZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639653; a=rsa-sha256; cv=none; b=MvthpNdJVKXLqFHHiTvDpFScntRrhM98+lret4QAr3sTha0N+er3oko3FAsbTXtS3UG5Tq QCKgLFJWfN2Kt35vOS+O/G4q1lLZcCK/hht81Tla19BZH5XUCgty4DKnIFdMyp3ETqJ6x+ DypcEUOlX+0YxSJ/fYFvxmKa+qumyeurogeXMN4Xc2ymcetNTzltiYaWrZyyWessOIKZWE YbrRLtZfRLCdMljmGaNOycXpwuVwBxmeS+a9qmM6lP1szRUuCGKFxu/aSMYrzrsTi2LPnB KYnxG2fgMNMdbKa50fbUNUd4Ue0hBCy27NK+6chGl5Xy7O2BvQH1PUIsv7iitQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+7kmc2RhDLsDrlXitXbF9Hc2SjGLcUKs2bti8XsBvdc=; b=prB5X9dAICxr8IWdaW76ADuDvEyRTwvVgwl28LZBhbQX8r1tY3bqDA1tsZnSQxcmvyx2eC ULyr2/6L9JUgbaZc99LrImrSxsGHIILr2Qc/2bu6xRcBD60sHxObJffeh1QYydlav9caHr MTBPXO2IHf6rN5yDi6duaXV/zClf6QKD1FsSS8TKaXjjf5EWaoNbSVsyR3+ZJeU9msi8ty d7om7Cz3ByraT8bu7+pIlKeBwMrbN2InYP5GH3ZCCsDVmHPpVG4mK+JCdfV+YtbiBPmtc8 hrhlz/FMMjlulu5rjnRwbkOIjbDhOTB8D9NUkYdD8OyzvQLq6HoEhSDWhyxTIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfr6x9wz1Qd4; Mon, 25 Sep 2023 11:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0qNE052728; Mon, 25 Sep 2023 11:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0qXY052725; Mon, 25 Sep 2023 11:00:52 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:52 GMT Message-Id: <202309251100.38PB0qXY052725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: ed2d2423470d - stable/13 - Print registers on an arm64 spinlock data abort List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ed2d2423470d7bb74db1c9779834ee9c7e5d6486 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ed2d2423470d7bb74db1c9779834ee9c7e5d6486 commit ed2d2423470d7bb74db1c9779834ee9c7e5d6486 Author: Andrew Turner AuthorDate: 2023-05-23 09:21:39 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 Print registers on an arm64 spinlock data abort When checking if the spinlock count is correct in a data abort we can panic without printing the registers. These are useful to debug the abort, e.g. by giving the fault address register. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40228 (cherry picked from commit 0731b0a9f1f9e3b4ec699ec67b6eb24159fa9b05) --- sys/arm64/arm64/trap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 10a2138d9625..45a4075507c3 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -299,8 +299,14 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, pmap_fault(map->pmap, esr, far) == KERN_SUCCESS) return; - KASSERT(td->td_md.md_spinlock_count == 0, - ("data abort with spinlock held")); +#ifdef INVARIANTS + if (td->td_md.md_spinlock_count != 0) { + print_registers(frame); + print_gp_register("far", far); + printf(" esr: %.16lx\n", esr); + panic("data abort with spinlock held"); + } +#endif if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL, "Kernel page fault") != 0) { print_registers(frame); From nobody Mon Sep 25 11:00:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKft1zdGz4vNRp; Mon, 25 Sep 2023 11:00: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 4RvKft1KPqz3M6D; Mon, 25 Sep 2023 11:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vVnvt7C4VtjCZ8byiizKdUOuyCPxGdNNwV7fHoFCVnc=; b=edpCBtkkA0ZU6MYOA71fz4+mmKao5+94Y1c/OB/RIZKQiTeyEaWm4iWPe8BvDzDw5Frfd4 fM10K02DRkqON+Hf/Fg++s1q081BMJNIH/i/UlziJL8bnec47h20BrwpxXWjbXB0mlgWVo pNc7wkFu3txJzqTukpTpBTlJOHFWl7AxXrcPOovv9UY/4MsFAlTjI8fwMbv2JQwoKLCmPM Keb8gfrEusTMoasQau123P86JE7eI3WESi2KAwpX96ISoYk2NVOIM/yDwfU/FE2b94BXq6 MpQ3RqmDCDeDgX8z9OXVN1NnZ2a8OUnURG1Q3zt3mxBZhRbm1Kpz7dmuG+ppiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639654; a=rsa-sha256; cv=none; b=Fnx7of2pvBI7mTHDQjtk7SDZ0EH3QVDXsHhlCp7ghajuNNzTnXEBlim4Uv81GjwS3AKxdv tb7M1mOoSK6yqxaLJQIWLr5qOH8mdySPEKzvNMnIWVkN76UfH+dgJkgTck8J9ogzG9WhjI ZRdby98tKND/puURvHWnBTEx47S5wFXx3HlKkR3qMl+Clh+arYvjkikgMuW4V9FUElVSlI Xq8uP1cMk8eBM8JistXHRcuD1O8bvVu8H2yvyNpUjPQTI1crTm3WZ0YawNObyi4/AtQ5e4 TKzkeTnFUJpEsX+f5/fmX8bzKaR6jcav37IKuEdXmzUmGAw8CxxgJBhxkxwfCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vVnvt7C4VtjCZ8byiizKdUOuyCPxGdNNwV7fHoFCVnc=; b=wStpz9s5nsip/cqmrmuo6PwEp/tyem6t/lQzV9I6kUJWqzAdk3oh04LdKyCke7aSw0qwza 7/0KRGOQKUgJ1YSffRAMmLAyMgaOqU0rs25g/bOrhyhdW3sbISYlL5pGCjmFodM8+ub8Cz 3XBpvl+kM3ZqcNYcDwviuUfwZR5jBo6P4hdoSQiOxpoO1x4jBgEx3549WrrdsE7togxqRD gUj9ssob/FjPyvHgOjJBPVNfUIQU/qSnlc3jRXq6/U5V9isk9sc6zzuITkcrRurgII9GXU uAX1fvVJ1oysslyZYvTxnTNlVjHJkBEpzltvGAXovsFnJtKzuNTZIjsIs8fTsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKft0NCXz1QMk; Mon, 25 Sep 2023 11:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0r0o052776; Mon, 25 Sep 2023 11:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0r5q052773; Mon, 25 Sep 2023 11:00:53 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:53 GMT Message-Id: <202309251100.38PB0r5q052773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 57a615a47da4 - stable/13 - arm64: Print the spinlock count on panic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 57a615a47da4b71ec4cacdbae23802e53c248844 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=57a615a47da4b71ec4cacdbae23802e53c248844 commit 57a615a47da4b71ec4cacdbae23802e53c248844 Author: Andrew Turner AuthorDate: 2023-05-24 14:40:30 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 arm64: Print the spinlock count on panic When the spinlock count is non-zero while taking a data abort we panic. Print this count to help debugging. Sponsored by: Arm Ltd (cherry picked from commit fa512fcd8fe74d72b7f29a324c8cd3ca20ff25c8) --- sys/arm64/arm64/trap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 45a4075507c3..7906bd94d470 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -304,7 +304,8 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, print_registers(frame); print_gp_register("far", far); printf(" esr: %.16lx\n", esr); - panic("data abort with spinlock held"); + panic("data abort with spinlock held (spinlock count %d != 0)", + td->td_md.md_spinlock_count); } #endif if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK | From nobody Mon Sep 25 11:00:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfv3Qfsz4vNPl; Mon, 25 Sep 2023 11:00: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 4RvKfv2N8vz3MRS; Mon, 25 Sep 2023 11:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gqqHCPPhT3yi5EJYXV3fyZnGJ75f6mMEwOqmrEPe9Q=; b=TTiz+0+C0RrHHApM04Pge1hmDlBaCMVEco2b0ls7vDIL3RiKKr/iw8rFzeLfuWbhYGhptR llZH8OwcmTx/OFe4TIJmN9e/K5DSyBQOP6ND7XnlTUV2Sd1zjFPU/X74Qn20hFPGy5KAny H5u+FLbtRfUx62cK753//JG0ByqbvSwNoTEp4brDBtS73++ac7YC28PrqH82/0KxeFZTT5 G1gG47SEVJ3NNaLVG4FChwvjkJSq61S39Aw+QqNt3tktiTIG+hYcSgtjnDRbLMFf+errYm TIYKA6CoK4E/nLePXCvOEUgSihS+WvwDM22PtMawNUDklVz0mw+S/S86kS5g1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639655; a=rsa-sha256; cv=none; b=JTGzIHXCBuU2uX9xprhPd9CRkSB5CmGRzJ9CeBUks5NGzejk7VQvC7WaeLlyfG5NoQZ3B/ BTrcnPxRpdj0NV/6NNoXU9t6LkOZjsg5roy0Kq3kfVHkjhX5fpJP1e42XcDda2ou8pird+ zrXXcz+q+mmY3HWOgzt0sWaL8ZDTY33ikaz7yMIxK3wPUl9UAU0SusXO+iu7XF9WQFU2w3 NcweMy9rpO8WzufYkLu3vCckNvJdIqonm24BsL6XfCnLvR8JdILYwoZYyrHW99pV6QP/qM t+qxifUPR9pT+bsKVBJy+PzvNTQJgATU1nm8N87rqrg/Kl7cC6S2HzBiRgv8oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gqqHCPPhT3yi5EJYXV3fyZnGJ75f6mMEwOqmrEPe9Q=; b=uD2iiaeyAZ7LF+k2tuOQXRSWw0cI/VfuFPPqxtt1Se0Bx1esiOwp6Lt/sYpzgDyyEzQHO2 f/NIQSB/xu7Tu1dcIoZlnVZmRdZOX47ETI783zeBMkGTRrx7p4QrtyOxVsFgvRZfUfGyG3 C5qAlhVQ0eOq/FKOGGaHdWduREox9ZVrI6jzNM0KSzimbqiIbI+ax59AftlAomB/nG8VLn MHngvZ4ih7CGudiRRuIVIHHO2IYDncBJxRRNmipUmJ81DvcoyPF62Rgjoitd0PKuKjREdx 0gbfzFdHPFGyAQ6k4WuKct4nbmVpdlFS/JbhmJ5xYCOirHUQC+bhsgtb2aQO7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfv1TFYz1QMl; Mon, 25 Sep 2023 11:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0tiY052823; Mon, 25 Sep 2023 11:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0tbb052820; Mon, 25 Sep 2023 11:00:55 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:55 GMT Message-Id: <202309251100.38PB0tbb052820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 0086da9f499c - stable/13 - Add brackets around GICv3 redistributor macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0086da9f499c4b0b453e2883b9380094327523c2 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0086da9f499c4b0b453e2883b9380094327523c2 commit 0086da9f499c4b0b453e2883b9380094327523c2 Author: Andrew Turner AuthorDate: 2023-05-25 08:35:14 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 Add brackets around GICv3 redistributor macros The GICv3 redistributor register access macros take arguments that are used as variables. Add brackets around them as is the style, and for safety. Sponsored by: Arm Ltd (cherry picked from commit 8b709c88e56dc7e035be6744572bd2978a704338) --- sys/arm64/arm64/gic_v3_var.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/gic_v3_var.h b/sys/arm64/arm64/gic_v3_var.h index fe63934dca4d..d423e51453dc 100644 --- a/sys/arm64/arm64/gic_v3_var.h +++ b/sys/arm64/arm64/gic_v3_var.h @@ -131,8 +131,8 @@ void gic_r_write_8(device_t, bus_size_t, uint64_t var); u_int cpu = PCPU_GET(cpuid); \ \ bus_read_##len( \ - &sc->gic_redists.pcpu[cpu]->res, \ - reg); \ + &(sc)->gic_redists.pcpu[cpu]->res, \ + (reg)); \ }) #define gic_r_write(sc, len, reg, val) \ @@ -140,8 +140,8 @@ void gic_r_write_8(device_t, bus_size_t, uint64_t var); u_int cpu = PCPU_GET(cpuid); \ \ bus_write_##len( \ - &sc->gic_redists.pcpu[cpu]->res, \ - reg, val); \ + &(sc)->gic_redists.pcpu[cpu]->res, \ + (reg), (val)); \ }) #endif /* _GIC_V3_VAR_H_ */ From nobody Mon Sep 25 11:00:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfw5WtRz4vNH1; Mon, 25 Sep 2023 11:00: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 4RvKfw3Xc0z3MGb; Mon, 25 Sep 2023 11:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sMblh3KJYGmzN7URx9kwfkfle3VZ2J633Ib5yN7hPgA=; b=pxJoxxTbOAliD0EBMvSLQSOhNYgH/YiOZ/VDp49Le/HRbPZ7Up8pE8GwYM1pOeEY5LQ13D 8aXAiLaA7imBw3etkChUvosTHYiR1C6UHcuXkO8th2gCwMnzNFZjF7iP4++/sDkoopS3kj hNCgseH1ihcWQi1sag9Cjhpv6xs7HYpgwrp6AJ2mtMSCIRzkz1HOTZSwza6i3Jksh0v5ek ip8/jF08qUOXnZFwHtLqrsfVQH7webbmpeP7gv61OAVsyzKL7jmZKsWcGvvJs/L/KBhbfh CM2WmgiftV+pPwcuLjLnQZ/w9pja+mfx5zYEX4rboKc3Xi/y0BWBSzyJcAw4Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639656; a=rsa-sha256; cv=none; b=UrBR4d852rTpHCvt4HG0aQ5Kc8Ily4g9uo5rsB5dNj7hCYHA7L8DIasqIM7oEkjQ+XYAmV fDNEMHPC+UejQoxldokPjfaMeJluMdpapOFL1+hG76RWpD5B2u8sotgIikASsu9aqMf48A bcXXAY6x+g7Y4lAb4D1LP15WgnvvcejXl/suHevbQB4THj0x1Gu7s6rV5SLyJBj+XNmk5d 9icVhS8Y2vT8/bygMpREnyvWbDb34MABO1fS0WoguxXjN/frCtGeltNJ4ey0q81KDjNtn8 0xdig7n3hCxIcX0sNhWw1o34tAVd9qmnvdMqpvhdGpUUDLb4XZRdkB5wGcRTWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sMblh3KJYGmzN7URx9kwfkfle3VZ2J633Ib5yN7hPgA=; b=br7OBCuLNkC3DHI7xEsJUmBX7Z7jJZ+Rx/YybJpn/tPGcYxiI5mYSHgZm2v1JNdzk0eGVh JtX5Vio1Ni7+awSSX0E+TOIDYDXCtDFrndeQO1L6Ipt0XbSCF6MfANcmRt5K9vhCX1OF0s 9FzHmHGuBVtONd5C35iuugAT3kLA+q4ikFklnPi2GOQQbPERMUnfVCXl4YXlp+n2F51oFW h/kzcGmoOyUloP8ZgL5c/Ql7Oja1m78n47ryMU/VddkiHrxB+YRlSSOCD9qw0yGywAB2AU ahZ2ChvHBlTnRJGM/C+5/T2YwZKyZpBsrpTz+CFbAJ54ECpctt6fs19zh3M3oA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfw2bjwz1QMm; Mon, 25 Sep 2023 11:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0uPV052873; Mon, 25 Sep 2023 11:00:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0uL5052870; Mon, 25 Sep 2023 11:00:56 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:56 GMT Message-Id: <202309251100.38PB0uL5052870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: d7c0cc9e37b5 - stable/13 - arm64: Correct a pmap unlock in pmap_stage2_fault List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d7c0cc9e37b56b32ba6fd2a47cd97edf2c9f6465 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d7c0cc9e37b56b32ba6fd2a47cd97edf2c9f6465 commit d7c0cc9e37b56b32ba6fd2a47cd97edf2c9f6465 Author: Andrew Turner AuthorDate: 2023-06-02 09:58:56 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 arm64: Correct a pmap unlock in pmap_stage2_fault This is used by bhyve so was not an issue as it is still in development. Sponsored by: Arm Ltd (cherry picked from commit 8cca8e248fb7f5fb475544a08d8cdb24d26bf4b3) --- sys/arm64/arm64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 037f1d5a805f..49ca89135883 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -7179,7 +7179,7 @@ pmap_stage2_fault(pmap_t pmap, uint64_t esr, uint64_t far) PMAP_LOCK(pmap); pdep = pmap_pde(pmap, far, &lvl); if (pdep == NULL || lvl != (dfsc - ISS_DATA_DFSC_TF_L1)) { - PMAP_LOCK(pmap); + PMAP_UNLOCK(pmap); break; } From nobody Mon Sep 25 11:00:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfx5dRsz4vN0B; Mon, 25 Sep 2023 11:00: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 4RvKfx4kqcz3MWg; Mon, 25 Sep 2023 11:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SbsXsGz3c1M4AgqNRT+VKKcT53yjbnR2bQqEq9hQo9g=; b=gWcp7wSY1KJAE3hJAn5w4FQh6dsQgwx1TK0WAZVTya2niq0tf3BKs7WEK1QGgn3dobifwi UMUrqq2w39ZbirH34r3tE/IMRbUzFk3WuoyUNIPIVoOOWtxm7Yt98u6Mg8Uw1cztUKFNSn W3TGglgj8PnapAe+pnUqsFLQ607qEHOTgJuz2LhcDo0kM8kEsN8JihuWRrqX7H/mSCiOJp khhUd4t7HNocH26g32vO+mY5RSzXlDJWvQwbPKFF6TgJyiBz5StOSGu/VBYw46EamN0kCZ VY6vIp3h3lIg8IVIMAlYXsMaM8AhcJsXNpico9CKA/DPkIzETATZ05HBAuwZsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639657; a=rsa-sha256; cv=none; b=DyOeuiuhGxgp7gX5+Ej/kkzH+7uEpGEnZ4Hgj7R1m7bOtX9PJlg8r+Vj3F+kyN35WT0UOt qbQ2uMgY6UgYsKQ7uZumnPStrbn5whx9UL8Vf88rLRBpYBNgbQZWMEUR6AGNx6ljpP4p7T arracW7p8XfURNRPwXTPJaZA7nnEc7ffiaTPkOmB0AIZcObfNKAdTdJaRyhHP0kd1VerXW +PcYWnpD1cYBpE96sezA31QhfPFgtJA8vgzwOXyCjvaSFxvi+8VkufKp3V3w3/8YAlMekE ypzp6TrGFFxWPby9kGg7DIbpFp9MOoMSTzOBMYsfeit7t+IQeK7TIQymYmZalg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SbsXsGz3c1M4AgqNRT+VKKcT53yjbnR2bQqEq9hQo9g=; b=uHeAtKnU6A5TxzyeTUS2KCkCH5XS7Vhzb/p3aKN74p+w4Fo3Ig5hqen4JtrZ8P1sdKlFha kx5dRgpnzoy5esTRKDBfcLg47hNjoQ5ICrQx3RJggzrX7lFBeejQK+PJ35ZHHWAaGQTisb A2vGwbfn3v/ZNhoPgPjfwXv3FreafOBGP7Jc3DSKXfdbOhTygm94kypNjHOw2oRZ8tYAPI tlIdYR/24ha13DP1sKpwp+gDPy+vWFTruGapf1i7BNYg3chDpTzt65uXx5wSADJBrTdOX5 DVtNwLxsQTvMrs2ergwVezrFpClHYkA8fsnyy79hxiWbtwind49He2IjWYTHCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfx3ldWz1QH8; Mon, 25 Sep 2023 11:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0vMr052919; Mon, 25 Sep 2023 11:00:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0v7P052916; Mon, 25 Sep 2023 11:00:57 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:57 GMT Message-Id: <202309251100.38PB0v7P052916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 79a1a19fc25a - stable/13 - Add more arm64 ID registers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 79a1a19fc25a433b13ea85ed65359479360b2130 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=79a1a19fc25a433b13ea85ed65359479360b2130 commit 79a1a19fc25a433b13ea85ed65359479360b2130 Author: Andrew Turner AuthorDate: 2023-06-02 14:59:46 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 Add more arm64 ID registers These will be used by bhyve to emulate these registers. Sponsored by: Arm Ltd (cherry picked from commit 4baf5db06ccfdb616abb6a68be99f297f7377bf4) --- sys/arm64/include/armreg.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index f3bfda15e908..baf04695bf41 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -476,6 +476,22 @@ /* ICC_SRE_EL1 */ #define ICC_SRE_EL1_SRE (1U << 0) +/* ID_AA64AFR0_EL1 */ +#define ID_AA64AFR0_EL1 MRS_REG(ID_AA64AFR0_EL1) +#define ID_AA64AFR0_EL1_op0 3 +#define ID_AA64AFR0_EL1_op1 0 +#define ID_AA64AFR0_EL1_CRn 0 +#define ID_AA64AFR0_EL1_CRm 5 +#define ID_AA64AFR0_EL1_op2 4 + +/* ID_AA64AFR1_EL1 */ +#define ID_AA64AFR1_EL1 MRS_REG(ID_AA64AFR1_EL1) +#define ID_AA64AFR1_EL1_op0 3 +#define ID_AA64AFR1_EL1_op1 0 +#define ID_AA64AFR1_EL1_CRn 0 +#define ID_AA64AFR1_EL1_CRm 5 +#define ID_AA64AFR1_EL1_op2 5 + /* ID_AA64DFR0_EL1 */ #define ID_AA64DFR0_EL1 MRS_REG(ID_AA64DFR0_EL1) #define ID_AA64DFR0_EL1_op0 0x3 From nobody Mon Sep 25 11:00:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKfy6dKXz4vNJY; Mon, 25 Sep 2023 11:00: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 4RvKfy5kWgz3MXV; Mon, 25 Sep 2023 11:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sFsGsAlbHw9ZMAyUQsQpFjWaWa72y3gclR0Q2xH3xrM=; b=VeNyGS8IlgJVsRIWuYIEuITWgFEIflkK8Zf1nqpval74S0/nVNv+H5u2WOZul1/HfdRWwH QjoUrztKSccxu2wrefBNuCxOYphD84OP85A+HJwf7q5eR3gY7G6iimh8Q9Uw+FsXbDeZHK p8HfWeX51IB/Vx8JD8ZMqdssreYKN9d0Z3fq9QwHVWeduC7c+03CAzSH/k1p32Fpn4sCdZ LZFtTlbjYv4BkULV8oRudR1SRBqirscQoPZNuSR08MfdRB03ngLg4wjwze+NqBgcuTlyXV T8O2VznFx8/b/EZhDGnpDH7AvKyzKN5v9ISL0Yq+BSZsdqWbUKWVbxsO1JYX8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639658; a=rsa-sha256; cv=none; b=rzVzzJxH9cwUd3MvTBRlJ4q+PIo0V6O66XUlDJXmptSxTiPUEljuSCAcPw4XG4JngtT0A6 WtL4LvZrynzSvzB7xG4lclp+gRWBqE0uZBoT1e7zrxYTZIJhM02MvEwGF6/8hcnpUNGuXR fGhtw6cJdPIVk4Hipf2qAKqiN5aIIOz6EnAI6JM4BGxu0svlSQh3tf6aVWMdKQa5vx6dmQ CWVi2QghedF855Mu6vVIYThcEwEAjiPQhZJlESWvcDlKGditoZNSlHRc3fsA/hPv+CBXWm ugsVS2ofLX9qPZCA1bmWT7NU+u7DQ7owR/GWTFjwhTP5d/ID+lg1jvnT3cdA4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sFsGsAlbHw9ZMAyUQsQpFjWaWa72y3gclR0Q2xH3xrM=; b=Fen6OR2LlOXrV9UuUBYpAOC9uA/CAJzeM29VMgDY9dtEMOPsbsG+fMcHQ6eAN3Fc6OZmQp Y5Apve4eclmjw7FR91s42tZVu0zOXMIOrB7HtnNRvxaYQUzD8nV5sGdc9M+fNPoU4f764s /twMewiBhBT34eWeA0clxf74PwhXGThMv7ugXo2gw6RoA/vXAScBXOR51aiOQoBFwiYElO Y4GMSAatzLS4HB4WV5KP9f2OI5yRgzmP7kcziE/9+Bgc52VxXrL5yRLuC1SsHMY5DsvKkL oYhNtsXDZeNy8s7MjmdKICbz/C//AmtCpdhHrzCszxqtXrr+2ZknM9jGV017ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfy4Y2gz1Q5m; Mon, 25 Sep 2023 11:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0w4C052969; Mon, 25 Sep 2023 11:00:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0wpK052966; Mon, 25 Sep 2023 11:00:58 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:58 GMT Message-Id: <202309251100.38PB0wpK052966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 66d713f68698 - stable/13 - arm64: Fix the definition of ID_AA64DFR1_EL1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 66d713f68698f4a2721c8885fb38b897ca208cf4 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=66d713f68698f4a2721c8885fb38b897ca208cf4 commit 66d713f68698f4a2721c8885fb38b897ca208cf4 Author: Andrew Turner AuthorDate: 2023-06-02 15:23:47 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:32 +0000 arm64: Fix the definition of ID_AA64DFR1_EL1 (cherry picked from commit dd235575283811af73db665a280ac40f8b0a608b) --- sys/arm64/include/armreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index baf04695bf41..9b60ea2a6263 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -550,7 +550,7 @@ #define ID_AA64DFR0_TraceFilt_8_4 (UL(0x1) << ID_AA64DFR0_TraceFilt_SHIFT) /* ID_AA64DFR1_EL1 */ -#define ID_AA64DFR1_EL1 MRS_REG(ID_AA64DFR0_EL1) +#define ID_AA64DFR1_EL1 MRS_REG(ID_AA64DFR1_EL1) #define ID_AA64DFR1_EL1_op0 3 #define ID_AA64DFR1_EL1_op1 0 #define ID_AA64DFR1_EL1_CRn 0 From nobody Mon Sep 25 11:00:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg0066Dz4vNRx; Mon, 25 Sep 2023 11:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvKfz6lfQz3MkN; Mon, 25 Sep 2023 11:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wlj9OW3WRYKkdAQS0Z1JLTKEeTuJQzRCrnWWboK3RVg=; b=nxXwkimevctyT+gyagTmO55BcbP2YA5QPFQqF+eplhYJL3GJYjlVd4iHqoGU/3PShMl1lT E3AKTpK2os6qoTV8K1lL/hNqhdHCY9zC3NU5GgAh7OMn36AAWG9b4rf/eQYWVuBBFvdIEw KN5+z2+OqNHZ5NGX8CVyLASyM9DCi/DAwqlRYf8GXAiRoAuQV16McbCmvaxwdYqzSiOv82 eHeTSdMkP/4FlviUSyLiiuyTsLb9J3aKXfX6I8c2i9bcXlV0BuHcZ7GiETAGv+8Q8bdfaL xCdtJHOQXH1Q9tkKmjYNuHrlxw1C0qhNte2SdR1Qq1tq7R6Fu+XTuoDSgBy9Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639659; a=rsa-sha256; cv=none; b=qsS+EqS6tyN296GTdBamFP00jf+TY9L3QrFpaynkb+833wXgXo2BQCAOi+IjF4cUzZkQPN SzJ/hXu9hbhp/RnYEbz89MZqVCpYAgkY9b+RHDNKOZ5DwIiUmdIm8l+hugVc3pAH5CPJdq NPGu4vGWAwrdvIhl3YR4zrZNWErSPI/MXbAFTauzug8mOP6qmEQE3VTpVWD5ZFs/4ZRMCh GC0epZBI7FAiio5AceDpEYYzgjYMdq0cAz+y7HGFXMHvjNqPAXIRU+UHJYtH4Al9lJLwNR Ck/3+/OGgg906QXS0kjfZLQtiTLsiWSlkTeH22IPTqJ2X6Y6drYbwJdhEODyKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wlj9OW3WRYKkdAQS0Z1JLTKEeTuJQzRCrnWWboK3RVg=; b=JaHCOfQEjKOBtS5vo9BtAlIKHQTAgcRQKEUGeYGsorhpAOZ8xpVRKTrm/LdD6gl6XZRuJ0 84nVcaXI5KCDgxghzWQFQ9R6U07Q1pCwjS7enjOJvKxEiqE+gGl8et/pnEtvrYGu9pfipd LjluYjm8YR3K1B1ML4s2+UIa94nPE0FPh7wphBaSyIu0B3U/mUM3Rd038xyxCRKyBBUlgo UDElkJd6PQjPX74PqX6YeQ7E9uk/eUX0MEE8rY9T8OST58fd8g+UEjJaJnU2Fzk+1Kgbn8 07iOl9STGloFDChHQ3nSp80zdMbgvvwgNXY+h5v0BW5OSzmD1eR6DNouYZdx0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKfz5pClz1Qd6; Mon, 25 Sep 2023 11:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB0x6v053024; Mon, 25 Sep 2023 11:00:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0x6C053021; Mon, 25 Sep 2023 11:00:59 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:59 GMT Message-Id: <202309251100.38PB0x6C053021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: da9d00c5bac9 - stable/13 - Add more arm64 ID registers to the user_regs array List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da9d00c5bac94f4e3ed19e08f0df4fb63d1acb98 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=da9d00c5bac94f4e3ed19e08f0df4fb63d1acb98 commit da9d00c5bac94f4e3ed19e08f0df4fb63d1acb98 Author: Andrew Turner AuthorDate: 2023-06-09 08:36:12 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:32 +0000 Add more arm64 ID registers to the user_regs array This is a mapping from ID register value to offset in struct cpu_desc. These registers may be needed with future architecture revisions either by userspace or by bhyve. Sponsored by: Arm Ltd (cherry picked from commit 1dd169af7143db4df613f273e565919c1c2b53f5) --- sys/arm64/arm64/identcpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 136e1d09db9d..4ac1e0ff3ae9 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1565,10 +1565,15 @@ struct mrs_user_reg { .fields = field_name##_fields, \ } static struct mrs_user_reg user_regs[] = { + USER_REG(ID_AA64AFR0_EL1, id_aa64afr0), + USER_REG(ID_AA64AFR1_EL1, id_aa64afr1), + USER_REG(ID_AA64DFR0_EL1, id_aa64dfr0), + USER_REG(ID_AA64DFR1_EL1, id_aa64dfr1), USER_REG(ID_AA64ISAR0_EL1, id_aa64isar0), USER_REG(ID_AA64ISAR1_EL1, id_aa64isar1), + USER_REG(ID_AA64ISAR2_EL1, id_aa64isar2), USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0), USER_REG(ID_AA64MMFR1_EL1, id_aa64mmfr1), @@ -1576,6 +1581,9 @@ static struct mrs_user_reg user_regs[] = { USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), USER_REG(ID_AA64PFR1_EL1, id_aa64pfr1), + + USER_REG(ID_AA64ZFR0_EL1, id_aa64zfr0), + #ifdef COMPAT_FREEBSD32 USER_REG(ID_ISAR5_EL1, id_isar5), From nobody Mon Sep 25 11:01:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg13GPGz4vNHF; Mon, 25 Sep 2023 11:01: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 4RvKg10zWnz3McB; Mon, 25 Sep 2023 11:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWFUSmNWDBXv3vOyeB0c+1roanRfg/tguj2NruVCGLk=; b=LBolBiM7tgC8M8z0m0Fa9ChpxpSTXkYGg1PLZbjZV0F/DQqwGUypIZCF30CBYeDK0Su50q /Tr/5e4h9GhyUNbhR2X8CpHgdkwbranRaBkK9yps4KJ91/nS6iEbAAO6pZ7wL4L92LebdA iuKESpU7fnLMydXJju6RAlv+lHEbrGKc5VwTUTmEc0BHs4+ZJhGFI1K0IEJo9OSqQ27pWQ letJ7JteTvDSyhVhu1gY7Xxc7f/CXywtw6KCKyRY5erfTh575mwuibAF6SRvin5iEIpiQ+ ru5eJKjf0x8GnT4ErdTS/Y4r9ef+1x9NC5PnxF4SQNQ9uYYp/vMAvQ4Zn8QEgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639661; a=rsa-sha256; cv=none; b=tYU0Z7PI6J3X+Fkn9QRedmTsagPZ7ubZmVhD4gf02Mn18yylEJIhIF5tvxD5oV/Hi6ZEhy M1b+KeB9DAvt/LDBXLASjdm+nI4jWp3ur/e4uI2/7AAp9DVOlOCeqm14j7PUR8rBk2iOwM xEnaH2PvXCFdhUpwqa0XyoLAHsxPOcTMf7dMwUwsMLz2BQ0pFSmRhPYKo4bLS1hUa4ebyt hGisG9xkCijem0ugEIRjtzKPG3CdCSpwVnQyT3KZckG+6Ohciz5SqPfgtLNLIq+ejrJ0mX mK5CnrALcEfl1/qBErQenLH+NbDvFSvB0ikD9iM6ETQV4ES1NDeiM25kUzKXOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWFUSmNWDBXv3vOyeB0c+1roanRfg/tguj2NruVCGLk=; b=AX5T9Pf4aMio6+aC3OBPshxAR1SD1VeGfyQqiF0DS8nUzra7yGjAJ8Ce846T5usXRMQ2Zk rv3eu9TpMoFUqschRtTpjY+hn41+YVTKdeXnLuGdiFQn8qVFu5rW22hyXNhf6zPYxtDvI0 zLnXU4hHEdj3JXo2bsiK1v7av+5Z47zKQq5qnZGOI6P4dfPp2DVLO0DEToFSXTDIsOlgKZ 8prT4vIWJQzujRgP0hj2sng2OeVAcIKzFa1sFblS+8YGHNk34fpH1FbgSlDQ4yQtFfjzAF xHcT8SQ2v46iIPM8ggYYmdl4aSbXApg6wWA5GTi4yAHousz0Ejz8/1LpCRwezw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg06yrPz1QQ7; Mon, 25 Sep 2023 11:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB10So053075; Mon, 25 Sep 2023 11:01:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB10t0053072; Mon, 25 Sep 2023 11:01:00 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:00 GMT Message-Id: <202309251101.38PB10t0053072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 0fb5ae0c7c3d - stable/13 - Add more arm64 special register values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0fb5ae0c7c3d8adf4d1e0d8badf7e724db279f8a Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0fb5ae0c7c3d8adf4d1e0d8badf7e724db279f8a commit 0fb5ae0c7c3d8adf4d1e0d8badf7e724db279f8a Author: Andrew Turner AuthorDate: 2023-06-09 17:46:58 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:32 +0000 Add more arm64 special register values These will be used to simplify the kernel special register handling. Sponsored by: Arm Ltd (cherry picked from commit 178747a1586d48a8063014d7b8528ec47205e1bf) --- sys/arm64/include/armreg.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 9b60ea2a6263..d307781f2d01 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -1247,6 +1247,14 @@ #define MDSCR_MDE_SHIFT 15 #define MDSCR_MDE (UL(0x1) << MDSCR_MDE_SHIFT) +/* MIDR_EL1 - Main ID Register */ +#define MIDR_EL1 MRS_REG(MIDR_EL1) +#define MIDR_EL1_op0 3 +#define MIDR_EL1_op1 0 +#define MIDR_EL1_CRn 0 +#define MIDR_EL1_CRm 0 +#define MIDR_EL1_op2 0 + /* MPIDR_EL1 - Multiprocessor Affinity Register */ #define MPIDR_EL1 MRS_REG(MPIDR_EL1) #define MPIDR_EL1_op0 3 @@ -1886,6 +1894,14 @@ #define PSR_SETTABLE_32 PSR_FLAGS #define PSR_SETTABLE_64 (PSR_FLAGS | PSR_SS) +/* REVIDR_EL1 - Revision ID Register */ +#define REVIDR_EL1 MRS_REG(REVIDR_EL1) +#define REVIDR_EL1_op0 3 +#define REVIDR_EL1_op1 0 +#define REVIDR_EL1_CRn 0 +#define REVIDR_EL1_CRm 0 +#define REVIDR_EL1_op2 6 + /* TCR_EL1 - Translation Control Register */ /* Bits 63:59 are reserved */ #define TCR_TCMA1_SHIFT 58 From nobody Mon Sep 25 11:01:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg23gmKz4vNF9; Mon, 25 Sep 2023 11:01: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 4RvKg21frsz3Ml4; Mon, 25 Sep 2023 11:01:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=olcRccc8xyhfxGhxjfVJC6PRV6JKEEt5sBkxZKqAP/c=; b=duA+XhAkGKgipPyAgOCQoEVm5B0ZcVaT+OT8wfm7deR7JuZaktsknV1vw8+wFuoO/j3ajF LaYsr7k94KBoNWGzgk3Wjlazbzmif7kKitHWQA5+9rBvPLufFKDmMcZ+HY/ybA4QbXi+qX Ym5UHK0436oY06GaQqjZy4Zes4S4x/Cki7fou8cSE9bRF3PUpL9rWs9P4Mper/Zqi6w1Lb 8FVwZlusqDmmSpS6KTIMYOa+xqwU3Dloo3pl8CUKCiykdMkzCfqxt/rmyXg3Oj/qkSQEXm YiQ7vDKy6fviWyRvFbDYXCN2UuBLSqjImKWMI9aIQrQ3CgMphFgc9Aec112cZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639662; a=rsa-sha256; cv=none; b=T8pls8Uhw34BgblmaIK2lNda1lQ+qb0LTZuwTl363u2M03iCkt7FO3J5AoDMOlPSZU7N4t 89NYJrYWU+5nomfOsnlp78rnotQDh/NyVUIN/4tHEvXnZNxnnfZI3zSh/fVWxMxSXxZ6PI wPtG2GCP/rzbT+HFI/RopnE+/cXMstn7vY8UkzHwxjMOh7CF60xS7skYVaskqEjNlLDu6i 0LRTMAZo1ho2dQ0V/WQ5DQJQhCHmjoxhEtnEQiv/DBQ3B6G8f+6d6DYN8pfXTNti5eUiU/ akgSi5DMZrZLQ4QC7MFFVRJ02kIQz/j5NeJjpkiRz4zO+ZteHb1CwNqybwQpmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=olcRccc8xyhfxGhxjfVJC6PRV6JKEEt5sBkxZKqAP/c=; b=mJRqbyVDBcHTezaX/R6fZwmDjzut3NZB0JdbTaewla4dQVmZwNKX47u4nMIaf+1WsPx8O+ kn7epHuhysW+p0jaD2AlHqY2pUg+Xmwh3K2E1u/VWYPKxGHffIq1SpBTB1wWtcv2fhnXVz M7btqoMN4/tkEXi2SaGDOeDWEDVhaNEmFQhnaKh09A21Vf0LOa4nANL6hxyLQz4erbl7BZ JFt0iczSjlnsV3J/23pTsE4uLdxcwOpSrU+F2RPwUYyuBZGFJy8EYktLZV+q4VKLNQi+oW pw/xRkAOeMOMFxU+/6X2KAehp0WcmIICs0qxN3630UfwBo6erniz/u/OGpwfbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg20mDLz1QH9; Mon, 25 Sep 2023 11:01:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB12tr053133; Mon, 25 Sep 2023 11:01:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB12F1053130; Mon, 25 Sep 2023 11:01:02 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:02 GMT Message-Id: <202309251101.38PB12F1053130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: ffe9a1987bb7 - stable/13 - Continue searching for an irq map from the start List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ffe9a1987bb7d57b21bb19e20fd9f66dd98e7a78 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ffe9a1987bb7d57b21bb19e20fd9f66dd98e7a78 commit ffe9a1987bb7d57b21bb19e20fd9f66dd98e7a78 Author: Andrew Turner AuthorDate: 2023-06-27 08:32:12 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:32 +0000 Continue searching for an irq map from the start When searching for a free irq map location continue the search from the beginning of the list. There may be holes in the map before irq_map_first_free_idx, e.g. when removing an entries in order will increase the index past the current free entry. PR: 271990 Reviewed by: mhorne Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40768 (cherry picked from commit 9beb195fd9fdc4beb7d5bca865cf5b19ccd7449b) --- sys/kern/subr_intr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 02da0b884535..cb7a8647e433 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -1715,6 +1715,14 @@ intr_map_irq(device_t dev, intptr_t xref, struct intr_map_data *data) return (i); } } + for (i = 0; i < irq_map_first_free_idx; i++) { + if (irq_map[i] == NULL) { + irq_map[i] = entry; + irq_map_first_free_idx = i + 1; + mtx_unlock(&irq_map_lock); + return (i); + } + } mtx_unlock(&irq_map_lock); /* XXX Expand irq_map table */ From nobody Mon Sep 25 11:01:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg32rq4z4vNNL; Mon, 25 Sep 2023 11:01: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 4RvKg32NdNz3Mr6; Mon, 25 Sep 2023 11:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oy2vj8JLkUsMlWD8H7jdpdhWkQFMfzNVnNqyTGIXqDQ=; b=hkLF/yIOSZpVi+F01nNfFr6rMhCy4yiIVp0jFIugzJM7W48l097nMQwEdTcJa05d21wEqA Gf8GzaVuHjtSYfvXlggztxScJPmMKYjOcIdQYaoAFBLHM+lcyS/Jyw2EWEZTsS+pf5Fds9 7eSvp5qLW7lhPGMkYkOyCOKO2fGGBv6MGzAlR7wnZYMwdeswrpfWyKqIgwZ8KksBs9eWKl sbLGgOOX0jNoLxbKgvSYdTPT+A5zaT4xShL7iSLNt0eBfdQ1UTY45awm0PQBrLwXpkfhEp F8i/UOLScAW85WUZkV4j/TD/5v+fo3intmiUbF4KQtmAd8BqQ+qIux2RRR4GBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639663; a=rsa-sha256; cv=none; b=jgep6M0Wtf1xzE34L3qLkhnZHOudOlD18of8v19namVxAQjtdzUav/9EcdL89Rxde4mEQl +65cBZVTo1U63gJnipsXIdZlXlGncrCdVhHgSKhZRH7Su0RlVtRsWlv9+TSQjEqLqgLfOu hktTNHKlGUDRCJgMmOZ9usNmA/vrEtKwuyEojhVqLWCvSQR/+vCJ1rhGRcNMVlPWlsmzG6 aQhSCo0Gn9lARLyxMSGFYA0+bOYRfTSsOAxl39d38AP2FhY3dwND6p9q09NQxB5huuYRVb EMxi6SdnmgGjtT6iKEiAfjrgERDuz6Y/RWKtbOfup+C3Vr5MoMNJYZN3awVIeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oy2vj8JLkUsMlWD8H7jdpdhWkQFMfzNVnNqyTGIXqDQ=; b=g4JB5iVTATLESQUUja5LmdEYzO99Ya0vK42mq84CZ5tI3V+5TEznur3+biiym+Sq6sCsT2 yJa1ZZMfu+CeqKMbB0Y9+AxQstuysIAkdgvuGQIs6cW4UdMa9ITgNX8l84FoVDAZwgkh/r bm8cfCPTSQbD2qvLOwlls05T+4+KoeoN6KOKqEyY481wA2hNg3yUaMiPLV9eIIoaXesfKN uXXNzNQyjyaNYGSCSpQ8kmw8zhQAU5lkhnAHini0guX9mTdatnlXIm1CxLQQmF+Aq0XDgU dOPMRJhxN+Hz11Mz0MJ+/oK10m7omgE/vxnNbKq6sdC+18stMJp8ROGzPqRXoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg31Gkzz1QMq; Mon, 25 Sep 2023 11:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB13dq053177; Mon, 25 Sep 2023 11:01:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB13Jx053174; Mon, 25 Sep 2023 11:01:03 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:03 GMT Message-Id: <202309251101.38PB13Jx053174@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: ac5c7b722ec4 - stable/13 - arm64: Make register definitions const List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac5c7b722ec43bf0cf8c5fc97cb2e7d0c1f3a188 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ac5c7b722ec43bf0cf8c5fc97cb2e7d0c1f3a188 commit ac5c7b722ec43bf0cf8c5fc97cb2e7d0c1f3a188 Author: Mark Johnston AuthorDate: 2023-06-28 20:13:37 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:33 +0000 arm64: Make register definitions const No functional change intended. Reviewed by: andrew MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. (hardware) Differential Revision: https://reviews.freebsd.org/D40502 (cherry picked from commit 00bcb77ebcbcb89bd27205b289699d711a0caf3d) --- sys/arm64/arm64/identcpu.c | 391 +++++++++++++++++++++++---------------------- 1 file changed, 196 insertions(+), 195 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 4ac1e0ff3ae9..2f849b049425 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -298,8 +298,8 @@ struct mrs_field_hwcap { struct mrs_field { const char *name; - struct mrs_field_value *values; - struct mrs_field_hwcap *hwcaps; + const struct mrs_field_value *values; + const struct mrs_field_hwcap *hwcaps; uint64_t mask; bool sign; u_int type; @@ -323,53 +323,53 @@ struct mrs_field { #define MRS_FIELD_END { .type = MRS_INVALID, } /* ID_AA64AFR0_EL1 */ -static struct mrs_field id_aa64afr0_fields[] = { +static const struct mrs_field id_aa64afr0_fields[] = { MRS_FIELD_END, }; /* ID_AA64AFR1_EL1 */ -static struct mrs_field id_aa64afr1_fields[] = { +static const struct mrs_field id_aa64afr1_fields[] = { MRS_FIELD_END, }; /* ID_AA64DFR0_EL1 */ -static struct mrs_field_value id_aa64dfr0_tracefilt[] = { +static const struct mrs_field_value id_aa64dfr0_tracefilt[] = { MRS_FIELD_VALUE(ID_AA64DFR0_TraceFilt_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_TraceFilt_8_4, "Trace v8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_doublelock[] = { +static const struct mrs_field_value id_aa64dfr0_doublelock[] = { MRS_FIELD_VALUE(ID_AA64DFR0_DoubleLock_IMPL, "DoubleLock"), MRS_FIELD_VALUE(ID_AA64DFR0_DoubleLock_NONE, ""), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_pmsver[] = { +static const struct mrs_field_value id_aa64dfr0_pmsver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE, "SPE"), MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE_8_3, "SPE v8.3"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_ctx_cmps[] = { +static const struct mrs_field_value id_aa64dfr0_ctx_cmps[] = { MRS_FIELD_VALUE_COUNT(ID_AA64DFR0, CTX_CMPs, "CTX BKPT"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_wrps[] = { +static const struct mrs_field_value id_aa64dfr0_wrps[] = { MRS_FIELD_VALUE_COUNT(ID_AA64DFR0, WRPs, "Watchpoint"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_brps[] = { +static const struct mrs_field_value id_aa64dfr0_brps[] = { MRS_FIELD_VALUE_COUNT(ID_AA64DFR0, BRPs, "Breakpoint"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_pmuver[] = { +static const struct mrs_field_value id_aa64dfr0_pmuver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3, "PMUv3"), MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_1, "PMUv3 v8.1"), @@ -379,13 +379,13 @@ static struct mrs_field_value id_aa64dfr0_pmuver[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_tracever[] = { +static const struct mrs_field_value id_aa64dfr0_tracever[] = { MRS_FIELD_VALUE(ID_AA64DFR0_TraceVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_TraceVer_IMPL, "Trace"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_debugver[] = { +static const struct mrs_field_value id_aa64dfr0_debugver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8, "Debugv8"), MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_VHE, "Debugv8_VHE"), MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_2, "Debugv8.2"), @@ -393,7 +393,7 @@ static struct mrs_field_value id_aa64dfr0_debugver[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64dfr0_fields[] = { +static const struct mrs_field id_aa64dfr0_fields[] = { MRS_FIELD(ID_AA64DFR0, TraceFilt, false, MRS_EXACT, id_aa64dfr0_tracefilt), MRS_FIELD(ID_AA64DFR0, DoubleLock, false, MRS_EXACT, @@ -413,158 +413,158 @@ static struct mrs_field id_aa64dfr0_fields[] = { /* ID_AA64DFR1_EL1 */ -static struct mrs_field id_aa64dfr1_fields[] = { +static const struct mrs_field id_aa64dfr1_fields[] = { MRS_FIELD_END, }; /* ID_AA64ISAR0_EL1 */ -static struct mrs_field_value id_aa64isar0_rndr[] = { +static const struct mrs_field_value id_aa64isar0_rndr[] = { MRS_FIELD_VALUE(ID_AA64ISAR0_RNDR_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR0_RNDR_IMPL, "RNG"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_rndr_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_rndr_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_RNG, ID_AA64ISAR0_RNDR_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_tlb[] = { +static const struct mrs_field_value id_aa64isar0_tlb[] = { MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_TLBIOS, "TLBI-OS"), MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_TLBIOSR, "TLBI-OSR"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar0_ts[] = { +static const struct mrs_field_value id_aa64isar0_ts[] = { MRS_FIELD_VALUE(ID_AA64ISAR0_TS_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR0_TS_CondM_8_4, "CondM-8.4"), MRS_FIELD_VALUE(ID_AA64ISAR0_TS_CondM_8_5, "CondM-8.5"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_ts_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_ts_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_FLAGM, ID_AA64ISAR0_TS_CondM_8_4), MRS_HWCAP(&elf_hwcap2, HWCAP2_FLAGM2, ID_AA64ISAR0_TS_CondM_8_5), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_fhm[] = { +static const struct mrs_field_value id_aa64isar0_fhm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, FHM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_fhm_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_fhm_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDFHM, ID_AA64ISAR0_FHM_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_dp[] = { +static const struct mrs_field_value id_aa64isar0_dp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, DP, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_dp_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_dp_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDDP, ID_AA64ISAR0_DP_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sm4[] = { +static const struct mrs_field_value id_aa64isar0_sm4[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SM4, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sm4_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sm4_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SM4, ID_AA64ISAR0_SM4_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sm3[] = { +static const struct mrs_field_value id_aa64isar0_sm3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SM3, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sm3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sm3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SM3, ID_AA64ISAR0_SM3_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sha3[] = { +static const struct mrs_field_value id_aa64isar0_sha3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA3, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sha3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sha3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SHA3, ID_AA64ISAR0_SHA3_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_rdm[] = { +static const struct mrs_field_value id_aa64isar0_rdm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, RDM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_rdm_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_rdm_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDRDM, ID_AA64ISAR0_RDM_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_atomic[] = { +static const struct mrs_field_value id_aa64isar0_atomic[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, Atomic, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_atomic_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_atomic_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ATOMICS, ID_AA64ISAR0_Atomic_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_crc32[] = { +static const struct mrs_field_value id_aa64isar0_crc32[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, CRC32, NONE, BASE), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_crc32_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_crc32_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_CRC32, ID_AA64ISAR0_CRC32_BASE), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sha2[] = { +static const struct mrs_field_value id_aa64isar0_sha2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA2, NONE, BASE), MRS_FIELD_VALUE(ID_AA64ISAR0_SHA2_512, "SHA2+SHA512"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sha2_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sha2_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SHA2, ID_AA64ISAR0_SHA2_BASE), MRS_HWCAP(&elf_hwcap, HWCAP_SHA512, ID_AA64ISAR0_SHA2_512), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sha1[] = { +static const struct mrs_field_value id_aa64isar0_sha1[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA1, NONE, BASE), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sha1_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sha1_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SHA1, ID_AA64ISAR0_SHA1_BASE), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_aes[] = { +static const struct mrs_field_value id_aa64isar0_aes[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, AES, NONE, BASE), MRS_FIELD_VALUE(ID_AA64ISAR0_AES_PMULL, "AES+PMULL"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_aes_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_aes_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_AES, ID_AA64ISAR0_AES_BASE), MRS_HWCAP(&elf_hwcap, HWCAP_PMULL, ID_AA64ISAR0_AES_PMULL), MRS_HWCAP_END }; -static struct mrs_field id_aa64isar0_fields[] = { +static const struct mrs_field id_aa64isar0_fields[] = { MRS_FIELD_HWCAP(ID_AA64ISAR0, RNDR, false, MRS_LOWER, id_aa64isar0_rndr, id_aa64isar0_rndr_caps), MRS_FIELD(ID_AA64ISAR0, TLB, false, MRS_EXACT, id_aa64isar0_tlb), @@ -597,106 +597,106 @@ static struct mrs_field id_aa64isar0_fields[] = { /* ID_AA64ISAR1_EL1 */ -static struct mrs_field_value id_aa64isar1_i8mm[] = { +static const struct mrs_field_value id_aa64isar1_i8mm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, I8MM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_i8mm_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_i8mm_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_I8MM, ID_AA64ISAR1_I8MM_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_dgh[] = { +static const struct mrs_field_value id_aa64isar1_dgh[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, DGH, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_dgh_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_dgh_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_DGH, ID_AA64ISAR1_DGH_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_bf16[] = { +static const struct mrs_field_value id_aa64isar1_bf16[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, BF16, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_bf16_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_bf16_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_BF16, ID_AA64ISAR1_BF16_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_specres[] = { +static const struct mrs_field_value id_aa64isar1_specres[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_SPECRES_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_SPECRES_IMPL, "PredInv"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar1_sb[] = { +static const struct mrs_field_value id_aa64isar1_sb[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, SB, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_sb_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_sb_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SB, ID_AA64ISAR1_SB_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_frintts[] = { +static const struct mrs_field_value id_aa64isar1_frintts[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, FRINTTS, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_frintts_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_frintts_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_FRINT, ID_AA64ISAR1_FRINTTS_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_gpi[] = { +static const struct mrs_field_value id_aa64isar1_gpi[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, GPI, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar1_gpa[] = { +static const struct mrs_field_value id_aa64isar1_gpa[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, GPA, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar1_lrcpc[] = { +static const struct mrs_field_value id_aa64isar1_lrcpc[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_LRCPC_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_LRCPC_RCPC_8_3, "RCPC-8.3"), MRS_FIELD_VALUE(ID_AA64ISAR1_LRCPC_RCPC_8_4, "RCPC-8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_lrcpc_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_lrcpc_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_LRCPC, ID_AA64ISAR1_LRCPC_RCPC_8_3), MRS_HWCAP(&elf_hwcap, HWCAP_ILRCPC, ID_AA64ISAR1_LRCPC_RCPC_8_4), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_fcma[] = { +static const struct mrs_field_value id_aa64isar1_fcma[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, FCMA, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_fcma_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_fcma_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_FCMA, ID_AA64ISAR1_FCMA_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_jscvt[] = { +static const struct mrs_field_value id_aa64isar1_jscvt[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, JSCVT, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_jscvt_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_jscvt_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_JSCVT, ID_AA64ISAR1_JSCVT_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_api[] = { +static const struct mrs_field_value id_aa64isar1_api[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_API_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_API_PAC, "API PAC"), MRS_FIELD_VALUE(ID_AA64ISAR1_API_EPAC, "API EPAC"), @@ -707,7 +707,7 @@ static struct mrs_field_value id_aa64isar1_api[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar1_apa[] = { +static const struct mrs_field_value id_aa64isar1_apa[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_APA_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_APA_PAC, "APA PAC"), MRS_FIELD_VALUE(ID_AA64ISAR1_APA_EPAC, "APA EPAC"), @@ -718,20 +718,20 @@ static struct mrs_field_value id_aa64isar1_apa[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar1_dpb[] = { +static const struct mrs_field_value id_aa64isar1_dpb[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_DPB_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_DPB_DCCVAP, "DCPoP"), MRS_FIELD_VALUE(ID_AA64ISAR1_DPB_DCCVADP, "DCCVADP"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_dpb_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_dpb_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_DCPOP, ID_AA64ISAR1_DPB_DCCVAP), MRS_HWCAP(&elf_hwcap2, HWCAP2_DCPODP, ID_AA64ISAR1_DPB_DCCVADP), MRS_HWCAP_END }; -static struct mrs_field id_aa64isar1_fields[] = { +static const struct mrs_field id_aa64isar1_fields[] = { MRS_FIELD_HWCAP(ID_AA64ISAR1, I8MM, false, MRS_LOWER, id_aa64isar1_i8mm, id_aa64isar1_i8mm_caps), MRS_FIELD_HWCAP(ID_AA64ISAR1, DGH, false, MRS_LOWER, id_aa64isar1_dgh, @@ -761,22 +761,22 @@ static struct mrs_field id_aa64isar1_fields[] = { /* ID_AA64ISAR2_EL1 */ -static struct mrs_field_value id_aa64isar2_pac_frac[] = { +static const struct mrs_field_value id_aa64isar2_pac_frac[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, PAC_frac, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_bc[] = { +static const struct mrs_field_value id_aa64isar2_bc[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, BC, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_mops[] = { +static const struct mrs_field_value id_aa64isar2_mops[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, MOPS, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_apa3[] = { +static const struct mrs_field_value id_aa64isar2_apa3[] = { MRS_FIELD_VALUE(ID_AA64ISAR2_APA3_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR2_APA3_PAC, "APA3 PAC"), MRS_FIELD_VALUE(ID_AA64ISAR2_APA3_EPAC, "APA3 EPAC"), @@ -787,32 +787,32 @@ static struct mrs_field_value id_aa64isar2_apa3[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar2_apa3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar2_apa3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACA, ID_AA64ISAR2_APA3_PAC), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar2_gpa3[] = { +static const struct mrs_field_value id_aa64isar2_gpa3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, GPA3, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar2_gpa3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar2_gpa3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACG, ID_AA64ISAR2_GPA3_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar2_rpres[] = { +static const struct mrs_field_value id_aa64isar2_rpres[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, RPRES, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_wfxt[] = { +static const struct mrs_field_value id_aa64isar2_wfxt[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, WFxT, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64isar2_fields[] = { +static const struct mrs_field id_aa64isar2_fields[] = { MRS_FIELD(ID_AA64ISAR2, PAC_frac, false, MRS_EXACT, id_aa64isar2_pac_frac), MRS_FIELD(ID_AA64ISAR2, BC, false, MRS_EXACT, id_aa64isar2_bc), @@ -828,69 +828,69 @@ static struct mrs_field id_aa64isar2_fields[] = { /* ID_AA64MMFR0_EL1 */ -static struct mrs_field_value id_aa64mmfr0_exs[] = { +static const struct mrs_field_value id_aa64mmfr0_exs[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, ExS, ALL, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran4_2[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran4_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_TGran4, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_NONE, "No S2 TGran4"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_IMPL, "S2 TGran4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran64_2[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran64_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran64_2_TGran64, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran64_2_NONE, "No S2 TGran64"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran64_2_IMPL, "S2 TGran64"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran16_2[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran16_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_TGran16, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_NONE, "No S2 TGran16"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_IMPL, "S2 TGran16"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran4[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran4[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran4,NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran64[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran64[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran64, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran16[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran16[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran16, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_bigendel0[] = { +static const struct mrs_field_value id_aa64mmfr0_bigendel0[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, BigEndEL0, FIXED, MIXED), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_snsmem[] = { +static const struct mrs_field_value id_aa64mmfr0_snsmem[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, SNSMem, NONE, DISTINCT), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_bigend[] = { +static const struct mrs_field_value id_aa64mmfr0_bigend[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, BigEnd, FIXED, MIXED), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_asidbits[] = { +static const struct mrs_field_value id_aa64mmfr0_asidbits[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_ASIDBits_8, "8bit ASID"), MRS_FIELD_VALUE(ID_AA64MMFR0_ASIDBits_16, "16bit ASID"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_parange[] = { +static const struct mrs_field_value id_aa64mmfr0_parange[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_PARange_4G, "4GB PA"), MRS_FIELD_VALUE(ID_AA64MMFR0_PARange_64G, "64GB PA"), MRS_FIELD_VALUE(ID_AA64MMFR0_PARange_1T, "1TB PA"), @@ -901,7 +901,7 @@ static struct mrs_field_value id_aa64mmfr0_parange[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64mmfr0_fields[] = { +static const struct mrs_field id_aa64mmfr0_fields[] = { MRS_FIELD(ID_AA64MMFR0, ExS, false, MRS_EXACT, id_aa64mmfr0_exs), MRS_FIELD(ID_AA64MMFR0, TGran4_2, false, MRS_EXACT, id_aa64mmfr0_tgran4_2), @@ -927,53 +927,53 @@ static struct mrs_field id_aa64mmfr0_fields[] = { /* ID_AA64MMFR1_EL1 */ -static struct mrs_field_value id_aa64mmfr1_xnx[] = { +static const struct mrs_field_value id_aa64mmfr1_xnx[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, XNX, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_specsei[] = { +static const struct mrs_field_value id_aa64mmfr1_specsei[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, SpecSEI, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_pan[] = { +static const struct mrs_field_value id_aa64mmfr1_pan[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, PAN, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64MMFR1_PAN_ATS1E1, "PAN+ATS1E1"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_lo[] = { +static const struct mrs_field_value id_aa64mmfr1_lo[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, LO, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_hpds[] = { +static const struct mrs_field_value id_aa64mmfr1_hpds[] = { MRS_FIELD_VALUE(ID_AA64MMFR1_HPDS_NONE, ""), MRS_FIELD_VALUE(ID_AA64MMFR1_HPDS_HPD, "HPD"), MRS_FIELD_VALUE(ID_AA64MMFR1_HPDS_TTPBHA, "HPD+TTPBHA"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_vh[] = { +static const struct mrs_field_value id_aa64mmfr1_vh[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, VH, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_vmidbits[] = { +static const struct mrs_field_value id_aa64mmfr1_vmidbits[] = { MRS_FIELD_VALUE(ID_AA64MMFR1_VMIDBits_8, "8bit VMID"), MRS_FIELD_VALUE(ID_AA64MMFR1_VMIDBits_16, "16bit VMID"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_hafdbs[] = { +static const struct mrs_field_value id_aa64mmfr1_hafdbs[] = { MRS_FIELD_VALUE(ID_AA64MMFR1_HAFDBS_NONE, ""), MRS_FIELD_VALUE(ID_AA64MMFR1_HAFDBS_AF, "HAF"), MRS_FIELD_VALUE(ID_AA64MMFR1_HAFDBS_AF_DBS, "HAF+DS"), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64mmfr1_fields[] = { +static const struct mrs_field id_aa64mmfr1_fields[] = { MRS_FIELD(ID_AA64MMFR1, XNX, false, MRS_EXACT, id_aa64mmfr1_xnx), MRS_FIELD(ID_AA64MMFR1, SpecSEI, false, MRS_EXACT, id_aa64mmfr1_specsei), @@ -989,94 +989,94 @@ static struct mrs_field id_aa64mmfr1_fields[] = { /* ID_AA64MMFR2_EL1 */ -static struct mrs_field_value id_aa64mmfr2_e0pd[] = { +static const struct mrs_field_value id_aa64mmfr2_e0pd[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, E0PD, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_evt[] = { +static const struct mrs_field_value id_aa64mmfr2_evt[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_EVT_NONE, ""), MRS_FIELD_VALUE(ID_AA64MMFR2_EVT_8_2, "EVT-8.2"), MRS_FIELD_VALUE(ID_AA64MMFR2_EVT_8_5, "EVT-8.5"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_bbm[] = { +static const struct mrs_field_value id_aa64mmfr2_bbm[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_BBM_LEVEL0, ""), MRS_FIELD_VALUE(ID_AA64MMFR2_BBM_LEVEL1, "BBM level 1"), MRS_FIELD_VALUE(ID_AA64MMFR2_BBM_LEVEL2, "BBM level 2"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_ttl[] = { +static const struct mrs_field_value id_aa64mmfr2_ttl[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, TTL, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_fwb[] = { +static const struct mrs_field_value id_aa64mmfr2_fwb[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, FWB, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_ids[] = { +static const struct mrs_field_value id_aa64mmfr2_ids[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, IDS, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_at[] = { +static const struct mrs_field_value id_aa64mmfr2_at[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, AT, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64mmfr2_at_caps[] = { +static const struct mrs_field_hwcap id_aa64mmfr2_at_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_USCAT, ID_AA64MMFR2_AT_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64mmfr2_st[] = { +static const struct mrs_field_value id_aa64mmfr2_st[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, ST, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_nv[] = { +static const struct mrs_field_value id_aa64mmfr2_nv[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, NV, NONE, 8_3), MRS_FIELD_VALUE(ID_AA64MMFR2_NV_8_4, "NV v8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_ccidx[] = { +static const struct mrs_field_value id_aa64mmfr2_ccidx[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_CCIDX_32, "32bit CCIDX"), MRS_FIELD_VALUE(ID_AA64MMFR2_CCIDX_64, "64bit CCIDX"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_varange[] = { +static const struct mrs_field_value id_aa64mmfr2_varange[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_VARange_48, "48bit VA"), MRS_FIELD_VALUE(ID_AA64MMFR2_VARange_52, "52bit VA"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_iesb[] = { +static const struct mrs_field_value id_aa64mmfr2_iesb[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, IESB, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_lsm[] = { +static const struct mrs_field_value id_aa64mmfr2_lsm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, LSM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_uao[] = { +static const struct mrs_field_value id_aa64mmfr2_uao[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, UAO, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_cnp[] = { +static const struct mrs_field_value id_aa64mmfr2_cnp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, CnP, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64mmfr2_fields[] = { +static const struct mrs_field id_aa64mmfr2_fields[] = { MRS_FIELD(ID_AA64MMFR2, E0PD, false, MRS_EXACT, id_aa64mmfr2_e0pd), MRS_FIELD(ID_AA64MMFR2, EVT, false, MRS_EXACT, id_aa64mmfr2_evt), MRS_FIELD(ID_AA64MMFR2, BBM, false, MRS_EXACT, id_aa64mmfr2_bbm), @@ -1099,67 +1099,67 @@ static struct mrs_field id_aa64mmfr2_fields[] = { /* ID_AA64PFR0_EL1 */ -static struct mrs_field_value id_aa64pfr0_csv3[] = { +static const struct mrs_field_value id_aa64pfr0_csv3[] = { MRS_FIELD_VALUE(ID_AA64PFR0_CSV3_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_CSV3_ISOLATED, "CSV3"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_csv2[] = { +static const struct mrs_field_value id_aa64pfr0_csv2[] = { MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_ISOLATED, "CSV2"), MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_SCXTNUM, "SCXTNUM"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_dit[] = { +static const struct mrs_field_value id_aa64pfr0_dit[] = { MRS_FIELD_VALUE(ID_AA64PFR0_DIT_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_DIT_PSTATE, "PSTATE.DIT"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64pfr0_dit_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_dit_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_DIT, ID_AA64PFR0_DIT_PSTATE), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64pfr0_amu[] = { +static const struct mrs_field_value id_aa64pfr0_amu[] = { MRS_FIELD_VALUE(ID_AA64PFR0_AMU_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_AMU_V1, "AMUv1"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_mpam[] = { +static const struct mrs_field_value id_aa64pfr0_mpam[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, MPAM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_sel2[] = { +static const struct mrs_field_value id_aa64pfr0_sel2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, SEL2, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_sve[] = { +static const struct mrs_field_value id_aa64pfr0_sve[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, SVE, NONE, IMPL), MRS_FIELD_VALUE_END, }; #if 0 /* Enable when we add SVE support */ -static struct mrs_field_hwcap id_aa64pfr0_sve_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_sve_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SVE, ID_AA64PFR0_SVE_IMPL), MRS_HWCAP_END }; #endif -static struct mrs_field_value id_aa64pfr0_ras[] = { +static const struct mrs_field_value id_aa64pfr0_ras[] = { MRS_FIELD_VALUE(ID_AA64PFR0_RAS_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_RAS_IMPL, "RAS"), MRS_FIELD_VALUE(ID_AA64PFR0_RAS_8_4, "RAS v8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_gic[] = { +static const struct mrs_field_value id_aa64pfr0_gic[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, GIC, CPUIF_NONE, CPUIF_EN), MRS_FIELD_VALUE(ID_AA64PFR0_GIC_CPUIF_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_GIC_CPUIF_EN, "GIC"), @@ -1167,55 +1167,55 @@ static struct mrs_field_value id_aa64pfr0_gic[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_advsimd[] = { +static const struct mrs_field_value id_aa64pfr0_advsimd[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, AdvSIMD, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64PFR0_AdvSIMD_HP, "AdvSIMD+HP"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64pfr0_advsimd_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_advsimd_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMD, ID_AA64PFR0_AdvSIMD_IMPL), MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDHP, ID_AA64PFR0_AdvSIMD_HP), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64pfr0_fp[] = { +static const struct mrs_field_value id_aa64pfr0_fp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, FP, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64PFR0_FP_HP, "FP+HP"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64pfr0_fp_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_fp_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_FP, ID_AA64PFR0_FP_IMPL), MRS_HWCAP(&elf_hwcap, HWCAP_FPHP, ID_AA64PFR0_FP_HP), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64pfr0_el3[] = { +static const struct mrs_field_value id_aa64pfr0_el3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, EL3, NONE, 64), MRS_FIELD_VALUE(ID_AA64PFR0_EL3_64_32, "EL3 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_el2[] = { +static const struct mrs_field_value id_aa64pfr0_el2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, EL2, NONE, 64), MRS_FIELD_VALUE(ID_AA64PFR0_EL2_64_32, "EL2 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_el1[] = { +static const struct mrs_field_value id_aa64pfr0_el1[] = { MRS_FIELD_VALUE(ID_AA64PFR0_EL1_64, "EL1"), MRS_FIELD_VALUE(ID_AA64PFR0_EL1_64_32, "EL1 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_el0[] = { +static const struct mrs_field_value id_aa64pfr0_el0[] = { MRS_FIELD_VALUE(ID_AA64PFR0_EL0_64, "EL0"), MRS_FIELD_VALUE(ID_AA64PFR0_EL0_64_32, "EL0 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64pfr0_fields[] = { +static const struct mrs_field id_aa64pfr0_fields[] = { MRS_FIELD(ID_AA64PFR0, CSV3, false, MRS_EXACT, id_aa64pfr0_csv3), MRS_FIELD(ID_AA64PFR0, CSV2, false, MRS_EXACT, id_aa64pfr0_csv2), MRS_FIELD_HWCAP(ID_AA64PFR0, DIT, false, MRS_LOWER, id_aa64pfr0_dit, @@ -1239,26 +1239,26 @@ static struct mrs_field id_aa64pfr0_fields[] = { /* ID_AA64PFR1_EL1 */ -static struct mrs_field_value id_aa64pfr1_mte[] = { +static const struct mrs_field_value id_aa64pfr1_mte[] = { MRS_FIELD_VALUE(ID_AA64PFR1_MTE_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL_EL0, "MTE EL0"), MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL, "MTE"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr1_ssbs[] = { +static const struct mrs_field_value id_aa64pfr1_ssbs[] = { MRS_FIELD_VALUE(ID_AA64PFR1_SSBS_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR1_SSBS_PSTATE, "PSTATE.SSBS"), MRS_FIELD_VALUE(ID_AA64PFR1_SSBS_PSTATE_MSR, "PSTATE.SSBS MSR"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64pfr1_ssbs_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr1_ssbs_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SSBS, ID_AA64PFR1_SSBS_PSTATE), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64pfr1_bt[] = { +static const struct mrs_field_value id_aa64pfr1_bt[] = { MRS_FIELD_VALUE(ID_AA64PFR1_BT_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR1_BT_IMPL, "BTI"), MRS_FIELD_VALUE_END, @@ -1266,13 +1266,13 @@ static struct mrs_field_value id_aa64pfr1_bt[] = { #if 0 *** 373 LINES SKIPPED *** From nobody Mon Sep 25 11:01:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg43XN4z4vNVG; Mon, 25 Sep 2023 11:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvKg42Xgtz3Mt4; Mon, 25 Sep 2023 11:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sa9DQFreaDrZGwJWWVxuXsYg4gf7XNWql0UBgnpDpiw=; b=LU+1AiamMlOg6EZgne3GeqwLqIELWK+4e17AzI6hzcOExsTohxcGSZY6HBOJF2DsUwr5qz qikWRSaWEM46gv+GcxHsqD5uyETdWflluBIEK6g+i6WF/eFfy+wxCRfmU1sOkOCVsS0RXW +7clwU1RVv5/Zb/5BhFDVvogjseYEX/PGAlwb+w6yLDpLTiU50rcsU0MewU22zAf0tFYJG U1LeDjOAULPv5F/H5ZiQx6P7KjkIiqxIs00GDNJBh73aQim5hhLYw8SlrGJPf1dG7/OhUw LrovZcxh8kb4LbcTlJ10iTEy8DG9vZ0LbcQt7H8vpu2rX/3QbRMvJu77LWDkkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639664; a=rsa-sha256; cv=none; b=wQ6EDjuFPoAoSfo8frFNz81ZzX1azj25I6DXNhWkkZ89VpPPuKSfGParX9OmyTNBxTz+o/ lQuU9BXBhgDuHJzFinMZlD16l4K5nbiZk7rsT4zLqZi0v7ofEfBaxTsswOMSfMtwcwHEsj VmOuiqfQVLliDBNLvaFcac/X2fCcf82/HsEFyZfrooTxP9CX5IVvpNTkPPdA9QOkurHzeC npX4t4A2uM5eddDBi3Y/uU7+eY1ahLfTfPW0FvmHkNj+6jIOuIclQimTnOBOciqvuYryaA sAqNIFDNu/a1mG58D7PJSJxAgyEMhndI9CInzs5juVwkD0HrSAIsKRJyB3x1sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sa9DQFreaDrZGwJWWVxuXsYg4gf7XNWql0UBgnpDpiw=; b=m9y1vNXxSTo1ypbTwQ8mNHRAnq2MYBTCaQ7qs3O4+qwM7js3DuzqzAE3dI04A6XZimZyQq cCcqTkkvKl0BtUGIwTVEyrnqnKWr779dJx2PS1JbIGxliwlkwiKVQE351KHLGhxi9SHOAi abpBJIToOsZBpDA9Rx7uUvRwQ1ASa5GDJ8F/7wbUqwLgrfTyCs5RjZhx3RUBlgO/gFj2L6 G/XJk6u7peb1rQ4erTBFjXfU6YvHkqogW+p2LYLFEU2BGDRZ1rHQqp5IV97aMAQgOvF5iz K7oR2Q1/qpDBO4j+S6fJ6FqNqt4jCzkVkX4bs+YRiUPPw1n9ymFGz+eDdxLOtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg41ZxGz1Qd7; Mon, 25 Sep 2023 11:01:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB14Gc053219; Mon, 25 Sep 2023 11:01:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB14b7053216; Mon, 25 Sep 2023 11:01:04 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:04 GMT Message-Id: <202309251101.38PB14b7053216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 0c5d595a1a70 - stable/13 - arm64: Update the ID_AA64DFR0_EL1 fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c5d595a1a703adb14870230f89669704b0ad5cf Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0c5d595a1a703adb14870230f89669704b0ad5cf commit 0c5d595a1a703adb14870230f89669704b0ad5cf Author: Andrew Turner AuthorDate: 2023-03-13 09:17:32 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:33 +0000 arm64: Update the ID_AA64DFR0_EL1 fields While here move to decimal for the _op and _CR definitions to be used by a future macro to define the register when the assembler doesn't know about it. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40887 (cherry picked from commit 6fd44e5f530935a26f58637594ac22719324fb12) --- sys/arm64/arm64/identcpu.c | 44 ++++++++++++++++++++++++++++++++++++++------ sys/arm64/include/armreg.h | 44 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 76 insertions(+), 12 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 2f849b049425..1d14ff026be8 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -335,6 +335,28 @@ static const struct mrs_field id_aa64afr1_fields[] = { /* ID_AA64DFR0_EL1 */ +static const struct mrs_field_value id_aa64dfr0_hpmn0[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64DFR0, HPMN0, CONSTR, DEFINED), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64dfr0_brbe[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64DFR0, BRBE, NONE, IMPL), + MRS_FIELD_VALUE(ID_AA64DFR0_BRBE_EL3, "BRBE EL3"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64dfr0_mtpmu[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64DFR0, MTPMU, NONE, IMPL), + MRS_FIELD_VALUE(ID_AA64DFR0_MTPMU_NONE_MT_RES0, "MTPMU res0"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64dfr0_tracebuffer[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64DFR0, TraceBuffer, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + static const struct mrs_field_value id_aa64dfr0_tracefilt[] = { MRS_FIELD_VALUE(ID_AA64DFR0_TraceFilt_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_TraceFilt_8_4, "Trace v8.4"), @@ -350,7 +372,9 @@ static const struct mrs_field_value id_aa64dfr0_doublelock[] = { static const struct mrs_field_value id_aa64dfr0_pmsver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE, "SPE"), - MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE_8_3, "SPE v8.3"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE_1_1, "SPEv1p1"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE_1_2, "SPEv1p2"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE_1_3, "SPEv1p3"), MRS_FIELD_VALUE_END, }; @@ -372,9 +396,11 @@ static const struct mrs_field_value id_aa64dfr0_brps[] = { static const struct mrs_field_value id_aa64dfr0_pmuver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3, "PMUv3"), - MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_1, "PMUv3 v8.1"), - MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_4, "PMUv3 v8.4"), - MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_5, "PMUv3 v8.5"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_1, "PMUv3p1"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_4, "PMUv3p4"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_5, "PMUv3p5"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_7, "PMUv3p7"), + MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_8, "PMUv3p8"), MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_IMPL, "IMPL PMU"), MRS_FIELD_VALUE_END, }; @@ -388,12 +414,18 @@ static const struct mrs_field_value id_aa64dfr0_tracever[] = { static const struct mrs_field_value id_aa64dfr0_debugver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8, "Debugv8"), MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_VHE, "Debugv8_VHE"), - MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_2, "Debugv8.2"), - MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_4, "Debugv8.4"), + MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_2, "Debugv8p2"), + MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_4, "Debugv8p4"), + MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_8, "Debugv8p8"), MRS_FIELD_VALUE_END, }; static const struct mrs_field id_aa64dfr0_fields[] = { + MRS_FIELD(ID_AA64DFR0, HPMN0, false, MRS_EXACT, id_aa64dfr0_hpmn0), + MRS_FIELD(ID_AA64DFR0, BRBE, false, MRS_EXACT, id_aa64dfr0_brbe), + MRS_FIELD(ID_AA64DFR0, MTPMU, true, MRS_EXACT, id_aa64dfr0_mtpmu), + MRS_FIELD(ID_AA64DFR0, TraceBuffer, false, MRS_EXACT, + id_aa64dfr0_tracebuffer), MRS_FIELD(ID_AA64DFR0, TraceFilt, false, MRS_EXACT, id_aa64dfr0_tracefilt), MRS_FIELD(ID_AA64DFR0, DoubleLock, false, MRS_EXACT, diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index d307781f2d01..b357e77d7e75 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -494,11 +494,11 @@ /* ID_AA64DFR0_EL1 */ #define ID_AA64DFR0_EL1 MRS_REG(ID_AA64DFR0_EL1) -#define ID_AA64DFR0_EL1_op0 0x3 -#define ID_AA64DFR0_EL1_op1 0x0 -#define ID_AA64DFR0_EL1_CRn 0x0 -#define ID_AA64DFR0_EL1_CRm 0x5 -#define ID_AA64DFR0_EL1_op2 0x0 +#define ID_AA64DFR0_EL1_op0 3 +#define ID_AA64DFR0_EL1_op1 0 +#define ID_AA64DFR0_EL1_CRn 0 +#define ID_AA64DFR0_EL1_CRm 5 +#define ID_AA64DFR0_EL1_op2 0 #define ID_AA64DFR0_DebugVer_SHIFT 0 #define ID_AA64DFR0_DebugVer_MASK (UL(0xf) << ID_AA64DFR0_DebugVer_SHIFT) #define ID_AA64DFR0_DebugVer_VAL(x) ((x) & ID_AA64DFR0_DebugVer_MASK) @@ -506,6 +506,7 @@ #define ID_AA64DFR0_DebugVer_8_VHE (UL(0x7) << ID_AA64DFR0_DebugVer_SHIFT) #define ID_AA64DFR0_DebugVer_8_2 (UL(0x8) << ID_AA64DFR0_DebugVer_SHIFT) #define ID_AA64DFR0_DebugVer_8_4 (UL(0x9) << ID_AA64DFR0_DebugVer_SHIFT) +#define ID_AA64DFR0_DebugVer_8_8 (UL(0xa) << ID_AA64DFR0_DebugVer_SHIFT) #define ID_AA64DFR0_TraceVer_SHIFT 4 #define ID_AA64DFR0_TraceVer_MASK (UL(0xf) << ID_AA64DFR0_TraceVer_SHIFT) #define ID_AA64DFR0_TraceVer_VAL(x) ((x) & ID_AA64DFR0_TraceVer_MASK) @@ -519,11 +520,18 @@ #define ID_AA64DFR0_PMUVer_3_1 (UL(0x4) << ID_AA64DFR0_PMUVer_SHIFT) #define ID_AA64DFR0_PMUVer_3_4 (UL(0x5) << ID_AA64DFR0_PMUVer_SHIFT) #define ID_AA64DFR0_PMUVer_3_5 (UL(0x6) << ID_AA64DFR0_PMUVer_SHIFT) +#define ID_AA64DFR0_PMUVer_3_7 (UL(0x7) << ID_AA64DFR0_PMUVer_SHIFT) +#define ID_AA64DFR0_PMUVer_3_8 (UL(0x8) << ID_AA64DFR0_PMUVer_SHIFT) #define ID_AA64DFR0_PMUVer_IMPL (UL(0xf) << ID_AA64DFR0_PMUVer_SHIFT) #define ID_AA64DFR0_BRPs_SHIFT 12 #define ID_AA64DFR0_BRPs_MASK (UL(0xf) << ID_AA64DFR0_BRPs_SHIFT) #define ID_AA64DFR0_BRPs_VAL(x) \ ((((x) >> ID_AA64DFR0_BRPs_SHIFT) & 0xf) + 1) +#define ID_AA64DFR0_PMSS_SHIFT 16 +#define ID_AA64DFR0_PMSS_MASK (UL(0xf) << ID_AA64DFR0_PMSS_SHIFT) +#define ID_AA64DFR0_PMSS_VAL(x) ((x) & ID_AA64DFR0_PMSS_MASK) +#define ID_AA64DFR0_PMSS_NONE (UL(0x0) << ID_AA64DFR0_PMSS_SHIFT) +#define ID_AA64DFR0_PMSS_IMPL (UL(0x1) << ID_AA64DFR0_PMSS_SHIFT) #define ID_AA64DFR0_WRPs_SHIFT 20 #define ID_AA64DFR0_WRPs_MASK (UL(0xf) << ID_AA64DFR0_WRPs_SHIFT) #define ID_AA64DFR0_WRPs_VAL(x) \ @@ -537,7 +545,9 @@ #define ID_AA64DFR0_PMSVer_VAL(x) ((x) & ID_AA64DFR0_PMSVer_MASK) #define ID_AA64DFR0_PMSVer_NONE (UL(0x0) << ID_AA64DFR0_PMSVer_SHIFT) #define ID_AA64DFR0_PMSVer_SPE (UL(0x1) << ID_AA64DFR0_PMSVer_SHIFT) -#define ID_AA64DFR0_PMSVer_SPE_8_3 (UL(0x2) << ID_AA64DFR0_PMSVer_SHIFT) +#define ID_AA64DFR0_PMSVer_SPE_1_1 (UL(0x2) << ID_AA64DFR0_PMSVer_SHIFT) +#define ID_AA64DFR0_PMSVer_SPE_1_2 (UL(0x3) << ID_AA64DFR0_PMSVer_SHIFT) +#define ID_AA64DFR0_PMSVer_SPE_1_3 (UL(0x4) << ID_AA64DFR0_PMSVer_SHIFT) #define ID_AA64DFR0_DoubleLock_SHIFT 36 #define ID_AA64DFR0_DoubleLock_MASK (UL(0xf) << ID_AA64DFR0_DoubleLock_SHIFT) #define ID_AA64DFR0_DoubleLock_VAL(x) ((x) & ID_AA64DFR0_DoubleLock_MASK) @@ -548,6 +558,28 @@ #define ID_AA64DFR0_TraceFilt_VAL(x) ((x) & ID_AA64DFR0_TraceFilt_MASK) #define ID_AA64DFR0_TraceFilt_NONE (UL(0x0) << ID_AA64DFR0_TraceFilt_SHIFT) #define ID_AA64DFR0_TraceFilt_8_4 (UL(0x1) << ID_AA64DFR0_TraceFilt_SHIFT) +#define ID_AA64DFR0_TraceBuffer_SHIFT 44 +#define ID_AA64DFR0_TraceBuffer_MASK (UL(0xf) << ID_AA64DFR0_TraceBuffer_SHIFT) +#define ID_AA64DFR0_TraceBuffer_VAL(x) ((x) & ID_AA64DFR0_TraceBuffer_MASK) +#define ID_AA64DFR0_TraceBuffer_NONE (UL(0x0) << ID_AA64DFR0_TraceBuffer_SHIFT) +#define ID_AA64DFR0_TraceBuffer_IMPL (UL(0x1) << ID_AA64DFR0_TraceBuffer_SHIFT) +#define ID_AA64DFR0_MTPMU_SHIFT 48 +#define ID_AA64DFR0_MTPMU_MASK (UL(0xf) << ID_AA64DFR0_MTPMU_SHIFT) +#define ID_AA64DFR0_MTPMU_VAL(x) ((x) & ID_AA64DFR0_MTPMU_MASK) +#define ID_AA64DFR0_MTPMU_NONE (UL(0x0) << ID_AA64DFR0_MTPMU_SHIFT) +#define ID_AA64DFR0_MTPMU_IMPL (UL(0x1) << ID_AA64DFR0_MTPMU_SHIFT) +#define ID_AA64DFR0_MTPMU_NONE_MT_RES0 (UL(0xf) << ID_AA64DFR0_MTPMU_SHIFT) +#define ID_AA64DFR0_BRBE_SHIFT 52 +#define ID_AA64DFR0_BRBE_MASK (UL(0xf) << ID_AA64DFR0_BRBE_SHIFT) +#define ID_AA64DFR0_BRBE_VAL(x) ((x) & ID_AA64DFR0_BRBE_MASK) +#define ID_AA64DFR0_BRBE_NONE (UL(0x0) << ID_AA64DFR0_BRBE_SHIFT) +#define ID_AA64DFR0_BRBE_IMPL (UL(0x1) << ID_AA64DFR0_BRBE_SHIFT) +#define ID_AA64DFR0_BRBE_EL3 (UL(0x2) << ID_AA64DFR0_BRBE_SHIFT) +#define ID_AA64DFR0_HPMN0_SHIFT 60 +#define ID_AA64DFR0_HPMN0_MASK (UL(0xf) << ID_AA64DFR0_HPMN0_SHIFT) +#define ID_AA64DFR0_HPMN0_VAL(x) ((x) & ID_AA64DFR0_HPMN0_MASK) +#define ID_AA64DFR0_HPMN0_CONSTR (UL(0x0) << ID_AA64DFR0_HPMN0_SHIFT) +#define ID_AA64DFR0_HPMN0_DEFINED (UL(0x1) << ID_AA64DFR0_HPMN0_SHIFT) /* ID_AA64DFR1_EL1 */ #define ID_AA64DFR1_EL1 MRS_REG(ID_AA64DFR1_EL1) From nobody Mon Sep 25 11:01:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg5541Yz4vNSM; Mon, 25 Sep 2023 11:01: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 4RvKg53lYNz3N4k; Mon, 25 Sep 2023 11:01:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3c4PvcZJjG+7yrjzpTgWxdlerXMbrRW0fUG+wL8QN8=; b=ITb0mHkH4NvYdG5dXYJBMBOb7EF/pvSygyrWBEBnPEpKaVkBxjz3ww01Rhuyp9lrUK31Q+ 8u60pgloY6k6RUTetlg463ijFOfXjdE5n2Ihj3mxPECXVifDQ599BuA0zQIFPXUCMeiQLn VnHPhTn0pWDaLJBjSTJCPOUwqjxoBZ1X/m2mfmKBtkQkCBFzKO9PoXL72iHCkRm52JgVZL u2R1dBqeQveU6cq6seI99OgbmH9ePPUGUXbM9Xl8Uhc4l7o1+Fy9vQy3VHueHeE+soyQL/ zVgxKdUa32CFibfkivmkXuZUHsmdR2sNUSdsb6GRW3+AUoS/j2WD4cDF5zGPHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639665; a=rsa-sha256; cv=none; b=qXysxaqD2Jv45QJJvMH5W5BUT7QvdDVnUKYELZXKl41cEyiLm3AEgNi1IrMYD9iV0NyO7x WCSDFzYtEWvpXjCtXOqAvd7HNc8Js8win0qQv66C24F1T26nLqvKj0DunSxoEYQMgvMLlB Jri9nwC/cReFd9lj9kvTPlC/OBwlTgOMfPw27HrUbtcvHY05F/nRse5r9qNYMqpFoS4r81 LsLoLyAW2Vy3ZHhSiMGcI3ipSC99y3RoHZsmQ+4XYz4M+fwC8XfDIf8O78a7v3AxcVHHFD 9kP2gcWxzu7wA217UvTE2hbAOFOvTVZsIbg+/DsYtp2jENcxkjo3S7/Hhin0Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3c4PvcZJjG+7yrjzpTgWxdlerXMbrRW0fUG+wL8QN8=; b=myptHZayAkygUYvnBshtC5sGxdFjE6ozCwszNSpoQgrtmfeXE+5YxXaKDpSkQOj640GnbC ogQifXKAV73H5dQr0OMH9jrpxfU+zyDG64Ry8Wg5RHLk8/7JReFhcmGggh76B3TUyVZdAy wxuRrLBuefXYoN4PrA06+cJD19rrxudlIhBR0YfhwGI7CSlNq2rVTAcgs5t+/3IuwLTTN1 4AzyS2ZAm9eNv2jegtrpKBCdtYWGR2JbntNW/kZxCtR39VuBWwtM3L69PW1xz5pvkFTq6O KBpflf77cA4FBPDSMIwjv9//Udzzhh44OeZXt54MyAUIAH2TOB7pKLCyv9EJCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg52qLqz1QHC; Mon, 25 Sep 2023 11:01:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB15k6053261; Mon, 25 Sep 2023 11:01:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB15H8053258; Mon, 25 Sep 2023 11:01:05 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:05 GMT Message-Id: <202309251101.38PB15H8053258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 2573723a5178 - stable/13 - arm64: Update the ID_AA64ISAR0_EL1 fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2573723a51786736882ccfe704af92117e30223b Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2573723a51786736882ccfe704af92117e30223b commit 2573723a51786736882ccfe704af92117e30223b Author: Andrew Turner AuthorDate: 2023-07-06 09:19:21 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:33 +0000 arm64: Update the ID_AA64ISAR0_EL1 fields While here move to decimal for the _op and _CR definitions to be used by a future macro to define the register when the assembler doesn't know about it. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40888 (cherry picked from commit 4182f58172b56f71bfaf2450a0e9cb8b4397bf0a) --- sys/arm64/arm64/identcpu.c | 6 ++++++ sys/arm64/include/armreg.h | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 1d14ff026be8..8851cd952b7b 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -542,6 +542,11 @@ static const struct mrs_field_hwcap id_aa64isar0_rdm_caps[] = { MRS_HWCAP_END }; +static const struct mrs_field_value id_aa64isar0_tme[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, TME, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + static const struct mrs_field_value id_aa64isar0_atomic[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, Atomic, NONE, IMPL), MRS_FIELD_VALUE_END, @@ -614,6 +619,7 @@ static const struct mrs_field id_aa64isar0_fields[] = { id_aa64isar0_sha3_caps), MRS_FIELD_HWCAP(ID_AA64ISAR0, RDM, false, MRS_LOWER, id_aa64isar0_rdm, id_aa64isar0_rdm_caps), + MRS_FIELD(ID_AA64ISAR0, TME, false, MRS_EXACT, id_aa64isar0_tme), MRS_FIELD_HWCAP(ID_AA64ISAR0, Atomic, false, MRS_LOWER, id_aa64isar0_atomic, id_aa64isar0_atomic_caps), MRS_FIELD_HWCAP(ID_AA64ISAR0, CRC32, false, MRS_LOWER, diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index b357e77d7e75..1c9ea3b630f4 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -591,11 +591,11 @@ /* ID_AA64ISAR0_EL1 */ #define ID_AA64ISAR0_EL1 MRS_REG(ID_AA64ISAR0_EL1) -#define ID_AA64ISAR0_EL1_op0 0x3 -#define ID_AA64ISAR0_EL1_op1 0x0 -#define ID_AA64ISAR0_EL1_CRn 0x0 -#define ID_AA64ISAR0_EL1_CRm 0x6 -#define ID_AA64ISAR0_EL1_op2 0x0 +#define ID_AA64ISAR0_EL1_op0 3 +#define ID_AA64ISAR0_EL1_op1 0 +#define ID_AA64ISAR0_EL1_CRn 0 +#define ID_AA64ISAR0_EL1_CRm 6 +#define ID_AA64ISAR0_EL1_op2 0 #define ID_AA64ISAR0_AES_SHIFT 4 #define ID_AA64ISAR0_AES_MASK (UL(0xf) << ID_AA64ISAR0_AES_SHIFT) #define ID_AA64ISAR0_AES_VAL(x) ((x) & ID_AA64ISAR0_AES_MASK) @@ -623,6 +623,10 @@ #define ID_AA64ISAR0_Atomic_VAL(x) ((x) & ID_AA64ISAR0_Atomic_MASK) #define ID_AA64ISAR0_Atomic_NONE (UL(0x0) << ID_AA64ISAR0_Atomic_SHIFT) #define ID_AA64ISAR0_Atomic_IMPL (UL(0x2) << ID_AA64ISAR0_Atomic_SHIFT) +#define ID_AA64ISAR0_TME_SHIFT 24 +#define ID_AA64ISAR0_TME_MASK (UL(0xf) << ID_AA64ISAR0_TME_SHIFT) +#define ID_AA64ISAR0_TME_NONE (UL(0x0) << ID_AA64ISAR0_TME_SHIFT) +#define ID_AA64ISAR0_TME_IMPL (UL(0x1) << ID_AA64ISAR0_TME_SHIFT) #define ID_AA64ISAR0_RDM_SHIFT 28 #define ID_AA64ISAR0_RDM_MASK (UL(0xf) << ID_AA64ISAR0_RDM_SHIFT) #define ID_AA64ISAR0_RDM_VAL(x) ((x) & ID_AA64ISAR0_RDM_MASK) From nobody Mon Sep 25 11:01:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg706YFz4vNkQ; Mon, 25 Sep 2023 11:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvKg64jlrz3N2S; Mon, 25 Sep 2023 11:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mP8jJUGo8S7f5q0zEUBpbrY2bO8MB1wZTpV4Sxs9yNI=; b=Vqy7OWfvL0IPsH7tHAsvEozjm9QESpgLfH7tIDU90obIZgqbGUtFFn63A51Jl4q6CJlquS lPxLsI73dUNaPIWFSKovsJVJDF87Iua7RTlnJI62uue00FhyzEJMFTsmdO1T+k32NWJKlH h/97BWJ0n/kIQgtpyjLkZ7luAs+jJJXm1ycbvXxHBKgVtLHmx7RiaRD+5Xgq4M/yhhLrmP ICdNkGV8cv/gwMlHOevy1CNaUxNtqh2XgrzEGVbVQS4L6gDvYo9Hu0eNtMHco8eIXqzgeb V8JkXSlkdyzW26EPX87cP3w+8utp+kxrxDSdO2vWlJewOoTUK3zbNLQB5kz0+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639666; a=rsa-sha256; cv=none; b=aOwC3X1TQO3jejYS4wgtzhCEBKLJobkbqwTaYupRJY93GGm6e2OMmsmeCzZvgzSPD/hGet 945ophmpqo52VBs6hbIb8fepFTxRQdUJc65nKh52ISrrvtBPCMSjqvyiRf0p7Nfj5ooS9n VDs++DyoAIEdtYUpboUdKbNzOI3bpoAdUtreh1Kmli7eXKI/bYCuHa5chdbAsi4eVVzJKT 6MRH6win4Q20kKH+8SMWMFkRjgpuu+d/QPoO29QEHs7VgYOg9XJsoxOCT/EsNDydWPSXtr nlEhkarC061ksTKlA98loXQW3cmZSc5QD4HSnXaSL80+fgNGZdglSHggYLy6fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mP8jJUGo8S7f5q0zEUBpbrY2bO8MB1wZTpV4Sxs9yNI=; b=fe6ATJZvC/aJQ8rlIe+0P6wE4BUci8y5W6sTjYmaXDo/JMeOVc3Xloqf7HW/ujscUUTuVF L23lmcDcE4XBBmbekXGJXs37AHP9bh4fcmikpkg/joUo4wy1jnXp/o2jZ+p48EQ2QA09O9 cAW0k4ezO56MrKnMRl8EP3Lnp1KkKISngePlotMfsRQCkjGu8dh3iRR0783QSf7lbFg4Mb Kqc4og3eSJ9vNfz6gg2Hrmy8JIb7tngCB/7nc+8wiPzG+FIqElXKDACpDRVJWSFRiMAoNc fhoPBweQXpC5FGO4Hq63OIBHWblGcja/lIWkcU3ETmqMBbW5lFifceYq7UMGVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg63plZz1QL7; Mon, 25 Sep 2023 11:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB16iY053303; Mon, 25 Sep 2023 11:01:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB16Vd053300; Mon, 25 Sep 2023 11:01:06 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:06 GMT Message-Id: <202309251101.38PB16Vd053300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 75fa285b8988 - stable/13 - arm64: Update the ID_AA64ISAR1_EL1 fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 75fa285b8988a01ea3873c0986d9539c342f0b4b Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=75fa285b8988a01ea3873c0986d9539c342f0b4b commit 75fa285b8988a01ea3873c0986d9539c342f0b4b Author: Andrew Turner AuthorDate: 2023-07-06 10:01:11 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:33 +0000 arm64: Update the ID_AA64ISAR1_EL1 fields While here move to decimal for the _op and _CR definitions to be used by a future macro to define the register when the assembler doesn't know about it. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40889 (cherry picked from commit de01309926e21e1cff196b6b23cff6c52064aa0e) --- sys/arm64/arm64/identcpu.c | 15 +++++++++++++++ sys/arm64/include/armreg.h | 23 ++++++++++++++++++----- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 8851cd952b7b..663e465d4149 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -635,6 +635,18 @@ static const struct mrs_field id_aa64isar0_fields[] = { /* ID_AA64ISAR1_EL1 */ +static const struct mrs_field_value id_aa64isar1_ls64[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, LS64, NONE, IMPL), + MRS_FIELD_VALUE(ID_AA64ISAR1_LS64_V, "LS64v"), + MRS_FIELD_VALUE(ID_AA64ISAR1_LS64_ACCDATA, "LS64+ACCDATA"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64isar1_xs[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, XS, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + static const struct mrs_field_value id_aa64isar1_i8mm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, I8MM, NONE, IMPL), MRS_FIELD_VALUE_END, @@ -657,6 +669,7 @@ static const struct mrs_field_hwcap id_aa64isar1_dgh_caps[] = { static const struct mrs_field_value id_aa64isar1_bf16[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, BF16, NONE, IMPL), + MRS_FIELD_VALUE(ID_AA64ISAR1_BF16_EBF, "EBF16"), MRS_FIELD_VALUE_END, }; @@ -770,6 +783,8 @@ static const struct mrs_field_hwcap id_aa64isar1_dpb_caps[] = { }; static const struct mrs_field id_aa64isar1_fields[] = { + MRS_FIELD(ID_AA64ISAR1, LS64, false, MRS_EXACT, id_aa64isar1_ls64), + MRS_FIELD(ID_AA64ISAR1, XS, false, MRS_EXACT, id_aa64isar1_xs), MRS_FIELD_HWCAP(ID_AA64ISAR1, I8MM, false, MRS_LOWER, id_aa64isar1_i8mm, id_aa64isar1_i8mm_caps), MRS_FIELD_HWCAP(ID_AA64ISAR1, DGH, false, MRS_LOWER, id_aa64isar1_dgh, diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 1c9ea3b630f4..63188f112f51 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -677,11 +677,11 @@ /* ID_AA64ISAR1_EL1 */ #define ID_AA64ISAR1_EL1 MRS_REG(ID_AA64ISAR1_EL1) -#define ID_AA64ISAR1_EL1_op0 0x3 -#define ID_AA64ISAR1_EL1_op1 0x0 -#define ID_AA64ISAR1_EL1_CRn 0x0 -#define ID_AA64ISAR1_EL1_CRm 0x6 -#define ID_AA64ISAR1_EL1_op2 0x1 +#define ID_AA64ISAR1_EL1_op0 3 +#define ID_AA64ISAR1_EL1_op1 0 +#define ID_AA64ISAR1_EL1_CRn 0 +#define ID_AA64ISAR1_EL1_CRm 6 +#define ID_AA64ISAR1_EL1_op2 1 #define ID_AA64ISAR1_DPB_SHIFT 0 #define ID_AA64ISAR1_DPB_MASK (UL(0xf) << ID_AA64ISAR1_DPB_SHIFT) #define ID_AA64ISAR1_DPB_VAL(x) ((x) & ID_AA64ISAR1_DPB_MASK) @@ -752,6 +752,7 @@ #define ID_AA64ISAR1_BF16_VAL(x) ((x) & ID_AA64ISAR1_BF16_MASK) #define ID_AA64ISAR1_BF16_NONE (UL(0x0) << ID_AA64ISAR1_BF16_SHIFT) #define ID_AA64ISAR1_BF16_IMPL (UL(0x1) << ID_AA64ISAR1_BF16_SHIFT) +#define ID_AA64ISAR1_BF16_EBF (UL(0x2) << ID_AA64ISAR1_BF16_SHIFT) #define ID_AA64ISAR1_DGH_SHIFT 48 #define ID_AA64ISAR1_DGH_MASK (UL(0xf) << ID_AA64ISAR1_DGH_SHIFT) #define ID_AA64ISAR1_DGH_VAL(x) ((x) & ID_AA64ISAR1_DGH_MASK) @@ -762,6 +763,18 @@ #define ID_AA64ISAR1_I8MM_VAL(x) ((x) & ID_AA64ISAR1_I8MM_MASK) #define ID_AA64ISAR1_I8MM_NONE (UL(0x0) << ID_AA64ISAR1_I8MM_SHIFT) #define ID_AA64ISAR1_I8MM_IMPL (UL(0x1) << ID_AA64ISAR1_I8MM_SHIFT) +#define ID_AA64ISAR1_XS_SHIFT 56 +#define ID_AA64ISAR1_XS_MASK (UL(0xf) << ID_AA64ISAR1_XS_SHIFT) +#define ID_AA64ISAR1_XS_VAL(x) ((x) & ID_AA64ISAR1_XS_MASK) +#define ID_AA64ISAR1_XS_NONE (UL(0x0) << ID_AA64ISAR1_XS_SHIFT) +#define ID_AA64ISAR1_XS_IMPL (UL(0x1) << ID_AA64ISAR1_XS_SHIFT) +#define ID_AA64ISAR1_LS64_SHIFT 60 +#define ID_AA64ISAR1_LS64_MASK (UL(0xf) << ID_AA64ISAR1_LS64_SHIFT) +#define ID_AA64ISAR1_LS64_VAL(x) ((x) & ID_AA64ISAR1_LS64_MASK) +#define ID_AA64ISAR1_LS64_NONE (UL(0x0) << ID_AA64ISAR1_LS64_SHIFT) +#define ID_AA64ISAR1_LS64_IMPL (UL(0x1) << ID_AA64ISAR1_LS64_SHIFT) +#define ID_AA64ISAR1_LS64_V (UL(0x2) << ID_AA64ISAR1_LS64_SHIFT) +#define ID_AA64ISAR1_LS64_ACCDATA (UL(0x3) << ID_AA64ISAR1_LS64_SHIFT) /* ID_AA64ISAR2_EL1 */ #define ID_AA64ISAR2_EL1 MRS_REG(ID_AA64ISAR2_EL1) From nobody Mon Sep 25 11:01:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg81HQVz4vNSS; Mon, 25 Sep 2023 11:01: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 4RvKg75T10z3NDB; Mon, 25 Sep 2023 11:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUil9SdIVpHcsd4G+xcaltGmwcDUXdctp71mTExkjWU=; b=TTRFAUKDxwBqF7RFvOM2s4Xmh9s9gtLxUZA7Kmx81Ja0Rr4AqIkuE8AcelRHVsD0mxdsxB SZB9OnbNuyh9TO4LBvbzytdmLT2QKmSVAoh1H/ivm6H7IkCtoNRT4ol2rBj3hO7EFp+RRl +g0SWQMF6qtnm+TPBRBtrz7dLcCT5rTJBuBmc9IrkVyL3dtDcDlVKJARSoE7XGKZqCU+ON dvVgLEiA+7ZkJujUzvvKCsd9XXlcLKr56hcC6WLT2zkAiX5SwzWb82LkDs0mjfMmIszbyu D3f9JzIRGQflcYtQp4nDUSUZfBv//2A9LSvQ5Ot2IXa41cIYpWj3o0k/gVa8Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639667; a=rsa-sha256; cv=none; b=GhpJmmOG+D/m6gikcKkwWCvZpfYX86ufUyhQdjDDpSj8TeUy/BBCitMZC8VFMrDBUsrmeY Fo5H5jgKAbI1G2pOviXpxjg7tQ4DwW/ZUJWJIicEC1/l9bLxKMelB/Fmd2BFyZbBKmgTmv ATwubkZlND7tJVpCKqYK4vVthIhXb6OhPWicCL9HYDrSx202hTfxa1726B6OEmhmzgFdkG 7MTQeMX1L534VBva+SvrOWS3SE2cB7A+tj1kNRLiS2vhP146hq23sx9AvzDkwR5Al3Fa2/ VSVVoGuJ96edutXpL228gSFRz2PLwm6j01tH2A2Nqjnaq2fX/gKbmsvvsfsh3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUil9SdIVpHcsd4G+xcaltGmwcDUXdctp71mTExkjWU=; b=Sn+y5mE3ELKOLla2Ph5a7Uhmg+WjZ9rcP8rwTQJDqvrNVpiSCK7jXwzAUCLgtsD6+ff7/Z VpoJLQesvh7ypI68A1mcGwk6i6dWJVYxECwjKncxKZeuNmlqrndH0fVJr3Do0ExQHwMe8u 4HCGssGSfaHv34/gXf43IyvX006Hy/q6xKmae/LmV2aZU74RKax7N+Nm0MlKdNrvLDK/AE CUO6QCJwdYQlTRIwqWkaiVDYtyt1kkN9o0PwnAflSmpcmIuXfrP6a5IxHLrkaMQh1uqVmg R2GeiCmthT5sJNDbFuWRLIj+wI85fPzGl7nzhuyusg9884636GPz0j1BTDJxNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg74JPqz1QL8; Mon, 25 Sep 2023 11:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB176K053347; Mon, 25 Sep 2023 11:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB17XY053344; Mon, 25 Sep 2023 11:01:07 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:07 GMT Message-Id: <202309251101.38PB17XY053344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 2d4962e21295 - stable/13 - arm64: Update the ID_AA64MMFR0_EL1 fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2d4962e212955b8345769a8549c19925aea0ae7b Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2d4962e212955b8345769a8549c19925aea0ae7b commit 2d4962e212955b8345769a8549c19925aea0ae7b Author: Andrew Turner AuthorDate: 2023-07-06 12:34:28 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:33 +0000 arm64: Update the ID_AA64MMFR0_EL1 fields While here move to decimal for the _op and _CR definitions to be used by a future macro to define the register when the assembler doesn't know about it. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40890 (cherry picked from commit b21402d058755f4b33a82fa8024fbf4501f5a218) --- sys/arm64/arm64/identcpu.c | 19 ++++++++++++++++++- sys/arm64/include/armreg.h | 35 +++++++++++++++++++++++++---------- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 663e465d4149..ace134146a54 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -881,6 +881,17 @@ static const struct mrs_field id_aa64isar2_fields[] = { /* ID_AA64MMFR0_EL1 */ +static const struct mrs_field_value id_aa64mmfr0_ecv[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, ECV, NONE, IMPL), + MRS_FIELD_VALUE(ID_AA64MMFR0_ECV_CNTHCTL, "ECV+CNTHCTL"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64mmfr0_fgt[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, FGT, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + static const struct mrs_field_value id_aa64mmfr0_exs[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, ExS, ALL, IMPL), MRS_FIELD_VALUE_END, @@ -890,6 +901,7 @@ static const struct mrs_field_value id_aa64mmfr0_tgran4_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_TGran4, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_NONE, "No S2 TGran4"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_IMPL, "S2 TGran4"), + MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_LPA2, "S2 TGran4+LPA2"), MRS_FIELD_VALUE_END, }; @@ -904,11 +916,13 @@ static const struct mrs_field_value id_aa64mmfr0_tgran16_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_TGran16, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_NONE, "No S2 TGran16"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_IMPL, "S2 TGran16"), + MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_LPA2, "S2 TGran16+LPA2"), MRS_FIELD_VALUE_END, }; static const struct mrs_field_value id_aa64mmfr0_tgran4[] = { - MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran4,NONE, IMPL), + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran4, NONE, IMPL), + MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_LPA2, "TGran4+LPA2"), MRS_FIELD_VALUE_END, }; @@ -919,6 +933,7 @@ static const struct mrs_field_value id_aa64mmfr0_tgran64[] = { static const struct mrs_field_value id_aa64mmfr0_tgran16[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran16, NONE, IMPL), + MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_LPA2, "TGran16+LPA2"), MRS_FIELD_VALUE_END, }; @@ -955,6 +970,8 @@ static const struct mrs_field_value id_aa64mmfr0_parange[] = { }; static const struct mrs_field id_aa64mmfr0_fields[] = { + MRS_FIELD(ID_AA64MMFR0, ECV, false, MRS_EXACT, id_aa64mmfr0_ecv), + MRS_FIELD(ID_AA64MMFR0, FGT, false, MRS_EXACT, id_aa64mmfr0_fgt), MRS_FIELD(ID_AA64MMFR0, ExS, false, MRS_EXACT, id_aa64mmfr0_exs), MRS_FIELD(ID_AA64MMFR0, TGran4_2, false, MRS_EXACT, id_aa64mmfr0_tgran4_2), diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 63188f112f51..aeb2b8d2e8f3 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -825,11 +825,11 @@ /* ID_AA64MMFR0_EL1 */ #define ID_AA64MMFR0_EL1 MRS_REG(ID_AA64MMFR0_EL1) -#define ID_AA64MMFR0_EL1_op0 0x3 -#define ID_AA64MMFR0_EL1_op1 0x0 -#define ID_AA64MMFR0_EL1_CRn 0x0 -#define ID_AA64MMFR0_EL1_CRm 0x7 -#define ID_AA64MMFR0_EL1_op2 0x0 +#define ID_AA64MMFR0_EL1_op0 3 +#define ID_AA64MMFR0_EL1_op1 0 +#define ID_AA64MMFR0_EL1_CRn 0 +#define ID_AA64MMFR0_EL1_CRm 7 +#define ID_AA64MMFR0_EL1_op2 0 #define ID_AA64MMFR0_PARange_SHIFT 0 #define ID_AA64MMFR0_PARange_MASK (UL(0xf) << ID_AA64MMFR0_PARange_SHIFT) #define ID_AA64MMFR0_PARange_VAL(x) ((x) & ID_AA64MMFR0_PARange_MASK) @@ -865,6 +865,7 @@ #define ID_AA64MMFR0_TGran16_VAL(x) ((x) & ID_AA64MMFR0_TGran16_MASK) #define ID_AA64MMFR0_TGran16_NONE (UL(0x0) << ID_AA64MMFR0_TGran16_SHIFT) #define ID_AA64MMFR0_TGran16_IMPL (UL(0x1) << ID_AA64MMFR0_TGran16_SHIFT) +#define ID_AA64MMFR0_TGran16_LPA2 (UL(0x2) << ID_AA64MMFR0_TGran16_SHIFT) #define ID_AA64MMFR0_TGran64_SHIFT 24 #define ID_AA64MMFR0_TGran64_MASK (UL(0xf) << ID_AA64MMFR0_TGran64_SHIFT) #define ID_AA64MMFR0_TGran64_VAL(x) ((x) & ID_AA64MMFR0_TGran64_MASK) @@ -874,6 +875,7 @@ #define ID_AA64MMFR0_TGran4_MASK (UL(0xf) << ID_AA64MMFR0_TGran4_SHIFT) #define ID_AA64MMFR0_TGran4_VAL(x) ((x) & ID_AA64MMFR0_TGran4_MASK) #define ID_AA64MMFR0_TGran4_IMPL (UL(0x0) << ID_AA64MMFR0_TGran4_SHIFT) +#define ID_AA64MMFR0_TGran4_LPA2 (UL(0x1) << ID_AA64MMFR0_TGran4_SHIFT) #define ID_AA64MMFR0_TGran4_NONE (UL(0xf) << ID_AA64MMFR0_TGran4_SHIFT) #define ID_AA64MMFR0_TGran16_2_SHIFT 32 #define ID_AA64MMFR0_TGran16_2_MASK (UL(0xf) << ID_AA64MMFR0_TGran16_2_SHIFT) @@ -881,6 +883,7 @@ #define ID_AA64MMFR0_TGran16_2_TGran16 (UL(0x0) << ID_AA64MMFR0_TGran16_2_SHIFT) #define ID_AA64MMFR0_TGran16_2_NONE (UL(0x1) << ID_AA64MMFR0_TGran16_2_SHIFT) #define ID_AA64MMFR0_TGran16_2_IMPL (UL(0x2) << ID_AA64MMFR0_TGran16_2_SHIFT) +#define ID_AA64MMFR0_TGran16_2_LPA2 (UL(0x3) << ID_AA64MMFR0_TGran16_2_SHIFT) #define ID_AA64MMFR0_TGran64_2_SHIFT 36 #define ID_AA64MMFR0_TGran64_2_MASK (UL(0xf) << ID_AA64MMFR0_TGran64_2_SHIFT) #define ID_AA64MMFR0_TGran64_2_VAL(x) ((x) & ID_AA64MMFR0_TGran64_2_MASK) @@ -893,19 +896,31 @@ #define ID_AA64MMFR0_TGran4_2_TGran4 (UL(0x0) << ID_AA64MMFR0_TGran4_2_SHIFT) #define ID_AA64MMFR0_TGran4_2_NONE (UL(0x1) << ID_AA64MMFR0_TGran4_2_SHIFT) #define ID_AA64MMFR0_TGran4_2_IMPL (UL(0x2) << ID_AA64MMFR0_TGran4_2_SHIFT) +#define ID_AA64MMFR0_TGran4_2_LPA2 (UL(0x3) << ID_AA64MMFR0_TGran4_2_SHIFT) #define ID_AA64MMFR0_ExS_SHIFT 44 #define ID_AA64MMFR0_ExS_MASK (UL(0xf) << ID_AA64MMFR0_ExS_SHIFT) #define ID_AA64MMFR0_ExS_VAL(x) ((x) & ID_AA64MMFR0_ExS_MASK) #define ID_AA64MMFR0_ExS_ALL (UL(0x0) << ID_AA64MMFR0_ExS_SHIFT) #define ID_AA64MMFR0_ExS_IMPL (UL(0x1) << ID_AA64MMFR0_ExS_SHIFT) +#define ID_AA64MMFR0_FGT_SHIFT 56 +#define ID_AA64MMFR0_FGT_MASK (UL(0xf) << ID_AA64MMFR0_FGT_SHIFT) +#define ID_AA64MMFR0_FGT_VAL(x) ((x) & ID_AA64MMFR0_FGT_MASK) +#define ID_AA64MMFR0_FGT_NONE (UL(0x0) << ID_AA64MMFR0_FGT_SHIFT) +#define ID_AA64MMFR0_FGT_IMPL (UL(0x1) << ID_AA64MMFR0_FGT_SHIFT) +#define ID_AA64MMFR0_ECV_SHIFT 60 +#define ID_AA64MMFR0_ECV_MASK (UL(0xf) << ID_AA64MMFR0_ECV_SHIFT) +#define ID_AA64MMFR0_ECV_VAL(x) ((x) & ID_AA64MMFR0_ECV_MASK) +#define ID_AA64MMFR0_ECV_NONE (UL(0x0) << ID_AA64MMFR0_ECV_SHIFT) +#define ID_AA64MMFR0_ECV_IMPL (UL(0x1) << ID_AA64MMFR0_ECV_SHIFT) +#define ID_AA64MMFR0_ECV_CNTHCTL (UL(0x2) << ID_AA64MMFR0_ECV_SHIFT) /* ID_AA64MMFR1_EL1 */ #define ID_AA64MMFR1_EL1 MRS_REG(ID_AA64MMFR1_EL1) -#define ID_AA64MMFR1_EL1_op0 0x3 -#define ID_AA64MMFR1_EL1_op1 0x0 -#define ID_AA64MMFR1_EL1_CRn 0x0 -#define ID_AA64MMFR1_EL1_CRm 0x7 -#define ID_AA64MMFR1_EL1_op2 0x1 +#define ID_AA64MMFR1_EL1_op0 3 +#define ID_AA64MMFR1_EL1_op1 0 +#define ID_AA64MMFR1_EL1_CRn 0 +#define ID_AA64MMFR1_EL1_CRm 7 +#define ID_AA64MMFR1_EL1_op2 1 #define ID_AA64MMFR1_HAFDBS_SHIFT 0 #define ID_AA64MMFR1_HAFDBS_MASK (UL(0xf) << ID_AA64MMFR1_HAFDBS_SHIFT) #define ID_AA64MMFR1_HAFDBS_VAL(x) ((x) & ID_AA64MMFR1_HAFDBS_MASK) From nobody Mon Sep 25 11:01:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKg907Qxz4vNNk; Mon, 25 Sep 2023 11:01: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 4RvKg86QDjz3NB1; Mon, 25 Sep 2023 11:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q0xZ+dTG/70o0VrW3XNL2OL6nduN3uqjYHfayTG51ho=; b=V+lp4ppZqwU6Y9G6VDMaG18da149uG/89d8PnaM+bDvb60Yi7eLUu73erT4HmAVULTtI/N GFL8qblPbB9EMVdwKfxPaj4eq7cvWTk8CK0k7R5OkZ+gw2YVXYjatGJz85iB0cl+iEPrR1 ZEjCrSpRkvPPZR0LEsi/T8poVmfomXS5mIyIx19sDtDJ4G3oYiLZ+AiNcYJR/gDelMEnHQ Dfa5IGesxrH8ZRF2ySQABamS//jdUw8USUAxfn7xqGUs3RP6i1hKv1NSXjMIUHAoEDTbf4 kr1eJjQM53vfgQDNcNzpErq1+qRox0o2lRZMKdU95iVgnpxXLI4laNayfHLZvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639668; a=rsa-sha256; cv=none; b=KV98RVCZKBCZKZUZHjySRfMeD0c3OnO5U/9d6/p6K24w2HarsdR/nZquXhu+zgH4bH8cBN mreALi60Mdtww4HPrWAcJu6NmenJcOEgzacmdpE0+aErU1NR8T+GLYNwvzTZ9u37rogKVD ckZYKrqZ6cYop9Y1tto0o6t6z6Tt1uizl3s+t67gTulOdzaHAkw9R1KWNkgRKNtn38XJp0 rbxG4aj2XrVuAH8wjUQlCo1EWsK+i/os0S93dMQ7Tjkgs3hG6SMhYXvm8i4L1SdvPkLMex NjB5HNtfG013pMRohi5k2k1r6JNQK7f45Zj5lxBbkVJ1qPcyCT8h3iGSBBqoKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q0xZ+dTG/70o0VrW3XNL2OL6nduN3uqjYHfayTG51ho=; b=VTvT+Ut1We6YDdmK2N57Qo9dGjEXicB6c3OayO2yIkGA5KK9tAadWm9uehwLjR227t8teH cEVaFKETxVE2ycbYtvy2UU65B3yBGPYgsZLgPFeOwOQ4RUnSRMvXcUnlX68v2jE0eHvTRV WzGBNk4/LKfpnCPmvH32L+xowMrAgwO4dJiPW8AcCpJ6AZ2XEbiVNapuOMGbYunGV/hSAm YPQHiukksBr3AJGW/FTUJUsOjzcRv5mxqa4l0tvF1ZL/zUqr3n0wtknsL01A8tIbyw0an8 dbxjRStXVurtnHdO2JtRngzRUvn+OQvSC7xGF0ViGG33W5+KAg4ImAjZ4Uq0iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg85WLvz1Q5w; Mon, 25 Sep 2023 11:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB18ZL053394; Mon, 25 Sep 2023 11:01:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB18i2053391; Mon, 25 Sep 2023 11:01:08 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:08 GMT Message-Id: <202309251101.38PB18i2053391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 4095670230c5 - stable/13 - arm64: Update the ID_AA64MMFR1_EL1 fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4095670230c5ebdf19dc25ad479034d99d3ee203 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4095670230c5ebdf19dc25ad479034d99d3ee203 commit 4095670230c5ebdf19dc25ad479034d99d3ee203 Author: Andrew Turner AuthorDate: 2023-07-06 13:11:29 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:33 +0000 arm64: Update the ID_AA64MMFR1_EL1 fields Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40891 (cherry picked from commit 284f91de8b43a5d66fbd484d6cb5ab2d86e822d1) --- sys/arm64/arm64/identcpu.c | 43 +++++++++++++++++++++++++++++++++++++++++++ sys/arm64/include/armreg.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index ace134146a54..06d1f9478426 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -997,6 +997,41 @@ static const struct mrs_field id_aa64mmfr0_fields[] = { /* ID_AA64MMFR1_EL1 */ +static const struct mrs_field_value id_aa64mmfr1_cmovw[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, CMOVW, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64mmfr1_tidcp1[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, TIDCP1, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64mmfr1_ntlbpa[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, nTLBPA, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64mmfr1_afp[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, AFP, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64mmfr1_hcx[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, HCX, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64mmfr1_ets[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, ETS, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64mmfr1_twed[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, TWED, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + static const struct mrs_field_value id_aa64mmfr1_xnx[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, XNX, NONE, IMPL), MRS_FIELD_VALUE_END, @@ -1010,6 +1045,7 @@ static const struct mrs_field_value id_aa64mmfr1_specsei[] = { static const struct mrs_field_value id_aa64mmfr1_pan[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, PAN, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64MMFR1_PAN_ATS1E1, "PAN+ATS1E1"), + MRS_FIELD_VALUE(ID_AA64MMFR1_PAN_EPAN, "EPAN"), MRS_FIELD_VALUE_END, }; @@ -1044,6 +1080,13 @@ static const struct mrs_field_value id_aa64mmfr1_hafdbs[] = { }; static const struct mrs_field id_aa64mmfr1_fields[] = { + MRS_FIELD(ID_AA64MMFR1, CMOVW, false, MRS_EXACT, id_aa64mmfr1_cmovw), + MRS_FIELD(ID_AA64MMFR1, TIDCP1, false, MRS_EXACT, id_aa64mmfr1_tidcp1), + MRS_FIELD(ID_AA64MMFR1, nTLBPA, false, MRS_EXACT, id_aa64mmfr1_ntlbpa), + MRS_FIELD(ID_AA64MMFR1, AFP, false, MRS_EXACT, id_aa64mmfr1_afp), + MRS_FIELD(ID_AA64MMFR1, HCX, false, MRS_EXACT, id_aa64mmfr1_hcx), + MRS_FIELD(ID_AA64MMFR1, ETS, false, MRS_EXACT, id_aa64mmfr1_ets), + MRS_FIELD(ID_AA64MMFR1, TWED, false, MRS_EXACT, id_aa64mmfr1_twed), MRS_FIELD(ID_AA64MMFR1, XNX, false, MRS_EXACT, id_aa64mmfr1_xnx), MRS_FIELD(ID_AA64MMFR1, SpecSEI, false, MRS_EXACT, id_aa64mmfr1_specsei), diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index aeb2b8d2e8f3..afaf9407217b 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -954,6 +954,7 @@ #define ID_AA64MMFR1_PAN_NONE (UL(0x0) << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_PAN_IMPL (UL(0x1) << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_PAN_ATS1E1 (UL(0x2) << ID_AA64MMFR1_PAN_SHIFT) +#define ID_AA64MMFR1_PAN_EPAN (UL(0x2) << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_SpecSEI_SHIFT 24 #define ID_AA64MMFR1_SpecSEI_MASK (UL(0xf) << ID_AA64MMFR1_SpecSEI_SHIFT) #define ID_AA64MMFR1_SpecSEI_VAL(x) ((x) & ID_AA64MMFR1_SpecSEI_MASK) @@ -964,6 +965,41 @@ #define ID_AA64MMFR1_XNX_VAL(x) ((x) & ID_AA64MMFR1_XNX_MASK) #define ID_AA64MMFR1_XNX_NONE (UL(0x0) << ID_AA64MMFR1_XNX_SHIFT) #define ID_AA64MMFR1_XNX_IMPL (UL(0x1) << ID_AA64MMFR1_XNX_SHIFT) +#define ID_AA64MMFR1_TWED_SHIFT 32 +#define ID_AA64MMFR1_TWED_MASK (UL(0xf) << ID_AA64MMFR1_TWED_SHIFT) +#define ID_AA64MMFR1_TWED_VAL(x) ((x) & ID_AA64MMFR1_TWED_MASK) +#define ID_AA64MMFR1_TWED_NONE (UL(0x0) << ID_AA64MMFR1_TWED_SHIFT) +#define ID_AA64MMFR1_TWED_IMPL (UL(0x1) << ID_AA64MMFR1_TWED_SHIFT) +#define ID_AA64MMFR1_ETS_SHIFT 36 +#define ID_AA64MMFR1_ETS_MASK (UL(0xf) << ID_AA64MMFR1_ETS_SHIFT) +#define ID_AA64MMFR1_ETS_VAL(x) ((x) & ID_AA64MMFR1_ETS_MASK) +#define ID_AA64MMFR1_ETS_NONE (UL(0x0) << ID_AA64MMFR1_ETS_SHIFT) +#define ID_AA64MMFR1_ETS_IMPL (UL(0x1) << ID_AA64MMFR1_ETS_SHIFT) +#define ID_AA64MMFR1_HCX_SHIFT 40 +#define ID_AA64MMFR1_HCX_MASK (UL(0xf) << ID_AA64MMFR1_HCX_SHIFT) +#define ID_AA64MMFR1_HCX_VAL(x) ((x) & ID_AA64MMFR1_HCX_MASK) +#define ID_AA64MMFR1_HCX_NONE (UL(0x0) << ID_AA64MMFR1_HCX_SHIFT) +#define ID_AA64MMFR1_HCX_IMPL (UL(0x1) << ID_AA64MMFR1_HCX_SHIFT) +#define ID_AA64MMFR1_AFP_SHIFT 44 +#define ID_AA64MMFR1_AFP_MASK (UL(0xf) << ID_AA64MMFR1_AFP_SHIFT) +#define ID_AA64MMFR1_AFP_VAL(x) ((x) & ID_AA64MMFR1_AFP_MASK) +#define ID_AA64MMFR1_AFP_NONE (UL(0x0) << ID_AA64MMFR1_AFP_SHIFT) +#define ID_AA64MMFR1_AFP_IMPL (UL(0x1) << ID_AA64MMFR1_AFP_SHIFT) +#define ID_AA64MMFR1_nTLBPA_SHIFT 48 +#define ID_AA64MMFR1_nTLBPA_MASK (UL(0xf) << ID_AA64MMFR1_nTLBPA_SHIFT) +#define ID_AA64MMFR1_nTLBPA_VAL(x) ((x) & ID_AA64MMFR1_nTLBPA_MASK) +#define ID_AA64MMFR1_nTLBPA_NONE (UL(0x0) << ID_AA64MMFR1_nTLBPA_SHIFT) +#define ID_AA64MMFR1_nTLBPA_IMPL (UL(0x1) << ID_AA64MMFR1_nTLBPA_SHIFT) +#define ID_AA64MMFR1_TIDCP1_SHIFT 52 +#define ID_AA64MMFR1_TIDCP1_MASK (UL(0xf) << ID_AA64MMFR1_TIDCP1_SHIFT) +#define ID_AA64MMFR1_TIDCP1_VAL(x) ((x) & ID_AA64MMFR1_TIDCP1_MASK) +#define ID_AA64MMFR1_TIDCP1_NONE (UL(0x0) << ID_AA64MMFR1_TIDCP1_SHIFT) +#define ID_AA64MMFR1_TIDCP1_IMPL (UL(0x1) << ID_AA64MMFR1_TIDCP1_SHIFT) +#define ID_AA64MMFR1_CMOVW_SHIFT 56 +#define ID_AA64MMFR1_CMOVW_MASK (UL(0xf) << ID_AA64MMFR1_CMOVW_SHIFT) +#define ID_AA64MMFR1_CMOVW_VAL(x) ((x) & ID_AA64MMFR1_CMOVW_MASK) +#define ID_AA64MMFR1_CMOVW_NONE (UL(0x0) << ID_AA64MMFR1_CMOVW_SHIFT) +#define ID_AA64MMFR1_CMOVW_IMPL (UL(0x1) << ID_AA64MMFR1_CMOVW_SHIFT) /* ID_AA64MMFR2_EL1 */ #define ID_AA64MMFR2_EL1 MRS_REG(ID_AA64MMFR2_EL1) From nobody Mon Sep 25 11:01:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKgB1C4mz4vNh0; Mon, 25 Sep 2023 11:01: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 4RvKgB0Kz0z3NBm; Mon, 25 Sep 2023 11:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jBppG5loPkFk8cJoV5cMl/wXMhX79b+hlq0lvtG2GoI=; b=ZBXUNfSt53Sp4fLbT7CXf3tWEXXEhaYkJ6nQldodMw7bG09AP2uM0Omfy0K71YFPPON+s+ FJj0DNP4g/IlOXMPkXNY+bljQG4xvzSQeVRA3xjpn6HbbptxGFtwWEP88wqjZh4vSEWgo+ VCXUqW2esErMjhaYdTWFnQWY1h/+8MmQh+OVPBW3p6lChED1/f8hfhsm5qpnarY4fqGH9W EJ2qbp9TKobZkgR5ZWFlnG0FSKMRFMWUUsZpSuuvhexyB5Nvx/AfyAkKsgTkFxNn78gGSO mANeziTPQPjlmStYBrQiVlJRZWrjuXVeOebbID0SW59zZsywns1lIJ29XR8B/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639670; a=rsa-sha256; cv=none; b=eUITSPW08WLXEHG2wQDao6gNQue1X1XfH4udAXMwb6xdH10JAr5916RzofZnyoeCUq4lVL fqH0h0ZGW7MdkD+h7PGKyrrV6lew6xA6o3jr+BpKBgduvuB5+iWINYFxCoW0o3uTj0XbKg zAeFhGkv1xgUan0ysOo9cwyBpoemUi8OhCPAls5ZoWiIjPBJ2Uvg4t+05mYalhUQjrveef HAw0G3fO0y5/t7NLrF0p73k4ezW+g9z9pcmmkYFxASCnWO1Nen+BQ7nE+zJQZFd1vU0Cyr DHOXhK/wbu3ZM2HjnuCLc5hXh3CWcHAIjzfjWv6GH8C4/uAa6XBB/iNiuYpZKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jBppG5loPkFk8cJoV5cMl/wXMhX79b+hlq0lvtG2GoI=; b=vG8p4fyzYvWapRCVy0gzYrc7uZR193LGCnG73XGnQX9iv9/Qfg59kAvbaydh38OWEH2zm9 YsrBkpVJRLyj+ksG9yVguuQyChJR4qOGnpXkFW8DufK1kGkuC4Qjozi14eDbkGmUWqnY+e bJZchyq8wJkId6+VoDYGIrJ5FmXXDSnSaQ+KAv7ar3vktGDd8wuM+r938e0hJmKI3Om11+ 0iMC62g7rABFq2DnfQ8fRQE4pVyy5Jfl51zLkaW0+l5kVJww2ksrdcpJtbsKD0gDN2L+mV LqYf5rtwBbsY50zWtVYD+ys1/JltX3ekRdFV/uO2uHWLoHiWggpWhv3RMmuWBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKg96PNvz1Q8H; Mon, 25 Sep 2023 11:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB19mA053439; Mon, 25 Sep 2023 11:01:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB19s4053436; Mon, 25 Sep 2023 11:01:09 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:09 GMT Message-Id: <202309251101.38PB19s4053436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: e887138417fd - stable/13 - arm64: Don't use hex for ID_AA64MMFR2_EL1_op/CR* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e887138417fd73837b3b6f242a8e765046e1517a Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e887138417fd73837b3b6f242a8e765046e1517a commit e887138417fd73837b3b6f242a8e765046e1517a Author: Andrew Turner AuthorDate: 2023-07-06 13:15:12 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:33 +0000 arm64: Don't use hex for ID_AA64MMFR2_EL1_op/CR* It breaks a future macro that creates the alternative register name for old compilers. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40892 (cherry picked from commit 2134cfe793d67e3bc6ec0713862168452f4ad8f0) --- sys/arm64/include/armreg.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index afaf9407217b..80828259f23a 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -1003,11 +1003,11 @@ /* ID_AA64MMFR2_EL1 */ #define ID_AA64MMFR2_EL1 MRS_REG(ID_AA64MMFR2_EL1) -#define ID_AA64MMFR2_EL1_op0 0x3 -#define ID_AA64MMFR2_EL1_op1 0x0 -#define ID_AA64MMFR2_EL1_CRn 0x0 -#define ID_AA64MMFR2_EL1_CRm 0x7 -#define ID_AA64MMFR2_EL1_op2 0x2 +#define ID_AA64MMFR2_EL1_op0 3 +#define ID_AA64MMFR2_EL1_op1 0 +#define ID_AA64MMFR2_EL1_CRn 0 +#define ID_AA64MMFR2_EL1_CRm 7 +#define ID_AA64MMFR2_EL1_op2 2 #define ID_AA64MMFR2_CnP_SHIFT 0 #define ID_AA64MMFR2_CnP_MASK (UL(0xf) << ID_AA64MMFR2_CnP_SHIFT) #define ID_AA64MMFR2_CnP_VAL(x) ((x) & ID_AA64MMFR2_CnP_MASK) From nobody Mon Sep 25 11:01:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKgC3Xdqz4vNh4; Mon, 25 Sep 2023 11:01: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 4RvKgC1CqKz3NHS; Mon, 25 Sep 2023 11:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pdx9TXwUjRt6Xd8UUeLzPnJ+XbzIuqxrugZ6C/+vWgc=; b=a5kl/pzuy1dCHfgJRwruqsClJdfmFgJr27TuGYUQu9w3SHZ4aI/SEQxRTS0Svb1tPG06N9 FkOlrGRtrU8Ncb2AWmUzljC+5eaFv/np7ccCbyAwoKPdt/QnTGGnc65byTtVaeggUAsNzW 7x8/3P2t+RYTjBPNG7KJxlPQuU2BzhUw4lsMkYFFCaxKDBZUMB3ky5Gs59FOG1jCFUsHxN Ff3OV+ErQUjBEW/rQch+z7zbit5j5/RfmyDTjyRmV+88VOaFVvix8/YVPClNAviB2XDYmO +zqbcPdRU2R3HOZZh0ayp4dKbqVC5eV2VpY+tq6Lpf86OrH0aX3hZkgt+IXdxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639671; a=rsa-sha256; cv=none; b=n41cG9QCGqTQOKgr72lGiGFGaOfeF2HmCeYbMl6XghYEKbsQyM0FSSKtKJnIiosMMrBxzi 9yPApD/t34QNIINqE29DaZEM/C4vZKIPpNtszzrNOSHS61XJekvsb7W8VSK88Skr+BhmlI CvODFL1hHuoO/vwiHpOnnLUh1tNp5PeGp1GFwYG1Fahi7KHSqkKCUlEOMYvH83js7BySvW riilaBWusv4L09qvK798rV2rqPerBMQvu54YgUd/Mlg3OWoIvl72Pj48LY31JZOiC1q4jc VbjBKu5Xs0R7ryx0dJsL1GyvrBEp4M9LO9Q972Ec0wzSLn71P1rcbzG5VKBfjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pdx9TXwUjRt6Xd8UUeLzPnJ+XbzIuqxrugZ6C/+vWgc=; b=RlTtUvdvoyP1edpki3ktC1hDntKzmUA/e4SOW/lGHw7kPr/otZhavklQETATfiD5v+saEb UzdBpXHD24Jej5ASgo4v7LW/6E2762Vcld4oJ4YiqfNYtBw/CZrRwNh7sxHdXFq2f0+TzY hBtpBueGr9Z3J/q/uPY4mfOSkP83C0x8YO4UUaOmn8Et8iV1UniAX5eiR2CWoqRucj+z0t RGrO/eII1dAxPueTWh0g3Jgu9WF+olNMyRnNhKFYeoBREhsZS2FQpqy/6vSzMjRc5L50Tt sG4QA1vRZDqgpGmbp4uLf5XvwVnytEJvdefk5rbx7ZOQpuDeX5Hki/pnimrLjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKgC0JxVz1QLN; Mon, 25 Sep 2023 11:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB1AF4053481; Mon, 25 Sep 2023 11:01:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB1Ahf053478; Mon, 25 Sep 2023 11:01:10 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:10 GMT Message-Id: <202309251101.38PB1Ahf053478@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 3ef0220e2d0b - stable/13 - arm64: Update the ID_AA64PFR0_EL1 fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3ef0220e2d0b6b0bbfa175c01294a7ab60bbf5c8 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3ef0220e2d0b6b0bbfa175c01294a7ab60bbf5c8 commit 3ef0220e2d0b6b0bbfa175c01294a7ab60bbf5c8 Author: Andrew Turner AuthorDate: 2023-07-06 14:02:35 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 10:49:32 +0000 arm64: Update the ID_AA64PFR0_EL1 fields While here move to decimal for the _op and _CR definitions to be used by a future macro to define the register when the assembler doesn't know about it. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40895 (cherry picked from commit 0766dde9b5587d04c634eda1ab4666203d32a271) --- sys/arm64/arm64/identcpu.c | 10 +++++++++- sys/arm64/include/armreg.h | 17 ++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 06d1f9478426..cd7f8ce7a84f 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1221,7 +1221,13 @@ static const struct mrs_field_value id_aa64pfr0_csv3[] = { static const struct mrs_field_value id_aa64pfr0_csv2[] = { MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_ISOLATED, "CSV2"), - MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_SCXTNUM, "SCXTNUM"), + MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_SCXTNUM, "CSV2_2"), + MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_3, "CSV2_3"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64pfr0_rme[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, RME, NONE, IMPL), MRS_FIELD_VALUE_END, }; @@ -1239,6 +1245,7 @@ static const struct mrs_field_hwcap id_aa64pfr0_dit_caps[] = { static const struct mrs_field_value id_aa64pfr0_amu[] = { MRS_FIELD_VALUE(ID_AA64PFR0_AMU_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_AMU_V1, "AMUv1"), + MRS_FIELD_VALUE(ID_AA64PFR0_AMU_V1_1, "AMUv1p1"), MRS_FIELD_VALUE_END, }; @@ -1331,6 +1338,7 @@ static const struct mrs_field_value id_aa64pfr0_el0[] = { static const struct mrs_field id_aa64pfr0_fields[] = { MRS_FIELD(ID_AA64PFR0, CSV3, false, MRS_EXACT, id_aa64pfr0_csv3), MRS_FIELD(ID_AA64PFR0, CSV2, false, MRS_EXACT, id_aa64pfr0_csv2), + MRS_FIELD(ID_AA64PFR0, RME, false, MRS_EXACT, id_aa64pfr0_rme), MRS_FIELD_HWCAP(ID_AA64PFR0, DIT, false, MRS_LOWER, id_aa64pfr0_dit, id_aa64pfr0_dit_caps), MRS_FIELD(ID_AA64PFR0, AMU, false, MRS_EXACT, id_aa64pfr0_amu), diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 80828259f23a..b54efffeb8c0 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -1089,11 +1089,11 @@ /* ID_AA64PFR0_EL1 */ #define ID_AA64PFR0_EL1 MRS_REG(ID_AA64PFR0_EL1) -#define ID_AA64PFR0_EL1_op0 0x3 -#define ID_AA64PFR0_EL1_op1 0x0 -#define ID_AA64PFR0_EL1_CRn 0x0 -#define ID_AA64PFR0_EL1_CRm 0x4 -#define ID_AA64PFR0_EL1_op2 0x0 +#define ID_AA64PFR0_EL1_op0 3 +#define ID_AA64PFR0_EL1_op1 0 +#define ID_AA64PFR0_EL1_CRn 0 +#define ID_AA64PFR0_EL1_CRm 4 +#define ID_AA64PFR0_EL1_op2 0 #define ID_AA64PFR0_EL0_SHIFT 0 #define ID_AA64PFR0_EL0_MASK (UL(0xf) << ID_AA64PFR0_EL0_SHIFT) #define ID_AA64PFR0_EL0_VAL(x) ((x) & ID_AA64PFR0_EL0_MASK) @@ -1161,17 +1161,24 @@ #define ID_AA64PFR0_AMU_VAL(x) ((x) & ID_AA64PFR0_AMU_MASK) #define ID_AA64PFR0_AMU_NONE (UL(0x0) << ID_AA64PFR0_AMU_SHIFT) #define ID_AA64PFR0_AMU_V1 (UL(0x1) << ID_AA64PFR0_AMU_SHIFT) +#define ID_AA64PFR0_AMU_V1_1 (UL(0x2) << ID_AA64PFR0_AMU_SHIFT) #define ID_AA64PFR0_DIT_SHIFT 48 #define ID_AA64PFR0_DIT_MASK (UL(0xf) << ID_AA64PFR0_DIT_SHIFT) #define ID_AA64PFR0_DIT_VAL(x) ((x) & ID_AA64PFR0_DIT_MASK) #define ID_AA64PFR0_DIT_NONE (UL(0x0) << ID_AA64PFR0_DIT_SHIFT) #define ID_AA64PFR0_DIT_PSTATE (UL(0x1) << ID_AA64PFR0_DIT_SHIFT) +#define ID_AA64PFR0_RME_SHIFT 52 +#define ID_AA64PFR0_RME_MASK (UL(0xf) << ID_AA64PFR0_RME_SHIFT) +#define ID_AA64PFR0_RME_VAL(x) ((x) & ID_AA64PFR0_RME_MASK) +#define ID_AA64PFR0_RME_NONE (UL(0x0) << ID_AA64PFR0_RME_SHIFT) +#define ID_AA64PFR0_RME_IMPL (UL(0x1) << ID_AA64PFR0_RME_SHIFT) #define ID_AA64PFR0_CSV2_SHIFT 56 #define ID_AA64PFR0_CSV2_MASK (UL(0xf) << ID_AA64PFR0_CSV2_SHIFT) #define ID_AA64PFR0_CSV2_VAL(x) ((x) & ID_AA64PFR0_CSV2_MASK) #define ID_AA64PFR0_CSV2_NONE (UL(0x0) << ID_AA64PFR0_CSV2_SHIFT) #define ID_AA64PFR0_CSV2_ISOLATED (UL(0x1) << ID_AA64PFR0_CSV2_SHIFT) #define ID_AA64PFR0_CSV2_SCXTNUM (UL(0x2) << ID_AA64PFR0_CSV2_SHIFT) +#define ID_AA64PFR0_CSV2_3 (UL(0x3) << ID_AA64PFR0_CSV2_SHIFT) #define ID_AA64PFR0_CSV3_SHIFT 60 #define ID_AA64PFR0_CSV3_MASK (UL(0xf) << ID_AA64PFR0_CSV3_SHIFT) #define ID_AA64PFR0_CSV3_VAL(x) ((x) & ID_AA64PFR0_CSV3_MASK) From nobody Mon Sep 25 11:01:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKgD4kyLz4vNdN; Mon, 25 Sep 2023 11:01: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 4RvKgD2LPRz3NS5; Mon, 25 Sep 2023 11:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+chRGKWvwaNuiL9mHbGZfhJj0dpaBiPXA9jJwn2lMJ8=; b=nxoOpWmRMuI1pDMx+ndZyFUxFqVjx35TE1vPbgyp2179wmh80G9fl/kcU+fBjk3RQuaA6+ pSEcQa/lqPlqW5YPIbeYlsmHvsoC+DeJNTsx96SuNufSYlBISqLDouvY2TVpJou+Eg+FQ3 L6xnoknUa5rwQQzgqPFoovQosrZ0sqcQ4G2+N/tFjSaokDRkX/keUCRZeVGMT6M2sKH0uR FwpIlEgPGqbp/XLq6aUOzLXBHgGx0Y/X8o0GK95vMUPMdnpJP5EmMnDaJ+QLCLi9rkV3C5 whJjchsxClDUX6pImx6K33IqM//Ow1I9chRVnYpIQM1J39LJ+BbRkhg5Kpoqzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639672; a=rsa-sha256; cv=none; b=tyo8IVgfU39ozIw2RSvW4fL8ZBQXImQrWL/DEokuwormhf7fhJLp9CBpd0EahEwAJjeQay hClTb6T9eK0BeVmhLB4Zi3xQnOx7M2F4j3KJydslxtrkAkLLpQ5S5hUc5zjKVuJcbRPNGf hZR78l3MM3i6bmNtOHC+3QgYrJnaRHNgmDMxXatKojmWCKGbgLQeh54atMU2A6NYyLBSzB c0RLFy0nB4U03X6r2jUG0dPVULajW72zlqu9qz4iyRMO4GnCyFH3gtTTR8W2XvLwkk3oF1 3xymtsVs6XquwsydpJ4FiPaC9jRUX3ShqaaI07VmoqEbpTKXUgOhrgVF8w+U5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+chRGKWvwaNuiL9mHbGZfhJj0dpaBiPXA9jJwn2lMJ8=; b=npNeszlsbmVZW6jUI9n/Q3XvKXtn1PjK5EQvVa4CahlakNt4o+uhqxR3ZXjqBl6NW9Dqsb XQmfwGEV5H7/jlx1kaSchIIr2xB0R7nuQqSBMB4VyxNuUrWKsbwF8TAo18SlF/+VXhc3w5 37iNAh7g3uBfmTNateyQOqIY7lePaXV8bWoPGr1xdJK1m1MN7kaMz3TjOUB3Jk3fRFzXsm R0cBJf7gj9eyRpbRcLBj0dYAigzrIPw5bUcTLtbpLUlryjIBYOt+jb+Y6QNyE2WtaZ4ZQz 3E/gthNgrTdlwoPwNHgHVeT0dSZ1FS93uBD+Twzm8aEf5LT5+/iM+sUG1Aq1LA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKgD1K55z1Q62; Mon, 25 Sep 2023 11:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB1CdH053527; Mon, 25 Sep 2023 11:01:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB1Csv053524; Mon, 25 Sep 2023 11:01:12 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:12 GMT Message-Id: <202309251101.38PB1Csv053524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: b6cc1a8273e5 - stable/13 - arm64: Update the ID_AA64PFR1_EL1 fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b6cc1a8273e50a0a8583ec942e2d0f707c1a5d40 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b6cc1a8273e50a0a8583ec942e2d0f707c1a5d40 commit b6cc1a8273e50a0a8583ec942e2d0f707c1a5d40 Author: Andrew Turner AuthorDate: 2023-07-06 14:40:01 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 10:49:54 +0000 arm64: Update the ID_AA64PFR1_EL1 fields While here move to decimal for the _op and _CR definitions to be used by a future macro to define the register when the assembler doesn't know about it. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40896 (cherry picked from commit 8c111e5b375897bc298b8cdb3095f3c0e29c2307) --- sys/arm64/arm64/identcpu.c | 51 ++++++++++++++++++++++++++++++++++++++++++++-- sys/arm64/include/armreg.h | 46 +++++++++++++++++++++++++++++++++-------- 2 files changed, 86 insertions(+), 11 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index cd7f8ce7a84f..c46747be1bd5 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1360,10 +1360,47 @@ static const struct mrs_field id_aa64pfr0_fields[] = { /* ID_AA64PFR1_EL1 */ +static const struct mrs_field_value id_aa64pfr1_nmi[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR1, NMI, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64pfr1_csv2_frac[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_CSV2_frac_p0, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_CSV2_frac_p1, "CSV2 p1"), + MRS_FIELD_VALUE(ID_AA64PFR1_CSV2_frac_p2, "CSV2 p2"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64pfr1_rndr_trap[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR1, RNDR_trap, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64pfr1_sme[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_SME_NONE, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_SME_SME, "SME"), + MRS_FIELD_VALUE(ID_AA64PFR1_SME_SME2, "SME2"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64pfr1_mpam_frac[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_MPAM_frac_p0, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_MPAM_frac_p1, "MPAM p1"), + MRS_FIELD_VALUE_END, +}; + +static const struct mrs_field_value id_aa64pfr1_ras_frac[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_RAS_frac_p0, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_RAS_frac_p1, "RAS p1"), + MRS_FIELD_VALUE_END, +}; + static const struct mrs_field_value id_aa64pfr1_mte[] = { MRS_FIELD_VALUE(ID_AA64PFR1_MTE_NONE, ""), - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL_EL0, "MTE EL0"), - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL, "MTE"), + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_MTE, "MTE"), + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_MTE2, "MTE2"), + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_MTE3, "MTE3"), MRS_FIELD_VALUE_END, }; @@ -1394,6 +1431,16 @@ static const struct mrs_field_hwcap id_aa64pfr1_bt_caps[] = { #endif static const struct mrs_field id_aa64pfr1_fields[] = { + MRS_FIELD(ID_AA64PFR1, NMI, false, MRS_EXACT, id_aa64pfr1_nmi), + MRS_FIELD(ID_AA64PFR1, CSV2_frac, false, MRS_EXACT, + id_aa64pfr1_csv2_frac), + MRS_FIELD(ID_AA64PFR1, RNDR_trap, false, MRS_EXACT, + id_aa64pfr1_rndr_trap), + MRS_FIELD(ID_AA64PFR1, SME, false, MRS_EXACT, id_aa64pfr1_sme), + MRS_FIELD(ID_AA64PFR1, MPAM_frac, false, MRS_EXACT, + id_aa64pfr1_mpam_frac), + MRS_FIELD(ID_AA64PFR1, RAS_frac, false, MRS_EXACT, + id_aa64pfr1_ras_frac), MRS_FIELD(ID_AA64PFR1, MTE, false, MRS_EXACT, id_aa64pfr1_mte), MRS_FIELD_HWCAP(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs, id_aa64pfr1_ssbs_caps), diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index b54efffeb8c0..2f2cdf08585a 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -1187,11 +1187,11 @@ /* ID_AA64PFR1_EL1 */ #define ID_AA64PFR1_EL1 MRS_REG(ID_AA64PFR1_EL1) -#define ID_AA64PFR1_EL1_op0 0x3 -#define ID_AA64PFR1_EL1_op1 0x0 -#define ID_AA64PFR1_EL1_CRn 0x0 -#define ID_AA64PFR1_EL1_CRm 0x4 -#define ID_AA64PFR1_EL1_op2 0x1 +#define ID_AA64PFR1_EL1_op0 3 +#define ID_AA64PFR1_EL1_op1 0 +#define ID_AA64PFR1_EL1_CRn 0 +#define ID_AA64PFR1_EL1_CRm 4 +#define ID_AA64PFR1_EL1_op2 1 #define ID_AA64PFR1_BT_SHIFT 0 #define ID_AA64PFR1_BT_MASK (UL(0xf) << ID_AA64PFR1_BT_SHIFT) #define ID_AA64PFR1_BT_VAL(x) ((x) & ID_AA64PFR1_BT_MASK) @@ -1207,13 +1207,41 @@ #define ID_AA64PFR1_MTE_MASK (UL(0xf) << ID_AA64PFR1_MTE_SHIFT) #define ID_AA64PFR1_MTE_VAL(x) ((x) & ID_AA64PFR1_MTE_MASK) #define ID_AA64PFR1_MTE_NONE (UL(0x0) << ID_AA64PFR1_MTE_SHIFT) -#define ID_AA64PFR1_MTE_IMPL_EL0 (UL(0x1) << ID_AA64PFR1_MTE_SHIFT) -#define ID_AA64PFR1_MTE_IMPL (UL(0x2) << ID_AA64PFR1_MTE_SHIFT) +#define ID_AA64PFR1_MTE_MTE (UL(0x1) << ID_AA64PFR1_MTE_SHIFT) +#define ID_AA64PFR1_MTE_MTE2 (UL(0x2) << ID_AA64PFR1_MTE_SHIFT) +#define ID_AA64PFR1_MTE_MTE3 (UL(0x3) << ID_AA64PFR1_MTE_SHIFT) #define ID_AA64PFR1_RAS_frac_SHIFT 12 #define ID_AA64PFR1_RAS_frac_MASK (UL(0xf) << ID_AA64PFR1_RAS_frac_SHIFT) #define ID_AA64PFR1_RAS_frac_VAL(x) ((x) & ID_AA64PFR1_RAS_frac_MASK) -#define ID_AA64PFR1_RAS_frac_V1 (UL(0x0) << ID_AA64PFR1_RAS_frac_SHIFT) -#define ID_AA64PFR1_RAS_frac_V2 (UL(0x1) << ID_AA64PFR1_RAS_frac_SHIFT) +#define ID_AA64PFR1_RAS_frac_p0 (UL(0x0) << ID_AA64PFR1_RAS_frac_SHIFT) +#define ID_AA64PFR1_RAS_frac_p1 (UL(0x1) << ID_AA64PFR1_RAS_frac_SHIFT) +#define ID_AA64PFR1_MPAM_frac_SHIFT 16 +#define ID_AA64PFR1_MPAM_frac_MASK (UL(0xf) << ID_AA64PFR1_MPAM_frac_SHIFT) +#define ID_AA64PFR1_MPAM_frac_VAL(x) ((x) & ID_AA64PFR1_MPAM_frac_MASK) +#define ID_AA64PFR1_MPAM_frac_p0 (UL(0x0) << ID_AA64PFR1_MPAM_frac_SHIFT) +#define ID_AA64PFR1_MPAM_frac_p1 (UL(0x1) << ID_AA64PFR1_MPAM_frac_SHIFT) +#define ID_AA64PFR1_SME_SHIFT 24 +#define ID_AA64PFR1_SME_MASK (UL(0xf) << ID_AA64PFR1_SME_SHIFT) +#define ID_AA64PFR1_SME_VAL(x) ((x) & ID_AA64PFR1_SME_MASK) +#define ID_AA64PFR1_SME_NONE (UL(0x0) << ID_AA64PFR1_SME_SHIFT) +#define ID_AA64PFR1_SME_SME (UL(0x1) << ID_AA64PFR1_SME_SHIFT) +#define ID_AA64PFR1_SME_SME2 (UL(0x2) << ID_AA64PFR1_SME_SHIFT) +#define ID_AA64PFR1_RNDR_trap_SHIFT 28 +#define ID_AA64PFR1_RNDR_trap_MASK (UL(0xf) << ID_AA64PFR1_RNDR_trap_SHIFT) +#define ID_AA64PFR1_RNDR_trap_VAL(x) ((x) & ID_AA64PFR1_RNDR_trap_MASK) +#define ID_AA64PFR1_RNDR_trap_NONE (UL(0x0) << ID_AA64PFR1_RNDR_trap_SHIFT) +#define ID_AA64PFR1_RNDR_trap_IMPL (UL(0x1) << ID_AA64PFR1_RNDR_trap_SHIFT) +#define ID_AA64PFR1_CSV2_frac_SHIFT 32 +#define ID_AA64PFR1_CSV2_frac_MASK (UL(0xf) << ID_AA64PFR1_CSV2_frac_SHIFT) +#define ID_AA64PFR1_CSV2_frac_VAL(x) ((x) & ID_AA64PFR1_CSV2_frac_MASK) +#define ID_AA64PFR1_CSV2_frac_p0 (UL(0x0) << ID_AA64PFR1_CSV2_frac_SHIFT) +#define ID_AA64PFR1_CSV2_frac_p1 (UL(0x1) << ID_AA64PFR1_CSV2_frac_SHIFT) +#define ID_AA64PFR1_CSV2_frac_p2 (UL(0x2) << ID_AA64PFR1_CSV2_frac_SHIFT) +#define ID_AA64PFR1_NMI_SHIFT 36 +#define ID_AA64PFR1_NMI_MASK (UL(0xf) << ID_AA64PFR1_NMI_SHIFT) +#define ID_AA64PFR1_NMI_VAL(x) ((x) & ID_AA64PFR1_NMI_MASK) +#define ID_AA64PFR1_NMI_NONE (UL(0x0) << ID_AA64PFR1_NMI_SHIFT) +#define ID_AA64PFR1_NMI_IMPL (UL(0x1) << ID_AA64PFR1_NMI_SHIFT) /* ID_AA64ZFR0_EL1 */ #define ID_AA64ZFR0_EL1 MRS_REG(ID_AA64ZFR0_EL1) From nobody Mon Sep 25 11:01:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKgF4ZYwz4vNh7; Mon, 25 Sep 2023 11:01: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 4RvKgF2xkfz3NLg; Mon, 25 Sep 2023 11:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mahipoSA2gYWuBN3SSc+VCsCwzoPmSn1qW2ULbZg+ss=; b=Rz/uzlNsSUunN/36fIqpL5IFVp/q7MqnDIzE+j4ebbGwKsIeESukZc+sO1rB+/W6XivXvo oCOuBZX4uKSLfkJYUB0+Wnf/mTBB0R0XarcK1qreGiiEf2aiK4LcXgdc0mljT5VDfVndIH h61SxbiywfQLPTx9o5hIIYjtKln4m0h9oIPuV+bVDhGLMEU+m0U5+/c52rCHRXjBhqoEOj Ji8vCpJ95M8Pb7ZmOxMd5nNQMupQpkChSrcCRoAuxTUJtbaMytD3SvEsshOd7i1v+9DB5S C0ItrvDA6BqAGr1mCeU8E5WurXEVsCkwSIQ4rNGCZhd2KRGiodmPIkXNYxQcAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639673; a=rsa-sha256; cv=none; b=ptHLa574Px0Y/Ae2NATMuSKxynKjeEhOLA8nLqu8cbvV9RfsA0NZNfZ1f1tuGBKrlzZwy/ p2nBCksY4bcSXzx2tGLhUcx+sObf02xL/+fjX9DVwWXdDgqs9JkiJZnIM8ne2tqDMxV6wM FVZUaWmWs/yZwQ1GWkNGbO7Idgz89jKb555EG3lkOdZMXGOWiz+jexolgaS4SVT/LiANfQ MZX0JO03L25Ob+6+Pkn9EfbXmwGn7TeeaRxjELvoD9KRLpqL0Bl5h/PeE+P24nq7eyFgS4 Bgx5xpOp03M2qXQiJNMyI3toDoptE325iilSjy084CJ/ALB/LAgRkL1R2x6odA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mahipoSA2gYWuBN3SSc+VCsCwzoPmSn1qW2ULbZg+ss=; b=nmdWfo/dG2Odw7bXJD+14OJdfDXntPlpGDMizBrl1C24kAkz8ecWbOxmkd045ILp8XBZhe ZjIp+20gjds40aFgT9g6FEc6tDfJ+XXtubQB9y5fCewg6IKvgWRaLcqURcEmYVundelSZi 0bOrsG21qwPR5viXghiMyPF+vGBlwE5CWYd/DJQEzB0Phkb87eanratIr5h3jrym0u9L9i h69wst0Brhu9Hhqcxx2v6CukeKm4Vja//ByxfBXwRhQikBTfQ9x/ao2Z+c8aNqzYX09qXS 6/Wb7xPg51a+Ip8wf1LEHqhbXrNdx8yS/06VLlUtty/OQxw4rms22Bk17L3s6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKgF23DQz1QjV; Mon, 25 Sep 2023 11:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB1DKP053578; Mon, 25 Sep 2023 11:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB1D1n053574; Mon, 25 Sep 2023 11:01:13 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:13 GMT Message-Id: <202309251101.38PB1D1n053574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 90ab0c7356b6 - stable/13 - gicv3: Split out finding the page size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 90ab0c7356b648584303a26b75b3ee793c27436f Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=90ab0c7356b648584303a26b75b3ee793c27436f commit 90ab0c7356b648584303a26b75b3ee793c27436f Author: Andrew Turner AuthorDate: 2023-08-22 10:51:26 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 10:50:14 +0000 gicv3: Split out finding the page size When adding indirect (2 level) tabled we will need to know the page size to calculate the size of the level 1 table. To allow for this find the page size before entering the loop to calculate the final register value. Reviewed by: gallatin, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41551 (cherry picked from commit 3fc4f7c88085dc94c88348839074b8db6f19fae1) --- sys/arm64/arm64/gicv3_its.c | 72 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 14 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 677e40877ac9..2747bf7f4ce3 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -421,6 +421,52 @@ gicv3_its_cmdq_init(struct gicv3_its_softc *sc) gic_its_write_8(sc, GITS_CWRITER, 0x0); } +static int +gicv3_its_table_page_size(struct gicv3_its_softc *sc, int table) +{ + uint64_t reg, tmp; + int page_size; + + page_size = PAGE_SIZE_64K; + reg = gic_its_read_8(sc, GITS_BASER(table)); + + while (1) { + reg &= GITS_BASER_PSZ_MASK; + switch (page_size) { + case PAGE_SIZE_4K: /* 4KB */ + reg |= GITS_BASER_PSZ_4K << GITS_BASER_PSZ_SHIFT; + break; + case PAGE_SIZE_16K: /* 16KB */ + reg |= GITS_BASER_PSZ_16K << GITS_BASER_PSZ_SHIFT; + break; + case PAGE_SIZE_64K: /* 64KB */ + reg |= GITS_BASER_PSZ_64K << GITS_BASER_PSZ_SHIFT; + break; + } + + /* Write the new page size */ + gic_its_write_8(sc, GITS_BASER(table), reg); + + /* Read back to check */ + tmp = gic_its_read_8(sc, GITS_BASER(table)); + + /* The page size is correct */ + if ((tmp & GITS_BASER_PSZ_MASK) == (reg & GITS_BASER_PSZ_MASK)) + return (page_size); + + switch (page_size) { + default: + return (-1); + case PAGE_SIZE_16K: + page_size = PAGE_SIZE_4K; + break; + case PAGE_SIZE_64K: + page_size = PAGE_SIZE_16K; + break; + } + } +} + static int gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) { @@ -457,20 +503,30 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) cache = GITS_BASER_CACHE_WAWB; } share = GITS_BASER_SHARE_IS; - page_size = PAGE_SIZE_64K; for (i = 0; i < GITS_BASER_NUM; i++) { reg = gic_its_read_8(sc, GITS_BASER(i)); /* The type of table */ type = GITS_BASER_TYPE(reg); + if (type == GITS_BASER_TYPE_UNIMPL) + continue; + /* The table entry size */ esize = GITS_BASER_ESIZE(reg); + /* Find the tables page size */ + page_size = gicv3_its_table_page_size(sc, i); + if (page_size == -1) { + device_printf(dev, "No valid page size for table %d\n", + i); + return (EINVAL); + } + switch(type) { case GITS_BASER_TYPE_DEV: nidents = (1 << devbits); its_tbl_size = esize * nidents; - its_tbl_size = roundup2(its_tbl_size, PAGE_SIZE_64K); + its_tbl_size = roundup2(its_tbl_size, page_size); break; case GITS_BASER_TYPE_VP: case GITS_BASER_TYPE_PP: /* Undocumented? */ @@ -537,18 +593,6 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) continue; } - if ((tmp & GITS_BASER_PSZ_MASK) != - (reg & GITS_BASER_PSZ_MASK)) { - switch (page_size) { - case PAGE_SIZE_16K: - page_size = PAGE_SIZE_4K; - continue; - case PAGE_SIZE_64K: - page_size = PAGE_SIZE_16K; - continue; - } - } - if (tmp != reg) { device_printf(dev, "GITS_BASER%d: " "unable to be updated: %lx != %lx\n", From nobody Mon Sep 25 11:01:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKgG4zldz4vNHh; Mon, 25 Sep 2023 11:01: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 4RvKgG47jrz3NQt; Mon, 25 Sep 2023 11:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GD5pxPnS28UxJvocHkNsaeURFfiENT4IR4ETmcuV5C4=; b=CqnwrYWopXpTGnnjV5bj594i2lBvwNq74d6wz/ISYvk5j7TzabL+xvwLIvYMqq3rh8GCnS meoRb2F9mCFt1gaLV5nR2BqgCy/Gd23PuNwBbexoAtjRHvtaeIygTe6K9a6ricqXwtqQ0h VXetEUwe14HRHai2upSJwPSAfMXVzGjgIIPnVmE/A7JgBTyJ6FELQM/5fXZqMQRd6vlzVT I2YHIceVFmPS/yhE4ojy8c8DgfFlWSdAFTke4IBMgOEr29mBZ26Rvz56XmSbmsOummRD0O HcaVp7fGzvIBzAyLZKYF+3rSNz6CudujW1oei1UHX5eTz7KTItVP95t4xENkxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639674; a=rsa-sha256; cv=none; b=GDRlbl7jNaiAkFD2f7heSzaCVZxr27NL6gMCD8n64nUrYr5zMWA1H+rKRj+XNXM0NGlvQ/ Vb0zxSro6Qb8xFyKFkTPH0prxB9cRlpGBF7zsNHqOYMYc8eGxqa11Dq+frZjnu0GgSrfaj VD9bGYYeDAQ+V7SCswXs+pVGQi1MdEujeFdKiBcg+N2HRCCwiIyF35J6EAHHqpOB3Amtlk rXkqY4xMHlkqjCOQ2LxjqhCE/wmDdHHcVDvUA0gGdmTZ+vVnzJyJt01keD4Pzj/TOWgD+x IbCTOLJtnb/l9EOqamskojP/IdtXfkvwuvNgaZNT4VT4+VyOFsB8M+9qcpXQIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GD5pxPnS28UxJvocHkNsaeURFfiENT4IR4ETmcuV5C4=; b=Qydsnt9OvXP3RMSVf3w51/g/4ZhVHMyE+GKgS347A2BP2PqXY9Z9UCLERy8f8VDm7WATDK 4B6evF2HVRYvdbDvPZ9MrTqYEXLrff35DFndW0z47JMwOocY4EXcaWT0Z1+BJ2DtHwIPvc TQWooFUVHHS0wzof0if0ilU3GqPkJnjcMjxDAxn4KRPS9IIUEajGTgLsVGClhR0iqZ4hVi xPRWtCdFGguBBRL53SdoiYWx5dP46zKR1LZrQI+CzPVH/79xkpcrgAu35IxIo2l2oMVAC2 u7oe1LGM9dZo0Cvu+Ga9OMVA7pk8+nPLLNB5Genqhpttj+KEuTtyJ6OwqqYMyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKgG389Mz1Q8J; Mon, 25 Sep 2023 11:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB1Ex9053626; Mon, 25 Sep 2023 11:01:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB1EWb053623; Mon, 25 Sep 2023 11:01:14 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:14 GMT Message-Id: <202309251101.38PB1EWb053623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 6579066de81d - stable/13 - gicv3: Stop setting the esize field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6579066de81dea96631e3d76961424610536377f Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=6579066de81dea96631e3d76961424610536377f commit 6579066de81dea96631e3d76961424610536377f Author: Andrew Turner AuthorDate: 2023-08-22 11:29:03 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 10:50:25 +0000 gicv3: Stop setting the esize field The GITS_BASER esize field is read-only, there is no need to change it. Reviewed by: gallatin, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41552 (cherry picked from commit 2f11b2abfc185d3d4f45e6a3dae270b859cdd388) --- sys/arm64/arm64/gicv3_its.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 2747bf7f4ce3..59fce650c47e 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -554,14 +554,13 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) /* Clear the fields we will be setting */ reg &= ~(GITS_BASER_VALID | GITS_BASER_INDIRECT | GITS_BASER_CACHE_MASK | GITS_BASER_TYPE_MASK | - GITS_BASER_ESIZE_MASK | GITS_BASER_PA_MASK | + GITS_BASER_PA_MASK | GITS_BASER_SHARE_MASK | GITS_BASER_PSZ_MASK | GITS_BASER_SIZE_MASK); /* Set the new values */ reg |= GITS_BASER_VALID | (cache << GITS_BASER_CACHE_SHIFT) | (type << GITS_BASER_TYPE_SHIFT) | - ((esize - 1) << GITS_BASER_ESIZE_SHIFT) | paddr | (share << GITS_BASER_SHARE_SHIFT) | (nitspages - 1); From nobody Mon Sep 25 11:01:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKgH64X1z4vNn0; Mon, 25 Sep 2023 11:01: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 4RvKgH55HPz3NRT; Mon, 25 Sep 2023 11:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhbpJXE/IEAxL9Q5QOK9WItg+8tbgySH1eXRvLhSMtc=; b=sHgf8/8Ri9hi+3/aE5M6vkaz45ATaqj1ZTHOVNb0Y1naFTYF7g6l+W0Iwg8+idU70MWSco 52ocPfmV6R/jjfBGt81Uecx9cy6JrZN3JnaYP+fVVCNeRYm9fu9sYBu1evBfoHLmtCXyYe t0TDq+np4TyGEkIbdkxkUputdaP55ZM7jB8lhSRl3qjlGbpM3UitQyjJmKqvgTIuRF+8Jh VvPwZ8mQ/RKvcGIkGNF9QEKsaDeSF+NgK/ra9WuCdrubIUw/aBpomFMjZSRvNxbG0vBMf7 BFAdHA2ns0qnX5r4KewcoFf91nPWSKyktW0zAzV9v5NGZk4Nii8odUizdAIJ7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639675; a=rsa-sha256; cv=none; b=IHMSB6wP8VqljtaCYmc1mybxzlZsSQZbaZZv0J3Ny0Ck+zZLKLKoyCpYIH6GQ97jwMEpld j4GAZ/rdVE8zcP/Us8a1ZoM5n64Gi9QTIU6wub/AhvzYTv2vtQTXLMzwWMvw6EpHun8LOQ M0LYhPpkBhXcWW8N2SfEVrbHtq7tjxyw28J0dLeN0dWhGKy5wc1OKPR9K9dLU0Uv035xxK rqRFCU/tSOAcUPZrtO8ImRgG1E3v6Jct7UpI/Nr6v4Vf+QH2cI4MTjd7E+99MG8ePspzVP c7u98N2099zjq4hzdxCvZ/wELje7eXHq/xgQp0yulbzEJNBUrt+R+PDWCYfZkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NhbpJXE/IEAxL9Q5QOK9WItg+8tbgySH1eXRvLhSMtc=; b=PzNYf7zva2lR7FJyLzd4OlgoQsnMU7bXywxNkfIzq7x+V1ziojDlWcwbLeTB02UG60SqUu MW9xs1sjuBOqZE8BySUgfGSKUd/fWIeh86PJgswYJnddhQdWsW0ASOxc4wCz+B69qkBa+1 lsBlkZ768BvTW2W34hBR5aZLe5W3j5vvwzp2jbRVP1gmfQTBi7X0mfy8jnEu1880Kfy3p4 mjhpow97bmpIbMtXTeQFUvQPfoLr/Nj43vErQA89b8CXFGvrXEq7cTtdib4JUAsH8yok2k YNHhgQKo1kUh6+ZI7dnnkPM1LKbeMioc1vQaUV19p2oc4WEzzzwtAaoOyrItIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKgH43H5z1QPZ; Mon, 25 Sep 2023 11:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB1FRD053679; Mon, 25 Sep 2023 11:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB1Fos053676; Mon, 25 Sep 2023 11:01:15 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:15 GMT Message-Id: <202309251101.38PB1Fos053676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: b549c8f9e6e0 - stable/13 - gicv3: Add a verbose message for unknown tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b549c8f9e6e093fbbddd1a160ef61351d0fe5110 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b549c8f9e6e093fbbddd1a160ef61351d0fe5110 commit b549c8f9e6e093fbbddd1a160ef61351d0fe5110 Author: Andrew Turner AuthorDate: 2023-08-22 11:30:50 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 10:50:36 +0000 gicv3: Add a verbose message for unknown tables Add a message under bootverbose when we find a gicv3 its table type that is unknown. Reviewed by: gallatin, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41553 (cherry picked from commit 629734783de5212ea2a7cdc6a8fb7cf6834b1344) --- sys/arm64/arm64/gicv3_its.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 59fce650c47e..74f2894d0a2c 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -534,6 +534,9 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) its_tbl_size = page_size; break; default: + if (bootverbose) + device_printf(dev, "Unhandled table type %lx\n", + type); continue; } npages = howmany(its_tbl_size, PAGE_SIZE); From nobody Mon Sep 25 11:01:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvKgK1vFwz4vNdS; Mon, 25 Sep 2023 11: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 4RvKgJ5smnz3NcY; Mon, 25 Sep 2023 11: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=1695639676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kCaA5xFxMMVCao2DJZ1Wq81JpWLHmrcJwuwdfKBgCJ8=; b=MhdB3OATHjZwcxRRRsOL1CbA8eSVPGpYatxn6lB43R9d9/wm7ZoQzoV8kc8GGIy36D2hqE oqnemPJB07xhsnavBadEWfZhGiesoOp4dVMGebWm6tVd8m3i+UQWHpFGFSzB2Sv9XSq+Di qLPJvOVObdmdC9l4T3WTCnaQCz4lX4N0Ow4JCP7MR+P1GNJPCKSYU3i5zF6vu1Ie2cmumr LhI7FI+qYIOVGomr/+KGd+x1NOxJ9FY2IfkiGxRqmahnC+nb7Tr9OMafLHZrQZZVuQ80Ny +ig4TYGnWwnyDBhdBEJVLCsrXrMSLVG89hUYuxYbYe9gaJswbJGcJrh7Fi0hww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639676; a=rsa-sha256; cv=none; b=Bq/4CowTXp500pkQXEXrQpbBN4cunW6odxZB8FS6Ai+IgKyaGhfMOtJcfOne11lMT0qDAX etPbKLOiADPYHnKU6TsrZcMUE8ld/Ma2lgFRUSD7JMvf37MzzMeJ3cDwYl92YNoMnwV6xU mUdTOd8Z9oQifWYPmcaq5X9RjLRvMTnCmJLIKjg/fL0N7/ToSsrYYaQ05pgU0d0t/3Pszv ALokSWumutjquGkQYkPyOLqIAZtWssdGm/y9vWYqvOSh8gp8Qi+f/iQABLKIxFZ9BFLrGF meUggpzuoEVJsN+jarcsVmiSeELsKDeoZk8vWaIy70sDSQxwbg4o0ege5Sp0WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kCaA5xFxMMVCao2DJZ1Wq81JpWLHmrcJwuwdfKBgCJ8=; b=OK7Fi2RVbRCnmsC2sxW4guA/AVzmUT4CmCpbwMvvLS2FOeaRGMWbGdboLPOugUK4/LJZNE 1zG6iibCTVUTRGjH/+Okhq/tei9PkQlVThxgiCQ/DkCdpBH0CEuUuzdKEXH7Z2CAkRgGvR 33Cg9tpbo7Xzfrr3U0o1a4PyznEFPnVImmfPN+bJ9X2DiCL87PGuFgI3c2zATSZTimHU+W BZfe20CYl9JoTfO2D2uxmDYHvQp50GQ1+jRRfcchARojMoiC7lARqOmkwZi+iyuURMRAAu KDbvjQKXhfvNUa4CFg6ehycAylbihJj34ar1kepP/+qQl5qPMjETPtQ5DKaVRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvKgJ4y67z1QjW; Mon, 25 Sep 2023 11:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PB1Gll053727; Mon, 25 Sep 2023 11:01:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB1GqW053724; Mon, 25 Sep 2023 11:01:16 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:01:16 GMT Message-Id: <202309251101.38PB1GqW053724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 107bb46b6cc2 - stable/13 - gicv3: Add checks for the device ID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 107bb46b6cc238cc6257f80e58f8fa3c94df45e1 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=107bb46b6cc238cc6257f80e58f8fa3c94df45e1 commit 107bb46b6cc238cc6257f80e58f8fa3c94df45e1 Author: Andrew Turner AuthorDate: 2023-08-22 14:37:19 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 10:50:56 +0000 gicv3: Add checks for the device ID Add checks that the device ID is supported by the hardware and is within the range allocated when the driver attaches. Reviewed by: gallatin, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41554 (cherry picked from commit 7d2dd08d013d79dc3f2a22747b079628a571cea2) --- sys/arm64/arm64/gicv3_its.c | 48 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 74f2894d0a2c..852db0054aa7 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -220,7 +220,10 @@ struct its_cmd { /* An ITS private table */ struct its_ptable { vm_offset_t ptab_vaddr; - unsigned long ptab_size; + /* Size of the L1 table */ + size_t ptab_l1_size; + /* Number of L1 entries */ + int ptab_l1_nidents; }; /* ITS collection description. */ @@ -244,6 +247,8 @@ struct gicv3_its_softc { cpuset_t sc_cpus; u_int gic_irq_cpu; + int sc_devbits; + int sc_dev_table_idx; struct its_ptable sc_its_ptab[GITS_BASER_NUM]; struct its_col *sc_its_cols[MAXCPU]; /* Per-CPU collections */ @@ -473,7 +478,8 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) vm_offset_t table; vm_paddr_t paddr; uint64_t cache, reg, share, tmp, type; - size_t esize, its_tbl_size, nidents, nitspages, npages; + size_t its_tbl_size, nitspages, npages; + size_t l1_esize, l1_nidents; int i, page_size; int devbits; @@ -502,6 +508,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) devbits = GITS_TYPER_DEVB(gic_its_read_8(sc, GITS_TYPER)); cache = GITS_BASER_CACHE_WAWB; } + sc->sc_devbits = devbits; share = GITS_BASER_SHARE_IS; for (i = 0; i < GITS_BASER_NUM; i++) { @@ -512,7 +519,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) continue; /* The table entry size */ - esize = GITS_BASER_ESIZE(reg); + l1_esize = GITS_BASER_ESIZE(reg); /* Find the tables page size */ page_size = gicv3_its_table_page_size(sc, i); @@ -524,8 +531,13 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) switch(type) { case GITS_BASER_TYPE_DEV: - nidents = (1 << devbits); - its_tbl_size = esize * nidents; + if (sc->sc_dev_table_idx != -1) + device_printf(dev, + "Warning: Multiple device tables found\n"); + + sc->sc_dev_table_idx = i; + l1_nidents = (1 << devbits); + its_tbl_size = l1_esize * l1_nidents; its_tbl_size = roundup2(its_tbl_size, page_size); break; case GITS_BASER_TYPE_VP: @@ -547,7 +559,8 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) PAGE_SIZE_64K, 0); sc->sc_its_ptab[i].ptab_vaddr = table; - sc->sc_its_ptab[i].ptab_size = npages * PAGE_SIZE; + sc->sc_its_ptab[i].ptab_l1_size = its_tbl_size; + sc->sc_its_ptab[i].ptab_l1_nidents = l1_nidents; paddr = vtophys(table); @@ -870,6 +883,7 @@ gicv3_its_attach(device_t dev) sc = device_get_softc(dev); + sc->sc_dev_table_idx = -1; sc->sc_irq_length = gicv3_get_nirqs(dev); sc->sc_irq_base = GIC_FIRST_LPI; sc->sc_irq_base += device_get_unit(dev) * sc->sc_irq_length; @@ -1188,6 +1202,23 @@ its_device_find(device_t dev, device_t child) return (its_dev); } +static bool +its_device_alloc(struct gicv3_its_softc *sc, int devid) +{ + struct its_ptable *ptable; + + /* No device table */ + if (sc->sc_dev_table_idx < 0) { + if (devid < (1 << sc->sc_devbits)) + return (true); + return (false); + } + + ptable = &sc->sc_its_ptab[sc->sc_dev_table_idx]; + /* Check the devid is within the table limit */ + return (devid < ptable->ptab_l1_nidents); +} + static struct its_dev * its_device_get(device_t dev, device_t child, u_int nvecs) { @@ -1213,6 +1244,11 @@ its_device_get(device_t dev, device_t child, u_int nvecs) its_dev->lpis.lpi_num = nvecs; its_dev->lpis.lpi_free = nvecs; + if (!its_device_alloc(sc, its_dev->devid)) { + free(its_dev, M_GICV3_ITS); + return (NULL); + } + if (vmem_alloc(sc->sc_irq_alloc, nvecs, M_FIRSTFIT | M_NOWAIT, &irq_base) != 0) { free(its_dev, M_GICV3_ITS); From nobody Mon Sep 25 12:01:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvM0y0kM1z4vRwh; Mon, 25 Sep 2023 12:01: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 4RvM0y06z8z3d5t; Mon, 25 Sep 2023 12:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695643298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XkbDyCpwkQcCIw4TlNr6nH7LaqrXTA0LJ74hZbQf020=; b=cj/DDonbxHULPVLcXDAsEefqoomZD9+XWSAUXwlYsEPnGh5BuUjxgJ5xhpGlsWTcXVDKwk 9Mpldma0NPhrrKwWmiiOsyNfDxNkUpEa1H0cfBZ/EZrFW78ighf8OEoAOStfLuiUNG6SMl DCSFYwcFDQFSHanC3JvGuiytImvW6FEA72KVEO3JrXirir+15L0V3/Kb7sno7YY82o3fiJ VjQhKcsBeJgf4tlw5wIGn1dq7toNFNOXWUyVsGVbCONvI+2XtHxbfYrERWn//HsF49EWi+ K4AD7THMLQdXfdQJ5Yr+Mgfhp4ymvvL+GYRk3uNAEIrdNcyTV+lytXVB1JZUSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695643298; a=rsa-sha256; cv=none; b=U/E13DhWuKDwIv7RRo/arvEYRp39YOZATFd2Gqenym41RooMzQdZ0vSQvqvWzdTWVJK5+Z /JasEFQy7FL3bImulpvtFHc2MRVgAgCHmaWL91PwFHkVqE1pecjt18gYMjrsFYYQ31uxa1 H6CmSNCAGGKjK18ZJu6zq6rNSJm10y0SSDhfaSQcSgaLi3vThPfBymT9uSr6PbGcg5uM6B awKMITsDxaNQOR5Kf1C8uG0kyDHQwp2LQySSl6vVWPKV8avv1wubgwXxu3OrypmHdSNg/X 2g9wQu5lBCRFcmDYjrAWg37bzWPTpDBbdcYHCUEr/6HVzKQQ6TjKUaThj1YZAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695643298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XkbDyCpwkQcCIw4TlNr6nH7LaqrXTA0LJ74hZbQf020=; b=O2blKw2Bg7DOFkAoGLqjSt5XQPUsxS3b2qI7LoZ2lHxeBs9OU6fSRUddZnQ/kH1vIWhJvc 2U/1urSFrINokWgqOIorF6xSvdjmktDuU8wa5g2MTEgtAAn7MUujF7ksutgh4rp0AsJB55 zqNbPKABUizo+2Zrk/mnNR8bz+ctvGjS0SUoRwA+nDNuWkDKuwSp1zD4RKQUHF5kKjaIE8 lHH2SpFy8SZy38KTQDg9QwsAn89P3b9b2wY1WS9IbxWpjuzVVKVdjTYXJjMfEWIkMZQU8a EE1OUjwTQk1LYroWxQYYTXOjV4k2SRY9Mmn5C2k9T/lhWE6BPjoyBWKDMyvqpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvM0x6JMwz1Rv6; Mon, 25 Sep 2023 12:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PC1b98058679; Mon, 25 Sep 2023 12:01:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PC1bXr058676; Mon, 25 Sep 2023 12:01:37 GMT (envelope-from git) Date: Mon, 25 Sep 2023 12:01:37 GMT Message-Id: <202309251201.38PC1bXr058676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: fce3bc6b46e0 - stable/14 - gicv3: Support indirect ITS tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fce3bc6b46e0e2575b02a6de67f482a590430e61 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=fce3bc6b46e0e2575b02a6de67f482a590430e61 commit fce3bc6b46e0e2575b02a6de67f482a590430e61 Author: Andrew Turner AuthorDate: 2023-08-22 16:01:21 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 12:01:28 +0000 gicv3: Support indirect ITS tables The GICv3 ITS device supports two options for device tables. Currently we support a single table to hold all device IDs, however when the device ID space grows large this can be too large for the GITS_BASER register to describe. To handle this case, and to reduce the memory needed when this space is sparse support the second option, the indirect table. The indirect table is a 2 level table where the first level contains the physical address of the second with a valid bit. The second level is an ITS page sized table where each entry is the original entry size. As we don't need to allocate a second level table for devices IDs that don't exist this can reduce the allocation size. Reviewed by: gallatin Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41555 (cherry picked from commit 8b143276ae493c8f060159643d9d9cdc149e294a) --- sys/arm64/arm64/gic_v3_reg.h | 3 ++ sys/arm64/arm64/gicv3_its.c | 96 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/gic_v3_reg.h b/sys/arm64/arm64/gic_v3_reg.h index 6a766be3da2a..16b1cd438350 100644 --- a/sys/arm64/arm64/gic_v3_reg.h +++ b/sys/arm64/arm64/gic_v3_reg.h @@ -417,6 +417,8 @@ #define GITS_BASER_SIZE_MASK 0xFFUL #define GITS_BASER_NUM 8 +/* Size of entries in a level 1 indirect table */ +#define GITS_INDIRECT_L1_ESIZE 8 #define GITS_TYPER (0x0008) #define GITS_TYPER_HCC_SHIFT 24 @@ -433,6 +435,7 @@ ((((x) & GITS_TYPER_ITTES_MASK) >> GITS_TYPER_ITTES_SHIFT) + 1) #define GITS_TRANSLATER (0x10040) + /* * LPI related */ diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index cb655eaca412..a126a166c4c9 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2015-2016 The FreeBSD Foundation + * Copyright (c) 2023 Arm Ltd * * This software was developed by Andrew Turner under * the sponsorship of the FreeBSD Foundation. @@ -221,10 +222,16 @@ struct its_cmd { /* An ITS private table */ struct its_ptable { vm_offset_t ptab_vaddr; - /* Size of the L1 table */ + /* Size of the L1 and L2 tables */ size_t ptab_l1_size; - /* Number of L1 entries */ + size_t ptab_l2_size; + /* Number of L1 and L2 entries */ int ptab_l1_nidents; + int ptab_l2_nidents; + + int ptab_page_size; + int ptab_share; + bool ptab_indirect; }; /* ITS collection description. */ @@ -475,6 +482,23 @@ gicv3_its_table_page_size(struct gicv3_its_softc *sc, int table) } } +static bool +gicv3_its_table_supports_indirect(struct gicv3_its_softc *sc, int table) +{ + uint64_t reg; + + reg = gic_its_read_8(sc, GITS_BASER(table)); + + /* Try setting the indirect flag */ + reg |= GITS_BASER_INDIRECT; + gic_its_write_8(sc, GITS_BASER(table), reg); + + /* Read back to check */ + reg = gic_its_read_8(sc, GITS_BASER(table)); + return ((reg & GITS_BASER_INDIRECT) != 0); +} + + static int gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) { @@ -482,9 +506,10 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) vm_paddr_t paddr; uint64_t cache, reg, share, tmp, type; size_t its_tbl_size, nitspages, npages; - size_t l1_esize, l1_nidents; + size_t l1_esize, l2_esize, l1_nidents, l2_nidents; int i, page_size; int devbits; + bool indirect; if ((sc->sc_its_flags & ITS_FLAGS_ERRATA_CAVIUM_22375) != 0) { /* @@ -532,6 +557,9 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) return (EINVAL); } + indirect = false; + l2_nidents = 0; + l2_esize = 0; switch(type) { case GITS_BASER_TYPE_DEV: if (sc->sc_dev_table_idx != -1) @@ -540,6 +568,23 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) sc->sc_dev_table_idx = i; l1_nidents = (1 << devbits); + if ((l1_esize * l1_nidents) > (page_size * 2)) { + indirect = + gicv3_its_table_supports_indirect(sc, i); + if (indirect) { + /* + * Each l1 entry is 8 bytes and points + * to an l2 table of size page_size. + * Calculate how many entries this is + * and use this to find how many + * 8 byte l1 idents we need. + */ + l2_esize = l1_esize; + l2_nidents = page_size / l2_esize; + l1_nidents = l1_nidents / l2_nidents; + l1_esize = GITS_INDIRECT_L1_ESIZE; + } + } its_tbl_size = l1_esize * l1_nidents; its_tbl_size = roundup2(its_tbl_size, page_size); break; @@ -564,6 +609,11 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) sc->sc_its_ptab[i].ptab_vaddr = table; sc->sc_its_ptab[i].ptab_l1_size = its_tbl_size; sc->sc_its_ptab[i].ptab_l1_nidents = l1_nidents; + sc->sc_its_ptab[i].ptab_l2_size = page_size; + sc->sc_its_ptab[i].ptab_l2_nidents = l2_nidents; + + sc->sc_its_ptab[i].ptab_indirect = indirect; + sc->sc_its_ptab[i].ptab_page_size = page_size; paddr = vtophys(table); @@ -578,6 +628,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) GITS_BASER_SIZE_MASK); /* Set the new values */ reg |= GITS_BASER_VALID | + (indirect ? GITS_BASER_INDIRECT : 0) | (cache << GITS_BASER_CACHE_SHIFT) | (type << GITS_BASER_TYPE_SHIFT) | paddr | (share << GITS_BASER_SHARE_SHIFT) | @@ -618,6 +669,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) return (ENXIO); } + sc->sc_its_ptab[i].ptab_share = share; /* We should have made all needed changes */ break; } @@ -1218,6 +1270,10 @@ static bool its_device_alloc(struct gicv3_its_softc *sc, int devid) { struct its_ptable *ptable; + vm_offset_t l2_table; + uint64_t *table; + uint32_t index; + bool shareable; /* No device table */ if (sc->sc_dev_table_idx < 0) { @@ -1228,7 +1284,39 @@ its_device_alloc(struct gicv3_its_softc *sc, int devid) ptable = &sc->sc_its_ptab[sc->sc_dev_table_idx]; /* Check the devid is within the table limit */ - return (devid < ptable->ptab_l1_nidents); + if (!ptable->ptab_indirect) { + return (devid < ptable->ptab_l1_nidents); + } + + /* Check the devid is within the allocated range */ + index = devid / ptable->ptab_l2_nidents; + if (index >= ptable->ptab_l1_nidents) + return (false); + + table = (uint64_t *)ptable->ptab_vaddr; + /* We have an second level table */ + if ((table[index] & GITS_BASER_VALID) != 0) + return (true); + + shareable = true; + if ((ptable->ptab_share & GITS_BASER_SHARE_MASK) == GITS_BASER_SHARE_NS) + shareable = false; + + l2_table = (vm_offset_t)contigmalloc_domainset(ptable->ptab_l2_size, + M_GICV3_ITS, sc->sc_ds, M_WAITOK | M_ZERO, 0, (1ul << 48) - 1, + ptable->ptab_page_size, 0); + + if (!shareable) + cpu_dcache_wb_range((vm_offset_t)l2_table, + ptable->ptab_l2_size); + + table[index] = vtophys(l2_table) | GITS_BASER_VALID; + if (!shareable) + cpu_dcache_wb_range((vm_offset_t)&table[index], + sizeof(table[index])); + + dsb(sy); + return (true); } static struct its_dev * From nobody Mon Sep 25 12:01:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvM0z2CGkz4vRgl; Mon, 25 Sep 2023 12:01: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 4RvM0z1LSDz3dMH; Mon, 25 Sep 2023 12:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695643299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cq7KZmRLxEkbSE572+LAieCfoFex4L5jlPxblMtMPVs=; b=iq/aoJCQonefab9AKvfGFi/2zNf4nd+hAPqC8o02vTpqy31awDSo8w2MQeU0NcUpOTGIcd tGRR7iSYqyQ8kr8mTwrJ7makkgx3OKAOk3BVpgni7J8PFaoYQt7Hfs0xfQE7TKrvfqY+uY hr9NEhkjSUZTrjvhqhsIvsynrjTlbWJtLcVrT005D2WDFvhe2BElur4lgxA4yJ/dgf4eV4 basPIbYaXPBL9JJfXP1dN+XBHdFZ+O+NGhjQldp+RvecpmVOswvKZFmHZRe5V6vclht+E4 akqHxtGd+r6oozs04fxsR/AmPc1RDClxcg18Fvtep6ZQeH8e/IP1iEUAfJ8FDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695643299; a=rsa-sha256; cv=none; b=OUDT7A6TIshNSgGx7JJtCTxdL9/iuQR0TgV9ojr9uAP8rvnaOvxEOXQ4c0v8knKJLKK5Iy 2R8w5rPvDqVkj1aW9uz3EM5vUvHJiwZS0Q5ZPXYKoY4S1M1ZIgeK+bS/RJhkRj5qhQrjcV 1eTPNn7s/uV1Nu/G1OodptsK43c0RSLEphYLMSwPRvveYQPdhTggGDutt6hJIeshHR8IPh bgKYMODro0O2dIbIuAWGnpRqnGn9RZPOvmRrnJnLY898VbarJbac2cH7+MG1R5/HRN6WKR FK8wso6Z5Yh0C49LiMRlIm6NyVcOgdAkRXkU+wEWBxQdTDeNHjqusKDToeTzzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695643299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cq7KZmRLxEkbSE572+LAieCfoFex4L5jlPxblMtMPVs=; b=bV9WhYssDlY2OMESn2pn9gasyr6EsbwbuQzts2cyMx1YA8ok3pDPX5QSulcPm43hBBqVDp Z4st8pt5gIHNAfZ9P2s1OkE5Hw6Y5P99bfH6UBruTVVlAXrM1RhF9tE0MKu6zp4N34aF8u JNWBkebCHz0sPdGM/JT9WbTQ+1iUr0FM/pyLKZBx52EkSexAhAMVkZC3pSop/2dJuGQHk+ nHNfd0ChkvSYEToOwmNUKgm3W/mJhJ8++NIXk38DAYzJbl/4SxjTTF6dFuSK566hxz3gs/ Apb/fJKH16FsqJqP35622qKJToTLP4E5ORcqKlMWxCzcZl1l2keFLSVS8YgMoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvM0z0984z1Rv7; Mon, 25 Sep 2023 12:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PC1ckl058727; Mon, 25 Sep 2023 12:01:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PC1cpY058724; Mon, 25 Sep 2023 12:01:38 GMT (envelope-from git) Date: Mon, 25 Sep 2023 12:01:38 GMT Message-Id: <202309251201.38PC1cpY058724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: fc7460a5ca4b - stable/14 - gicv3: Add logging for when its_device_alloc fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fc7460a5ca4bddfd54cb093a7eea70c491650d21 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=fc7460a5ca4bddfd54cb093a7eea70c491650d21 commit fc7460a5ca4bddfd54cb093a7eea70c491650d21 Author: Andrew Turner AuthorDate: 2023-08-23 17:44:38 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 12:01:28 +0000 gicv3: Add logging for when its_device_alloc fails Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41566 (cherry picked from commit 5429e194212e7d2fd7b4771bcf348f0917a0d505) --- sys/arm64/arm64/gicv3_its.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index a126a166c4c9..777e20649f33 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1277,21 +1277,44 @@ its_device_alloc(struct gicv3_its_softc *sc, int devid) /* No device table */ if (sc->sc_dev_table_idx < 0) { - if (devid < (1 << sc->sc_devbits)) - return (true); - return (false); + if (devid >= (1 << sc->sc_devbits)) { + if (bootverbose) { + device_printf(sc->dev, + "%s: Device out of range for hardware " + "(%x >= %x)\n", __func__, devid, + 1 << sc->sc_devbits); + } + return (false); + } + return (true); } ptable = &sc->sc_its_ptab[sc->sc_dev_table_idx]; /* Check the devid is within the table limit */ if (!ptable->ptab_indirect) { - return (devid < ptable->ptab_l1_nidents); + if (devid >= ptable->ptab_l1_nidents) { + if (bootverbose) { + device_printf(sc->dev, + "%s: Device out of range for table " + "(%x >= %x)\n", __func__, devid, + ptable->ptab_l1_nidents); + } + return (false); + } + + return (true); } /* Check the devid is within the allocated range */ index = devid / ptable->ptab_l2_nidents; - if (index >= ptable->ptab_l1_nidents) + if (index >= ptable->ptab_l1_nidents) { + if (bootverbose) { + device_printf(sc->dev, + "%s: Index out of range for table (%x >= %x)\n", + __func__, index, ptable->ptab_l1_nidents); + } return (false); + } table = (uint64_t *)ptable->ptab_vaddr; /* We have an second level table */ From nobody Mon Sep 25 12:01:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvM103325z4vRcp; Mon, 25 Sep 2023 12: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 4RvM102TFTz3dBS; Mon, 25 Sep 2023 12: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=1695643300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vvlsU8icyfHFyFuoEUx3oCQIl1UlqN7slXpg5hV/GKM=; b=ehq2Beq1+dVFvxFOTmGu845LyePfYkLaxN8Or5PGQ0VQXrHs47Y7tfqhEPhYL7baee4Wfg 3hM85UiauizKRlYMXOuUUd5k0cXVG1z55lGKGv2ljoVZblLUQ/QV3gD8HR2JEfHKoBOczq eZQ/fIiEsyvEtfuRA2qM4vC4R2lqv2V+k6svtlbsgpa9B+L6wkNAs9E/3ZMx6nyK6jBznq SMADhBIKtQYcz2+6cycz8hFMKAjkLZY2xqL+LjW/w5I8QLzW6JJ1DWFam+nPQVACpohY2I pUXBJtXFBC/YisWX0iW+zRHg5SITw3b+Q8GJKkgXFHsEtTyBs2dMuoyD0R4F1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695643300; a=rsa-sha256; cv=none; b=LWYpWGV+TkwCXPvYiUOMeDwehdg60asg+Lq0BNBv5mrbUVhOEh9uy6pJuyLoD7yPNPc4oR bHF1kgImMUKyMYELBut6NIaRJYTRX428kZz58lbSPsZPv3ZctT73Yuo/NLjWsz3KM+MJpL 1Y8/ogMOl9X58Q5h9FW+SOCy5dwPObNeXDSdmjW3ac3y+VtZkL6nRKkeKjapfDAAd86qlF eevWlXR9DN4bdmvcKL6jAefTsVYeoGWOG5btoYxiGJpGJiPcpQ6duBfXujyZE+2hDAWRHF IemXGcJdRsmYlRExhu84cMlLHubBG5t1vMvLeThOMfxizCgmSJMcnc47m0K6wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695643300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vvlsU8icyfHFyFuoEUx3oCQIl1UlqN7slXpg5hV/GKM=; b=N9HpojM8Dq7tQYMebEQTxe3MFtGKuJurjJ/n+bIBr/wL/GuKSAOFdLfqWabdWY+GZW8BMA PFvo6zxiNWgu6136xbL0ouO3Jcnr7pP77GKKX8dnTjVWPOW76mJu7bmsEnG3nVxifIXgxP 4Mb+Lqw4sMvKKDpDtLK9MsCs8odNajjpeUg2zm/fTUsXBKc1QblSYqnCWqzoN5bJwKc4Ld gEJa7xF3MkfyNs8rn6aZ3vDM6r32qki7F/wOE5ZH7lxatCUzFTbSQsv1MnJC46wRUF2pnf /DZFkPZRMGG/yXmBKvabz7cXnWyzsxL0GHaJy6Mh35yvyt669cSQXjw7jJ9+8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvM101BX9z1Rjj; Mon, 25 Sep 2023 12:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PC1eHJ058778; Mon, 25 Sep 2023 12:01:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PC1eXE058775; Mon, 25 Sep 2023 12:01:40 GMT (envelope-from git) Date: Mon, 25 Sep 2023 12:01:40 GMT Message-Id: <202309251201.38PC1eXE058775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: caf7bc535622 - stable/14 - arm64: Fix errata workarounds that depend on smccc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: caf7bc535622ee7baeffc3366db8bf0e896aa018 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=caf7bc535622ee7baeffc3366db8bf0e896aa018 commit caf7bc535622ee7baeffc3366db8bf0e896aa018 Author: Andrew Turner AuthorDate: 2023-09-18 16:34:51 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 12:01:28 +0000 arm64: Fix errata workarounds that depend on smccc Some arm64 errata depend on calling into the firmware via the SMCCC interface. This needs to happen after the psci driver has attached as they share the interface. Fix this by allowing the workarounds to mark when they depend on device drivers attaching. This is only an issue on CPU 0 as the workarounds are applied later for the non-boot CPUs. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41916 (cherry picked from commit c643e82dba0b17b2716de4c9d44a3c9c547cbbd5) (cherry picked from commit 843bea18711d726cd2f0a3c3f9144b218e4de3e8) --- sys/arm64/arm64/cpu_errata.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/cpu_errata.c b/sys/arm64/arm64/cpu_errata.c index 38148ff7066c..fee22240bb0e 100644 --- a/sys/arm64/arm64/cpu_errata.c +++ b/sys/arm64/arm64/cpu_errata.c @@ -47,6 +47,9 @@ struct cpu_quirks { cpu_quirk_install *quirk_install; u_int midr_mask; u_int midr_value; +#define CPU_QUIRK_POST_DEVICE (1 << 0) /* After device attach */ + /* e.g. needs SMCCC */ + u_int flags; }; static enum { @@ -64,32 +67,38 @@ static struct cpu_quirks cpu_quirks[] = { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A57,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A72,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A73,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A75,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = 0, .midr_value = 0, .quirk_install = install_ssbd_workaround, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, @@ -173,8 +182,8 @@ install_thunderx_bcast_tlbi_workaround(void) } } -void -install_cpu_errata(void) +static void +install_cpu_errata_flags(u_int mask, u_int flags) { u_int midr; size_t i; @@ -183,8 +192,43 @@ install_cpu_errata(void) for (i = 0; i < nitems(cpu_quirks); i++) { if ((midr & cpu_quirks[i].midr_mask) == - cpu_quirks[i].midr_value) { + cpu_quirks[i].midr_value && + (cpu_quirks[i].flags & mask) == flags) { cpu_quirks[i].quirk_install(); } } } + +/* + * Install any CPU errata we need. On CPU 0 we only install the errata that + * don't depend on device drivers as this is called early in the boot process. + * On other CPUs the device drivers have already attached so install all + * applicable errata. + */ +void +install_cpu_errata(void) +{ + /* + * Only install early CPU errata on CPU 0, device drivers may not + * have attached and some workarounds depend on them, e.g. to query + * SMCCC. + */ + if (PCPU_GET(cpuid) == 0) { + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, 0); + } else { + install_cpu_errata_flags(0, 0); + } +} + +/* + * Install any errata workarounds that depend on device drivers, e.g. use + * SMCCC to install a workaround. + */ +static void +install_cpu_errata_late(void *dummy __unused) +{ + MPASS(PCPU_GET(cpuid) == 0); + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, CPU_QUIRK_POST_DEVICE); +} +SYSINIT(install_cpu_errata_late, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, + install_cpu_errata_late, NULL); From nobody Mon Sep 25 12:01:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvM115lwtz4vRgp; Mon, 25 Sep 2023 12: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 4RvM1137mSz3dQB; Mon, 25 Sep 2023 12: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=1695643301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JNVQkLzvXtE6+UsGDawbAsYZKNxibpwyoZfej4GWLs=; b=a0uaImjyQbHzD7M1E/I+YBd2c9H1Mh1EVDksWgJVFD0SdI+jRbqmBuDJzpKT9t4QkkS9xk nZHkHOpqyrxSi9a5xkZZLFYnkv1vNoA2ASYfbq5XDkJLtbfBmz72caszNrJ+4+xAaQMxQD R1GowcIddFcD16IRUWcyvs0gGWyl5Zyb3vHrAleDzG8UyoSqlq8QonJKGvo60SHeg4FyM5 KYxxxaHqUw03WgorLRHCsRySMb2ZKm9aFZPcyp6u5mLQEZqQl+TDXFz6RTSbheT20Z/MFh BwonQjA88J8B5+Yw97/vMu6nqHwcmztS4GKGhL1QHoKpGmEe6Z2n5APoJGMiMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695643301; a=rsa-sha256; cv=none; b=ptpfYD0+fqq59DdF3fqUSyhPfBGwVunp/Np4hiTjPSn8zQfvqLNlm9cktE7b0hz0S6Anqd y29ExHgm9YU6Vmf+OSP19XrncXKcKFSbuAdG4VACkYCiNaiG3Hnly29pXTbDhgVRntqmkj /+76vY0bZHo/99L4C62P+7AEmUvsHKCnM6TU7QwscB3VDmcYGHtLX3Td686qaTvE5EX1Z2 oN02NPcoaEL2c9R9GV4EaCbR+iWiVR94IwZS9opXZmKW6erbDKMrK5ljgmROCkNPBX2fff 8dZJWtTlbs+55YvLOStAp+ye7bf+AOu+ZH5ljOZhvH7IIwlSVXMziAaDG/fzPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695643301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JNVQkLzvXtE6+UsGDawbAsYZKNxibpwyoZfej4GWLs=; b=vwjLemzgPJl8tKv2dArzw5kXmIdtZ0fakcAz7hIcNIcd0mbGBWuSDXutDaMSw3YUmIIvxg YPuMFKj7ssZXybcqzMO4Es//a4U8FHRj69nq8SMuBo72rsLt849OR0xNdcLgpTySulI95Q r4qwF5x1/iuS7CYnPqVWro9iBYZ+M18myklse4O/IgUrXdt3WgyggvGxyPhtLwZL+ur/ix Da8HS1GEph/1UXFV6ve34/sykw4Kx2d1cLNF2/eVdntXXBpk1npyP0NvYaS9Dc32+83caF fBeRxNIMNZKXoV8+FeIDVurKMUc54k0sC+C/S5NmWSgrfz6vTwqq/sJaWdpgNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvM112DV2z1Rc8; Mon, 25 Sep 2023 12:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PC1fDL058823; Mon, 25 Sep 2023 12:01:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PC1f98058820; Mon, 25 Sep 2023 12:01:41 GMT (envelope-from git) Date: Mon, 25 Sep 2023 12:01:41 GMT Message-Id: <202309251201.38PC1f98058820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 5df4deb384d3 - stable/14 - vtgpu: Fix the physical memory size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5df4deb384d3af12b10bc6de0788578d6a56e207 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5df4deb384d3af12b10bc6de0788578d6a56e207 commit 5df4deb384d3af12b10bc6de0788578d6a56e207 Author: Andrew Turner AuthorDate: 2023-09-21 10:50:29 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 12:01:28 +0000 vtgpu: Fix the physical memory size Use the correct endian switching function when switching to a little endian 64-bit address. Even on a little-endian machine this will truncate the address to a 32-bit value. Sponsored by: Arm Ltd (cherry picked from commit 4386935191c576fa62a52d52734e264fe8329a67) --- sys/dev/virtio/gpu/virtio_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c index 0472bc98b3ba..6209fe4beae1 100644 --- a/sys/dev/virtio/gpu/virtio_gpu.c +++ b/sys/dev/virtio/gpu/virtio_gpu.c @@ -565,7 +565,7 @@ vtgpu_attach_backing(struct vtgpu_softc *sc) s.req.backing.resource_id = htole32(VTGPU_RESOURCE_ID); s.req.backing.nr_entries = htole32(1); - s.req.mem[0].addr = htole32(sc->vtgpu_fb_info.fb_pbase); + s.req.mem[0].addr = htole64(sc->vtgpu_fb_info.fb_pbase); s.req.mem[0].length = htole32(sc->vtgpu_fb_info.fb_size); error = vtgpu_req_resp(sc, &s.req, sizeof(s.req), &s.resp, From nobody Mon Sep 25 12:19:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvMQ26n3rz4rGJF; Mon, 25 Sep 2023 12:19: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 4RvMQ26HCjz3gWC; Mon, 25 Sep 2023 12:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695644394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oS3YtkzMSQ5IhvBlvAv042wzSw5PimWCOSnDGbwcOUI=; b=vkdLaqKxEDSHEVVeIE6crPO/einlxjI2F3Fj0dqL6uquOe1MbvkyoK6c9GPhpWh6qGoHxj 94lm/9wmz1w52WBr1awn03S2t27QBcuabxf+A/vkyPtG7BPeT+XJSG8T3WQ0YBJimC/ih6 ELW+ng4YHxiaeh1Rbw+I3X+s0SyQxHExHN2ZEzcqKuPn2/9qV0/FmnmptqvruPqZFpTtw8 TCTZ2oyBG8cTIFHYxcDJUB7iPopFT1MX6KDhc+xas+ZehVS47gwCabKJ6hlslL8I4htLmK e2kZbq6pQHg6O1g+mT2+ybV+Je608NidjC4bjsDdLTlwYyRbLqbFY68Y7eC1Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695644394; a=rsa-sha256; cv=none; b=m83c/haeARklobA6vDeru0+kJJya9s/IgOl4sfSt10Z1b/M0JukqWMKhEi8edyOQFTwLr4 YoK9U61KUNyySa7KAKckWRGKEUsxa+ecz5JvcdNE4qE8bgjKLYaUo/J7/sUeMKMQwn5RUG XHiD+jHMJNiUu22B85+YcDN9LhpEJJEW6lUaw82t4gpezfwrZbSmS9Buvsw1IrDJ7YH9X2 mZsYJr4mpiHkguHijEpQU/8R65dTv8pQ7MPozCnWma0vufXYQlRbXEvzVMFSbyTsRu1eEK xYsSAz2qDukZ2jNaD8dpTA4wJPO32Dwqvm8CaO4HwT9r0mbcVsu3frurd4Vsvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695644394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oS3YtkzMSQ5IhvBlvAv042wzSw5PimWCOSnDGbwcOUI=; b=hpNRSSjIFpuzgJFNe2Zwr/6UOF27SbrVQzjHYi6qTP0XM1m6NwkIqLRi6mYGDdPCZsxIkB I801R6Ykd26CyJS45DIt3Qzk8kFqzsUKce/6VdQhoPbo4Nt7JBzJSApuItUTjgsFo9Sdhc AbBFbKcH41+drfjDc50Ca8zaYF/EzIgjx1n9aFqltSob4E/ImeTzpjNtiaVPcDvjwhPkTY za2ZL7ZfxTHmmwmdSqaSDPB7BLI3HtisxTHL6MhGnnw5/1YjTC2mHJDzj00wfCUMivYnXL BNAAJZtLsJBTDzwFjrkA+bXo4DBk4n6tcs2n2PsUgEURXlKq8jjtQS3uv2S5rA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvMQ25Kkyz1SJ6; Mon, 25 Sep 2023 12:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PCJs5L078342; Mon, 25 Sep 2023 12:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PCJs7X078339; Mon, 25 Sep 2023 12:19:54 GMT (envelope-from git) Date: Mon, 25 Sep 2023 12:19:54 GMT Message-Id: <202309251219.38PCJs7X078339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 4df1447f2c76 - stable/13 - arm64: Fix errata workarounds that depend on smccc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4df1447f2c76d0db988197f3a05d48e15f976c7c Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4df1447f2c76d0db988197f3a05d48e15f976c7c commit 4df1447f2c76d0db988197f3a05d48e15f976c7c Author: Andrew Turner AuthorDate: 2023-09-18 16:34:51 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 12:13:47 +0000 arm64: Fix errata workarounds that depend on smccc Some arm64 errata depend on calling into the firmware via the SMCCC interface. This needs to happen after the psci driver has attached as they share the interface. Fix this by allowing the workarounds to mark when they depend on device drivers attaching. This is only an issue on CPU 0 as the workarounds are applied later for the non-boot CPUs. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41916 (cherry picked from commit c643e82dba0b17b2716de4c9d44a3c9c547cbbd5) (cherry picked from commit 843bea18711d726cd2f0a3c3f9144b218e4de3e8) --- sys/arm64/arm64/cpu_errata.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/cpu_errata.c b/sys/arm64/arm64/cpu_errata.c index 38148ff7066c..fee22240bb0e 100644 --- a/sys/arm64/arm64/cpu_errata.c +++ b/sys/arm64/arm64/cpu_errata.c @@ -47,6 +47,9 @@ struct cpu_quirks { cpu_quirk_install *quirk_install; u_int midr_mask; u_int midr_value; +#define CPU_QUIRK_POST_DEVICE (1 << 0) /* After device attach */ + /* e.g. needs SMCCC */ + u_int flags; }; static enum { @@ -64,32 +67,38 @@ static struct cpu_quirks cpu_quirks[] = { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A57,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A72,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A73,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A75,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = 0, .midr_value = 0, .quirk_install = install_ssbd_workaround, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, @@ -173,8 +182,8 @@ install_thunderx_bcast_tlbi_workaround(void) } } -void -install_cpu_errata(void) +static void +install_cpu_errata_flags(u_int mask, u_int flags) { u_int midr; size_t i; @@ -183,8 +192,43 @@ install_cpu_errata(void) for (i = 0; i < nitems(cpu_quirks); i++) { if ((midr & cpu_quirks[i].midr_mask) == - cpu_quirks[i].midr_value) { + cpu_quirks[i].midr_value && + (cpu_quirks[i].flags & mask) == flags) { cpu_quirks[i].quirk_install(); } } } + +/* + * Install any CPU errata we need. On CPU 0 we only install the errata that + * don't depend on device drivers as this is called early in the boot process. + * On other CPUs the device drivers have already attached so install all + * applicable errata. + */ +void +install_cpu_errata(void) +{ + /* + * Only install early CPU errata on CPU 0, device drivers may not + * have attached and some workarounds depend on them, e.g. to query + * SMCCC. + */ + if (PCPU_GET(cpuid) == 0) { + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, 0); + } else { + install_cpu_errata_flags(0, 0); + } +} + +/* + * Install any errata workarounds that depend on device drivers, e.g. use + * SMCCC to install a workaround. + */ +static void +install_cpu_errata_late(void *dummy __unused) +{ + MPASS(PCPU_GET(cpuid) == 0); + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, CPU_QUIRK_POST_DEVICE); +} +SYSINIT(install_cpu_errata_late, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, + install_cpu_errata_late, NULL); From nobody Mon Sep 25 12:27:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvMZD50Y1z4rGwH; Mon, 25 Sep 2023 12:27: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 4RvMZD4WVDz4Dcf; Mon, 25 Sep 2023 12:27:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695644820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCIuahURrEKqWykTbvP+Nnw+xQPSt5i/0E3oyCSjAzk=; b=AYndginWAKVj2cciAyyj2/F1u9BpVGYZ0oFvUc69475FDL4F81FuVdwYuEev/SHEs3w0Fc HYPSWq2t1AAlrZ9u48p904jIRkU3NHE0N1kZ9OQfWrhDCI0CVeX6BFVQufmk0GiJb2NOtY eTlJNuVGZ2kt6rn8fKXoaEBCQhXNbMkGJj9XLLxGEIYkLV/mz50MEV46Qtnwnp6ePfUr5x Y2HLNilephz/iDcip1htB3RXcgkB8jbsdczP833OzLC95vZYR1cOTILvLDZtWO1NaEBPtZ 69A19dwHHRD/qsjoXL0vVH2zwBOjtUpuiYKrzlxHRAFqLl4PLHPHuX/v+C0aOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695644820; a=rsa-sha256; cv=none; b=hr84eKPCjhA5Y5cZ2gJqagcgwuqntNjZgprFd5vq+zCYC5q7sSZEJK17Kb2CNl3gHQNRkN 4B9DO0O0RHV0/GT82lARZ9yvd7SIGXNmfzLtTeLvDJjBko7yiArRxciIPGa3MpJoO/d1nK q8qwvif/8vjtCExxwNA7dAFDlAxueLHjV2OwFmwtt/07KoCEVv9ZlElSQRakve/rYAwfwP iesmrNrs5pUwIJukRfKtFqViaMKbzcV4yM52DIpMnBxe+NQBBxTR04adatxWJ/cz6nHEv8 aXwgRH3Z/O00Fcv8n5f3qhC/3inRNIg3+9853XMlZQEzz6WohxadfbcfY5JTAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695644820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCIuahURrEKqWykTbvP+Nnw+xQPSt5i/0E3oyCSjAzk=; b=oYxISg5u4AAG4omWX+ILysd3EmwSDi2m14g9Dl1yzfH7ezFbvY5s7E/zAFC83Ygvp4wA84 ntx8OrayylO6gfkKWZkjz0X1YlepXu5kljd6QnxdyZ1fRAQIyey/gpg19a9GL+iPQY9/sh K4tyH+qHH07Rmsy1FbBAZuOcW95o7X6aYUdL7L015JLvhJLVt3svEOtGqeMWNybsuwAO17 lzFp2AfcgTvuBbcnv0bN0Pd2/OJpCmu8aRpsaUrfIR+s0udhde0pp7PUgGU48k1oM9X1gQ QfXyyhHIex3k2Y1nE5nUkixN72XWAEFAkzpcqAONQWDae3oGk7XHekMFBmW/gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvMZD3Snwz1S7M; Mon, 25 Sep 2023 12:27:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PCR0fC094538; Mon, 25 Sep 2023 12:27:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PCR0UK094535; Mon, 25 Sep 2023 12:27:00 GMT (envelope-from git) Date: Mon, 25 Sep 2023 12:27:00 GMT Message-Id: <202309251227.38PCR0UK094535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: ed82385135cc - stable/14 - pf: fix state leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ed82385135cca73ab0416600269ace3e5bb4cd6c Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ed82385135cca73ab0416600269ace3e5bb4cd6c commit ed82385135cca73ab0416600269ace3e5bb4cd6c Author: Kristof Provost AuthorDate: 2023-09-06 07:58:07 +0000 Commit: Kristof Provost CommitDate: 2023-09-25 12:10:59 +0000 pf: fix state leak If we hit the csfailed case in pf_create_state() we may have allocated a state, so we must also free it. While here reduce the amount of duplicated cleanup code. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41772 (cherry picked from commit b6ce41118bb11d3db86eae8fbebc8c198e8b330d) --- sys/netpfil/pf/pf.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a5d7c1ba0155..7cee0833072b 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4881,13 +4881,8 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, if (r->rt) { /* pf_map_addr increases the reason counters */ if ((reason = pf_map_addr(pd->af, r, pd->src, &s->rt_addr, - &s->rt_kif, NULL, &sn)) != 0) { - pf_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); + &s->rt_kif, NULL, &sn)) != 0) goto csfailed; - } s->rt = r->rt; } @@ -4946,11 +4941,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { REASON_SET(&reason, PFRES_STATEINS); - pf_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); - return (PF_DROP); + goto drop; } else *sm = s; @@ -5019,6 +5010,14 @@ csfailed: PF_SRC_NODE_UNLOCK(nsn); } +drop: + if (s != NULL) { + pf_src_tree_remove_state(s); + s->timeout = PFTM_UNLINKED; + STATE_DEC_COUNTERS(s); + pf_free_state(s); + } + return (PF_DROP); } From nobody Mon Sep 25 12:27:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvMZQ74nmz4rGjn; Mon, 25 Sep 2023 12:27: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 4RvMZQ6N01z4DfK; Mon, 25 Sep 2023 12:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695644830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5W4nFLdXzyOcI04+OR6c+5fqvkYxieRSo0Vfpf180A=; b=pqNg1GVqGyw3A3tp5JphH815ni+xAGGusil1tupgoVHaPM3wSRHVhWCwYwtZ3rwlP6m1mK UnuDAeNuKhy/nqTj/38Ckymb1NDtHSoJz7/0CQF0d9zoVyss+Qmz3mlK/+MDT57HF1IdDf LJ4OfKysjX1byoUYMIO/KntLZtcCNz6QUGwPEgYm56PxSgyoJSNCLNC8fzGVFaQRLU0DDD GS6/fSxwnae4XF7wNkkRoEydo9QflYoecF8fa8KCfZV7kmFnOO0mVbkqLY1fTCV5c+JVxP A5D0UKDkrj6tic3PWBTKAbfkuWHlraRqu2wBChRaEQdtDtK4oeGlZrwx/yyoKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695644830; a=rsa-sha256; cv=none; b=wRBdDYTP9ZQ+IRdMeCIEYdlZfNqOr8PFp4TKVnBoCDfdBJr5d1e0UspksENSjJiAlyKN+7 Ngjn9K0lMLd0ZVuw0ToiJD9ovWHP/HigQODGf/khaqNchXBBeeshxHBAamCxp7Z+aKOXmG M2ysar/ISkbb8DcxpulNOkmqZfMf4v6UfJXPELOrm8bqWL/S517ZwKXTmhSe1aR3U/YD96 SmqKjRrgFtRuKsE5apsMl1neQySver/KGfpwvf8YY1pcCdsM25ZxUki/fkqnmoF+2TNdwX 2TuK/segqIapmZ5305VoQIeVIMjoF86nt68tkB35O1VQNBq7bwM49KFpMal0/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695644830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5W4nFLdXzyOcI04+OR6c+5fqvkYxieRSo0Vfpf180A=; b=pvdFLPW7cGGottRe2nzOXydFBEv0UZIgNCD1kEBIpZh1xckkPX0fbZaNy2hT8FwElccZ6O odokhaLOAYmyOVN4ejJkN+r/v4EVx1wrKNYKPBn4jBBg3V//PiEMafBqnzaZB2GZ3f8xF6 Ew1WXDNAqf61F+GFLPQcH2wZtWP6b2q4cJueS7WUJ+RiVEL1xPnzdSn8gLrnC1lU6nr/1k mb1Npd3wiIznuo3UMrdrmqjrriX48lSslKx40Hk6tgVadZc3T+4F2YBYsE+5u/ajhCgWyu OJ7ArJw46+DFs9i/RGBUlCxBv8TUPTn1R20bfQvyFoFFTm9REG2cwycv2QcNhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvMZQ5QZpz1SM6; Mon, 25 Sep 2023 12:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PCRAnt094690; Mon, 25 Sep 2023 12:27:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PCRAYT094687; Mon, 25 Sep 2023 12:27:10 GMT (envelope-from git) Date: Mon, 25 Sep 2023 12:27:10 GMT Message-Id: <202309251227.38PCRAYT094687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: ddca690373e5 - stable/13 - pf: fix state leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ddca690373e565a6e86ac1c0e025563ded0a686c Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddca690373e565a6e86ac1c0e025563ded0a686c commit ddca690373e565a6e86ac1c0e025563ded0a686c Author: Kristof Provost AuthorDate: 2023-09-06 07:58:07 +0000 Commit: Kristof Provost CommitDate: 2023-09-25 12:27:05 +0000 pf: fix state leak If we hit the csfailed case in pf_create_state() we may have allocated a state, so we must also free it. While here reduce the amount of duplicated cleanup code. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41772 (cherry picked from commit b6ce41118bb11d3db86eae8fbebc8c198e8b330d) --- sys/netpfil/pf/pf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 99fca2d6fabf..51f81172bad2 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4317,10 +4317,6 @@ 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_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); goto csfailed; } s->rt_kif = r->rpool.cur->kif; @@ -4381,11 +4377,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { REASON_SET(&reason, PFRES_STATEINS); - pf_src_tree_remove_state(s); - s->timeout = PFTM_UNLINKED; - STATE_DEC_COUNTERS(s); - pf_free_state(s); - return (PF_DROP); + goto drop; } else *sm = s; @@ -4461,6 +4453,14 @@ csfailed: PF_HASHROW_UNLOCK(sh); } +drop: + if (s != NULL) { + pf_src_tree_remove_state(s); + s->timeout = PFTM_UNLINKED; + STATE_DEC_COUNTERS(s); + pf_free_state(s); + } + return (PF_DROP); } From nobody Mon Sep 25 13:43:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPGl4Qgqz4rLqB; Mon, 25 Sep 2023 13:43:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvPGl2jXMz4MS6; Mon, 25 Sep 2023 13:43:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5031ccf004cso10381318e87.2; Mon, 25 Sep 2023 06:43:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695649421; x=1696254221; 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=3fpAlsm4iMHAaBlKs4ai3EuHArQJx/Nu9myacLXOSCM=; b=Rs7JV8pbLiAvv3zDrp716ZNElwDwxEAzWkqvqA7NDn8l0smg0k0cuV6Cm8xaCvkuEz NsAh24GkgpUMh59hre2fxmwbMrlDFLcLwoXSkvX3J0xi9KtsZWcWoWelwzRZ9uXDB+HI eAtYvEDYWX6Nx6nfyJPsQKGJw0d75X7HVelchiGjDnA5jhlhf8G8aPrGp9mClwY/qatg MPHTFEupdzni7zefj5Rr8I9gHAX2+D9nxnpzAshTJOj+qemkLXeLNpaHQlEohAl96dGM gWTA42KwicSCNSeL2un/mE6xwx6rBcbjLV8cG9W35ysBhkIU2pY5LLyyhJikbS7xUnqI JFdg== X-Gm-Message-State: AOJu0Yx/8MXP/skhridqjq39IU/3L073+EsQW/OaFOarJI4/e+VLTHFX lf3zYZs7exY/5v4ODpjE2l0YPtPbrdBYsn5O5PxVAoQHujN8UA== X-Google-Smtp-Source: AGHT+IHNzLwl8KlrGi8JUtG4eYE61KmA6EMpz/dO8xmbjom4SzMDPZTbNaJAvy9jhugr0podJhAaVBQ6cjcYbWmTkT8= X-Received: by 2002:ac2:515c:0:b0:501:c1d4:cf68 with SMTP id q28-20020ac2515c000000b00501c1d4cf68mr6168266lfd.15.1695649420829; Mon, 25 Sep 2023 06:43:40 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202309250926.38P9QklR093095@gitrepo.freebsd.org> In-Reply-To: <202309250926.38P9QklR093095@gitrepo.freebsd.org> From: Ed Maste Date: Mon, 25 Sep 2023 09:43:29 -0400 Message-ID: Subject: Re: git: 0a16d3d14db6 - main - linux(4): Update syscalls.master to 6.5 To: Dmitry Chagin Cc: 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-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4RvPGl2jXMz4MS6 On Mon, 25 Sept 2023 at 05:26, Dmitry Chagin wrote: > > The branch main has been updated by dchagin: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > > commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > Author: Dmitry Chagin > AuthorDate: 2023-09-25 09:24:58 +0000 > Commit: Dmitry Chagin > CommitDate: 2023-09-25 09:24:58 +0000 > > linux(4): Update syscalls.master to 6.5 I guess this should be 6.6? From nobody Mon Sep 25 13:46:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPKl6c1mz4rMMS; Mon, 25 Sep 2023 13:46: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 4RvPKl64dgz4N0y; Mon, 25 Sep 2023 13:46:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lT5782MHKWPxfx6vPRPdQpanf+un6kxePbxRpYOTlqI=; b=gIeRktHB2/P53O+muhWQD3+EMIwiwmqc4Xv07KWVhRvvfcZYmZ9ff9zMr1i/KsDY9Q00jn 4RbU5NZIvboQ5Nk8YTZbaMUS5q29oCyPJzok0GqTajE8ZsaJw9rpvhgkcuBHfSG9CBi3cv pxGMPTSs67Ic4avu5LXVFWVbZIx7sgZwdzKjI2lM11ukKwhs/W9r2Yj07ZT4iO8k5H++x1 q79JDLsUhHJHr1rzBX34+Qco1TobXOgFEj9kkZshMxEsfDfl489uMYnRyg/1k9P52wYZXj RY5a18MTerT/JlN7vr/MhB88lYzzEQer3Ep+dRJif60Tbj8Jg4KsLO+vlOX5Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649579; a=rsa-sha256; cv=none; b=vUdZ8PhAmtDsXxlxVyU1per9jW++quoIoAS+KXgulTWiLHJmArK53SSILzS9i30ktqgT9E b0aNoyWqMFlqoOeqm7KeFu0ULNAcKP6K79fVcEratwwP9wZHLRBGVr8wROe7p+ifQRpYfx I0xZzlLPFsNRcbSVmcgsZFNS+xuGIZuW0ZGtm1/Fdu5ezp49/7TQrbGLHABBfPEGH5SK5f uxt/EVQfZlrO38itZJ39G3hsqNdBOlsfT+gfX5iTVNTTpvPWqn9beY65Mhz/J+NJyAVDgs wn1/WHz8pTikL3prTD88h/HqQge8dn9fwI0mutnS7BPjAtTbUT9jWUlyv6ltlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lT5782MHKWPxfx6vPRPdQpanf+un6kxePbxRpYOTlqI=; b=nJpFIb8s3ggnax81MNpu+W6rZp6aUmMBZQEKJERyj2wpz+Ngqn2SoNJzscBmE7L1blQFrv W31u+FdnozVK51P7MK0c38WRlZNxnGaqrRaK0xV6hl+SyAT6QMUOW0/CC8OIh5Uzi6ioVW DTVv9+fpCjDnQzjfpNIi4HCUZhc59VQF93IQaKTbcHuAVzXCWrkkwqYCCyol+KPZeZr0Ox GGKzYmrJYJsbSSeJdySk2LBQOpjJhQmStWyWc66PRIHUf1RKJf1fYFg71SnDZ1eF1bk8Ze MnHFTiKELXhNk9/TnD/c4WOviBVNJFRrzYyfkF5e6cNN+bkUrmTBrWbXUj4Ccg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvPKl587Dz1Rw; Mon, 25 Sep 2023 13:46:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDkJ7e027743; Mon, 25 Sep 2023 13:46:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDkJsm027740; Mon, 25 Sep 2023 13:46:19 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:46:19 GMT Message-Id: <202309251346.38PDkJsm027740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2871b8a185b2 - stable/14 - bspatch: use C23 overflow checking math now that it is available List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2871b8a185b2c5b8de2d9f27301a7e523672b242 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2871b8a185b2c5b8de2d9f27301a7e523672b242 commit 2871b8a185b2c5b8de2d9f27301a7e523672b242 Author: Ed Maste AuthorDate: 2023-09-05 16:35:31 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:45:06 +0000 bspatch: use C23 overflow checking math now that it is available Reviewed by: des Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41771 (cherry picked from commit ee12faa062c04a49bf6fe4e6867bad8606e2413f) --- usr.bin/bsdiff/bspatch/bspatch.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/usr.bin/bsdiff/bspatch/bspatch.c b/usr.bin/bsdiff/bspatch/bspatch.c index a596ab1837dd..d7fabddabbfe 100644 --- a/usr.bin/bsdiff/bspatch/bspatch.c +++ b/usr.bin/bsdiff/bspatch/bspatch.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -64,15 +65,8 @@ add_off_t(off_t a, off_t b) { off_t result; -#if __GNUC__ >= 5 || \ - (defined(__has_builtin) && __has_builtin(__builtin_add_overflow)) - if (__builtin_add_overflow(a, b, &result)) + if (ckd_add(&result, a, b)) errx(1, "Corrupt patch"); -#else - if ((b > 0 && a > OFF_MAX - b) || (b < 0 && a < OFF_MIN - b)) - errx(1, "Corrupt patch"); - result = a + b; -#endif return result; } From nobody Mon Sep 25 13:46:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPKn0pS9z4rMLX; Mon, 25 Sep 2023 13:46: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 4RvPKn030hz4MqZ; Mon, 25 Sep 2023 13:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/4jOv4Qm9JLJQIFwq+/ta7a16X5ZiBZ/aSv6w+ROcqI=; b=uZwBtm/OmxcuYns8tZ53xFzramTzfvY4z9Pzm/PlYg59qN0NkAxLJbc79noCT5KqSQnW32 Krw8LTBevtjPhOqVemdHlXtwQE/mrkUotcW8pkgTUZarca1U7gMwebxXTWZtG3E+IyX3Or 18fAeZvY08qUvpszA1KwKpZPKV4jtSNiN7ju/UAJ0482P3u85Roqsaa8/2Dk/gXEvI3Opx nz2XqOYo6N4amY5gbJAvpJI09RnoDcaOSK+ypPsjd8UNsEYvRfJFWvbyg07oty24d5+d7F cbqoVpo/5SCd8oQrRmkzqsVfR3opaVHsS6OBg+bFgz4q1F6xqM9r5EddbhxOHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649581; a=rsa-sha256; cv=none; b=SBgnldJSAtmos1QS+yJhCFKU3pes5Y84gAFl2Emg8UoHh289n3/OeviFYCcVR+k7b70Rfk L1ARIX8E6EM5XVNO5XGMnbqWX1tyNm5V/FRb4IXh+oK4VR0e0Kmw4hUtZqYd9lCW8YCXdw p1HyqdDGy196eXbhMcdw0uhkNam9W/nErS7ksOID5li9A8AfkTRfOvVtVUvn41whPBdbU6 BPnc609e8AabrMnkKtviZEu6HUV7h0g6tDMyHK7qfD3mCQn1tq34AEXTkvlC1ndDj70U8C n+ZoFnkgokNxbfTEr/J+xDE6sRWkveSdvk3czhBRYWOyeoWVH1dVmLGnX3GRWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/4jOv4Qm9JLJQIFwq+/ta7a16X5ZiBZ/aSv6w+ROcqI=; b=oOiRECvaXAeEljEYCszKztiS6SrFodNRaXrcE0950AQ7PDTr6JbmorT1uIZpBIGwvSO4Sm AW/N3bx1OfKZLB/RZwL4Lz+X6zdIGxfF+toni4s/FLbiYKw3BsHbrnmZe77F2P8gsLYDv3 rnwU5W0oZ9gWw8TrgLBtOh1sO0a6TS6XuJ1YY+QUxOBAjCrap14FgxYHwjfbukFRLPX8my KFWEAWqpi2f9oGynAN2O4VGsh64jI78fdhUDoC/hQKyZUmN3coVVNQgztS//mRHTfpCGpG pwAQgneXrU3OgaRtgrzXG7IBsK52zv5qcXPHFxdW6g9ghxAZEC3GnxILeiwqiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvPKm6C4bz1CT; Mon, 25 Sep 2023 13:46:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDkKwB027805; Mon, 25 Sep 2023 13:46:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDkKVh027802; Mon, 25 Sep 2023 13:46:20 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:46:20 GMT Message-Id: <202309251346.38PDkKVh027802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d0c0dcf9db7e - stable/14 - x86: Add defines for workaround bits in AMD's MSR "Decode Configuration" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d0c0dcf9db7e558a58fbec2d49c293d118ea6979 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d0c0dcf9db7e558a58fbec2d49c293d118ea6979 commit d0c0dcf9db7e558a58fbec2d49c293d118ea6979 Author: Olivier Certner AuthorDate: 2023-09-11 13:10:35 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:45:06 +0000 x86: Add defines for workaround bits in AMD's MSR "Decode Configuration" They are a bit more informative than raw hexadecimal values. While here, sort existing defines of bits for AMD MSRs to match the address order. Reviewed by: kib, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41816 (cherry picked from commit 125bbadf6084ac341673c9eb1979a740d3d5899a) --- sys/amd64/amd64/initcpu.c | 5 +++-- sys/x86/include/specialreg.h | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index 4debe89426df..a048c08fc9ae 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -101,7 +101,8 @@ init_amd(void) case 0x10: case 0x12: if ((cpu_feature2 & CPUID2_HV) == 0) - wrmsr(MSR_DE_CFG, rdmsr(MSR_DE_CFG) | 1); + wrmsr(MSR_DE_CFG, rdmsr(MSR_DE_CFG) | + DE_CFG_10H_12H_STACK_POINTER_JUMP_FIX_BIT); break; } @@ -151,7 +152,7 @@ init_amd(void) (cpu_feature2 & CPUID2_HV) == 0) { /* 1021 */ msr = rdmsr(MSR_DE_CFG); - msr |= 0x2000; + msr |= DE_CFG_ZEN_LOAD_STALE_DATA_FIX_BIT; wrmsr(MSR_DE_CFG, msr); /* 1033 */ diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 548d6010e7b8..f45990a056c8 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -1162,11 +1162,16 @@ #define MSR_IC_CFG 0xc0011021 /* Instruction Cache Configuration */ #define MSR_DE_CFG 0xc0011029 /* Decode Configuration */ +/* MSR_AMDK8_IPM */ +#define AMDK8_SMIONCMPHALT (1ULL << 27) +#define AMDK8_C1EONCMPHALT (1ULL << 28) + /* MSR_VM_CR related */ #define VM_CR_SVMDIS 0x10 /* SVM: disabled by BIOS */ -#define AMDK8_SMIONCMPHALT (1ULL << 27) -#define AMDK8_C1EONCMPHALT (1ULL << 28) +/* MSR_DE_CFG */ +#define DE_CFG_10H_12H_STACK_POINTER_JUMP_FIX_BIT 0x1 +#define DE_CFG_ZEN_LOAD_STALE_DATA_FIX_BIT 0x2000 /* VIA ACE crypto featureset: for via_feature_rng */ #define VIA_HAS_RNG 1 /* cpu has RNG */ From nobody Mon Sep 25 13:46:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPKp1b9Sz4rMLc; Mon, 25 Sep 2023 13:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvPKp17xyz4Mw9; Mon, 25 Sep 2023 13:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GNZb66yv7ExIcxu0ZHk+F3CydClJj06Elv7eR+qjeb4=; b=SMYlLty1AofqNgK/DU+8aKDzQIPGuqdxP7nVjyjN+BLu30ekhGXwK0KjLRjRbC2LTDUA9J 2CGkbnan2815+a6ErTEh47fP80SL5Xd1oX+r3iVwWzo7dX+dWzDRL5AvJU9U2lz88GS6z1 QuwD1R5dXVop1QpbK3uM70DvrwkiHAuW54AjKzZAq3ABUeI/pgaVDmrk86D5D0nngvu5oZ oc58aUTURbXtKiNpuoEkrFowWX1Hz4Ej+TO6h9tfsUYShFHErbBm1PrOGG5KwTFG87uqQ9 YFMkOXCmIL4i5bFPeKtp+XbvgGC4GYJLNb5jq4/62UyTOPvW/N0c209Leu0/Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649582; a=rsa-sha256; cv=none; b=O4pwV11OlTNjK78gHTxRI/mB8lA4fekepIYQqNwapeYFIW5ojAfZRDv8bl1GzkndtS+rU6 MDB0y/ALbM6zJoI3v4CirO/UX1ZOSQHg4DJYLQgpQFvdBZ4iilxNwl3sYp5DN6kyFmeOXi 6AF6crXGedUWirExrfzZLvZ1qcZXWv8glF1VeDFfnjiYCei8p7c6xvJXa4txOHv2xthFIP obKhfJgJ2RKpITNlg9KI4rrMsigt/TXzIMOnoyarc4q1qMJkdgXlAsmins2BSMvu/hqZHO o2ujlOmV4A/sEgKSo17uNroWdXYzPTS9XMv8DSZx53iH+dQTSugdTY5w2Lz6Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GNZb66yv7ExIcxu0ZHk+F3CydClJj06Elv7eR+qjeb4=; b=GgAjAOdhGQr76d6pxkBtQTtLxfoyyUS3D1J/4ObpcYFPuxLsqOyTdtdYDH/dqzXWekQQk1 rKDqlUeCEQlM6QUZ7bvZV7GOXCi2APbXAf+7XCLHV3EZdxw9gxRpVIU9ZZfPasDi7MKhHM Hr2X3nllCo1SEnshvxMfddx3+RKVY4m16dXD5C6z8OGASzbHnkP36IhYUvf8A3qom8Ru9Q fp975njTQqCXKhinPZdtSe6EWJ1xhReaEaR/3XXDuvf47rz7odf4lO8UtlG/UKvCABs7DW Wi3pxEnbsAcbbGz5GVlN8Tc+TdlA8STLKv94v0KDpjQf9rNLYtq3uPlDyfix5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvPKp06HPz254; Mon, 25 Sep 2023 13:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDkLRA027853; Mon, 25 Sep 2023 13:46:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDkLsd027850; Mon, 25 Sep 2023 13:46:21 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:46:21 GMT Message-Id: <202309251346.38PDkLsd027850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fd8bf2ecc05a - stable/14 - libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fd8bf2ecc05af841aa7e8369a43861cdc122d404 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fd8bf2ecc05af841aa7e8369a43861cdc122d404 commit fd8bf2ecc05af841aa7e8369a43861cdc122d404 Author: John Hein AuthorDate: 2023-09-21 23:43:05 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:45:06 +0000 libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum PR: 273966 Reviewed by: emaste (cherry picked from commit 633094c27f0ac1b1001d5bd24a883240b4bce1dc) --- lib/libprocstat/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c index dea078c848eb..cf3435a10c79 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -119,7 +119,7 @@ procstat_core_open(const char *filename) warnx("%s is not a CORE file", filename); goto fail; } - if (elf_getphnum(e, &nph) == 0) { + if (elf_getphdrnum(e, &nph) == -1) { warnx("program headers not found"); goto fail; } From nobody Mon Sep 25 13:46:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPKq3lPyz4rMQ4; Mon, 25 Sep 2023 13:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvPKq1lWTz4Mwk; Mon, 25 Sep 2023 13:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZM8tILfOkd7Mk+Pq56dRivU43wHAkPmM6DKZAYO92v8=; b=ms1G6imlEXnZDLb5o/vlKaDgSniYX1kCGK8JkF6/L7fAXNVAzYBgXa4sNMHimp58B0HGsO G12pZ81jwoE5PfWVynvwTh7S1vRdD6rSXKohBx+KDvYna0Rfh/32nUge7QdSfg9FimB4Ie m9k8EWMJl4T+0QYzXylPPKKDxwCNxjSav9yoQ+WvGU7nUTnZnJQTIXle2LpaNTvLgSbORy ez9fJm3XnoTgFIrzJE7lioaXYVo8oR0GSNRlN3qqz0gH5DZRqmSyJ3LWTji7fId/DzHTDs xliPrPxm7YmhPG14OatJhguy+qdtwCT70ooothyn4BFaFNvwYLM142bjO1ZR5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649583; a=rsa-sha256; cv=none; b=iaTTXeiK8+EwNkOI+DGtNLGdC+/dtTmX091NCXgB7sYyT8b4woSAs4Ov+q/Gi6w9nSA+xf KxuXKVG0d6q+zf+LtBwhNrriY+L/+SK7BmrbbG3ls3Z9bNqoClvqW1lnETJYjABJH1KB9r RL2/I2ItLehmqm5ZJlPOEF3gCjgdqCWW+tTkIaIA3Ym1a95fv0YhSHal+t6uk0Jxl6AUzz saIYWJpOm6KgB/l2vw0pNCPQeGsxcuZualEE+i6Wg++Pb7J6UWMeXVaYsYIUqPX4mOM5iQ 2s0YtXKU7BYJpNovJR4jqbhV3qq5XHURDm2Nj2WuoPVo7A14UkTpebDKkGHr9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZM8tILfOkd7Mk+Pq56dRivU43wHAkPmM6DKZAYO92v8=; b=GPqFYkzq2iTZ9qA9cLXwjet8QYGxzuJMDc4wKBn4NoCHwKYCmyeLWStrOsOyCQopoWD9TP FwDQy3nq1gxqsHulh0roetOSP3Ax4LhtmPdaLjaQLFhAtPSVSj9fK3Qh+OrIJCO+fsTOXg D0Jnuefu9FntzQTMMGUK8eBZVW2Umesr/XkSn6HIXne0PqQUaMaaLUP+Ta3xazJKrFB5HT Ow/QTiCZ/8XGuq5lPFuPgrGIdlZSdxKOc57yLfShGE15MUGe5BJZ8/FLnB8oNMcKOlWfX9 lqSxV0dhV5wlRWyEz3//pwvloW+aaLn2ezNZVTsRCVuqWnn1eFYZW5i0a1V/FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvPKq0ggzz26g; Mon, 25 Sep 2023 13:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDkNeK027905; Mon, 25 Sep 2023 13:46:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDkMra027903; Mon, 25 Sep 2023 13:46:22 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:46:22 GMT Message-Id: <202309251346.38PDkMra027903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: e30f7d9b9bb4 - stable/14 - netlink: add unregister call in cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e30f7d9b9bb48368b49d815f519280b733959c81 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e30f7d9b9bb48368b49d815f519280b733959c81 commit e30f7d9b9bb48368b49d815f519280b733959c81 Author: Lin Ma AuthorDate: 2023-06-19 09:32:59 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:45:06 +0000 netlink: add unregister call in cleanup For protocols that use netlink (generic and route for now), the unint handler seems to have forgotten to call unregister, which will cause the assertion the next time the module is loaded. This patch adds unregister call to netlink_unregister_proto() for those handlers to avoid bad things happen. Reviewed-by: melifaro Fixes: 7e5bf68495cc ("netlink: add netlink support") Pull-request: https://github.com/freebsd/freebsd-src/pull/781 Signed-off-by: Lin Ma (cherry picked from commit 4bdf7f695184fb4312462ad475f3302c9da40f13) --- sys/netlink/netlink_generic.c | 1 + sys/netlink/netlink_route.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 54fc702d8ac6..b28b206a7ace 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -296,6 +296,7 @@ SYSINIT(genl_load_all, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, genl_load_all, NULL) static void genl_unload(void *u __unused) { + netlink_unregister_proto(NETLINK_GENERIC); EVENTHANDLER_DEREGISTER(genl_family_event, family_event_tag); genl_unregister_family(CTRL_FAMILY_NAME); NET_EPOCH_WAIT(); diff --git a/sys/netlink/netlink_route.c b/sys/netlink/netlink_route.c index 6da074926405..6b293f7ef19c 100644 --- a/sys/netlink/netlink_route.c +++ b/sys/netlink/netlink_route.c @@ -134,6 +134,7 @@ static void rtnl_unload(void *u __unused) { netlink_callback_p = nlbridge_orig_p; + netlink_unregister_proto(NETLINK_ROUTE); rtnl_ifaces_destroy(); rtnl_neighs_destroy(); From nobody Mon Sep 25 13:49:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPPg3Gsyz4rMbx; Mon, 25 Sep 2023 13:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvPPg2y1lz4P09; Mon, 25 Sep 2023 13: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=1695649783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKJbE/f9VIkv5cda3C0ll7foGhV43Vebul58pOzKcBA=; b=FgYq6J1p9xrbeaU3XPKwg4Ex1+L9IME/oZuzoTTM0XIthZa7cyY1tnH/gFCmCHiZJg6c1x 4ZeEVDans445SZ45NmG1rCJ76THj/HSI/c8JEv2N6WW/5eHmBUjQ/a+KMQl+ayf4/76lpw kzxnCmqmyeWozqTiktVQrHciVfK32kUnMxMBt5OGp9o674JiFXnbPcOLCCdBP1TvTQBB2Y DpPENW6FG6QYqEteMdO4cxg1Kov9xWJSBkIQe95/l98Fe/+KIpFiHzw9tIGOztI4IqHYkq 51TIJWs6/SpzK87/coTC7u6LTMqslSr6fSMqszkNpHNDj4gV9MGGUyDQngA7og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649783; a=rsa-sha256; cv=none; b=C/id/8nd0KlbLbu9MtKd6UrM9c+oJiojOXobqUNnsuT2r9s+sbYq11XxP5IE6Xm8lPSQ9p DB/YODG4VsrBVlSuU4Xt0twnC4YCdAkyO/5MGAKiuc1KDU8V4wwauTyH5COC/6igvtK5Pg lWFQj5E5dkNSemgBFYB3z791Ouq9rA5rG9pePRdm2Qw8O9KMlflq+Kodjz9EETU7d1lOIV mp0uytf1EXp7nyRMlEkLu8SkHERQ9yFl8q6paUebqM/24pjXGmgr9X/T7CM6ldeFhBGzn4 4GaTLMhlsGz93pwn7thprPY0xqgtpYtspHzBIBFZe7y7QSvbhxthbgehN//4Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKJbE/f9VIkv5cda3C0ll7foGhV43Vebul58pOzKcBA=; b=wTkbG9TMQLOplrIYqTOMIPmmyDLxdsTq39xNew9+b9qhO/e9jjDpc08V+Ct5JV3Lhfver8 GNxpg3osiJ5tWo6ZreBG225RTLyCdRryLF1SB1rVt/EgVHuQRs+3FA0O+uiaWw7kaPVUUv LvvijbGf6n/g4YWDyESBK+BWtrfPL3RjdmsfnBSGaDFhffdmqiQAqiK2DphJKYIfWSmD4a Kxm2hT5lMnH1Ra71bpTmQ7RGMSI+bUlhNyo6bMUT9CNLTjz/RzoPLbBjszRR8ZbYMdmmyV Nngo08/jqPfmSsEAwS8Z1GjnrdsB7BsJqf1M9BBln57OhYM52NGsAkgJ6tgujg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvPPg1hRwz1Ry; Mon, 25 Sep 2023 13:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDnhQN028537; Mon, 25 Sep 2023 13:49:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDnhMS028534; Mon, 25 Sep 2023 13:49:43 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:49:43 GMT Message-Id: <202309251349.38PDnhMS028534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 08f02c751b34 - stable/13 - Remove "All Rights Reserved" from Foundation copyrights List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 08f02c751b34990719f55692a5450eef357352c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=08f02c751b34990719f55692a5450eef357352c5 commit 08f02c751b34990719f55692a5450eef357352c5 Author: Ed Maste AuthorDate: 2022-06-30 14:52:29 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:49:25 +0000 Remove "All Rights Reserved" from Foundation copyrights Sponsored by: The FreeBSD Foundation (cherry picked from commit 7fde0187cc443468561f0a30d589ff0cfe45eef5) (cherry picked from commit 560e22c8fe460e00d16e5268fe1fbb316ad81101) (cherry picked from commit 5b5fa75acff11d871d0c90045f8c1a58fed85365) --- lib/libc/aarch64/gen/_ctx_start.S | 1 - lib/libc/aarch64/gen/fabs.S | 1 - lib/libc/aarch64/gen/fpgetmask.c | 1 - lib/libc/aarch64/gen/fpsetmask.c | 1 - lib/libc/aarch64/gen/makecontext.c | 1 - lib/libc/aarch64/gen/sigsetjmp.S | 1 - lib/libc/aarch64/sys/syscall.S | 1 - lib/libc/capability/cap_rights_init.3 | 1 - lib/libc/gdtoa/machdep_ldisQ.c | 2 +- lib/libc/gdtoa/machdep_ldisd.c | 2 +- lib/libc/gdtoa/machdep_ldisx.c | 2 +- lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c | 1 - lib/libc/gen/cap_rights_get.3 | 1 - lib/libc/gen/cap_sandboxed.3 | 1 - lib/libc/gen/cap_sandboxed.c | 1 - lib/libc/gen/fnmatch.c | 2 +- lib/libc/gen/glob.c | 2 +- lib/libc/gen/memalign.c | 1 - lib/libc/locale/ascii.c | 2 +- lib/libc/locale/big5.c | 2 +- lib/libc/locale/btowc.c | 2 +- lib/libc/locale/collate.c | 2 +- lib/libc/locale/collate.h | 2 +- lib/libc/locale/collcmp.c | 2 +- lib/libc/locale/ctype.c | 1 - lib/libc/locale/ctype_l.3 | 1 - lib/libc/locale/duplocale.3 | 1 - lib/libc/locale/euc.c | 2 +- lib/libc/locale/freelocale.3 | 1 - lib/libc/locale/gb18030.c | 2 +- lib/libc/locale/gb2312.c | 2 +- lib/libc/locale/gbk.c | 2 +- lib/libc/locale/lmessages.c | 2 +- lib/libc/locale/lmessages.h | 2 +- lib/libc/locale/lmonetary.c | 2 +- lib/libc/locale/lmonetary.h | 2 +- lib/libc/locale/lnumeric.c | 2 +- lib/libc/locale/lnumeric.h | 2 +- lib/libc/locale/localeconv.c | 2 +- lib/libc/locale/mblen.c | 2 +- lib/libc/locale/mblocal.h | 2 +- lib/libc/locale/mbrlen.c | 2 +- lib/libc/locale/mbrtowc.c | 2 +- lib/libc/locale/mbsinit.c | 2 +- lib/libc/locale/mbsnrtowcs.c | 3 +-- lib/libc/locale/mbsrtowcs.c | 2 +- lib/libc/locale/mbstowcs.c | 2 +- lib/libc/locale/mbtowc.c | 2 +- lib/libc/locale/mskanji.c | 2 +- lib/libc/locale/newlocale.3 | 1 - lib/libc/locale/nextwctype.c | 2 +- lib/libc/locale/nl_langinfo.c | 2 +- lib/libc/locale/none.c | 2 +- lib/libc/locale/querylocale.3 | 1 - lib/libc/locale/runetype.c | 2 +- lib/libc/locale/setrunelocale.c | 2 +- lib/libc/locale/table.c | 2 +- lib/libc/locale/tolower.c | 2 +- lib/libc/locale/toupper.c | 2 +- lib/libc/locale/uselocale.3 | 1 - lib/libc/locale/utf8.c | 2 +- lib/libc/locale/wcrtomb.c | 2 +- lib/libc/locale/wcsftime.c | 2 +- lib/libc/locale/wcsnrtombs.c | 2 +- lib/libc/locale/wcsrtombs.c | 2 +- lib/libc/locale/wcstod.c | 2 +- lib/libc/locale/wcstof.c | 2 +- lib/libc/locale/wcstoimax.c | 2 +- lib/libc/locale/wcstol.c | 2 +- lib/libc/locale/wcstold.c | 2 +- lib/libc/locale/wcstoll.c | 2 +- lib/libc/locale/wcstombs.c | 2 +- lib/libc/locale/wcstoul.c | 2 +- lib/libc/locale/wcstoull.c | 2 +- lib/libc/locale/wcstoumax.c | 2 +- lib/libc/locale/wctob.c | 2 +- lib/libc/locale/wctomb.c | 2 +- lib/libc/locale/wctrans.c | 2 +- lib/libc/locale/wctype.c | 2 +- lib/libc/locale/wcwidth.c | 2 +- lib/libc/locale/xlocale.3 | 1 - lib/libc/locale/xlocale.c | 1 - lib/libc/locale/xlocale_private.h | 1 - lib/libc/regex/regcomp.c | 2 +- lib/libc/stdio/asprintf.c | 2 +- lib/libc/stdio/fgetwc.c | 2 +- lib/libc/stdio/fgetwln.c | 2 +- lib/libc/stdio/fgetws.c | 2 +- lib/libc/stdio/fprintf.c | 2 +- lib/libc/stdio/fputwc.c | 2 +- lib/libc/stdio/fputws.c | 2 +- lib/libc/stdio/fscanf.c | 2 +- lib/libc/stdio/fwprintf.c | 2 +- lib/libc/stdio/fwscanf.c | 2 +- lib/libc/stdio/getwc.c | 2 +- lib/libc/stdio/getwchar.c | 2 +- lib/libc/stdio/local.h | 2 +- lib/libc/stdio/printf.c | 2 +- lib/libc/stdio/printfcommon.h | 2 +- lib/libc/stdio/putwc.c | 2 +- lib/libc/stdio/putwchar.c | 2 +- lib/libc/stdio/scanf.c | 2 +- lib/libc/stdio/snprintf.c | 2 +- lib/libc/stdio/sprintf.c | 2 +- lib/libc/stdio/sscanf.c | 2 +- lib/libc/stdio/swprintf.c | 2 +- lib/libc/stdio/swscanf.c | 2 +- lib/libc/stdio/ungetwc.c | 2 +- lib/libc/stdio/vasprintf.c | 2 +- lib/libc/stdio/vdprintf.c | 2 +- lib/libc/stdio/vfprintf.c | 2 +- lib/libc/stdio/vfscanf.c | 2 +- lib/libc/stdio/vfwprintf.c | 2 +- lib/libc/stdio/vfwscanf.c | 2 +- lib/libc/stdio/vprintf.c | 2 +- lib/libc/stdio/vscanf.c | 2 +- lib/libc/stdio/vsnprintf.c | 2 +- lib/libc/stdio/vsprintf.c | 2 +- lib/libc/stdio/vsscanf.c | 2 +- lib/libc/stdio/vswprintf.c | 2 +- lib/libc/stdio/vswscanf.c | 2 +- lib/libc/stdio/vwprintf.c | 2 +- lib/libc/stdio/vwscanf.c | 2 +- lib/libc/stdio/wprintf.c | 2 +- lib/libc/stdio/wscanf.c | 2 +- lib/libc/stdlib/atof.c | 2 +- lib/libc/stdlib/atoi.c | 2 +- lib/libc/stdlib/atol.c | 2 +- lib/libc/stdlib/atoll.c | 2 +- lib/libc/stdlib/cxa_thread_atexit.c | 1 - lib/libc/stdlib/strfmon.c | 2 +- lib/libc/stdlib/strtoimax.c | 2 +- lib/libc/stdlib/strtol.c | 2 +- lib/libc/stdlib/strtold.c | 1 - lib/libc/stdlib/strtoll.c | 2 +- lib/libc/stdlib/strtoul.c | 2 +- lib/libc/stdlib/strtoull.c | 2 +- lib/libc/stdlib/strtoumax.c | 2 +- lib/libc/stdtime/strftime.c | 2 +- lib/libc/stdtime/strptime.c | 2 +- lib/libc/stdtime/timelocal.c | 2 +- lib/libc/stdtime/timelocal.h | 2 +- lib/libc/string/mempcpy.c | 1 - lib/libc/string/strcasecmp.c | 2 +- lib/libc/string/strcasestr.c | 2 +- lib/libc/string/strcoll.c | 2 +- lib/libc/string/strxfrm.c | 2 +- lib/libc/string/wcscoll.c | 2 +- lib/libc/string/wcswidth.c | 2 +- lib/libc/string/wcsxfrm.c | 2 +- lib/libc/string/wmempcpy.c | 1 - lib/libc/sys/POSIX2x_Fork.c | 1 - lib/libc/sys/_umtx_op.2 | 1 - lib/libc/sys/accept.c | 1 - lib/libc/sys/accept4.c | 1 - lib/libc/sys/aio_suspend.c | 1 - lib/libc/sys/bindat.2 | 1 - lib/libc/sys/cap_fcntls_limit.2 | 1 - lib/libc/sys/cap_ioctls_limit.2 | 1 - lib/libc/sys/close.c | 1 - lib/libc/sys/connect.c | 1 - lib/libc/sys/connectat.2 | 1 - lib/libc/sys/fcntl.c | 1 - lib/libc/sys/fdatasync.c | 1 - lib/libc/sys/fork.c | 1 - lib/libc/sys/fsync.2 | 1 - lib/libc/sys/fsync.c | 1 - lib/libc/sys/interposing_table.c | 1 - lib/libc/sys/kevent.c | 1 - lib/libc/sys/msync.c | 1 - lib/libc/sys/nanosleep.c | 1 - lib/libc/sys/open.c | 1 - lib/libc/sys/openat.c | 1 - lib/libc/sys/pdfork.c | 1 - lib/libc/sys/poll.c | 1 - lib/libc/sys/ppoll.c | 1 - lib/libc/sys/pselect.c | 1 - lib/libc/sys/ptrace.c | 1 - lib/libc/sys/read.c | 1 - lib/libc/sys/readv.c | 1 - lib/libc/sys/recvfrom.c | 1 - lib/libc/sys/recvmsg.c | 1 - lib/libc/sys/select.c | 1 - lib/libc/sys/sendmsg.c | 1 - lib/libc/sys/sendto.c | 1 - lib/libc/sys/setcontext.c | 1 - lib/libc/sys/sigaction.c | 1 - lib/libc/sys/sigprocmask.c | 1 - lib/libc/sys/sigsuspend.c | 1 - lib/libc/sys/sigtimedwait.c | 1 - lib/libc/sys/sigwaitinfo.c | 1 - lib/libc/sys/thr_exit.2 | 1 - lib/libc/sys/thr_kill.2 | 1 - lib/libc/sys/thr_new.2 | 1 - lib/libc/sys/thr_self.2 | 1 - lib/libc/sys/thr_set_name.2 | 1 - lib/libc/sys/thr_suspend.2 | 1 - lib/libc/sys/thr_wake.2 | 1 - lib/libc/sys/wait4.c | 1 - lib/libc/sys/wait6.c | 1 - lib/libc/sys/write.c | 1 - lib/libc/sys/writev.c | 1 - lib/libc/x86/sys/pkru.3 | 1 - lib/libc/x86/sys/pkru.c | 1 - share/man/man3/pthread_mutex_consistent.3 | 1 - share/man/man4/bhnd_chipc.4 | 1 - share/man/man4/bhnd_pmu.4 | 1 - share/man/man4/cc_chd.4 | 1 - share/man/man4/cc_hd.4 | 1 - share/man/man4/cc_vegas.4 | 1 - share/man/man4/fdt.4 | 1 - share/man/man4/fdtbus.4 | 1 - share/man/man4/h_ertt.4 | 1 - share/man/man4/man4.aarch64/armv8crypto.4 | 1 - share/man/man4/mod_cc.4 | 1 - share/man/man4/siftr.4 | 1 - share/man/man4/simplebus.4 | 1 - share/man/man7/arch.7 | 2 +- share/man/man7/crypto.7 | 1 - share/man/man8/uefi.8 | 1 - share/man/man9/VOP_READ_PGCACHE.9 | 1 - share/man/man9/casuword.9 | 1 - share/man/man9/hhook.9 | 1 - share/man/man9/khelp.9 | 1 - share/man/man9/vnet.9 | 1 - 225 files changed, 125 insertions(+), 226 deletions(-) diff --git a/lib/libc/aarch64/gen/_ctx_start.S b/lib/libc/aarch64/gen/_ctx_start.S index 1aeea94d0229..15edcf21d463 100644 --- a/lib/libc/aarch64/gen/_ctx_start.S +++ b/lib/libc/aarch64/gen/_ctx_start.S @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/aarch64/gen/fabs.S b/lib/libc/aarch64/gen/fabs.S index 79f74ecc2647..29e4b89d5ee1 100644 --- a/lib/libc/aarch64/gen/fabs.S +++ b/lib/libc/aarch64/gen/fabs.S @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 The FreeBSD Foundation - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/lib/libc/aarch64/gen/fpgetmask.c b/lib/libc/aarch64/gen/fpgetmask.c index 34309d86959f..7bc56a9d75be 100644 --- a/lib/libc/aarch64/gen/fpgetmask.c +++ b/lib/libc/aarch64/gen/fpgetmask.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/aarch64/gen/fpsetmask.c b/lib/libc/aarch64/gen/fpsetmask.c index c91ba2498b13..1ad3f49d603d 100644 --- a/lib/libc/aarch64/gen/fpsetmask.c +++ b/lib/libc/aarch64/gen/fpsetmask.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/aarch64/gen/makecontext.c b/lib/libc/aarch64/gen/makecontext.c index d1775efa4725..ae23ad87d3a2 100644 --- a/lib/libc/aarch64/gen/makecontext.c +++ b/lib/libc/aarch64/gen/makecontext.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/aarch64/gen/sigsetjmp.S b/lib/libc/aarch64/gen/sigsetjmp.S index df75b9399d73..cdff7a46c85b 100644 --- a/lib/libc/aarch64/gen/sigsetjmp.S +++ b/lib/libc/aarch64/gen/sigsetjmp.S @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/aarch64/sys/syscall.S b/lib/libc/aarch64/sys/syscall.S index d373e1d6c52e..2c7e207f82f7 100644 --- a/lib/libc/aarch64/sys/syscall.S +++ b/lib/libc/aarch64/sys/syscall.S @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/capability/cap_rights_init.3 b/lib/libc/capability/cap_rights_init.3 index 3267cc632498..80b522820097 100644 --- a/lib/libc/capability/cap_rights_init.3 +++ b/lib/libc/capability/cap_rights_init.3 @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2013 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by Pawel Jakub Dawidek under sponsorship .\" from the FreeBSD Foundation. diff --git a/lib/libc/gdtoa/machdep_ldisQ.c b/lib/libc/gdtoa/machdep_ldisQ.c index a6045f59e5d0..d39d57e9d292 100644 --- a/lib/libc/gdtoa/machdep_ldisQ.c +++ b/lib/libc/gdtoa/machdep_ldisQ.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/gdtoa/machdep_ldisd.c b/lib/libc/gdtoa/machdep_ldisd.c index 776b3d8f898a..79370e05c604 100644 --- a/lib/libc/gdtoa/machdep_ldisd.c +++ b/lib/libc/gdtoa/machdep_ldisd.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/gdtoa/machdep_ldisx.c b/lib/libc/gdtoa/machdep_ldisx.c index cc77946de0b7..7c7c0d9e5d28 100644 --- a/lib/libc/gdtoa/machdep_ldisx.c +++ b/lib/libc/gdtoa/machdep_ldisx.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c b/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c index ee7a12f1c1ac..1f0a8f7a944d 100644 --- a/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c +++ b/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c @@ -1,6 +1,5 @@ /* * Copyright (c) 2014 The FreeBSD Foundation. - * All rights reserved. * * Portions of this software were developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/gen/cap_rights_get.3 b/lib/libc/gen/cap_rights_get.3 index 46013a06ea3c..e99424c7afdc 100644 --- a/lib/libc/gen/cap_rights_get.3 +++ b/lib/libc/gen/cap_rights_get.3 @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2013 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by Pawel Jakub Dawidek under sponsorship .\" from the FreeBSD Foundation. diff --git a/lib/libc/gen/cap_sandboxed.3 b/lib/libc/gen/cap_sandboxed.3 index e3e19d709741..6e2004fb7a29 100644 --- a/lib/libc/gen/cap_sandboxed.3 +++ b/lib/libc/gen/cap_sandboxed.3 @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2012 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by Pawel Jakub Dawidek under sponsorship .\" from the FreeBSD Foundation. diff --git a/lib/libc/gen/cap_sandboxed.c b/lib/libc/gen/cap_sandboxed.c index 0252a702c6e4..d01d94735bec 100644 --- a/lib/libc/gen/cap_sandboxed.c +++ b/lib/libc/gen/cap_sandboxed.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index ebf18fc6a1c4..e211f3d535ad 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -8,7 +8,7 @@ * Guido van Rossum. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index c2744b80ac69..52a5ce4e7197 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -8,7 +8,7 @@ * Guido van Rossum. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/gen/memalign.c b/lib/libc/gen/memalign.c index 60daeaf3a884..af64c998dbd4 100644 --- a/lib/libc/gen/memalign.c +++ b/lib/libc/gen/memalign.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2020 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/lib/libc/locale/ascii.c b/lib/libc/locale/ascii.c index 2bf62386dc14..55761626d67b 100644 --- a/lib/libc/locale/ascii.c +++ b/lib/libc/locale/ascii.c @@ -9,7 +9,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/big5.c b/lib/libc/locale/big5.c index de0c10ce3f28..77c19e9d7c0e 100644 --- a/lib/libc/locale/big5.c +++ b/lib/libc/locale/big5.c @@ -9,7 +9,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/btowc.c b/lib/libc/locale/btowc.c index cd9e11524369..e5e4951fedd8 100644 --- a/lib/libc/locale/btowc.c +++ b/lib/libc/locale/btowc.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c index be995a5b963f..60c14a7de552 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -8,7 +8,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/collate.h b/lib/libc/locale/collate.h index 8a0b61db6ee1..2d3723b49f5b 100644 --- a/lib/libc/locale/collate.h +++ b/lib/libc/locale/collate.h @@ -7,7 +7,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/collcmp.c b/lib/libc/locale/collcmp.c index c3fe384aee4b..7b2d6723411b 100644 --- a/lib/libc/locale/collcmp.c +++ b/lib/libc/locale/collcmp.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/ctype.c b/lib/libc/locale/ctype.c index 2d5866a751ee..a907ac4234fd 100644 --- a/lib/libc/locale/ctype.c +++ b/lib/libc/locale/ctype.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. * * This software was developed by David Chisnall under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libc/locale/ctype_l.3 b/lib/libc/locale/ctype_l.3 index 7c45e240e2d6..6879ba72706e 100644 --- a/lib/libc/locale/ctype_l.3 +++ b/lib/libc/locale/ctype_l.3 @@ -1,5 +1,4 @@ .\" Copyright (c) 2011 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by David Chisnall under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/libc/locale/duplocale.3 b/lib/libc/locale/duplocale.3 index 4c3d94f54534..2e44df8c63a5 100644 --- a/lib/libc/locale/duplocale.3 +++ b/lib/libc/locale/duplocale.3 @@ -1,5 +1,4 @@ .\" Copyright (c) 2011 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by David Chisnall under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/libc/locale/euc.c b/lib/libc/locale/euc.c index 0ce49e070d1f..823928ff745b 100644 --- a/lib/libc/locale/euc.c +++ b/lib/libc/locale/euc.c @@ -11,7 +11,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/freelocale.3 b/lib/libc/locale/freelocale.3 index c37b21477c8f..594720f4dfab 100644 --- a/lib/libc/locale/freelocale.3 +++ b/lib/libc/locale/freelocale.3 @@ -1,5 +1,4 @@ .\" Copyright (c) 2011 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by David Chisnall under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/libc/locale/gb18030.c b/lib/libc/locale/gb18030.c index f2f2847578eb..1ddb3e463872 100644 --- a/lib/libc/locale/gb18030.c +++ b/lib/libc/locale/gb18030.c @@ -7,7 +7,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/gb2312.c b/lib/libc/locale/gb2312.c index a3472117a4aa..dbcb56435ab6 100644 --- a/lib/libc/locale/gb2312.c +++ b/lib/libc/locale/gb2312.c @@ -8,7 +8,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/gbk.c b/lib/libc/locale/gbk.c index a0ed8a10cedc..045e0645b1b5 100644 --- a/lib/libc/locale/gbk.c +++ b/lib/libc/locale/gbk.c @@ -11,7 +11,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/lmessages.c b/lib/libc/locale/lmessages.c index ae562eaf688e..90757b131fbb 100644 --- a/lib/libc/locale/lmessages.c +++ b/lib/libc/locale/lmessages.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/lmessages.h b/lib/libc/locale/lmessages.h index a83473d9db9a..a6057caa0ecf 100644 --- a/lib/libc/locale/lmessages.h +++ b/lib/libc/locale/lmessages.h @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/lmonetary.c b/lib/libc/locale/lmonetary.c index 116f32ae3623..d2875e102b31 100644 --- a/lib/libc/locale/lmonetary.c +++ b/lib/libc/locale/lmonetary.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/lmonetary.h b/lib/libc/locale/lmonetary.h index c9f835bf880c..11e39545482d 100644 --- a/lib/libc/locale/lmonetary.h +++ b/lib/libc/locale/lmonetary.h @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c index b37af113e319..28016777edb3 100644 --- a/lib/libc/locale/lnumeric.c +++ b/lib/libc/locale/lnumeric.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/lnumeric.h b/lib/libc/locale/lnumeric.h index aa1c4a7a231c..eaba6ed0bf54 100644 --- a/lib/libc/locale/lnumeric.h +++ b/lib/libc/locale/lnumeric.h @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/localeconv.c b/lib/libc/locale/localeconv.c index 144bada3d89f..ae68d2687663 100644 --- a/lib/libc/locale/localeconv.c +++ b/lib/libc/locale/localeconv.c @@ -6,7 +6,7 @@ * The Regents of the University of California. All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mblen.c b/lib/libc/locale/mblen.c index 00d0ec4d2feb..a0ff1660ce5d 100644 --- a/lib/libc/locale/mblen.c +++ b/lib/libc/locale/mblen.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mblocal.h b/lib/libc/locale/mblocal.h index 14eb4b69fc82..a39117cc6352 100644 --- a/lib/libc/locale/mblocal.h +++ b/lib/libc/locale/mblocal.h @@ -7,7 +7,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mbrlen.c b/lib/libc/locale/mbrlen.c index dd0154b79681..57237c86141e 100644 --- a/lib/libc/locale/mbrlen.c +++ b/lib/libc/locale/mbrlen.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mbrtowc.c b/lib/libc/locale/mbrtowc.c index f4aaffb98b94..b92968156e0e 100644 --- a/lib/libc/locale/mbrtowc.c +++ b/lib/libc/locale/mbrtowc.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mbsinit.c b/lib/libc/locale/mbsinit.c index 5947132088f8..c9aece68fe6f 100644 --- a/lib/libc/locale/mbsinit.c +++ b/lib/libc/locale/mbsinit.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mbsnrtowcs.c b/lib/libc/locale/mbsnrtowcs.c index c543a6c7e631..b667ee710757 100644 --- a/lib/libc/locale/mbsnrtowcs.c +++ b/lib/libc/locale/mbsnrtowcs.c @@ -6,10 +6,9 @@ * Copyright (c) 2002-2004 Tim J. Robbins. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/lib/libc/locale/mbsrtowcs.c b/lib/libc/locale/mbsrtowcs.c index 2b2b840a8821..718d61c77ea4 100644 --- a/lib/libc/locale/mbsrtowcs.c +++ b/lib/libc/locale/mbsrtowcs.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mbstowcs.c b/lib/libc/locale/mbstowcs.c index 12f164584971..805a49b3563f 100644 --- a/lib/libc/locale/mbstowcs.c +++ b/lib/libc/locale/mbstowcs.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mbtowc.c b/lib/libc/locale/mbtowc.c index 785b898abd92..56b9b2ba8afd 100644 --- a/lib/libc/locale/mbtowc.c +++ b/lib/libc/locale/mbtowc.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/mskanji.c b/lib/libc/locale/mskanji.c index 22861edc036f..3b30ed0c6027 100644 --- a/lib/libc/locale/mskanji.c +++ b/lib/libc/locale/mskanji.c @@ -11,7 +11,7 @@ * May 12, 1995 * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/newlocale.3 b/lib/libc/locale/newlocale.3 index 86f9d6be14a9..8dbe52e10eb9 100644 --- a/lib/libc/locale/newlocale.3 +++ b/lib/libc/locale/newlocale.3 @@ -1,5 +1,4 @@ .\" Copyright (c) 2011 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by David Chisnall under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/libc/locale/nextwctype.c b/lib/libc/locale/nextwctype.c index 73b2607e23af..dd81cd82940e 100644 --- a/lib/libc/locale/nextwctype.c +++ b/lib/libc/locale/nextwctype.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/nl_langinfo.c b/lib/libc/locale/nl_langinfo.c index 5a0991412c29..b7055f3eaa62 100644 --- a/lib/libc/locale/nl_langinfo.c +++ b/lib/libc/locale/nl_langinfo.c @@ -5,7 +5,7 @@ * All rights reserved. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/none.c b/lib/libc/locale/none.c index 7fc63a74181e..a0110f8590ec 100644 --- a/lib/libc/locale/none.c +++ b/lib/libc/locale/none.c @@ -11,7 +11,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/querylocale.3 b/lib/libc/locale/querylocale.3 index 69944f90d79b..6ac317ef42bf 100644 --- a/lib/libc/locale/querylocale.3 +++ b/lib/libc/locale/querylocale.3 @@ -1,5 +1,4 @@ .\" Copyright (c) 2011 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by David Chisnall under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/libc/locale/runetype.c b/lib/libc/locale/runetype.c index b10550c501f8..1442c3a77fd5 100644 --- a/lib/libc/locale/runetype.c +++ b/lib/libc/locale/runetype.c @@ -8,7 +8,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index 5d5116a95bbe..8c8ef82a1193 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -8,7 +8,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/table.c b/lib/libc/locale/table.c index 2208a3c0455c..1c6ecacbbbfa 100644 --- a/lib/libc/locale/table.c +++ b/lib/libc/locale/table.c @@ -8,7 +8,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/tolower.c b/lib/libc/locale/tolower.c index fdf07b56532f..59cd24393a22 100644 --- a/lib/libc/locale/tolower.c +++ b/lib/libc/locale/tolower.c @@ -8,7 +8,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/toupper.c b/lib/libc/locale/toupper.c index d43c03761d0f..6de0c76860bd 100644 --- a/lib/libc/locale/toupper.c +++ b/lib/libc/locale/toupper.c @@ -8,7 +8,7 @@ * Paul Borman at Krystal Technologies. * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * diff --git a/lib/libc/locale/uselocale.3 b/lib/libc/locale/uselocale.3 index e0eccfe676b6..269430e40da6 100644 --- a/lib/libc/locale/uselocale.3 +++ b/lib/libc/locale/uselocale.3 @@ -1,5 +1,4 @@ .\" Copyright (c) 2011 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This documentation was written by David Chisnall under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c index d9cd94c9b3ab..3eb5f21bc3b3 100644 *** 1967 LINES SKIPPED *** From nobody Mon Sep 25 13:49:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPPh4lF4z4rMN4; Mon, 25 Sep 2023 13: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 4RvPPh433dz4P2t; Mon, 25 Sep 2023 13: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=1695649784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RdGsPoC/mwj82DF76n0n6q8CTc+2bcJ9lDKK5CesXsI=; b=DDKG1FAm1m1H0O56yve+Jqp9D/MKOzU0ZiV4dwJLwEE7OI++MOqCeBM0OdDv32NtXIEnfj /4XWY+zZSRkjMzvP/zvlbxdTLANmqk9GgNgiyJ/DHrPKOVbQgHKBVlXEGGVLXCnsfa65b6 ZhiQyE9IHi1d/lX1aLpHN6vPArt2OF1LSy84g+U6IDj0qOCVOm8F0s7UnUIXKqp+3xNmWa +sZsBAiPfYuYjBzDo1nDqhIPxaLf58xkwW/GfZhLygCipnC/hkIQf9eBo7Qik+yiRP6Wm1 eDAcXLhLdG4GDhBf/iwtkGEicoVNgzgJRp0vPO2yqXPZT1F896+5nHVZY/TPVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649784; a=rsa-sha256; cv=none; b=FYN3r2zC9fGrZ6A7U1arQyB0TBNUB51O+or+iGWcaikPt6mHblrIDo5vhlZPC5WS5zu3wj 50fvFjBDPtSXPboh3SJQns6AF82iRCLaNszRgHNwNN+mV1Ssfl0sDJUMwtfabeejoCJqKl C9+sZ80sM+nZ+o2eAeR/U3blEvbTVgCuhXOX+/dbPcqN+WF4W5ZrZiIYtNlfDqVnRr+Kl3 yC6sVddYPJHRz15LCWQZUERDYb4uqZvEvcaBETpx4CLIwU3LkC82J28z/7FG+RVcs+RHvk ov/pHhbQnAX4dSs+pRbcubW0+5OqRs/KhVik9fFzDUrCfEdIDrwDXwl+xrypzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RdGsPoC/mwj82DF76n0n6q8CTc+2bcJ9lDKK5CesXsI=; b=ULAGBxZY9skLJ35+1izfHSDYak+dYlSJEtrUv2TiS1aXtIfowbzrvm8y4iL7qL9YQ4D1jD uzUf7l6NZX9Z1RjQGE8HCkEUVMRgcoCKa3NvpslJBii6Euue/VARmyFrhXwSTqtrbOt224 E9WPK4D08Xi2EcRupoGoQEc2BsX20MPpTyIw8GiFXkFvkrjDz6R93kw6lMUJb1mVnMkyKc b4rzjLigQ3FldlKVXX/P4InX2qQdzb02sDD8auroMNGge88er2DyhtZxYzLBy5M9REBIWh H/KHQRNpmqY7dLALR1Su52Cs3BYaZ9yQ4kY5qWR2gBa/CWhHrVSx+OfQ3ilv4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvPPh2wttz257; Mon, 25 Sep 2023 13:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDniJv028579; Mon, 25 Sep 2023 13:49:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDniw7028576; Mon, 25 Sep 2023 13:49:44 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:49:44 GMT Message-Id: <202309251349.38PDniw7028576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f4ebac8d805b - stable/13 - buf.h: Fix declaration of unmapped_buf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4ebac8d805b94c99b08d96a262218cbe48cd3a6 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f4ebac8d805b94c99b08d96a262218cbe48cd3a6 commit f4ebac8d805b94c99b08d96a262218cbe48cd3a6 Author: Sebastian Huber AuthorDate: 2022-07-19 18:09:43 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:49:25 +0000 buf.h: Fix declaration of unmapped_buf For architectures with a small-data area, the __read_mostly section must present at the object declaration. (emaste note: This does not appear to have an affect within FreeBSD, but may be needed by downstream projects that handle __read_mostly / __section(".data.read_mostly") differently.) Pull Request: https://github.com/freebsd/freebsd-src/pull/608 (cherry picked from commit ede6c6c0434a266a1712ffe807f4e31e229948df) --- sys/sys/buf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 73b68a51dce7..b46895b55892 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -510,7 +510,8 @@ extern int bdwriteskip; extern int dirtybufferflushes; extern int altbufferflushes; extern int nswbuf; /* Number of swap I/O buffer headers. */ -extern caddr_t unmapped_buf; /* Data address for unmapped buffers. */ +extern caddr_t __read_mostly unmapped_buf; /* Data address for unmapped + buffers. */ static inline int buf_mapped(struct buf *bp) From nobody Mon Sep 25 13:49:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPPj5wyrz4rMTX; Mon, 25 Sep 2023 13:49: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 4RvPPj54gbz4P7j; Mon, 25 Sep 2023 13: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=1695649785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=13Vv3B/c7hv5Quv5/5pfcf+WXjc4Faoz1qL7LpM+5t0=; b=rFrOOFSFLJ24AJwudGTev8WRJgO6uqVVMf3Dwi5eaLdCXchXQ/EfC/iobnDs6MvcB4tzrP F9VdqV+0jZW4MV62wsy59XCOgWl5gXrkIJ6OkwMCQXbGxUmi9Mx98iTPsYxgj1VFGvBitd SEVx8oJPLCDlzQu8QrMCFAo1T7ugOyYeBY8m/gWZhCXCJXQDlSjrTzrUat+a9ps7OPMFGr M+xoe/Odbjw89VTYEse7J3RIeGdHb20qUunGPByOVYrjKi1tNCVsskNQrNe4wacfrQU17w i8/p5whkYmk8ZRyyiW48wmBTAN66aO8TYHFP1j134RJcwSCBpCQATNJP7ulzOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649785; a=rsa-sha256; cv=none; b=IF3maPBmRFOwRBgJw2e9Shs2UBLYCCnuoxkdhZz31GGgH3AdMRLh0iZeAzmQ1JfhJ1ICh+ 84mIqRPav+IXqXF9vw38o0ANbQI6wRQ49iAY7+WletClX7LhEO6pbeHOsoXNscdmiWD/Q6 aOekad61kyF/yA+QLEOsrAm/kNY7hfySJUnP68Viu9BbrGwCBpnZV/qLxW7KL7TIvVjNQZ eiwy0qy/ShGr4j+CyWxZYzVVRqpkJ9B2Lc86X9NwS5qS0adXrq+Qx1Gd5cchKHm74jRDc+ cCfQshIz2GpEHJFCVZsKA+rehq5lXZ7EuzzOE2FvKD6SHUF/Tvo1mNr+e3SBEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=13Vv3B/c7hv5Quv5/5pfcf+WXjc4Faoz1qL7LpM+5t0=; b=ocvwouAeH04GC5wczoLwFXZUt+DSfKmZUUYSKMISLlWBHXKjwbakXFEAJC8m/wc77tFq7P WRhVf5DwnkpYdz8zzaqPKm/UI8cS6X7w4qkLbNP0TqsD62c9TtwmRKQkfm0Up44/e+SkcA vg6eLzq9bvIeFjQ8OxmpwT+ZI7HaPfbvqQO28SH7vwFDpZmCAOeybpZOu1PjdthdXeBO77 yG1lYcG7zYzWIEmzBfNLosyCarvqduQ0tDMl2YsuQ/4pZZ7r5lPD+H0kC5v0BwMkIsBp/v 9JkZNooKIwatcmvREOh191Ox4rlyvc2EZpQ/ARJfHjSuN9w0izQzAUegPWQq/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 4RvPPj3xVsz1rH; Mon, 25 Sep 2023 13:49:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDnjlW028624; Mon, 25 Sep 2023 13:49:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDnju2028621; Mon, 25 Sep 2023 13:49:45 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:49:45 GMT Message-Id: <202309251349.38PDnju2028621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 34eb62bb9671 - stable/13 - axge: Skip dummy packet headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 34eb62bb9671e87b7aa6b04a4c0a0f9b7e284565 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=34eb62bb9671e87b7aa6b04a4c0a0f9b7e284565 commit 34eb62bb9671e87b7aa6b04a4c0a0f9b7e284565 Author: Damien Broka AuthorDate: 2023-09-13 08:23:47 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:49:25 +0000 axge: Skip dummy packet headers Newer versions of the AX88179 interweave dummies alongside valid packet headers in bulk IN transfer data. This was probably done for backward compatibility with existing drivers. However current driver records these dummy headers as dropped frames, leading to stats misreporting one Ierr per Ipkt. This skips those dummy headers silently, thereby not generating Ierrs for them. Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/842 (cherry picked from commit 70fbcd451b68b7f6038d8a602cd8d5e1bb890f1d) --- sys/dev/usb/net/if_axge.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/net/if_axge.c b/sys/dev/usb/net/if_axge.c index 2ae0bee38ea1..5cabad95c07f 100644 --- a/sys/dev/usb/net/if_axge.c +++ b/sys/dev/usb/net/if_axge.c @@ -962,8 +962,16 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) hdr_off = pkt_end = (rxhdr >> 16) & 0xFFFF; /* + * On older firmware: * <----------------------- actlen ------------------------> * [frame #0]...[frame #N][pkt_hdr #0]...[pkt_hdr #N][rxhdr] + * + * On newer firmware: + * <----------------------- actlen ----------------- + * [frame #0]...[frame #N][pkt_hdr #0][dummy_hdr]... + * --------------------------------> + * ...[pkt_hdr #N][dummy_hdr][rxhdr] + * * Each RX frame would be aligned on 8 bytes boundary. If * RCR_IPE bit is set in AXGE_RCR register, there would be 2 * padding bytes and 6 dummy bytes(as the padding also should @@ -971,6 +979,10 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) * IP header on 32bits boundary. Driver don't set RCR_IPE bit * of AXGE_RCR register, so there should be no padding bytes * which simplifies RX logic a lot. + * + * Further, newer firmware interweaves dummy headers that have + * pktlen == 0 and should be skipped without being seen as + * dropped frames. */ while (pkt_cnt--) { /* verify the header offset */ @@ -981,6 +993,12 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) usbd_copy_out(pc, hdr_off, &pkt_hdr, sizeof(pkt_hdr)); pkt_hdr.status = le32toh(pkt_hdr.status); pktlen = AXGE_RXBYTES(pkt_hdr.status); + hdr_off += sizeof(pkt_hdr); + + /* Skip dummy packet header. */ + if (pktlen == 0) + continue; + if (pos + pktlen > pkt_end) { DPRINTF("Data position reached end\n"); break; @@ -992,7 +1010,6 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) } else axge_rxeof(ue, pc, pos, pktlen, pkt_hdr.status); pos += (pktlen + 7) & ~7; - hdr_off += sizeof(pkt_hdr); } } From nobody Mon Sep 25 13:56:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvPYx0wQrz4rMPD; Mon, 25 Sep 2023 13:56:53 +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 4RvPYw3X2gz4Qtb; Mon, 25 Sep 2023 13:56:52 +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.2/8.16.1) with ESMTP id 38PDuiqO058878; Mon, 25 Sep 2023 16:56:44 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 38PDuiSi058877; Mon, 25 Sep 2023 16:56:44 +0300 (MSK) (envelope-from dchagin) Date: Mon, 25 Sep 2023 16:56:44 +0300 From: Dmitry Chagin To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0a16d3d14db6 - main - linux(4): Update syscalls.master to 6.5 Message-ID: References: <202309250926.38P9QklR093095@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Queue-Id: 4RvPYw3X2gz4Qtb On Mon, Sep 25, 2023 at 09:43:29AM -0400, Ed Maste wrote: > On Mon, 25 Sept 2023 at 05:26, Dmitry Chagin wrote: > > > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > > > > commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > > Author: Dmitry Chagin > > AuthorDate: 2023-09-25 09:24:58 +0000 > > Commit: Dmitry Chagin > > CommitDate: 2023-09-25 09:24:58 +0000 > > > > linux(4): Update syscalls.master to 6.5 > > I guess this should be 6.6? 6.6 is not released, so I didn't mention unexistent revision From nobody Mon Sep 25 14:19:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQ4S4X0gz4rP41; Mon, 25 Sep 2023 14:19: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 4RvQ4S42YXz4Rk0; Mon, 25 Sep 2023 14:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695651592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ueHdk98jqkfrFWK1VnFz4Sa08NZEv/3vNx6F/zFFoaM=; b=ehwj8ynSA5IfvTHk3aG9An15eFkP6TaX8VtFI3mR9UL5AsSl0YsifEYxAwsWvsczrIKy4N slf492d+b8uAPhY1NL8ctNVKFs7pt93pp7Fd/+0/UkyS1z/kVWzQd34k5gEWPxJgs9r7I8 sRV6SP9FTWwborMn4L7sVnot9KaMEYVWPEUB5MxHs3mZqWEK82GcsKFzX8DZTbGFhMueV1 qtAL7tHAf2d3rg5CFKu7QZkn1rl0SCJeyShmPNfiP1fOSkgZYhBOgBqSjYA9Rtaijh+a1l eR5or+lwhEwbkmCDzW/IpvNRXst8CXVhQu2h99hfpOcLVhti5e/JZFeJ/0W/4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695651592; a=rsa-sha256; cv=none; b=FE2hkxUzTyGHWK52xWa9PfCqIKZ5eVdv4xeMlhPRdqIL/uwipscn0DXBkukSsEF0IG56Dl hvTxr+jvAhtPPUFBLaEyE+yMp9ukYHkHGgfAX5HPHUdWRLq5yON4j+q5yc+SMBvTHrA3h9 WvkkL3+YXs0WE7EJx3oa0CObfyNlLMIy33DbEXXOrbRYxJdyBkwx6wdz1a1aeUXrooR3ip f5uTR7ylh/WZPlJiEMDTBolrgBjNqDjEVimdy6oHwTrIYTx/DYYEpZrYw7YRCx20UgW1eb bXSRTtG164iWdh9omHTcwz0ckawKvdeFTClKYJERroJwUytyVhYtneTn/y2FbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695651592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ueHdk98jqkfrFWK1VnFz4Sa08NZEv/3vNx6F/zFFoaM=; b=ynCOzsnfOo9DlkQGMRAwY4nFQMoSybFW/jHwArVlB7RYSCc3rH1ESnYBR3DzsUsOjMzrYB 0RFu+hDzGV0KphcA6N4u/OskF9eqNQdyEHI61yoQZ4xrUgcSTOdRuC/Q+gwr8gmbmJhJdR x0ZWW0bO1MUnqM9v7Wq6goZoS8mDg7XryU/R7d4eninKefnkFpPq3kXkdv0OGIFyFfVr/4 Kr2wYjrbswt8L1KkSAlThh1yy3touOPHsW4tENLjx5pDlxnwhnVLU4i8398zKVbAvYcHqp 5OCrs6w2K7U6xevow+etu+5uMTcjUbBV5WAFcLMX/vHXtlMKZRleNvJ6qfYVzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQ4S3484z2TG; Mon, 25 Sep 2023 14:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEJq2f078579; Mon, 25 Sep 2023 14:19:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEJqf7078576; Mon, 25 Sep 2023 14:19:52 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:19:52 GMT Message-Id: <202309251419.38PEJqf7078576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 82ddab0e8f9d - main - arm: Don't advertise the virtual timer on arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82ddab0e8f9d5d0e4e8fdd2a7a17cd87e464f55b Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=82ddab0e8f9d5d0e4e8fdd2a7a17cd87e464f55b commit 82ddab0e8f9d5d0e4e8fdd2a7a17cd87e464f55b Author: Andrew Turner AuthorDate: 2023-09-25 08:10:11 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 14:19:33 +0000 arm: Don't advertise the virtual timer on arm It may not be usable on all SoCs. Sponsored by: Arm Ltd --- sys/arm/arm/generic_timer.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 998259c5c90f..e3298ae0fb14 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -617,7 +617,10 @@ arm_tmr_attach(device_t dev) phandle_t node; pcell_t clock; #endif - int error, user_phys; +#ifdef __aarch64__ + int user_phys; +#endif + int error; int i, first_timer, last_timer; sc = device_get_softc(dev); @@ -693,6 +696,7 @@ arm_tmr_attach(device_t dev) last_timer = GT_PHYS_NONSECURE; } +#ifdef __aarch64__ /* * The virtual timer is always available on arm and arm64, tell * userspace to use it. @@ -702,6 +706,13 @@ arm_tmr_attach(device_t dev) if (TUNABLE_INT_FETCH("hw.userspace_allow_phys_counter", &user_phys) && user_phys != 0) sc->physical_user = sc->physical_sys; +#else + /* + * The virtual timer depends on setting cntvoff from the hypervisor + * privilege level/el2, however this is only set on arm64. + */ + sc->physical_user = true; +#endif arm_tmr_sc = sc; From nobody Mon Sep 25 14:58:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwc5P5wz4rRYF; Mon, 25 Sep 2023 14:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwc4p4Mz4VmS; Mon, 25 Sep 2023 14:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N3msuGUSjwzof20MNF71mgy82eiS8xMLd/chNp0luc4=; b=riictry4b+hVGKIgTqFE5asbFRcx/YgrPwo7EuJDaSOdPPYlo9SSUm11vPG5l7u9swqaum nYHmo+JYO+nSQoc7SzXIUu0sG+pNB/bLCYrTHhD8ZGx9yX+ttAYHWh+SuQwY8zqvk2u7lo 4TeRHBgcFtufl5JcN+C1WvXjE7JLm6xSBwQ58wcgor/HpTUJtCdM8D6o4xSYxSqLPNPX8e na0BUqdYytjBpj2iBlYKrPw9jJkITpm15n1moCwnAA2OeVH+1iATESdCvWAnxgM1+AwY93 vgi67RG6RlVeKsBgy6vsbKpzGOSoL5Ybw3WggXeT6zEvFS5M6QlvR8X261V4Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653888; a=rsa-sha256; cv=none; b=mJPnD5M9DRrSCELb+F2qBUfTTu42bW5bFUUtPg5cwiUNt15QkF3ERja07gDuV5wNMd3MJZ 8CT4sgULHGK7rF2B6miDG7SaJLfsAL+glpjPfuT7X3exSbf5g2966ksq0y0uKu6G5IFNhq RA8cT9Lv7SX/4rGKW8hAUDN+5TEUEViuw3bzCHU23S//C2X3WB4r9ye3WxS5Wuuik34H+i nvILqdH/A+sum9QISowj6q4+oY7NcT4+rA9nwAMxlqLReILMEMs+y+e89K+d9yoiATG6a/ QzxlVoRqDQhoSrbDH9DRiTPVa7Lx0/yM2fFfShphddVsellSOJFFvl/PHb0Y3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N3msuGUSjwzof20MNF71mgy82eiS8xMLd/chNp0luc4=; b=oiA7uAnRkBRFDaGFFVWVr7k8o1+8aORRBthQBpW7qTYjz1KTy7vlDMcN74vJmUg2DyanBr /gg2oB6ssi9gYeAcj27r+ejKIA4mMaRgdAP3JkzcG7ByJDcQgEqI7auT8jqRTHGYk6ME72 4rauko9gtus/Ygm9fv+h7eptXFf3Gcxh5kC9ahtvhmHl5FOC6iv5BaGK7wIDYO6+/IDORE TzSDxOE+xdCgqY8smFYKxEiyKI/SeCsYgVP1EdAoujGo5xWXCyqmMg2fEajbJdCQdNWaH2 /fYX49jrcDrFR/EeiUxWC0XRLX334p8Fewq/ABNtYPYkFg+1SGjf3CO7m4+1bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwc3qttz3DZ; Mon, 25 Sep 2023 14:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEw89P044342; Mon, 25 Sep 2023 14:58:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEw8R7044339; Mon, 25 Sep 2023 14:58:08 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:08 GMT Message-Id: <202309251458.38PEw8R7044339@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: 97232e04ca07 - main - make_*_driver.sh: Don't include $FreeBSD$ in generated files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 97232e04ca07dffeef629c1628f1cc95f062b41a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=97232e04ca07dffeef629c1628f1cc95f062b41a commit 97232e04ca07dffeef629c1628f1cc95f062b41a Author: John Baldwin AuthorDate: 2023-09-25 14:46:09 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:46:09 +0000 make_*_driver.sh: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41950 --- share/examples/drivers/make_device_driver.sh | 8 -------- share/examples/drivers/make_pseudo_driver.sh | 6 ------ 2 files changed, 14 deletions(-) diff --git a/share/examples/drivers/make_device_driver.sh b/share/examples/drivers/make_device_driver.sh index 3ed8d784c1c0..5b8f8efa6469 100755 --- a/share/examples/drivers/make_device_driver.sh +++ b/share/examples/drivers/make_device_driver.sh @@ -34,8 +34,6 @@ else fi UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"` -RCS_KEYWORD=FreeBSD - if [ -d ${TOP}/modules/${1} ]; then echo "There appears to already be a module called ${1}" echo -n "Should it be overwritten? [Y]" @@ -90,7 +88,6 @@ DONE ####################################################################### cat >${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$${RCS_KEYWORD}$"); - #include #include #include /* cdevsw stuff */ @@ -956,8 +950,6 @@ fi cat >${TOP}/modules/${1}/Makefile <${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$FreeBSD\$"); - #include #include #include /* SYSINIT stuff */ @@ -389,8 +385,6 @@ fi cat >${TOP}/modules/${1}/Makefile < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7736786b08e8 - main - Retire old diskless setup scripts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 7736786b08e8c9edb07088db3229695d0afed600 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7736786b08e8c9edb07088db3229695d0afed600 commit 7736786b08e8c9edb07088db3229695d0afed600 Author: John Baldwin AuthorDate: 2023-09-25 14:46:21 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:46:21 +0000 Retire old diskless setup scripts These scripts predate /etc/rc.diskless* and use a different scheme. A comment was added to them back in 2002 noting they were 3 years old at that point. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41951 --- ObsoleteFiles.inc | 6 + share/examples/Makefile | 8 - share/examples/diskless/ME | 52 ------ share/examples/diskless/README.BOOTP | 172 ----------------- share/examples/diskless/README.TEMPLATING | 301 ------------------------------ share/examples/diskless/clone_root | 137 -------------- 6 files changed, 6 insertions(+), 670 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index eb0394722aa9..b0b004843eeb 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,12 @@ # xargs -n1 | sort | uniq -d; # done +# 2023xxxx +OLD_FILES+=usr/share/examples/diskless/ME +OLD_FILES+=usr/share/examples/diskless/README.BOOTP +OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING +OLD_FILES+=usr/share/examples/diskless/clone_root + # 20230905 OLD_FILES+=usr/share/doc/legal/realtek_rtw88_firmware.LICENCE diff --git a/share/examples/Makefile b/share/examples/Makefile index 3ee7d8c0d840..06d10a0bc149 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -11,7 +11,6 @@ LDIRS= BSD_daemon \ IPv6 \ bootforth \ csh \ - diskless \ drivers \ etc \ find_interface \ @@ -74,13 +73,6 @@ SE_BOOTFORTH= \ SE_DIRS+= csh SE_CSH= dot.cshrc -SE_DIRS+= diskless -SE_DISKLESS= \ - ME \ - README.BOOTP \ - README.TEMPLATING \ - clone_root - SE_DIRS+= drivers SE_DRIVERS= \ README \ diff --git a/share/examples/diskless/ME b/share/examples/diskless/ME deleted file mode 100644 index ff06be2c5393..000000000000 --- a/share/examples/diskless/ME +++ /dev/null @@ -1,52 +0,0 @@ -IMPORTANT NOTE: - -As of Feb. 11, 2002 (and indeed, for quite some time before that), -the /etc/rc.diskless{1,2} scripts support a slightly different -diskless boot process than the one documented in the rest of -this file (which is 3 years old). - -I am not deleting the information below because it contains some -useful background information on diskless operation, but for the -actual details you should look at /etc/rc.diskless1, /etc/rc.diskless2, -and the /usr/share/examples/diskless/clone_root script which can -be useful to set up clients and server for diskless boot. - ---- $FreeBSD$ --- ------------------------------------------------------------------------- - -When templating, /conf/ME is typically a softlink to -/conf/. When doing a diskless boot, /conf/ME is -retargeted by /etc/rc.diskless1 from pointing to the server to pointing -to the client's directory, /conf/. The retargeting -is accomplished through an MFS -o union mount. - -When templating, this softlink should be different for each machine. -When doing a diskless boot, this softlink is typically part of the / NFS -mount from the server and points to the server's conf directory, but gets -retargeted during the /etc/rc.diskless1 phase. - -System-wide configuration files must generally be targeted through /conf/ME. -For example, your /etc/rc.conf.local should become a softlink to -/conf/ME/rc.conf.local and your real rc.conf.local should go into the -appropriate /conf/ directory. This is also true of -/etc/rc.local, /etc/fstab, /etc/syslog.conf, /etc/ccd.conf, /etc/ipfw.conf, -/etc/motd, /etc/resolv.conf, and possibly even /etc/ttys ( if you want -to start an X session up on boot on certain of your machines ). - -When templating, you duplicate your / and /usr partitions on each machine's -local disk from a single master ( assuming /var and /home reside elsewhere ), -EXCEPT for the /conf/ME softlink. The /conf/ME softlink is the only thing -on / that should be different for each machine. - -There are often categories of configuration files. For example, all of your -shell machines may use one resolv.conf while all of your mail proxies may -use another. Configuration files can be categorized fairly easily through -/conf/HT. directories. You put the actual configuration file in -/conf/HT. and make a softlink from -/conf/ME//config-file to "../HT.. - - In the BOOTP workstation /conf/$IP/rc.conf.local, you must typically - turn *OFF* most of the system option defaults in /etc/rc.conf as well - as do additional custom configuration of your environment - - The /usr/src/share/examples/diskless directory contains a typical - X session / sshd based workstation configuration. The directories - involved are HT.DISKLESS/ and 192.157.86.12/. - - Essentially, the $IP/ directory ( which rc.diskless looks for in - /conf/$IP/ ) contains all the junk. The HT.DISKLESS directory exists - to hold common elements of your custom configuration so you do not have - to repeat those elements for each workstation. The example /conf - structure included here shows how to create a working sshd setup ( so - you can sshd into the diskless workstation ), retarget xdm's pid and error - files to R+W directories if /usr is mounted read-only, and retarget - syslogd and other programs. This example is not designed to run out of - the box and some modifications are required. - - >> NOTE << HT.DISKLESS/ttys contains the typical configuration required - to bring X up at boot time. Essentially, it runs xdm in the foreground - with the appropriate arguments rather then a getty on ttyv0. You must - run xdm on ttyv0 in order to prevent xdm racing with getty on a virtual - terminal. Such a race can cause your keyboard to be directed away from - the X session, essentially making the session unusable. - - Typically you should start with a clean slate by tar-copying this example - directory to /conf and then hack on it in /conf rather then in - /usr/share/examples/diskless. - - BOOTP CLIENT SETUP - - Here is a typical kernel configuration. If you have only one ethernet - interface you do not need to wire BOOTP to a specific interface name. - BOOTP requires NFS and NFS_ROOT, and our boot scripts require MFS. If - your /tmp is *not* a softlink to /var/tmp, the scripts also require NULLFS - -# BootP -# -options BOOTP # Use BOOTP to obtain IP address/hostname -options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info -options "BOOTP_NFSV3" # Use NFS v3 to NFS mount rootoptions -options BOOTP_COMPAT # Workaround for broken bootp daemons. -#options "BOOTP_WIRED_TO=de0" - -options MFS # Memory File System -options NFS # Network Filesystem -options NFS_ROOT # Nfs can be root -options NULLFS # nullfs to map /var/tmp to /tmp - - BOOTP SERVER SETUP - - The BOOTP server must be running on the same logical LAN as the - BOOTP client(s). You need to setup two things: - - (1) You need to NFS-export /, /usr, and /var. - - (2) You need to run a BOOTP server. DHCPD can do this. - - - NFS Export: - - Here is an example "/etc/exports" file. - -/ -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 -/usr -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 -/var -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 - - In order to be an NFS server, the server must run portmap, mountd, - nfsd, and rpc.statd. The standard NFS server options in /etc/rc.conf - will work ( you should put your overrides in /etc/rc.conf.local on the - server and not edit the distribution /etc/rc.conf, though ). - - BOOTP Server: - - This configuration file "/etc/dhcpd.conf" example is for - the '/usr/ports/net/isc-dhcp' dhcpd port. - - subnet 192.157.86.0 netmask 255.255.255.192 { - # range if you want to run the core dhcpd service of - # dynamic IP assignment, but it is not used with BOOTP - # workstations - range 192.157.86.32 192.157.86.62; - - # misc configuration. - # - option routers 192.157.86.2; - option domain-name-servers 192.157.86.2; - - server-name "apollo.fubar.com"; - option subnet-mask 255.255.255.192; - option domain-name-servers 192.157.86.2; - option domain-name "fubar.com"; - option broadcast-address 192.157.86.63; - option routers 192.157.86.2; - } - - host test1 { - hardware ethernet 00:a0:c9:d3:38:25; - fixed-address 192.157.86.11; - option root-path "192.157.86.2:/"; - option option-128 "192.157.86.2:/images/swap"; - } - - host test2 { - # hardware ethernet 00:e0:29:1d:16:09; - hardware ethernet 00:10:5a:a8:94:0e; - fixed-address 192.157.86.12; - option root-path "192.157.86.2:/"; - option option-128 "192.157.86.2:/images/swap"; - } - - SWAP. This example includes options to automatically BOOTP configure - NFS swap on each workstation. In order to use this capabilities you - need to NFS-export a swap directory READ+WRITE to the workstations. - - You must then create a swap directory for each workstation you wish to - assign swap to. In this example I created a dummy user 'lander' and - did an NFS export of /images/swap enforcing a UID of 'lander' for - all accesses. - - apollo:/usr/ports/net# ls -la /images/swap - total 491786 - drwxr-xr-x 2 root wheel 512 Dec 28 07:00 . - drwxr-xr-x 8 root wheel 512 Jan 20 10:54 .. - -rw-r--r-- 1 lander wheel 33554432 Dec 23 14:35 swap.192.157.86.11 - -rw-r--r-- 1 lander wheel 335544320 Jan 24 16:55 swap.192.157.86.12 - -rw-r--r-- 1 lander wheel 134217728 Jan 21 17:19 swap.192.157.86.6 - - A swap file is best created with dd: - - # create a 32MB swap file for a BOOTP workstation - dd if=/dev/zero of=swap.IPADDRESS bs=1m count=32 - - It is generally a good idea to give your workstations some swap space, - but not a requirement if they have a lot of memory. - diff --git a/share/examples/diskless/README.TEMPLATING b/share/examples/diskless/README.TEMPLATING deleted file mode 100644 index 48984e02b1da..000000000000 --- a/share/examples/diskless/README.TEMPLATING +++ /dev/null @@ -1,301 +0,0 @@ -IMPORTANT NOTE: - -As of Feb. 11, 2002 (and indeed, for quite some time before that), -the /etc/rc.diskless{1,2} scripts support a slightly different -diskless boot process than the one documented in the rest of -this file (which is 3 years old). - -I am not deleting the information below because it contains some -useful background information on diskless operation, but for the -actual details you should look at /etc/rc.diskless1, /etc/rc.diskless2, -and the /usr/share/examples/diskless/clone_root script which can -be useful to set up clients and server for diskless boot. - ---- $FreeBSD$ --- ------------------------------------------------------------------------- - - TEMPLATING machine configurations - - Matthew Dillon - dillon@backplane.com - - This document describes a general mechanism by which you can template - / and /usr. That is, to keep a 'master template' of / and /usr on a - separate machine which is then used to update the rest of your machines. - - Generally speaking, you can't simply mirror /. You might be able to - get away with mirroring /usr. There are two main problems involved with - templating: - - (1) Avoiding overwriting run-time generated files - - By default, the system maintains a number of files in the root - partition. For example, sendmail will dbm /etc/aliases into - /etc/aliases.db. vipw or chpass or other password related routines - will regenerate the password dbm's /etc/spwd.db, /etc/pwd.db, and - passwd. /etc/namedb/s might contain generated secondaries. And - so forth. - - The templating mechanism must avoid copying over such files. - - (2) Customizing machines. - - Customizing machines is actually considerably simpler. You create - a configuration hierarchy and convert the configuration files that - have to be customized into softlinks that run through a special - softlink in the configuration directory. This will work for every - configuration file except possibly /etc/master.passwd - - For example, /etc/resolv.conf would be turned into a softlink to - /conf/ME/resolv.conf, and /conf/ME itself would be a softlink to - /conf/. The actual resolv.conf configuration file - would reside in /conf/. - - If you have a lot of hosts, some configuration files may be commonly - classified. For example, all your shell machines might have the - same /etc/resolv.conf. The solution is to make - /conf//resolv.conf a softlink to a common directory, say - /conf/HT.SHELL/resolv.conf. It may sound a little messy, but this - sort of categorization actually makes the sysadmins job much, much - easier. - - The /conf/ directory hierarchy is stored on the template and - distributed to all the machines along with the rest of the root - partition. - - This type of customization is taken from my direct experience - instituting such a system at BEST. At the time, BEST had over 45 - machines managed from a single template. - - RUN-TIME GENERATED OR MODIFIED FILES IN / or /USR - - /etc/aliases.db - /etc/master.passwd - /etc/spwd.db - /etc/pwd.db - /etc/passwd - /etc/namedb/s - /root/.history - /root/.ssh/identity - /root/.ssh/identity.pub - /root/.ssh/random_seed - /root/.ssh/known_hosts - /conf/ME - /kernel* ( note 2 ) - /dev ( note 3 ) - /var ( note 4 ) - /home ( note 4 ) - /lost+found - - /usr/lost+found - /usr/home ( note 4 ) - /usr/crash ( note 5 ) - /usr/obj ( note 5 ) - /usr/ports ( note 5 ) - /usr/src ( note 5 ) - /usr/local/crack ( note 5 ) - /usr/local/lib/X11/xdm/xdm-errors ( note 6 ) - /usr/local/lib/X11/xdm/xdm-pid ( note 6 ) - /usr/local/etc/ssh_host_key ( note 6 ) - /usr/local/etc/ssh_host_key.pub ( note 6 ) - /usr/local/etc/ssh_random_seed ( note 6 ) - - /conf/ME ( note 7 ) - - note 2: You typically want to update kernels manually and *NOT* - template them as a safety measure. This also allows you to run - different kernels on different machines or. - - note 3: /dev must be updated manually. Some devices, such as tty's and - pty's, use the access and/or modify time and/or user/group - operationally and regenerating the devices on the fly would be - bad. - - note 4: /var and /home are usually separately mounted partitions and - thus would not fall under the template, but as a safety measure - the template copier refuse to copy directories named 'home'. - - note 5: These are directories that are as often created directly on - /usr as they are separately-mounted partitions. You typically - do not want to template such directories. - - note 6: Note that you can solve the problem of xdm and sshd creating - files in /usr. With xdm, edit /usr/local/lib/xdm/xdm-config - and change the errorLogFile and pidFile config lines. - - With sshd, add 'HostKey' and 'RandomSeed' directives to specify - /var/db for the location of the host key and run-time sshd - random seed: - - HostKey /var/db/ssh_host_key - RandomSeed /var/db/ssh_random_seed - - note 7: In this example, /conf/ME is the machine customizer and must - be pointed to the /conf// directory, which is - different for each machine. Thus, the /conf/ME softlink - should never be overwritten by the templating copy. - - - TYPICAL CUSTOMIZED CONFIGURATION SOFTLINKS - - The following files typically need to be turned into softlinks - to /conf/ME/: - - /etc/ccd.conf -> /conf/ME/ccd.conf - /etc/ipfw.conf ... - /etc/fstab - /etc/motd - /etc/resolv.conf - /etc/aliases - /etc/sendmail.cw - /etc/organization - /etc/named.conf - /etc/rc.conf.local - /etc/printcap - /etc/inetd.conf - /etc/login.conf - /etc/gettytab - /etc/ntp.conf - /etc/exports - /root/.k5login -> /conf/ME/root/.k5login - - And, of course, /conf/ME is usually a softlink to the appropriate - /conf//. Depending on your system configuration, - there may be other files not listed above that you have to worry about. - - In many cases, /conf/ME/filename is itself a softlink to - "../HT.xxxx/filename", where HT.xxxx is something like HT.STD ... this - added complexity actually makes it easier to manage multiple - classifications of machines. - - DELETION OF FILES - - Any file found on the template destination that does not exist in the - source and is not listed as an exception by the source should be deleted. - However, deletion can be dangerous and cpdup will ask for confirmation - by default. Once you know you aren't going to blow things up, you can - turn this feature off and update your systems automatically from cron. - - By formalizing the delete operation, you can be 100% sure that it is - possible to recreate / and /usr on any machine with only the original - template and a backup of the ( relatively few ) explicitly-excepted - files. The most common mistake a sysop makes is to make a change to a - file in / or /usr on a target machine instead of the template machine. - If the target machine is updated once a night from cron, the sysop - quickly learns not to do this ( because his changes get overwritten - overnight ). With a manual update, these sorts of mistakes can propagate - for weeks or months before they are caught. - - TEMPLATE COPYING AND SAFETY - THE CPDUP PROGRAM - - The 'cpdup' program is a program which efficiently duplicates a directory - tree. The program copies source to destination, duplicating devices, - softlinks, hardlinks, files, modification times, uid, gid, flags, perms, - and so forth. The program incorporates several major features: - - * The program refuses, absolutely, to cross partition boundaries. - i.e. if you were copying the template /usr from an NFS mount to - your /usr, and you had a mount point called /usr/home, the - template copying program would *NOT* descend into /usr/home on - the destination. - - This is a safety. - - * The program accesses a file called .cpignore in each directory - it descends into on the source to obtain a list of exceptions - for that directory -- that is, files not to copy or mess with. - - This is a templating function. - - * The program refuses to delete a directory on the destination - being replaced by a softlink or file on the source. - - This is a safety mechanism - - * The program is capable of maintaining MD5 check cache files and - doing an MD5 check between source and destination during the - scan. - - * The program is capable of deleting files/directories on the - destination that do not exist on the source, but asks for - confirmation by default. - - This is a templating and a safety mechanism. - - * The program uses a copy-to-tmp-and-rename methodology allowing - it to be used to update live filesystems. - - This is a templating mechanism. - - * The program, by default, tries to determine if a copy is required - by checking modify times, file size, perms, and other stat - elements. If the elements match, it does not bother to copy - ( unless an MD5 check is being made, in which case it must read - the destination file ). - - You typically run cpdup on the target machine. The target machine - temporarily mounts the template machine's / and /usr via NFS, read-only, - and runs cpdup to update / and /usr. If you use this methodology note - that THERE ARE SECURITY CONSIDERATIONS! See 'SECURITY CONSIDERATIONS WITH - NFS' below. - - Whatever script you use that does the NFS mounts should ensure that the - mount succeeded before continuing with the cpdup. - - You should create .cpignore files in the appropriate directories on the - template machine's / and /usr partitions so as not to overwrite active - files on the target. The most critical .cpignore files should be - protected with 'chflags schg .cpignore'. Specifically, the ones in / - and /etc, but possibly others as well. For example, the .cpignore - hierarchy for protect /root is: - - # /root/.cpignore contains - .history - - # /root/.ssh/.cpignore contains - random_seed - known_hosts - authorized_keys - identity - identity.pub - - WHEN INITIALLY CONVERTING A TARGET MACHINE TO USE TEMPLATING, ALWAYS - MAKE A FULL BACKUP OF THE TARGET MACHINE FIRST! You may accidentally - delete files on the target during the conversion due to forgetting to - enter items into appropriate .cpignore files on the source. - - SECURITY CONSIDERATIONS WITH NFS ROOT EXPORT FROM TEMPLATE MACHINE - SECURITY CONSIDERATIONS WITH NFS USR EXPORT FROM TEMPLATE MACHINE - - There are some serious security considerations that must be taken into - account when exporting / and /usr on the template machine. - - * only export read-only - - * the password file ( aka vipw ) may not contain any crypted passwords - at all. You MUST use ssh or kerberos to access the template machine. - - You can get away with giving only root a crypted password, but only - if you disallow network root logins and only allow direct root - logins on the console. - - * The machine's private ssh_host_key usually resides in /usr/local/etc. - You must move this key to /var/db. You can softlink link so no - modification of sshd_config is required. - - * The machine's private ~root/.ssh/identity file is also exposed by - the NFS export, you should move this file to /var/db as well and - put a softlink in ~root/.ssh. - - * DON'T EXPORT /var ! Either that, or don't put the private keys - in /var/db ... put them somewhere else. - - * You may want to redirect the location of the random_seed file, which - can be done by editing ~root/.ssh/sshd_config and - /usr/local/etc/sshd_config so it is not exposed either. - - -Matt - Matthew Dillon - dillon@backplane.com - diff --git a/share/examples/diskless/clone_root b/share/examples/diskless/clone_root deleted file mode 100755 index be5d2d2a9efd..000000000000 --- a/share/examples/diskless/clone_root +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/sh -# -# (C) 2001 Luigi Rizzo, Gabriele Cecchetti -# -# Revised 2001.04.16 -# -# -# clone root filesystem for diskless root stuff -# -# usage -# clone_root all to do a full copy (e.g. bin, sbin...) -# clone_root update to recreate /var (including devices) -# clone_root to copy /conf and password-related files -# -# This script assumes that you use a shared readonly root and /usr -# partition. The script creates a partial clone of the root partition, -# and puts it into ${DEST} (defaults to /diskless_root ) on the server, -# where it is read. -# -# To run a diskless install you need to do the following: -# -# create /conf/default/etc/fstab -# this will replace the standard /etc/fstab and should contain -# as a minimum the following lines -# ${SERVER}:${DEST} / nfs ro 0 0 -# ${SERVER}:/usr /usr nfs ro 0 0 -# proc /proc procfs rw 0 0 -# -# create /conf/default/etc/rc.conf -# this will replace the standard rc.conf and should contain -# the startup options for the diskless client. Most likely -# you will not need to set hostname and ifconfig_* because these -# will be already set by the startup code. You will also -# probably need to set local_startup="" so that the server's -# local startup files will not be used. -# -# create a kernel config file in /sys/i386/conf/DISKLESS with -# options MD_ROOT -# options BOOTP -# options BOOTP_NFSROOT -# options BOOTP_COMPAT -# and do a full build of the kernel. -# If you use the firewall, remember to default to open or your kernel -# will not be able to send/receive the bootp packets. -# -# On the server: -# enable NFS server and set /etc/exports as -# ${DEST} -maproot=0 -alldirs -# /usr -alldirs -# -# enable bootpd by uncommenting the bootps line in /etc/inetd.conf -# and putting at least the following entries in /etc/bootptab: -# .default:\ -# hn:ht=1:vm=rfc1048:\ -# :sm=255.255.255.0:\ -# :sa=${SERVER}:\ -# :gw=${GATEWAY}:\ -# :rp="${SERVER}:${DEST}": -# -# client1:ha=0123456789ab:tc=.default -# -# and make sure that client1 is listed in /etc/hosts - -# VARIABLES: -# some manual init is needed here. -# DEST the diskless_root dir (goes into /etc/bootptab and /etc/exports -# on the server) -DEST=/diskless_root - -# you should not touch these vars: -# SYSDIRS system directories and mountpoints -# DIRS mountpoints (empty dirs) -# PWFILES files related to passwords -# TOCOPY files and dirs to copy from root partition - -SYSDIRS="dev proc root usr var" -DIRS="cdrom home mnt" -PWFILES="master.passwd passwd spwd.db pwd.db" -TOCOPY="bin boot compat etc modules sbin stand sys" - -init_diskless_root() { - echo "Cleaning old diskless root ($DEST)" - cd / - rm -rf ${DEST} && echo "Old diskless root removed." - echo "Creating $DEST..." - mkdir -p $DEST && echo "New diskless root created." - echo "+++ Now copy original tree from / ..." - ex="" - (cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - ) - #(cd / ; find -x dev | cpio -o -H newc ) | \ - # (cd $DEST; cpio -i -H newc -d ) - echo "+++ Fixing permissions on some objects" - chmod 555 $DEST/sbin/init -} - -update_conf_and_pw() { - echo "+++ Copying files in /conf and password files" - (cd ${DEST} ; rm -rf conf ) - (cd / ; tar clf - conf ) | (cd ${DEST}; tar xvf - ) - mkdir -p ${DEST}/conf/etc # used to mount things - (cd /etc ; tar cvf - ${PWFILES} ) | (cd ${DEST}/etc ; tar xf - ) -} - -update() { - echo "+++ update: create mountpoints and device entries, kernel" - for i in ${SYSDIRS} ${DIRS} - do - rm -r -f ${DEST}/$i - mkdir -p ${DEST}/$i && chown root:wheel ${DEST}/$i && echo -n "$i " - done - echo "." - ln -s /var/tmp ${DEST}/tmp - echo "+++ Copying kernel from /sys/compile/DISKLESS" - cp /sys/compile/DISKLESS/kernel $DEST/kernel - echo "." -} - - -# Main entry point -case $1 in - all) # clean and reinstall the whole diskless_root - init_diskless_root - update - update_conf_and_pw - ;; - - update) # clean and rebuild mountpoints and device entries - update - update_conf_and_pw - ;; - - *) # copy /conf and password files - update_conf_and_pw - ;; -esac -exit 0 -### end of file ### From nobody Mon Sep 25 14:58:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwf6dDHz4rRYN; Mon, 25 Sep 2023 14:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwf69Gdz4WKC; Mon, 25 Sep 2023 14:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6HTQ6y/Y4K/FBU/xA6iewHAA9F5rHj/tJpnDsBpJ1Y=; b=dybj88dfJgeLMg258fuAgx3LU1PzSJ6xaOx3yP33GEAVlt34v0FCy7USsZNa5gzh38ji0b vUdfCSckgSBsyYMJl6ugurQFgRIsSINxXl9+YFgVRZ7rUgdIwMvLoCiQKyvVqMhSTAofA9 LwPj3No+mTQnH/YgqfszGFJzEAk3RW1T5vS5Js2pw5r/+FZLBlpUAq58hCTk5lEOTKtPis ZLJFBPsL0xwKoFA4A2sY/A0cC66Kv6Sb6TdraFs9T/45wL6l5SQ7qDSaxGr0HGQaJom2Q3 xVN1R1E+cHzcw5A25BOd5EzcA/gwTJXj8Dopx6wDjE2YuANWg9MoZ34rlsAjrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653890; a=rsa-sha256; cv=none; b=b0jgGtKN+2Fq4LkL+NQVbgFT0GOgsDGwyfMqKcnxfN9wmsz5jNIPGxdH9cydCOB2A0hNtD UCEKE2B05Quga42mXeeb1T01zv3Cz+wvxAY1zBWOTQ8p5OemgUtBV2iSCaRgwiB0aynhMo wXTGOrFj0pFSLK7PU5njHF3tbsucuDy9vR+gLCo2iMYHUIOTg9Al9pbO/VN334G8sVtFUW yOPQ64xMhcEItAcYPjkt0USqGfsHauDh0cCG5LoccEAVcQcfo63hAfWI3aX8mUFxOgmgr0 6mZmkKSQ2jW4JM2IrzWGvV3hFtiVhIX+ZLuQY9hRYr9Q5GFN5TVhljZMxiFZQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6HTQ6y/Y4K/FBU/xA6iewHAA9F5rHj/tJpnDsBpJ1Y=; b=WjqacHSJWHUivF3nPe08dwTDCUbm0Upl3bEN8Yz0SGI54jg6nOxgs991O1rKCL7W/7EDN7 fMLnKYfIcGqxdG0rVCovHzEaXUT4853GgRcUCJTtaSLipMpcdw/nmX+JBtUGu1vDtnZhox 6kmsqqCHvPtfcOcxV3xAbR78YuU59PLI4mur4W42Yiovn3unQjhUZXnbl2nkePvnO8VNFY AwjqIH3M5YvPKtNATkStqG/xAj5Ec2smlpZ0kFeuaRlWMODmPpQjrJHyZpMwHZdbe2xilI NIwY3i85MyzSWiJRYaDpJmb3Ic+XRBIyOo+YWLOs8uTRE5rfgWgBWTO9hPpEWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwf5GrMz3cD; Mon, 25 Sep 2023 14:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwADJ044433; Mon, 25 Sep 2023 14:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwAjR044430; Mon, 25 Sep 2023 14:58:10 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:10 GMT Message-Id: <202309251458.38PEwAjR044430@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: bd524e2ddb77 - main - videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: bd524e2ddb77e1c691f308359ab917414ecb8bed Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bd524e2ddb77e1c691f308359ab917414ecb8bed commit bd524e2ddb77e1c691f308359ab917414ecb8bed Author: John Baldwin AuthorDate: 2023-09-25 14:46:53 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:46:53 +0000 videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41952 --- sys/dev/videomode/devlist2h.awk | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/videomode/devlist2h.awk b/sys/dev/videomode/devlist2h.awk index 2bae373cd307..7fc75df2e8d0 100644 --- a/sys/dev/videomode/devlist2h.awk +++ b/sys/dev/videomode/devlist2h.awk @@ -39,7 +39,6 @@ NR == 1 { gsub("\\$", "", VERSION) gsub(/ $/, "", VERSION) - printf("/*\t$FreeBSD" "$\t*/\n\n") > dfile printf("/*\n") > dfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > dfile @@ -48,7 +47,6 @@ NR == 1 { printf(" *\t%s\n", VERSION) > dfile printf(" */\n") > dfile - printf("/*\t$NetBSD" "$\t*/\n\n") > hfile printf("/*\n") > hfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > hfile From nobody Mon Sep 25 14:58:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwh0gjmz4rRWD; Mon, 25 Sep 2023 14:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwh070bz4WTc; Mon, 25 Sep 2023 14:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MIgBzwQ6f2HNLLD1cy5YeJ03ZiV+R6nGMyN+VwIDkJY=; b=nY6GNn1VUyHA0LZZRieJlS0L44JnWnWPsH/6vS+BhGNfG8iQKU146x5T61p4sw2Xg5GbwX 8y5RWcYbMMvINMOj0Uj3oWSU7ILquoSoMCdA8XdLETRTsXcdUxa9QKrXg5gR/xt9CWRQHp M6ZE6nozCnQT+Ix43Ox2dnYIM3qt8O2wXNLy3V3XNxuB5R0N6Eg4g3z5rtNm4+tSioaua9 Z+tU+IBNyRXg4sHY9Iok0FB8c0NAP6fEkR7UYrlFoqEqTpXGDpFtnc1xwAgxZPVnFKYqpK M8t0T2WremKC4li8pZdDse7lhbiShy9i4UuJvNq+ZjUdnjuY0amBUdqlzB9jZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653892; a=rsa-sha256; cv=none; b=GNerRKUyvN6uQw8+elEaL4exrbC0yydnzaI0R7QLDs6dNLvwh1W5nO7UZtlUCydQ7X1HPK lyMMMUtZnWW7UNcGfIXGaiHAlpxCmQ8/9vew25YYtDrPzSA7Kpk66K3eYIV5dfo3YiM1ZN 3hL6moTO82CT9eUinzUad3s0Tl/jaymTr8EdDL0j+jyEHzY621aINPvnaULjTlsEtm0Zyc /xgkhRP4KLlpKp1AFkmbNqxSo6ZxJEktTZq+EKBOOAgIVmrcs6at5cQfNJSfw9A7IGSooB CwaMeozlf1Os5KDS4vTTM4Wlncs71WPPWXgT3tGNjV6WO/TJhNIlsZmkPU9vCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MIgBzwQ6f2HNLLD1cy5YeJ03ZiV+R6nGMyN+VwIDkJY=; b=UVRC46y2UU6Ux6AQiUVuHoTbrOhIpWFJJBpoLBT91/auLVsABS7XJn4xR6SArh315R/cv4 Rb+LXlrDqFK8TTvMjdsRjexYYRt35rwiyTWS089gwniUNwHLBeS0x5dWjW2DWrbrQEAN/Z iP+e4uJS0za6zjV4onVPR2VpDWDSf4V0KAWaY/5Tv+TiAOPCtQECP1mHmPIx3yaYPbVXu3 UXzPags/2XOzH0HPGMmHoUFNkiKX5TLOyxl4p2pHLk2Wp7YnFajUgz1VT1iaawMpYeYsQ7 wmXumbZ5ZwB70O2F52rlHSYLZHBureVuYfGB11znZAIavxgSOQn6ZCv2Y25frg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwg5xgxz3hL; Mon, 25 Sep 2023 14:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwBfZ044471; Mon, 25 Sep 2023 14:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwB2r044468; Mon, 25 Sep 2023 14:58:11 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:11 GMT Message-Id: <202309251458.38PEwB2r044468@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: fc3cc652e500 - main - videomode: Regenerate files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: fc3cc652e500bd8e33b4b77449d167f1df073acb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fc3cc652e500bd8e33b4b77449d167f1df073acb commit fc3cc652e500bd8e33b4b77449d167f1df073acb Author: John Baldwin AuthorDate: 2023-09-25 14:49:30 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:49:30 +0000 videomode: Regenerate files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41953 --- sys/dev/videomode/ediddevs.h | 13 +++++++++++-- sys/dev/videomode/ediddevs_data.h | 3 +-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/videomode/ediddevs.h b/sys/dev/videomode/ediddevs.h index a0dc4e2b181c..872192882c3e 100644 --- a/sys/dev/videomode/ediddevs.h +++ b/sys/dev/videomode/ediddevs.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- @@ -81,6 +80,16 @@ #define EDID_VENDOR_VSC "ViewSonic" #define EDID_VENDOR_ZCM "Zenith" +/* + * List of known products, grouped and sorted by vendor. + * + * EDID version 1.3 requires that monitors expose the monitor name with + * the ASCII descriptor type 0xFC, so for monitors using that block, this + * information is redundant, and there is not point in listing them here, + * unless it is desired to have a symbolic macro to detect the monitor in + * special handling code or somesuch. + */ + /* Dell - this exists for now as a sample. I don't have one of these. */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVA 0x139A /* Ultrascan 14XE */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVB 0x139B /* Ultrascan 14XE */ diff --git a/sys/dev/videomode/ediddevs_data.h b/sys/dev/videomode/ediddevs_data.h index a953bcbf9981..c798bd85809d 100644 --- a/sys/dev/videomode/ediddevs_data.h +++ b/sys/dev/videomode/ediddevs_data.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- From nobody Mon Sep 25 14:58:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwj2zSbz4rRL0; Mon, 25 Sep 2023 14:58: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 4RvQwj0Bzzz4WRf; Mon, 25 Sep 2023 14:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWt73nqGnhcpbbNSHjqwPyZBksxc+lguxOLLSr7JdHQ=; b=oQwwmSb5OkgpiY/LF1r8DmqS70bgAXV5tRsXxYep70s264nAM9Ydhr/OpKU29XkP83Wlr3 gdGl6c7WbZg68shaThuN+hhv4CbuIntcRYyT0yfaqc3sbY3NfeLOW3YWY8WgSpBj4U+xk1 66h1phKOerfyiyR6SkIYRD3njLBja4Uk3JRJFrlIUptcGmHg7BjTlEyRnAQdLCcvqsujah clj9xD5aqZXnOGyY1uaVT4rANV/vI67lTgmEzG+39oWK5/QtCXtukFM1BQy4OUEAqXz+a/ 9/D97Rt+ePI/g9aCVYt7f6AMKUZfWOj8a+93lsXTaEUprKiZyprrCsrHqyIp3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653893; a=rsa-sha256; cv=none; b=ukxzPuGo425t3LnE2zGnehOraTi0Ko5UYDj4u47UknMzb12p/jdULAz9huYobm/WnaBH5n AT4sDaxtAG+0ZgUQirPJUpfExmnbfnXGnZk2HlpS5YI11pa1xQpq85oBtOk5BgTy1simdF uMIEKWLoJ+wre3QsyY2aU8bN4MeGYCiYg+6rzTKbHtZiVEsh4ebTr4G0sVE1jpQ4ylB9GD f0t4mv3bLE2+ECRIEVHbIji3dZ39VtBLJQfp9DP/WhiC9q/sMzs72A5RupodRoHgQZtvRJ gznIRMOr59DikRq6NLgpy3dVmwxTHQhVLRPdlHA+mYgwniaV6nt0hIw8aFZLLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWt73nqGnhcpbbNSHjqwPyZBksxc+lguxOLLSr7JdHQ=; b=Ti3pspU+t4w8ZJ8D3K5fUWiecHlWk8Jvqeql9gdzrXbnEY2fim8n7zlQdAqyr9Vt3oqKDx i7uObAJMPijaS+9KB5tKgdJ7h5b+6/eZXMQ+HVb/OzlBaOSTAsttG5DYZsTV3O9aJdzHqz Z/5c05BEdbpvY4cBeQ/5LHm2TMoAcJut4iuCiFCcuFGDASga6TcUmBwNSL2AJB9x4Ou2BW Ggkrka6sLHPMWAWtshi+xNJPkND3t8onPaEOT4j9fA5c3mknxfYL0eW5NnAqT+9Sc5HQFU Q4uAHunBT4DP5PddMv3NZpANrvLTvvrlFO1S/Ur07X2xt9s1lOjFl4fDrrdBaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwh6PmMz2wP; Mon, 25 Sep 2023 14:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwC3c044526; Mon, 25 Sep 2023 14:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwCTU044523; Mon, 25 Sep 2023 14:58:12 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:12 GMT Message-Id: <202309251458.38PEwCTU044523@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: 16837d353cdd - main - Remove a few more stray __FBSDID uses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 16837d353cdde87672d08112610e51e4121c4e50 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=16837d353cdde87672d08112610e51e4121c4e50 commit 16837d353cdde87672d08112610e51e4121c4e50 Author: John Baldwin AuthorDate: 2023-09-25 14:49:52 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:49:52 +0000 Remove a few more stray __FBSDID uses Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41954 --- lib/libc/tests/sys/cpuset_test.c | 3 --- sys/arm/mv/clk/armada38x_coreclk.c | 3 --- sys/dev/enic/enic.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/lib/libc/tests/sys/cpuset_test.c b/lib/libc/tests/sys/cpuset_test.c index 52c0dc877ab8..53d6a8215bbc 100644 --- a/lib/libc/tests/sys/cpuset_test.c +++ b/lib/libc/tests/sys/cpuset_test.c @@ -25,9 +25,6 @@ * SUCH DAMAGE. */ -#include -__FBSDID("$FreeBSD"); - #include #include #include diff --git a/sys/arm/mv/clk/armada38x_coreclk.c b/sys/arm/mv/clk/armada38x_coreclk.c index 14887ce88fb3..21e630d18b06 100644 --- a/sys/arm/mv/clk/armada38x_coreclk.c +++ b/sys/arm/mv/clk/armada38x_coreclk.c @@ -24,9 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -__FBSDID("$FressBSD$"); - #include #include #include diff --git a/sys/dev/enic/enic.h b/sys/dev/enic/enic.h index a2a40334986f..6d0eb8563efd 100644 --- a/sys/dev/enic/enic.h +++ b/sys/dev/enic/enic.h @@ -3,9 +3,6 @@ * Copyright 2007 Nuova Systems, Inc. All rights reserved. */ -#include -__FBSDID("$FreeBSD: $"); - #ifndef _ENIC_H #define _ENIC_H From nobody Mon Sep 25 14:58:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwk310dz4rRbX; Mon, 25 Sep 2023 14:58: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 4RvQwk1dddz4Wb1; Mon, 25 Sep 2023 14:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SLqCBoWVWuMhif6TEL+di7jf109tmgTyvejmgEkR21o=; b=EOyc0G46JDA4Lk/Qd5VBt5DoINptXrzKs9AKpuYZQML2jRwNO68CYaHPirj09UqNUNEPI6 8DPjXc719tIqOmiRzmpyR6IkPogjFYGXtULtKNCsMyh4mxCEMtl2NtJCL73LLVX+ml3QCx zg0eVo97IxpKxefieonuUMfcifRq9YclVbLAyCbEmmlJxe+ai4hiHFFcSewseGimHARHzW /T6Ns6zHP//BQI5KPupw1owV2foAdy7QIcRB2PVlGawRT4oAq1bm+rdEAiZoWPsKX/pS0I doB+cSlMgv7AhOdkb8wVsCNhJhjfH6DKc77uC9vKDH3cGuyUwJ0XyAtcv861Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653894; a=rsa-sha256; cv=none; b=xFRoq2rFWaDHCSNzH0dhBdyJqVi/+ArOxb/XJlRO2pTpWDZAzeis5S5QuABWLpkCtFTazB r49hwdQZ/W9FEBsSW9L1SwS23IW0k804fFElG6MsxgrdWNhBU6DCCebPjtc9SlYC5Bxn0K N3TzYaxbsOq/k60tzH47/hMk+N+gqfErgbEjLq89uv1PzPiPvQS1XDs6L12vetgBWJUtOh PM9bDH1ETFsp0eKJQS4LkAMOP0BzXqLxQjntvrsv2+GMDBBnkQ243WYTc9l4cYKJTi4nAG ihzNC4iskxqddM6Wpm8hifyohNDXr2UwbTCtF0v7HcOQb6Sv17nfw90D3r4fkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SLqCBoWVWuMhif6TEL+di7jf109tmgTyvejmgEkR21o=; b=kQ4owOhlVcqlCDrvlGMBZaBDfW7+EGSOsJQA+yEnmGvf23itwMo+PonRFBALAMs7uaQFsK a5oMhl8ecqxVGTve6OFZgMqM49JT3fZECmh+p0/ErX0mePKnu9SGDnvJi7OP3IbnCU85xN 5AwWL8D2S87WWSfWcwuGL3TPToTpI9/jwKR6wc+luxgmLdiAyejV0d0GZqZNjTI1lpNk1G eLMt/P9/zHVp9L3WwynC9QRdLAxBnVk6e5FziVsE7PaZ6eP9zTS9lc8WeGhbOvE/SwFS/C sQNNKBOGW+ysMOgDzjT4XdwwA1kQkfJ3WOVvcUDbtyVw47PM+qRXHJtxlnXHNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwk0bnFz3T5; Mon, 25 Sep 2023 14:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwDil044589; Mon, 25 Sep 2023 14:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwDGN044586; Mon, 25 Sep 2023 14:58:13 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:13 GMT Message-Id: <202309251458.38PEwDGN044586@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: 99159b076a27 - main - Update a couple of tools to not embed __FBSDID in generated files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 99159b076a278d1feb0e18ae99fd866c90443893 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=99159b076a278d1feb0e18ae99fd866c90443893 commit 99159b076a278d1feb0e18ae99fd866c90443893 Author: John Baldwin AuthorDate: 2023-09-25 14:50:11 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:50:11 +0000 Update a couple of tools to not embed __FBSDID in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41955 --- sys/dev/bnxt/convert_hsi.pl | 6 ------ tools/tools/drm/radeon/mkregtable/mkregtable.c | 5 ----- 2 files changed, 11 deletions(-) diff --git a/sys/dev/bnxt/convert_hsi.pl b/sys/dev/bnxt/convert_hsi.pl index df59aeab6cc9..19f5d2d3aea1 100755 --- a/sys/dev/bnxt/convert_hsi.pl +++ b/sys/dev/bnxt/convert_hsi.pl @@ -55,9 +55,6 @@ print OUT < -__FBSDID("\$FreeBSD\$"); - END_OF_NOTICE # Convert line endings @@ -132,9 +129,6 @@ if ($do_decode) { * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include - __FBSDID("\$FreeBSD\$"); - END_OF_NOTICE if(!open(HDR, ">", "hsi_struct_decode.h")) { diff --git a/tools/tools/drm/radeon/mkregtable/mkregtable.c b/tools/tools/drm/radeon/mkregtable/mkregtable.c index e0b94561f5cd..e39264fbcd2b 100644 --- a/tools/tools/drm/radeon/mkregtable/mkregtable.c +++ b/tools/tools/drm/radeon/mkregtable/mkregtable.c @@ -593,11 +593,6 @@ static void table_print(struct table *t) nlloop = (t->nentry + 3) / 4; c = t->nentry; - printf( - "#include \n" - "__FBSDID(\"$" "FreeBSD" "$\");\n" - "\n" - ); printf("static const unsigned %s_reg_safe_bm[%d] = {\n", t->gpu_prefix, t->nentry); for (i = 0, id = 0; i < nlloop; i++) { From nobody Mon Sep 25 14:58:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwl3WSZz4rRYR; Mon, 25 Sep 2023 14:58: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 4RvQwl2bZmz4Wf2; Mon, 25 Sep 2023 14:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CiShBO3WD0qDbditzTHzbd+tcLl+fcvhmVCbz+Vl79w=; b=TnfIvpMDKtO1B/JKYNhAy8GFjb8n70gHNmh9zmHQM/26bgpFbaUao/FEOK4RY+jgagT8qf 7z9TQkeKAkaZZpCOrRB8a6cRYpUm3AzNwQRT415UeFfn8E6STPYYds/BIVU+WzB4MFkIQS ZN9DH+uNAnSJHkobktwLKOQr1XdBb58n1bBIlOWE/3NpLdJGl45kZeaX/nb760BDcVAmm6 FNIOUVD6Me5LC5AIeMNn6UMzwwCKWnsNKlT/5oYfurhKJYUzSxUoaidy1VMwWBL5pkLYrK X1xF03SvL+GrVvTit62ognbiXBzKl0HgbECeguII+V9EMBJPkc4z6clg82EJ+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653895; a=rsa-sha256; cv=none; b=soJyZkYG/8nSjAh5pRZ660ZMGM6i9ypi8oAxVfZfnp6vd+EQzz+ABRhlhk2FY9dB4nl+EE 9D+tix+cg15OKyKx9ZcgT8k+q1D4E+5tlBsz+yZ1RKUm04ncG7oUvEDaDeNKDkStOI+Az4 ORSd/MRVNqdL8gMzFonqb4KRPuHPWHInHXRkxS+IkuKHGUVDThE1aguL17llQUELeBPGO4 yxIbq4ZuLyaZvrDIgcdGlALyC29eErKOlp0v5D9hBWunEvpR/cdsyuSDv296+e7bjmJHKY 7F2G7wjUmVX5gmnrw9cU0Mb1rL0BqTdfgPs7O5iHjvcZQrXLJEFxEOKNv3/K6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CiShBO3WD0qDbditzTHzbd+tcLl+fcvhmVCbz+Vl79w=; b=c2X3TvIlyZX7Q0EAfvEp0iNakVxcDvuTtK8OCuHEOhMzr+eSvl6LSoTITHNDjanLGbR6lr LGmK8q4+ekJSHqd2eevsLnJlrixNj32mnSY+san8R66086nf6e4We4GgdUYlOifns2SEmc ueZ9sOslEYRmIR9gaHrduSCwlgLHuQuFAD5P8v6ci/dsWr8XsZYiolUUfpir/oyYdXs7W0 iNlV/2Xbl4dsXSHgz46Z+HtIlaHrzynPJ7rGN6XRAegAtI0hGH5wy5hK9VLNkiCyvYFcXf Nd0bHVDCD/qU8dKB5ZZB2dyI1gUEtbksNT6WWwVnqBZwUTq3xy5ga1jAktkGBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwl1jLNz39x; Mon, 25 Sep 2023 14:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwFJ3044640; Mon, 25 Sep 2023 14:58:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwFIi044637; Mon, 25 Sep 2023 14:58:15 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:15 GMT Message-Id: <202309251458.38PEwFIi044637@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: e4c68414d085 - main - lpr: Remove now unused fallback definition for __FBSDID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e4c68414d0854b5e43dfd1b2b0cfbc295702e831 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e4c68414d0854b5e43dfd1b2b0cfbc295702e831 commit e4c68414d0854b5e43dfd1b2b0cfbc295702e831 Author: John Baldwin AuthorDate: 2023-09-25 14:50:33 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:50:33 +0000 lpr: Remove now unused fallback definition for __FBSDID Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41956 --- usr.sbin/lpr/common_source/lp.cdefs.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/lpr/common_source/lp.cdefs.h b/usr.sbin/lpr/common_source/lp.cdefs.h index c3ca409b6a8b..f5adf6e0ba5d 100644 --- a/usr.sbin/lpr/common_source/lp.cdefs.h +++ b/usr.sbin/lpr/common_source/lp.cdefs.h @@ -81,20 +81,6 @@ # define __unused #endif -/* - * All the lpr source files will want to reference __FBSDID() to - * handle rcs id's. - */ -#if !defined(__FBSDID) -# if defined(lint) || defined(STRIP_FBSDID) -# define __FBSDID(s) struct skip_rcsid_struct -# elif defined(__IDSTRING) /* NetBSD */ -# define __FBSDID(s) __IDSTRING(rcsid,s) -# else -# define __FBSDID(s) static const char rcsid[] __unused = s -# endif -#endif /* __FBSDID */ - /* * Some lpr include files use __BEGIN_DECLS and __END_DECLS. */ From nobody Mon Sep 25 14:58:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwm5SLHz4rRSB; Mon, 25 Sep 2023 14:58: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 4RvQwm4X9yz4WYW; Mon, 25 Sep 2023 14:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgvHcnaSOp+fcHp4xEph+vecvOjk4+MHR5ae0rEMBYw=; b=Hc84lvvS38Csca0ua2Z4MoPkYAl7fVQXaCAZIEYlh/ueYCif0h3d34Z4khGcOsi3Qz2cxQ UPN0npeVrxsZZZDTMR9Wvp0FvbRzKqa8M4RyQqy2nQMDW+Es+R4tp/J55dIpnfEunXDgB3 V00sN6/PK2yJdUUEZLHonBnl6DEWvy8IC7lsTV/139dCJH4vrycGGYAmvVa9qEO6hDyVBU yoIZYM4Kxmay5eQ/zNGjLnlxEYsvPKjHIzhYySUmLpOT8Wn93A1c67NgL0tdgUBK8WZ6vE f7qfFpjEHwJmK9y0GrCRA/IAezuXGZD8FdFUlTos9REERL6+s7IXHXkEjD52EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653896; a=rsa-sha256; cv=none; b=vIeiNxqzsEXiZvu60CHZCffTwnSQklgzZZHVxBOtFZUvQDfzn8zPRfDl15sG9hbVXZ6qOc Q/eLQoGDnTBOxGZjKW9F1qH71j/o+2BXzkJwuwcRlpFJPa9fproW4Rbei1c5/VnMTFir4e seHj2ReWGoITc/gX4OlhaPxNAx26hpR3pCQCLspumwFwNHHz1MyFxZov/kQpHPCYFWa2s2 PalMS3eAoRboGw8+YaHoy9jRQMojLHRSutK3lbGQ8HiwQ1MBhpUYuo47bbZIIPA8en0apG zSEDIObQGNUfjQ/s1BfVyjyxmbllLGaiQQOAqBY3sdAoGMpz4Aq+wgpGTSLxDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgvHcnaSOp+fcHp4xEph+vecvOjk4+MHR5ae0rEMBYw=; b=yiMt17t+YP4AKvwYpdw0ew+JNOgdhgqT4jZ6HcDYayV8kCsQFLrrUqcCm0QV/9HYZQcImQ zSzlaDYda8D0sJyC57uuteGixwCbRNX3PapAIja2Eb90Tnth2LWwrZhzyNpckj52qx+Qm+ gjy+zfXe4b1GxBtVUpUQ8w49W06gNExdGnBWbWjw6UMmkylOsf/U1TYgMYun9aIiqOcu51 45qwD/EMYlXHqvjt6WsPbQpeFnIfUZRJ4hDBe5a3G7xB/cBgjJJ/HLujbWHC4aS9UBCZqt Q1XV8clCogN9/FdhSyP8jL9bYbK7xCsMHw13bc+t6jkaAB+/FoySt/iyQhLmcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwm31rLz34d; Mon, 25 Sep 2023 14:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwGbr044689; Mon, 25 Sep 2023 14:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwG6U044686; Mon, 25 Sep 2023 14:58:16 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:16 GMT Message-Id: <202309251458.38PEwG6U044686@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: eba230afba49 - main - Purge more stray embedded $FreeBSD$ strings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: eba230afba4932f02a1ca44efc797cf7499a5cb0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eba230afba4932f02a1ca44efc797cf7499a5cb0 commit eba230afba4932f02a1ca44efc797cf7499a5cb0 Author: John Baldwin AuthorDate: 2023-09-25 14:54:56 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:54:56 +0000 Purge more stray embedded $FreeBSD$ strings These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957 --- lib/lib80211/lib80211_regdomain.c | 3 --- lib/libc/net/nslexer.l | 6 ------ lib/libc/powerpc/gen/syncicache.c | 5 ----- lib/libc/powerpc64/gen/syncicache.c | 5 ----- lib/msun/src/e_sqrtf.c | 4 ---- lib/msun/src/s_modf.c | 4 ---- lib/msun/src/w_cabsf.c | 5 ----- libexec/atrun/atrun.c | 5 ----- libexec/atrun/gloadavg.c | 5 ----- libexec/atrun/gloadavg.h | 3 --- libexec/comsat/comsat.c | 2 -- libexec/fingerd/fingerd.c | 2 -- libexec/getty/init.c | 2 -- libexec/getty/subr.c | 2 -- libexec/mknetid/hash.c | 5 ----- libexec/mknetid/mknetid.c | 5 ----- libexec/mknetid/parse_group.c | 2 -- libexec/rbootd/bpf.c | 2 -- libexec/rbootd/conf.c | 2 -- libexec/rbootd/parseconf.c | 2 -- libexec/rbootd/rmpproto.c | 2 -- libexec/rbootd/utils.c | 2 -- libexec/revnetgroup/hash.c | 5 ----- libexec/revnetgroup/parse_netgroup.c | 5 ----- libexec/revnetgroup/revnetgroup.c | 5 ----- libexec/rpc.rstatd/rstat_proc.c | 2 -- libexec/rpc.rstatd/rstatd.c | 5 ----- libexec/rpc.rusersd/rusers_proc.c | 5 ----- libexec/rpc.rusersd/rusersd.c | 5 ----- libexec/rpc.sprayd/sprayd.c | 5 ----- libexec/rtld-elf/rtld_malloc.c | 1 - libexec/talkd/announce.c | 2 -- libexec/talkd/print.c | 2 -- libexec/talkd/process.c | 2 -- libexec/talkd/table.c | 2 -- libexec/talkd/talkd.c | 2 -- sbin/dump/dumprmt.c | 2 -- sbin/dump/itime.c | 2 -- sbin/dump/main.c | 2 -- sbin/dump/optr.c | 2 -- sbin/dump/tape.c | 2 -- sbin/dump/traverse.c | 2 -- sbin/dump/unctime.c | 2 -- sbin/dumpfs/dumpfs.c | 2 -- sbin/ffsinfo/ffsinfo.c | 5 ----- sbin/fsck_msdosfs/boot.c | 2 -- sbin/fsck_msdosfs/check.c | 2 -- sbin/fsck_msdosfs/dir.c | 2 -- sbin/fsck_msdosfs/fat.c | 2 -- sbin/fsck_msdosfs/main.c | 2 -- sbin/fsdb/fsdb.c | 5 ----- sbin/fsdb/fsdbutil.c | 5 ----- sbin/fsirand/fsirand.c | 5 ----- sbin/growfs/debug.c | 5 ----- sbin/ifconfig/af_inet.c | 5 ----- sbin/ifconfig/af_inet6.c | 5 ----- sbin/ifconfig/af_link.c | 5 ----- sbin/ifconfig/af_nd6.c | 5 ----- sbin/ifconfig/ifbridge.c | 5 ----- sbin/ifconfig/ifclone.c | 5 ----- sbin/ifconfig/ifconfig.c | 2 -- sbin/ifconfig/ifgif.c | 5 ----- sbin/ifconfig/ifgroup.c | 5 ----- sbin/ifconfig/iflagg.c | 5 ----- sbin/ifconfig/ifvlan.c | 5 ----- sbin/ifconfig/sfp.c | 5 ----- sbin/init/init.c | 2 -- sbin/mknod/mknod.c | 2 -- sbin/mount/mount_fs.c | 2 -- sbin/mount_cd9660/mount_cd9660.c | 2 -- sbin/mount_msdosfs/mount_msdosfs.c | 5 ----- sbin/mount_nullfs/mount_nullfs.c | 2 -- sbin/mount_unionfs/mount_unionfs.c | 3 --- sbin/newfs_msdos/mkfs_msdos.c | 5 ----- sbin/newfs_msdos/newfs_msdos.c | 5 ----- sbin/nos-tun/nos-tun.c | 5 ----- sbin/restore/dirs.c | 2 -- sbin/restore/symtab.c | 2 -- sbin/restore/utilities.c | 2 -- sbin/umount/umount.c | 2 -- stand/libsa/powerpc/syncicache.c | 5 ----- sys/netpfil/ipfilter/netinet/fil.c | 1 - sys/netpfil/ipfilter/netinet/ip_auth.c | 1 - sys/netpfil/ipfilter/netinet/ip_frag.c | 1 - sys/netpfil/ipfilter/netinet/ip_nat.c | 1 - usr.bin/locate/locate/locate.c | 2 -- usr.bin/mktemp/mktemp.c | 5 ----- usr.bin/morse/morse.c | 2 -- usr.bin/nfsstat/nfsstat.c | 2 -- usr.bin/number/number.c | 2 -- usr.bin/primes/pattern.c | 2 -- usr.bin/primes/pr_tbl.c | 2 -- usr.bin/primes/primes.c | 2 -- usr.bin/printf/printf.c | 2 -- usr.bin/showmount/showmount.c | 2 -- usr.bin/tee/tee.c | 2 -- usr.bin/time/time.c | 2 -- usr.bin/truncate/truncate.c | 3 --- usr.bin/ul/ul.c | 2 -- usr.bin/uniq/uniq.c | 2 -- usr.bin/units/units.c | 5 ----- usr.bin/yes/yes.c | 2 -- usr.sbin/apmd/apmd.c | 5 ----- usr.sbin/btxld/btxld.c | 5 ----- usr.sbin/ckdist/ckdist.c | 5 ----- usr.sbin/config/main.cc | 2 -- usr.sbin/config/mkheaders.c | 2 -- usr.sbin/config/mkmakefile.cc | 2 -- usr.sbin/config/mkoptions.cc | 2 -- usr.sbin/flowctl/flowctl.c | 5 ----- usr.sbin/keyserv/crypt_server.c | 5 ----- usr.sbin/keyserv/keyserv.c | 2 -- usr.sbin/keyserv/setkey.c | 2 -- usr.sbin/mptable/mptable.c | 5 ----- usr.sbin/nfsd/nfsd.c | 2 -- usr.sbin/pciconf/cap.c | 5 ----- usr.sbin/pciconf/err.c | 5 ----- usr.sbin/pciconf/pciconf.c | 5 ----- usr.sbin/pw/bitmap.c | 5 ----- usr.sbin/pw/cpdir.c | 5 ----- usr.sbin/pw/grupd.c | 5 ----- usr.sbin/pw/psdate.c | 5 ----- usr.sbin/pw/pw.c | 5 ----- usr.sbin/pw/pw_conf.c | 5 ----- usr.sbin/pw/pw_group.c | 5 ----- usr.sbin/pw/pw_log.c | 5 ----- usr.sbin/pw/pw_nis.c | 5 ----- usr.sbin/pw/pw_user.c | 5 ----- usr.sbin/pw/pw_vpw.c | 5 ----- usr.sbin/pw/pwupd.c | 5 ----- usr.sbin/pw/rm_r.c | 5 ----- usr.sbin/rpc.lockd/test.c | 1 - usr.sbin/rpc.statd/test.c | 5 ----- usr.sbin/rpc.umntall/rpc.umntall.c | 5 ----- usr.sbin/rpc.ypupdated/update.c | 2 -- usr.sbin/spray/spray.c | 5 ----- usr.sbin/traceroute6/traceroute6.c | 2 -- usr.sbin/vidcontrol/decode.c | 5 ----- usr.sbin/vidcontrol/vidcontrol.c | 5 ----- 139 files changed, 476 deletions(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index f5ed236467f5..189d4661c78b 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -22,9 +22,6 @@ * (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 lint -static const char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ #include #include diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l index bd3c02dcacf4..ce0f18670e21 100644 --- a/lib/libc/net/nslexer.l +++ b/lib/libc/net/nslexer.l @@ -32,12 +32,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = - "$FreeBSD$"; -#endif /* LIBC_SCCS and not lint */ - #include "namespace.h" #include #define _NS_PRIVATE diff --git a/lib/libc/powerpc/gen/syncicache.c b/lib/libc/powerpc/gen/syncicache.c index 5192d1356153..6376cb0e576d 100644 --- a/lib/libc/powerpc/gen/syncicache.c +++ b/lib/libc/powerpc/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/libc/powerpc64/gen/syncicache.c b/lib/libc/powerpc64/gen/syncicache.c index d96529bc3833..7885a36bd1d1 100644 --- a/lib/libc/powerpc64/gen/syncicache.c +++ b/lib/libc/powerpc64/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/msun/src/e_sqrtf.c b/lib/msun/src/e_sqrtf.c index 1fd0cec447fb..f9e2a320f20e 100644 --- a/lib/msun/src/e_sqrtf.c +++ b/lib/msun/src/e_sqrtf.c @@ -13,10 +13,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/s_modf.c b/lib/msun/src/s_modf.c index ab13191b9004..ffb1702751fa 100644 --- a/lib/msun/src/s_modf.c +++ b/lib/msun/src/s_modf.c @@ -10,10 +10,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - /* * modf(double x, double *iptr) * return fraction part of x, and return x's integral part in *iptr. diff --git a/lib/msun/src/w_cabsf.c b/lib/msun/src/w_cabsf.c index b5065c8a5683..aedbdef217ca 100644 --- a/lib/msun/src/w_cabsf.c +++ b/lib/msun/src/w_cabsf.c @@ -5,11 +5,6 @@ * Placed into the Public Domain, 1994. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include "math_private.h" diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c index e9e49146ba7a..ee312591ccd4 100644 --- a/libexec/atrun/atrun.c +++ b/libexec/atrun/atrun.c @@ -26,11 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* System Headers */ #include diff --git a/libexec/atrun/gloadavg.c b/libexec/atrun/gloadavg.c index 86651aac3e67..e513183a391c 100644 --- a/libexec/atrun/gloadavg.c +++ b/libexec/atrun/gloadavg.c @@ -25,11 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifndef __FreeBSD__ #define _POSIX_SOURCE 1 diff --git a/libexec/atrun/gloadavg.h b/libexec/atrun/gloadavg.h index f0ae6b45e868..a202cf0b3700 100644 --- a/libexec/atrun/gloadavg.h +++ b/libexec/atrun/gloadavg.h @@ -26,6 +26,3 @@ */ double gloadavg(void); -#if 0 -static char atrun_h_rcsid[] = "$FreeBSD$"; -#endif diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index c9d490d2cf6e..138881db9e4a 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)comsat.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c index ff8d5046a577..dd51064a00a6 100644 --- a/libexec/fingerd/fingerd.c +++ b/libexec/fingerd/fingerd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)fingerd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/getty/init.c b/libexec/getty/init.c index 79b9601a2be1..e09cbf2c3e94 100644 --- a/libexec/getty/init.c +++ b/libexec/getty/init.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: init.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c index 68682df6d5bd..2c262e0968ca 100644 --- a/libexec/getty/subr.c +++ b/libexec/getty/subr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: subr.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/mknetid/hash.c b/libexec/mknetid/hash.c index d340142aad90..5375b80fbe3b 100644 --- a/libexec/mknetid/hash.c +++ b/libexec/mknetid/hash.c @@ -38,11 +38,6 @@ #include #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This hash function is stolen directly from the * Berkeley DB package. It already exists inside libc, but diff --git a/libexec/mknetid/mknetid.c b/libexec/mknetid/mknetid.c index 3a39b4b3e675..a5c8281ef34d 100644 --- a/libexec/mknetid/mknetid.c +++ b/libexec/mknetid/mknetid.c @@ -55,11 +55,6 @@ #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #define LINSIZ 1024 #define OPSYS "unix" diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c index e876bd9f2ff0..59ebf44eab37 100644 --- a/libexec/mknetid/parse_group.c +++ b/libexec/mknetid/parse_group.c @@ -33,8 +33,6 @@ #if 0 static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c index 0edcc06ccf7e..6fbe34111a67 100644 --- a/libexec/rbootd/bpf.c +++ b/libexec/rbootd/bpf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/conf.c b/libexec/rbootd/conf.c index af46f53c3c88..a48d3efdb9c1 100644 --- a/libexec/rbootd/conf.c +++ b/libexec/rbootd/conf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/parseconf.c b/libexec/rbootd/parseconf.c index 9585e87185c6..262f81fb68d7 100644 --- a/libexec/rbootd/parseconf.c +++ b/libexec/rbootd/parseconf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c index a31ec1de8abf..2603e697d8b8 100644 --- a/libexec/rbootd/rmpproto.c +++ b/libexec/rbootd/rmpproto.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/utils.c b/libexec/rbootd/utils.c index f5c2d62d30d7..36a7116a05c4 100644 --- a/libexec/rbootd/utils.c +++ b/libexec/rbootd/utils.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/revnetgroup/hash.c b/libexec/revnetgroup/hash.c index 2dd1a3f91d74..db8e95e3040c 100644 --- a/libexec/revnetgroup/hash.c +++ b/libexec/revnetgroup/hash.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/revnetgroup/parse_netgroup.c b/libexec/revnetgroup/parse_netgroup.c index a1e954164ea9..3d6a7939fa1d 100644 --- a/libexec/revnetgroup/parse_netgroup.c +++ b/libexec/revnetgroup/parse_netgroup.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This is a specially hacked-up version of getnetgrent.c used to parse * data from the stored hash table of netgroup info rather than from a diff --git a/libexec/revnetgroup/revnetgroup.c b/libexec/revnetgroup/revnetgroup.c index 11fba515a7ba..34ec0d9491c4 100644 --- a/libexec/revnetgroup/revnetgroup.c +++ b/libexec/revnetgroup/revnetgroup.c @@ -38,11 +38,6 @@ * Columbia University, New York City */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index 1f1bb7cf4048..cc488657c077 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -32,8 +32,6 @@ static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro"; static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c index 6a6b09b9ae0c..7cc3bac71c5d 100644 --- a/libexec/rpc.rstatd/rstatd.c +++ b/libexec/rpc.rstatd/rstatd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c index bfb65dadb004..3bc4169a989f 100644 --- a/libexec/rpc.rusersd/rusers_proc.c +++ b/libexec/rpc.rusersd/rusers_proc.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifdef DEBUG #include #endif diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index e1e77398c8ff..cf00dd8d181e 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.sprayd/sprayd.c b/libexec/rpc.sprayd/sprayd.c index 209d74af59af..2a71a93bf4ef 100644 --- a/libexec/rpc.sprayd/sprayd.c +++ b/libexec/rpc.sprayd/sprayd.c @@ -27,11 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rtld-elf/rtld_malloc.c b/libexec/rtld-elf/rtld_malloc.c index 4b5140551675..dafbc222322e 100644 --- a/libexec/rtld-elf/rtld_malloc.c +++ b/libexec/rtld-elf/rtld_malloc.c @@ -31,7 +31,6 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)malloc.c 5.11 (Berkeley) 2/23/91";*/ -static char *rcsid = "$FreeBSD$"; #endif /* LIBC_SCCS and not lint */ /* diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index 9cf326669998..b1b1acc09553 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)announce.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c index 4d10329dd7f8..47ccb89f20d6 100644 --- a/libexec/talkd/print.c +++ b/libexec/talkd/print.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* debug print routines */ diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c index 2bd22a1becb2..886fc038ab97 100644 --- a/libexec/talkd/process.c +++ b/libexec/talkd/process.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)process.c 8.2 (Berkeley) 11/16/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c index ed1560f86ff8..495d63b02b06 100644 --- a/libexec/talkd/table.c +++ b/libexec/talkd/table.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index eb609207b156..76d0ec5a09ad 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index d1769faa3daf..a8b2d9c221da 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index cb6d55625e6d..d9121e4df05a 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 779db5fb4b43..a5b4eaa6f8ac 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 8eb163516c72..d3ca5b2a926e 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index c123f7fa9404..3a3574f6d44d 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 08e902667759..281cffcdf6f2 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/unctime.c b/sbin/dump/unctime.c index 3e03a65f1a7c..5f44c80f9358 100644 --- a/sbin/dump/unctime.c +++ b/sbin/dump/unctime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)unctime.c 8.2 (Berkeley) 6/14/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 739f281feb7f..7d2598c190e8 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -54,8 +54,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)dumpfs.c 8.5 (Berkeley) 4/29/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/ffsinfo/ffsinfo.c b/sbin/ffsinfo/ffsinfo.c index 9d447d209ffd..539cbd1631e1 100644 --- a/sbin/ffsinfo/ffsinfo.c +++ b/sbin/ffsinfo/ffsinfo.c @@ -48,11 +48,6 @@ Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* ********************************************************** INCLUDES ***** */ #include #include diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c index 3d1657ad66f3..f91609470ad7 100644 --- a/sbin/fsck_msdosfs/boot.c +++ b/sbin/fsck_msdosfs/boot.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: boot.c,v 1.22 2020/01/11 16:29:07 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/check.c b/sbin/fsck_msdosfs/check.c index 654ceeb9c5ca..f672a2ac515c 100644 --- a/sbin/fsck_msdosfs/check.c +++ b/sbin/fsck_msdosfs/check.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: check.c,v 1.14 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #ifdef HAVE_LIBUTIL_H diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index 02fe07880e0e..c60eaab59b12 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -32,8 +32,6 @@ #include #ifndef lint __RCSID("$NetBSD: dir.c,v 1.20 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/fat.c b/sbin/fsck_msdosfs/fat.c index e35e2f27d305..567bfcd428cb 100644 --- a/sbin/fsck_msdosfs/fat.c +++ b/sbin/fsck_msdosfs/fat.c @@ -30,8 +30,6 @@ #include #ifndef lint __RCSID("$NetBSD: fat.c,v 1.18 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/main.c b/sbin/fsck_msdosfs/main.c index de54cd18eae7..0713189daa2d 100644 --- a/sbin/fsck_msdosfs/main.c +++ b/sbin/fsck_msdosfs/main.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: main.c,v 1.10 1997/10/01 02:18:14 enami Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index 2d8c75cce5fe..48526ad4044b 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index c8a3a8a525e3..737dabba643f 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index cd60093e3642..2a5eb0c5136d 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -32,11 +32,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index e0dfc997fcf6..456e67dbc5c2 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -41,11 +41,6 @@ * */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 83b605e8c4cb..d9499d64ed13 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index a0138e9b3de6..bc4f77f6848d 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_link.c b/sbin/ifconfig/af_link.c index 2a53daeb7d01..ab35d04a8709 100644 --- a/sbin/ifconfig/af_link.c +++ b/sbin/ifconfig/af_link.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index 7eeb86585197..73044e95740a 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -25,11 +25,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include *** 1171 LINES SKIPPED *** From nobody Mon Sep 25 14:58:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwn5s9Nz4rRhK; Mon, 25 Sep 2023 14: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 4RvQwn58D3z4WYm; Mon, 25 Sep 2023 14: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=1695653897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zijFxgTkFpHmnJN45r88GzcbazkzRvvAoZ1RZDdl3I=; b=hUfvDgAoIzJPW3moEtFJ18xKhNzV2uw7wUgOs3Q9ohuYG12kbtDySR+l3/In2QDRqjklQS Ou6lYWuVDtm3YhP3nJXjBVGDdiRr53ow1SXf5tUcqatlsUCJPr5/oFMQtU3xTHFvK902kG wdha7PPlLAXs7yy6Imoqb9x6pyk9WBcNj2VO7PF6hAmvjmmTowaVnFd2B2KtMjvKCcPTkN oqh3smxDpVfy3dXicVQLaCN0YNehj2UHTxs3jxi6tTYALLYDKx2fSGzvUmLTniVp6y1JJU LGtdV1iKE7chlj0i2QiAfbV/UiqU/L7u/LQUIbXNtA/FctJoJVM15W4GWC3Ivg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653897; a=rsa-sha256; cv=none; b=cDfoq5hjzbBWae5aQUNRUwh/3NwpaqzOMHq9SU60U6XvvV6CL7TxlRAw8KXLK9pS5eZ842 P27yPK7myxoEk226X/wUOubOGTnWoUI+cm8+/Vxqnkf+01qiZpcxQW9UnPZ96tqVcLRNs6 IQH/p06CZRzM8KUxrZ8CYuL5pUNvMq4LdJbfGGEpS55VK355IJqqJKE8S5gP9tZTUmq928 QucImhKZAYh+VGD3b5/sTdCiBaI5w3uHo+NbKWauTLt1d3yy73Bcru9hMe23QERyCH820j q68UjKB4quaWS5aiTzUQbz0UzwMjD46JVgp9x/N+QJaoa7+zPf+HJz1o6JbH6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zijFxgTkFpHmnJN45r88GzcbazkzRvvAoZ1RZDdl3I=; b=LY6x0XG8SwJEYsWYLTOGBNKnfMUnpTYnJlFMX50x0Hp9sKumFOg6mBimu/TqxwB6nbWobY gj8gMhungm0t64ZOhVn1KvjszHlvxxRmD80ajh+3hhmpie1ctp+JzomwHW34osxUyU1uq9 ArlT7EgxEixf/PstScddwBKlMHjTjFOq72k7pSvhg/9gMK9ine84KpDCsigoh/blLzHDZ/ oCDa9ebP+XMZr9rwy+sS4l2qS0eZ7DIunNXna3pWGFTYkhRlvrrditM2HQekHjSB8tohTH ubkYgh+AS5e5SJ9wjM3D4+uV6k+lSSYOtIOugDrzJDkbho+4ZvqHqqdY36Pg9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwn3tR6z3lN; Mon, 25 Sep 2023 14:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwHQd044743; Mon, 25 Sep 2023 14:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwH2N044740; Mon, 25 Sep 2023 14:58:17 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:17 GMT Message-Id: <202309251458.38PEwH2N044740@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: 5919ab299160 - main - powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9 commit 5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9 Author: John Baldwin AuthorDate: 2023-09-25 14:55:18 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:55:18 +0000 powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41958 --- release/powerpc/generate-hfs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/release/powerpc/generate-hfs.sh b/release/powerpc/generate-hfs.sh index 46f66d601ce3..50f77933f273 100755 --- a/release/powerpc/generate-hfs.sh +++ b/release/powerpc/generate-hfs.sh @@ -55,7 +55,6 @@ rm loader.tmp bzip2 $OUTPUT_FILE echo 'HFS boot filesystem created by generate-hfs.sh' > $OUTPUT_FILE.bz2.uu echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu -echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu rm $OUTPUT_FILE.bz2 From nobody Mon Sep 25 14:58:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvQwq2JGfz4rRWZ; Mon, 25 Sep 2023 14:58: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 4RvQwq0q1qz4WSp; Mon, 25 Sep 2023 14:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oc3Rm6Y66yOT0bki5qP3xzqDTWFeok2Jt9+jBLZXpQE=; b=RlViuYlu96XkEfnTL5T58lw0Ci/hKEBizxqDC/T3w6vbUfaF9i3KCM1AaDFhcU09zP5eRH XMwm+0jVZY/B9MxnEsPmqGSLREp8Q0q15EVp77DfM63C/k1U2Uw0jP5X/yDwx07wpg3/pP g64B3q24HSub5T/+vl4wNODdLFAUzaBTBvg4l4t74Gy1VnhUqF9OnFh+iG/2OoxY9HRN6r XBWDa+TTWo2wONvphPWDgvwq/M5j6Wrpw4FFm4ZN1kcX80fOlDSGn5BLW8opd9CT4fjmRK lxFdrWMZzlExkwNnMMe6nQQ0AicsDPX5Xgbjx2CLd/oWJP9mQFzMWYoV0S8r6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653899; a=rsa-sha256; cv=none; b=s2wCiJwEfX5GZZNOmy6pKMdhYiPiB395Q9WdhKBgm+YmcqJtgqBY/hgW4wMVQN+9S0y/1H GFcxLtpYxxPCs1xNaUL5bsI3oDLbyWHsrw1ONbYVY7K+RqFQNjyo2P5kcn1OWEeoh4JR// 0KdOd/3XOH7mJuwcuIv553fImSEEKbG9ZhhVTB75+zkFLFEijUr/G1hgI4Suye3FolrS0y 6XQ9X6cpEpA7g4SScxx9DN9epeZF9Gyl/Zsmcv3+srRYvRUuP5ul/Dd4HCGGCfS35G7CTf 7YKB9Ap9+0bmWje/pstUndy8PjxyX84xkhqQOvA6RJmgu/7ESpfgWWKSQr5pow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oc3Rm6Y66yOT0bki5qP3xzqDTWFeok2Jt9+jBLZXpQE=; b=SC5RIjQgg1oSFUn14kOWe5oUqbsVduduRY6sDFucFQsNYA9wlNGSZYqvVoKQ9jbwnwgTYV B79cXTEGldLiXN5VSUW9AsBpg8UR8zZSkOzaY9pIJFrBnhu50K2vUwi4VSeoGCs8bfzSKv pBwjSo+xQY4Wb7wvOPDzqbjBvwPYyaccn3jr1vgBN5ok/4XM6i0AnSs1APhcNw59+7F0h9 ODXWEbcrCHL81hx9oBVuUmhHLHQlW6CXwDl56Z0mwi3k9XA2HAUksUGGg+jygbovyNHVQI WIGkheZ9WpD2LR05lrA/xz+Ewczq1GWqEbUl2tECaATE4UocbqDjFWNon/xFfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwp4xC3z3Db; Mon, 25 Sep 2023 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwIiE044809; Mon, 25 Sep 2023 14:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwIor044806; Mon, 25 Sep 2023 14:58:18 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:18 GMT Message-Id: <202309251458.38PEwIor044806@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: c4e2333cb2a5 - main - Update a few tools to not embed $FreeBSD$ in generated files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c4e2333cb2a59e44004d824a1093d9bf1d9fe273 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c4e2333cb2a59e44004d824a1093d9bf1d9fe273 commit c4e2333cb2a59e44004d824a1093d9bf1d9fe273 Author: John Baldwin AuthorDate: 2023-09-25 14:55:43 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:55:43 +0000 Update a few tools to not embed $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41959 --- tools/test/iconv/tablegen/tablegen.c | 2 -- tools/tools/drm/gen-drm_pciids | 4 ---- tools/tools/locale/tools/cldr2def.pl | 1 - 3 files changed, 7 deletions(-) diff --git a/tools/test/iconv/tablegen/tablegen.c b/tools/test/iconv/tablegen/tablegen.c index 843f8f6cb135..ecc1c7fdb44d 100644 --- a/tools/test/iconv/tablegen/tablegen.c +++ b/tools/test/iconv/tablegen/tablegen.c @@ -254,7 +254,6 @@ main (int argc, char *argv[]) if (dflag && iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\tUCS/%s\n", argv[0]); printf("%s", citrus_common); @@ -266,7 +265,6 @@ main (int argc, char *argv[]) if (dflag && (iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0)) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\t%s/UCS\n", argv[0]); printf("%s", citrus_common); diff --git a/tools/tools/drm/gen-drm_pciids b/tools/tools/drm/gen-drm_pciids index ecb8e3aef6e4..472c75cb80dc 100755 --- a/tools/tools/drm/gen-drm_pciids +++ b/tools/tools/drm/gen-drm_pciids @@ -156,10 +156,6 @@ foreach my $vendor_define (sort keys(%linux_pciids)) { print STDERR "\nWrite FreeBSD header to stdout...\n"; print <<"EOF"; -/* - * \$FreeBSD\$ - */ - /* * Generated by $progname from: * o previous FreeBSD's drm_pciids.h diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl index 8e48f32f263c..e59e6d3b13a1 100755 --- a/tools/tools/locale/tools/cldr2def.pl +++ b/tools/tools/locale/tools/cldr2def.pl @@ -947,7 +947,6 @@ sub make_makefile { } open(FOUT, ">$TYPE.draft/Makefile"); print FOUT < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3aaa7724d68f - main - sendmail: Drop $FreeBSD$ from .mc files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3aaa7724d68fb001ca3c7e75950edcb617aaeb65 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3aaa7724d68fb001ca3c7e75950edcb617aaeb65 commit 3aaa7724d68fb001ca3c7e75950edcb617aaeb65 Author: John Baldwin AuthorDate: 2023-09-25 14:56:02 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:56:02 +0000 sendmail: Drop $FreeBSD$ from .mc files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41960 --- etc/sendmail/freebsd.mc | 1 - etc/sendmail/freebsd.submit.mc | 1 - etc/sendmail/freefall.mc | 1 - 3 files changed, 3 deletions(-) diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc index 5fd201da3900..cf80a3133c74 100644 --- a/etc/sendmail/freebsd.mc +++ b/etc/sendmail/freebsd.mc @@ -48,7 +48,6 @@ divert(-1) # divert(0) -VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) DOMAIN(generic) diff --git a/etc/sendmail/freebsd.submit.mc b/etc/sendmail/freebsd.submit.mc index 165c5f8eadf8..e14a6bc56500 100644 --- a/etc/sendmail/freebsd.submit.mc +++ b/etc/sendmail/freebsd.submit.mc @@ -14,7 +14,6 @@ divert(-1) # divert(0)dnl -VERSIONID(`$FreeBSD$') define(`confCF_VERSION', `Submit')dnl define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet diff --git a/etc/sendmail/freefall.mc b/etc/sendmail/freefall.mc index df07fea8b673..6406ab502ae1 100644 --- a/etc/sendmail/freefall.mc +++ b/etc/sendmail/freefall.mc @@ -40,7 +40,6 @@ divert(-1) # divert(0)dnl -VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) FEATURE(nullclient, smarthost.ysv.freebsd.org) From nobody Mon Sep 25 15:45:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvRzc4j3Kz4tjRf; Mon, 25 Sep 2023 15: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 4RvRzc45K9z4hPH; Mon, 25 Sep 2023 15: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=1695656748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vJixgSpV5z80rYv4H1CgLJ1g8je1aOjh7Ym7an39SM=; b=Ds+eFjribBrt6QjHKBN9tXNUMXqCAYNQNSm5CiaVtG5xC7Iij1dP1mOh3Eg77Ulik513VK a30KPYnxTXhqF3yiENGOCNywowPLUHEBpJVi9MXncQbT5KI5VLPqdyHE0RJSYRwL8gNLyf 3jUvwYjFKPFav0HKUGe2fcCTE4IpHvhCwPUR0fSrypaHQEBDuKmF4xICcOd+D/59aQFNOr zCbySKhj+covr5L9Hgwi3P4oLcVGvlYmwArGyOriSbySjNHLvxZ4nHYdVR0/17HhRA6JAf NIRWWYCirPqd+xWa/TR8hbX92lPKWwW6qu2mnI45DV8kYFxgb/OMOiHJmOr5+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695656748; a=rsa-sha256; cv=none; b=feooSjyO93ryO8yULw4Y+6a/sJYHTc2T1l5exKvAhQAxot405pExw3xZfkCIkb/NMrBBPt y74CexzdW6epsEIvjkCVtQloiSNGZd4OJ3Bc+svpTQs3b85Iw2/Ja/cyxC2agtPTDp62O9 rcGPFIehxZxM1m7j8rAldyvLHksMuYKlJ3D4pShyY1jlgOOT6T41mAuSxMUNdVsHP7tgts mSmSUCbCKm/UO1VI9FZ3nLSEWgrUPxY9kIs1o73aQQZn6LLYs8BqILvxhIZFd9z0U/VEhd z6D5LX9q2FgbNP1yoBtcuMi1vxoIdlQYXNIYLAJ341Z137qARwssfrDvmv1+Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695656748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vJixgSpV5z80rYv4H1CgLJ1g8je1aOjh7Ym7an39SM=; b=ZnxWq6pEGdWBYGcXab8o8PACq5hvMpPfkfMPOQKgAvafm/BtfwKOApwQjvb6df3Tlsx5cC 7ZMk/2ikyXs5mu4WupCrBJT2z2+0kC6uJ5c0hft0ejC7SVasR4g2M0rLFpFBzvWaNShDzE WX3plbphBwvkGmkcHQF88EHecmbsiTcKMCNoWyCN/o/KfAHzHAgDqGGPyt1DacloPmNMCa CHyboIzGFid1s5c3zsniAMb7+SQ9go9n4LwV0Iko8o76XCmexjHezb7rN0iAenHpWfd52N 2hZvrMmGqHPi5qw0mvq4J5s6fUD6e4xmj59PVR7CrlIF18Z3iP5sCnaAg9V2dA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvRzc31rqz4mN; Mon, 25 Sep 2023 15:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PFjm3A028080; Mon, 25 Sep 2023 15:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PFjmnh028077; Mon, 25 Sep 2023 15:45:48 GMT (envelope-from git) Date: Mon, 25 Sep 2023 15:45:48 GMT Message-Id: <202309251545.38PFjmnh028077@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: 6a770c04986b - main - openssl: document the update process List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 6a770c04986b01a95fbbdadc621e25cdfffbf7a9 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6a770c04986b01a95fbbdadc621e25cdfffbf7a9 commit 6a770c04986b01a95fbbdadc621e25cdfffbf7a9 Author: Pierre Pronchery AuthorDate: 2023-09-25 15:40:26 +0000 Commit: Ed Maste CommitDate: 2023-09-25 15:43:58 +0000 openssl: document the update process This is directly inspired from the equivalent document for OpenSSH. Sponsored by: The FreeBSD Foundation --- crypto/openssl/FREEBSD-upgrade | 130 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/crypto/openssl/FREEBSD-upgrade b/crypto/openssl/FREEBSD-upgrade new file mode 100644 index 000000000000..76943efdbde6 --- /dev/null +++ b/crypto/openssl/FREEBSD-upgrade @@ -0,0 +1,130 @@ + FreeBSD maintainer's guide to OpenSSL + ===================================== + + These instructions assume you have a clone of the FreeBSD git repo + main branch in src/freebsd/main, and will store vendor trees under + src/freebsd/vendor/. In addition, this assumes there is a "freebsd" + origin pointing to git(repo).freebsd.org/src.git. + +01) Switch to the vendor branch: + + $ cd src/freebsd/main + $ git worktree add ../vendor/openssl-X.Y freebsd/vendor/openssl-X.Y + $ cd ../vendor/openssl-X.Y + +02) Download the latest OpenSSL tarball and signature from the official + website (https://www.openssl.org/source/). + + $ (cd .. && fetch https://openssl.org/source/openssl-X.Y.Z.tar.gz) + $ (cd .. && fetch https://openssl.org/source/openssl-X.Y.Z.tar.gz.asc) + +03) Verify the signature: + + $ gpg --verify ../openssl-X.Y.Z.tar.gz.asc ../openssl-X.Y.Z.tar.gz + +04) Unpack the OpenSSL tarball to the parent directory: + + $ tar -x -X FREEBSD-Xlist -f ../openssl-X.Y.Z.tar.gz -C .. + +05) Copy to the vendor branch: + + $ rsync --exclude FREEBSD.* --delete -av ../openssl-X.Y.Z/* . + +06) Take care of added / deleted files: + + $ git add -A + +07) Commit: + + $ git commit -m "openssl: Vendor import of OpenSSL X.Y.Z" + +08) Tag: + + $ git tag -a -m "Tag OpenSSL X.Y.Z" vendor/openssl/X.Y.Z + + At this point the vendor branch can be pushed to the FreeBSD repo via: + + $ git push freebsd vendor/openssl-X.Y + $ git push freebsd vendor/openssl/X.Y.Z + + Note the second "git push" command is used to push the tag, which is + not pushed by default. + + It is also possible to push the branch and tag together, but use + --dry-run first to ensure that no undesired tags will be pushed: + + $ git push --dry-run --follow-tags freebsd vendor/openssl-X.Y + $ git push --follow-tags freebsd vendor/openssl-X.Y + + The update and tag could instead be pushed later, along with the merge + to main, but pushing now allows others to collaborate. + +09) Merge from the vendor branch: + + $ git subtree merge -P crypto/openssl vendor/openssl-X.Y + + A number of files have been deleted from FreeBSD's copy of OpenSSL. + If git prompts for these deleted files during the merge, choose 'd' + (leaving them deleted). + +10) Resolve conflicts. Remember to bump the version and date in + secure/lib/libcrypto/Makefile.inc and + crypto/openssl/include/openssl/opensslv.h. + +11) Diff against the vendor branch: + + $ git diff --diff-filter=M vendor/openssl/X.Y.Z HEAD:crypto/openssl + + Review the diff for any unexpected changes. + +12) Re-generate the assembly files: + + $ cd secure/lib/libcrypto + $ make cleanasm buildasm + +13) Update the appropriate makefiles to reflect changes in the vendor's + build.info files. This is especially important if source files have + been added or removed. Keep in mind that the assembly files generated + belong to sys/crypto/openssl, and will therefore affect the kernel as + well. + +14) If symbols have been added or removed, update the appropriate + Version.map to reflect these changes. + +15) Compare compilation flags, the list of files built and included, the + list of symbols generated with the corresponding port if available. + +16) Re-generate the manual files: + + $ tar xzf openssl-X.Y.Z.tar.gz + $ (cd openssl-X.Y.Z && ./Configure --prefix=/usr --openssldir=/etc/ssl && + make build_man_docs) + [...] + $ find openssl-X.Y.Z/doc/man/man1 -name '*.1' -exec cp {} secure/usr.bin/openssl/man/ \; + $ find openssl-X.Y.Z/doc/man/man3 -name '*.3' -exec cp {} secure/lib/libcrypto/man/man3/ \; + $ find openssl-X.Y.Z/doc/man/man5 -name '*.5' -exec cp {} secure/lib/libcrypto/man/man5/ \; + $ find openssl-X.Y.Z/doc/man/man7 -name '*.7' -exec cp {} secure/lib/libcrypto/man/man7/ \; + $ grep -nrF usr/local secure/lib/libcrypto/man secure/usr.bin/openssl/man + [correct the references to the prefix and OpenSSL directories] + $ git commit --amend secure/lib/libcrypto/man secure/usr.bin/openssl/man + + Review the diff and tree status for anything requiring attention. + +16) Build and install world, reboot, test. + +17) Test the legacy and fips providers as well: (here with "test" as the password) + + $ echo test | openssl rc4 -provider legacy -e -a -pbkdf2 + enter RC4 encryption password: + Verifying - enter RC4 encryption password: + U2FsdGVkX1+JvhqxLMOvlxvTi1/h + + # openssl fipsinstall -out /etc/ssl/fipsmodule.cnf -module /usr/lib/ossl-modules/fips.so + INSTALL PASSED + # vi /etc/ssl/openssl.cnf + [enable the FIPS module] + # echo test | openssl aes-256-cbc -provider fips -e -a -pbkdf2 + U2FsdGVkX19lTexiYsnMX83ZLSojBOFwv7GB0Plhgmw= + +18) Commit and hope you did not miss anything. + From nobody Mon Sep 25 16:11:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvSYG3ZkPz4tkxR; Mon, 25 Sep 2023 16:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvSYG34qyz4kBt; Mon, 25 Sep 2023 16:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695658290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eQ6ZTvGaFRVXBHdPT5OALGbebLXMFjbAWHHDmx1P4o=; b=mVTsr12UWyovIcB7vUoGTZ0nQghv72o2m0GFxFmYhB4oyIBGZf997xMlSvPOHtX++Xcmhh gpehJyX9IwdsciWigwdXeEihWcWbvs+6ooo2/i9LkYOaP1sTPYIPpkPxwzowMacj2Pz0+e rDIrgVqMhrVfOB0fwoVip6XvoYmo9ffpvRcMSNotyryglu024VPcNY/iysHhwGr2uQ1Jr/ BpTLKs1qvndA323dNxXuMjh4y7whvE+Dhqn8uh3eThk32PXptT9aKvl67zkmBKlwRsUilm Aqd6Fcg9M0DrB17KoNHRQeq9Bu/sWf5ULPt6XEANsOzUoHB9XsNWQV1qTlWQQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695658290; a=rsa-sha256; cv=none; b=InxmE1Kkevk3lrlduznmtF7/CW+JHnFqV83if5EG0j/VBmv/dAr/r9nGNh9dqgEeOxPGK+ IhG3kbtfF6uCbuSpS9x8Z0dU2tSzbLof8lphnRglQXU4gqMkROI077WRgvLBvb5Tv5Bjev 49dzlj34gjjZvTJnbhrRkEHRmR27PSJsY6diBG5G5M7kQPa4QuCTdxSd9uEumO/FYHsCK7 /nr0NzOCc/ew6RCpp7QrewHvNX9VUkbZdUZyrISrKst2+37h+YY88Rn9buy5W0eerUMyHo z4VIt1/mmthFpvy/FsOHn0sR7MTr3/tXcuXyPZrJ3MSAeZW7mq+3MJjBz3yBbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695658290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eQ6ZTvGaFRVXBHdPT5OALGbebLXMFjbAWHHDmx1P4o=; b=ngFDvP9Tc2dMGIWIKT4VyuxGRaZKArhKkt5lpYlKNMbT3XyFbWSGIaCrHZ291Y6NOcbQEB ncN5krml66ngnvjnTlkx/oLnIcv4iKoaksoiBgeO7gVPwaw+tgJJ3op/Z9yPtoRigb8BYq KnLk8Ih1wxobAW5lc0jMzEy+VoEb4KIqQAKt23XGhO6ggpZW/000mUMYajj/LEGzbfLWCw I5tPpCsaCzLX+ZYe7puLgwQU2vUmluQ5JEFt+/468BCpHTdsz5ERj5kKgnOmD8bgj/BTLk PqyzOPugy10A9SSr/yA0QxueeXs6Q8Q8tnB5JPMLCQYKAtbLvM51WHbvORELsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvSYG27zdz5ht; Mon, 25 Sep 2023 16:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PGBU26075931; Mon, 25 Sep 2023 16:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PGBUFM075928; Mon, 25 Sep 2023 16:11:30 GMT (envelope-from git) Date: Mon, 25 Sep 2023 16:11:30 GMT Message-Id: <202309251611.38PGBUFM075928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: c989957f28ef - main - printenv: Add test for printenv. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c989957f28ef5b03f594265612e3437c1e826ed4 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c989957f28ef5b03f594265612e3437c1e826ed4 commit c989957f28ef5b03f594265612e3437c1e826ed4 Author: Wang-Yan-Hao AuthorDate: 2023-09-25 16:02:14 +0000 Commit: Alan Somers CommitDate: 2023-09-25 16:10:20 +0000 printenv: Add test for printenv. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D41468 --- etc/mtree/BSD.tests.dist | 2 ++ usr.bin/printenv/Makefile | 7 +++- usr.bin/printenv/tests/Makefile | 6 ++++ usr.bin/printenv/tests/printenv_test.sh | 64 +++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 04dc24d772c8..f6f55276284a 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1095,6 +1095,8 @@ .. pr .. + printenv + .. printf .. procstat diff --git a/usr.bin/printenv/Makefile b/usr.bin/printenv/Makefile index 9039cea4944f..1947945f6bcf 100644 --- a/usr.bin/printenv/Makefile +++ b/usr.bin/printenv/Makefile @@ -1,5 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include + PROG= printenv -.include +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + +.include \ No newline at end of file diff --git a/usr.bin/printenv/tests/Makefile b/usr.bin/printenv/tests/Makefile new file mode 100644 index 000000000000..7c5599f222d3 --- /dev/null +++ b/usr.bin/printenv/tests/Makefile @@ -0,0 +1,6 @@ +PACKAGE= tests + +ATF_TESTS_SH= printenv_test +BINDIR= ${TESTSDIR} + +.include diff --git a/usr.bin/printenv/tests/printenv_test.sh b/usr.bin/printenv/tests/printenv_test.sh new file mode 100644 index 000000000000..2bf809cb0977 --- /dev/null +++ b/usr.bin/printenv/tests/printenv_test.sh @@ -0,0 +1,64 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 The FreeBSD Foundation +# +# This software was developed1 by Yan-Hao Wang +# 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 +# + +atf_test_case base +base_head() +{ + atf_set "descr" "Check that all reported variables exist with the reported values." +} +base_body() +{ + printenv | while IFS= read -r env; do + env_name=${env%%=*} + env_value=${env#*=} + expected_value=$(eval echo "\$$env_name") + atf_check_equal "${env_value}" "${expected_value}" + done +} + +atf_test_case add_delete_env +add_delete_env_head() +{ + atf_set "descr" "New changes to the environment should be reflected in printenv's output" +} +add_delete_env_body() +{ + env_name=$(date +"%Y%m%d%H%M%S") + export "env_${env_name}=value" + atf_check -o inline:"value\n" printenv "env_${env_name}" + unset "env_${env_name}" + atf_check -s exit:1 printenv "env_${env_name}" +} + +atf_init_test_cases() +{ + atf_add_test_case base + atf_add_test_case add_delete_env +} From nobody Mon Sep 25 17:20:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvV541N6sz4tplV; Mon, 25 Sep 2023 17:20: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 4RvV540rvhz4q7L; Mon, 25 Sep 2023 17:20:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695662440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lCUdXYmhUryrGP2DmiLz9omvj9avRmQLcShrAW7L1ms=; b=jdsQOypc7HssT4twH6/r+Q28M6KokXDhOxpJQuSXtoclWoGsC5fmP9wxVJyIM1AL6/3e1k xW70PV38JxS6teW/PXvkS436o7kPCLX8H1d6kTiHGw8d4fOPuektYiyAY0+pjmQJG92/p2 Nz3zdEKBaBnb+26+X3tg2eOK2h9NEwbDh4CKQX5JtfVEWpDxNJHmyo1HwfIXd5qEivO7PM Mn/jXYGNLuWFEGNh08nc26Gas5r25BJtbAU5FV6b0K30zfzjubuCX8kY+vQfWpPh4HQpWx B36tFjjCFASO8jPdmEpkathjtvozIWGu+sZXa2F+3VKfSwrtrebK2ApZdRjirA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695662440; a=rsa-sha256; cv=none; b=a274QqBNgq4ZQi5CbnIYG6BdXezJuGb3XdsNuQYWpLquH9/1C/b7s0dYfEzp7Emk4XN1Ro OvnzwPIPg9mzk38UECLgnqaQmc27wpeEFymi52K1OLrbrfB9akL3YuxeqL4GphUgOTBWBL 26+ouAzbtCE+P4qzznaxZa52xQ+2VkQCVzCVMsvMoC8pN7qlj18gPIvDo/IGIRaDBz62Ma Z4ULXXqvIAibh93xIzhZplTRwkcUYaEfSPbEhJJDm3SykbTbsuqO39m44KVAZJTiNLaspD 9GArAPdM4ZoM59WoKUI5+7vVqF6YGm88SJ8gAp1ODcq6dTAgCUx8aga8RTYZ/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695662440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lCUdXYmhUryrGP2DmiLz9omvj9avRmQLcShrAW7L1ms=; b=qpnZxLevECMG0lvnHF6rc5GR9QOv3lo4uZg0CfK33AknnAe0bNGkz4aeUDuuS9TRdhx8fu JJOa0xmedMEbTxaYRYryiRPLydOFfyBr6coTCMZa5PcR/UENHIBCeSyq5PrrQVmDSNVBMS swFYszmT1hjDUXWvsVax+pxtGIJg7MLwVcshNkq3Hoyr/MuIpzeEjm4pJkrl+wKmghU9nu 0vVgblg+RsEaVe+XkHWuUnWJcSwN/zkJGPk5BrMQX4Qf++vIqAXhFmq4edqmN5HihuK3UM 1PxtZtsYSkaOuywn1MjGt+9+RVtktLxpxFTd2399DuLEXl5sO47xpjYcImG8bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvV5371Jyz7Wr; Mon, 25 Sep 2023 17:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHKd0B087258; Mon, 25 Sep 2023 17:20:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHKdJ4087255; Mon, 25 Sep 2023 17:20:39 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:20:39 GMT Message-Id: <202309251720.38PHKdJ4087255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 49e1f23c7715 - releng/14.0 - libpmc: make pmc_pmu_pmcallocate() machine-independent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 49e1f23c7715ec1ac665d7c8fea226f761454b3e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=49e1f23c7715ec1ac665d7c8fea226f761454b3e commit 49e1f23c7715ec1ac665d7c8fea226f761454b3e Author: Mitchell Horne AuthorDate: 2023-06-19 22:32:22 +0000 Commit: Mitchell Horne CommitDate: 2023-09-25 17:18:44 +0000 libpmc: make pmc_pmu_pmcallocate() machine-independent Have it call the platform-dependent version. For better layering, move the reset logic inside the new function. This is mainly to facilitate an upcoming change. Reviewed by: jkoshy Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40752 (cherry picked from commit 45dcc17e2fb8f0f9838ba167b311f271a08fcea9) (cherry picked from commit 196bb0e152cf2d3a0ba61bda8a2d09c8107a809a) --- lib/libpmc/libpmc.c | 5 ----- lib/libpmc/libpmc_pmu_util.c | 34 ++++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index 71fba89237ff..a7ed1c3d9ac8 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -1091,11 +1091,6 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, assert(pmc_config.pm_ev < PMC_EVENT_FIRST); goto found; } - - /* Otherwise, reset any changes */ - pmc_config.pm_ev = 0; - pmc_config.pm_caps = 0; - pmc_config.pm_class = 0; } free(spec_copy); spec_copy = NULL; diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index a61f81f7d2c7..772dec7a9d53 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -572,8 +572,8 @@ pmc_pmu_intel_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm, return (0); } -int -pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +static int +pmc_pmu_pmcallocate_md(const char *event_name, struct pmc_op_pmcallocate *pm) { const struct pmu_event *pe; struct pmu_event_desc ped; @@ -604,8 +604,8 @@ pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) #elif defined(__powerpc64__) -int -pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +static int +pmc_pmu_pmcallocate_md(const char *event_name, struct pmc_op_pmcallocate *pm) { const struct pmu_event *pe; struct pmu_event_desc ped; @@ -631,8 +631,8 @@ pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) #elif defined(__aarch64__) -int -pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +static int +pmc_pmu_pmcallocate_md(const char *event_name, struct pmc_op_pmcallocate *pm) { const struct pmu_event *pe; struct pmu_event_desc ped; @@ -658,9 +658,27 @@ pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) #else -int -pmc_pmu_pmcallocate(const char *e __unused, struct pmc_op_pmcallocate *p __unused) +static int +pmc_pmu_pmcallocate_md(const char *e __unused, struct pmc_op_pmcallocate *p __unused) { return (EOPNOTSUPP); } #endif + +int +pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +{ + int error; + + error = pmc_pmu_pmcallocate_md(event_name, pm); + if (error != 0) { + /* Reset any changes. */ + pm->pm_ev = 0; + pm->pm_caps = 0; + pm->pm_class = 0; + + return (error); + } + + return (0); +} From nobody Mon Sep 25 17:20:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvV552XJVz4tpfp; Mon, 25 Sep 2023 17:20: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 4RvV551s5Fz4pw7; Mon, 25 Sep 2023 17:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695662441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKJomyz6N0n17fVxpdwgCTUGb1JPs+1ZjIooPrNeYl4=; b=Xg6fPnRrTL09ZUPtRZtET92C8tiashP7ktY+HVQjUc05ZcEtwhBmZaBeKvz3iWj3JOx8QS XPCxlUKcMjNIrntiP8YiF0//NFH/dM517sGReGh7AeaCQ7M2ZZoY+XtBJ7bDFt9bcaLpGH JRGFjCAnrxpbCodJQfIqVUq0deWp6KbiImSM+zj05CsjW4Bay2bPAktomMEo6hdA77Yprr 9rLpPtPWhT8zkXAikF23mes9NBvgKjV34nIo8DaElZycuuTF8B9fJhjtWIkQ6WJEj21RzM 6q6Ew9zt4yK/1dgoNKtGmSpLI1dOnUGZXcPqluTCrKFvMZK7GKcliK0xGJvPww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695662441; a=rsa-sha256; cv=none; b=Yt9hzsztcYfGJePeA7hRHG8NYJ6B6Zb+00lkSdGw2EjBxQxWuFt3Wm6GN34BLJH47bUeCO 1CoKbA5ScAOiVUUduWC+Jxfy86h9iG+ZJyLTYtOfDewn1fkMJK0L+WkKzOys2H2fo9hTbi Bvw9AUYc02kKVK0NK8nuhe5DvZk0J+B8sy+uMcSygrWl2Y5s3PakbMbtkXLZMGl6urLAAT eU+4Et9mn4wVFvfD2tj6AP354iw8QkJnTlLSHhUfx91/ByasXsH66X19Vnc/AawoSh7ZQ8 vNWLBWRNI+0CTIpcuf5vyXS7TVPqxQyNw3TBpcEcbHXnSZK8wavAdG5QEcsKZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695662441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKJomyz6N0n17fVxpdwgCTUGb1JPs+1ZjIooPrNeYl4=; b=PhrD4/yA/fDAxOfw/7dlbDtZywOeNnVVO1QmZhjGQkdLwaBC4ErdUa10ht8Zuju0P/ElBx WW2L5a8rk99uO9bgm3C1RsihG0ZQc6lLWvwRKsbqxnCqRmj7RGApaEUVKbqaWa8tHBbnhT pff6GcdA2mXpoHS9jAtStIB3TDtO5sgCPakkbgxcUg08ACcnRabwaA+oahHcMIrWS4hVP1 h+GvvQRn4YVsrMDQNSB9rk4dBLRbu4pnCtUy84CAFYdaPaq7jLlfZ09MxAXR/iO2U+wuME kwGRBnOIHE+OAw9VMtGxvBoKIkeeMB0fYRgkCF26wK1aL6ViFHYCMTuO6XksHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvV550wztz7F3; Mon, 25 Sep 2023 17:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHKfEW087303; Mon, 25 Sep 2023 17:20:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHKfGY087300; Mon, 25 Sep 2023 17:20:41 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:20:41 GMT Message-Id: <202309251720.38PHKfGY087300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 5f74163bdefc - releng/14.0 - pmc: better distinguish pmu-events allocation path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5f74163bdefc96c2723a66cf6283319848b861aa Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5f74163bdefc96c2723a66cf6283319848b861aa commit 5f74163bdefc96c2723a66cf6283319848b861aa Author: Mitchell Horne AuthorDate: 2023-06-06 17:26:46 +0000 Commit: Mitchell Horne CommitDate: 2023-09-25 17:20:08 +0000 pmc: better distinguish pmu-events allocation path Background: The pm_ev field of struct pmc_op_pmcallocate and struct pmc traditionally contains the index of the chosen event, corresponding to the __PMC_EVENTS array in pmc_events.h. This is a static list of events, maintained by FreeBSD. In the usual case, libpmc translates the user supplied event name (string) into the pm_ev index, which is passed as an argument to the allocation syscall. On the kernel side, the allocation method for the relevant hwpmc class translates the given index into the event code that will be written to an event selection register. In 2018, a new source of performance event definitions was introduced: the pmu-events json files, which are maintained by the Linux kernel. The result was better coverage for newer Intel processors with a reduced maintenance burden for libpmc/hwpmc. Intel and AMD CPUs were unconditionally switched to allocate events from pmu-events instead of the traditional scheme (959826ca1bb0a, 81eb4dcf9e0d). Under the pmu-events scheme, the pm_ev field contains an index corresponding to the selected event from the pmu-events table, something which the kernel has no knowledge of. The configuration for the performance counting registers is instead passed via class-dependent fields (struct pmc_md_op_pmcallocate). In 2021 I changed the allocation logic so that it would attempt to pull from the pmu-events table first, and fall-back to the traditional method (dfb4fb41166bc3). Later, pmu-events support for arm64 and power8 CPUs was added (28dd6730a5d6 and b48a2770d48b). The problem that remains is that the pm_ev field is overloaded, without a definitive way to determine whether the event allocation came from the pmu-events table or FreeBSD's statically-defined PMC events. This resulted in a recent fix, 21f7397a61f7. Change: To disambiguate these two supported but separate use-cases, add a new flag, PMC_F_EV_PMU, to be set as part of the allocation, indicating that the event index came from pmu-events. This is useful in two ways: 1. On the kernel side, we can validate the syscall arguments better. Some classes support only the traditional event scheme (e.g. hwpmc_armv7), while others support only the pmu-events method (e.g. hwpmc_core for Intel). We can now check for this. The hwpmc_arm64 class supports both methods, so the new flag supersedes the existing MD flag, PM_MD_EVENT_RAW. 2. The flag will be tracked in struct pmc for the duration of its lifetime, meaning it is communicated back to userspace. This allows libpmc to perform the reverse index-to-event-name translation without speculating about the meaning of the index value. Adding the flag is a backwards-incompatible ABI change. We recently bumped the major version of the hwpmc module, so this breakage is acceptable. Reviewed by: jkoshy Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40753 (cherry picked from commit c190fb35f35cc163b61e582a49115680b0d49dcc) (cherry picked from commit 5adb91c72985b840b2c7fbf3c3308619acd2b61a) --- lib/libpmc/libpmc.c | 9 +-------- lib/libpmc/libpmc_pmu_util.c | 2 +- lib/libpmc/pmclog.c | 11 +++-------- sys/arm64/include/pmc_mdep.h | 2 -- sys/dev/hwpmc/hwpmc_amd.c | 3 +++ sys/dev/hwpmc/hwpmc_arm64.c | 6 +++--- sys/dev/hwpmc/hwpmc_core.c | 6 ++++++ sys/dev/hwpmc/hwpmc_mod.c | 3 ++- sys/dev/hwpmc/hwpmc_power8.c | 3 +++ sys/dev/hwpmc/hwpmc_uncore.c | 6 ++++++ sys/sys/pmc.h | 8 ++++++++ 11 files changed, 36 insertions(+), 23 deletions(-) diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index a7ed1c3d9ac8..f10a64e28cac 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -33,7 +33,6 @@ #include #include -#include #include #include #include @@ -1083,14 +1082,8 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, r = spec_copy = strdup(ctrspec); ctrname = strsep(&r, ","); if (pmc_pmu_enabled()) { - if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) { - /* - * XXX: pmclog_get_event exploits this to disambiguate - * PMU from PMC event codes in PMCALLOCATE events. - */ - assert(pmc_config.pm_ev < PMC_EVENT_FIRST); + if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) goto found; - } } free(spec_copy); spec_copy = NULL; diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 772dec7a9d53..fa2e76e8d026 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -649,7 +649,6 @@ pmc_pmu_pmcallocate_md(const char *event_name, struct pmc_op_pmcallocate *pm) assert(idx >= 0); pm->pm_ev = idx; pm->pm_md.pm_md_config = ped.ped_event; - pm->pm_md.pm_md_flags |= PM_MD_RAW_EVENT; pm->pm_class = PMC_CLASS_ARMV8; pm->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); @@ -680,5 +679,6 @@ pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) return (error); } + pm->pm_flags |= PMC_F_EV_PMU; return (0); } diff --git a/lib/libpmc/pmclog.c b/lib/libpmc/pmclog.c index a21fe42c9947..3b1572baaa2c 100644 --- a/lib/libpmc/pmclog.c +++ b/lib/libpmc/pmclog.c @@ -357,15 +357,10 @@ pmclog_get_event(void *cookie, char **data, ssize_t *len, PMCLOG_READ64(le,ev->pl_u.pl_a.pl_rate); /* - * Could be either a PMC event code or a PMU event index; - * assume that their encodings don't overlap (i.e. no PMU event - * table is more than 0x1000 entries) to distinguish them here. - * Otherwise pmc_pmu_event_get_by_idx will go out of bounds if - * given a PMC event code when it knows about that CPU. - * - * XXX: Ideally we'd have user flags to give us that context. + * pl_event could contain either a PMC event code or a PMU + * event index. */ - if (ev->pl_u.pl_a.pl_event < PMC_EVENT_FIRST) + if ((ev->pl_u.pl_a.pl_flags & PMC_F_EV_PMU) != 0) ev->pl_u.pl_a.pl_evname = pmc_pmu_event_get_by_idx(ps->ps_cpuid, ev->pl_u.pl_a.pl_event); diff --git a/sys/arm64/include/pmc_mdep.h b/sys/arm64/include/pmc_mdep.h index 5c43a7924b01..97d0f30c9c09 100644 --- a/sys/arm64/include/pmc_mdep.h +++ b/sys/arm64/include/pmc_mdep.h @@ -45,8 +45,6 @@ union pmc_md_op_pmcallocate { struct { uint32_t pm_md_config; - uint32_t pm_md_flags; -#define PM_MD_RAW_EVENT 0x1 }; struct pmc_md_cmn600_pmu_op_pmcallocate pm_cmn600; struct pmc_md_dmc620_pmu_op_pmcallocate pm_dmc620; diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index b15d223bc7a5..fbbaf92a1547 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -582,6 +582,9 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, if (pd->pd_class != a->pm_class) return EINVAL; + if ((a->pm_flags & PMC_F_EV_PMU) == 0) + return (EINVAL); + caps = pm->pm_caps; PMCDBG2(MDP,ALL,1,"amd-allocate ri=%d caps=0x%x", ri, caps); diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 995b7158ac20..9a5debb8016b 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -177,9 +177,9 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, } pe = a->pm_ev; - /* Adjust the config value if needed. */ - config = a->pm_md.pm_md_config; - if ((a->pm_md.pm_md_flags & PM_MD_RAW_EVENT) == 0) { + if ((a->pm_flags & PMC_F_EV_PMU) != 0) { + config = a->pm_md.pm_md_config; + } else { config = (uint32_t)pe - PMC_EV_ARMV8_FIRST; if (config > (PMC_EV_ARMV8_LAST - PMC_EV_ARMV8_FIRST)) return (EINVAL); diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 15b875e3af94..3829a03eb729 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -239,6 +239,9 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_IAF) return (EINVAL); + if ((a->pm_flags & PMC_F_EV_PMU) == 0) + return (EINVAL); + iap = &a->pm_md.pm_iap; config = iap->pm_iap_config; ev = IAP_EVSEL_GET(config); @@ -721,6 +724,9 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_IAP) return (EINVAL); + if ((a->pm_flags & PMC_F_EV_PMU) == 0) + return (EINVAL); + iap = &a->pm_md.pm_iap; ev = IAP_EVSEL_GET(iap->pm_iap_config); diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index de012b74d558..5dd8bc67d60a 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -3349,7 +3349,8 @@ pmc_do_op_pmcallocate(struct thread *td, struct pmc_op_pmcallocate *pa) * Look for valid values for 'pm_flags'. */ if ((flags & ~(PMC_F_DESCENDANTS | PMC_F_LOG_PROCCSW | - PMC_F_LOG_PROCEXIT | PMC_F_CALLCHAIN | PMC_F_USERCALLCHAIN)) != 0) + PMC_F_LOG_PROCEXIT | PMC_F_CALLCHAIN | PMC_F_USERCALLCHAIN | + PMC_F_EV_PMU)) != 0) return (EINVAL); /* PMC_F_USERCALLCHAIN is only valid with PMC_F_CALLCHAIN. */ diff --git a/sys/dev/hwpmc/hwpmc_power8.c b/sys/dev/hwpmc/hwpmc_power8.c index fc6b878eff7d..d7ccbc5c6c0a 100644 --- a/sys/dev/hwpmc/hwpmc_power8.c +++ b/sys/dev/hwpmc/hwpmc_power8.c @@ -168,6 +168,9 @@ power8_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_POWER8) return (EINVAL); + if ((a->pm_flags & PMC_F_EV_PMU) == 0) + return (EINVAL); + /* * PMC5 and PMC6 are not programmable and always count instructions * completed and cycles, respectively. diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index c16800c14ce1..fd4266b605ef 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -199,6 +199,9 @@ ucf_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_UCF) return (EINVAL); + if ((a->pm_flags & PMC_F_EV_PMU) == 0) + return (EINVAL); + flags = UCF_EN; pm->pm_md.pm_ucf.pm_ucf_ctrl = (flags << (ri * 4)); @@ -498,6 +501,9 @@ ucp_allocate_pmc(int cpu, int ri, struct pmc *pm, if (a->pm_class != PMC_CLASS_UCP) return (EINVAL); + if ((a->pm_flags & PMC_F_EV_PMU) == 0) + return (EINVAL); + ucp = &a->pm_md.pm_ucp; ev = UCP_EVSEL(ucp->pm_ucp_config); switch (uncore_cputype) { diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index a4d03efb6aac..714d8a7c65b7 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -369,6 +369,14 @@ enum pmc_ops { #define PMC_F_CALLCHAIN 0x00000080 /*OP ALLOCATE capture callchains */ #define PMC_F_USERCALLCHAIN 0x00000100 /*OP ALLOCATE use userspace stack */ +/* V10 API */ +#define PMC_F_EV_PMU 0x00000200 /* + * OP ALLOCATE: pm_ev has special + * userspace meaning; counter + * configuration is communicated + * through class-dependent fields + */ + /* internal flags */ #define PMC_F_ATTACHED_TO_OWNER 0x00010000 /*attached to owner*/ #define PMC_F_NEEDS_LOGFILE 0x00020000 /*needs log file */ From nobody Mon Sep 25 17:32:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvVLf4x3wz4tqFp; Mon, 25 Sep 2023 17:32: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 4RvVLf4MWDz4rmc; Mon, 25 Sep 2023 17:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rO3mf3Ny98cx7iwAcqo9tMFofYwrXwUxLRoOgaSIWMY=; b=Xnm4M0nmJj7sTkwCMlTumT8/S/XJbnsPi2AE0myVCgbaZ+YPWNnbMGZFgo8bXstbdWHWqL 9PKd+Ca23MZYnOIlec9QqemiilfJzJKSCGD+w2FAaY6iGERqSV9utYky7Ze9AkxjVzhQeb HyjMnugXa1YnfPduH8NNsMiIPPckGc9yQj5EkGwV5cBhxqMiM+6ajrQlUouyC0+vdrvG4e WJ3IbO9JgdN/FoSSjnq18Zrkgiok5XHe/04iSsO9zQ+X343JlJrmB/wGqd1u13ZF+Dwh9C p9gWPUr8UxSCgK2qYh0RU3sBkf8Wq1zFSH3ilVe1aV98XbW/XSZtc94ExYXaGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663146; a=rsa-sha256; cv=none; b=L6u0BjoD5vprlO1kc7TOshLas7dWoQvWJbyO8dNNylE2FRfWWGnV1yauNatMkxxrBmifCc WKfblBr7/N2w2cgHTqYs2iZOsCgtCLU6NfOyXEuAyozQYKnbWHeL1EPZJo9TPpnk+Z1Sbu 55eL+e875CYCYgZb2DFwIh5tuun/VuHTWJ36kE0cCqGY1JBQ0Q+ui4GkG2PyorNIW9zyyW sznQAOvrKisbDo+nM+ptB0IEbxmVVKZh0xH5lIM2fA2MM58e7UVLSRMQo8ihk/eT03b3rX UbyAh1tmqBk5TnvNN/exrVxXt/Rfd+g7Sklb8Y5E9SXsFY/kboekcnOguHZFyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rO3mf3Ny98cx7iwAcqo9tMFofYwrXwUxLRoOgaSIWMY=; b=DNxqn32MFiSIhLIP69P9HqcIApDBqFAKs1s7sbBQBN33JWVjUffn0ByqXMfOnYluOJil6e 8IrMs+rfv2o2lD2n1/1vRPyOY/gTfi+4JaEKZVcEGGnZ/tnhnI1/DDerYfFVuG7UtvDRqK 68D/OxvVi4A0GCm4ydIvl7YaxREFHEg9WgPG0jLm5tT42JnKj7VzcoGFtqb9g3PBuAd34A M3v/UPtoBtO28m9bliM9Xq2Y9dOEPZknNFDtbHohwqxDqZMOLCPwK/XXrT5l8jf6lolRuK lSD75l/KT5eXy/bEfiX5oIphURwvaCPPJHDkkWuIS9s8jn/5IgmGwDw3COzKEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVLf3PyWz816; Mon, 25 Sep 2023 17:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHWQd2009351; Mon, 25 Sep 2023 17:32:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHWQbn009348; Mon, 25 Sep 2023 17:32:26 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:32:26 GMT Message-Id: <202309251732.38PHWQbn009348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 1cc5240b590b - stable/13 - switch groff parameter -man to -mandoc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1cc5240b590ba13cb9a41995c8f80988007798cb Auto-Submitted: auto-generated The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=1cc5240b590ba13cb9a41995c8f80988007798cb commit 1cc5240b590ba13cb9a41995c8f80988007798cb Author: Wolfram Schneider AuthorDate: 2023-09-07 06:28:24 +0000 Commit: Wolfram Schneider CommitDate: 2023-09-25 17:30:58 +0000 switch groff parameter -man to -mandoc groff 1.23.0 changed the semantics of the -man parameter, and many manual pages are not rendered. The -mandoc parameter brings back the old behavior, as in groff 1.22.4 and earlier. PR: 273565, 273245 Reviewed by: emaste, bapt MFC after: 1 week for all supported branches (stable/12, 13, 14) Differential Revision: https://reviews.freebsd.org/D41737 (cherry picked from commit 035f7c9a3653d91564a5513f1311aa3b6e14a17e) --- usr.bin/man/man.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index b9c49b51d3ba..96040c533de5 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -1004,11 +1004,11 @@ do_whatis() { # User's PATH setting decides on the groff-suite to pick up. EQN=eqn -NROFF='groff -S -P-h -Wall -mtty-char -man' +NROFF='groff -S -P-h -Wall -mtty-char -mandoc' PIC=pic REFER=refer TBL=tbl -TROFF='groff -S -man' +TROFF='groff -S -mandoc' VGRIND=vgrind LOCALE=/usr/bin/locale From nobody Mon Sep 25 17:32:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvVLg6Bhdz4tqKw; Mon, 25 Sep 2023 17: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 4RvVLg5Mlkz4sHk; Mon, 25 Sep 2023 17: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=1695663147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CA3eFrUxNbGmbv72TBWA82ZJLUwWr1QlTSsR/qyo6iI=; b=hkRPcjngjwMEgVa48R2prprHsZrI0+ecuVw9m2DSghdheWxwqH14kmmKVOClsLLXN6PnSC JK8KrAXWQHoyOwmOtDp2d5xQaRvBJ2Ej6I6nTvcY98pkmd59WKmPwrrFAwmXt6wTeMc9SA lE3O2xAOzj5Gk8EtToDNRtq0OO8eZ1hMLy3nMcqTCK/R48sbpOhn6G94hff9Q0+XMet9lr SB6jTIXcTQxFnL/Nrsn20bb/6m7cM5dWK8ZihtIUylF0ApdyuM+5/i02EnNf+MnGCDcbg8 zh2+3phzm0BVqGe7MrI8ON4M9R7zvQgOT2n0V1bEFP+lAVKC5YXdXfmV3zc+Zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663147; a=rsa-sha256; cv=none; b=YdJJWjEMZPxdmIFsIaW7nZc9z9nVng0+4cQlNAZVuhd2/Pm3Z3NlLS27Ya2aYrwYC4DZAc VueQ0qxNvQZAq084UP44VTv/UxLVhYwZ0tB4Ck+NrcrCvO2FzithfyaD7PIBSK/QHKtHxL 9JUTykMAjbfJgElEtJalWRtr3MlefmQBvrWgQBj6Ks5yvuqbrC8pCKXYyQ50vResCJItlj uzO27SvuVHHUPABQpqxYDgKGidTOw1TQgnrWvpLIevJStejPcOjpTiEsFWpdYgw0hJEAWv sDYDtl2N9VbhIKA9QZbiTp/Wan48UrQMt+upUvO0dmxYvHwkxWKW4oYYIMc/8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CA3eFrUxNbGmbv72TBWA82ZJLUwWr1QlTSsR/qyo6iI=; b=CC8fIYeCP1yBgB6BKjH6hLJ/gyosDatrSNV1zOpzmbgPpdl1YkSMoDl10hUrQY9VsS6me5 SqVxEA9Mr/25PmeaoP3WaTaTjidKRjDGxaCQBL+xGlQk7x6wdtqdX89sL43H31GKNLejB7 y64Te+FD9iyXrBvaPlEtQHjkPPZyJr4f1nJRevquPp6OY9mVvO9HJhmpZw4wUinUz98jeq dsfOmFHzTBJVb1BAA0H/n0RLBA81HUVAhQZkjXSrqbqckipi5YOU9HH+/pvo5Uvnt1Y4HJ CLMQgYRsONp7BmMgpe/UPcBQi3jYCwtH9L3t8NHn6j3145KOMUV8ELcB2FBhXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVLg4Qsqz7JR; Mon, 25 Sep 2023 17:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHWRNa009411; Mon, 25 Sep 2023 17:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHWROI009408; Mon, 25 Sep 2023 17:32:27 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:32:27 GMT Message-Id: <202309251732.38PHWROI009408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: d03af6473e64 - stable/13 - switch groff parameter -man to -mandoc for new groff release 1.23.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d03af6473e64bc0e9e1f8a7d5dd329247268d3dc Auto-Submitted: auto-generated The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=d03af6473e64bc0e9e1f8a7d5dd329247268d3dc commit d03af6473e64bc0e9e1f8a7d5dd329247268d3dc Author: Wolfram Schneider AuthorDate: 2023-09-07 14:59:12 +0000 Commit: Wolfram Schneider CommitDate: 2023-09-25 17:31:50 +0000 switch groff parameter -man to -mandoc for new groff release 1.23.0 PR: 273565 (cherry picked from commit cd89fe3923e92ab090cbdff7eb215c2d85b51718) --- usr.bin/man/man.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.conf.5 b/usr.bin/man/man.conf.5 index 5bffbf96bec2..90595bb6d498 100644 --- a/usr.bin/man/man.conf.5 +++ b/usr.bin/man/man.conf.5 @@ -113,8 +113,8 @@ MANLOCALE ja_JP.eucJP EQN_JA /usr/local/bin/geqn PIC_JA /usr/local/bin/gpic TBL_JA /usr/local/bin/gtbl -NROFF_JA /usr/local/bin/groff -man -dlang=ja_JP.eucJP -TROFF_JA /usr/local/bin/groff -man -dlang=ja_JP.euc.jp +NROFF_JA /usr/local/bin/groff -mandoc -dlang=ja_JP.eucJP +TROFF_JA /usr/local/bin/groff -mandoc -dlang=ja_JP.euc.jp .Ed .Pp If the system administrator decides to override the From nobody Mon Sep 25 17:33:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvVMm3RWsz4tqB8; Mon, 25 Sep 2023 17:33: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 4RvVMm2wxQz4sX1; Mon, 25 Sep 2023 17:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T/BgqZFUogurVrKiQlL9SvtyfAXBh/xuzy/2as3+2Fc=; b=xhlCpJxr+1LIpGl/DJi9g+5FGYuvjCYd+UMd09NTEwcniY2nXdpLsnUSll3MmF5dvbfNzQ wUDDFXrYIQAiNhVmU/iN/sUz/jhCeoRbMv4JqKyTmp4A/CyH95yR2Vt3I5qgRQ5StWxJkp 1JKYFscy0A9dn12M+Kbwx4VSMMcd5nDj7CMzHHM/RM6IRjMugFQiLAL8xQ0qUnDZZiDBEY UcXu1xRKjQp7S0SoOgYzzOpFhDbjagHghdbOlp/2kPmO4VnTcFgDTtQJCpKqZlZHRXCQYR pM6Ifd2HkWJYhR8+erChlHm3NzwLNcLQzRJcBBr+eUB8de+FswkDtcNcSNhCbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663204; a=rsa-sha256; cv=none; b=xaXNKKdHJpb9mOF2v/8xp/DJs8gV7ztKr3KWJbKBRee/+2+3timJC7zc8Pqo5B2mrQxTPo CBwoFvgG9bTQDnhcey9IJSefmELaGqpNaKrRtJO89WaAYu4MuqG1UNVVzfz+O0fbREE1iz Hbug7tioM2dUJpTA2Cy9nVrwgRBUyKNVz1IOrahIlo0rCa1plVP6gqlmaUbb7QalDvlVLa TOuQoEAHejve0m5cB+T0czJ2buU8Sf/7cuceSNcKRMUCISH7FXQc6ynOkOFA9+FZEgfm3T G6wLbJvFzJxBo262jCR+ztSsKIOQ/mM7wxiUQFBasYHDdqBzUSzZuQvAWQAvTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T/BgqZFUogurVrKiQlL9SvtyfAXBh/xuzy/2as3+2Fc=; b=CFtHXiYOu69mlN/ToVBxKdAuL+9in/ipz/YcQVCQAtn0qBVHoa/RRQnG9idumTu+Z18Csu yMpyZ1xc3W4KvQocuMnt+0kaRMfFKENRP9FoU9vRdr69qCRtjiQ12bz0UPbo38ILctX1wO /RcFAqbGb6OtUabes87woUUEOtO3TlgMzbDdR4Fu5x6BFNLx20czCnThR84Y4qb6g18PTi zPWEabMUi+zaMEXLhhOMFu26g8kV+h6OahqMERIu43VpegF2aLWU/N5WHLlsvOtpcfAZ65 XIaDQCvEQ70RtXL+HrJjTDEBFL7raImtnsZmVqS715vK5hxndhFWWxNnttYWQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVMm207pz7q0; Mon, 25 Sep 2023 17:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHXOSQ011793; Mon, 25 Sep 2023 17:33:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHXO1a011790; Mon, 25 Sep 2023 17:33:24 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:33:24 GMT Message-Id: <202309251733.38PHXO1a011790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 0e71efa38c9a - stable/12 - switch groff parameter -man to -mandoc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0e71efa38c9aa3281a8bbce169becf3f05dd7c91 Auto-Submitted: auto-generated The branch stable/12 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=0e71efa38c9aa3281a8bbce169becf3f05dd7c91 commit 0e71efa38c9aa3281a8bbce169becf3f05dd7c91 Author: Wolfram Schneider AuthorDate: 2023-09-07 06:28:24 +0000 Commit: Wolfram Schneider CommitDate: 2023-09-25 17:33:08 +0000 switch groff parameter -man to -mandoc groff 1.23.0 changed the semantics of the -man parameter, and many manual pages are not rendered. The -mandoc parameter brings back the old behavior, as in groff 1.22.4 and earlier. PR: 273565, 273245 Reviewed by: emaste, bapt MFC after: 1 week for all supported branches (stable/12, 13, 14) Differential Revision: https://reviews.freebsd.org/D41737 (cherry picked from commit 035f7c9a3653d91564a5513f1311aa3b6e14a17e) --- usr.bin/man/man.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 68b9bb3e695a..8b1fdb1767d9 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -1004,11 +1004,11 @@ do_whatis() { # User's PATH setting decides on the groff-suite to pick up. EQN=eqn -NROFF='groff -S -P-h -Wall -mtty-char -man' +NROFF='groff -S -P-h -Wall -mtty-char -mandoc' PIC=pic REFER=refer TBL=tbl -TROFF='groff -S -man' +TROFF='groff -S -mandoc' VGRIND=vgrind LOCALE=/usr/bin/locale From nobody Mon Sep 25 17:33:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvVMn50nSz4tqB9; Mon, 25 Sep 2023 17:33: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 4RvVMn3hrBz4sfh; Mon, 25 Sep 2023 17:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IArd+GICzK1QmN7gKeuplahZt3U2lTMR+pzS5de3pLk=; b=CNMH5muGk5Hg0Qg9YFGzZ4UZ7a2HaN33Wax8r6s94pcKs+Avv4pHN9Hjyw9d2h2eyWW9VE oIf74XpLxSsZ5buGR9p0lIF+wPRSmHgdM+WEX8kTJoRgYai5QondiPgY8DBHJKs3Kq9khQ fvAFh+Icx52W9rLNe5cfLrsFiFX2YsAzLJosFncPWQMFCzFcXKOtm7Ixd2a3wX8ICR7PDR pajU9nfgia5aYxj7n4TW2oT+Uh2Atl2VPn7OwczOM0ITwhBU2+eduhW3KsCkQ1uihqjIu5 Vl/f4R0JA7LTLsB5nLQ4GJZoNQkRWXa7oiyJoehFk9czP/0XMcJpmEBBkbpEjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663205; a=rsa-sha256; cv=none; b=dD74/I2yjwTA9fq+Ckc4oH2VdG2KgcKs4ueffpm7CE0Ud+HsQ17AT4/sRWZRy20Xq8oo/T A6ZNHi8FKIqJhR8H3z0V5kwXYsa9c4JCNWN/DHpA20Pqd5aYS/3qI82UFO8reT5g0ek80w bh+OqcTnJyS/ylUfHXonGTj03ja7hGCn/CSbnuXn19tW3e8Ct7tejf9kVIF/Gl3MmdFGhc jpT3im/9uDCEbly7b13yWZdbttDbETJKHwVaxDFWCplJhpySl94CRAZeatyAuch0QCT5tq XthUM1DsU0PvcyULznMDp6sO1ukuZr/AmmVfsxrP4XpzfWptzTGdPc90LfR6Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IArd+GICzK1QmN7gKeuplahZt3U2lTMR+pzS5de3pLk=; b=IwLsCEFVYDQe2KniOhtpI24xm9RX3AchRr7Ben5HAf1ERhwgXyRqQwPhp1/I9sWaogj76U ShZd/ZntFr72yoEkuG1qdc0FEwHN1q+8iqfUTTOfrxNr42nFJE2jDJViqkuuovvPcQYv5N zQJKI1E1SyTotb8h/ZC8NivZ2p0LfmsKOksT4OJIg2vPk4Q0zxlXCAhnCwiqoj22q+39sp 0bDEVb9v+tVNNdGY5TVj1n5/RBPuP9sTME3aETrrfgJAvNJsJb7LXdBKLDc4+gjBNoPJzQ ByqqnJGE03I/v0+I8xU09JE/xSBgbfQNf7JEivjzWtK2h2mCm+y3kszjIGCeEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVMn2kgFz7mD; Mon, 25 Sep 2023 17:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHXPSK011854; Mon, 25 Sep 2023 17:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHXPpT011851; Mon, 25 Sep 2023 17:33:25 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:33:25 GMT Message-Id: <202309251733.38PHXPpT011851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 2e866693bc3e - stable/12 - switch groff parameter -man to -mandoc for new groff release 1.23.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2e866693bc3e286ed54658d7cdb20518b601672f Auto-Submitted: auto-generated The branch stable/12 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=2e866693bc3e286ed54658d7cdb20518b601672f commit 2e866693bc3e286ed54658d7cdb20518b601672f Author: Wolfram Schneider AuthorDate: 2023-09-07 14:59:12 +0000 Commit: Wolfram Schneider CommitDate: 2023-09-25 17:33:15 +0000 switch groff parameter -man to -mandoc for new groff release 1.23.0 PR: 273565 (cherry picked from commit cd89fe3923e92ab090cbdff7eb215c2d85b51718) --- usr.bin/man/man.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.conf.5 b/usr.bin/man/man.conf.5 index f30a1c0f836c..da7e8341f793 100644 --- a/usr.bin/man/man.conf.5 +++ b/usr.bin/man/man.conf.5 @@ -115,8 +115,8 @@ MANLOCALE ja_JP.eucJP EQN_JA /usr/local/bin/geqn PIC_JA /usr/local/bin/gpic TBL_JA /usr/local/bin/gtbl -NROFF_JA /usr/local/bin/groff -man -dlang=ja_JP.eucJP -TROFF_JA /usr/local/bin/groff -man -dlang=ja_JP.euc.jp +NROFF_JA /usr/local/bin/groff -mandoc -dlang=ja_JP.eucJP +TROFF_JA /usr/local/bin/groff -mandoc -dlang=ja_JP.euc.jp .Ed .Pp If the system administrator decides to override the From nobody Mon Sep 25 17:45:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvVdK6NZdz4tr64; Mon, 25 Sep 2023 17:45: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 4RvVdK5y0hz3Bxq; Mon, 25 Sep 2023 17:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29o8F+q1TgOEf1EO04FZrajSsRDibdn1CwdjrZHNW8=; b=SxpayiOMDTAEu+KtNqlwFPOqJJbi82/HMIplHSghVnc/iNIx+cL09zcMf8QcX6ZYkhe0cD n9qzZ51+u+qJUrtd73aOYOpTnOIVtiX0jcHFdMaFIDVtRmvb1Ugaapset/8JtEV8E2/Fis Rv+Z1nimzZZgoUiJA+9IU9JOGcWr9MGq5JBcOiCWq/emM56NOrr4YFrpSpummUHFWHA/7R F6Z9kZLMnyvo76+dlEHBoiicRgPaKSF/OGqFnmOddrFvpw3TvTUIsjs4Hm9VBFozhw+AzC iGS4wjktAaMciQyE7CTGcbTXNQ5VYxWaPxrQjQ5r2FLqvBl81lq27qqZeO5HuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663909; a=rsa-sha256; cv=none; b=cqrdv1jbiFq4P0zgYbznHt8GavyF9kwCItRB93iYHmyzAJ8FYsOfHhPzU0Vzajy0sGPrUy DOdZIiXFrfa0EPYcQT6mTkAPV1qOeWqbW3QoUyFKBFXQyKgHmPODy/nhvqrdtOv/x2K79n Po2IFmz1KxHZ0fW1+EZoAMV6EYEDBjLUIb62ZEV0TKtRnOi55AVr7pranNK7dunEIzOBi7 YFvjQdBkv06r0lsH6t9tOMq5s03gHSz+4KvdzTOAz2p4SC7qmAyW7eDSKkkDikovqosF8j L9t0rO5oi5I79A4TgXzjBthl/T6T7yRAOFiNVRKEQqVCaWIrv1r6mIBHaAamhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29o8F+q1TgOEf1EO04FZrajSsRDibdn1CwdjrZHNW8=; b=F61lxjycFDunczRjrgFVAu46Zbhfgsh2ZGvE4ubOEBd2KGfvAkaCEUvI6NVSVwFxLrU0JI oJTqdszaIIiFFj0Z/XOwx8Aq3CnIisv4yOMdeshh62yqFWtizeGoyJ6bOBcS3b1K3/SGQI 9TNfxiZpcxQdJE6D8N3cLe6SD1vFl0JgPjnT7H3Bp9ZvjCkErZ3rrL3+FHok7bJcEy1bjs qAFdlDkTVNQNxsb8YvA8cilYwL6p8fhu05AmxOMAM4CdE6HlGH9w8TNB93aGeQ7+SN6ZVj RP31LxDd3qXGx6NMvY84Gr1EdizMJPsPH4h4B2MMSHuFVZVlY/28+O38BAGjLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVdK53kNz8CY; Mon, 25 Sep 2023 17:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHj9it028368; Mon, 25 Sep 2023 17:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHj93p028365; Mon, 25 Sep 2023 17:45:09 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:45:09 GMT Message-Id: <202309251745.38PHj93p028365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: fb3c249ed93c - main - LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb3c249ed93c834d70f8361215bc40a9e9004d3b Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fb3c249ed93c834d70f8361215bc40a9e9004d3b commit fb3c249ed93c834d70f8361215bc40a9e9004d3b Author: Bjoern A. Zeeb AuthorDate: 2023-09-24 11:55:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-25 17:41:30 +0000 LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping tid_to_mac80211_ac is an exported symbol in and likely based on iwlwifi, which leads to a symbol clash in NetBSD. Rename our local LinuxKPI copy to a better name and add a comment where to find a copy of the mapping table. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reported by: Phil Nelson (phil netbsd org) --- sys/compat/linuxkpi/common/src/linux_80211.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 09a315de9fd6..8d0bee068c6a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -113,7 +113,8 @@ const uint8_t rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; /* IEEE 802.11-05/0257r1 */ const uint8_t bridge_tunnel_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; -const uint8_t tid_to_mac80211_ac[] = { +/* IEEE 802.11e Table 20i-UP-to-AC mappings. */ +static const uint8_t ieee80211e_up_to_ac[] = { IEEE80211_AC_BE, IEEE80211_AC_BK, IEEE80211_AC_BK, @@ -239,7 +240,7 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], IMPROVE("AP/if we support non-STA here too"); ltxq->txq.ac = IEEE80211_AC_VO; } else { - ltxq->txq.ac = tid_to_mac80211_ac[tid & 7]; + ltxq->txq.ac = ieee80211e_up_to_ac[tid & 7]; } ltxq->seen_dequeue = false; ltxq->stopped = false; @@ -3283,7 +3284,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ac = IEEE80211_AC_BE; } else { skb->priority = tid & IEEE80211_QOS_CTL_TID_MASK; - ac = tid_to_mac80211_ac[tid & 7]; + ac = ieee80211e_up_to_ac[tid & 7]; } skb_set_queue_mapping(skb, ac); From nobody Mon Sep 25 17:45:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvVdM0pbDz4tr6C; Mon, 25 Sep 2023 17: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 4RvVdM0007z3BqL; Mon, 25 Sep 2023 17:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnbfIHmZ6kabo01Vj+PpPplG0xqHtW2mKBs4a+NYOzQ=; b=uAdTbJTEHgs2W6AqITiSRiSNzCnBRYk51aTqU2UdBLwAsixaNYMDSgl3ImYy53i9WJ6rBY JXnKEt7Bp7IDb+I+ypGn8Uk02S8rJt1OgqK9laOysSiaEZRQqdINxfu+2RfaOi4qlAODFo mqwM+obBGnwE9QCnWqjFRD2PETWi+hyyV/yXXIalVtLdC04EUbInvPrNtHiv92NoVFxCxU x6+vPWhKU1yObqObNlcAR9Pn6cnAncIWz0Prc8SGgeCo2n1oZ3mttYHJWMlbnv19Pl20l0 qG6JWvklIW8RK0zoHldQVeEsjAqyrnUIkOK+WVHy/wp8+9FATiZoXGTef9VmXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663911; a=rsa-sha256; cv=none; b=Y9b02y1RgJJ7oQIlJId7HlV+psz5AUbZ2Dtne5Rw39JZ2mvTsz81NFD2d/2qGb6i6LPBqq U3a47FJ2+QxUZrEBH4VhG7Szwc27yAOArny4OGIqWHbYYnDaN/v6aCf/v5yvDx8H7j8k5f b1+U9jezgBeLUb3axM2qx1U6Y+B09Q+MBuRqKJC47k0pFbAbHr66mDA2PwuJ/gHS+aGYUE D94xGaUAyVu+IZSttmOQjgLv3Bp0Zk9SvBWAy/gPKo1k6UsqiCVKiu1D6eVy3PoRMEeqyW uexCS0kx6I/Cayj7bf5QgstEFduhYyBVqZgmC0bDD3oC7Xo+VPaMKFeB4IS8Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnbfIHmZ6kabo01Vj+PpPplG0xqHtW2mKBs4a+NYOzQ=; b=iV8grCyBTQe9Aj2OvZ2zF2MMXdTnp9Rq1njZYuWsTp9aLMLXVqGJZcoZFX5nOvhQdRK/m/ eFJH5DhGkjUsiB6G136QX3W6BzJgteRQoxiSOZQfl+EmAG5Ao1w5gHTpfRoOjzuZbNX6hX LaEm3BlM4mLkMg40kSQbM105e/7ox6kklb7CYkyiE90FZaLp+FqttLwlORyv6P9sH9Wp4b WRo7kVWCm1pPq09MuBxvAkB2iU6clei+O33CuvtMIK8YmdDG0HE8TzjXWhtaoTgRRQjoRr j7wtCyINCtCLyfu1CNbywQJ0bfprfjBG8qz/tYlOjBW8E2AyksLNbAfQk2KXbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVdL65tqz8JD; Mon, 25 Sep 2023 17:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHjAJm028423; Mon, 25 Sep 2023 17:45:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHjAiG028420; Mon, 25 Sep 2023 17:45:10 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:45:10 GMT Message-Id: <202309251745.38PHjAiG028420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c5e257985085 - main - LiunxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5e257985085bd987b1dddffd0455c2230df2d1d Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e257985085bd987b1dddffd0455c2230df2d1d commit c5e257985085bd987b1dddffd0455c2230df2d1d Author: Bjoern A. Zeeb AuthorDate: 2023-09-25 16:57:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-25 17:44:10 +0000 LiunxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct Factor out ieee80211_chanctx_conf into struct lkpi_chanctx in order to keep local state as well. In first instance that is added_to_drv only. For now we stay single-chanctx only but this paves the path to make it a list. Use the new information to implement ieee80211_iter_chan_contexts_atomic(). Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 46 +++++++++++++++++++--- sys/compat/linuxkpi/common/src/linux_80211.h | 9 +++++ .../linuxkpi/common/src/linux_80211_macops.c | 8 ++++ 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 8d0bee068c6a..de35ab844c25 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -922,6 +922,7 @@ static int lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct linuxkpi_ieee80211_channel *chan; + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -953,11 +954,13 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ - conf = malloc(sizeof(*conf) + hw->chanctx_data_size, + lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); + conf = &lchanctx->conf; } conf->rx_chains_dynamic = 1; @@ -1022,7 +1025,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = 0; if (error != 0) { lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); goto out; } } @@ -1179,6 +1183,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1188,7 +1193,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } out: @@ -1454,6 +1460,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1463,7 +1470,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } error = EALREADY; @@ -1916,6 +1924,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1925,7 +1934,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } error = EALREADY; @@ -3961,8 +3971,32 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, void *), void *arg) { + struct lkpi_hw *lhw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_chanctx *lchanctx; - UNIMPLEMENTED; + KASSERT(hw != NULL && iterfunc != NULL, + ("%s: hw %p iterfunc %p arg %p\n", __func__, hw, iterfunc, arg)); + + lhw = HW_TO_LHW(hw); + + IMPROVE("lchanctx should be its own list somewhere"); + + LKPI_80211_LHW_LVIF_LOCK(lhw); + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + + vif = LVIF_TO_VIF(lvif); + if (vif->chanctx_conf == NULL) + continue; + + lchanctx = CHANCTX_CONF_TO_LCHANCTX(vif->chanctx_conf); + if (!lchanctx->added_to_drv) + continue; + + iterfunc(hw, &lchanctx->conf, arg); + } + LKPI_80211_LHW_LVIF_UNLOCK(lhw); } void diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 22a5f5a6377c..93c1e2873206 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -210,6 +210,15 @@ struct lkpi_hw { /* name it mac80211_sc? */ #define LHW_TO_HW(_lhw) (&(_lhw)->hw) #define HW_TO_LHW(_hw) container_of(_hw, struct lkpi_hw, hw) +struct lkpi_chanctx { + bool added_to_drv; /* Managed by MO */ + struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); +}; +#define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ + (&(_lchanctx)->conf) +#define CHANCTX_CONF_TO_LCHANCTX(_conf) \ + container_of(_conf, struct lkpi_chanctx, conf) + struct lkpi_wiphy { const struct cfg80211_ops *ops; diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index b3b53d23f62e..8f75b1bdf8b1 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -490,6 +490,7 @@ lkpi_80211_mo_add_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; int error; lhw = HW_TO_LHW(hw); @@ -500,6 +501,10 @@ lkpi_80211_mo_add_chanctx(struct ieee80211_hw *hw, LKPI_80211_TRACE_MO("hw %p chanctx_conf %p", hw, chanctx_conf); error = lhw->ops->add_chanctx(hw, chanctx_conf); + if (error == 0) { + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + lchanctx->added_to_drv = true; + } out: return (error); @@ -524,6 +529,7 @@ lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; lhw = HW_TO_LHW(hw); if (lhw->ops->remove_chanctx == NULL) @@ -531,6 +537,8 @@ lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *hw, LKPI_80211_TRACE_MO("hw %p chanctx_conf %p", hw, chanctx_conf); lhw->ops->remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + lchanctx->added_to_drv = false; } void From nobody Mon Sep 25 17:58:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvVwf0gTtz4trm2; Mon, 25 Sep 2023 17:58: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 4RvVwd71Xlz3Fj2; Mon, 25 Sep 2023 17:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695664706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=quLlD6ufTVCGEHfQJDOk5BKVXmxP44WrJ4FXzUE4Do8=; b=W8m+wgIg2De3h9+xUeOqMJMKqNA6AnfNEqWUt6nVYn5pdLOAr0rNmzXjKdqgxyxEpO8xIt F3eJxA/dyah77VWkHx3ayF242nGWRsYJsI9OkS3xbB0+VBnwJD9V7QgWsAJXfi7ShaltFw fWx17pF/PHHR5Zd0Db/gUqpCu6l3/Kd8N/hYDKGcf74DuFh0Wnc68Y3Cn3tXLkgJztmryU /zQeW4Tv6z+FNzmqtanPdLakbGUhkxdfGgSOF/p2wJ7eswGEeVBcW4K+BnJiuDR9NoWCQj hfsMDwOBFLDAXDVMWcoZyG306ZAV5KTBznoOhi5GyY0Ro4EGSiIM3hiwmxVemA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695664706; a=rsa-sha256; cv=none; b=t5j+cvd/2BD3EytGF/JGd1vjPgRatLA2RI7mc37S0DCUt6gqvnb2N425EyR7xvsI8YmDXp P0KvIdEkhOQ6kR3DLlL/b729zddxfwdSyQIfxGQggumPt0fKWveVCx+47/DvJE3HKGET0W ok+qXqoWJODakJ+IS3CZGXG195UuUlN06lP8iu7lQuSNx/8tsMg27kiaG8SukAU3jyQB1O 69NNB/wgr21aNoh7hvQd0Bb6d6Rjl/EJhWiVxJHR6gUH1njQEiCVvf3BwhX4Bhthe0bOjI M7tfgUm86f5JuzgUDdJt2GkPFLSAYjxiClLSask6kTJWggt+IF5len9kLA4NtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695664706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=quLlD6ufTVCGEHfQJDOk5BKVXmxP44WrJ4FXzUE4Do8=; b=JClUApJzPlVL7yZrtFsh3wkFKyaKEILLxFhSikFkK8opzw6wTmwadbLC5lje8Eq/H1QZgG GxoC8Vu4Jx0rFtUL8kD/TFhcsz6CDIFWKmK3Z9K11fRhJDFIrTVW/AyTQRRrr35luDPTki AW+NUwtm/c3vEKdHtsNQJcNreVYF1uk20PGlEisuYBwSihn5IQjfKPN05eneVUaEfev/wG W9rSBdD8zXRjJcpntQSihD9iWD/U8K5w3zi0/bYfVXCqDgB8cEfPhp9IYVwZgAzEjw7Zzj diOmyM5f+5GQi7vJbnLNQSGBkQSq7Zu1TMJc2ESdyGW1nzvia7eG8OeY7L4VEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVwd5lMtz8KT; Mon, 25 Sep 2023 17:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHwPac045134; Mon, 25 Sep 2023 17:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHwPoV045131; Mon, 25 Sep 2023 17:58:25 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:58:25 GMT Message-Id: <202309251758.38PHwPoV045131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 673d62fc359b - main - LinuxKPI: 802.11: fill regulatory_hint() with some life List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 673d62fc359b0cb7a70af42c36d2fa54fb29452a Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=673d62fc359b0cb7a70af42c36d2fa54fb29452a commit 673d62fc359b0cb7a70af42c36d2fa54fb29452a Author: Bjoern A. Zeeb AuthorDate: 2023-09-25 17:54:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-25 17:57:40 +0000 LinuxKPI: 802.11: fill regulatory_hint() with some life Start implementing regulatory_hint() using a .c file based allocation helper function so we could change structures in the future with better chances to keep compatibility. This sets wiphy->regd needed by various LinuxKPI based WiFi drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 20 ++++++++++++++++++-- sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 56ca9a231d2d..7e57ce67cc26 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1260,6 +1260,8 @@ struct cfg80211_bss *linuxkpi_cfg80211_get_bss(struct wiphy *, const uint8_t *, size_t, enum ieee80211_bss_type, enum ieee80211_privacy); void linuxkpi_cfg80211_put_bss(struct wiphy *, struct cfg80211_bss *); void linuxkpi_cfg80211_bss_flush(struct wiphy *); +struct linuxkpi_ieee80211_regdomain * + lkpi_get_linuxkpi_ieee80211_regdomain(size_t); /* -------------------------------------------------------------------------- */ @@ -1587,8 +1589,22 @@ regulatory_set_wiphy_regd(struct wiphy *wiphy, static __inline int regulatory_hint(struct wiphy *wiphy, const uint8_t *alpha2) { - TODO(); - return (-ENXIO); + struct linuxkpi_ieee80211_regdomain *regd; + + if (wiphy->regd != NULL) + return (-EBUSY); + + regd = lkpi_get_linuxkpi_ieee80211_regdomain(0); + if (regd == NULL) + return (-ENOMEM); + + regd->alpha2[0] = alpha2[0]; + regd->alpha2[1] = alpha2[1]; + wiphy->regd = regd; + + IMPROVE("are there flags who is managing? update net8011?"); + + return (0); } static __inline const char * diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index de35ab844c25..41b13fc9269f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4028,6 +4028,16 @@ linuxkpi_ieee80211_iterate_stations_atomic(struct ieee80211_hw *hw, LKPI_80211_LHW_LVIF_UNLOCK(lhw); } +struct linuxkpi_ieee80211_regdomain * +lkpi_get_linuxkpi_ieee80211_regdomain(size_t n) +{ + struct linuxkpi_ieee80211_regdomain *regd; + + regd = kzalloc(sizeof(*regd) + n * sizeof(struct ieee80211_reg_rule), + GFP_KERNEL); + return (regd); +} + int linuxkpi_regulatory_set_wiphy_regd_sync(struct wiphy *wiphy, struct linuxkpi_ieee80211_regdomain *regd) From nobody Mon Sep 25 20:17:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvZ0t6rbdz4v1XR; Mon, 25 Sep 2023 20:17: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 4RvZ0t5xQxz3Wyg; Mon, 25 Sep 2023 20:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695673038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpiutBIVoSxokZTdNeNvyq6lwVL3yJ3QmC7PmSr1LZs=; b=PIzs4KCklgzvaE0eGVLp49mxwKd7GfOSv/AFGAq57tW0rFGpUxnOkBFgWRDtrVmYOqOdyT Zlw6EwpUxOM1OgAyH9n8GsgYIylCjAQ0637ShN/wnrrMjOtRvJF5lRgcPKTdq8JqDuMTt7 d9oJTOAHVbNrL1OAoMGl4PXYA625jiZqs8uxEiQf5hV9jUrfF14iOlwnaMz8tok7hRSWZP aNHUQl+HwZuUSGwYOaWlBR//zBR7kzmzlwTG3z3Z1e8IaHUOJqO/SPachioZRz790+HuWx d6KVNYlPlEnftal6Qq+k1UFrCNE5fcaO35Nh8PGTOunjsBrDd/bXtSB6F3keow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695673038; a=rsa-sha256; cv=none; b=qMhabzqH4Ah9tG1nCB9S8K9Zxv19MftPllOkbF/oDLz347RpbXfze9fABmn3IYLWhbKlSM x2R4G0w+94iDHAcXF+x9tiTjTC1nZOSlZRAXEU1SwbRiWkJKq/WjWUf11N2jDvde5QNkli CvzkSxYH7IbZInFEOok2hECiQIaez+KEu6rGeiasg2H0vPt2DtyVooDhUuQUn2yLqGs8BO aGHx6BDbfZSBFcogX7+JEhawx6Ob6Wfre2hisSQt6n6CSzjigJCTkC2PxtQtvQuGsV8DS0 ktafZUubuP+8v5DbT1cbIgqzXa1f4g2y90mSdVH8gZ4lakqdtOZ4jvTGPr5I7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695673038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpiutBIVoSxokZTdNeNvyq6lwVL3yJ3QmC7PmSr1LZs=; b=kE6GNzta0dt2VnCBMlCoH67XyHg9KQCDbxkWrVsKNNqG7i/HMMESQvfqO8yXCp8hy9Z7aM m5MusCD0ULL0k8cRz56LxvO3iB4RaGa9AJVk3VL+0V6D0GZyEc1FjBlNXfXjORHuz9s5gr fpQcqM2oVbKn4mwfI5snfKdRYSslZUwwOJwthCi++wH+/NUP+3EoBRfEAQkVd51k3nmya7 gFUTn4fNMPxZAcXCSmi+Qa4UtXBuAx3o2m8wXM2HTrj1xMyhyCFLkPAGu5mxtqu7YwpGm/ c36qR+Q6bU3ao7kdmfnsoaOZd/OXpmtkzBtEqyPXyvwmhEABe5JurHtGF08+XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvZ0t4t3tzCtj; Mon, 25 Sep 2023 20:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PKHIbQ078069; Mon, 25 Sep 2023 20:17:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PKHIcw078066; Mon, 25 Sep 2023 20:17:18 GMT (envelope-from git) Date: Mon, 25 Sep 2023 20:17:18 GMT Message-Id: <202309252017.38PKHIcw078066@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: 61f8df6a13a3 - main - mfc-candidates: search by committer only, not author List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 61f8df6a13a357e1d45c22a2016b87491f10de87 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=61f8df6a13a357e1d45c22a2016b87491f10de87 commit 61f8df6a13a357e1d45c22a2016b87491f10de87 Author: Ed Maste AuthorDate: 2023-09-24 13:13:15 +0000 Commit: Ed Maste CommitDate: 2023-09-25 20:11:28 +0000 mfc-candidates: search by committer only, not author When both --author and --committer are specified, `git log` requires both to match. Search only by committer, as it is typically the FreeBSD committer who will perform the MFC. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41964 --- tools/tools/git/mfc-candidates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/mfc-candidates.sh b/tools/tools/git/mfc-candidates.sh index 9e120d451beb..76ff9b4d53c6 100644 --- a/tools/tools/git/mfc-candidates.sh +++ b/tools/tools/git/mfc-candidates.sh @@ -118,7 +118,7 @@ fi authorarg= if [ -n "$author" ]; then # Match user ID in the email portion of author or committer - authorarg="--author <${author}@ --committer <${author}@" + authorarg="--committer <${author}@" fi # Commits in from_branch after branch point From nobody Mon Sep 25 22:52:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvdRh6mDnz4vBlb; Mon, 25 Sep 2023 22:52: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 4RvdRh6Hjdz4Vp7; Mon, 25 Sep 2023 22:52:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695682336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6v3Qvj674ZPvMpYchnZwUveTxqzri0dHwKiRM5UpQBU=; b=Ya6JdK+L1RLMwNhbNZYAAzClN2IqPu7KmSmQQRS3u1GSr+k93kxnXJXos47IYAD4E3MjN5 Jnnlk/KHL2sGpZ6XcUD8yC9hIoYJdKjWzwhtbixVWoGjo5D0ow1ayC+AAYZz67Y16Vbzmm nmT0BdqTqh8OynLdGM5igw5MGsjltVDcj4JqEWObLhvUhrkCyWMn6YlM2GFx3iCwXzyO+R WDY9UsS4uHNGHCb+yh2AbPIXQCHf9VE+GFSiNRbvZGuh/Cj2SVzwwzqwJ6/EbEnVahakNO PyDOdlCsFDgvg+pHvvM0X+MQlfB99imV8rF7w256/0Ecmlfj84BafWl/yNEJcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695682336; a=rsa-sha256; cv=none; b=DXJJhIdbc9RGxmM+aqlAMcuOFfa6oO4JXQJJpYlUiKBrVgWtrGJZffOcqlL71iHm2K1Mya SMr59/uwWpZjsLwB6yqwVJfczGUo3MEDa7gqKk/5HMy7zJV3uElF6rmiIDw5qaYsR9FeTT 9PMp2zWIZ98K3PjjP1x6TKJh2Un5esMx8YfcWXk3FhNvkvdrhE7qvd20h/KmRsW3Rv/E0n TpSV4aGI0/WnmkdTENGSCoNI1zS/h5074UiQc6w7Q6/QKyFg1UBFLe0ThZjgZGMRCfhtFN gJisksjiztQZhHRlvGZ+TkaGBzyX3HFnkBk3Muh8rZ1Ne9BpLoNSjf+ajT/YJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695682336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6v3Qvj674ZPvMpYchnZwUveTxqzri0dHwKiRM5UpQBU=; b=qBGRC/HN6/tOrX6qntXmwwdjd6ZqbfqcB+/G/5p/Q8YAr5lA+ihnj7puNQ/DkPoIpCWjgN J9J7sLvPHHtBG8IAnXfUGvHbBNQujcbBpwnGKe/SepN2oLiGGOZRTjl89h2J3TwMRSyC79 BXx6/bWayD+swfnSVddWttXSXL7lrCsXHLAkwsh0Zj8Vm5Gn6Ft+UN/jmrEmgD0zUZlKwN 9bie1mUeNrxRGnnjf82M+gfFqQKvno4Q0RGQ13/ok/pjTbUxHw6UK39HVsCe+KXjsxcgUJ G4s79S4+Rjgd6XsZ2MS7VjCyE4d2lr3Znyusv3TUt7/3F28iGdmgOawEjU/AqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvdRh5M81zYGX; Mon, 25 Sep 2023 22:52:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PMqGFu041219; Mon, 25 Sep 2023 22:52:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PMqGn2041216; Mon, 25 Sep 2023 22:52:16 GMT (envelope-from git) Date: Mon, 25 Sep 2023 22:52:16 GMT Message-Id: <202309252252.38PMqGn2041216@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: 3fb80f1476c7 - main - regcomp: use unsigned char when testing for escapes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0 Auto-Submitted: auto-generated The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=3fb80f1476c7776f04ba7ef6d08397cef6abcfb0 commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0 Author: Christos Zoulas AuthorDate: 2023-08-30 20:37:24 +0000 Commit: Yuri Pankov CommitDate: 2023-09-25 22:49:14 +0000 regcomp: use unsigned char when testing for escapes - cast GETNEXT to unsigned where it is being promoted to int to prevent sign-extension (really it would have been better for PEEK*() and GETNEXT() to return unsigned char; this would have removed a ton of (uch) casts, but it is too intrusive for now). - fix an isalpha that should have been iswalpha PR: 264275, 274032 Reviewed by: kevans, eugen (previous version) Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D41947 --- lib/libc/regex/regcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 791755ceb14d..42fa1b99e58e 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -828,10 +828,10 @@ p_simp_re(struct parse *p, struct branchc *bc) handled = false; assert(MORE()); /* caller should have ensured this */ - c = GETNEXT(); + c = (uch)GETNEXT(); if (c == '\\') { (void)REQUIRE(MORE(), REG_EESCAPE); - cc = GETNEXT(); + cc = (uch)GETNEXT(); c = BACKSL | cc; #ifdef LIBREGEX if (p->gnuext) { @@ -992,7 +992,7 @@ p_count(struct parse *p) int ndigits = 0; while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) { - count = count*10 + (GETNEXT() - '0'); + count = count*10 + ((uch)GETNEXT() - '0'); ndigits++; } @@ -1302,7 +1302,7 @@ may_escape(struct parse *p, const wint_t ch) if ((p->pflags & PFLAG_LEGACY_ESC) != 0) return (true); - if (isalpha(ch) || ch == '\'' || ch == '`') + if (iswalpha(ch) || ch == '\'' || ch == '`') return (false); return (true); #ifdef NOTYET From nobody Tue Sep 26 04:01:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvmK33DG4z4vWtr; Tue, 26 Sep 2023 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvmK32mRqz3Wfw; Tue, 26 Sep 2023 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695700919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmBG73wCCUxNi/Vm+gNsB6SJZ1x5QlkXeTP0FRYo+78=; b=iQelhaUTGVJir8plykS+iKHZCIssvBOexCWY6HgxAJYYFXy/vEgR8ycZk2XQVnHgxg1liP xdRFKrLBoXaQjRuJmPgcobsTppc40Yu1zsdWaAoTEw9anY06GA2A5oS9cOzoFhsGZ3Zoez dPaic/rF54zNLAJ4peGu6CAjAfpze3800FG9Z2BAldQJC0+FgnCnc5Hn/zHbzqWOkiWVso CMVbBsSxt83KGHOZhmsQG7Bfh/RBrhhLdv0U9rVnQot5iTBMHiDGDphNt2LBdZyPrfIsus +6TcB2TeDKPOs7dk8OB9GrkQVrz9Z6EDHJY6/AOZW/ADOf+4qriA1J2TMhKoMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695700919; a=rsa-sha256; cv=none; b=Rwgw8/2QWjV3YEgWZvUY4v7mLxYz31HE3u7AsfO23DaeyVo/bxnRAHmUxkrJ4eOcgzIiXp eXGO7pvo3oI9JY6E8uwVu49yDafrve8KBB3u6ABp8kU8OSaElggvpx6PtuRsu2pxPFLlFA GemcZu8dEY4qqJ4TN7JDkXR1ntfNQljzls8/Wkaj6RzCS7Y3S8tTUr6kG055j15cEqxuBz UzXK+c5bNgY+Dej461B6dMSPqR9oNcEdLjDePyL9UgbBM+jNLdgdngv7r0UNuE3GjFDE7R hr+Qq/AyBWp7AeViIQ2q2ZLYs2T1fGUr7RMSPSSwNb3RXzsEf28cvnZBT1gYuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695700919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmBG73wCCUxNi/Vm+gNsB6SJZ1x5QlkXeTP0FRYo+78=; b=MOuJ7WntoAO2tx1pxrv+2lGI/mQ763KQGHCL+lWCwW4wjo73BtjbIDI7KxmphQphIJp1DN 9px2vnlQoFIhtr5yYZqYCZ5XouBo+9h0tLEMx442B2FkVQE3oqVDTooQVXE5jPsDPRUnmR tHaKbvjvypzX4Bb4AYqnjwXrP6tJ/oWWitznkU8uDvM7WbWmVRXvSxM0nuDepMu+esK/4J waeZHDGLOEATXqxEOi2hua1/p1QO5+12Mnf7xvMASb0iLd2viUvLwOQTsZmSRPsLgva8w0 FNY2zGPRqKRLfcyPTHN1koZRZPtf5dSzTAuCivT6LPLaszIGEpq0wqyQ55iHMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvmK31q7kzhBC; Tue, 26 Sep 2023 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38Q41xGN056340; Tue, 26 Sep 2023 04:01:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38Q41xqv056337; Tue, 26 Sep 2023 04:01:59 GMT (envelope-from git) Date: Tue, 26 Sep 2023 04:01:59 GMT Message-Id: <202309260401.38Q41xqv056337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 1117b3204873 - main - pf.4: Bump .Dd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1117b32048730fd0e44053b06163a2586bfb934e Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1117b32048730fd0e44053b06163a2586bfb934e commit 1117b32048730fd0e44053b06163a2586bfb934e Author: Zhenlei Huang AuthorDate: 2023-09-26 04:01:01 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-26 04:01:01 +0000 pf.4: Bump .Dd Missed in c531c1d1462c (pf: Convert PF_DEFAULT_TO_DROP into a vnet loader tunable 'net.pf.default_to_drop') . MFC after: 10 days MFC with: c531c1d1462c --- share/man/man4/pf.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index 5309db10d807..c4c1d6cc8604 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 28, 2023 +.Dd September 22, 2023 .Dt PF 4 .Os .Sh NAME From nobody Tue Sep 26 04:24:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rvmpk1XWqz4vYQd; Tue, 26 Sep 2023 04:24: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 4Rvmpk12d6z3Z3J; Tue, 26 Sep 2023 04:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695702254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfP8lYzZv+I90EyWXqI47fTRyJEV4YWdXT4YytqjShM=; b=rm9eAkkLCzZXXVjZBYZo6HTqW+J+xCQ0Yn9zif0CEyE7F0wJLmWH3FGNakkRI24Z0Zm2IZ 4U5x8+TCkd+QpcbbH0EgvIVW41d1QN4/NZDvQ9/ds6e8w/HHV1zorei72/ReJABtqm8jEF mS/CJ4RAN6IDaqLlg32AflHFXVHKf8bS4iQE4GM9GA4XsYQVv6IGUtG3vg0NFVL4izB3lu deHiM0ts/+A4xoU+o4b/3sjMoYzj1txjnVv3C+1tjnqRCzzgB2FTjEvsE+mv7f+UWts7H2 KkH4sZ8dGJ4NUrrfS3nydANHQPhV66Sfh6XRZ7PPEyG5fiXU471OUY6TciUDkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695702254; a=rsa-sha256; cv=none; b=wVYPnGmYV0Vz4kU6I7tHHBcixLHwehYMWDUVSzTxfD9/przvANJrpLU2RWptJENVtpEjCX 5gSQ1bf2gY+5rsBnjVCMSDEur2XGE8D8IXN3p00Of+eMg4+AjSVrvSamGiJrdvBQNv4Eoc oNpFrH3vLzvoFf8WdtTER1pVJOlynvkDAb3ulLK8QVl4raAkaocwh9cd6smThMmOIh3TKO VmTT8yY2sKIgQKrGSigZngREjzaixGuq+PEH8Ldd6UJBFeK8u7BKRXE9E/kZe+56GVTVoh MZ/RYsr6RuVVmEdgItJqFQYAMw8LCEiSFirFSjY7y7eL7Febt4ryQIDzxAosBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695702254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfP8lYzZv+I90EyWXqI47fTRyJEV4YWdXT4YytqjShM=; b=tB0trvJkL0kpHs+nu8NenECAjmFHwsNyFcGciM8uQsot+5/iBcq0Wxi4BKzkxFqdCBTRyL MHQiaeLRpKOBl5VCNrd8vKK/4VCDcHS8rLvu35b3znBHp4E30Q7IKuMFYbKz539Ff/iKQh uS7qUpV6PlrZXqncZcXKIwx9sDyEv1CAV17HnMnuMex92rSIYTf6mgFI+keM+q9jE0pYCe 54WyWW+yUv2cSHgBnPzssXCsWN/VwJ9IiXbAcVfnjA26fWWHJS8jiFps/yH4zUJTS8innZ 0jHgMwRiYkzKrCBtgdRJwlbOeoNNxLdQ4dl9q/LXrRYOGVU40vCRAQttbhI+uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rvmpk04zwzj1V; Tue, 26 Sep 2023 04:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38Q4ODEN090895; Tue, 26 Sep 2023 04:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38Q4OD6S090892; Tue, 26 Sep 2023 04:24:13 GMT (envelope-from git) Date: Tue, 26 Sep 2023 04:24:13 GMT Message-Id: <202309260424.38Q4OD6S090892@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: 1d6021cd7268 - main - nvme: Supress noise messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1d6021cd72689f54093af4ed77066a2f8abde664 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d6021cd72689f54093af4ed77066a2f8abde664 commit 1d6021cd72689f54093af4ed77066a2f8abde664 Author: Warner Losh AuthorDate: 2023-09-26 04:08:52 +0000 Commit: Warner Losh CommitDate: 2023-09-26 04:21:58 +0000 nvme: Supress noise messages When we're suspending, we get messages about waiting for the controller to reset. These are in error: we're not waiting for it to reset. We put the recovery state as part of suspending, so we should suppress these as a false positive. Also remove a stray debug that's left over from earlier versions of the recovery code that no longer makes sense. Sponsored by: Netflix --- sys/dev/nvme/nvme_qpair.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 9806096de81d..cd0057f444b8 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1104,13 +1104,20 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n", (csts == 0xffffffff) ? " and possible hot unplug" : (cfs ? " and fatal error status" : "")); - nvme_printf(ctrlr, "RECOVERY_WAITING\n"); qpair->recovery_state = RECOVERY_WAITING; nvme_ctrlr_reset(ctrlr); idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "Waiting for reset to complete\n"); + /* + * These messages aren't interesting while we're suspended. We + * put the queues into waiting state while + * suspending. Suspending takes a while, so we'll see these + * during that time and they aren't diagnostic. At other times, + * they indicate a problem that's worth complaining about. + */ + if (!device_is_suspended(ctrlr->dev)) + nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; case RECOVERY_FAILED: From nobody Tue Sep 26 05:06:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rvnkx1wHlz4vbBS; Tue, 26 Sep 2023 05:06: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 4Rvnkx14dGz3cHN; Tue, 26 Sep 2023 05:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695704761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI/gyGIRXHGGAaBvYTEYK0JVvyDiembou557ATDMDe0=; b=UXoPA9/Fy3asNtDLRBTvlYNeWZq5sLkXKSCSuYRAJ7ELA23M8D3WuOui4MxeB4b9tFUWMo fhjXNPi+Mxbtg6hn3TR7+x8d50rWavmy1HbGHS1xzZmzAQy+TiofSPVd8GIQ9ztOnih9sc 6TQPJBAogxlAaXeieuRE2TEzpqEkQul9/TFOg1643ufdjlLdVdKAxtlecU3y/dQ+F4d1l6 0/sDt9iQ+gNw84/iR/BDezdCCGJkfbDN6NS8q4h8WhtRFdM0fv/C9HhHNphldwP2A4itnF uXgpudpnlGt95996gU4pvc74TVG0v4XM3/oI/ZSRBYo8oZCY7ew/tXXZJCuQVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695704761; a=rsa-sha256; cv=none; b=ADXU5HwNQRmFuFtthTo0kYod+SLhYiB3guTiT7OnlDHlk0MEo85h9G91Lu/sWFYmvC6xMm pj2L5jkMfask5xJtvCqZe+LavwjmAA4iN6/7HaPPs3ylJOEP1ClRsxFuggmBw8V6TM0K4r sPClNdvDZ6WjnzJ/Mxw5K4YzYVkCXaB3QoActB97++6LNB/Cxw88BXAyMzwtI5DwzilTRz p2f25wBYl/kt3jVdhagIXbSgIEgTO1c4rp5X5MuhMpZ0FD/RZ9EsLv3eIq/zRA6OWcJm/X Ojy7QW5woJ9izZy0xRzHi35G6PGd/xW0vXi/pPqszcT2lFRxA+LlYQRwD/I4Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695704761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI/gyGIRXHGGAaBvYTEYK0JVvyDiembou557ATDMDe0=; b=hdjfKHzbrsJ/gqfThWlYtvLMFjlMXnQGUcIeBEd/mRs677ZuD+M/BXLAmIhskoAhAMej8E OmiQL6DHN47pJyZd/sqcOUXoPg8OCYSb0od9oe5zVO2PxQNHdd5SM27zsv8VsuzB44AdrZ QQ2vNOp//OXxU2YPr5Gdv7nz0dC9P43KxaBxd0hwcNQPHQlq4gr+KDY4TEdk2lBsEH1Yq1 vB3rIJe0k57d2yiOWlpocsQN1fM8JDKCIHOL9P2MonB+ubMF5d7soWpuI3J2qHYto0UQRP h5sU3m65Sr4jNEK88HsGE+6yUbL+Sefaopc3XCCIVYhlQXvUiWVVJXQcoZAcJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rvnkx01VWzjjw; Tue, 26 Sep 2023 05:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38Q560X8057532; Tue, 26 Sep 2023 05:06:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38Q560jI057529; Tue, 26 Sep 2023 05:06:00 GMT (envelope-from git) Date: Tue, 26 Sep 2023 05:06:00 GMT Message-Id: <202309260506.38Q560jI057529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Greg Lehey Subject: git: 915af883221a - main - Explain the -d option. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grog X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 915af883221a4982e89ef878f1def0899ccac283 Auto-Submitted: auto-generated The branch main has been updated by grog: URL: https://cgit.FreeBSD.org/src/commit/?id=915af883221a4982e89ef878f1def0899ccac283 commit 915af883221a4982e89ef878f1def0899ccac283 Author: Greg Lehey AuthorDate: 2023-09-26 05:05:16 +0000 Commit: Greg Lehey CommitDate: 2023-09-26 05:05:16 +0000 Explain the -d option. --- usr.sbin/makefs/makefs.8 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index eaa0ab2955df..18fd01adadda 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -114,7 +114,12 @@ Treat duplicate paths in an mtree manifest as warnings not error. Enable various levels of debugging, depending upon which bits are set in .Ar debug-mask . -XXX: document these +This option is intended for source debugging. +.Ar debug-mask +is a bit map defined in the header file +.Ar makefs.h . +See the source for usage, and look for defines starting with +.Ar DEBUG_ . .It Fl F Ar mtree-specfile .Em This is almost certainly not the option you are looking for. To create an image from a list of files in an mtree format manifest, From nobody Tue Sep 26 12:45:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvzxB2W97z4v6PL; Tue, 26 Sep 2023 12:45:34 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rvzx94F1Yz3X9r; Tue, 26 Sep 2023 12:45:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5031ccf004cso14146852e87.2; Tue, 26 Sep 2023 05:45:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695732329; x=1696337129; 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=AFz5w5+4rjpOB0ZgD3Lh8n9gFlRjSs8cX197G9F74g4=; b=gG4Z2xpyQQdLaRsX2Qb+862sdT3qdbZwiNMita/vxNEtvmL1M+OWzCjp56EGX6uaQf p4a+Te9RR1N12F9KykzkMs37kCUW6JUULgzQbzCe/Uewx7cS1ZBGbyoqNFdRCtBGQ5un grNkW/7sScr6waRiPe03HchFAVfs23BXx9BL0XBZ5kPDJROv49jjFBATjlf8StLvWC+Z LBe6zRZ0b5lN3K2zFVLskOovTnMkNsiBPvU3tF8iU388OfsxQpcy96ck/qLFUaV+9tn7 O3aRN7NNI7j4X3o1nM2n6kfPbMgXcOgM/EhNvnJwgJUVIC/BLN3RupuQgt8j3qXjwhFr RHtA== X-Gm-Message-State: AOJu0YzS4s8CQ14+92+4RSB49432KK76ukttip88hxo1/pxfNUTWPJVs S+k+2FicTDKMljOL8NnKMEWIq0p4yAn+LqjGySiVbSsD9PK4SqUn X-Google-Smtp-Source: AGHT+IHw0jpheuJb3YpIAXXCcsU9Xw8j+B+oaabO2kjG0ZJOBfcEjFXpEq1PkFcCLUegc9XeQDnC3/RAwhMA49/md/Q= X-Received: by 2002:ac2:57db:0:b0:4fd:8976:5fc9 with SMTP id k27-20020ac257db000000b004fd89765fc9mr7524742lfo.23.1695732329129; Tue, 26 Sep 2023 05:45:29 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202309260506.38Q560jI057529@gitrepo.freebsd.org> In-Reply-To: <202309260506.38Q560jI057529@gitrepo.freebsd.org> From: Ed Maste Date: Tue, 26 Sep 2023 08:45:16 -0400 Message-ID: Subject: Re: git: 915af883221a - main - Explain the -d option. To: src-committers Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.96 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.958]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.54:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.54:from]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com] X-Rspamd-Queue-Id: 4Rvzx94F1Yz3X9r > The branch main has been updated by grog: > > URL: https://cgit.FreeBSD.org/src/commit/?id=915af883221a4982e89ef878f1def0899ccac283 > ... > Explain the -d option. Not picking on this commit specifically but it's a good opportunity for a reminder that we have a comprehensive set of guidelines in the committer's guide: https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message We've had some recent commits that don't follow the preferred format -- overly long lines, missing empty second line, etc. For this commit the issue is our preferred commit message subject format starts with a component. That is, for this commit the preferred commit message would be: makefs: Explain the -d option This makes it easy to find commits of interest in short logs, e.g. the five most recent commits as of now: $ git log --oneline freebsd/main | head -n 5 915af883221a Explain the -d option. 1d6021cd7268 nvme: Supress noise messages 1117b3204873 pf.4: Bump .Dd 3fb80f1476c7 regcomp: use unsigned char when testing for escapes 61f8df6a13a3 mfc-candidates: search by committer only, not author From nobody Tue Sep 26 13:05:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw0Mg6cjPz4v7l1; Tue, 26 Sep 2023 13:05: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 4Rw0Mg65wlz3Znp; Tue, 26 Sep 2023 13:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695733503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZQCrQRdAmNTxif5Qz6ninG9JjG1l1xHTVqcR6luIJ8=; b=rmwcCzwlHfGYjE8Gn9Y3z/7KGFFT2KMjM0cx8mPOy/8MSjWRRUAxoN7AyCxY/urXhZWdoZ Yy/BznN9zqyvFplAz1VnveNFBNaIQgOHkWiHlPDSD0JVvpSI3wPOJ6oO1QjFd5lkKFVa72 TDAo83pWkqqzlTwsZTBkJQfffCX72Hnyw49iI9XMjszYcIULOTWcoQqkfLoYIjnafk0ULt dxV/bIQXfY1eJNA1tytM/HWMiXCcUvF9rN0wyQnoOsLhB7E6S+TmtEzWM3IS7Z27ovlLgt cgfMpNNAsli6dkegTZT6grMxVmg2ul2nkGChrrEs9WTIOOis8VtXNCjyhTyBmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695733503; a=rsa-sha256; cv=none; b=un8DHgEfRgWQss2L5uMBEZbpnvAHGETDL6mB8U+qpG1YtOSZTWBST2/sCaF4zWe7NAiJlf Jhg69y4q72S96bWTeNc/X9j16NuoP3UJpY1nexAyEbgSpT8S/xG05rRq/6EEuSUofM+1iQ frGNo4pMd0ewwG7nKm9YHCrQbREeZrUchb8pqTgOPobA2ONHCF27wrIHhSeyIxGtnG2JAT 0aS2Qg5iVq+gXtaaAneuYDm8wyQ02WDTMYd/sRqr48axNXnLAn8elSmW8bvzcR9oY2VNFy AJ05eCx8/RZQpjTfxKVyCObtSaDlelldiHgs+ly+ah5s/rfimsf8WDgF1zHJkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695733503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZQCrQRdAmNTxif5Qz6ninG9JjG1l1xHTVqcR6luIJ8=; b=AhtU9IzYBQO36Y9h7M+qIeXjNBIBLrQZNDOZBLoEjHDUfO6R0JDvA4HToG5CPTd8/7MKXz W2igGLTw8v/Xix6PqRcHNki1+GCBzDRbm8XTx6NmDaOUy2SYbt0eMBT+oETiNndzcTh4zQ 6ZS2rSdxVFiIX5Vp83grQt3lxwwcBIyu0xbQM4r9HZiqa+CJGoNrF1cI0xWft6bMZtWg4p 5UP2K6mlP5PDd/rUDzv0hrdt8BmAnRT7siniVtR7YuVB4rGCgdqRDw3KOSlb+lD9498AFo liUiB5Te1qaclEwFE78LnEkxLchrsO3Wu3sJpHSAprRWku6xuyFlU1ALG8ZHLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw0Mg58NRzxqj; Tue, 26 Sep 2023 13:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QD53L5051939; Tue, 26 Sep 2023 13:05:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QD536H051935; Tue, 26 Sep 2023 13:05:03 GMT (envelope-from git) Date: Tue, 26 Sep 2023 13:05:03 GMT Message-Id: <202309261305.38QD536H051935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 09cd74a0b8d5 - stable/13 - libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 09cd74a0b8d5a0b625ac7706ddc4655664fb05f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=09cd74a0b8d5a0b625ac7706ddc4655664fb05f9 commit 09cd74a0b8d5a0b625ac7706ddc4655664fb05f9 Author: John Hein AuthorDate: 2023-09-21 23:43:05 +0000 Commit: Ed Maste CommitDate: 2023-09-26 13:04:40 +0000 libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum PR: 273966 Reviewed by: emaste (cherry picked from commit 633094c27f0ac1b1001d5bd24a883240b4bce1dc) (cherry picked from commit fd8bf2ecc05af841aa7e8369a43861cdc122d404) --- lib/libprocstat/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c index dea078c848eb..cf3435a10c79 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -119,7 +119,7 @@ procstat_core_open(const char *filename) warnx("%s is not a CORE file", filename); goto fail; } - if (elf_getphnum(e, &nph) == 0) { + if (elf_getphdrnum(e, &nph) == -1) { warnx("program headers not found"); goto fail; } From nobody Tue Sep 26 13:05:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw0NB3hdFz4v7qt; Tue, 26 Sep 2023 13:05: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 4Rw0NB3CMdz3b2s; Tue, 26 Sep 2023 13:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695733530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HQIDkmC6CndBq2Mpng49xXrie7OzXYjFdePPHA6Ayns=; b=DwB5Fkib7KP91UCtTqmXyoTfG63wWm5TJ95PmU5brF+avxwdoxCiK1SarXD7K+9HyDG+Mv faPFoqCxzIZgx21HbCIsm6BkFk6wRU65/dQHPv0FCZ41HNLApFKgvzG2NlOE7xAb3dabAz YOO899MGn4oeVqtY5/xxACB5TzCJ0d8Rc3vK7RZK7qqwMnTgBooAtg5BR7JI9CO1dKx86e V6P2ciXJ3U1q/id5Pq4nnE7GSGzOECN7a7ryPIAyw3zh6+KfizYrmNCWAN2k9y2te/GpXy FzghLO5NSjywVQ9awYqnN4lcz3cHBOuBkm/3p22oKYuMPOorW7DkOOoXYkzUbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695733530; a=rsa-sha256; cv=none; b=rdYHKxojMRUUXECYnzOljIs8QvTJF01xfpxve98whOrNmivEv0ekKCcrtAt1At69cDZm84 KmfzVUs6J3ytX3gphGTyKcjW/qFgQg0gcwC5lkwcz3UphWhCXpowbVHmd7TFwhwSruO8ZV /rnrOC8qNqSibAyh65KRL8Sga+R5Woccu5BUWnBeNXtDvZvRR35eS+2EarKIMoQr0dxMLM HrlHD6koaMKJZzPbTmKsINLtY/o+30voKTULGhmpN1NaF672lwvxHMxyU4sAm3qI/4Laca OFA0jL7xQ5nU3hjapcZOtGmSXDw9Jhk+hwMOFsbNg4I3O0GUAlPxUSUlFHrJYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695733530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HQIDkmC6CndBq2Mpng49xXrie7OzXYjFdePPHA6Ayns=; b=l2zP9uHdZtvHZjO2HSxWINBP5N1VUhTi7SoGKaXxkjaqDIU8UL4h4VSuH3hjo7oL7XOg3P h5Qw051i4omH/jfmnMJyBstEgOECSDy8KBjTD8kRkcQyWiAUtSgbpSd7j7p69LzFUUUI2x RszQladAGt0rG6Uh/k+EgcLcQpEAc9lPCtvnNoy2T4RLbBy8WhyOQCre9GHyYm6EABJv38 O+9G2MjgMCIE0zsqK71my6ze/XN19ov/T8eJuGqFERSkSHpoW+LTMZKY5Uy3+jVsAvDIyQ xkwtmFdM78eb9kUkNw4Zy+9bjyi/qg4ndsV/F/x6XFKJaChS7g2i4CfgOhk/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 4Rw0NB2GZbzxTC; Tue, 26 Sep 2023 13:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QD5Us9052138; Tue, 26 Sep 2023 13:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QD5U9q052135; Tue, 26 Sep 2023 13:05:30 GMT (envelope-from git) Date: Tue, 26 Sep 2023 13:05:30 GMT Message-Id: <202309261305.38QD5U9q052135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 205f9a4fbc82 - stable/12 - libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 205f9a4fbc82bdf8c8a7e5de4ef053c238d4769e Auto-Submitted: auto-generated The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=205f9a4fbc82bdf8c8a7e5de4ef053c238d4769e commit 205f9a4fbc82bdf8c8a7e5de4ef053c238d4769e Author: John Hein AuthorDate: 2023-09-21 23:43:05 +0000 Commit: Ed Maste CommitDate: 2023-09-26 13:05:16 +0000 libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum PR: 273966 Reviewed by: emaste (cherry picked from commit 633094c27f0ac1b1001d5bd24a883240b4bce1dc) (cherry picked from commit fd8bf2ecc05af841aa7e8369a43861cdc122d404) --- lib/libprocstat/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c index c3d5f8bec495..dc05991f3372 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -121,7 +121,7 @@ procstat_core_open(const char *filename) warnx("%s is not a CORE file", filename); goto fail; } - if (elf_getphnum(e, &nph) == 0) { + if (elf_getphdrnum(e, &nph) == -1) { warnx("program headers not found"); goto fail; } From nobody Tue Sep 26 13:29:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw0vs08mHz4v8mL; Tue, 26 Sep 2023 13:29: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 4Rw0vr6hklz3dkK; Tue, 26 Sep 2023 13:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695734968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGlgX14iIr1mZ01UVTarFdfxBigDpKElbnhkAXKzqXo=; b=AL5TfKpXM6c8YC+Uocov1oHyS3+RUy2GFlEGTRLFa8tbb1jygrv19/8hnpWybtiaERe1O4 +DL7LEVHmG01HbudqMYAd1U9XDOM3lA/wcnXBrnebPMhEDpfkiUjdzgZPSf6rtmINz468c 6FZKxnqDuWMcBne1hkZhieaplKSFVKB1CWQCsicseyFyyhKDgL6vWjPLeLCU4rMAqJ4uqy a9GUnqOkEHQWS0hhMQxtsPtYtgCo7Te3A4eUM0k80MKkHtVe/nkCi3RBLk3Y68diZZYUuh atF/WZPfJVKPl7YksAZvtPQqpOd9Yc3RfOp96VaEJ+ut4nBwnVDvvMw9DLRQRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695734968; a=rsa-sha256; cv=none; b=SWvC+3J3sf/4Xbt7VF7Kf/tJeKPR2U3Zn3mGZxNkht7LX5xWfMBSLSZcmB/QD+HxiGKK48 R5VCelYydl5Xb49y1tJzkutrnkxQu3IdMXY4eE4o955UIy6bPJRhWbARDO8EXAD3yMVPm4 lOA4Tg/4ETkHcgyvGsO5Ci6LJuD+9mx2YT5rY0rHDJf4mEvRkUr6olshaKyrkwrEnYQIzO ExogQJmlxVrUSI5wneeKT+MrxBgCOcsyl+9ZM0s0y2hLQRq9d71PQWG2KDfBEp4UhBp1sO Nfim0D5HFUN5sw3E/t2fzWnEHgDUn/ddYBtvuM+UymnX/FwV9VrPjIyaCoiZFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695734968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGlgX14iIr1mZ01UVTarFdfxBigDpKElbnhkAXKzqXo=; b=qjuyIh5QRreMC08QQ5dh+MrM3nEXQUczr8+K8Rp0NVuLxTX6z7xrV3tgqMnrqGijvv1Y4I Njdf7VIydh/OSEC3djJ3di/Ebk4qa6H8ZkPsIx78j0vKAJSgwICEybmv5xmBTuXX2GgkJZ /Nx9A6c0xxM4jiRAqwNicSbBHwjNALzKVsuWmcMyTbgGqIznFclWpVlNcOt1GVqarKW2gk qucN7MAK1h/GHWU4Dbqxf0SVWTRaG7ePiVce43W0zAvVsSdwQ6roq7cvuFKzGx2kbVp4HR ZFepLhXecojIhhnSXhjRwFyFN+kGkXyqihX0xRlYLdl2sGCf9E5ozjzX6nquBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw0vr5kW6zxsk; Tue, 26 Sep 2023 13:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QDTSJw085776; Tue, 26 Sep 2023 13:29:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QDTSMF085773; Tue, 26 Sep 2023 13:29:28 GMT (envelope-from git) Date: Tue, 26 Sep 2023 13:29:28 GMT Message-Id: <202309261329.38QDTSMF085773@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: 5b732ae8332b - main - kernel: remove unused HWPMC_MIPS_BACKTRACE option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5b732ae8332b2bad256016569c0ead6d918bdf79 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5b732ae8332b2bad256016569c0ead6d918bdf79 commit 5b732ae8332b2bad256016569c0ead6d918bdf79 Author: Ed Maste AuthorDate: 2023-09-26 13:27:14 +0000 Commit: Ed Maste CommitDate: 2023-09-26 13:29:18 +0000 kernel: remove unused HWPMC_MIPS_BACKTRACE option MIPS was removed before FreeBSD 13. Reported by: andrew --- sys/conf/options | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/options b/sys/conf/options index ae94d1b60492..840f6a9dfffc 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -890,7 +890,6 @@ DCONS_FORCE_GDB opt_dcons.h # HWPMC options HWPMC_DEBUG opt_global.h HWPMC_HOOKS -HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h # 802.11 support layer IEEE80211_DEBUG opt_wlan.h From nobody Tue Sep 26 14:09:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw1pH0gX0z4vCX9; Tue, 26 Sep 2023 14:09:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.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 4Rw1pG2rt1z4JQf; Tue, 26 Sep 2023 14:09:42 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.167.50 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5041bb9ce51so14219003e87.1; Tue, 26 Sep 2023 07:09:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695737380; x=1696342180; h=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=2wa/HUKw6iqnaLUrn0x9mR3imcLrv394/ZYBUf0aUB0=; b=ZoI800W5MSVF/78DPG1sbhqr3a2d9i/3FT4QzPNtsT2N/k3TUghrpP8MImDKRo9bjy 2X1GaKfd3C+2d0petR02YcAJFe2MbtF7bK1IGRyu8PdgQU5ijbhRcCWMbYoXq1P5cU0u mn7axStFPKDbgBMgJUsaVgEjbT7sfKPWnfUZfz3s65WEyoYstM66KWKi3KInF3NS2dhl +wI0th2NAjwTqDJBL51i7CsXUcQk7sRpLM03TrpXmyCMmUyQ7d33r51q36xrYkxadcXe TSf9FHXGldkaffP0pMnPYKSCVypQVg1e15z14/dLR33yJkTDePmvJAhorGRqRQvd8wnH QXvA== X-Gm-Message-State: AOJu0YzMSTf6D0KEQj1hPLoEcRnekRIrJZtOKd5UUGagh+F8BoTY+RGn HwHIj7n5zzyyaNe5ZFbqUozCyTky76Y4zrxrXMcqqGAlFax35w== X-Google-Smtp-Source: AGHT+IGcRH3cCOWYDob43eXHI3YJ4pY0dJmUHDmtIowb8Jr/OpTQNNUNAbcoIAr/NzXYwdXRM485j8U3AcMkA61sA84= X-Received: by 2002:a19:6710:0:b0:503:95d:f2bd with SMTP id b16-20020a196710000000b00503095df2bdmr7751842lfc.34.1695737380269; Tue, 26 Sep 2023 07:09:40 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202309261329.38QDTSMF085773@gitrepo.freebsd.org> In-Reply-To: <202309261329.38QDTSMF085773@gitrepo.freebsd.org> From: Ed Maste Date: Tue, 26 Sep 2023 10:09:28 -0400 Message-ID: Subject: Re: git: 5b732ae8332b - main - kernel: remove unused HWPMC_MIPS_BACKTRACE option To: 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-Bar: -- X-Spamd-Result: default: False [-2.88 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.88)[-0.883]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.50:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.50:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[carpeddiem]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com] X-Rspamd-Queue-Id: 4Rw1pG2rt1z4JQf On Tue, 26 Sept 2023 at 09:29, Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5b732ae8332b2bad256016569c0ead6d918bdf79 > > commit 5b732ae8332b2bad256016569c0ead6d918bdf79 > Author: Ed Maste > AuthorDate: 2023-09-26 13:27:14 +0000 > Commit: Ed Maste > CommitDate: 2023-09-26 13:29:18 +0000 > > kernel: remove unused HWPMC_MIPS_BACKTRACE option > > MIPS was removed before FreeBSD 13. That should of course be "before FreeBSD 14," noted by jhibbits. From nobody Tue Sep 26 14:37:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw2QN62BNz4vDXl; Tue, 26 Sep 2023 14:37: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 4Rw2QN5WXnz4PcW; Tue, 26 Sep 2023 14:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695739052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dj2/HMdM+Wvc1AUJ9kGhNkx9ArL7YJPum4kffdVOQhI=; b=nngg+MLamaVkRxi6zI8HmeI0Fkwd16rPMPXQ/RnwgO+o4Mvf5pDX77L+QmYbQjplD6G/KC mD55qGxbd/ngpIo5aKOYEyatH9m5jOKnMO4ZgmWuhN1E/hdOS2ZPMqxyZ9cztYsJzQbDU8 UyEe2lQbUxfFFbvfwO6JqrmWD1SxfJRf9lJrZ/h0u6bFUq2nHObzE7OLPvBdfvrk7BqU9o XEyZ9cppSHw4jRnqZd/rJ9J1NN//9Qxj95c79UBLbomPrEQmAbrZ9mUjy6nTZCZVFeMfFC yKSjhE6Lmi5tCET8a19FaUWyBo384AMRuFHq1oHTKg+lQAFrHeuy7wOfA07Z0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695739052; a=rsa-sha256; cv=none; b=MOb554kXMCVFoqf67trfS+SjklZkK5FunYv2qrQENZLNtlW86MjERVH1dTca5JEn265tHg /ewO95NAgtII39StRZXhw1xCV3HUWWe1kbnLS2Lj7kKS81f2ehIOU8J5S8YXw3VmZNMju+ RLW90tIwWDuwnvS46b2ayXoIPXLIFSnxKVe/iXw67P49ow+eGnuxrmNCjNAqoEY9yT6uO1 6qLPK3MfbeiddSzhh+m7YdsEw31Cbv6DzqXcK7FTRdDZqWqtoyqpKGpI/krAgIKZNG+c/3 BlM2wx0v5fpnfp0OGTPWKVdyaYQ91QyGobUDpEHlx/hWTZyuXnmRM2u0gyMt3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695739052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dj2/HMdM+Wvc1AUJ9kGhNkx9ArL7YJPum4kffdVOQhI=; b=sRRimrSjO+EwGtORuilJybga9CoALXk71hKIBUKAWfifoeWbu17GSPx1GSjU2+NX1E4CKi JFhudgfwWN6Ae+CayBvZBXMhzBMPZSmpxKEW9hugzwVrozUy6VCJu6M2M9y5y9kRFpsgzx YIea+VpBhKgQ7KYSITF+RrSTKY5/HaMM1x77wjsm2xru94Cot3S1UnQ8Fg3qhQwrT3Idbv 3C1Pf0ZHu/axsokAHnWVhJ0MFxOm3nUhE2uyZsj/ZGSnSBG+O4q9qa7k1G7m/Wt/IJgoFF iScz/a/GTJ0mif1ocCOYjBiwFjMj3QkAk3UX+Rs14Njnv7v7tduWDRtr0GC5cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw2QN4Xqnz10vj; Tue, 26 Sep 2023 14:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QEbWG1002062; Tue, 26 Sep 2023 14:37:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QEbWmw002059; Tue, 26 Sep 2023 14:37:32 GMT (envelope-from git) Date: Tue, 26 Sep 2023 14:37:32 GMT Message-Id: <202309261437.38QEbWmw002059@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: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e6dc6a27230f836a131118326731b7c5fd417723 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e6dc6a27230f836a131118326731b7c5fd417723 commit e6dc6a27230f836a131118326731b7c5fd417723 Author: Mateusz Guzik AuthorDate: 2023-09-26 14:36:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-26 14:36:51 +0000 sys/conf/newvers.sh: whack sccs tag In the same spirit as removing cvs $FreeBSD$ tags. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/conf/newvers.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 73fd6857d307..18b1817ca287 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,11 +311,9 @@ fi vers_content_new=$(cat << EOF $COPYRIGHT -#define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] = VERSTR; char compiler_version[] = "${compiler_v}"; char ostype[] = "${TYPE}"; From nobody Tue Sep 26 14:51:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw2l56Gr7z4vFqY for ; Tue, 26 Sep 2023 14:52:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 4Rw2l45wGVz4Qb9 for ; Tue, 26 Sep 2023 14:52:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-405497850dbso70755035e9.0 for ; Tue, 26 Sep 2023 07:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695739917; x=1696344717; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wt7O+tzlCZ0EYMnnDMNW2TdkHWuI4aLkIDqOZfvb8eg=; b=fVMQLyAfanzDsPmcyiZRXcLL6+s7rUiX2jRJhehlfWwGDEaHBrEbDg8Kr86sgQ4nUW LvKBG8JqmQ3vPh6neAnREOzQWrqT7x1WGy7Ht+RuvLXmrKE7uOJvKrvrvPfiqhdEfbnP GsFSLssJ6+o6+7xmhBKeTcN1Xi/EG2HowQIyMOZ8DUH3+lFwcOk6wxerGFJqBiazhbdc mNbnh1u6nkrOznb7cirbP1aGeWqhYD2Ku0o9J9dIXOp1fUbQxUO347tKc04+6fImGYj5 MRQjimNoGaO1f6IFQLNifkKTH0mOeUZKxgr8WFCIa+h8bcxvzlVF7UFiwarHWs4LaLgZ V8nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695739917; x=1696344717; 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=wt7O+tzlCZ0EYMnnDMNW2TdkHWuI4aLkIDqOZfvb8eg=; b=RenJjN+VTH5z8x2A7bNYySLUeZQOFrwLDzBpQhQD9X4OZ6ndih+txEts/p8dBZPzGe PmtFpEEPOv6sOIfT9wGuVOMNF+QtqA4MTZ/PglPiy8KGbOVun3O4/xWILHsTV1V7fVOQ cXOaba684jNTG4iToLK+1q2Qqf+5+C+q51wwdeTxUFh6PXuBKMHFb8hydPO5ECSgzy6N Hq4QctoYKwuxXYVytkbv617daO3uAIUPqzEdQp7a2CEyWjDL/5Asoo+v72OqPdco1rOV boykGGNREPNjT7Mnco15QQeYK6CbvEbSFp9jWEHZNLyXowyldxMVxI0RkKJ2giVTEB7f b5Mw== X-Gm-Message-State: AOJu0YzPKOjfAP8WjW8rABDA6tdbfKry0EdyB2uLOpxIzQ/7ETb+DwBo 3b5GJ19lKpEb1SsDafZiqtYPIVphqichlWH1JzE5SQ== X-Google-Smtp-Source: AGHT+IF8dbwLCVA8uMx4TsxZ2pbTI5TVCYG5GI/1iQ8esm4Vtyq/eWHsJjlnaX+aH58poQsFNueqw6seRAQOPIs3FfU= X-Received: by 2002:adf:b199:0:b0:323:2b6a:59c5 with SMTP id q25-20020adfb199000000b003232b6a59c5mr4815053wra.67.1695739917110; Tue, 26 Sep 2023 07:51:57 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> In-Reply-To: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> From: Warner Losh Date: Tue, 26 Sep 2023 08:51:45 -0600 Message-ID: Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag To: Mateusz Guzik Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000642dfa06064437b9" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Rw2l45wGVz4Qb9 --000000000000642dfa06064437b9 Content-Type: text/plain; charset="UTF-8" Can you put this back? It is still useful. I have automated scripts that look for this pattern to find the version of a core dump. There are no other ways that are as reliable to find this data. Some other heuristics exist, but my experience with snagging data from maybe a thousand core dumps from $WORK's network found issues in all the alternatives. It's why I didn't whack it already. Even though the text says SCCS which is prehistory for this project, it's still in use today. Warner On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=e6dc6a27230f836a131118326731b7c5fd417723 > > commit e6dc6a27230f836a131118326731b7c5fd417723 > Author: Mateusz Guzik > AuthorDate: 2023-09-26 14:36:51 +0000 > Commit: Mateusz Guzik > CommitDate: 2023-09-26 14:36:51 +0000 > > sys/conf/newvers.sh: whack sccs tag > > In the same spirit as removing cvs $FreeBSD$ tags. > > Sponsored by: Rubicon Communications, LLC ("Netgate") > --- > sys/conf/newvers.sh | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh > index 73fd6857d307..18b1817ca287 100644 > --- a/sys/conf/newvers.sh > +++ b/sys/conf/newvers.sh > @@ -311,11 +311,9 @@ fi > > vers_content_new=$(cat << EOF > $COPYRIGHT > -#define SCCSSTR "@(#)${VERINFO}" > #define VERSTR "${VERSTR}" > #define RELSTR "${RELEASE}" > > -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; > char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] = VERSTR; > char compiler_version[] = "${compiler_v}"; > char ostype[] = "${TYPE}"; > --000000000000642dfa06064437b9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Can you put this back? It is still useful. I have automat= ed scripts that look for this pattern to find the version of a core dump. T= here are no other ways that are as reliable to find this data. Some other h= euristics exist, but my experience with snagging data from maybe a thousand= core dumps from $WORK's network found issues in all the alternatives. = It's why I didn't whack it already. Even though the text says SCCS = which is prehistory for this project, it's still in use today.

Warner

On Tue, Sep 26, 2023, 8:3= 7 AM Mateusz Guzik <mjg@freebsd.org> wrote:
The branch main has b= een updated by mjg:

URL:
ht= tps://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c5fd4= 17723

commit e6dc6a27230f836a131118326731b7c5fd417723
Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2023-09-26 14:36:51 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-09-26 14:36:51 +0000

=C2=A0 =C2=A0 sys/conf/newvers.sh: whack sccs tag

=C2=A0 =C2=A0 In the same spirit as removing cvs $FreeBSD$ tags.

=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0Rubicon Communications, LLC ("= Netgate")
---
=C2=A0sys/conf/newvers.sh | 2 --
=C2=A01 file changed, 2 deletions(-)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 73fd6857d307..18b1817ca287 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -311,11 +311,9 @@ fi

=C2=A0vers_content_new=3D$(cat << EOF
=C2=A0$COPYRIGHT
-#define SCCSSTR "@(#)${VERINFO}"
=C2=A0#define VERSTR "${VERSTR}"
=C2=A0#define RELSTR "${RELEASE}"

-char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D SCCSSTR; =C2=A0char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D VERS= TR;
=C2=A0char compiler_version[] =3D "${compiler_v}";
=C2=A0char ostype[] =3D "${TYPE}";
--000000000000642dfa06064437b9-- From nobody Tue Sep 26 17:00:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw5Zt3lJjz4vNg5; Tue, 26 Sep 2023 17:00: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 4Rw5Zt3XJwz4cYy; Tue, 26 Sep 2023 17:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695747606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nx1agb05fvvVQFQh2tSojsFwlau4DkutZPGrP/ssZ1M=; b=F+OME+bvTy4zGoGfUbHCC5f7WzhAVED2i3Pc9hqiuJ6pj293cQgYBAP3aT9WWABxUFd5i8 pgt9X7e0Gjkm4lhV7S/dAh9d9Ut4GrU30iofVLqlI/gl6Un6+NDJR0GDe5Wlfmg3iDUrfS PB4X0w5b/9dtJBWrP1FoEokByc9QsijQls3rjSaNxozQXYFFLtCW2jyPxc8rvagfIbBR5k 3iYWRTSQ3htmO8QohzUy+yKVuDB8Po/543R1UPbfoTDTqRgOm38fJRv60ev0jcktNGe4wL dNDQxfPYhF9AWnuR2ebxKcTpzJXbxQfYNM/1H+cEkk4w2KsdRw3Kv6DSAFQhRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695747606; a=rsa-sha256; cv=none; b=JnIvtsKCE5OpAk1FFconZikHapAlMI3Gq7TdPlYiPF0F+fF95sJXpVC06Zbuy3GvwRXEG5 fGN6F+fI4B7uIax9w8XXALLWR4EZ5ZNksL/AOpbqijyv0ckOQ2tRlhNuyvk7Ou2EM9HaIc cpNx8WRF+CrMFEQB6lO6RxBD1LZDSU+privG9KvzRrE1xprR7mSAhWHDKE9J5knFveapdQ RcEFGvGYlRbDXVEylIVEzIlrUZE3wileLxAxrzTEQe9oI8Va5h2anXuJV3jI/mUiriAEbw iWJi+BLKDkeNe1/FHsNLpXxEcXzEqJgKbuoT8OE/UYnkuC6g2kiPcCul5iS0Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695747606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nx1agb05fvvVQFQh2tSojsFwlau4DkutZPGrP/ssZ1M=; b=AseLPeH0N5kGKorgG5wbn/7G3ZnZd9A1R66SsAY32TkFo7F8wxYnn5CQwfYotMI/olAWs4 zNcLuuFg4gitdNpekx+cZOJr/IsMtxIeHMfwyNGdCj6DCMWuLsGiucGytmuRPRSEX/xqKE EdFzAEJnJtvGdXxJd5SJxBNfAk8fxko+8jdHRYE48W8ALNNBAKE7NFKrdI5xP75rmBca1U Sgn/jnV+k5/CWTMhL5LYEsa5Z6Zd03DO9WAVwJcDuw5A72ZxiZeVKMtZQ7OQrNETvH/qgt NxsiDiGG2YzAhWFEC99DwIbARo4xL8K2y991bSD8y9qzgv3FohdcmL56VJl2Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw5Zt2c56z149m; Tue, 26 Sep 2023 17:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QH06b5038376; Tue, 26 Sep 2023 17:00:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QH06di038371; Tue, 26 Sep 2023 17:00:06 GMT (envelope-from git) Date: Tue, 26 Sep 2023 17:00:06 GMT Message-Id: <202309261700.38QH06di038371@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: 29a55fd09b0a - main - dtc: Sync with upstream commit 26a0fe5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 29a55fd09b0a3cc4c888f7a630fde41694699343 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=29a55fd09b0a3cc4c888f7a630fde41694699343 commit 29a55fd09b0a3cc4c888f7a630fde41694699343 Author: Jose Luis Duran AuthorDate: 2023-09-26 16:37:52 +0000 Commit: Ed Maste CommitDate: 2023-09-26 16:59:17 +0000 dtc: Sync with upstream commit 26a0fe5 - 0206c0f ("Handle top-level /delete-node/ directives.") - d612a9e ("Remove C++11 standard constrain") - Remove extra white lines after the $FreeBSD$ tag removal Reviewed by: kevans (earlier), theraven, emaste Differential Revision: https://reviews.freebsd.org/D41482 --- usr.bin/dtc/HACKING | 1 - usr.bin/dtc/Makefile | 3 -- usr.bin/dtc/fdt.cc | 134 ++++++++++++++++++++++++++++++++++++++++----------- usr.bin/dtc/fdt.hh | 24 ++++++--- 4 files changed, 121 insertions(+), 41 deletions(-) diff --git a/usr.bin/dtc/HACKING b/usr.bin/dtc/HACKING index 9447c4f6ebf9..ef858c8885c0 100644 --- a/usr.bin/dtc/HACKING +++ b/usr.bin/dtc/HACKING @@ -1,4 +1,3 @@ - Notes for people hacking on dtc =============================== diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile index d242ed80e8b1..d7661ae164c3 100644 --- a/usr.bin/dtc/Makefile +++ b/usr.bin/dtc/Makefile @@ -1,4 +1,3 @@ - PROG_CXX=dtc SRCS= dtc.cc input_buffer.cc string.cc dtb.cc fdt.cc checking.cc MAN= dtc.1 @@ -7,8 +6,6 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions -CXXSTD= c++11 - NO_SHARED?=NO .include diff --git a/usr.bin/dtc/fdt.cc b/usr.bin/dtc/fdt.cc index 5ab9ba10d2f0..f0b98cfe720c 100644 --- a/usr.bin/dtc/fdt.cc +++ b/usr.bin/dtc/fdt.cc @@ -861,7 +861,15 @@ node::node(const string &n, node_ptr node::create_special_node(const string &name, const std::vector &props) { - node_ptr n(new node(name, props)); + // Work around for the fact that we can't call make_shared on something + // with a private constructor. Instead create a subclass with a public + // constructor that is visible only in this function and construct that + // instead. + struct constructable_node : public node + { + constructable_node(const string &n, const std::vector &p) : node(n, p) {} + }; + node_ptr n{std::make_shared(name, props)}; return n; } @@ -1035,12 +1043,31 @@ node::parse(text_input_buffer &input, string &&address, define_map *defines) { - node_ptr n(new node(input, - tree, - std::move(name), - std::move(label), - std::move(address), - defines)); + // Work around for the fact that we can't call make_shared on something + // with a private constructor. Instead create a subclass with a public + // constructor that is visible only in this function and construct that + // instead. + struct constructable_node : public node + { + constructable_node(text_input_buffer &input, + device_tree &tree, + std::string &&n, + std::unordered_set &&l, + std::string &&a, + define_map*m) : node(input, + tree, + std::move(n), + std::move(l), + std::move(a), + m) + {} + }; + node_ptr n{std::make_shared(input, + tree, + std::move(name), + std::move(label), + std::move(address), + defines)}; if (!n->valid) { n = 0; @@ -1208,7 +1235,7 @@ node::write_dts(FILE *file, int indent) } void -device_tree::collect_names_recursive(node_ptr &n, node_path &path) +device_tree::collect_names_recursive(node_ptr parent, node_ptr n, node_path &path) { path.push_back(std::make_pair(n->name, n->unit_address)); for (const string &name : n->labels) @@ -1218,9 +1245,13 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) auto iter = node_names.find(name); if (iter == node_names.end()) { - node_names.insert(std::make_pair(name, n.get())); + node_names.insert(std::make_pair(name, n)); node_paths.insert(std::make_pair(name, path)); ordered_node_paths.push_back({name, path}); + if (parent) + { + node_name_parents.insert({name, parent}); + } } else { @@ -1236,7 +1267,7 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) } for (auto &c : n->child_nodes()) { - collect_names_recursive(c, path); + collect_names_recursive(n, c, path); } // Now we collect the phandles and properties that reference // other nodes. @@ -1264,7 +1295,7 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) else { uint32_t phandle = p->begin()->get_as_uint32(); - used_phandles.insert(std::make_pair(phandle, n.get())); + used_phandles.insert(std::make_pair(phandle, n)); } } } @@ -1280,11 +1311,11 @@ device_tree::collect_names() ordered_node_paths.clear(); cross_references.clear(); fixups.clear(); - collect_names_recursive(root, p); + collect_names_recursive(nullptr, root, p); } property_ptr -device_tree::assign_phandle(node *n, uint32_t &phandle) +device_tree::assign_phandle(node_ptr n, uint32_t &phandle) { // If there is an existing phandle, use it property_ptr p = n->get_property("phandle"); @@ -1329,11 +1360,11 @@ device_tree::assign_phandle(node *n, uint32_t &phandle) } void -device_tree::assign_phandles(node_ptr &n, uint32_t &next) +device_tree::assign_phandles(node_ptr n, uint32_t &next) { if (!n->labels.empty()) { - assign_phandle(n.get(), next); + assign_phandle(n, next); } for (auto &c : n->child_nodes()) @@ -1391,14 +1422,14 @@ device_tree::resolve_cross_references(uint32_t &phandle) for (auto &i : sorted_phandles) { string target_name = i.get().val.string_data; - node *target = nullptr; + node_ptr target; string possible; // If the node name is a path, then look it up by following the path, // otherwise jump directly to the named node. if (target_name[0] == '/') { string path; - target = root.get(); + target = root; std::istringstream ss(target_name); string path_element; // Read the leading / @@ -1412,14 +1443,14 @@ device_tree::resolve_cross_references(uint32_t &phandle) string node_name, node_address; std::getline(nss, node_name, '@'); std::getline(nss, node_address, '@'); - node *next = nullptr; + node_ptr next; for (auto &c : target->child_nodes()) { if (c->name == node_name) { if (c->unit_address == node_address) { - next = c.get(); + next = c; break; } else @@ -1478,8 +1509,8 @@ device_tree::resolve_cross_references(uint32_t &phandle) bool device_tree::garbage_collect_marked_nodes() { - std::unordered_set previously_referenced_nodes; - std::unordered_set newly_referenced_nodes; + std::unordered_set previously_referenced_nodes; + std::unordered_set newly_referenced_nodes; auto mark_referenced_nodes_used = [&](node &n) { @@ -1489,7 +1520,7 @@ device_tree::garbage_collect_marked_nodes() { if (v.is_phandle()) { - node *nx = node_names[v.string_data]; + node_ptr nx = node_names[v.string_data]; if (nx == nullptr) { // Try it again, but as a path @@ -1534,8 +1565,9 @@ device_tree::garbage_collect_marked_nodes() while (!newly_referenced_nodes.empty()) { - previously_referenced_nodes = std::move(newly_referenced_nodes); - for (auto *n : previously_referenced_nodes) + previously_referenced_nodes = newly_referenced_nodes; + newly_referenced_nodes.clear(); + for (auto &n : previously_referenced_nodes) { mark_referenced_nodes_used(*n); } @@ -1617,7 +1649,38 @@ device_tree::parse_file(text_input_buffer &input, while (valid && !input.finished()) { node_ptr n; - if (input.consume('/')) + if (input.consume("/delete-node/")) + { + // Top-level /delete-node/ directives refer to references that must + // be deleted later. + input.next_token(); + auto expect = [&](auto token, const char *msg) + { + if (!input.consume(token)) + { + input.parse_error(msg); + valid = false; + } + input.next_token(); + return valid; + }; + if (expect('&', "Expected reference after top-level /delete-node/.")) + { + string ref = input.parse_node_name(); + if (ref == string()) + { + input.parse_error("Expected label name for top-level /delete-node/."); + valid = false; + } + else + { + deletions.push_back(std::move(ref)); + } + expect(';', "Missing semicolon."); + } + continue; + } + else if (input.consume('/')) { input.next_token(); n = node::parse(input, *this, string(), string_set(), string(), &defines); @@ -1732,7 +1795,7 @@ device_tree::write(int fd) strings_writer.write_to_file(fd); } -node* +node_ptr device_tree::referenced_node(property_value &v) { if (v.is_phandle()) @@ -2032,6 +2095,19 @@ device_tree::parse_dts(const string &fn, FILE *depfile) } } collect_names(); + for (auto &ref : deletions) + { + auto parent = node_name_parents[ref]; + auto node = node_names[ref]; + if (!parent) + { + fprintf(stderr, "Top-level /delete-node/ directive refers to label %s, which is not found.\n", ref.c_str()); + } + else + { + parent->delete_children_if([&](node_ptr &child) { return child == node; }); + } + } // Return value indicates whether we've dirtied the tree or not and need to // recollect names if (garbage_collect && garbage_collect_marked_nodes()) @@ -2127,7 +2203,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) { continue; } - node *n = local_fixups.get(); + node_ptr n = local_fixups; for (auto &p : i.path) { // Skip the implicit root @@ -2142,7 +2218,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) { if (c->unit_address == p.second) { - n = c.get(); + n = c; found = true; break; } @@ -2157,7 +2233,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) path += p.second; } n->add_child(node::create_special_node(path, symbols)); - n = (--n->child_end())->get(); + n = *(--(n->child_end())); } } assert(n); diff --git a/usr.bin/dtc/fdt.hh b/usr.bin/dtc/fdt.hh index 86c9ff153b80..fad9609d40bb 100644 --- a/usr.bin/dtc/fdt.hh +++ b/usr.bin/dtc/fdt.hh @@ -71,7 +71,7 @@ typedef std::shared_ptr property_ptr; /** * Owning pointer to a node. */ -typedef std::unique_ptr node_ptr; +typedef std::shared_ptr node_ptr; /** * Map from macros to property pointers. */ @@ -663,7 +663,7 @@ class node /** * Deletes any children from this node. */ - inline void delete_children_if(bool (*predicate)(node_ptr &)) + inline void delete_children_if(std::function predicate) { children.erase(std::remove_if(children.begin(), children.end(), predicate), children.end()); } @@ -761,7 +761,11 @@ class device_tree * Mapping from names to nodes. Only unambiguous names are recorded, * duplicate names are stored as (node*)-1. */ - std::unordered_map node_names; + std::unordered_map node_names; + /** + * Mapping from names to the nodes that contain them. + */ + std::unordered_map node_name_parents; /** * A map from labels to node paths. When resolving cross references, * we look up referenced nodes in this and replace the cross reference @@ -779,6 +783,10 @@ class device_tree * These should be expanded to the full path of their targets. */ std::vector cross_references; + /** + * Labels collected from top-level /delete-node/ directives. + */ + std::vector deletions; /** * The location of something requiring a fixup entry. */ @@ -827,7 +835,7 @@ class device_tree * find phandles that were provided by the user explicitly when we are * doing checking. */ - std::unordered_map used_phandles; + std::unordered_map used_phandles; /** * Paths to search for include files. This contains a set of * nul-terminated strings, which are not owned by this class and so @@ -864,19 +872,19 @@ class device_tree * used in resolving cross references. Also collects phandle * properties that have been explicitly added. */ - void collect_names_recursive(node_ptr &n, node_path &path); + void collect_names_recursive(node_ptr parent, node_ptr n, node_path &path); /** * Assign a phandle property to a single node. The next parameter * holds the phandle to be assigned, and will be incremented upon * assignment. */ - property_ptr assign_phandle(node *n, uint32_t &next); + property_ptr assign_phandle(node_ptr n, uint32_t &next); /** * Assign phandle properties to all nodes that have been referenced and * require one. This method will recursively visit the tree starting at * the node that it is passed. */ - void assign_phandles(node_ptr &n, uint32_t &next); + void assign_phandles(node_ptr n, uint32_t &next); /** * Calls the recursive version of this method on every root node. */ @@ -925,7 +933,7 @@ class device_tree * is in source form, then we have a string that we can use to index * the cross_references array and so we can just look that up. */ - node *referenced_node(property_value &v); + node_ptr referenced_node(property_value &v); /** * Writes this FDT as a DTB to the specified output. */ From nobody Tue Sep 26 17:32:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw6J93zqKz4vRGB; Tue, 26 Sep 2023 17:32:25 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6J93T9Tz3CSt; Tue, 26 Sep 2023 17:32:25 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695749545; 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=smxkvWDf2085u1m1VJ3uB0LN6Y1Xymi33lQTAInKgf8=; b=NRHlww3AxpDVZaUcxzcHCAv4phNSs3krqN3jXapmu8ripxv3hjExyH14nLM0D50j5frlpJ NelGw3sdJ63Ktz3rQ0Ih76mRNer8CqTb2q4S+OCqN9nsp3RcwAas9E+DEkIa01uBx2BrrZ Jm9h3R2ATeRXgcDnk2DpuwTmVEopXNoUGdZmtsGA3YxUTiQSiAXC5IgIJKSerOxMLfLP1w 9G8NfK3lVATnLrQj9LR3RARSu5z4gSbFubw/rMETKi8O62DWc24975SgArMCQ8960PXEj8 t77ByVImw03zIF1DjgDGTf42Jv4552wHSg4fc0xI6PGmjMozjDhfr/hkobvCGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695749545; a=rsa-sha256; cv=none; b=aM7SfKWEzYVWeICFe/y21Z+Io3S0L1OcKypAWcmVMGdlF2A8w8KLcd3TbwugXok9+k0E4G bYCYZEWL46TKNJQ4/hDUxvG/Vqqez/hHWL4tRXDXZAyZosNWAYGFlQq8Xl7kXYtyN19vh3 SMkNrwXlf+aCKO9x99U05H1gDiqajk+biS+ZraETWPblODlfXGO883281rxHriev0jIHV1 OmdBuHd23fN8ZIGzfTkyeoUuOSrhsTu7f5vBD5dlgRbBi2pVsbpdaZ/OGZKaweomUBjO8P 7M6i11GhDsJvUFWZgHJnLqaxLGybqPf84KdeDgeDY0g2xT52dTHpSHgTr8aspA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695749545; 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=smxkvWDf2085u1m1VJ3uB0LN6Y1Xymi33lQTAInKgf8=; b=tYw5bKLs+7W02OQbubeRfcoqGgBf/DToDFwcJpnG6tyQKrWyMK0GXi15ObQXWWC6TXqyTn BAAvszYyuMlOtjj1jSm7h0EoASbMKTxmmGHK0UodzwS60e9z5DSidSX9SLi+21hB2S5z78 ZZi9mbj7o8RBBW3nj2Z/hoqSrse7BQ+eKtJ0EPHFpZ1sIYpagZrUu/XcBMmewIYSiNcoN1 Hike2vIYDc3PJMIJvr+rU+UJrMMP56HHjdmam2tn6ZZkhYuSbXfGNAiLkChBQbbtvb7iub 5ZZTf4J1JQ6bqOiX492CdAmgia+LCvPZU16LpCIvH96y8dNfMvTe4IFTpm4SGQ== Received: from [192.168.1.12] (c-98-248-120-44.hsd1.ca.comcast.net [98.248.120.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rw6J85SG4zn8l; Tue, 26 Sep 2023 17:32:24 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.77.23091703 Date: Tue, 26 Sep 2023 10:32:19 -0700 Subject: Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag From: Ravi Pokala To: Warner Losh , Mateusz Guzik CC: src-committers , "" , "" Message-ID: <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> Thread-Topic: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> In-Reply-To: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3778569145_1222604024" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3778569145_1222604024 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable In that case, an updated comment seems appropriate, so it=E2=80=99s not removed a= gain. =20 -Ravi (rpokala@) =20 =20 From: on behalf of Warner Losh Date: Tuesday, September 26, 2023 at 07:51 To: Mateusz Guzik Cc: src-committers , "" , "" Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag =20 Can you put this back? It is still useful. I have automated scripts that lo= ok for this pattern to find the version of a core dump. There are no other w= ays that are as reliable to find this data. Some other heuristics exist, but= my experience with snagging data from maybe a thousand core dumps from $WOR= K's network found issues in all the alternatives. It's why I didn't whack it= already. Even though the text says SCCS which is prehistory for this projec= t, it's still in use today. =20 Warner =20 On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7= c5fd417723 commit e6dc6a27230f836a131118326731b7c5fd417723 Author: Mateusz Guzik AuthorDate: 2023-09-26 14:36:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-26 14:36:51 +0000 sys/conf/newvers.sh: whack sccs tag In the same spirit as removing cvs $FreeBSD$ tags. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/conf/newvers.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 73fd6857d307..18b1817ca287 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,11 +311,9 @@ fi vers_content_new=3D$(cat << EOF $COPYRIGHT -#define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D SCCSSTR; char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D VERSTR; char compiler_version[] =3D "${compiler_v}"; char ostype[] =3D "${TYPE}"; --B_3778569145_1222604024 Content-type: text/html; charset="UTF-8" Content-transfer-encoding: quoted-printable

In that case, an updated comment seems appropri= ate, so it=E2=80=99s not removed again.

 

=

-Ravi (= rpokala@)

 

 

From: <owner-src-committers@freebsd.org> on behalf of Warner Losh <imp@b= sdimp.com>
Date: Tuesday, September 26, 2023 at 07:51
To:= Mateusz Guzik <mjg@freebsd.org>
Cc: src-committers <= src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>= ;" <dev-commits-src-all@freebsd.org>, "<dev-commits-src-m= ain@freebsd.org>" <dev-commits-src-main@freebsd.org>
Sub= ject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag=

 

Can you put this back? It is still useful. I have automated scripts that lo= ok for this pattern to find the version of a core dump. There are no other w= ays that are as reliable to find this data. Some other heuristics exist, but= my experience with snagging data from maybe a thousand core dumps from $WOR= K's network found issues in all the alternatives. It's why I didn't whack it= already. Even though the text says SCCS which is prehistory for this projec= t, it's still in use today.

 

Warner

 

On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik <mjg@freebsd.org> wrote:

The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a= 131118326731b7c5fd417723

commit e6dc6a27230f836a131118326731b7c5f= d417723
Author:     Mateusz Guzik <mjg@FreeBSD.org><= br>AuthorDate: 2023-09-26 14:36:51 +0000
Commit:     Mateu= sz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-09-26 14:36:51 +0000
    sys/conf/newvers.sh: whack sccs tag

    = In the same spirit as removing cvs $FreeBSD$ tags.

    Spon= sored by:   Rubicon Communications, LLC ("Netgate")
-= --
 sys/conf/newvers.sh | 2 --
 1 file changed, 2 deletions(= -)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 73= fd6857d307..18b1817ca287 100644
--- a/sys/conf/newvers.sh
+++ b/sys/co= nf/newvers.sh
@@ -311,11 +311,9 @@ fi

 vers_content_new=3D$(cat= << EOF
 $COPYRIGHT
-#define SCCSSTR "@(#)${VERINFO}&q= uot;
 #define VERSTR "${VERSTR}"
 #define RELSTR &= quot;${RELEASE}"

-char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SC= CSSTR) : 128] =3D SCCSSTR;
 char version[sizeof(VERSTR) > 256 ? siz= eof(VERSTR) : 256] =3D VERSTR;
 char compiler_version[] =3D "${comp= iler_v}";
 char ostype[] =3D "${TYPE}";

<= /blockquote>
--B_3778569145_1222604024-- From nobody Tue Sep 26 17:34:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw6LM5L0kz4vR5l for ; Tue, 26 Sep 2023 17:34:19 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 4Rw6LM3gqvz3DF1 for ; Tue, 26 Sep 2023 17:34:19 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-405361bb949so100859755e9.1 for ; Tue, 26 Sep 2023 10:34:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695749658; x=1696354458; 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=p3MMkurwZUPsT35iXJhOJ5ZCgMsiUjZZRKSH44tfcVc=; b=ERnQh09UtXacr/A8b48BUdkYTgY3G34siJaGfU5TZLZRj9PjJeJw25YNs1zmyFU2xe OD3UBi0Hfnd4f8+4AxEm/1lqxQ+GUDbthNSN2e03MCn/87G1nCP+M+q5rpEi4wr1gIHR n3qo8ja26zHmEBusHpHnNDfvt3tChMEr7vqF6S0OHcP0ZjBKi3Fqv810w3f3QP8mI2Q+ KT3bLqBKD8sgY3kSuVb6N5jq531sLWprQaF8VXpH2B/Ap5OhN0leHwWeIPo7vaH/4nBu nVhewnuVjcf/4hTLh5JsWDC1n0ushhdh5D0uzGaZeCDAhS5j8uE6nMBnVoK+ZP2bHcGR WmcQ== X-Gm-Message-State: AOJu0YxcVUxXkPUwNhSHstsp1FRfn7okYXf1LUe6F7Gv1tavF7/hSOIy gUZQrgswGeh9FpHhxoZZjtXAgQ== X-Google-Smtp-Source: AGHT+IHxiq6OjWA+BTKe/d2h/y8ZLw6B1FCy+wm+IEoEGWR6whfjDy75HtdKz0XEeT+ySdF/Cr+qaw== X-Received: by 2002:a05:600c:2294:b0:401:c338:ab96 with SMTP id 20-20020a05600c229400b00401c338ab96mr9088151wmf.34.1695749657394; Tue, 26 Sep 2023 10:34:17 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003fc04d13242sm18726390wmi.0.2023.09.26.10.34.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2023 10:34:17 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag From: Jessica Clarke In-Reply-To: <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> Date: Tue, 26 Sep 2023 18:34:06 +0100 Cc: Warner Losh , Mateusz Guzik , src-committers , "" , "" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> To: Ravi Pokala X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Rw6LM3gqvz3DF1 On 26 Sep 2023, at 18:32, Ravi Pokala wrote: >=20 > In that case, an updated comment seems appropriate, so it=E2=80=99s = not removed again. https://reviews.freebsd.org/D41984 > -Ravi (rpokala@) >=20 > From: on behalf of Warner Losh = > Date: Tuesday, September 26, 2023 at 07:51 > To: Mateusz Guzik > Cc: src-committers , = "" , = "" > Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack = sccs tag >=20 > Can you put this back? It is still useful. I have automated scripts = that look for this pattern to find the version of a core dump. There are = no other ways that are as reliable to find this data. Some other = heuristics exist, but my experience with snagging data from maybe a = thousand core dumps from $WORK's network found issues in all the = alternatives. It's why I didn't whack it already. Even though the text = says SCCS which is prehistory for this project, it's still in use today. > Warner >=20 > On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: >>=20 >>=20 >> The branch main has been updated by mjg: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c5= fd417723 >>=20 >> commit e6dc6a27230f836a131118326731b7c5fd417723 >> Author: Mateusz Guzik >> AuthorDate: 2023-09-26 14:36:51 +0000 >> Commit: Mateusz Guzik >> CommitDate: 2023-09-26 14:36:51 +0000 >>=20 >> sys/conf/newvers.sh: whack sccs tag >>=20 >> In the same spirit as removing cvs $FreeBSD$ tags. >>=20 >> Sponsored by: Rubicon Communications, LLC ("Netgate") >> --- >> sys/conf/newvers.sh | 2 -- >> 1 file changed, 2 deletions(-) >>=20 >> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh >> index 73fd6857d307..18b1817ca287 100644 >> --- a/sys/conf/newvers.sh >> +++ b/sys/conf/newvers.sh >> @@ -311,11 +311,9 @@ fi >>=20 >> vers_content_new=3D$(cat << EOF >> $COPYRIGHT >> -#define SCCSSTR "@(#)${VERINFO}" >> #define VERSTR "${VERSTR}" >> #define RELSTR "${RELEASE}" >>=20 >> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D = SCCSSTR; >> char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D = VERSTR; >> char compiler_version[] =3D "${compiler_v}"; >> char ostype[] =3D "${TYPE}"; From nobody Tue Sep 26 17:41:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw6W71Zn5z4vRtK; Tue, 26 Sep 2023 17:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6W71R3Cz3Ddc; Tue, 26 Sep 2023 17:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695750115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlN0WtXWgZMOaio8pujkyfIhmuH3GUTI0ku6GrjrpgA=; b=BrSS3jzVH6XJsvNnFgSd0W3JqlNnDbM8x0mjGnVs6Of9ul1Y2ApyTcmDu4kZnt5/6USgeu pQjw8Q/JutBQXIRHBa9toerKp8zK5OSsIHZkGxZdrMuYBvS+6LIKguts7wSnNKMd1tFGtS 3hj7KhiM6sG4pXRi0qTA+XmYrI47BT89lA5Q+rnvSN+qDgtOaByRbUfbSdRBx4rZ5UsKcx eqEF8Jwk7oF89TZIPHrL6qduHQKXL8GVZ+v0NAlL8OgGtVxx9v2y7QfBWzabaGHqk5u9IN 5epK4q6JGBYHN8124p4Es5qFQtgmAOZZFpTVnoddzhS1iZUWyeeH8rSJgbY/+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695750115; a=rsa-sha256; cv=none; b=ewj5Q+p9tmXkYetbGrRtaJ/3iZuWNGau+7J5E9otJJYLpM3aVHOOQOuZ0F5Gca6QPs3kB4 kuGmr4GpNmNyhWFGjxWR3487lp38P8WAtSoJLEgaihmpR/vsuB+00yo9HqLm8hYdaLsZJZ bMmgEX6XKNqOeVi7QXaXnkAnIXGHKQ/bWbLe1uIX+3tJDrIdbGtrzD5xTRlXW3swO8aS61 Ew208le4itUvdotrN93QW1MhcMaB770svJrR/RKHorjFnIIz9HqmHTv2iFXFjUgeoSHrG9 6uFHNxts1dGpw/ReF2KdgCck77FmGADzmqtqKJumi0Zbs5b3DyfSwufZDmp6qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695750115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlN0WtXWgZMOaio8pujkyfIhmuH3GUTI0ku6GrjrpgA=; b=mJDyvjA5qoiFlmMa+obDqPZLoRIWoDSSL7KtLW+TM/Sj1aJSRc/7GWqkKZgDQ/eqSjo/8T ZJx0azvNBE4UShEywNObyaiWi9kpgWrjOdd2ca7b8Q1m6Va9Vwgyw16cqBnYPbLhjKjbHj UaebM0tboestSLkVEgHZNj1+GaZvd+Fl/Bh2Kdp9/P5yDdtnylnWfBN9uaJWM2Dd/p/bn0 x21bAMYtp5Asi2a2x3tL/ZHxxijfULef/kUH+SkEo4v/ruLwcL5fBPqB6Ma5OnhEEn+KKL nIwnVrk58TUOgFUZ6kwvCCa49AjR6SflUI0uxbFZhYsNDB05NLsOjzxZxRdppA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw6W70XNlz15R9; Tue, 26 Sep 2023 17:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QHftYu016416; Tue, 26 Sep 2023 17:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QHftMX016413; Tue, 26 Sep 2023 17:41:55 GMT (envelope-from git) Date: Tue, 26 Sep 2023 17:41:55 GMT Message-Id: <202309261741.38QHftMX016413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 902ed64fecbe - main - i386 pmap: Adapt recent amd64/arm64 superpage improvements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 902ed64fecbe078e1cdd527b97af3958b413da11 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=902ed64fecbe078e1cdd527b97af3958b413da11 commit 902ed64fecbe078e1cdd527b97af3958b413da11 Author: Alan Cox AuthorDate: 2023-09-24 18:21:36 +0000 Commit: Alan Cox CommitDate: 2023-09-26 17:41:20 +0000 i386 pmap: Adapt recent amd64/arm64 superpage improvements Don't recompute mpte during promotion. Optimize MADV_WILLNEED on existing superpages. Standardize promotion conditions across amd64, arm64, and i386. Stop requiring the accessed bit for superpage promotion. Tidy up pmap_promote_pde() calls. Retire PMAP_INLINE. It's no longer used. Note: Some of these changes are a prerequisite to fixing a panic that arises when attempting to create a wired superpage mapping by pmap_enter(psind=1) (as opposed to promotion). Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41944 --- sys/i386/i386/pmap.c | 200 ++++++++++++++++++++++++++++++++---------------- sys/i386/include/pmap.h | 2 +- 2 files changed, 137 insertions(+), 65 deletions(-) diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 4198849b1a5a..2d19fc51dd53 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -159,16 +159,6 @@ #endif #include -#if !defined(DIAGNOSTIC) -#ifdef __GNUC_GNU_INLINE__ -#define PMAP_INLINE __attribute__((__gnu_inline__)) inline -#else -#define PMAP_INLINE extern inline -#endif -#else -#define PMAP_INLINE -#endif - #ifdef PV_STATS #define PV_STAT(x) do { x ; } while (0) #else @@ -311,13 +301,14 @@ static int pmap_pvh_wired_mappings(struct md_page *pvh, int count); static void pmap_abort_ptp(pmap_t pmap, vm_offset_t va, vm_page_t mpte); static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); -static bool pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, +static int pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot); static int pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, vm_page_t m); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); -static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted); +static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted, + bool allpte_PG_A_set); static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); @@ -327,7 +318,8 @@ static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); #if VM_NRESERVLEVEL > 0 -static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); +static bool pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, + vm_page_t mpte); #endif static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, vm_prot_t prot); @@ -993,7 +985,7 @@ __CONCAT(PMTYPE, init)(void) */ if (pseflag != 0 && KERNBASE <= i << PDRSHIFT && i << PDRSHIFT < KERNend && - pmap_insert_pt_page(kernel_pmap, mpte, true)) + pmap_insert_pt_page(kernel_pmap, mpte, true, true)) panic("pmap_init: pmap_insert_pt_page failed"); } PMAP_UNLOCK(kernel_pmap); @@ -1928,14 +1920,26 @@ pmap_add_delayed_free_list(vm_page_t m, struct spglist *free, * for mapping a distinct range of virtual addresses. The pmap's collection is * ordered by this virtual address range. * - * If "promoted" is false, then the page table page "mpte" must be zero filled. + * If "promoted" is false, then the page table page "mpte" must be zero filled; + * "mpte"'s valid field will be set to 0. + * + * If "promoted" is true and "allpte_PG_A_set" is false, then "mpte" must + * contain valid mappings with identical attributes except for PG_A; "mpte"'s + * valid field will be set to 1. + * + * If "promoted" and "allpte_PG_A_set" are both true, then "mpte" must contain + * valid mappings with identical attributes including PG_A; "mpte"'s valid + * field will be set to VM_PAGE_BITS_ALL. */ static __inline int -pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted) +pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted, + bool allpte_PG_A_set) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mpte->valid = promoted ? VM_PAGE_BITS_ALL : 0; + KASSERT(promoted || !allpte_PG_A_set, + ("a zero-filled PTP can't have PG_A set in every PTE")); + mpte->valid = promoted ? (allpte_PG_A_set ? VM_PAGE_BITS_ALL : 1) : 0; return (vm_radix_insert(&pmap->pm_root, mpte)); } @@ -2843,10 +2847,11 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) newpte ^= PG_PDE_PAT | PG_PTE_PAT; /* - * If the page table page is not leftover from an earlier promotion, - * initialize it. + * If the PTP is not leftover from an earlier promotion or it does not + * have PG_A set in every PTE, then fill it. The new PTEs will all + * have PG_A set. */ - if (vm_page_none_valid(mpte)) + if (!vm_page_all_valid(mpte)) pmap_fill_ptp(firstpte, newpte); KASSERT((*firstpte & PG_FRAME) == (newpte & PG_FRAME), @@ -2854,8 +2859,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) " addresses")); /* - * If the mapping has changed attributes, update the page table - * entries. + * If the mapping has changed attributes, update the PTEs. */ if ((*firstpte & PG_PTE_PROMOTE) != (newpte & PG_PTE_PROMOTE)) pmap_fill_ptp(firstpte, newpte); @@ -2985,7 +2989,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, } else { mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { - KASSERT(vm_page_all_valid(mpte), + KASSERT(vm_page_any_valid(mpte), ("pmap_remove_pde: pte page not promoted")); pmap->pm_stats.resident_count--; KASSERT(mpte->ref_count == NPTEPG, @@ -3469,38 +3473,56 @@ retry: * pmap_clear_ptes() and pmap_ts_referenced() only read the PDE from the kernel * pmap. */ -static void -pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) +static bool +pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, vm_page_t mpte) { pd_entry_t newpde; - pt_entry_t *firstpte, oldpte, pa, *pte; + pt_entry_t allpte_PG_A, *firstpte, oldpte, pa, *pte; #ifdef KTR vm_offset_t oldpteva; #endif - vm_page_t mpte; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + if (!pg_ps_enabled) + return (false); /* * Examine the first PTE in the specified PTP. Abort if this PTE is - * either invalid, unused, or does not map the first 4KB physical page + * either invalid or does not map the first 4KB physical page * within a 2- or 4MB page. */ firstpte = pmap_pte_quick(pmap, trunc_4mpage(va)); setpde: newpde = *firstpte; - if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V)) { + if ((newpde & ((PG_FRAME & PDRMASK) | PG_V)) != PG_V) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } if ((*firstpte & PG_MANAGED) != 0 && pmap == kernel_pmap) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } + + /* + * Both here and in the below "for" loop, to allow for repromotion + * after MADV_FREE, conditionally write protect a clean PTE before + * possibly aborting the promotion due to other PTE attributes. Why? + * Suppose that MADV_FREE is applied to a part of a superpage, the + * address range [S, E). pmap_advise() will demote the superpage + * mapping, destroy the 4KB page mapping at the end of [S, E), and + * clear PG_M and PG_A in the PTEs for the rest of [S, E). Later, + * imagine that the memory in [S, E) is recycled, but the last 4KB + * page in [S, E) is not the last to be rewritten, or simply accessed. + * In other words, there is still a 4KB page in [S, E), call it P, + * that is writeable but PG_M and PG_A are clear in P's PTE. Unless + * we write protect P before aborting the promotion, if and when P is + * finally rewritten, there won't be a page fault to trigger + * repromotion. + */ if ((newpde & (PG_M | PG_RW)) == PG_RW) { /* * When PG_M is already clear, PG_RW can be cleared without @@ -3510,6 +3532,8 @@ setpde: ~PG_RW)) goto setpde; newpde &= ~PG_RW; + CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#lx" + " in pmap %p", va & ~PDRMASK, pmap); } /* @@ -3517,15 +3541,16 @@ setpde: * PTE maps an unexpected 4KB physical page or does not have identical * characteristics to the first PTE. */ - pa = (newpde & (PG_PS_FRAME | PG_A | PG_V)) + NBPDR - PAGE_SIZE; + allpte_PG_A = newpde & PG_A; + pa = (newpde & (PG_PS_FRAME | PG_V)) + NBPDR - PAGE_SIZE; for (pte = firstpte + NPTEPG - 1; pte > firstpte; pte--) { setpte: oldpte = *pte; - if ((oldpte & (PG_FRAME | PG_A | PG_V)) != pa) { + if ((oldpte & (PG_FRAME | PG_V)) != pa) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } if ((oldpte & (PG_M | PG_RW)) == PG_RW) { /* @@ -3547,28 +3572,39 @@ setpte: pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } + allpte_PG_A &= oldpte; pa -= PAGE_SIZE; } /* - * Save the page table page in its current state until the PDE - * mapping the superpage is demoted by pmap_demote_pde() or - * destroyed by pmap_remove_pde(). + * Unless all PTEs have PG_A set, clear it from the superpage mapping, + * so that promotions triggered by speculative mappings, such as + * pmap_enter_quick(), don't automatically mark the underlying pages + * as referenced. */ - mpte = PHYS_TO_VM_PAGE(*pde & PG_FRAME); + newpde &= ~PG_A | allpte_PG_A; + + /* + * Save the PTP in its current state until the PDE mapping the + * superpage is demoted by pmap_demote_pde() or destroyed by + * pmap_remove_pde(). If PG_A is not set in every PTE, then request + * that the PTP be refilled on demotion. + */ + if (mpte == NULL) + mpte = PHYS_TO_VM_PAGE(*pde & PG_FRAME); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_promote_pde: page table page is out of range")); KASSERT(mpte->pindex == va >> PDRSHIFT, ("pmap_promote_pde: page table page's pindex is wrong")); - if (pmap_insert_pt_page(pmap, mpte, true)) { + if (pmap_insert_pt_page(pmap, mpte, true, allpte_PG_A != 0)) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x in pmap %p", va, pmap); - return; + return (false); } /* @@ -3596,6 +3632,7 @@ setpte: pmap_pde_promotions++; CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#x" " in pmap %p", va, pmap); + return (true); } #endif /* VM_NRESERVLEVEL > 0 */ @@ -3859,9 +3896,9 @@ unchanged: * populated, then attempt promotion. */ if ((mpte == NULL || mpte->ref_count == NPTEPG) && - pg_ps_enabled && (m->flags & PG_FICTITIOUS) == 0 && + (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) - pmap_promote_pde(pmap, pde, va); + (void)pmap_promote_pde(pmap, pde, va, mpte); #endif rv = KERN_SUCCESS; @@ -3874,11 +3911,11 @@ out: /* * Tries to create a read- and/or execute-only 2 or 4 MB page mapping. Returns - * true if successful. Returns false if (1) a mapping already exists at the - * specified virtual address or (2) a PV entry cannot be allocated without - * reclaiming another PV entry. + * KERN_SUCCESS if the mapping was created. Otherwise, returns an error + * value. See pmap_enter_pde() for the possible error values when "no sleep", + * "no replace", and "no reclaim" are specified. */ -static bool +static int pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { pd_entry_t newpde; @@ -3895,8 +3932,7 @@ pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) if (pmap != kernel_pmap) newpde |= PG_U; return (pmap_enter_pde(pmap, va, newpde, PMAP_ENTER_NOSLEEP | - PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, NULL) == - KERN_SUCCESS); + PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, NULL)); } /* @@ -3919,11 +3955,14 @@ pmap_every_pte_zero(vm_offset_t va) /* * Tries to create the specified 2 or 4 MB page mapping. Returns KERN_SUCCESS - * if the mapping was created, and either KERN_FAILURE or - * KERN_RESOURCE_SHORTAGE otherwise. Returns KERN_FAILURE if - * PMAP_ENTER_NOREPLACE was specified and a mapping already exists at the - * specified virtual address. Returns KERN_RESOURCE_SHORTAGE if - * PMAP_ENTER_NORECLAIM was specified and a PV entry allocation failed. + * if the mapping was created, and one of KERN_FAILURE, KERN_NO_SPACE, + * or KERN_RESOURCE_SHORTAGE otherwise. Returns KERN_FAILURE if + * PMAP_ENTER_NOREPLACE was specified and a 4 KB page mapping already exists + * within the 2 or 4 MB virtual address range starting at the specified virtual + * address. Returns KERN_NO_SPACE if PMAP_ENTER_NOREPLACE was specified and a + * 2 or 4 MB page mapping already exists at the specified virtual address. + * Returns KERN_RESOURCE_SHORTAGE if PMAP_ENTER_NORECLAIM was specified and a + * PV entry allocation failed. * * The parameter "m" is only used when creating a managed, writeable mapping. */ @@ -3944,12 +3983,19 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, pde = pmap_pde(pmap, va); oldpde = *pde; if ((oldpde & PG_V) != 0) { - if ((flags & PMAP_ENTER_NOREPLACE) != 0 && (pmap != - kernel_pmap || (oldpde & PG_PS) != 0 || - !pmap_every_pte_zero(va))) { - CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" - " in pmap %p", va, pmap); - return (KERN_FAILURE); + if ((flags & PMAP_ENTER_NOREPLACE) != 0) { + if ((oldpde & PG_PS) != 0) { + CTR2(KTR_PMAP, + "pmap_enter_pde: no space for va %#lx" + " in pmap %p", va, pmap); + return (KERN_NO_SPACE); + } else if (pmap != kernel_pmap || + !pmap_every_pte_zero(va)) { + CTR2(KTR_PMAP, + "pmap_enter_pde: failure for va %#lx" + " in pmap %p", va, pmap); + return (KERN_FAILURE); + } } /* Break the existing mapping(s). */ SLIST_INIT(&free); @@ -3978,7 +4024,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, * leave the kernel page table page zero filled. */ mt = PHYS_TO_VM_PAGE(*pde & PG_FRAME); - if (pmap_insert_pt_page(pmap, mt, false)) + if (pmap_insert_pt_page(pmap, mt, false, false)) panic("pmap_enter_pde: trie insert failed"); } } @@ -4035,6 +4081,7 @@ __CONCAT(PMTYPE, enter_object)(pmap_t pmap, vm_offset_t start, vm_offset_t end, vm_offset_t va; vm_page_t m, mpte; vm_pindex_t diff, psize; + int rv; VM_OBJECT_ASSERT_LOCKED(m_start->object); @@ -4047,7 +4094,8 @@ __CONCAT(PMTYPE, enter_object)(pmap_t pmap, vm_offset_t start, vm_offset_t end, va = start + ptoa(diff); if ((va & PDRMASK) == 0 && va + NBPDR <= end && m->psind == 1 && pg_ps_enabled && - pmap_enter_4mpage(pmap, va, m, prot)) + ((rv = pmap_enter_4mpage(pmap, va, m, prot)) == + KERN_SUCCESS || rv == KERN_NO_SPACE)) m = &m[NBPDR / PAGE_SIZE - 1]; else mpte = pmap_enter_quick_locked(pmap, va, m, prot, @@ -4084,12 +4132,14 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte) { pt_entry_t newpte, *pte; + pd_entry_t *pde; KASSERT(pmap != kernel_pmap || !VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); + pde = NULL; /* * In the case that a page table page is not @@ -4109,7 +4159,8 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, /* * Get the page directory entry */ - ptepa = pmap->pm_pdir[ptepindex]; + pde = &pmap->pm_pdir[ptepindex]; + ptepa = *pde; /* * If the page table page is mapped, we just increment @@ -4167,6 +4218,27 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, if (pmap != kernel_pmap) newpte |= PG_U; pte_store_zero(pte, newpte); + +#if VM_NRESERVLEVEL > 0 + /* + * If both the PTP and the reservation are fully populated, then + * attempt promotion. + */ + if ((mpte == NULL || mpte->ref_count == NPTEPG) && + (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) { + if (pde == NULL) + pde = pmap_pde(pmap, va); + + /* + * If promotion succeeds, then the next call to this function + * should not be given the unmapped PTP as a hint. + */ + if (pmap_promote_pde(pmap, pde, va, mpte)) + mpte = NULL; + } +#endif + sched_unpin(); return (mpte); } @@ -4836,7 +4908,7 @@ __CONCAT(PMTYPE, remove_pages)(pmap_t pmap) } mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { - KASSERT(vm_page_all_valid(mpte), + KASSERT(vm_page_any_valid(mpte), ("pmap_remove_pages: pte page not promoted")); pmap->pm_stats.resident_count--; KASSERT(mpte->ref_count == NPTEPG, diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index daa1012da96d..48125b775619 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -83,7 +83,7 @@ * 4KB (PTE) page mappings have identical settings for the following fields: */ #define PG_PTE_PROMOTE (PG_MANAGED | PG_W | PG_G | PG_PTE_PAT | \ - PG_M | PG_A | PG_NC_PCD | PG_NC_PWT | PG_U | PG_RW | PG_V) + PG_M | PG_NC_PCD | PG_NC_PWT | PG_U | PG_RW | PG_V) /* * Page Protection Exception bits From nobody Tue Sep 26 17:55:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw6qc3FD6z4vSbX; Tue, 26 Sep 2023 17:56:12 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6qc0ZThz3FtW; Tue, 26 Sep 2023 17:56:12 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38QG8KaR013283; Tue, 26 Sep 2023 10:56:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : date : message-id; s=PPS1017; bh=NftQyA9z2DqPnExPtY9iVbqYyoBKlAmIr/GIZ7VcwzA=; b=KJ93EkEps/SmqXFK715uICNHCSxVK1RSr4CEbmZ1GQUbIGj/0gaN6P6/+6U7DwpvVLE0 WcJxDH15PPdSARUMimMrMQ/+4uemPnWAfm0YPRWQCdSNxasS3zdbpPP417qXiaCIgLQ1 QC7M6eefxYiRoRVfFFX8KcKsb2viRvqsJeFlJwbRP2wJL/2Xz0nWCLhBSsln6TLD6DTM VUsGj5ThJwAkdnlq8VYZT5RWMbMFJzbdw/uuecTDoe1Jju/XGhegajurv4G4lP3IRn9n TF54O2n2BMWznUDahBB004XRv8uLU+YaBzJ0fJzPChXtxW43xBzNsDz63Qly2wK12uEE Cw== Received: from co1pr02cu001.outbound.protection.outlook.com (mail-westus2azlp17011010.outbound.protection.outlook.com [40.93.10.10]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 3tbu941dcf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Sep 2023 10:56:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPhYJP8pcrOnvyoJUTUp79fTHwVsk+2ycVOHgpH5UFM0V7lwDHi9Ol1nNrwmqqG6NQ7SQaPpoOF2abwwXgz3uaYykcq7xJNMiHcVvM2suKdDzEtr8+YLSNqN8flrzSOvMIyaSGqsrBuvM7bQ49BOQkEDZlLoO6pAo+0PZ/2tcT1f0TOYWQSzGSWRZ+HMHgpS0yWQoYDKiTq7K0d2TLQSash5EhE2covOxApFJzQBBTfHZDp9qTiaocL+PhCDgNZlZ70LLaAu8rAodF/GMt5qPNTu5UOnWnkMBQ66HPm1SF4uaqqp8c18H5eBlHraWUC6X3A0V18JEohn/IrXQnekfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NftQyA9z2DqPnExPtY9iVbqYyoBKlAmIr/GIZ7VcwzA=; b=m315bcUbY4//I05jUz7ZMnE1pvLBXZdkAbhg/pewc37SLQjA3Hy8/cX/yrD+BhGQCQpsdTk/BbVK3ddpgk3CB1w0rTKcy6RjKIJKIMSuAuwDVeGBmCqFY9C6xidsG3gO2ULTe7oh4fEm1ft7dgGFzT69N/XSglsDAEjXr6g+382QGMmwgDxIQwXtUCS3g03maCX8EDvofAPwn+UKMgCzbLrXU3mmqUgnHc8i40vXsrXnG4WGKtq4MCqENiG99BVG7JSfEQ7QE9tWNpNKnntvQA0u1CfJIh4i/oWG9Rk+xrmMEHJXIhbOmmZi+aJm+Y0hlYRmAvo/ierNxZNZ90wL0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.242.14) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NftQyA9z2DqPnExPtY9iVbqYyoBKlAmIr/GIZ7VcwzA=; b=bmvQEfYw1Q23JCVZPZuyZXQ+WepbhXdW552YSmypvU7OpVQoqu9Vm+daKdhOfQ6sFXyAxo12qB+9sWLjmAbYrUfIUUVqfk5Zz191FDfPgeZIZ13ynu5nsh2svt31aowjlDsHbhLKCngllru7Qcmk1SUtvDekpnHL3dU7NdHb+6w= Received: from BN0PR04CA0046.namprd04.prod.outlook.com (2603:10b6:408:e8::21) by CY8PR05MB10081.namprd05.prod.outlook.com (2603:10b6:930:7f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Tue, 26 Sep 2023 17:56:04 +0000 Received: from BN8NAM12FT103.eop-nam12.prod.protection.outlook.com (2603:10b6:408:e8:cafe::fb) by BN0PR04CA0046.outlook.office365.com (2603:10b6:408:e8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Tue, 26 Sep 2023 17:56:04 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.242.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.242.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.242.14) by BN8NAM12FT103.mail.protection.outlook.com (10.13.183.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.19 via Frontend Transport; Tue, 26 Sep 2023 17:56:04 +0000 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 26 Sep 2023 12:56:04 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30 via Frontend Transport; Tue, 26 Sep 2023 12:56:04 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 38QHu3ws003998; Tue, 26 Sep 2023 10:56:03 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 3F9645D9BD; Tue, 26 Sep 2023 10:55:40 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 3F1F15D96A; Tue, 26 Sep 2023 10:55:40 -0700 (PDT) To: Warner Losh CC: Mateusz Guzik , src-committers , "" , "" , Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag In-Reply-To: References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> Comments: In-reply-to: Warner Losh message dated "Tue, 26 Sep 2023 08:51:45 -0600." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <95658.1695750940.1@kaos.jnpr.net> Date: Tue, 26 Sep 2023 10:55:40 -0700 Message-ID: <28.1695750940@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM12FT103:EE_|CY8PR05MB10081:EE_ X-MS-Office365-Filtering-Correlation-Id: cc548feb-903c-45fb-d731-08dbbeb9da75 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iksG9nV0mdTEKVw7fkapV/m8exNv9S+QG1vosSk5ight/WAAcejg4aWgo+Ra/MgPw4uiKftvtyJQRgS2n8XMbeak26bbPLW073AuzEe1aC4e3N6Z/a5YxIhw+GEg+AT+NcmGDPsTgaqNrVLyHuNoS9htJzLVQnEyKWfjSlZxbaq5UFflDnj9kdFQYGP6Byej4OT/RBEPi3RMOxJeQv36UGvmg4puNU/SsdEhoPkm4j+9F8nfD47tt4DijUai50DVaBSrCcq5/56ji7l0J6liQTsxl7A09FuRnWuFhT62SOJDHZ2Is9ddrPYIOjOdmg+OMr97rDKWnnzJbLWEMC9z7FcqBSdCujpK5siDq/i5UQJ/q6Y/4uPTUrVs2dcJMavbkzhW+ZQWo9YfZ41L4Y5yf9+Vr636whd9mbGGoAx/Wri/hW24bIXYI0FMbRG6S+H2opROB7snK2hKpyixZ913p0H3GmVpJfSHK7zzdlzdmZTLlq5ow4TjEkGNNiS5JRV9Qi58qz6MR2IZ/BiK9G9L/EQB9uDlxp7co204l1boJWPAmaBp8tr0VgfXLJl99+6yCfKeWvG8Tkz8vjRckuPlj4jNBhSStWFiDqrIgLJhAjRemGMgutftUHPwkKKZUfG41nWiEUcAkwUnhYQ04LSyzYCjjWdN6p0Y+8lnk+Vcpte+y6sIRILbqQ8aEz8iE0sDmLUfHJwc2a/DImDUVTx19Z7N4PVKEQCPKucgj3GNKlu0HnRvTpe5OVCxwbCu3xSfxM1h/PI4fXrXTyxjsPW7yAajWJ1JyHr8Hs/Ab2PSRouyNmWx38kWkBUg5SEP+SeK X-Forefront-Antispam-Report: CIP:66.129.242.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39860400002)(230922051799003)(1800799009)(186009)(82310400011)(451199024)(40470700004)(36840700001)(46966006)(26005)(478600001)(7126003)(107886003)(336012)(6266002)(356005)(86362001)(81166007)(82740400003)(47076005)(558084003)(5660300002)(36860700001)(55016003)(40460700003)(7696005)(9686003)(40480700001)(8676002)(4326008)(2906002)(54906003)(41300700001)(316002)(6916009)(70586007)(70206006)(8936002)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2023 17:56:04.5033 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc548feb-903c-45fb-d731-08dbbeb9da75 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.242.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT103.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR05MB10081 X-Proofpoint-ORIG-GUID: jIxfuUY3Y-tQu-_UAByrdXR7jlo2-lI- X-Proofpoint-GUID: jIxfuUY3Y-tQu-_UAByrdXR7jlo2-lI- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-26_13,2023-09-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 lowpriorityscore=0 spamscore=0 mlxlogscore=766 priorityscore=1501 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 malwarescore=0 impostorscore=0 clxscore=1011 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309260155 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US] X-Rspamd-Queue-Id: 4Rw6qc0ZThz3FtW Warner Losh wrote: > Can you put this back? It is still useful. I have automated scripts > that look for this pattern to find the version of a core dump. There We too depend on what(1) strings in kernel etc to automate tracking down the src that relates to core files. From nobody Tue Sep 26 17:56:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw6rX2w9Jz4vT4H for ; Tue, 26 Sep 2023 17:57:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 4Rw6rX0zhvz3GBX for ; Tue, 26 Sep 2023 17:57:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-52bd9ddb741so11043231a12.0 for ; Tue, 26 Sep 2023 10:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695751017; x=1696355817; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cBMuheZ1kGqRliI/ewBv0uIthpnoYVT4Hmk5fkEV+DE=; b=XnNmSkb5mAqslnC9H2ELvNwx62VUquRD9QmpoVpO0cVPi8mDXj3sZAEWhE7Gxewl0x dc7TWJvU7Fm2acFuVHpEG26HnW2hGiglmDJ7XdhAGVhLwfa8/NM4uE58aWwaAZlpz42U XBh8ogIvJiO2YWtzk57xntM1msF5fn6vOrUU/6AUwWWKCyZv1DcPSySnyGFyahLc7JYy XDX5xO49Kq6a64EGX5LZ2sifHl8/pURFqCSZ9WrXP5OHsgUgcTPIJgQR0pvz0hepj/VU QxvL6PBEPyqcIKK3rsAUbW6DRpQGm2TRR4t8AfmDlKz63xP31MDGttf0qVUTXs8QZHVe n3Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695751017; x=1696355817; 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=cBMuheZ1kGqRliI/ewBv0uIthpnoYVT4Hmk5fkEV+DE=; b=IX4+hsS6HM3Vi5LJc+1WLsE4h7V1vY/MgPcw+m8Kw/YV3wXTgqyO39sSFJZsq3jaBo 0Mnkac2tplnydEhoLEDRQCUFqperqlHAXi8qttwXt1K4REpyt+3MsPEvQV1vvHID1IuB /qNCixNCG0PnWpp+sqFWmHFTN+n0+b9pKYvQJCWkx+11djg4qy5TGaST3dB1QPV4ddSU 9HtFTZ6uib/hStnIdhU9Hw6QJqy72TT6+4jwe9WhNhdumjUBj6Iq7ZzlZIQ0rBtts2kE rhlLtdVKpldXCNY5DtnlzF8XYKyH22REOAOKGYU6NeR9En05bgmNyPqN7n0ZujPeoHCO 7fVg== X-Gm-Message-State: AOJu0YxFdJEHBMlybPGcsBTiCrVe6E4BsmCpr4K4T8j967+2dbZrfk8J TOT9jJSDOWZuZsbhWazNWn3+ZgYfK2KEtEMMQA5vKQ== X-Google-Smtp-Source: AGHT+IHFc6PB2i3ds44SaiLtQpUexUKr8x8S1VOLeXWs9RodDS3g76OPV39ZwsePcC6tK38qm1/0KrORfL5gYh7uTrY= X-Received: by 2002:a17:906:5a70:b0:9a2:185b:5375 with SMTP id my48-20020a1709065a7000b009a2185b5375mr9790120ejc.18.1695751017213; Tue, 26 Sep 2023 10:56:57 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> In-Reply-To: From: Warner Losh Date: Tue, 26 Sep 2023 11:56:45 -0600 Message-ID: Subject: Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag To: Jessica Clarke Cc: Ravi Pokala , Mateusz Guzik , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000002461d060646cd51" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Rw6rX0zhvz3GBX --00000000000002461d060646cd51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 26, 2023 at 11:34=E2=80=AFAM Jessica Clarke wrote: > On 26 Sep 2023, at 18:32, Ravi Pokala wrote: > > > > In that case, an updated comment seems appropriate, so it=E2=80=99s not= removed > again. > > https://reviews.freebsd.org/D41984 Jessica beat me to it. I have a back out and this commit queued up. I've just updated the comment. I'm not at all happy with it yet. The details are in the commit message, but the tl;dr is that while we do write the version to the end of the dumps, savecore doesn't preserve that when writing vmcore.X, so to identify what kernel a dump is from reliably, one must use the SCCS ID tags. Trying to find other strings to get this data is not as reliable. The real fix for this issue with the vmcore.X format is to write ELF core dumps, a feature vaguely planned for 15, where we can save this data in a way that can be extracted with scripts. Warner > > > -Ravi (rpokala@) > > > > From: on behalf of Warner Losh < > imp@bsdimp.com> > > Date: Tuesday, September 26, 2023 at 07:51 > > To: Mateusz Guzik > > Cc: src-committers , "< > dev-commits-src-all@freebsd.org>" , "< > dev-commits-src-main@freebsd.org>" > > Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs > tag > > > > Can you put this back? It is still useful. I have automated scripts > that look for this pattern to find the version of a core dump. There are = no > other ways that are as reliable to find this data. Some other heuristics > exist, but my experience with snagging data from maybe a thousand core > dumps from $WORK's network found issues in all the alternatives. It's why= I > didn't whack it already. Even though the text says SCCS which is prehisto= ry > for this project, it's still in use today. > > Warner > > > > On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: > >> > >> > >> The branch main has been updated by mjg: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c= 5fd417723 > >> > >> commit e6dc6a27230f836a131118326731b7c5fd417723 > >> Author: Mateusz Guzik > >> AuthorDate: 2023-09-26 14:36:51 +0000 > >> Commit: Mateusz Guzik > >> CommitDate: 2023-09-26 14:36:51 +0000 > >> > >> sys/conf/newvers.sh: whack sccs tag > >> > >> In the same spirit as removing cvs $FreeBSD$ tags. > >> > >> Sponsored by: Rubicon Communications, LLC ("Netgate") > >> --- > >> sys/conf/newvers.sh | 2 -- > >> 1 file changed, 2 deletions(-) > >> > >> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh > >> index 73fd6857d307..18b1817ca287 100644 > >> --- a/sys/conf/newvers.sh > >> +++ b/sys/conf/newvers.sh > >> @@ -311,11 +311,9 @@ fi > >> > >> vers_content_new=3D$(cat << EOF > >> $COPYRIGHT > >> -#define SCCSSTR "@(#)${VERINFO}" > >> #define VERSTR "${VERSTR}" > >> #define RELSTR "${RELEASE}" > >> > >> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D SCCSSTR; > >> char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D VERSTR; > >> char compiler_version[] =3D "${compiler_v}"; > >> char ostype[] =3D "${TYPE}"; > > --00000000000002461d060646cd51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Sep 26, 2023 at 11:34=E2=80= =AFAM Jessica Clarke <jrtc27@freeb= sd.org> wrote:
On 26 Sep 2023, at 18:32, Ravi Pokala <rpokala@freebsd.org> wrote:
>
> In that case, an updated comment seems appropriate, so it=E2=80=99s no= t removed again.

https://reviews.freebsd.org/D41984

=
Jessica beat me to it. I have a back out and this commit queued up. I&= #39;ve just
updated the comment. I'm not at all happy with it= yet.

The details are in the commit message, but t= he tl;dr is that while we do write
the version to the end of the = dumps, savecore doesn't preserve that when
writing vmcore.X, = so to identify what kernel a dump is from reliably, one
must use = the SCCS ID tags. Trying to find other strings to get this data is
not as reliable.

The real fix for this issue wit= h the vmcore.X format is to write ELF core
dumps, a feature vague= ly planned for 15, where we can save this data
in a way that can = be extracted with scripts.

Warner
=C2=A0=

>=C2=A0 -Ravi (rpokala@)
>
> From: <owner-src-committers@freebsd.org> on behalf of Warner Lo= sh <imp@bsdimp.com>
> Date: Tuesday, September 26, 2023 at 07:51
> To: Mateusz Guzik <
mjg@freebsd.org>
> Cc: src-committers <src-committers@freebsd.org>, "<dev-commits-src-al= l@freebsd.org>" <dev-commits-src-all@freebsd.org>, "&l= t;dev= -commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org= >
> Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack scc= s tag
>
>=C2=A0 Can you put this back? It is still useful. I have automated scri= pts that look for this pattern to find the version of a core dump. There ar= e no other ways that are as reliable to find this data. Some other heuristi= cs exist, but my experience with snagging data from maybe a thousand core d= umps from $WORK's network found issues in all the alternatives. It'= s why I didn't whack it already. Even though the text says SCCS which i= s prehistory for this project, it's still in use today.
>=C2=A0 Warner
>
> On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik <mjg@freebsd.org> wrote:
>>
>>
>> The branch main has been updated by mjg:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c5fd417= 723
>>
>> commit e6dc6a27230f836a131118326731b7c5fd417723
>> Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org> >> AuthorDate: 2023-09-26 14:36:51 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org> >> CommitDate: 2023-09-26 14:36:51 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0sys/conf/newvers.sh: whack sccs tag
>>
>>=C2=A0 =C2=A0 =C2=A0In the same spirit as removing cvs $FreeBSD$ ta= gs.
>>
>>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Rubicon Communication= s, LLC ("Netgate")
>> ---
>>=C2=A0 sys/conf/newvers.sh | 2 --
>>=C2=A0 1 file changed, 2 deletions(-)
>>
>> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
>> index 73fd6857d307..18b1817ca287 100644
>> --- a/sys/conf/newvers.sh
>> +++ b/sys/conf/newvers.sh
>> @@ -311,11 +311,9 @@ fi
>>
>>=C2=A0 vers_content_new=3D$(cat << EOF
>>=C2=A0 $COPYRIGHT
>> -#define SCCSSTR "@(#)${VERINFO}"
>>=C2=A0 #define VERSTR "${VERSTR}"
>>=C2=A0 #define RELSTR "${RELEASE}"
>>
>> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D S= CCSSTR;
>>=C2=A0 char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256]= =3D VERSTR;
>>=C2=A0 char compiler_version[] =3D "${compiler_v}";
>>=C2=A0 char ostype[] =3D "${TYPE}";

--00000000000002461d060646cd51-- From nobody Tue Sep 26 17:58:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw6t13W89z4vSbk for ; Tue, 26 Sep 2023 17:58:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 4Rw6t11mNTz3GlN for ; Tue, 26 Sep 2023 17:58:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-533c5d10dc7so7632251a12.3 for ; Tue, 26 Sep 2023 10:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695751095; x=1696355895; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JcJqyFN0NQIndS/rP0u9MKRWAQRSLlfaEhT3SDVL/IA=; b=pB0I40pughJOkxxJCAODRhjhib8k1K8rXxG6D/NMw8mBcubTCnx4d7iGU8HOMJoDOM nFRviJiVcCKa79FQV4UMcXRUMuRh8JrJq8CTeI9oiv3rCNVMwTeIyQaseoAmJ8ZLQtFl Q6Fza3y/WBO2MTi6U29uUvwukyESYW0CukDuI2XBfHY0X+cBWoErfdb+FkYUtYplDiWE wjbW7i5x8lErfYX0tLtd0B7gpQOd7W6ULBnVzOgoHQQeqkxaOLjy7+o+52O1mpnW1CSW Iv62e/57ZnFZVi/0X2t941aIRwAt/gBsv0YkK3LxvlSji7yIGYmnLgUBJeqLGGaEO1lK 7KcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695751095; x=1696355895; 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=JcJqyFN0NQIndS/rP0u9MKRWAQRSLlfaEhT3SDVL/IA=; b=LP7rUz7UIdaHTviqGfP8tALEpVPh3E4KdjfgNP84gezRoIIXJxo7wGte4UFp1Ir0mj 77KcsfhpvaKetW/R72znVi9SQu3WVjsBRTUkEW9gRL1AO6TxKhX0rWYe2RLNk2pwGNvb zkIBsPQESpZqe5Qx+XKQu50FLz3nU3yhU8qeV2sXmONFt7MZUKbTRg+AwtSSYqTYJRbS aDRpW4qk6mPixhlzs7DCo9+fuCbxdo6CstPa/3MdRpp6RPlOdUL7uO7lOjGHWB9ohplt cNsrACAu/bC0FH5uaD9VoZyk30f73N5tOLc5rIEGtnZiqyglW5wsT9qJTTAngI7XJYCs gcgQ== X-Gm-Message-State: AOJu0YzHvTHrr80rDBavknvov8ujGtfdmdyf8x5vZ4FjDt2XONaNdjFz Y9GHZuE2yB1L9rQbdDmPwFWSrmou2vLS98C8qOpIBw== X-Google-Smtp-Source: AGHT+IGuPeSGCjPI1echHDjn6Gq5EfeZDhhrFT9USqmLyd+zwvvnkAjPtpsxp2xXGBWQcb7GQlNudBHWjGFpcWJd6ls= X-Received: by 2002:aa7:d912:0:b0:530:9bea:ed5e with SMTP id a18-20020aa7d912000000b005309beaed5emr8597875edr.14.1695751095101; Tue, 26 Sep 2023 10:58:15 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> <28.1695750940@kaos.jnpr.net> In-Reply-To: <28.1695750940@kaos.jnpr.net> From: Warner Losh Date: Tue, 26 Sep 2023 11:58:04 -0600 Message-ID: Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag To: "Simon J. Gerraty" Cc: Mateusz Guzik , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000a6c0d0060646d1b7" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Rw6t11mNTz3GlN --000000000000a6c0d0060646d1b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 26, 2023 at 11:56=E2=80=AFAM Simon J. Gerraty = wrote: > Warner Losh wrote: > > Can you put this back? It is still useful. I have automated scripts > > that look for this pattern to find the version of a core dump. There > > We too depend on what(1) strings in kernel etc to automate tracking down > the src that relates to core files. > Please comment on https://reviews.freebsd.org/D41984 to document it. I have a backout commit queued up, and a second commit to add a comment. Please make your suggestions there. Warner --000000000000a6c0d0060646d1b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Sep 26, 2023 at 11:56=E2=80= =AFAM Simon J. Gerraty <sjg@juniper.n= et> wrote:
imp@b= sdimp.com> wrote:
> Can you put this back? It is still useful. I have automated scripts > that look for this pattern to find the version of a core dump. There
We too depend on what(1) strings in kernel etc to automate tracking down the src that relates to core files.

Ple= ase comment on=C2=A0=C2=A0ht= tps://reviews.freebsd.org/D41984 to document it.

I have a backout commit queued up, and a second commit to add a comment.=
Please make your suggestions there.

War= ner=C2=A0
--000000000000a6c0d0060646d1b7-- From nobody Tue Sep 26 18:08:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw76J6DhTz4vTHb for ; Tue, 26 Sep 2023 18:08:56 +0000 (UTC) (envelope-from bT.i22eqlze30=w1gt6t1smgu9=bjay8tmso9@em790814.fubar.geek.nz) Received: from e2i432.smtp2go.com (e2i432.smtp2go.com [103.2.141.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw76G5Ddjz3JFj for ; Tue, 26 Sep 2023 18:08:54 +0000 (UTC) (envelope-from bT.i22eqlze30=w1gt6t1smgu9=bjay8tmso9@em790814.fubar.geek.nz) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=smtpservice.net header.s=mgy720.a1-4.dyn header.b=yO44AD0f; dkim=pass header.d=fubar.geek.nz header.s=s790814 header.b=LvRFB533; spf=pass (mx1.freebsd.org: domain of "bT.i22eqlze30=w1gt6t1smgu9=bjay8tmso9@em790814.fubar.geek.nz" designates 103.2.141.176 as permitted sender) smtp.mailfrom="bT.i22eqlze30=w1gt6t1smgu9=bjay8tmso9@em790814.fubar.geek.nz"; dmarc=pass (policy=none) header.from=fubar.geek.nz DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mgy720.a1-4.dyn; x=1695752634; h=Feedback-ID: X-Smtpcorp-Track:To:Message-Id:Date:From:Subject:Reply-To:Sender: List-Unsubscribe; bh=q41EjXJ9dZ5oSbfC8M65JFafrYPkKjdge6fbG8lIAoo=; b=yO44AD0f IZmEXG/JFGwm6Azhdu7iy9eWxGByVu0eEgCdCkyP225+sz78hLGiJnQVKaI0e/S3hHxO/G5n+9hH0 Lo8uqNM90wbgtyKKgBPYkxIpZfxvKVfMX0skrEh43lZ0mKaNBDvL4j0XCev1XByasB/J6KBzvXhua d3G+D9/VC+p7g1NQiIXqPpTgW8QZz4wU+OOvfvnlD8OrAD8CM0WrLawdU+ELF5lDY1+jd5gK1b9vA gs8GKQbh4NzI3qyvH0VMCc1Ib5/VAeN6FbjFoKXobE3eR+FdOwhmV6ZigX1UJVk3Gsh2wzJ6tQdH4 ePXhkoWLE3FSF7ajrrxC10JXXA==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; i=@fubar.geek.nz; q=dns/txt; s=s790814; t=1695751734; h=from : subject : to : message-id : date; bh=q41EjXJ9dZ5oSbfC8M65JFafrYPkKjdge6fbG8lIAoo=; b=LvRFB533pjLXTdfKk3B8k10sOmqsdxrn7WxafGtW37G17Fp9sfQPHHrns75/BsPRC9z6C H2DvJDBtCmgoGGzuml1DPn+9Orajhzx3Fdoh9z6Mgb10m7zQIOezLi7NlMCRtR22MePScJO XIo0c1rKuMs7YCO+A71jtbF/+mxs9wOOa0JWdIvlrmhgWJVwaRccZVfnsm0Z63vcRwl+YIC Chd6GZgVs08JatRnPFAZNFR8nBlHwKbErIiI4nnx4ufM8SIeVMPbO+R92TqUSMTAZlPclSI ENSDJWnb9N3I1QqjMnt8lqt+pUNqy+8nJT9jk+Es+TDwcVkHNXF/IvThJH0Q== Received: from [10.176.58.103] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1qlCUM-TRk1Xc-VF; Tue, 26 Sep 2023 18:08:50 +0000 Received: from [10.99.243.232] (helo=morbo.fubar.geek.nz) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96-S2G) (envelope-from ) id 1qlCUM-9ERRJu-2A; Tue, 26 Sep 2023 18:08:50 +0000 Received: from smtpclient.apple (cpc91210-cmbg18-2-0-cust37.5-4.cable.virginm.net [81.102.44.38]) by morbo.fubar.geek.nz (Postfix) with ESMTPSA id 1283A3FFC2; Tue, 26 Sep 2023 18:08:50 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: f1c5a2e3a625 - main - virtio_random: Pipeline fetching the data From: Andrew Turner In-Reply-To: <202309051600.385G0Bmk031832@gitrepo.freebsd.org> Date: Tue, 26 Sep 2023 19:08:39 +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: <8B2042EF-728E-4A8A-8878-640B3097191E@fubar.geek.nz> References: <202309051600.385G0Bmk031832@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.700.6) X-Smtpcorp-Track: 1q_Clu9ERRJI2j.E84zHw8sX4v4w Feedback-ID: 790814m:790814amQcrys:790814sA5QavheWS X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[fubar.geek.nz,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[103.2.141.176:from]; FORGED_SENDER(0.30)[andrew@fubar.geek.nz,bT.i22eqlze30=w1gt6t1smgu9=bjay8tmso9@em790814.fubar.geek.nz]; R_DKIM_ALLOW(-0.20)[fubar.geek.nz:s=s790814]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22]; RCVD_IN_DNSWL_LOW(-0.10)[103.2.141.176:from]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_DKIM_PERMFAIL(0.00)[smtpservice.net:s=mgy720.a1-4.dyn]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_MIXED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[andrew@fubar.geek.nz,bT.i22eqlze30=w1gt6t1smgu9=bjay8tmso9@em790814.fubar.geek.nz]; RCVD_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org]; DKIM_TRACE(0.00)[smtpservice.net:~,fubar.geek.nz:+]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Rw76G5Ddjz3JFj Is there a plan to MFC this to 14? Without it I=E2=80=99m seeing 50% CPU = on a dual core arm64 Hetzner VM. Andrew > On 5 Sep 2023, at 17:00, John Baldwin wrote: >=20 > The branch main has been updated by jhb: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df1c5a2e3a625053e2b70d5b1777d849a= 4d9328f2 >=20 > commit f1c5a2e3a625053e2b70d5b1777d849a4d9328f2 > Author: John-Mark Gurney > AuthorDate: 2023-09-05 15:59:43 +0000 > Commit: John Baldwin > CommitDate: 2023-09-05 15:59:43 +0000 >=20 > virtio_random: Pipeline fetching the data >=20 > Queue an initial fetch of data during attach and after every read > rather than synchronously fetching data and polling for completion. >=20 > If data has not been returned from an previous fetch during read, > just return EAGAIN rather than blocking. >=20 > Co-authored-by: John Baldwin >=20 > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D41656 > --- > sys/dev/virtio/random/virtio_random.c | 73 = +++++++++++++++++++++-------------- > 1 file changed, 43 insertions(+), 30 deletions(-) >=20 > diff --git a/sys/dev/virtio/random/virtio_random.c = b/sys/dev/virtio/random/virtio_random.c > index c02b5c98cece..d54e2e6b70d4 100644 > --- a/sys/dev/virtio/random/virtio_random.c > +++ b/sys/dev/virtio/random/virtio_random.c > @@ -54,6 +54,8 @@ struct vtrnd_softc { > struct virtqueue *vtrnd_vq; > eventhandler_tag eh; > bool inactive; > + struct sglist *vtrnd_sg; > + uint32_t *vtrnd_value; > }; >=20 > static int vtrnd_modevent(module_t, int, void *); > @@ -67,6 +69,7 @@ static int vtrnd_negotiate_features(struct = vtrnd_softc *); > static int vtrnd_setup_features(struct vtrnd_softc *); > static int vtrnd_alloc_virtqueue(struct vtrnd_softc *); > static int vtrnd_harvest(struct vtrnd_softc *, void *, size_t *); > +static void vtrnd_enqueue(struct vtrnd_softc *sc); > static unsigned vtrnd_read(void *, unsigned); >=20 > #define VTRND_FEATURES 0 > @@ -138,12 +141,17 @@ static int > vtrnd_attach(device_t dev) > { > struct vtrnd_softc *sc, *exp; > + size_t len; > int error; >=20 > sc =3D device_get_softc(dev); > sc->vtrnd_dev =3D dev; > virtio_set_feature_desc(dev, vtrnd_feature_desc); >=20 > + len =3D sizeof(*sc->vtrnd_value) * HARVESTSIZE; > + sc->vtrnd_value =3D malloc_aligned(len, len, M_DEVBUF, = M_WAITOK); > + sc->vtrnd_sg =3D sglist_build(sc->vtrnd_value, len, M_WAITOK); > + > error =3D vtrnd_setup_features(sc); > if (error) { > device_printf(dev, "cannot setup features\n"); > @@ -174,6 +182,8 @@ vtrnd_attach(device_t dev) > sc->inactive =3D false; > random_source_register(&random_vtrnd); >=20 > + vtrnd_enqueue(sc); > + > fail: > if (error) > vtrnd_detach(dev); > @@ -185,6 +195,7 @@ static int > vtrnd_detach(device_t dev) > { > struct vtrnd_softc *sc; > + uint32_t rdlen; >=20 > sc =3D device_get_softc(dev); > KASSERT( > @@ -197,7 +208,13 @@ vtrnd_detach(device_t dev) > sc->eh =3D NULL; > } > random_source_deregister(&random_vtrnd); > + > + /* clear the queue */ > + virtqueue_poll(sc->vtrnd_vq, &rdlen); > + > atomic_store_explicit(&g_vtrnd_softc, NULL, = memory_order_release); > + sglist_free(sc->vtrnd_sg); > + zfree(sc->vtrnd_value, M_DEVBUF); > return (0); > } >=20 > @@ -251,49 +268,45 @@ vtrnd_alloc_virtqueue(struct vtrnd_softc *sc) > return (virtio_alloc_virtqueues(dev, 0, 1, &vq_info)); > } >=20 > +static void > +vtrnd_enqueue(struct vtrnd_softc *sc) > +{ > + struct virtqueue *vq; > + int error __diagused; > + > + vq =3D sc->vtrnd_vq; > + > + KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); > + > + error =3D virtqueue_enqueue(vq, sc, sc->vtrnd_sg, 0, 1); > + KASSERT(error =3D=3D 0, ("%s: virtqueue_enqueue returned error: = %d", > + __func__, error)); > + > + virtqueue_notify(vq); > +} > + > static int > vtrnd_harvest(struct vtrnd_softc *sc, void *buf, size_t *sz) > { > - struct sglist_seg segs[1]; > - struct sglist sg; > struct virtqueue *vq; > - uint32_t value[HARVESTSIZE] __aligned(sizeof(uint32_t) * = HARVESTSIZE); > + void *cookie; > uint32_t rdlen; > - int error; > - > - _Static_assert(sizeof(value) < PAGE_SIZE, "sglist assumption"); >=20 > if (sc->inactive) > return (EDEADLK); >=20 > - sglist_init(&sg, 1, segs); > - error =3D sglist_append(&sg, value, *sz); > - if (error !=3D 0) > - panic("%s: sglist_append error=3D%d", __func__, error); > - > vq =3D sc->vtrnd_vq; > - KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); > - > - error =3D virtqueue_enqueue(vq, buf, &sg, 0, 1); > - if (error !=3D 0) > - return (error); > - > - /* > - * Poll for the response, but the command is likely already > - * done when we return from the notify. > - */ > - virtqueue_notify(vq); > - virtqueue_poll(vq, &rdlen); >=20 > - if (rdlen > *sz) > - panic("%s: random device wrote %zu bytes beyond end of = provided" > - " buffer %p:%zu", __func__, (size_t)rdlen - *sz, > - (void *)value, *sz); > - else if (rdlen =3D=3D 0) > + cookie =3D virtqueue_dequeue(vq, &rdlen); > + if (cookie =3D=3D NULL) > return (EAGAIN); > + KASSERT(cookie =3D=3D sc, ("%s: cookie mismatch", __func__)); > + > *sz =3D MIN(rdlen, *sz); > - memcpy(buf, value, *sz); > - explicit_bzero(value, *sz); > + memcpy(buf, sc->vtrnd_value, *sz); > + > + vtrnd_enqueue(sc); > + > return (0); > } >=20 >=20 From nobody Tue Sep 26 19:42:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw9B73JcHz4vZX8; Tue, 26 Sep 2023 19:42: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 4Rw9B66hxGz3Qxy; Tue, 26 Sep 2023 19:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695757342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXN59RzTRVBAhhJH4JFX+OYb+kzFXaArmtv4mUoeyUU=; b=AesQJDW4bMOjzhLL0TNnJgkVEWTmTpPZ2TF5Q0n4eawkWHY0DDX5rNhqbSOXP9QfRbe+ru iG33oG/7nAEyIbnEpM8wBH3WM1z6r9h/r49T/NBLLe8QG9wDPHS4qqAarRPkElWBUP8lXK 4MHHZUKSCTyHMma2HS3kkUIYSs0JVD9c74pDV+EUBhrNtU4rqZB5hFRW18ExgY3pqVePMJ E41TjEP53RrHs687QqPbnZlT8U0H0gSF2jVuTqRqS7fTQiBf9ajUl+XmiwN0o/C9FqI0KB cBk39km5Qw+qvu3r4tUEtt/bIneAwzyKCvsCgsx4QcKoeELTlBGzaQs09qT/wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695757342; a=rsa-sha256; cv=none; b=xc+OD0lPEPVQ9R+LEF5GeGt31rTudYKmM/OxOH6EHUiJTMwh6FAaJYEgu82voVZhadMuTv hXw4P9GbUp3kVev0IoTT2shdIHzJcO6lO1y2PIvvgsJ5HsLfLWoJRfNK+FVQn5ECjod+fd tABU6GSi2ESnn3TCmTevPi7N4OryuQpbAFUYZlXlc9PdgA6KeGFMIDjFLqnZrOXlhL1NU0 ha2nVNVGM7zb13h1OO7fpWMV6Kj2hcgxbO+s/ehTmvuxt/74kD9s4zYLVwz75ZhkYg8dO5 T5XnSxbJ+9E1Ck19WRn/sE5fReaOVC2Km+jFikFoItYT9Yr5HmmbvO1vzvNSLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695757342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXN59RzTRVBAhhJH4JFX+OYb+kzFXaArmtv4mUoeyUU=; b=DXqJedktFcEU/KD0YRXcXMd+97kB7ucqAIS9Kp1L2fZX6LOnwioovzpq+uRfbqfqy2YHUb 70UpI1u18ECVCvgY5P4yMlfyFPL46kTP40R5hX0KGRu0ddY/OV3Es2FyMLlKxJICYaQTCh SDtEZOq/Ddoh4wlcfN3rI3p6h/bd+giEcFixvue1r0L65+f1M5+6b2iQ/w0kK7Ddkbbraf dIRJSMwFnUTJvW0lNjgaNaeq9X0wE/3oaLb+DyecdN+oTgQs5f9wLBGWmWQVYYgqRK9SRW YhFZYJaiQf6p3vNrjfAVe+Oiv63HPZDaqBdrClZM7/ODdRkxUlxpIBiSOm2H3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw9B65nBtz1821; Tue, 26 Sep 2023 19:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QJgMOF016086; Tue, 26 Sep 2023 19:42:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QJgM7i016083; Tue, 26 Sep 2023 19:42:22 GMT (envelope-from git) Date: Tue, 26 Sep 2023 19:42:22 GMT Message-Id: <202309261942.38QJgM7i016083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jens Schweikhardt Subject: git: e8a7cee67348 - main - Add paragraph about kern.mqueue sysctls and their defaults. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: schweikh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8a7cee67348aa954138f32567dac379c746e152 Auto-Submitted: auto-generated The branch main has been updated by schweikh: URL: https://cgit.FreeBSD.org/src/commit/?id=e8a7cee67348aa954138f32567dac379c746e152 commit e8a7cee67348aa954138f32567dac379c746e152 Author: Jens Schweikhardt AuthorDate: 2023-09-26 19:41:29 +0000 Commit: Jens Schweikhardt CommitDate: 2023-09-26 19:41:29 +0000 Add paragraph about kern.mqueue sysctls and their defaults. --- lib/libc/sys/mq_open.2 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/mq_open.2 b/lib/libc/sys/mq_open.2 index e5e7808c9e26..17e290e541ca 100644 --- a/lib/libc/sys/mq_open.2 +++ b/lib/libc/sys/mq_open.2 @@ -35,7 +35,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd September 28, 2019 +.Dd September 26, 2023 .Dt MQ_OPEN 2 .Os .Sh NAME @@ -226,6 +226,18 @@ Please see the .Xr mqueuefs 5 man page for instructions on loading the module or compiling the service into the kernel. +.Pp +The number of queues available, the maximum number of messages per queue +and the maximum message size are tunable +.Xr sysctl 8 +parameters. +Their defaults are as follows. +.Bl -column kern.mqueue.maxmsgsize integerxxx +.It Sy "Name Type Default" +.It "kern.mqueue.maxmq integer 100" +.It "kern.mqueue.maxmsgsize integer 16384" +.It "kern.mqueue.maxmsg integer 100" +.El .Sh RETURN VALUES Upon successful completion, the function returns a message queue descriptor; otherwise, the function returns From nobody Tue Sep 26 20:26:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwB956JsQz4vcf8; Tue, 26 Sep 2023 20:26: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 4RwB955pRrz3VyN; Tue, 26 Sep 2023 20:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eNFYoeJtMvLicy0Kmv/UW6jPewgzE0eg4FwUY9Ct68=; b=q5flPH8sxhXNTWj4r9a1kUKcc2PKGJ8AaKe+7CFkNI36nYQdM5ZZN5d6ORnfcqML2w9lXG xub12VTqxl1iWRsI6+HuRuFCizr29FUg60991S1NLebao+mcdchZcwFUedwu1rjuTBiQrl bNoTUGmPu2+wzEcKcNw/tOODoHhh9goOmUMv6Xq7q/bSdt0tO5C8xI7lQc/TjDpAzrBnys QxJbhqy+EWQYRKoWRyWGMK6m9HekCjXbBt7E3YiB7iCZ4QtXAkjCO7ucAMeYC3XEDz1f3q 4b7wMztVM810V+ZQpLDfBsaEefJmVdk/6yTia3W+p3H7ExIYxKJuTaK5++IBSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695759993; a=rsa-sha256; cv=none; b=r9t2CbapA9rBLbJKwoJesNb6v481mouPFBlVF9z1GL7kB7cYw88H6uX+InsvkzIcwnTPlN 9FgoS39MSyvvgraY+u2zTDKDxtumaTB8B7x/zAvbiKIvPWTIKPD2BSKcRMHYxYjVD32Wuy ICGPWVxxdMlwZBYmKtVcRS9U61iRwYg++Wxhigbl0dBI5GbxdLY1G/22XAqt1Q8WRl0XuT r2XdFsxjVDMBS2M2NoEWgEyURT4c9jPFIPneJrIDD3i/T3OaRvMubtUmiI3r6VWHEKX3Vr /30DulG5HIbh9/6UXzqg55s9xk7WU/G1WFnTo1zbdzwudZr1wInCnFMFFfBgvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eNFYoeJtMvLicy0Kmv/UW6jPewgzE0eg4FwUY9Ct68=; b=P2TKI73jk66TM36UViY00EEx29sJ2Wl2IamByGe5KofJWkbZT3WG7ehximZpQ1d5YFz/rD FQmSte0zs90S4gFHCqI0DU9pdczQLddF+rpteevTDj1G+ICFE9C+ulQFAeEFMs4OnfhcSm dzi4b12SggWI40CivA6ty1I2voklEo/cYeGZ8wmL5mzjbU342LclD80ap58WQgUbLgULoT yRqG8Ghk10SgqLp10XHd6jkUhTfjpibgXeJdNIv64GTjek7gWjx+Gvp9qoqFd9+3atW6I4 cykIzjjdYOW4SFSbrpJL61AkKUaaz/a7oFCW9TlMEaFdKUMf9J3CbtvWYOiczg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwB954lMsz19gJ; Tue, 26 Sep 2023 20:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QKQXnK082952; Tue, 26 Sep 2023 20:26:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QKQXlm082949; Tue, 26 Sep 2023 20:26:33 GMT (envelope-from git) Date: Tue, 26 Sep 2023 20:26:33 GMT Message-Id: <202309262026.38QKQXlm082949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 1dc3abb05243 - main - libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1dc3abb052430279e47c8922d22b30922adcf0f6 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1dc3abb052430279e47c8922d22b30922adcf0f6 commit 1dc3abb052430279e47c8922d22b30922adcf0f6 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-26 20:06:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-26 20:07:10 +0000 libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. Compiler memory barriers do not prevent the CPU from executing the code out of order. Switch to C11 atomics. This also lets us get rid of the mutex; instead, loop until the compare_exchange succeeds. While here, change the return value of at_quick_exit() on failure to the more traditional -1, matching atexit(). Sponsored by: Klara, Inc. Reviewed by: Olivier Certner, kevans, kib Differential Revision: https://reviews.freebsd.org/D41936 --- lib/libc/stdlib/quick_exit.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/lib/libc/stdlib/quick_exit.c b/lib/libc/stdlib/quick_exit.c index 05db690cb6e7..4dee7b20bd2b 100644 --- a/lib/libc/stdlib/quick_exit.c +++ b/lib/libc/stdlib/quick_exit.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011 David Chisnall + * Copyright (c) 2023 Klara, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,44 +28,35 @@ */ #include -#include + +#include #include -#include /** - * Linked list of quick exit handlers. This is simpler than the atexit() - * version, because it is not required to support C++ destructors or - * DSO-specific cleanups. + * Linked list of quick exit handlers. These will be invoked in reverse + * order of insertion when quick_exit() is called. This is simpler than + * the atexit() version, because it is not required to support C++ + * destructors or DSO-specific cleanups. */ struct quick_exit_handler { struct quick_exit_handler *next; void (*cleanup)(void); }; -/** - * Lock protecting the handlers list. - */ -static pthread_mutex_t atexit_mutex = PTHREAD_MUTEX_INITIALIZER; -/** - * Stack of cleanup handlers. These will be invoked in reverse order when - */ -static struct quick_exit_handler *handlers; +static _Atomic(struct quick_exit_handler *) handlers; int at_quick_exit(void (*func)(void)) { struct quick_exit_handler *h; - - h = malloc(sizeof(*h)); - if (NULL == h) - return (1); + if ((h = calloc(1, sizeof(*h))) == NULL) { + return (-1); + } h->cleanup = func; - pthread_mutex_lock(&atexit_mutex); - h->next = handlers; - __compiler_membar(); - handlers = h; - pthread_mutex_unlock(&atexit_mutex); + while (!atomic_compare_exchange_strong(&handlers, &h->next, h)) { + /* nothing */ ; + } return (0); } @@ -77,8 +69,8 @@ quick_exit(int status) * XXX: The C++ spec requires us to call std::terminate if there is an * exception here. */ - for (h = handlers; NULL != h; h = h->next) { - __compiler_membar(); + for (h = atomic_load_explicit(&handlers, memory_order_acquire); + h != NULL; h = h->next) { h->cleanup(); } _Exit(status); From nobody Tue Sep 26 20:26:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwB970cm2z4vcKb; Tue, 26 Sep 2023 20:26: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 4RwB966vHQz3Vth; Tue, 26 Sep 2023 20:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EE+rAa3tRdqbNGAiInuXKOUBEYxB7eSHgRC0Bu5KU9Q=; b=q543Y5ln+WBX8+pp96hSGCFyj3TWla3TbkOSh67m08y4FrfIo1FEPfw82/+vtRA2FU0het 9qj4agKhQE2fRW4Ie20SzTI833byVM0d5lL5VgFLZTfAAYJQUDU6phHSKC1VTxVScCReIH uVHBUpTmzZupVCh/57m6YDC8iNaacYyCC87vPWta2+BjR89xCBI3NiujfqA9od56Hd+tQJ sLXGCQ0JE4jmgZhIpNnl4iaWNupnaASxFFdMH1MDve38alEN+CvrpE36pAjtu2VDja+8+9 s/svqS3QxYIkVkqeOowbj3Hoou9sYHGg1ZsuLCECeIvKPPXKuqiT2F5SimXiBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695759995; a=rsa-sha256; cv=none; b=UC5dncvQ/m17+ojIMzB1qz/82/3ZS6eV0KPYiF+/WED2OFwpihd3QGqO7DJd4vCXPwwUNO dX8jF2u9gn1om89DvoEMG43ij6l62CiFQhfNTWb77PCC8xemglTwVpEdtaCNR8qeGx5EMj V0fkOD2792zdJyhsb90WdJz0+5494uqoLdPBjLJKvYWi+Z5AgM5314GElqQ2tw8YChC5SK g9wHMeP6Nn06pQjDXSMCBSEjA9llQt02GmVrqKq1d1bov1Ioa9kxeNGxAnhbp6XaSmJ03t PG0mPMyHBUbMJsZ9borY+MMCsVM6340Iog2XlvcvX9mTaZZQeJC127/rSmnDbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EE+rAa3tRdqbNGAiInuXKOUBEYxB7eSHgRC0Bu5KU9Q=; b=BEEarrS9EkWO9t6lohtpIWl7vNGdPK4PUTg+xF1g8GiOZaU1Syr4Wsk6pnWXPAYuRoBQJj ak9ffJkchMUgE0d1tOWbD42Taj6X7sCxl4Y6cqOb92XJhNhX2VxvY1xYXu5MBWLq/5ls8D UgadcLZEV/103El6SXNRCD5Om66WkzSFbSlU8Yl1sdvIFJTSZcQfpquEXyNuuaOWkgfaSV tWG5cutxT4kNmbbQSEhkNmCt4IAGHHINX0469akfO6/PvZniDu3DPnW2ENoO2Nm1kjnemB 9kcf8NCMX2coIWnzofZX0XuMSxLI/dLXUfzphPYywVk8g/FTm6cNeirgEcqXqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwB965XfYz19X2; Tue, 26 Sep 2023 20:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QKQY15083004; Tue, 26 Sep 2023 20:26:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QKQY4A083001; Tue, 26 Sep 2023 20:26:34 GMT (envelope-from git) Date: Tue, 26 Sep 2023 20:26:34 GMT Message-Id: <202309262026.38QKQY4A083001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c7dd4601aeeb - main - libc: Add a rudimentary test for quick_exit(3). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c7dd4601aeebbc1bbe131cbe6747476c124b47fe Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c7dd4601aeebbc1bbe131cbe6747476c124b47fe commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe Author: Dag-Erling Smørgrav AuthorDate: 2023-09-26 20:07:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-26 20:07:10 +0000 libc: Add a rudimentary test for quick_exit(3). Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41937 --- lib/libc/tests/stdlib/Makefile | 1 + lib/libc/tests/stdlib/quick_exit_test.c | 81 +++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index a2a6420aba41..860e530389df 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_C+= qsort_b_test ATF_TESTS_C+= qsort_r_compat_test ATF_TESTS_C+= qsort_r_test ATF_TESTS_C+= qsort_s_test +ATF_TESTS_C+= quick_exit_test ATF_TESTS_C+= set_constraint_handler_s_test ATF_TESTS_C+= strfmon_test ATF_TESTS_C+= tsearch_test diff --git a/lib/libc/tests/stdlib/quick_exit_test.c b/lib/libc/tests/stdlib/quick_exit_test.c new file mode 100644 index 000000000000..9feed8a6fa63 --- /dev/null +++ b/lib/libc/tests/stdlib/quick_exit_test.c @@ -0,0 +1,81 @@ +/*- + * Copyright (c) 2023 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include + +#include + +static void func_a(void) +{ + if (write(STDOUT_FILENO, "a", 1) != 1) + _Exit(1); +} + +static void func_b(void) +{ + if (write(STDOUT_FILENO, "b", 1) != 1) + _Exit(1); +} + +static void func_c(void) +{ + if (write(STDOUT_FILENO, "c", 1) != 1) + _Exit(1); +} + +static void child(void) +{ + // this will be received by the parent + printf("hello, "); + fflush(stdout); + // this won't, because quick_exit() does not flush + printf("world"); + // these will be called in reverse order, producing "abc" + if (at_quick_exit(func_c) != 0 || + at_quick_exit(func_b) != 0 || + at_quick_exit(func_a) != 0) + _Exit(1); + quick_exit(0); +} + +ATF_TC_WITHOUT_HEAD(quick_exit); +ATF_TC_BODY(quick_exit, tc) +{ + char buf[100] = ""; + ssize_t len; + int p[2], wstatus = 0; + pid_t pid; + + ATF_REQUIRE(pipe(p) == 0); + pid = fork(); + if (pid == 0) { + if (dup2(p[1], STDOUT_FILENO) < 0) + _Exit(1); + (void)close(p[1]); + (void)close(p[0]); + child(); + _Exit(1); + } + ATF_REQUIRE_MSG(pid > 0, + "expect fork() to succeed"); + ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0), + "expect to collect child process"); + ATF_CHECK_EQ_MSG(0, wstatus, + "expect child to exit cleanly"); + ATF_CHECK_MSG((len = read(p[0], buf, sizeof(buf))) > 0, + "expect to receive output from child"); + ATF_CHECK_STREQ("hello, abc", buf); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, quick_exit); + return (atf_no_error()); +} From nobody Tue Sep 26 20:30:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwBFC5MXYz4vcWY; Tue, 26 Sep 2023 20:30:07 +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 4RwBFC4rYLz3Xrf; Tue, 26 Sep 2023 20:30:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695760207; 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=H2dB1DFOlqeetxZr439AHJuaFD8nDA5+IR//28eWd6c=; b=gbirgoOg4VZlQ+G+GST3Q29YfbbRLF4Fc4dRexbwkMUNeJxq7WGiWmXdoof8CgMN5N/Ev6 h8Q/ebGcnsfZTJgEk1oj5gNngxR+0YtkgIyR9ipXt44ER/p5Z3NUDjnFPMk5WSvPOJep+4 h+gaGRTfLivpJApRgXrUdsCmDRW+xFDT9Sp/KxSgfynd6Nr/69s3PMqmg6ZU87g3KrvMhl iC2t5xSPyqtwIpvfZJfOuVlURNi9P685PYcPXkECBgmydhy+bgFxItMYgCwiGgIfHAlEdB 4BVvNra3tdgV897zpgcN15YhwMvMNunxY3igr74FT1jTdbV0aYpD2eVh5os8iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695760207; a=rsa-sha256; cv=none; b=JsA+O5haMe2nmt8Wv4fo4opkgJjzAhNY5/RbbyNPxpW4hJ/8WqdMEQqnmxC4ksDDxr7zMX oMFwM4Dyt2/2czQ2hcu0mYNUJHTBSg7JqB06+qRNlJbHkDEdkjELr+GM3vtOxHpDk9PQi6 UkyPf2NzUVxfKf5LcUI/d7A3LWNfbmn+r9uudKEIaB3W0KKOnFey1YCqfqJbW7A1UNkxWQ 2ESf57RNHWR1TEfXreV/JDsNlDJtLDWyyjQ1mfZ5wkNWRPR9SObZXRC78YZcKfxSEDoO34 OVj0pNMFTRCqn8EJe5b3Mpz5oYGtETg2TI9AxjBS14iB7+QjVeSgftX6goWVrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695760207; 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=H2dB1DFOlqeetxZr439AHJuaFD8nDA5+IR//28eWd6c=; b=gfc6D2reZxpRvWuWR0Y0DRUmqXz9rjvMjQLdRd4ezl4S5Bqy7ngoiBN2XlH8no7zYAzAuz fYf8m0YOBeu41JwMjB87JM83cKIMHp7wFaMegVkjqV2ip1ANTtusYkh0kuEKos5ZXxYl0M 60lEAyAhnlpicpvyWxY+T2SDkff7RujxDufCgIgZPXgDvxVbBwMaTgA1sW3nzroxAT4Bvo tkigxLbSiqOzXHTy1O4TCk29dc+6twtbCk1FK4XkOJkb2BugX5FP4byCTC87NubMmnecU2 DDFWklAsO9un4Dr6WO15on+NHojL3SchDMZyJIB1D6KaGl4kseiMZ6fJf8ZCQA== Received: from [IPV6:2601:648:8683:39a0:eccf:1992:2e64:f508] (unknown [IPv6:2601:648:8683:39a0:eccf:1992:2e64:f508]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RwBFB3TvzzqVv; Tue, 26 Sep 2023 20:30:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <6964df82-7e4a-36a6-bb83-a8985dbeb01d@FreeBSD.org> Date: Tue, 26 Sep 2023 13:30:04 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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.15.1 Subject: Re: git: f1c5a2e3a625 - main - virtio_random: Pipeline fetching the data Content-Language: en-US To: Andrew Turner Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202309051600.385G0Bmk031832@gitrepo.freebsd.org> <8B2042EF-728E-4A8A-8878-640B3097191E@fubar.geek.nz> From: John Baldwin In-Reply-To: <8B2042EF-728E-4A8A-8878-640B3097191E@fubar.geek.nz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/26/23 7:08 PM, Andrew Turner wrote: > Is there a plan to MFC this to 14? Without it I’m seeing 50% CPU on a dual core arm64 Hetzner VM. > > Andrew I can merge it sure, I've just been AFK most of last week and am still catching up a bit. >> On 5 Sep 2023, at 17:00, John Baldwin wrote: >> >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=f1c5a2e3a625053e2b70d5b1777d849a4d9328f2 >> >> commit f1c5a2e3a625053e2b70d5b1777d849a4d9328f2 >> Author: John-Mark Gurney >> AuthorDate: 2023-09-05 15:59:43 +0000 >> Commit: John Baldwin >> CommitDate: 2023-09-05 15:59:43 +0000 >> >> virtio_random: Pipeline fetching the data >> >> Queue an initial fetch of data during attach and after every read >> rather than synchronously fetching data and polling for completion. >> >> If data has not been returned from an previous fetch during read, >> just return EAGAIN rather than blocking. >> >> Co-authored-by: John Baldwin >> >> Reviewed by: markj >> Differential Revision: https://reviews.freebsd.org/D41656 >> --- >> sys/dev/virtio/random/virtio_random.c | 73 +++++++++++++++++++++-------------- >> 1 file changed, 43 insertions(+), 30 deletions(-) >> >> diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c >> index c02b5c98cece..d54e2e6b70d4 100644 >> --- a/sys/dev/virtio/random/virtio_random.c >> +++ b/sys/dev/virtio/random/virtio_random.c >> @@ -54,6 +54,8 @@ struct vtrnd_softc { >> struct virtqueue *vtrnd_vq; >> eventhandler_tag eh; >> bool inactive; >> + struct sglist *vtrnd_sg; >> + uint32_t *vtrnd_value; >> }; >> >> static int vtrnd_modevent(module_t, int, void *); >> @@ -67,6 +69,7 @@ static int vtrnd_negotiate_features(struct vtrnd_softc *); >> static int vtrnd_setup_features(struct vtrnd_softc *); >> static int vtrnd_alloc_virtqueue(struct vtrnd_softc *); >> static int vtrnd_harvest(struct vtrnd_softc *, void *, size_t *); >> +static void vtrnd_enqueue(struct vtrnd_softc *sc); >> static unsigned vtrnd_read(void *, unsigned); >> >> #define VTRND_FEATURES 0 >> @@ -138,12 +141,17 @@ static int >> vtrnd_attach(device_t dev) >> { >> struct vtrnd_softc *sc, *exp; >> + size_t len; >> int error; >> >> sc = device_get_softc(dev); >> sc->vtrnd_dev = dev; >> virtio_set_feature_desc(dev, vtrnd_feature_desc); >> >> + len = sizeof(*sc->vtrnd_value) * HARVESTSIZE; >> + sc->vtrnd_value = malloc_aligned(len, len, M_DEVBUF, M_WAITOK); >> + sc->vtrnd_sg = sglist_build(sc->vtrnd_value, len, M_WAITOK); >> + >> error = vtrnd_setup_features(sc); >> if (error) { >> device_printf(dev, "cannot setup features\n"); >> @@ -174,6 +182,8 @@ vtrnd_attach(device_t dev) >> sc->inactive = false; >> random_source_register(&random_vtrnd); >> >> + vtrnd_enqueue(sc); >> + >> fail: >> if (error) >> vtrnd_detach(dev); >> @@ -185,6 +195,7 @@ static int >> vtrnd_detach(device_t dev) >> { >> struct vtrnd_softc *sc; >> + uint32_t rdlen; >> >> sc = device_get_softc(dev); >> KASSERT( >> @@ -197,7 +208,13 @@ vtrnd_detach(device_t dev) >> sc->eh = NULL; >> } >> random_source_deregister(&random_vtrnd); >> + >> + /* clear the queue */ >> + virtqueue_poll(sc->vtrnd_vq, &rdlen); >> + >> atomic_store_explicit(&g_vtrnd_softc, NULL, memory_order_release); >> + sglist_free(sc->vtrnd_sg); >> + zfree(sc->vtrnd_value, M_DEVBUF); >> return (0); >> } >> >> @@ -251,49 +268,45 @@ vtrnd_alloc_virtqueue(struct vtrnd_softc *sc) >> return (virtio_alloc_virtqueues(dev, 0, 1, &vq_info)); >> } >> >> +static void >> +vtrnd_enqueue(struct vtrnd_softc *sc) >> +{ >> + struct virtqueue *vq; >> + int error __diagused; >> + >> + vq = sc->vtrnd_vq; >> + >> + KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); >> + >> + error = virtqueue_enqueue(vq, sc, sc->vtrnd_sg, 0, 1); >> + KASSERT(error == 0, ("%s: virtqueue_enqueue returned error: %d", >> + __func__, error)); >> + >> + virtqueue_notify(vq); >> +} >> + >> static int >> vtrnd_harvest(struct vtrnd_softc *sc, void *buf, size_t *sz) >> { >> - struct sglist_seg segs[1]; >> - struct sglist sg; >> struct virtqueue *vq; >> - uint32_t value[HARVESTSIZE] __aligned(sizeof(uint32_t) * HARVESTSIZE); >> + void *cookie; >> uint32_t rdlen; >> - int error; >> - >> - _Static_assert(sizeof(value) < PAGE_SIZE, "sglist assumption"); >> >> if (sc->inactive) >> return (EDEADLK); >> >> - sglist_init(&sg, 1, segs); >> - error = sglist_append(&sg, value, *sz); >> - if (error != 0) >> - panic("%s: sglist_append error=%d", __func__, error); >> - >> vq = sc->vtrnd_vq; >> - KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); >> - >> - error = virtqueue_enqueue(vq, buf, &sg, 0, 1); >> - if (error != 0) >> - return (error); >> - >> - /* >> - * Poll for the response, but the command is likely already >> - * done when we return from the notify. >> - */ >> - virtqueue_notify(vq); >> - virtqueue_poll(vq, &rdlen); >> >> - if (rdlen > *sz) >> - panic("%s: random device wrote %zu bytes beyond end of provided" >> - " buffer %p:%zu", __func__, (size_t)rdlen - *sz, >> - (void *)value, *sz); >> - else if (rdlen == 0) >> + cookie = virtqueue_dequeue(vq, &rdlen); >> + if (cookie == NULL) >> return (EAGAIN); >> + KASSERT(cookie == sc, ("%s: cookie mismatch", __func__)); >> + >> *sz = MIN(rdlen, *sz); >> - memcpy(buf, value, *sz); >> - explicit_bzero(value, *sz); >> + memcpy(buf, sc->vtrnd_value, *sz); >> + >> + vtrnd_enqueue(sc); >> + >> return (0); >> } >> >> > -- John Baldwin From nobody Tue Sep 26 20:30:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwBFf59PYz4vchY for ; Tue, 26 Sep 2023 20:30:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwBFf3LMPz3YHV for ; Tue, 26 Sep 2023 20:30:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-32008e339adso9091320f8f.2 for ; Tue, 26 Sep 2023 13:30:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695760228; x=1696365028; 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=dcuRRZgG3zDckkQjUeveCY3vE4jpILmwyZHLLSLfZc0=; b=B06SR8qgxoAyyy+qcqyuiUdPzrIQH3DpkV1IF8qeUvxIf6Tuvn2lridFc4dEl5stqS l2MXk2wCUYyOkMFM6eppAovkA0pcLVNr33rs2Ems5B+LR/7PEU7fKWkop+QTfgAloqXA 7DkedNA79T6OflaoDhU09oE74vVhYoI65/OABosSm1mpfqZUUYPL1XZLyf2u+/5UEZr5 UjKp8GtwpuZjrUpZgFtp8sN28jVxxz3UBv9SWn7U2upjUsy714cu91JbS05jt6Vj1QZK Fj36m69ObjdP8ZQCZf3PsTRErl43+BCcMlf1qY7jGIeuJ1bl/lznypcq/B6Y/dpVFNHG gNLg== X-Gm-Message-State: AOJu0Yz1xY9su5zwRfU+ti0eFLwZzcaQAgxT0zHKox+fBriuAxb5vZ+b WaFVOC5NZsrer3ttwtZLZhX0QA== X-Google-Smtp-Source: AGHT+IFtMZp6bBX4T3ULDrJTGkUZ27n7LAGdeWdHsuk/SNzHs7o5EknZ6WaoFHspHE7HXxC3U3+j0A== X-Received: by 2002:adf:f192:0:b0:321:4de3:fd5c with SMTP id h18-20020adff192000000b003214de3fd5cmr9755629wro.51.1695760228382; Tue, 26 Sep 2023 13:30:28 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id b1-20020a5d4d81000000b003140f47224csm15417512wru.15.2023.09.26.13.30.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2023 13:30:28 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: c7dd4601aeeb - main - libc: Add a rudimentary test for quick_exit(3). From: Jessica Clarke In-Reply-To: <202309262026.38QKQY4A083001@gitrepo.freebsd.org> Date: Tue, 26 Sep 2023 21:30:17 +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: <3FB4642C-6B3D-4125-8E71-F99D61FF0B16@freebsd.org> References: <202309262026.38QKQY4A083001@gitrepo.freebsd.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4RwBFf3LMPz3YHV Jess > On 26 Sep 2023, at 21:26, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > The branch main has been updated by des: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc7dd4601aeebbc1bbe131cbe6747476c= 124b47fe >=20 > commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2023-09-26 20:07:03 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2023-09-26 20:07:10 +0000 >=20 > libc: Add a rudimentary test for quick_exit(3). >=20 > Sponsored by: Klara, Inc. > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D41937 > --- > lib/libc/tests/stdlib/Makefile | 1 + > lib/libc/tests/stdlib/quick_exit_test.c | 81 = +++++++++++++++++++++++++++++++++ > 2 files changed, 82 insertions(+) >=20 > diff --git a/lib/libc/tests/stdlib/Makefile = b/lib/libc/tests/stdlib/Makefile > index a2a6420aba41..860e530389df 100644 > --- a/lib/libc/tests/stdlib/Makefile > +++ b/lib/libc/tests/stdlib/Makefile > @@ -12,6 +12,7 @@ ATF_TESTS_C+=3D qsort_b_test > ATF_TESTS_C+=3D qsort_r_compat_test > ATF_TESTS_C+=3D qsort_r_test > ATF_TESTS_C+=3D qsort_s_test > +ATF_TESTS_C+=3D quick_exit_test > ATF_TESTS_C+=3D set_constraint_handler_s_test > ATF_TESTS_C+=3D strfmon_test > ATF_TESTS_C+=3D tsearch_test > diff --git a/lib/libc/tests/stdlib/quick_exit_test.c = b/lib/libc/tests/stdlib/quick_exit_test.c > new file mode 100644 > index 000000000000..9feed8a6fa63 > --- /dev/null > +++ b/lib/libc/tests/stdlib/quick_exit_test.c > @@ -0,0 +1,81 @@ > +/*- > + * Copyright (c) 2023 Klara, Inc. > + * > + * SPDX-License-Identifier: BSD-2-Clause > + */ > + > +#include > + > +#include > +#include > +#include > + > +#include > + > +static void func_a(void) > +{ > + if (write(STDOUT_FILENO, "a", 1) !=3D 1) > + _Exit(1); > +} > + > +static void func_b(void) > +{ > + if (write(STDOUT_FILENO, "b", 1) !=3D 1) > + _Exit(1); > +} > + > +static void func_c(void) > +{ > + if (write(STDOUT_FILENO, "c", 1) !=3D 1) > + _Exit(1); > +} > + > +static void child(void) > +{ > + // this will be received by the parent style(9) is to only do C-style /* */ comments. Jess From nobody Tue Sep 26 22:01:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwDG42pblz4vjRS; Tue, 26 Sep 2023 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwDG42N0fz4Cx9; Tue, 26 Sep 2023 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695765660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjSSswkXILzlYpzvJODt/EtyBPCq/ob+RLfXGjBW2k8=; b=tGAEbE+gahK6OzrQb5t12nphh65LQsMPmDXZXl70ooxK+tKnkC1FMw6w8Mp++9Sx3hcq5K N6Ri8QBwbX+pLtU4k5fCxNIJhb/Zsw9dktTtmy5DjzdX0om3UO9E3I3B+MtSEHono0t+cd vOaAX66/Adrd4RbJP6msTzNc1O+9nPevPIND4oLQCMInd39EVFJjotIJzkEQL87Kkyh70C FRCz8A4lOziuTiKKY5T1s8COBknpYb0FOxXuas/OPkSVf6BSmOPFqgIskma0D5t2k7z3dl agrpODool7N0q142Jt8z/i5fBzmSv9WKLzGE9w93YQqKty1kT5FyTNBoHjC5CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695765660; a=rsa-sha256; cv=none; b=aK5+h2A7Z+fFEm6qTmIE3/kJhyeaiGEMmQ6f1JB/Q3+OhKv+T3I/WFSOu+kZH8W44QMrTI igjE17C+rY72hIH0bcOs4E6oItxt+7jeZsrXzAJLDk4rjw/b/LxpEFqM6WqOpckytLCfX7 TF+mpxVWAwYyWxn/nktQHh9q31WCUEwyX6H8AYezn7ytAC/1/+A34X9NKTRSJbG1UH7J8y Xk+KNg/72oaxrCSV5KCzGv5xC/hjwGWElgwYJwbSEAXflLNfQ5j4y64VZyr+F71uUV+Ki/ 2yy1NHWU7O+AnL7g3RK+bxb1H4JY7bZ+ogPvuWxEgM8dFfYCHyxLGcsHO+dM0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695765660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjSSswkXILzlYpzvJODt/EtyBPCq/ob+RLfXGjBW2k8=; b=wEv/ZJuW6AOjgBgat2Q78maSnaRYLyNVvp8nTUinaNy2bdoqWha6BaZHHP06x+xYpJhxwr UrZJJtyIhZwDQc6StPat5LEBtbRSt5VFkZuwUjsVa4Da9qB5IpyUXkWPE6Ab/xbGoi4siK DIc5sLChF2fxrVJ6FniHyMb/qnzdxublrtWVqjPE3b2CXl2WVoHLbw25BvKzJJ/53ewY8r ZHuk6MF/jM5ADFzcqA14MYQvwKwMq8LIOFEitynWRA34aPh/sTjDzwpKyaRUGKdEFRBcYj 7taKZQSFrJek/2+ELhVVUgs2eotqxH2yizQI8GJ7XnhWNoZozjM33hzXOl11gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwDG41QLXz1Cc9; Tue, 26 Sep 2023 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QM10kD043788; Tue, 26 Sep 2023 22:01:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QM10fK043785; Tue, 26 Sep 2023 22:01:00 GMT (envelope-from git) Date: Tue, 26 Sep 2023 22:01:00 GMT Message-Id: <202309262201.38QM10fK043785@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: d06328c37bbc - main - arch.7: fix final 12.x release as 12.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d06328c37bbcf3d3d3c7601372d29237996a6f6a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d06328c37bbcf3d3d3c7601372d29237996a6f6a commit d06328c37bbcf3d3d3c7601372d29237996a6f6a Author: Ed Maste AuthorDate: 2023-09-26 13:30:06 +0000 Commit: Ed Maste CommitDate: 2023-09-26 22:00:42 +0000 arch.7: fix final 12.x release as 12.4 arm (pre-v6/v7) and sparc64 listed 12.x as the final release. 12.4 is the final 12.x release so we can fix the version number. --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 14c6af612087..35a7b0246389 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -101,7 +101,7 @@ Discontinued architectures are shown in the following table. .Bl -column -offset indent "Architecture" "Initial Release" "Final Release" .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release .It alpha Ta 3.2 Ta 6.4 -.It arm Ta 6.0 Ta 12.x +.It arm Ta 6.0 Ta 12.4 .It armeb Ta 8.0 Ta 11.4 .It ia64 Ta 5.0 Ta 10.4 .It mips Ta 8.0 Ta 13.x @@ -115,7 +115,7 @@ Discontinued architectures are shown in the following table. .It mips64hf Ta 12.0 Ta 13.x .It pc98 Ta 2.2 Ta 11.4 .It riscv64sf Ta 12.0 Ta 13.x -.It sparc64 Ta 5.0 Ta 12.x +.It sparc64 Ta 5.0 Ta 12.4 .El .Ss Type sizes All From nobody Wed Sep 27 00:56:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwJ873pdtz4vt3C; Wed, 27 Sep 2023 00:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwJ8730Ktz4S0k; Wed, 27 Sep 2023 00:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695776167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qZsDo298QS/siYe3XnLyg5w0Ilgx6Ix99xEm6kqrJzc=; b=ciwCdmESRBOUrKsP+vnbuGdRIt3CBpkwyY2TtS1JEzd2kIimO7tPV5Qaia9LIpp8lcIUec ifnVLr++h2o75/jbrurkMpBM8JedzFmmHFHGFJaT1aNMXqvGIHp8RQERy4QO0ZMrHU5hs4 fFus/3/YTlyX4g85jtDPOl0Uza0cKAqnz+sERGwJFttDjYxNAUQZuIlF07jCGZxsXO6Bgm 417iewMHXhVAhPCJ9QEq8V3T0u301/hNC4lo3lKu0fAH4uhYHARsnNpS8fMg056jgPS8SL x0dDeyNKbphfd+/TZjweAs/7NlzBMRGs9wFUtF2ck2KoVfhpmS6UH8ZzxIw9MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695776167; a=rsa-sha256; cv=none; b=vIVwgEumkTfnIM7/owQ4ucrPscQS7XOe+BBfvrFOA47VE5TIZFEV1DyloOAyRLjHC34Jex nf8XWLQpP7RDw6iDFhhIn7o1jf2Fk78yAqPlGjpDtz0nkhmDlqAbL4+9pmxSaT3HX+kwMg WC1pbNJlKcfwCDE8SDQAqMLiSZAjcVTKLO6DS4R/Ha3ACUQP9xmcjKrlUXIhfaGpAGTNMx sP2O1/AAgKTw9mH/NFZsBRhuqS2ijQOGYa5oiB6TsLIzOQYxTIHvw65sPdLd9+oJECjwJl z4qElzwtVBL1RttV+UO5i6Z5wX5ab20Hxjv38vVx2GfzlXKWxsph+S6d+s1wNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695776167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qZsDo298QS/siYe3XnLyg5w0Ilgx6Ix99xEm6kqrJzc=; b=roxEsUK5g7FuZPtg8dt8uBrASKV1iWwjDtu26Nq/CRRXLjr8Ub4mv497XXGPUSQpjDvkk2 DD0+TiSt59yJK5e5IXucTzwOd3E4tZmPoj29aZP4efoIO/P4LVN6DOK0rf8m37tq4Lonkz Uo9JP6JcioyUOXaFbQUZqUOHesPRHJOV40LWxWZQLCnKrt5gqp3hhu0x7zz/D1QMrSvIQ6 8FIhUFNJVgUc/TcHJxkRf0FNDQeDBNSsyC8+kJrJNCNtNuOPwz/A1duaJkq0focj46GFvM Rim/z190BbodtigMYCCrfLloP97ynjqFL87JYBbY6vGxMVL5UXFi8EgIcI1NRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwJ8723t5z42v; Wed, 27 Sep 2023 00:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38R0u7nn030172; Wed, 27 Sep 2023 00:56:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38R0u7it030169; Wed, 27 Sep 2023 00:56:07 GMT (envelope-from git) Date: Wed, 27 Sep 2023 00:56:07 GMT Message-Id: <202309270056.38R0u7it030169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 0fa87cf27e8c - stable/14 - ports(7): Update the default setting of MASTER_SITE_INDEX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0fa87cf27e8c52d55866b32fe4b916b7ac3e7dee Auto-Submitted: auto-generated The branch stable/14 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=0fa87cf27e8c52d55866b32fe4b916b7ac3e7dee commit 0fa87cf27e8c52d55866b32fe4b916b7ac3e7dee Author: Li-Wen Hsu AuthorDate: 2023-09-24 02:58:33 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-27 00:55:16 +0000 ports(7): Update the default setting of MASTER_SITE_INDEX MFC after: 3 days (cherry picked from commit 855e0457396c7addb1df6fc1d14200cc8de286c0) --- share/man/man7/ports.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 7dc729bd112a..911135a8b631 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 1, 2023 +.Dd September 24, 2023 .Dt PORTS 7 .Os .Sh NAME @@ -504,7 +504,7 @@ cluster (for .Cm fetchindex target). Defaults to -.Pa https://www.FreeBSD.org/ports/ . +.Pa https://download.FreeBSD.org/ports/index/ . .It Va FETCHINDEX Command to get .Pa INDEX From nobody Wed Sep 27 00:57:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwJ986yhvz4vtDQ; Wed, 27 Sep 2023 00:57: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 4RwJ986S5hz4SZ4; Wed, 27 Sep 2023 00:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695776220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VP4Xn/zMlGVuokHwnyFd+OOdfsBcktJRNMB1AfXiRtQ=; b=FWRD5xlgxsNBwLCKjtVpffwVS1WwDMSfxq9BUiU81XrexvyjMzqAoadfXXzXuUTsEUTyry wxvJdDfPZLoqEl0ov2uy4+W8C7WOGjhYRsjeB4UXrmSUtraLXn1HfrVF9obyFQ//EhvYSy vIxSJ/bjRRrLCxAReW7Of3LJkHmaZss2UwdGwUv56nUAMOqkHX8QdS3RdBnO5XeoA9Nvnm NG60k15deON7xUJaGiO8EBElyZielhTuD0Hx3RyMxUKfo+CIkhAmLT6TZojgf0ngA1EVC7 khj0152hTwRpSRifNqKY54xzZv5SCiR7ubCgtVz9tYmkNWNCQfU45pdgDvfb2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695776220; a=rsa-sha256; cv=none; b=QI9y27CFnEj6+6CGlW5ZvvEk5UK76ztizWFtVvV5cEF8FFeAztMovAnl1HkfS53KwO9of1 ozl9g+p+iim8AzeFjaXbcgA4lVNKoMVCw0JL/PqZqPpt68eO+LM+JYDnD3h22E65RPe4/m j169QivZHk3iOLwaCxF5oH/O/tpOS52zCe9QE86ek99LdKQqyxRQXY8MZcZQX8rXGFAyYD o/hG6IxBIAoF3xAXHWXv5EAz2we2g2+q01zn/TaEQzc7+Au4/cWj0byHeBoGBxFEJjdH3t RSM6Esp+J+u46jyDn5pwBtpzLQJqFRYBtOebtU9QBdvRzgJ4lBzXXZV3DPczaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695776220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VP4Xn/zMlGVuokHwnyFd+OOdfsBcktJRNMB1AfXiRtQ=; b=dCQHCuWfuVSvod8DABACqwO+34Cmz7kFselMuntY4epibZIs0h/c/mzMKnuYvti0qHJF1a F22zzEtc/Ao8DKL5l4/xmioQLi9/yu8TskFfcuZbhXOpsrCxMDKQ68ryuhwqcRsv2/XB/D X2X21dB5oMJJUQ9M/64LeO4y1QsE7Zqt21Q2xsQBPfrLMKeu2o2AXdV4Fm7qweJnNpU5MB 696ix2oEXqx+GaJePWgIaA0E/8wMhKzWAuoZWz9fpkqeqYTzeOsncQWtM0llukfHkJGKmI wUDXTSytz5o5p0/52nizTXo4hiP9Xj+flCrOWl1xpryDrWCYKzLv8WTlgLph6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwJ985WJXz3pK; Wed, 27 Sep 2023 00:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38R0v0oK030423; Wed, 27 Sep 2023 00:57:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38R0v0C4030420; Wed, 27 Sep 2023 00:57:00 GMT (envelope-from git) Date: Wed, 27 Sep 2023 00:57:00 GMT Message-Id: <202309270057.38R0v0C4030420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: de965cace386 - stable/13 - ports(7): Update the default setting of MASTER_SITE_INDEX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: de965cace386fcb8de6d946824c894bf5ca383eb Auto-Submitted: auto-generated The branch stable/13 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=de965cace386fcb8de6d946824c894bf5ca383eb commit de965cace386fcb8de6d946824c894bf5ca383eb Author: Li-Wen Hsu AuthorDate: 2023-09-24 02:58:33 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-27 00:55:45 +0000 ports(7): Update the default setting of MASTER_SITE_INDEX MFC after: 3 days (cherry picked from commit 855e0457396c7addb1df6fc1d14200cc8de286c0) --- share/man/man7/ports.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index c31690af185b..d1dfbed3a998 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 1, 2023 +.Dd September 24, 2023 .Dt PORTS 7 .Os .Sh NAME @@ -488,7 +488,7 @@ cluster (for .Cm fetchindex target). Defaults to -.Pa https://www.FreeBSD.org/ports/ . +.Pa https://download.FreeBSD.org/ports/index/ . .It Va FETCHINDEX Command to get .Pa INDEX From nobody Wed Sep 27 02:21:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwL2H1YvJz4tkKT; Wed, 27 Sep 2023 02:21: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 4RwL2H18Jjz4Xn8; Wed, 27 Sep 2023 02:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695781271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENF8uCYOO5QqYifGyV4qLMMKuyJywjudKQXAzgECGPM=; b=nHnxGo/lBnddz92G55dv8oPf8LuNQ1MJurZbKq/HwjXV1gaGA/U3l8LUX3GJkiM2EubptV xeJ6mvOOEj9Lb51J6LzhQOBo5lRoc7Z6sBdJnd8MxN7xMdYMU6dxVNqRlAJZ+1MabySC6y bSIcUE/y+rQEtJi9AfQXHLM23KZZaB5vkLpMvMewJe31xJXUzEkWtVk5nKNhXWaNcm8NsI YlckABwQ0RINJE0bJlxSq9Jf/FXI8MLAwnN2Ve+wmEEhR2wUDr2DFKbDqyVWMDpXhBPPHW tPlcCAjLaqzZH50zx7XhNXLAVL3gCrEp6Eo6snS6Fk8bR6cqCAV03I1JR2y8EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695781271; a=rsa-sha256; cv=none; b=LdRfwfCvk+tBjwH+bOIbFUE3Lo/UShuvC04WQWfewXT87AmkEVtgVcatFL5A/Wj6OC59x0 Yd5U1cD0989BVyW4qOizpY7F+XVjoRIl5qkJOmvjXJNJ71reFvBZwxAujzzGRd4zKVy6YU mdugYcv4SWnJw5s+QJICvdua4p0H6q0HsPSGev3pz6huUGxDsvGwUdQI3QLRcrciWOqtk+ xz4IwswhCcX8duGho2JE2R5/3h8QGbAinInasKfAjhYCBtnolNkVEubxST1M0nIPOyhsEz 2IpWuSnAUODNy9Rpi67qVhp4CYrOakMvdW9HpJ1r+BJ3bOTWceuOzYv/88XdiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695781271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENF8uCYOO5QqYifGyV4qLMMKuyJywjudKQXAzgECGPM=; b=M/45d0klWTcYfIcgJ+URvb6EJut+ygSwq/qkQPlr006TU+czNAhqX5MkekvfhnTG+9J1hy 2Gq4w1puymMPbZtMDVfYTGujOrPx3IG2NYP9Cjrq0UyQv7ZjoGjlUdkz/ZcWd3BeoAbiXn XvReQFt4h/KKf7TyjVanK9uG2v7S+SU/J898kTz8lu/BqDuXqlhMSG3gR/f4f+JngqL1gt PvrSYJ4rHvAT0k3Oj1i9EABQcA10jQ54TAW3kw1CstSYkG+dhYO0Bib1tWVz1TpnPbG4ga lWtSFKBo+cQ8oUmbwBCit7KU6dqUPFJqi7P99okyDw+AzamwHNYn0RMwWZjDXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwL2H0C5gz6R1; Wed, 27 Sep 2023 02:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38R2LAsi073330; Wed, 27 Sep 2023 02:21:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38R2LAJq073327; Wed, 27 Sep 2023 02:21:10 GMT (envelope-from git) Date: Wed, 27 Sep 2023 02:21:10 GMT Message-Id: <202309270221.38R2LAJq073327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 7642bb1c5325 - stable/14 - ipfilter: Avoid allocating a new ipf token when not needed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7642bb1c5325ddc5b38339fd81309f00beea1ff2 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7642bb1c5325ddc5b38339fd81309f00beea1ff2 commit 7642bb1c5325ddc5b38339fd81309f00beea1ff2 Author: Cy Schubert AuthorDate: 2023-09-12 20:29:29 +0000 Commit: Cy Schubert CommitDate: 2023-09-27 02:21:03 +0000 ipfilter: Avoid allocating a new ipf token when not needed Only allocate a new ipftoken_t if one cannot be found. This eliminates allocating unnecessary token structures that will never be used when performing simple lookups for existing token structures. (cherry picked from commit 7f5e3b9fa3d159b7f061b4d01a767cbe5d0527f3) --- sys/netpfil/ipfilter/netinet/fil.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 7dee98d0c1ad..b04ec3496a65 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -7460,10 +7460,6 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) { ipftoken_t *it, *new; - KMALLOC(new, ipftoken_t *); - if (new != NULL) - bzero((char *)new, sizeof(*new)); - WRITE_ENTER(&softc->ipf_tokens); for (it = softc->ipf_token_head; it != NULL; it = it->ipt_next) { if ((ptr == it->ipt_ctx) && (type == it->ipt_type) && @@ -7472,6 +7468,10 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) } if (it == NULL) { + KMALLOC(new, ipftoken_t *); + if (new != NULL) + bzero((char *)new, sizeof(*new)); + it = new; new = NULL; if (it == NULL) { @@ -7483,11 +7483,6 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) it->ipt_type = type; it->ipt_ref = 1; } else { - if (new != NULL) { - KFREE(new); - new = NULL; - } - if (it->ipt_complete > 0) it = NULL; else From nobody Wed Sep 27 02:22:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwL3V3qXBz4tkYq; Wed, 27 Sep 2023 02:22: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 4RwL3V3N5Dz4Y8P; Wed, 27 Sep 2023 02:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695781334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jkwMF/DhKb60QOA+az8me8BRJCh0Kpw87JmBTC2gKuY=; b=ufzaUROy5OXPTkGQYi1xIDeDbhJME+9EbHG8v/c/K8aDZosdtDaENd+Z1Rch9NHf+//YL8 yTacIDf7+Y/KvY5uHo5N8RUn7TAB7OeXPJYjzSnLAwBnbnx1uTti7gGEZasprsLmom66WG 4cmECe+BKFOnhsceJQ0IG0W/yinyW6y3jTEQr9C5/hGVg2fFCdK21XJhj9/SbxFOnXIYjB OoPm2I6rcAhPVIP1q/yZwtl9dW8oSCtuzCw+KmVIcy2I9CuPIIVqL9pZNpQyHxi+wEG9i0 XQChpEp6xNETnmP0U6YIiiGZHMKm975QhLpOJmO8ftg6Q1jZKgwOcqj5kRpr7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695781334; a=rsa-sha256; cv=none; b=ZdHwqKtdDYMRmNKBvq1zbylbQlq+JsBPpJeRNtyqD7AGc6nqtSm4E8DnXVGswZC4t5nEAq Hb/Svmhuv0qpJXFf1y4kHkqSzXsG7NGTAgxzDTl5yzOgE+zpi4vncXAIsoDxvY9rn7zaMH axo2YuR5Tw/jNIWNC7fmwQ+2776QNtnThqhcX3KrUaspuK9lDTfCWbX+z9qExZCMb1xwN1 rEnhmMJM/WBXRjZQLQSX4d4hHDgBHFYtOivT4ZmHphTTan5JXIABnZ3yrFJ5pPbHaD3rjU xcCftoSw0WrBe1yRmw/WahiXZA/rfRCWAEo4zwLV3hotS8RJKauSdl1q/MsRtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695781334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jkwMF/DhKb60QOA+az8me8BRJCh0Kpw87JmBTC2gKuY=; b=ZlNV1hV/x2iytvNLJ3DYN+iGP7dnO6CB0JUIwsm0g4+ws/L2wzv8aU7vJF3SP7Z51NVlPT AzulfkNvmu67oqYeSmfip138x81siNEN+MDcL9jf2co6xrlFkvWWc63JGLeG6cyEUJk1II u7aiaxnr5fQDPYnqnktnoX19mRUqoWSAupL09rasZ5yK1mM6bgg7JHZRdiUJSAWiiFu+aM MP6MhejOFdRf+/vbR6gJk0g6jSzU5ZH/tYIdyqDefz7ZwhDZ2qS0X3jsBLhjR2RAAQPbVe ipSvKQXgOtcqSBN3MfK1Bvo7KNjp27VpPkbEjIA/eqHD+F+/CgO/XXTaqUdzpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwL3V2Qj0z5rh; Wed, 27 Sep 2023 02:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38R2ME7w075725; Wed, 27 Sep 2023 02:22:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38R2ME4B075722; Wed, 27 Sep 2023 02:22:14 GMT (envelope-from git) Date: Wed, 27 Sep 2023 02:22:14 GMT Message-Id: <202309270222.38R2ME4B075722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: c22fec731ef0 - stable/13 - ipfilter: Avoid allocating a new ipf token when not needed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c22fec731ef037ece2f8c746fe93db02bc07dc74 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c22fec731ef037ece2f8c746fe93db02bc07dc74 commit c22fec731ef037ece2f8c746fe93db02bc07dc74 Author: Cy Schubert AuthorDate: 2023-09-12 20:29:29 +0000 Commit: Cy Schubert CommitDate: 2023-09-27 02:22:05 +0000 ipfilter: Avoid allocating a new ipf token when not needed Only allocate a new ipftoken_t if one cannot be found. This eliminates allocating unnecessary token structures that will never be used when performing simple lookups for existing token structures. (cherry picked from commit 7f5e3b9fa3d159b7f061b4d01a767cbe5d0527f3) --- sys/netpfil/ipfilter/netinet/fil.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 7dee98d0c1ad..b04ec3496a65 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -7460,10 +7460,6 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) { ipftoken_t *it, *new; - KMALLOC(new, ipftoken_t *); - if (new != NULL) - bzero((char *)new, sizeof(*new)); - WRITE_ENTER(&softc->ipf_tokens); for (it = softc->ipf_token_head; it != NULL; it = it->ipt_next) { if ((ptr == it->ipt_ctx) && (type == it->ipt_type) && @@ -7472,6 +7468,10 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) } if (it == NULL) { + KMALLOC(new, ipftoken_t *); + if (new != NULL) + bzero((char *)new, sizeof(*new)); + it = new; new = NULL; if (it == NULL) { @@ -7483,11 +7483,6 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) it->ipt_type = type; it->ipt_ref = 1; } else { - if (new != NULL) { - KFREE(new); - new = NULL; - } - if (it->ipt_complete > 0) it = NULL; else From nobody Wed Sep 27 02:22:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwL3q20z3z4tkcP; Wed, 27 Sep 2023 02:22: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 4RwL3q1Tf8z4YgN; Wed, 27 Sep 2023 02:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695781351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5iWQDn8e6OXWlNF37T1iqx4konGhTkC9C/pAErS7wG0=; b=CChdWRRFQDGCVriw5Kru6kfQ5MZpG6FPFnBAg/bjnGxIbjdh3kofJYK+F/nfpG80I5quGW U0Fr0UddJDUAcIeBRHSXMWPjVYpzg0U7cygEyeMF7ALy/GlVkcuK35Q005R7HjJsjWMkOE Qh3kTYMNeR04342y4m8ESdqdM5A49hbosK9BgtYV5z7vr4ziOdVPDATJFBCcPxj5C+ked1 lX/kdNf1tzmo+UFhcL/zWmy9rLpK/ssQclOAVHrcXUeQk57dtfONXQE691JJbIxSZvM90t ZHlHniL9J9mAKejzlyxKIxv+vNKxAiWlsp4BBqOBnc2ipAjlUOM3C9tLzA6eTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695781351; a=rsa-sha256; cv=none; b=rmkoBs5GaN1PYcInsFVh3JS2Uv7fJoq0qW2z/5/5p/jCu5HAE9jgttgZadENAUIUyNRaur wgOXO7t8YmI881e3+klAhvN8Jbk9J6TsneTWtx2BEbRFd3/7zMEl8HPi3+SIPkZdAuO5YY LgLCrmMfPI6A3sTw9aRkWqYFKW2aZ+6u2gEXCiCpbyYrMPP5H/W2q1RU/gVFuyM27LJByI 7zxn8/AXD6umdgPy0mD9R6kB7Ub2+3tyn5EAIx21VJSpOsbLrn3027MwuuHgU7xXgvSsJc qOjgDLgO0oWO60xu2sfZNPB51Bl6ZVzdMTMvo2OiEWgNvnz2fteVdJQ7GyfifQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695781351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5iWQDn8e6OXWlNF37T1iqx4konGhTkC9C/pAErS7wG0=; b=RNlVhb+pvK/JCkKJUFBdmgnoOHX0dHPfXOlqN7veb95fHHppq4d9KNjtIQ+/ZjPMGhYA3o sbjbzGAKK3bHQZMqQ+Z2iKqcQJUbFHVlwzwylSBHqUSwSfw90A7wUHnWDy/e90hGU96RLA yWnyKLtRAyTDH3cF0uHeNY2pGRMZhnlH7t5JR1rMS++tO3L4sYnIkTGkHfNoGT5IwDQP/J LenxVJb3GENGqo+VCJZJZbmsIP1wrfJ3eNi7uYzZZx+MkC42bY3V7VfPKQpd7HYYnpp6Fg Fk9+gJlxsdiOEZ0Y4wHVtsEI4rB+ArtWzCAmUZwKyUcCQRS/74gNlcJ+n2lQNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwL3q0YDFz61M; Wed, 27 Sep 2023 02:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38R2MUb9078904; Wed, 27 Sep 2023 02:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38R2MUPm078873; Wed, 27 Sep 2023 02:22:30 GMT (envelope-from git) Date: Wed, 27 Sep 2023 02:22:30 GMT Message-Id: <202309270222.38R2MUPm078873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: b083794291d2 - stable/12 - ipfilter: Avoid allocating a new ipf token when not needed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/12 X-Git-Reftype: branch X-Git-Commit: b083794291d245f05940552a37f7d5c5badc2d17 Auto-Submitted: auto-generated The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b083794291d245f05940552a37f7d5c5badc2d17 commit b083794291d245f05940552a37f7d5c5badc2d17 Author: Cy Schubert AuthorDate: 2023-09-12 20:29:29 +0000 Commit: Cy Schubert CommitDate: 2023-09-27 02:22:26 +0000 ipfilter: Avoid allocating a new ipf token when not needed Only allocate a new ipftoken_t if one cannot be found. This eliminates allocating unnecessary token structures that will never be used when performing simple lookups for existing token structures. (cherry picked from commit 7f5e3b9fa3d159b7f061b4d01a767cbe5d0527f3) --- sys/netpfil/ipfilter/netinet/fil.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 3cf9111340a3..455da5d6fa71 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -7461,10 +7461,6 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) { ipftoken_t *it, *new; - KMALLOC(new, ipftoken_t *); - if (new != NULL) - bzero((char *)new, sizeof(*new)); - WRITE_ENTER(&softc->ipf_tokens); for (it = softc->ipf_token_head; it != NULL; it = it->ipt_next) { if ((ptr == it->ipt_ctx) && (type == it->ipt_type) && @@ -7473,6 +7469,10 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) } if (it == NULL) { + KMALLOC(new, ipftoken_t *); + if (new != NULL) + bzero((char *)new, sizeof(*new)); + it = new; new = NULL; if (it == NULL) { @@ -7484,11 +7484,6 @@ ipf_token_find(ipf_main_softc_t *softc, int type, int uid, void *ptr) it->ipt_type = type; it->ipt_ref = 1; } else { - if (new != NULL) { - KFREE(new); - new = NULL; - } - if (it->ipt_complete > 0) it = NULL; else From nobody Wed Sep 27 11:01:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwYb24Zplz4vJHX; Wed, 27 Sep 2023 11:01: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 4RwYb2472pz3g51; Wed, 27 Sep 2023 11:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sECHU9bayvH4URguCVP7dxSb+CERq5+0FXu7XplDQ6E=; b=v3CFlByVJehNXEk/tShKHoA+ltJKZilyNG89FrYSNjPkFePy/X56NgQphag7f/Y+bjMkxy GzClZc80N2bj0ZhcxgSuuIhp458xTO377i5cetBE0jnrrjG1rm9lRkpWndh2RsnNoMoIHU MZ7jUwEj9es3O6LK6cS0qJLhbX/68VBSzPwnqxhnMEj7dUitI7WgBc+HKLlrAf3IM2hoiK 24rX8LRtZC0QIE3aFIVtkhqx5lrvWV6+SBpp6ev3RWsinmb3WSmT01daYhkpy0Jxg9XLN5 DAMPg5XOEtaZw/p/9vpOU4AclzZCSC3+PdIB0WlT+zproaUtvrk6o0MALuyInA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695812510; a=rsa-sha256; cv=none; b=AH4yw5jYTYxyFYs73agwLtDeMlS3zm6LpvXaUiwNcR8v6H8hD358fVVUObJB9W30V/gW4a zfAaTFR/UGIuHACIxChplPOP/Z1G3o6S/1rbtY8FvnaFfpnLsSce2tNAp3YSyivN2YoXzD YLWmSnbZ1Mireghy9yGxrYT0gfi/9tVJeVGJPko8Tm3Lv5vxMDuww1fSayG6QxTIs+jp+q 6rWkuoZvJWeG3ehJ/ICOQWddS+rgkL7tFZc0STeNKSQyvf9PF7FVt85jmAh8lDDcC5bC+B Qkn9o+ndVdKOZg2X7XuxfrhmyT2kkxYEZr9HGN+MotjMml115BLxxWjTxDPQ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sECHU9bayvH4URguCVP7dxSb+CERq5+0FXu7XplDQ6E=; b=IFMNw1kkXA7MDv7kN9iX52NHmwIzkPEVAsIfUcF3IF7YDamp/6tGaY6AkxFDYCiITRRB/Z Fw60JaYt6zKBtPsYKTf/gc+wHtuLeB+Lki82c1Xx189HRnBNwcXi2xSCjIX/2QNPF0JgV1 /36+87pvbzDJkf+zOVSqxZbslmQ8PCx+a6/9i2LjLe14ewdQriCZ/ioVPCG48w9YRcQ8Db bMlhTs+BtiM0t1mQRwlLEMtKCha8Y8lHecN0DnBSmGjmuoOMlPuq5epODtiwpr/MWMhlHY gjFqVvsEKkDlF5nHBvBwse9gIgheaYudph1m1DYjHjkKawRQGh3Rl39TbLwp7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwYb23DB9zcZ1; Wed, 27 Sep 2023 11:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RB1oER038326; Wed, 27 Sep 2023 11:01:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RB1oth038323; Wed, 27 Sep 2023 11:01:50 GMT (envelope-from git) Date: Wed, 27 Sep 2023 11:01:50 GMT Message-Id: <202309271101.38RB1oth038323@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: 0ec1bbe579fa - main - stress2: Cap total runtime List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0ec1bbe579fa1b81cbb6b7dbbbea38397a56274a Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=0ec1bbe579fa1b81cbb6b7dbbbea38397a56274a commit 0ec1bbe579fa1b81cbb6b7dbbbea38397a56274a Author: Peter Holm AuthorDate: 2023-09-27 10:58:39 +0000 Commit: Peter Holm CommitDate: 2023-09-27 10:58:39 +0000 stress2: Cap total runtime --- tools/test/stress2/misc/radix.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test/stress2/misc/radix.sh b/tools/test/stress2/misc/radix.sh index fa85512c79c5..b102c09aca92 100755 --- a/tools/test/stress2/misc/radix.sh +++ b/tools/test/stress2/misc/radix.sh @@ -46,14 +46,14 @@ mycc -o radix -Wall -Wextra radix.c || exit 1 rm -f radix.c cd $odir -set -e +set -u trap "rm -f rendezvous" EXIT INT parallel=1 usermem=`sysctl hw.usermem | sed 's/.* //'` pagesize=`pagesize` start=`date +%s` while true; do - timeout 2m /tmp/radix $parallel > $log; s=$? + timeout 20m /tmp/radix $parallel > $log; s=$? [ $s -eq 124 ] && { echo "Timed out"; break; } [ $s -ne 0 ] && cat $log used=`awk '{print $4}' < $log` @@ -63,7 +63,7 @@ while true; do [ $parallel -eq 1 ] && parallel=$((usermem / pagesize / used)) parallel=$((parallel + 1)) - echo "`date +%T` parallel=$parallel" # XXX + [ $parallel -gt 10 ] && parallel=10 done cat /tmp/radix.log From nobody Wed Sep 27 11:01:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwYb36jRvz4vJBR; Wed, 27 Sep 2023 11:01: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 4RwYb35zrLz3gKY; Wed, 27 Sep 2023 11:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZTKZeICMi3Ynd1TH5SN6BK1Fq4mGAchHmeeqjANYGw=; b=b+PmvWgpKgn/M9rxF0NY/raD1IU0227i6SMynLcjYxsZBKUEsfWHPPA/NnSrWTgVvYdL0A U18yqVyCMVkN/c6qbnZimsyjamG+Ici36eUAhjx+ToNQ11N2i/m/T3nehEDpPpgJ5TzRvc 6NUn8HxSrpwmx7bkAW7D4BLmwg6vZ0ft68+BS6T+cHcyV5j9s61nwB4+QCf23C3yKXuATI VVK7NVJY2F313vZ+DGWgi3MvSp8wVdXn0SSroBzz0lm4MHASemCipyPq8JhfwvgHZIPRuP fbfBBeKOpuynEZMB4ue3+tBwkN4jHnnlabCceTpcwbFclM4GPhkr6aibpgH1Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695812511; a=rsa-sha256; cv=none; b=SyJDzVRdpINDLjAj96ZlfnJuJBuXbh8PqAwuFM5QTy92iZSa8uQdh9s9KdfEEmLD34BMB3 QzUyeqenzU3fR+O1htJEwm8No9/DvKPAQbU06rNy+RURg6whDzd8khmTpx+t3RsRv9YLBc bl8fn5G+2V472hFp2sojQu/1kiUUnzNvtnvkLIRqdk70KRm6nM3HiUhjVOFDq2egb5+zm9 2D5lbMiMs1Nv8o2kkHoDI7yiA0XeLw1JOSffloSQFs0jpKY7PPcCF1Ri0DdUNzNEVYQXOs z2R0FBSmWDqzbh9Fw05yDILEdiNeqXRKuOo87q5CTOFzCRtoeiD4dllGvEICYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZTKZeICMi3Ynd1TH5SN6BK1Fq4mGAchHmeeqjANYGw=; b=U+iKWLOXHKSWLCqo8xOxXVWHKWsLxfGVJAModuTZ0E1YMFcxYhk1r83PLSUkdNcvVbSPun ubH9jX7lQoD+ayP9FTt/WZS2NrqiIFzNydNVDOGrwC41AqCuNVAxUajCnh5rqkka3YwSls V2LL1Yp952LDa8FHTafHgYemJ5UgfCQH681Gy5s6egjL8Q253tILs1dwu7QuaLD9S62DOF tmCgpbIekxw4JPsB2BQtavfOKuzk15dRfsd+8d6hJmSGIvuyNPQfSkokD8NFEY45aWSvVF D8RhQmMvpCWP5Q6P6jQ07xKZ6gkekoVI5bVIEU2nbxaHBd5Fh+x0hfAmWYNjPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwYb34QF9zcjK; Wed, 27 Sep 2023 11:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RB1plb038374; Wed, 27 Sep 2023 11:01:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RB1pnO038371; Wed, 27 Sep 2023 11:01:51 GMT (envelope-from git) Date: Wed, 27 Sep 2023 11:01:51 GMT Message-Id: <202309271101.38RB1pnO038371@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: 0f35fd33479c - main - stress2: Remove tests from the exclude list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0f35fd33479c863889bbcb2cab036687910f5fed Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=0f35fd33479c863889bbcb2cab036687910f5fed commit 0f35fd33479c863889bbcb2cab036687910f5fed Author: Peter Holm AuthorDate: 2023-09-27 11:00:01 +0000 Commit: Peter Holm CommitDate: 2023-09-27 11:00:01 +0000 stress2: Remove tests from the exclude list --- tools/test/stress2/misc/all.exclude | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 2560b22149d5..f7b1a9613670 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -51,7 +51,6 @@ pmc8.sh panic: [pmc,2749] (ri21, rc1) waiting too long for pmc to ... 20210621 rename14.sh https://people.freebsd.org/~pho/stress/log/log0433.txt 20230409 sctp2.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 sctp3.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 -sendfile25.sh WiP 20200611 signal.sh Timing issues. Needs fixing 20171116 snap8.sh https://people.freebsd.org/~pho/stress/log/log0123.txt 20211008 suj12.sh Waiting for fix 20230319 @@ -66,7 +65,6 @@ systrace2.sh WiP 20200227 syzkaller16.sh zonelimit issue 20210722 syzkaller28.sh panic: About to free ctl:0x... so:0x... and its in 1 20201120 syzkaller31.sh panic: Bad tailq NEXT(0xfffffe01a0899430->tqh_last) != NULL 20220420 -syzkaller55.sh panic: Counter goes negative 20220525 syzkaller59.sh Page fault 20220625 syzkaller65.sh panic: in_pcblookup_hash_locked: invalid local address 20230318 syzkaller66.sh panic: in_pcbconnect: inp is already connected 20230621 @@ -75,7 +73,6 @@ truss3.sh WiP 20200915 # Test not to run for other reasons: -fuzz.sh A know issue marcus3.sh OK, but runs for a long time statfs.sh Not very interesting vunref.sh No problems ever seen From nobody Wed Sep 27 11:01:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwYb46tXQz4vJHf; Wed, 27 Sep 2023 11:01: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 4RwYb46KTTz3gF9; Wed, 27 Sep 2023 11:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dWoruXVPfOKnsmtpW7Hv3p8+VeZsKC24TKpYPrjiP8=; b=Kca+lqxKuP1wk11CS0HomuagY103RdPb+Z7EboJJdH3vi8ULQKr7iINMi0qHHgrdmjKwQw PEw1addtfUvdQlKV4sFP9Q+cCMUIUudpfEiS0drPnYPTWm1xn8ZaS7yl0hdbnyKznk1t5W nbSc+mOlEjEPD0+xyAkVMie7pMvsuz2zO4MYHjaKMqj0ZOn2bf9x8b+s/VYvq+f4lp9Rx5 M+xmVQyEn2TzLTMx9cIU9Z2mWVN4g6N3QwY1gsv5xTm+OQgSBPD6domu/F6up9KiG9kj3o 27TH7ui1je/7k41y4hHaxCAdeWfittg+QLxPj8CPNePsD4w9gTEw4i44/NxKJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695812512; a=rsa-sha256; cv=none; b=XShjcM/oiSInKZ28rmJT6FRQNNrbaA+3GEmJepo3Gk2jf1KIwYO0Lo0/kkqQA9eaOoHzSf 7B7tRTfRArmioUTiEg7lqeggeNvjiQ3cd/qiNREP/FFNvTqu69EzgdHh7K8SO3145HkpsW AFJ1Gmh+MjlS777RNBpB1rEMJmcu91BzdhCr/p9wQwdh3q7yuaWyz02rqILXO++k6kBbQK R+SLnGf1XCfpZmfGtFXx5T8Mu2dyE5tuamMPrI+ZS1eOkrqqEtI53spQeCHUIk1ukcT4tc je70rX2hp5NW3h27jF+OEVGRa8AUWe6OvsJx9C+SD8NTBvfXHbgEyH7EJb3iGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dWoruXVPfOKnsmtpW7Hv3p8+VeZsKC24TKpYPrjiP8=; b=QTVLSNOzt7HDguab6nvI/ZgbdVuAx/iFmqWEv17gbquibc6DyW7b47hheeW5d3A8DuhNBY mi/9XTCV04OTBeZ1oF/iE/G9xZ2Y8uo+EciLyNAqcP7FLPd3smLsF6zBq4Sj5wYV1Srn11 MtODlmde8yiqHS1sKW06E1X1b55TrZjF8PP++sxKP1qKCN7z28sqI5gN1kq8Mt9852jkfG ZyVh3ilItPjkKE4q1PwRbrq2ttm7OBU+kRx5J+R832u8gUlJ5V6z6S+LrskUqJ13qnc8AH VOUNaoEvvCnFsOYDPtQotnDPHIuR0QjY5JA12rikB3hJy5Uy2f4R1C8OtS97DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwYb45RJCzcTL; Wed, 27 Sep 2023 11:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RB1qM3038436; Wed, 27 Sep 2023 11:01:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RB1qat038433; Wed, 27 Sep 2023 11:01:52 GMT (envelope-from git) Date: Wed, 27 Sep 2023 11:01:52 GMT Message-Id: <202309271101.38RB1qat038433@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: 2b716e00cf3b - main - stress2: Extent timeout limit to avoid false positive errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2b716e00cf3b59acbb5242f4b0695db84d2948af Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=2b716e00cf3b59acbb5242f4b0695db84d2948af commit 2b716e00cf3b59acbb5242f4b0695db84d2948af Author: Peter Holm AuthorDate: 2023-09-27 11:01:00 +0000 Commit: Peter Holm CommitDate: 2023-09-27 11:01:00 +0000 stress2: Extent timeout limit to avoid false positive errors --- tools/test/stress2/misc/newfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/newfs.sh b/tools/test/stress2/misc/newfs.sh index 44c76f78b599..252629c04b90 100755 --- a/tools/test/stress2/misc/newfs.sh +++ b/tools/test/stress2/misc/newfs.sh @@ -78,8 +78,8 @@ for opt in -O1 -O2 -U -j; do done blocksize=$((blocksize * 2)) done - if [ $((`date '+%s'` - start)) -gt 1200 ]; then - echo "Timed out" + if [ $((`date '+%s'` - start)) -gt 1800 ]; then + echo "Timed out in $opt" s=4 break fi From nobody Wed Sep 27 12:36:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwbhl3jzXz4vP7J; Wed, 27 Sep 2023 12:36: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 4Rwbhl37MDz4NwP; Wed, 27 Sep 2023 12:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8L898ye5CXTqMSHfLS/nw/e22dIQrXrdE79TjWPOt8=; b=jbuMZeeBH7LS+ACm9QH/9VCEG4+fxWpni0rjq9zVQGWHzI/CXNJkTURWHKVQNomV1nwGqv Km9Pioj+v4HPBYOUEr95KFMU19/6b3ns/vJVMKLVhUfx1SooNxD1g1uvmoScaYos26z6nI Ja4UzyIgjFaUP8WOe1gzpCE4AyrBeQkX577+aQ9UTPHhlf6dIr7ngl6//Fx2t5PX98i67p xxhmLVZyUNG64WpYeLwIc2Y1HZMpVBcA6PtHVCLAdppfxUbSW7BLdZF2S9TqLkrmsdgCjk +nLHIxTq6oihQeY2BwrubBv7MpVZhp/C5CR2NwbrdkAgnhU9vDLaRviJdVzbdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818215; a=rsa-sha256; cv=none; b=N3VprlbHleAuQGwA5CYDF+CJOsBF6reyIZubPhTJlMQU6G89sofJQn0GAciZ9OtcG+bMq3 UMf6ycdhxpQHgVfwuOtm+YT45C0p6wnLGazADYUilfjXqj9E45EHCxJn9CWoJQw+gYDtqh HcToK3fo91ICqxGM7tMAxMgJlDdrDyoZjn5bL/rM9PfImIDyBnUQXr8Fo+ujdpy73vsbXR Uj/o1hFIIjnvvXpa8nfo+mPZ61L0yo+2Jk1TBsxfltul3PN2h8QAw0LaTKlx86ZKVTzEo2 mbHBl8gaQzWuMU3KEo1Qb94eocb3zT63mjHe9FgF2+lZfxzH1BKbhuVwrtVrjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8L898ye5CXTqMSHfLS/nw/e22dIQrXrdE79TjWPOt8=; b=IaiOG5XLakd6ryK+YJaWV2LyPbNdwaqVufnx1++JbtVsPjgpRx5sk+wPgNYI5qN+yq64/7 R35n0DTp8oicWoYhTHW2CpiCpkxgfoPboRToWkEE9y8wgH7V+Rv2JERRATMvA6XD8vaQxf GG82FYnE0mfWTiyIvtSdhuJaGunN2fjwkdzlz+g8+xXhaRwR/vls7KpOCW3yQr9qw2dpc/ Il9dnV3wdkKiG3kn2McZz/CcRrNGxN+7UEhfxNvRth4cHU1jBSFZHNaVIOlseAQagIOLTP 3cusszSu4RnxDKJCJUOvsj1KqLAeHb0v8xlwkjHF//FOM+78uz2wThDzTv8Ndg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhl20HBzfh9; Wed, 27 Sep 2023 12:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCatmm091602; Wed, 27 Sep 2023 12:36:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCatc5091599; Wed, 27 Sep 2023 12:36:55 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:55 GMT Message-Id: <202309271236.38RCatc5091599@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: 015daf5221f7 - main - hdac: Defer interrupt allocation in hdac_attach() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 015daf5221f7588b9258fe0242cee09bde39fe21 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=015daf5221f7588b9258fe0242cee09bde39fe21 commit 015daf5221f7588b9258fe0242cee09bde39fe21 Author: Mark Johnston AuthorDate: 2023-09-27 12:23:58 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:28:27 +0000 hdac: Defer interrupt allocation in hdac_attach() hdac_attach() registers an interrupt handler before allocating various driver resources which are accessed by the interrupt handler. On some platforms we observe what appear to be spurious interrupts upon a cold boot, resulting in panics. Partially work around the problem by deferring irq allocation until after other resources are allocated. I think this is not a complete solution, but is correct and sufficient to work around the problems reported in the PR. PR: 268393 Tested by: Alexander Sherikov Tested by: Oleh Hushchenkov MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41883 --- sys/dev/sound/pci/hda/hdac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 422f7f930ea5..2cf9239499af 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1270,9 +1270,6 @@ hdac_attach(device_t dev) /* Allocate resources */ result = hdac_mem_alloc(sc); - if (result != 0) - goto hdac_attach_fail; - result = hdac_irq_alloc(sc); if (result != 0) goto hdac_attach_fail; @@ -1347,6 +1344,10 @@ hdac_attach(device_t dev) hdac_corb_init(sc); hdac_rirb_init(sc); + result = hdac_irq_alloc(sc); + if (result != 0) + goto hdac_attach_fail; + /* Defer remaining of initialization until interrupts are enabled */ sc->intrhook.ich_func = hdac_attach2; sc->intrhook.ich_arg = (void *)sc; From nobody Wed Sep 27 12:36:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwbhm56hmz4vPgM; Wed, 27 Sep 2023 12:36: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 4Rwbhm481Dz4P0R; Wed, 27 Sep 2023 12:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrJvq7V8DZuk1uAggTkuWb56Pmo4HJ0NNzesQ9xKvyM=; b=gJN3+rAGnQNlOM2C5ED5UjsYKW3pqkAXnk8C62XQmtaSH4+331WpF6cjLO1gY+lmBIXS9v rW7Pez75dh8vGD8ByTcCu1S7o4Z27DVOQBgr7xr2ubJBWyPIBpmONkcP3p8KgQC2u7j80U H+7CjfMTUWAgUQrcmNAaimJyk6Zsnsmku7OuaEsGVZqiDo4N/0/EZIuxHsKLCmEcw9uNYy A6DgqT8Pj8oxhjwyqrBgQSKbeRjcqXmT9FuwfyJhmgUlvJcW6Y+xBN44q9cHiLuqBiaIOQ 2Y+/plKunsiEBTAsfWN4RszEDpzb+lSMZXID6p4Di6TuHvuYSqcsDaSn+RIrZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818216; a=rsa-sha256; cv=none; b=u1oYSJdH+MgCn5/n++6KqPGHrQc9MmLxxR4Z3bQojousOmqJ7DWodO0ZBvs1GwaBNRk1xK KgMHQkJ8+hBNkZI3ZDiEMWtctMi6rSUmEaCVYubcZ2VVfFhKOfgzOpjjribCgE1gI30BK9 b1VlIVZjRYgt3AettcF7kuNxJyfIRjfB3SF+5mRH8EW5Yq4v35BSVDDz0d6UGRHG8cYsEP Hxqo9futr+lc8T9HKqXTO4F1tp38lEWvRIqbxx/IJfPfNf7v8AYV8gNR2bk0M0XTRbpdml Y8FAoVnHVoIZQCzA7EzJQcjUgGv8Kz5e6+Z5boVIZdkbnNGfVEZe+c8srpghtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrJvq7V8DZuk1uAggTkuWb56Pmo4HJ0NNzesQ9xKvyM=; b=yqnfPYaAK5qSRWwVawWglJxFwcTI12nWbjXkeHMFWL9ig9eKEcyCfhuTTK2pLZM9MzTL08 w1xfkFp+/anhUrqP+05zr1LQ5XsanlNSZ8VSelpI1Cwu2en6wNijFvHLbG5kGjthomO76H WJA1Y9n8NHsyAn57iIReP3iERo5ICewZy+Hm2i9fOOoOZE2gwaBjGjflKe5KbLlWyGMr+0 eg8KLRZTX7+z7ccUHT5U2+fi2iDhGAmtuq7SBCJeJNeVU6B3+/aLH8UnABnS6aAKzEospH YayWKpDuMo2m1uKwryZ8Qj42Lilss2JH1OVAiueJOJOSQhhigqFvmGPUOri0XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhm2g8tzfsf; Wed, 27 Sep 2023 12:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCaudu091647; Wed, 27 Sep 2023 12:36:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCaugi091645; Wed, 27 Sep 2023 12:36:56 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:56 GMT Message-Id: <202309271236.38RCaugi091645@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: 61a14ddfe012 - main - unix: Fix a lock order reveral List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 61a14ddfe012ca7b57a101725e5c654269f200ca Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=61a14ddfe012ca7b57a101725e5c654269f200ca commit 61a14ddfe012ca7b57a101725e5c654269f200ca Author: Mark Johnston AuthorDate: 2023-09-27 12:24:11 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:29:34 +0000 unix: Fix a lock order reveral Running the test suite yields: lock order reversal: 1st 0xfffff80004bc6700 unp (unp, sleep mutex) @ sys/kern/uipc_usrreq.c:390 2nd 0xffffffff81a94b30 unp_link_rwlock (unp_link_rwlock, rw) @ sys/kern/uipc_usrreq.c:2934 lock order unp -> unp_link_rwlock attempted at: 0xffffffff80bc216e at witness_checkorder+0xbbe 0xffffffff80b493a5 at _rw_wlock_cookie+0x65 0xffffffff80c0a8e2 at unp_discard+0x22 0xffffffff80c0a888 at unp_freerights+0x38 0xffffffff80c09fdd at unp_scan+0x9d 0xffffffff80c0f9a7 at uipc_sosend_dgram+0x727 0xffffffff80c00a79 at sousrsend+0x79 0xffffffff80c072d0 at kern_sendit+0x1c0 0xffffffff80c074d7 at sendit+0xb7 0xffffffff80c076f3 at sys_sendmsg+0x63 0xffffffff8104d957 at amd64_syscall+0x6b7 0xffffffff8101f9eb at fast_syscall_common+0xf8 This happens when uipc_sosend_dgram() discards a control message because the receive socket buffer is full. The overflow handling frees internalized file references in the socket buffer before freeing mbufs. It does this with socket PCBs locked, leading to the LOR. Defer handling of file references until the PCBs are unlocked. Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41884 --- sys/kern/uipc_usrreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 291ff7cf8cae..f12693f3982a 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1332,8 +1332,10 @@ uipc_sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, } else { soroverflow_locked(so2); error = ENOBUFS; - if (f->m_next->m_type == MT_CONTROL) - unp_scan(f->m_next, unp_freerights); + if (f->m_next->m_type == MT_CONTROL) { + c = f->m_next; + f->m_next = NULL; + } } if (addr != NULL) From nobody Wed Sep 27 12:36:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwbhn5BZ3z4vPTx; Wed, 27 Sep 2023 12:36: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 4Rwbhn4Dyhz4Ntc; Wed, 27 Sep 2023 12:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pN0ROWoeHjhEmRyOFgDm2IKWrg30efHDDfNvR3+WYg4=; b=AoEmqyfZbD2TO/zsUvwb1QqS7GJ0ltDhUm7vw2LA7u8+POL1vgNXpDfk8veo0xYy9mrbGs fcLU/4v6UuWbABF6ZGY7gbttDPSTuczFazLW0XIOl2fmMHaOBM6SUxd+64RYx85NpNneBB 3fcYNA+2LJqHw2LUkMaJ4CdY58ubu6LWPhGi8p91pjUqyIleQn9kC0noccZS3o2QKnYGzu v055JhRTDwGdpZugNqcwN6ph9O7E83VHOvGkDeLwDKG5fA89fCFE+z59G0/0u+FEFEQGVA cNJLLePYMnowfsMNakyeeBoB3ok2ZnrO9AVpOmqI92Pysv4cf64N3TvQQKSHLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818217; a=rsa-sha256; cv=none; b=js6zGNwj6QOdfGquDtjHI+b14ytEAwswAvwQy+tWwaIJjKtn1iY80Qqq5yBibEAUzMxVvt gJ/Uy6/qhWVn2q/msoogeSUxiJh1HikoZkXHn0UTAO2JQYagSo4yilnVv2rj8R5bKZzizA fxpFUuULXD1H1POdQEl+c3eHszDJTnKT2qQnv0p0+8gSYV7AvSmZQEZUKJtsdaSmS20Ag2 +4h8VLPKELCRIXjnCbS80pNN0WoOdfBwhrvNdmKYq8kpuxMCxnAzu5N4ivqq4cizmvy39A fj8XmBKhsQNgHAGD+v8UEDn7XUM2ueph6l0xic9UeyyP2sLNfcf7/gBm/a7QaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pN0ROWoeHjhEmRyOFgDm2IKWrg30efHDDfNvR3+WYg4=; b=LxRxEgeY9ORsfhVhZ69RpnGf1cj9rJy7cKvVyDCts60vttoWiohR/z/113hq2s4Oy+5l8Q x89V2O3mrIe7JgPCcA4ZCWCHdTwgg/Cw5ArQ8eJfVdly/QQtOOpk2kfgfJEo6m5LKQy3R6 QlPp2A7uhXKK8zlI9epdg9qXimmQD34TpxgkC/4aUtW7Zn0bdY4qwlIUoU0vA1xVaXkiZ2 kB9YiO/9j9l+Yh/eaV8ILUVx63qH9DJ54DUhNdkkFNJ2gn3s6JymtgDDE/hqg9KZiQjv6J UazzysUfgInRe4JIog0AXO0RULj1fwc0gbLjnhgtB9bJZTjDBNoB9NbYa3UxSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhn3Gcczfsg; Wed, 27 Sep 2023 12:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCavNR091698; Wed, 27 Sep 2023 12:36:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCavL7091695; Wed, 27 Sep 2023 12:36:57 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:57 GMT Message-Id: <202309271236.38RCavL7091695@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: f97a3f6a0171 - main - ObsoleteFiles.inc: Fix the latest entry's date List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f97a3f6a017103b2afaf451af055ec4131a455a9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f97a3f6a017103b2afaf451af055ec4131a455a9 commit f97a3f6a017103b2afaf451af055ec4131a455a9 Author: Mark Johnston AuthorDate: 2023-09-27 12:27:31 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:29:34 +0000 ObsoleteFiles.inc: Fix the latest entry's date Fixes: 7736786b08e8 ("Retire old diskless setup scripts") --- ObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index b0b004843eeb..0b9d6247629b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,7 +51,7 @@ # xargs -n1 | sort | uniq -d; # done -# 2023xxxx +# 20230925 OLD_FILES+=usr/share/examples/diskless/ME OLD_FILES+=usr/share/examples/diskless/README.BOOTP OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING From nobody Wed Sep 27 12:36:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwbhp665mz4vPS5; Wed, 27 Sep 2023 12:36: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 4Rwbhp5RLkz4NsQ; Wed, 27 Sep 2023 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRAcHdWvS4dUMbh2gizmlW9B3Ddc8KKnO7MVWf5cM/E=; b=JKki8hFlnVOV7i8uaRsqkuinfrP9fDkeY75l7G3PBjj7M64PszBPe5t6jkAn/qws+sC2jp C9Sqa2Mn5+COGyCbKdFSXdZsm7QtPW9e3Yj0Pu+F2bThhKdB5PcH233567LkAWD5uXrU9a 5RqGM7GEDFFKrdvZmq8r2645Q4dWAlKTGChRXTohHyYNZ3Xikdiv8p7Trp794W7FVqfB4b mEUFgD5upUkbelK9a7gPau/ouXAXScfx06LwawiJwP7+KhnT1WFT15hZwpJuXYO2d/nKQi odkNhk0swS5Dm0KB+bgDy+NUAgk/j6GKgzps11YE4j4yznOYC78Uyq9uH8nf7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818218; a=rsa-sha256; cv=none; b=dnwd+DhAXrHDwe1W5wxxzq+/p5wX8FbyUWH+CJDqnhTYwC2rpzEHeVUWnMYqD7kYJDI6k/ SflzHpEK+cMbhwd6uc+9O8OFcJYJ0Los5cME5ZlJQn/Rl+asq0ZESmMJ45EYW6Ts+78qao TP4cyt1vZx0gvr025/J72HoVscpw6w1c2A341fDz3eZeoT9JtQfG7g+glCv0BWz/eYmAAE NIPi8616CpgpZHpfCdWhDaB5m91NuPO2J/S2K1mr6xjx598GA7yjf0rC6rgCtPQxFfHe+o FzBflr0ZhDxYaMrzYtiXSTrV6jg7bJaVYmizGmUZ3EBW88BPLC3mdtHDgzuu0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRAcHdWvS4dUMbh2gizmlW9B3Ddc8KKnO7MVWf5cM/E=; b=NgEWkngePht+hdK885A+tEIFERb+yG3oeStV5xJMAVSmXWqFTLfxyEPHxAomD+AB/Qomv6 K9JLrVBleO8EQ11D4RGfd7C0CwlgtmzB2BSTWunbNvrTfXxbwzG+aciCOVYWsaQHojTnwF sNBFUyG3cf6wseAmij6/+RNbKJdDrMCFs1nZiIR4xkXTECdkjD541X/2BfXRuIzhWbedTh CEFOKs2OayVOgjcf3jN6Ck67QVNBvNv8H7KadNmeLocx3CoXl760Nn5CjM0+4yvOtpy6/R 4N8KrFzMe3Bcab0xlNPL1eMxXZIuAjVBM9J06uR0Y8hhfEljbeUHSwPF3RGuhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhp4WVLzfw3; Wed, 27 Sep 2023 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCaw6g091751; Wed, 27 Sep 2023 12:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCawmI091748; Wed, 27 Sep 2023 12:36:58 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:58 GMT Message-Id: <202309271236.38RCawmI091748@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: a3074ff2122f - main - socket tests: Avoid a buffer leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a3074ff2122faf0eaba7d3f989e916b1c7f21912 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a3074ff2122faf0eaba7d3f989e916b1c7f21912 commit a3074ff2122faf0eaba7d3f989e916b1c7f21912 Author: Mark Johnston AuthorDate: 2023-09-27 12:30:50 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:30:50 +0000 socket tests: Avoid a buffer leak Reported by: Coverity Fixes: 38426b32e106 ("socket tests: Add a regression test for MSG_WAITALL") --- tests/sys/kern/socket_msg_waitall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/kern/socket_msg_waitall.c b/tests/sys/kern/socket_msg_waitall.c index e9018b47eec1..e1e10a4c7886 100644 --- a/tests/sys/kern/socket_msg_waitall.c +++ b/tests/sys/kern/socket_msg_waitall.c @@ -54,6 +54,7 @@ close_test_client(void *arg) ATF_REQUIRE(close(s) == 0); } + free(buf); return (NULL); } From nobody Wed Sep 27 12:40:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwbnQ6RrCz4vPdg; Wed, 27 Sep 2023 12:40: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 4RwbnQ612Qz4Qby; Wed, 27 Sep 2023 12:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bu2nb/x6wW6lAnt370nV1XgssgPAmOEN9KrqJMUT9Ac=; b=lyq+2yyUKH9Hx70Q+l2LSaVbOZzj4OBWwhYszM7yesvlab3B4m5+2DLIIXdVVkTDxxahAQ 36fz1dPW7/YiaVbNrFGW1AMGj30TOlWclU8k23Tez3Zcc+81FBBKbsOiNuAdi+reX8/chs Kwzdy0oibsgoQj42ZAnGW+K6evqufcXmRhX6nvxV6aFnWT4GMvwMIufLRT7VmC3MJ7qHJ4 GKbnqJJm4+PrSSRHHRzdstN2grFeW6AvYE1EsMmJS0Gl9FliWNMLztejr52fAwc8GbUe1k GWBur5jL/Cwsp9hJ5XLrhtoJX4bMF/uw+GV/VohMma7jFNNn+K7/GcydwWnEWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818458; a=rsa-sha256; cv=none; b=A6qB9FHuFVCWxuMi3OS949Sj4VRQAn9F/b/shukafaUQNMEFxqVTGN3lpzo8cPJuow9nvZ rYqSpyfETIbe5ftqu28SQpShqlpwXuVPozlk5EDhMd9pwcLuVaH3ih/X0y0brfz37hXFJQ 81Nf6hBDneaRky8S1qTxCy45w57IRax+K8S9abj2oKNFVNeNuVOjvEwU9L00Bp5BSNSK18 4jFj2oRiZ9tlRZL0NinrMsk0aH2mb6fU695sqsQNTPahaKwSkbA7XOFKSdVIi/rK1y4F1I aI4jegYCPTTHgO61g8FEPBxty8t0zJmvDFFO7NJMEp2JjK2ofwIa4JM1436F5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bu2nb/x6wW6lAnt370nV1XgssgPAmOEN9KrqJMUT9Ac=; b=NOihGuMyq34kmdnm9jU+NsFsS4f/BBcgAEG7UpUEpama06ek5xbKwr4OlzYCZ5qTWBgdYx cka3yZTj2vc/mw57s1WpcQ2vIdoAIcy+0ONMZu+MumD0TVTXTFN8nzwufmac8tq0woJAtR XbZgssJM/nXI7P3N6RBWQtFxyuppzMAEf2s1Mg0ROv87NB7LReXMlPA9o/pvvK8EI0KgPr fTmjrE3myEru/hwaucSANb/LBlt1bir9VTdnd2Hp0xw7IXEF08T0/z3YsJ/WptyBuyueal 4RTsaQx2p82MMq8TzuNI+PAHP7XBUbOw6HI358KJN+mnJ6uIynv6ZErPlghjxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwbnQ5448zg5l; Wed, 27 Sep 2023 12:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCewTj001068; Wed, 27 Sep 2023 12:40:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCewW3001066; Wed, 27 Sep 2023 12:40:58 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:40:58 GMT Message-Id: <202309271240.38RCewW3001066@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: 81f36fbc98dd - main - glabel.8: Warn against using generic labels on a shared device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 81f36fbc98dd74ca923938e0329919d426811b0c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=81f36fbc98dd74ca923938e0329919d426811b0c commit 81f36fbc98dd74ca923938e0329919d426811b0c Author: Mark Johnston AuthorDate: 2022-05-26 13:48:17 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:39:31 +0000 glabel.8: Warn against using generic labels on a shared device Also suggest against creating a generic label on a device which already contains a filesystem. PR: 264166 Reviewed by: imp, delphij, Pau Amma MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35326 --- lib/geom/label/glabel.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/geom/label/glabel.8 b/lib/geom/label/glabel.8 index 5283a604e45b..a23f425bc5e1 100644 --- a/lib/geom/label/glabel.8 +++ b/lib/geom/label/glabel.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 12, 2017 +.Dd September 27, 2023 .Dt GLABEL 8 .Os .Sh NAME @@ -141,6 +141,26 @@ Generic labels created and managed solely by are created in the .Pa /dev/label/ directory. +Note that generic, automatic labels occupy some space on the device +and thus should not be added to a device already containing a file system. +In particular, +.Nm +reserves the last sector of the device to store the label information. +If the device already contains a file system, +.Nm +will overwrite the last sector, possibly damaging the file system, and the +file system may later overwrite the label sector. +Instead, create a label before initializing the file system, and initialize +that file system on the device created by +.Nm +under the +.Pa /dev/label/ +directory. +Then the file system will correctly account for the space occupied by the +generic label, +since the +.Nm +device will be one sector smaller than the device from which it was created. .Pp Note that for all label types, nested GEOM classes will cause additional device nodes to be created, with context-specific data appended to their From nobody Wed Sep 27 12:52:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc2f18kQz4vQXf; Wed, 27 Sep 2023 12:52: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 4Rwc2f0hjFz4T8j; Wed, 27 Sep 2023 12:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wQiH4U0E2XtifZiNvfoXsvWobMWvy+bOSWE7p3x82P4=; b=w7e9pFcq8sOhLMs8ETBnht0k0NhDCLZBF7jmfmKSlcTLDjCtzNvB7n6X1J47MCmzD22ffX xU9/z29HiKNF2LdStOeoNbxJpxRMemF5+gPV4LCyg/JZ2MuGjhP4Hfc1GSmM8sDi9rz4do CZs41Xrcaw1y6i6O96XD7eS4qTWyzuFyA5Ge4+8WeQcCORQxIQr0arkyZJngBqW0XtYNJh oZ1uSL3WaeIwub2hxMLAT3ucT6LVKCNKSnAIz73IfThsjoZKrNGo2yvfNLOTlibX+1Ox1L tEiBrUIAptzZLqxjn+jyNnlJb6NtyFhAiLAXXpWmugzPFtFTXIs65PYo0qQxIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819146; a=rsa-sha256; cv=none; b=ZLe/WceGBGpbdl8n6F+dKzN7+I6XuSnaNkVjwoyAQ8ELDP6QitHpRkJZZIyZ1my8hwAe1u yjTMuXuAI2oN6m4S3Kp68omft6J/pvZ39dWBp2CE5TViXLKRUPIe+P5JVkK/e8GQuHu+sv YF13zqcWFTVslBBrmQ8FJr9FUI3ggvXnMVU8AnXhfDDqnlNqb8k01dqW633wdbaG+lY5wU Y/Xuzn5eMi7DR+Bdwnb/jG5oS52sFdmNh731XtX3APPJ+4V7rYkdRl5tEZfifuUItws3/x X+nnASjs4wTLG3LlrVQws868+IjjZlWCwNjCNvWEw8OrLIbaD8+ESVLr6D/Myg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wQiH4U0E2XtifZiNvfoXsvWobMWvy+bOSWE7p3x82P4=; b=qaP2S31Ctl+pb1J3P8CnAUq9+uz4oFXNcHrKwXZZFI91LUQfZEHf0x3WqhKOKA6zjiwaoq QlTqL8fuvmThTa6vE/B6iATXCVyDW953k6GXiH3sQ63rtaxYLiW/NUtZNkGSNVWDvistCi 0fnUkwn+xRzxEjs6zOc+E+bUNa789+7libd3CuDD7BZM/+WDsmY4fiM+Ba7CByYyTNpOgl ptx4KVX9FNU0CNZa6W+4NLov4CsbyLjpyu+P1/w28Y4lgLozXEsyfuzx5m+nyDXDYb6dtN fPQBIPo0Hw6+awRFwTtEtyiZY2hdsUuv4XesPb2b3kNB2CRwG/MffI1qrhKWcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc2d6swTzgSb; Wed, 27 Sep 2023 12:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCqPe1023096; Wed, 27 Sep 2023 12:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCqPkK023093; Wed, 27 Sep 2023 12:52:25 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:52:25 GMT Message-Id: <202309271252.38RCqPkK023093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 862d2d514cb7 - stable/13 - sockets: re-check socket state after call to pr_rcvd() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 862d2d514cb782353bce1af99d670db08b1e6c3c Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=862d2d514cb782353bce1af99d670db08b1e6c3c commit 862d2d514cb782353bce1af99d670db08b1e6c3c Author: Greg Becker AuthorDate: 2023-09-09 23:38:24 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:33:08 +0000 sockets: re-check socket state after call to pr_rcvd() Socket state may have changed after dropping the receive buffer lock in order to call pr_rcvd(). If the buffer is empty, re-check the state after reaquiring the lock and skip calling sbwait() if the socket is in error or the peer has closed. PR: 212716 Reviewed by: markj, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41783 (cherry picked from commit f44102411e1b16363e91a074c9c403069c550e4d) --- sys/kern/uipc_socket.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index a4623329e686..e5997e439964 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -2326,6 +2326,10 @@ dontblock: VNET_SO_ASSERT(so); (*pr->pr_usrreqs->pru_rcvd)(so, flags); SOCKBUF_LOCK(&so->so_rcv); + if (__predict_false(so->so_rcv.sb_mb == NULL && + (so->so_error || so->so_rerror || + so->so_rcv.sb_state & SBS_CANTRCVMORE))) + break; } SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); From nobody Wed Sep 27 12:52:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc2g2jxyz4vQXg; Wed, 27 Sep 2023 12:52: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 4Rwc2g1y6dz4TMl; Wed, 27 Sep 2023 12:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n1Z1+RgqWWgKRaTo8rICf8dljLQkqpbdY5+61dcoJD4=; b=sUGIbwssH0eY9pXAJ+BhNjrgcDSbQtfDgp6D4ACaN3aS0LjiDjzu3G/W5VSoQ49xkAia/n yOOUFYUGLsKdejY08fOO4C8NdonWo8R4PI3T6u3t+MXhdmPppjPFGeDjNa7bcd4W0bg8FA eU2J8Q7btxVvS0D9sWXFafrEwZDnVwloVbzvjtp7To171RSNI/TOYct8pUtQxII3w5nEVl 3rNm+4i8Za2X0qHSNgP/XIn7jsz1ilKCoL5hvjkhW7tAI/JoaRjbrcCZ+YhiYll1d3ghvq sJZKgy1UybDjThBQo8/tC3SgYvJELCxvE6ObyklEhA/F1yYme5sGbsK00gyj2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819147; a=rsa-sha256; cv=none; b=urR+wjuyxkYB7/xYIKuAV90DzsK6ZUM4MAJ5HIyIc/6RXvQ7mMsilu1iu+flfeHsNN29t6 /eJSkHytA7cTCA2GU9flmYVZjuFoALHJDHgpdaRaZUGpxemIH4IlfK4haDAwDvwYGJlvqU B7X0D5EtzHT+I+hKWDDr/uEpkiVP7Y4CTLoC/3cdZzqq2wRBpMghCronbxHoK/tp9HPtlJ NlQ0KIL9Cn3zV4C41IX2TWPgkBNUTiNEbWv17gJyfe4fKGgZuGVm4gvktTWXHxSV7cqkRj mMk5YlW2nGQmB3Ljk8+2uJ8OBzLxoo3+fQgyA/+ddVJlG7Tqn3x0Js2AA6BRGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n1Z1+RgqWWgKRaTo8rICf8dljLQkqpbdY5+61dcoJD4=; b=WBnnG4RTV1CrHKup68sfP3y96TFMTcuAiXEKkKBbDXL5NiLrZ+Cu+mbkTGC7LpN7drTr2p 5Zs1QY2JuiHJjoaQNKybR/LTx9/q/NKQiuR1IlcPc5vUQrOShWvgS9Nr8fjSO1JQumgHSJ ChQkzEB0LEAxXZbkthqgDZe94C+CEi2JIHtb/ZhK2CRapa7U3OmXCKEJlXXs7TZii6pgzT pL8n6UkKdRFaanm69UDPNUtseM2CKzhztMdPtoXI2IMOVwyIZfwYNVgSFeCipokJXsDtyS BP9cGjiL1vH03L8aocWuEkr0ZcOIBrGBDpzaZWAQDeJUaD31qhFbinaxovp6ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc2g0zTGzfx9; Wed, 27 Sep 2023 12:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCqRGE023147; Wed, 27 Sep 2023 12:52:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCqRkE023144; Wed, 27 Sep 2023 12:52:27 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:52:27 GMT Message-Id: <202309271252.38RCqRkE023144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e4ed8e67e206 - stable/13 - socket tests: Add a regression test for MSG_WAITALL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e4ed8e67e206c069955d541de41addcd0da05b82 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e4ed8e67e206c069955d541de41addcd0da05b82 commit e4ed8e67e206c069955d541de41addcd0da05b82 Author: Mark Johnston AuthorDate: 2023-08-31 17:29:29 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:33:50 +0000 socket tests: Add a regression test for MSG_WAITALL PR: 212716 MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 38426b32e106cf251520259b29779372eda7a5f8) --- tests/sys/kern/Makefile | 2 + tests/sys/kern/socket_msg_waitall.c | 181 ++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 8dfb3ba47a90..95d6ef9b7bc0 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -25,6 +25,7 @@ ATF_TESTS_C+= sched_affinity ATF_TESTS_C+= sigaltstack ATF_TESTS_C+= sigwait ATF_TESTS_C+= socket_msg_trunc +ATF_TESTS_C+= socket_msg_waitall TEST_METADATA.sigwait+= is_exclusive="true" .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH:Mpowerpc*} == "" && \ ${MACHINE_CPUARCH} != "mips" @@ -62,6 +63,7 @@ LIBADD.ptrace_test+= pthread LIBADD.unix_seqpacket_test+= pthread LIBADD.kcov+= pthread LIBADD.ktls_test+= crypto +LIBADD.socket_msg_waitall+= pthread LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat LIBADD.sigwait+= rt diff --git a/tests/sys/kern/socket_msg_waitall.c b/tests/sys/kern/socket_msg_waitall.c new file mode 100644 index 000000000000..e9018b47eec1 --- /dev/null +++ b/tests/sys/kern/socket_msg_waitall.c @@ -0,0 +1,181 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Mark Johnston under sponsorship from + * the FreeBSD Foundation. + */ + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +struct close_test_params { + struct sockaddr_storage sa; + size_t msglen; + int count; + int af, type, proto; +}; + +static void * +close_test_client(void *arg) +{ + struct close_test_params *p = arg; + char *buf; + size_t buflen; + + buflen = p->msglen + 1; + buf = malloc(buflen); + ATF_REQUIRE(buf != NULL); + + while (p->count-- > 0) { + ssize_t n; + int error, s; + + s = socket(p->af, p->type, p->proto); + ATF_REQUIRE_MSG(s >= 0, "socket: %s", strerror(errno)); + + error = connect(s, (struct sockaddr *)&p->sa, p->sa.ss_len); + ATF_REQUIRE_MSG(error == 0, "connect: %s", strerror(errno)); + + n = recv(s, buf, buflen, MSG_WAITALL); + ATF_REQUIRE_MSG(n == (ssize_t)p->msglen, + "recv: %s", strerror(errno)); + + ATF_REQUIRE(close(s) == 0); + } + + return (NULL); +} + +static void +close_test(struct sockaddr *sa, unsigned int count, int af, int type, int proto) +{ + struct close_test_params p; + const char *msg; + pthread_t t; + size_t msglen; + int error, s; + + s = socket(af, type, proto); + ATF_REQUIRE_MSG(s >= 0, "socket %s", strerror(errno)); + + ATF_REQUIRE_MSG(bind(s, sa, sa->sa_len) == 0, + "bind: %s", strerror(errno)); + ATF_REQUIRE_MSG(listen(s, 1) == 0, + "listen: %s", strerror(errno)); + ATF_REQUIRE_MSG(getsockname(s, sa, &(socklen_t){ sa->sa_len }) == 0, + "getsockname: %s", strerror(errno)); + + msg = "hello bonjour"; + msglen = strlen(msg) + 1; + p = (struct close_test_params){ + .count = count, + .msglen = msglen, + .af = af, + .type = type, + .proto = proto, + }; + memcpy(&p.sa, sa, sa->sa_len); + error = pthread_create(&t, NULL, close_test_client, &p); + ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); + + while (count-- > 0) { + ssize_t n; + int cs; + + cs = accept(s, NULL, NULL); + ATF_REQUIRE_MSG(cs >= 0, "accept: %s", strerror(errno)); + + n = send(cs, msg, msglen, 0); + ATF_REQUIRE_MSG(n == (ssize_t)msglen, + "send: %s", strerror(errno)); + + ATF_REQUIRE(close(cs) == 0); + } + + ATF_REQUIRE(close(s) == 0); + ATF_REQUIRE(pthread_join(t, NULL) == 0); +} + +/* + * Make sure that closing a connection kicks a MSG_WAITALL recv() out of the + * syscall. See bugzilla PR 212716. + */ +ATF_TC(close_tcp); +ATF_TC_HEAD(close_tcp, tc) +{ + atf_tc_set_md_var(tc, "timeout", "10"); +} +ATF_TC_BODY(close_tcp, tc) +{ + struct sockaddr_in sin; + + sin = (struct sockaddr_in){ + .sin_len = sizeof(sin), + .sin_family = AF_INET, + .sin_addr = { htonl(INADDR_LOOPBACK) }, + .sin_port = htons(0), + }; + close_test((struct sockaddr *)&sin, 1000, AF_INET, SOCK_STREAM, + IPPROTO_TCP); +} + +/* A variant of the above test for UNIX domain stream sockets. */ +ATF_TC(close_unix_stream); +ATF_TC_HEAD(close_unix_stream, tc) +{ + atf_tc_set_md_var(tc, "timeout", "10"); +} +ATF_TC_BODY(close_unix_stream, tc) +{ + struct sockaddr_un sun; + + sun = (struct sockaddr_un){ + .sun_len = sizeof(sun), + .sun_family = AF_UNIX, + .sun_path = "socket_msg_waitall_unix", + }; + close_test((struct sockaddr *)&sun, 1000, AF_UNIX, SOCK_STREAM, 0); + ATF_REQUIRE_MSG(unlink(sun.sun_path) == 0, + "unlink: %s", strerror(errno)); +} + +/* A variant of the above test for UNIX domain seqpacket sockets. */ +ATF_TC(close_unix_seqpacket); +ATF_TC_HEAD(close_unix_seqpacket, tc) +{ + atf_tc_set_md_var(tc, "timeout", "10"); +} +ATF_TC_BODY(close_unix_seqpacket, tc) +{ + struct sockaddr_un sun; + + sun = (struct sockaddr_un){ + .sun_len = sizeof(sun), + .sun_family = AF_UNIX, + .sun_path = "socket_msg_waitall_unix", + }; + close_test((struct sockaddr *)&sun, 1000, AF_UNIX, SOCK_SEQPACKET, 0); + ATF_REQUIRE_MSG(unlink(sun.sun_path) == 0, + "unlink: %s", strerror(errno)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, close_tcp); + ATF_TP_ADD_TC(tp, close_unix_stream); + ATF_TP_ADD_TC(tp, close_unix_seqpacket); + + return (atf_no_error()); +} From nobody Wed Sep 27 12:52:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc2h41xVz4vQc5; Wed, 27 Sep 2023 12:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwc2h3F5jz4THn; Wed, 27 Sep 2023 12:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RQYNsRaw4BIS8ulq/t0m7pHUtxIKjNyBecjq5SZTffk=; b=VJV8tibXNAh/Gbn5HfXj+G7fefSPYo8cBfM3ERTaoDM78VGHbM1LUybOFI9KYsg9A4z53z SUi/uFqf9eLiLxDgqfkzFp0HlF8qzxMafs/k6DCQPZ5b4X8haiQ9sfnQiObPcobspeU8Re tUR1tu3wjYfCWouBQ9cgaqDGsLXJrGKfzMmoFK/YBIwVZ7njGwYZA0drkbbL8F2jr71bNq 2wLqdpu6EWa5U1QknNBdVAtrHEjB8WmYbMOlbzdBLpERtOsNFzi+KfGRs3r9O65Np9cOX6 MFaoxcJkf9PNvx+QO4rh89edCg1fcwYLqZH85PmcudYsCP5Ryln501HZZojEMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819148; a=rsa-sha256; cv=none; b=mA6IrznhkZuDO2XyNPIAsXoxeKpP59BWd03Pc4LA4Vh5+BPGIFkuSYvESVo0nGt3ipdIl6 Etw4PvQbsLvWbiNQ/9Gbktsl3aWwg8us28gV4EldT6FkYG+71GIU3zUSfZeRDpHU5IXG7O 9WjLOu/dTAsAL1yXJSrRfuWuEDiGHuqTmnflubHmFaYQeLIbYGjwtxvoiQEErl6ctmukx0 gaUJag+2nQ94zjX1YbRUiAdke7lBNH6A9XjeA+rzHWyKJwOrhBJVcvgM1LLInymw1rZYE/ Ib+PrZEzXKa6ZBZCIFaTxrT+MlMUajsDs5uKQ4IXzshx/+vDimXlsIEx/ZUzNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RQYNsRaw4BIS8ulq/t0m7pHUtxIKjNyBecjq5SZTffk=; b=VmyhnFaeMdaUyy5oCR8re8F1Kpf3xX5S1iJjUkI7EfINaVmVDQkIS1kUfmO2wWGy/vrvpI 8MAgvLc54w2rSrf2a8Xhxjk6AQaom5H91+jXqKsBL0bjCMkm8A52Pm0D3B3Tp+wcS8I1pi S30L9cdklZyWWoWqpVQF3sXsJ8mUbG0iiRBcm/RpoFwDAL2vahX2vOhv7ve3Iq4Cmh4aez 3F0i9ny51SGB9QXMJiG01almAtG/rwS8X3BCJqs2A1Ptopnd52IQKrVq/WSkVFWJGDorB7 hm/XhdBkeFG0HnJKKmh5KrJVfGRuYmG6Qhur8I9fIjs+SXQITx0rl8S4ZhECSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc2h1vHXzgDf; Wed, 27 Sep 2023 12:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCqSij023203; Wed, 27 Sep 2023 12:52:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCqS3C023200; Wed, 27 Sep 2023 12:52:28 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:52:28 GMT Message-Id: <202309271252.38RCqS3C023200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0df75d6c87a5 - stable/13 - dtrace: Fix a kernel panic in printm() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0df75d6c87a5f43de444ab6ae2093cc69f646c82 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0df75d6c87a5f43de444ab6ae2093cc69f646c82 commit 0df75d6c87a5f43de444ab6ae2093cc69f646c82 Author: Domagoj Stolfa AuthorDate: 2023-09-06 13:25:00 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:35:50 +0000 dtrace: Fix a kernel panic in printm() When using printm(), one should always pass a scratch pointer to it. This is achieved by calling printm with memref BEGIN { printm(fixed_len, memref(ptr, var_len)); } which will return a pointer to the DTrace scratch space of size sizeof(uintptr_t) * 2. However, one can easily call printm() as follows BEGIN { printm(10, (void *)NULL); } and panic the kernel as a result. This commit does two things: (1) adds a new macro DTRACE_INSCRATCHPTR(mstate, ptr, howmany) which checks if a certain pointer is in the DTrace scratch space; (2) uses DTRACE_INSCRATCHPTR() to implement a check on printm()'s DIFO return value in order to avoid the panic and sets CPU_DTRACE_BADADDR if the address is not in the scratch space. Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41722 (cherry picked from commit 8527bb2aee6ca9013c34445de88217a954b6628d) --- .../contrib/opensolaris/uts/common/dtrace/dtrace.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index 972ec6c66723..6ae0322ebb0f 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -515,6 +515,11 @@ do { \ ((mstate)->dtms_scratch_base + (mstate)->dtms_scratch_size - \ (mstate)->dtms_scratch_ptr >= (alloc_sz)) +#define DTRACE_INSCRATCHPTR(mstate, ptr, howmany) \ + ((ptr) >= (mstate)->dtms_scratch_base && \ + (ptr) <= \ + ((mstate)->dtms_scratch_base + (mstate)->dtms_scratch_size - (howmany))) + #define DTRACE_LOADFUNC(bits) \ /*CSTYLED*/ \ uint##bits##_t \ @@ -7736,9 +7741,24 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, } case DTRACEACT_PRINTM: { - /* The DIF returns a 'memref'. */ + /* + * printm() assumes that the DIF returns a + * pointer returned by memref(). memref() is a + * subroutine that is used to get around the + * single-valued returns of DIF and is assumed + * to always be allocated in the scratch space. + * Therefore, we need to validate that the + * pointer given to printm() is in the scratch + * space in order to avoid a potential panic. + */ uintptr_t *memref = (uintptr_t *)(uintptr_t) val; + if (!DTRACE_INSCRATCHPTR(&mstate, + (uintptr_t)memref, 2 * sizeof(uintptr_t))) { + *flags |= CPU_DTRACE_BADADDR; + continue; + } + /* Get the size from the memref. */ size = memref[1]; From nobody Wed Sep 27 12:52:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc2j4hRNz4vQc6; Wed, 27 Sep 2023 12:52: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 4Rwc2j3s07z4TJK; Wed, 27 Sep 2023 12:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V1H1Pqf8oX5zYgltfexr7NuW5zUDD8L67gNrNWoC3z0=; b=wSdd2wLSEBG99/JNHKe463IDV0UroDioIP+E8GnVOli0brTU3z5Sy9oJSZy+wl75kK3L5d u+6MwbWkLIKPv8DntnCHuQYLudbfb3M8dpCeznC6X9pu544cTOVTiEHee67KJ9WBJ3VUjs WSee/tcGufo93Lgt2rSzrqgQECGMWa4hZQZHxipIFS/1LrNRhAiyBe+JpsuuEWiKvF1cCV 70BW7K1h8aX/NFPK3X8wB5ep3AJ3GGAlPuruiseBFhPiej7M+KXGxI95srb8DPSRBSHWbI efxNuplaMEuqkb9dV+jhZ7bGYRvjlLUsIWGxaFc7sr7RSdWCT9LLo/34+uUY+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819149; a=rsa-sha256; cv=none; b=FxHD4E8Q6J53SxpDN07b7sG155oCnQCwQ1c7LbbVRtpDRYUTWj6zwH169LNIE3dm1qD3Hw oGKccUooKdoXotRzDdy0pKsne1ZOuGTnzjKdLF6j1klBSqdUMqS7aGrIDPfXsnO6RWAKwo vekQfN9TCZd6Md2Nk7rLOku1CS52m3bLvv11AXPxot4uD2hY7UtMlifI38O6+F8ubSol9t gmElqJLU25gVBI2V9tsAEz5BQeVECdBmHfxYZTUebPFF6GB2zyZuZS4CzbCxfMRcaq61JE +iEsmHv7dHEJmmicrNEiqKv+tV5VpL1asoG9mA2n1wLpPLEB6mS9V2XPwrFBnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V1H1Pqf8oX5zYgltfexr7NuW5zUDD8L67gNrNWoC3z0=; b=lIdx/VtfQY8qxKSFH5OawUZ9RK3Y1DrGMlhTV0IHGFerH/e+3hXP4cYf6J+434WyS4GgZu gZ+yLCkelUN814I1w30vtGL/DIEt6Hk0oo59oa6uA5b6Q3OYCRQkV7yHOdn2a99iFxhxGg CfU0bZsq3U6RSTbc5OwhqBS/FQ1ajYz6x5j14R7mToAXnoL7WziRHZnyrQF6IzzGtrX4QL UYbQisqQX9td6OxUo89g1WrtbjEPRpiYN6Gx37g9DN1S4yA0M8WR5CH/xzsG5nQRDwTrMm qHwmhpuo9b2ZwNUsetNzGNz+3SF/Ts/VSyllusR1cMZION+qHen7+fX7TbHNuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc2j2sf0zgW4; Wed, 27 Sep 2023 12:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCqTeK024139; Wed, 27 Sep 2023 12:52:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCqTm4024136; Wed, 27 Sep 2023 12:52:29 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:52:29 GMT Message-Id: <202309271252.38RCqTm4024136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7b9b175e4fde - stable/13 - socket tests: Avoid a buffer leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b9b175e4fde498132b314c38e6bda365869c489 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7b9b175e4fde498132b314c38e6bda365869c489 commit 7b9b175e4fde498132b314c38e6bda365869c489 Author: Mark Johnston AuthorDate: 2023-09-27 12:30:50 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:52:11 +0000 socket tests: Avoid a buffer leak Reported by: Coverity Fixes: 38426b32e106 ("socket tests: Add a regression test for MSG_WAITALL") (cherry picked from commit a3074ff2122faf0eaba7d3f989e916b1c7f21912) --- tests/sys/kern/socket_msg_waitall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/kern/socket_msg_waitall.c b/tests/sys/kern/socket_msg_waitall.c index e9018b47eec1..e1e10a4c7886 100644 --- a/tests/sys/kern/socket_msg_waitall.c +++ b/tests/sys/kern/socket_msg_waitall.c @@ -54,6 +54,7 @@ close_test_client(void *arg) ATF_REQUIRE(close(s) == 0); } + free(buf); return (NULL); } From nobody Wed Sep 27 12:53:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc3c1kFjz4vQxv; Wed, 27 Sep 2023 12:53: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 4Rwc3c11JPz4VSQ; Wed, 27 Sep 2023 12:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1/tJV9ZSBkQdFpgA8X0LfgS6AaTQ27A36VpRjXDvGUc=; b=FsrRaJwYlTiu3T9glB6xN+n7372g/rvrcd2zdTFtwmzxZpfK+qBvgHbuJmqtrbB2KgoAfO 8z0OhShtHNLRuXjn7xVE5wRStwoprv2MduBGsCQ8yjEIC8NPcj3Bx6Af4mZu3gxLUPhGBR x+LK0qkSBip73MbnCirKW4ZDsNgehh53FZI+NEgPhn6bRYfX3xF1cpqv6dN46xL3++imkB C/GFdVAQbHALTmlVQnvlDZOZbhJ+0IS2BhPO6DkcQpO5aOXCnztNBb/rNBNy22lnekCvXB x/3OFEh9KcAemO0F98mULrzWt2sln78vHx6o7j0udm4typD+gRtK+aJyH9zhrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819196; a=rsa-sha256; cv=none; b=ln1QANUkaofq4QYTmXJ+FqXdXONdp+/xyhp1SrMgp59+LrOD3J2HUZcapeaY9xRPeTiYUk GgNW80pBtjzIvIbqBP1g/EStXZYJMIMdQ5CRxzC/1Q2rCQhFKGCTkCNemYOCGILVpd3+tP msT2fU3JwtArUnPVDVi8OT/0vTKo7wF7OJ0QzZBq8TJ6m+329R1tBH04/W4cSSl0kizu9W RMWZfH2RYQSgCp+IsrrAGgHgNZDIS0WFbja9KrR1Bg7/rL4F2yJuCbfedOc6hvLlq/BLIh f3sxc1r9hpFScoDyVuEkYhCj1VowXCeEUqcHJ9423beCuRewBNzCzXQP54ioIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1/tJV9ZSBkQdFpgA8X0LfgS6AaTQ27A36VpRjXDvGUc=; b=a99Mp9k0b8bzCpS4ldtNEZcTffKVLEJl66lSWpBKvI/JeDsLZOYDOJ7Zi247wCsN3BYZvC lkWBFHH0nB8wq4PykVIcEhSiQ0r6GgbSCCNwOJ2yfQPHPFJ1VHtru5ctGS+82OOPYW4dkW y6gvLWHZevkip7f7nFMHqRhl70zE69IdhWfC0wvgm25fJcbWexV7uwhCBrVjoN33u4z+q4 k9DBbTM2Cw5oJoVdH34+WlJepU4k0YbU+dPHJlnTjh6tV+KcDn/hHIk7rZ1DfULbiVJmi4 fOcdrfdy8EpkHt1bF5vMw/kH59scF5LjHoAPf4SjOtEB/0N52Sol6lK3tWCs1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc3c02cQzfxH; Wed, 27 Sep 2023 12:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCrFQg024431; Wed, 27 Sep 2023 12:53:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCrFoW024428; Wed, 27 Sep 2023 12:53:15 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:53:15 GMT Message-Id: <202309271253.38RCrFoW024428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fa1ffd9f4b14 - stable/14 - amd64: Convert a cheap DIAGNOSTIC check to a KASSERT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 commit fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 Author: Mark Johnston AuthorDate: 2023-08-11 15:54:34 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:32:25 +0000 amd64: Convert a cheap DIAGNOSTIC check to a KASSERT MFC after: 1 week (cherry picked from commit f7c733e4fe5d55fd78cd2b0c27483eeaff3f79a3) --- sys/amd64/amd64/trap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 0d9a660abdb8..4d5887369207 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -1188,12 +1188,9 @@ amd64_syscall(struct thread *td, int traced) kmsan_mark(td->td_frame, sizeof(*td->td_frame), KMSAN_STATE_INITED); -#ifdef DIAGNOSTIC - if (!TRAPF_USERMODE(td->td_frame)) { - panic("syscall"); - /* NOT REACHED */ - } -#endif + KASSERT(TRAPF_USERMODE(td->td_frame), + ("%s: not from user mode", __func__)); + syscallenter(td); /* From nobody Wed Sep 27 12:53:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc3d5BqNz4vQjL; Wed, 27 Sep 2023 12:53: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 4Rwc3d25tgz4VYH; Wed, 27 Sep 2023 12:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3BJMVfq96B4rLR/081srqO2OolfR4R10AQXAzwoIcEE=; b=aAlEzCsnQgeHw8YDF4INtqyL61dF0UG3ym+seh1hvefMCbV1g2z/9yhQ3ITfuyIX3ZV+px GUXZOhQYVL3h3UMlBt4IwiFBMXZPobgt8Vf/sTuSxIp2L1rVvq/ukJqq/J7kRweqlmLhNO eV7u7bI2iInERKsI48WZurTeiF65dXB5CSXrtFIFINoGrQppIKpZQiedLSBZvWp5b/8whk P9QyfOTb0CMNNvXE2Ip9UCKMzsJLUocKJJ/ExmG7F5Sz54x/5WhlzkN9XbMWP6GXLzdf9+ ATQTh2pDQzoolqQFEp9cq6sw0odjsHV8le8X/8oR9OpKD2/A6VJox6OGNHFKig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819197; a=rsa-sha256; cv=none; b=YoNIoXJbxtm3WX8VCra7VdRHyIYQX9Mc09QquZI4Vf7fwbGkU/bSY/hXD1M/kKgJhqlKln WA4cPF3++Z7/3NbD6zjm6pOCU9mFZy1PcRMV+3rT+xAR92pwn8GmmzJ2o34ZxIVmtkxXgL Poke3Kjoq0QZzqmBr4oCzP2jSBteo3z9VCvjOSS9g/laASPiwRnQDeeqsskAfeY3WQmlQB eKDgc2yFYp9ou+06y+Qr/dJoBqVq8ujQ3LO1z9unf65Sx0FSRB7KJJaYzFMMqBXOvyMcPZ F59ReIPmypQCIqYkwxjzGn6/voobR1XrzLp7HlTq57dE1he5lWbc9f78BVqkQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3BJMVfq96B4rLR/081srqO2OolfR4R10AQXAzwoIcEE=; b=ce1fkK48y/KGfCHI00pQfDCCLS3dc8nPeZSR8AcfC2NNNfHn2ePb0VKADE/SFrhmSX+C16 7A/hGHSqrQsz7uNBL32mYURwUNn9DqDnunxT6s22I0jnYn160vCe21rIoevZuQYkVKsxCw DEqlXM4+ZqSORKwj8u2EaFMvG7M01RjnALEKwMzu9k4T9AESy4C0heFQgRhAX//QxIReU8 MR5I7F1aN/G6pybf76Pw+RZcBupWPgq8TjEoi4/Y/Ak7XnbOIo11taUqIgPEurGPsMV06C K2/ZDvw76zmI5F2uYQJ1ysndZ3k7fbWq7udGzZ7YfvBs+YmejE2yialaOJehdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc3d16YJzgQr; Wed, 27 Sep 2023 12:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCrHKU024495; Wed, 27 Sep 2023 12:53:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCrHtZ024492; Wed, 27 Sep 2023 12:53:17 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:53:17 GMT Message-Id: <202309271253.38RCrHtZ024492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 66b87decbf1e - stable/14 - unix tests: Use the right type for sendmsg(2) return values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 66b87decbf1e200547983ab7066de453428f456b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66b87decbf1e200547983ab7066de453428f456b commit 66b87decbf1e200547983ab7066de453428f456b Author: Mark Johnston AuthorDate: 2023-09-15 08:59:08 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:32:49 +0000 unix tests: Use the right type for sendmsg(2) return values MFC after: 1 week (cherry picked from commit d643925a79caab5c6de62b066e374935b60bcaf1) --- tests/sys/kern/unix_passfd_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c index 94f0c420029a..d8c0efe5b9ea 100644 --- a/tests/sys/kern/unix_passfd_test.c +++ b/tests/sys/kern/unix_passfd_test.c @@ -182,13 +182,13 @@ sendfd_payload(int sockfd, int send_fd, void *payload, size_t paylen) static void sendfd(int sockfd, int send_fd) { - size_t len; + ssize_t len; char ch; ch = 0; len = sendfd_payload(sockfd, send_fd, &ch, sizeof(ch)); ATF_REQUIRE_MSG(len == sizeof(ch), - "sendmsg: %zu bytes sent; expected %zu; %s", len, sizeof(ch), + "sendmsg: %zd bytes sent; expected %zu; %s", len, sizeof(ch), strerror(errno)); } @@ -532,10 +532,10 @@ ATF_TC_BODY(send_overflow, tc) len = sendfd_payload(fd[0], putfd, buf, sendspace); #if TEST_PROTO == SOCK_STREAM ATF_REQUIRE_MSG(len == -1 && errno == EAGAIN, - "sendmsg: %zu bytes sent, errno %d", len, errno); + "sendmsg: %zd bytes sent, errno %d", len, errno); #elif TEST_PROTO == SOCK_DGRAM ATF_REQUIRE_MSG(len == -1 && errno == ENOBUFS, - "sendmsg: %zu bytes sent, errno %d", len, errno); + "sendmsg: %zd bytes sent, errno %d", len, errno); #endif close(putfd); ATF_REQUIRE(nfiles == openfiles()); @@ -655,14 +655,14 @@ ATF_TC_BODY(rights_creds_payload, tc) #if TEST_PROTO == SOCK_STREAM ATF_REQUIRE_MSG(len != -1 , "sendmsg failed: %s", strerror(errno)); ATF_REQUIRE_MSG((size_t)len < sendspace, - "sendmsg: %zu bytes sent", len); + "sendmsg: %zd bytes sent", len); recvfd_payload(fd[1], &getfd, buf, len, CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + CMSG_SPACE(sizeof(int)), 0); #endif #if TEST_PROTO == SOCK_DGRAM ATF_REQUIRE_MSG(len != -1 , "sendmsg failed: %s", strerror(errno)); ATF_REQUIRE_MSG((size_t)len == sendspace, - "sendmsg: %zu bytes sent", len); + "sendmsg: %zd bytes sent", len); recvfd_payload(fd[1], &getfd, buf, len, CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + CMSG_SPACE(sizeof(int)), 0); #endif From nobody Wed Sep 27 12:53:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc3f57BNz4vQvL; Wed, 27 Sep 2023 12:53: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 4Rwc3f2L7Nz4Vh4; Wed, 27 Sep 2023 12:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ticLF6CBSkkh3ykt2zgJBJTFFUHxb5eBoWlUAnH6FkI=; b=YiVarW6ARw6Uqvpt52hXf9p52fXo1UHHdSqrRnkhT6IJSZDjHQaS325lRwZqQs93Qf0BZ6 SpTgguM8zR1jvVomipab9csD7r+tTyYiIctzk4mOQ/7jgd7GghhaJWx+ofBHF+bMYzAS77 Zb8ZGH0tUvJnUOkX6FoefR8JgdiGF8Mf+0vOg9ZIJOHdRDgAehesl3iOccLsPcva4Y2yZo qRj36TfVD61XGJ7HXWgRSRS+/oxdkiJ0kueMBPMcIIthU8QAqu5+sKclYc3ytfGmjOvfMF 66j6B7UN3QHbjoeB/bRRQsLNiGmj2fje4AuJMCEESibnmzmrdbuTtr3hU5XE8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819198; a=rsa-sha256; cv=none; b=lijhCynmGVKLGyh3olwYkRPqHM6fQWrZiPpEZAXjmWg8nlY3IxKmGF23C6tuyebL39+qJu f+Rn2xl3ooZdu4Cm9RMyLNpf5PrCufBElmm8qpOd5R9f25zYkGZTgjbmqLjJaVuxH++h4H dpNypemk0M1Om5ogd+AP3kJC2hVieUQakbXJ3uCmDmcouoeVMNsZ3fb369K2As+6W3otPe Cx9y/GbGSzOExA7c5hTooPPiOip1qCBKMTeSkZZ8UjUnuFqsNtB5I0H2ksSo0HLDdlDtpa P/UQ0nVUKjX6KluaPWH2g7plz+pKvKQd4Ih+H9INRbkzcnO2g8lQ9iS4TPsfnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ticLF6CBSkkh3ykt2zgJBJTFFUHxb5eBoWlUAnH6FkI=; b=IidAMNqcXD6uYBIMMkl93vQtgkRZRIVkCZM62zklqYQVc0jpZ3hyD9N8pLDr61oc2kEPp2 pj3J3XUfjWHdp3BhnbvZGKF5lNEF4BjgSTE+xpgRprMFMtNBIOk5zcQApq6LaqL7FoDArO z2+m/57PyLLTARlMEIUPhusPy7dxy5LH7tUZKvhMqbEaLcinNbJFXuTjwVZFBi8v1XfT1n i1DlM9WXukr1JBYA9cGQyEhjle9PqAiN/kgDrY82QJ4GKQBekTkRKQTbabvhRsYNcn7HZs V6Kg8BGXJSzq00LCK2uH9vcddAzYk4QjiFSDnAbv70jH6mHru9GVYvptsWAhrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc3f1RdzzgQs; Wed, 27 Sep 2023 12:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCrIx8024550; Wed, 27 Sep 2023 12:53:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCrIW7024547; Wed, 27 Sep 2023 12:53:18 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:53:18 GMT Message-Id: <202309271253.38RCrIW7024547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: caaea4557738 - stable/14 - sockets: re-check socket state after call to pr_rcvd() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: caaea455773898bee9a0c59466a84256192e0980 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=caaea455773898bee9a0c59466a84256192e0980 commit caaea455773898bee9a0c59466a84256192e0980 Author: Greg Becker AuthorDate: 2023-09-09 23:38:24 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:33:05 +0000 sockets: re-check socket state after call to pr_rcvd() Socket state may have changed after dropping the receive buffer lock in order to call pr_rcvd(). If the buffer is empty, re-check the state after reaquiring the lock and skip calling sbwait() if the socket is in error or the peer has closed. PR: 212716 Reviewed by: markj, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41783 (cherry picked from commit f44102411e1b16363e91a074c9c403069c550e4d) --- sys/kern/uipc_socket.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index ffd5e06c34b7..3c7e5c4cb4bb 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -2429,6 +2429,10 @@ dontblock: VNET_SO_ASSERT(so); pr->pr_rcvd(so, flags); SOCKBUF_LOCK(&so->so_rcv); + if (__predict_false(so->so_rcv.sb_mb == NULL && + (so->so_error || so->so_rerror || + so->so_rcv.sb_state & SBS_CANTRCVMORE))) + break; } SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); From nobody Wed Sep 27 12:53:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc3g4ChGz4vQYJ; Wed, 27 Sep 2023 12:53: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 4Rwc3g3VVzz4VRB; Wed, 27 Sep 2023 12:53:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IEay0XCBkuIhO0fR4GvTT3Uy0YVCsJCHxm41Qu2zKH8=; b=uRmUH6Xu1Ru+8WGMhEB4n+ClAAYvyrjTEqaUFCGykcWssfvjdQ1GAlRmMw2+2rRgrN6Mmn zNZMoR0LZLj/xJi0MT4ziLyelJoH04I1CmuET1u9xdPHgITl3dkcMmxl1N09q84x0NrR4T 7XHm0FGSde+L1oovBbS69kMndRv9AmUk+KO34x4rFfpg9WDZsUVpFwvWEDauLyF1Ibc+1L WqynOCUPZhdfrm1v0S0ONWvpljOabfp1f1LzyNqo+ijP+/mW3641QjxH9vlfuNxSuAKc9M rv07OWzkNeAAFAZO4hAUFNnJ2ZSq8Gi3Qo264MoDXAC+MtFeCNG9qQSnSXXgpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819199; a=rsa-sha256; cv=none; b=K7jrHNJ9RnERndzLbQ4a+rejXpmsh6z9fomeoVCHmNP+CZCQP69lbnicpvhmm3PrXvp/U/ /4X1JkDOplQ211q2DKm4J8cMnTcNrAjU+h0Inv1rtgcERQ+3AF37SRZYZvVDmf7ipqM2lb tz9Bku+TDCgarWqKFxMYxFqh4oaEcX2UqLBBBNLOxC84S1RO0eutVlZK95vXHFyJb7L7kT yOvPqAtZm5NM3k2G9xn84eljK7xIbWvoG/VHQAufmCel55JHHhzVLKpUL4oM9KXsuVvai1 yTpceM6R193pB+vIICTXC6QGGfEpjR3BWYuU35nJtg+kpuWhnlgBKY/wx43ieg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IEay0XCBkuIhO0fR4GvTT3Uy0YVCsJCHxm41Qu2zKH8=; b=UuJaaGA/m8lVlRmEBXFBm4TBKA363Kdy1t9/fqUNjjnNoCfmIHgR4tqdnFLlV3pKRrkyvK 7nKBL4osaSs06pgvdtinaurb1dY4hGQPGQMdtvfNx966NWI4XBU2teU0SjNfiMIsaQ1l5W YAPtGaviecPuq0vjoD94SmgTQ59tMnlmc5iYOFmMF+UgzHiAwOyndWLpz6a9tHbOA7z6Jo DDHBA4KeqoaNPIeQiKNofvVJpxzgmR9yfbclDz7Q7j79wkfOeKGpkBKcZB2JEMQy88hGTY 5R8TQlajDzOPQ/BsmTxBU0o5nPNglaERJDAhPidSI9AfO6Kx4Iv2tlxKp90U4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc3g2bsLzg8X; Wed, 27 Sep 2023 12:53:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCrJVb024611; Wed, 27 Sep 2023 12:53:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCrJvW024609; Wed, 27 Sep 2023 12:53:19 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:53:19 GMT Message-Id: <202309271253.38RCrJvW024609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 811b3d0f0fe5 - stable/14 - socket tests: Add a regression test for MSG_WAITALL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 811b3d0f0fe5f1cf6b6fbe4a14103bcab9c400df Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=811b3d0f0fe5f1cf6b6fbe4a14103bcab9c400df commit 811b3d0f0fe5f1cf6b6fbe4a14103bcab9c400df Author: Mark Johnston AuthorDate: 2023-08-31 17:29:29 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:33:24 +0000 socket tests: Add a regression test for MSG_WAITALL PR: 212716 MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 38426b32e106cf251520259b29779372eda7a5f8) --- tests/sys/kern/Makefile | 2 + tests/sys/kern/socket_msg_waitall.c | 181 ++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index d46223d8ff09..f2fe9e7008d9 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -30,6 +30,7 @@ ATF_TESTS_C+= sigaltstack ATF_TESTS_C+= sigwait ATF_TESTS_C+= socket_accf ATF_TESTS_C+= socket_msg_trunc +ATF_TESTS_C+= socket_msg_waitall TEST_METADATA.sigwait+= is_exclusive="true" .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH:Mpowerpc*} == "" ATF_TESTS_C+= subr_physmem_test @@ -71,6 +72,7 @@ LIBADD.unix_seqpacket_test+= pthread LIBADD.kcov+= pthread CFLAGS.ktls_test+= -DOPENSSL_API_COMPAT=0x10100000L LIBADD.ktls_test+= crypto util +LIBADD.socket_msg_waitall+= pthread LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat LIBADD.sigwait+= rt diff --git a/tests/sys/kern/socket_msg_waitall.c b/tests/sys/kern/socket_msg_waitall.c new file mode 100644 index 000000000000..e9018b47eec1 --- /dev/null +++ b/tests/sys/kern/socket_msg_waitall.c @@ -0,0 +1,181 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Mark Johnston under sponsorship from + * the FreeBSD Foundation. + */ + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +struct close_test_params { + struct sockaddr_storage sa; + size_t msglen; + int count; + int af, type, proto; +}; + +static void * +close_test_client(void *arg) +{ + struct close_test_params *p = arg; + char *buf; + size_t buflen; + + buflen = p->msglen + 1; + buf = malloc(buflen); + ATF_REQUIRE(buf != NULL); + + while (p->count-- > 0) { + ssize_t n; + int error, s; + + s = socket(p->af, p->type, p->proto); + ATF_REQUIRE_MSG(s >= 0, "socket: %s", strerror(errno)); + + error = connect(s, (struct sockaddr *)&p->sa, p->sa.ss_len); + ATF_REQUIRE_MSG(error == 0, "connect: %s", strerror(errno)); + + n = recv(s, buf, buflen, MSG_WAITALL); + ATF_REQUIRE_MSG(n == (ssize_t)p->msglen, + "recv: %s", strerror(errno)); + + ATF_REQUIRE(close(s) == 0); + } + + return (NULL); +} + +static void +close_test(struct sockaddr *sa, unsigned int count, int af, int type, int proto) +{ + struct close_test_params p; + const char *msg; + pthread_t t; + size_t msglen; + int error, s; + + s = socket(af, type, proto); + ATF_REQUIRE_MSG(s >= 0, "socket %s", strerror(errno)); + + ATF_REQUIRE_MSG(bind(s, sa, sa->sa_len) == 0, + "bind: %s", strerror(errno)); + ATF_REQUIRE_MSG(listen(s, 1) == 0, + "listen: %s", strerror(errno)); + ATF_REQUIRE_MSG(getsockname(s, sa, &(socklen_t){ sa->sa_len }) == 0, + "getsockname: %s", strerror(errno)); + + msg = "hello bonjour"; + msglen = strlen(msg) + 1; + p = (struct close_test_params){ + .count = count, + .msglen = msglen, + .af = af, + .type = type, + .proto = proto, + }; + memcpy(&p.sa, sa, sa->sa_len); + error = pthread_create(&t, NULL, close_test_client, &p); + ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); + + while (count-- > 0) { + ssize_t n; + int cs; + + cs = accept(s, NULL, NULL); + ATF_REQUIRE_MSG(cs >= 0, "accept: %s", strerror(errno)); + + n = send(cs, msg, msglen, 0); + ATF_REQUIRE_MSG(n == (ssize_t)msglen, + "send: %s", strerror(errno)); + + ATF_REQUIRE(close(cs) == 0); + } + + ATF_REQUIRE(close(s) == 0); + ATF_REQUIRE(pthread_join(t, NULL) == 0); +} + +/* + * Make sure that closing a connection kicks a MSG_WAITALL recv() out of the + * syscall. See bugzilla PR 212716. + */ +ATF_TC(close_tcp); +ATF_TC_HEAD(close_tcp, tc) +{ + atf_tc_set_md_var(tc, "timeout", "10"); +} +ATF_TC_BODY(close_tcp, tc) +{ + struct sockaddr_in sin; + + sin = (struct sockaddr_in){ + .sin_len = sizeof(sin), + .sin_family = AF_INET, + .sin_addr = { htonl(INADDR_LOOPBACK) }, + .sin_port = htons(0), + }; + close_test((struct sockaddr *)&sin, 1000, AF_INET, SOCK_STREAM, + IPPROTO_TCP); +} + +/* A variant of the above test for UNIX domain stream sockets. */ +ATF_TC(close_unix_stream); +ATF_TC_HEAD(close_unix_stream, tc) +{ + atf_tc_set_md_var(tc, "timeout", "10"); +} +ATF_TC_BODY(close_unix_stream, tc) +{ + struct sockaddr_un sun; + + sun = (struct sockaddr_un){ + .sun_len = sizeof(sun), + .sun_family = AF_UNIX, + .sun_path = "socket_msg_waitall_unix", + }; + close_test((struct sockaddr *)&sun, 1000, AF_UNIX, SOCK_STREAM, 0); + ATF_REQUIRE_MSG(unlink(sun.sun_path) == 0, + "unlink: %s", strerror(errno)); +} + +/* A variant of the above test for UNIX domain seqpacket sockets. */ +ATF_TC(close_unix_seqpacket); +ATF_TC_HEAD(close_unix_seqpacket, tc) +{ + atf_tc_set_md_var(tc, "timeout", "10"); +} +ATF_TC_BODY(close_unix_seqpacket, tc) +{ + struct sockaddr_un sun; + + sun = (struct sockaddr_un){ + .sun_len = sizeof(sun), + .sun_family = AF_UNIX, + .sun_path = "socket_msg_waitall_unix", + }; + close_test((struct sockaddr *)&sun, 1000, AF_UNIX, SOCK_SEQPACKET, 0); + ATF_REQUIRE_MSG(unlink(sun.sun_path) == 0, + "unlink: %s", strerror(errno)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, close_tcp); + ATF_TP_ADD_TC(tp, close_unix_stream); + ATF_TP_ADD_TC(tp, close_unix_seqpacket); + + return (atf_no_error()); +} From nobody Wed Sep 27 12:53:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc3h62HFz4vQjS; Wed, 27 Sep 2023 12:53: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 4Rwc3h56Rzz4Vnr; Wed, 27 Sep 2023 12:53:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vly1BWXQ6rNfPaSqolAsFkF6p4lUmIQQZESs/oFsR14=; b=oWjpMeXM1tboNeaP7iha3dMu+yLwgwByVpkui7X3ejNoD3KAUKSVAD3xoHA69M6zTbqlOv T9dZfFdi8QRfDp64WkNatluJOhNHtB24g2E84zDu9ZixutOU+OPdZ3XaffEh8gglACaoZD 0TkWWHPz4k03BEzWiv8ipJ4dFpx+3/mvZwBR/8gZvdkwyHF6QxF7isVMhOvhKXVCtqDyrz NmBFScEnH59r8EFkKe38hfu13wevt4JJlGDiLMlhlSH57bCzm/Hnhq/4Ug8B3QM5CWea6e snrr5YcKkR0xngJLkC0D7CrWvKk9tq5wFpYV935h/aPKUTPMUhMGJBWaJQT50A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819200; a=rsa-sha256; cv=none; b=FRJ12YXgg02FSHVi/p+T/oCQ654/OK+opbtHNC1vZNrhpkMVf+VwiPJOfKYtdubQl24UI/ XKR0RNlScrT+gge96b23o0v0Vbq83qMR7XfoFJsUAOOt8vw7RaXJMeU6ED1/KX91D9TuHc sX0CvE1PTG5SK4Oeh9ieX1JiCeyU7jyoXF6i8DI2ybKjh00NrpNgup9qu0HPyn24rS1Skm dHa0q2AsW+tY6Z/5SM2fJc32fHsKnOVxxSiEQdMrZ8p4krKab4jTqeqIBth5Dt3AI5plf2 ltbRm+09AIHZ+BDUA+NW82PAZNp0cqg1qA36MhMgPl2YB8nE4ysO4EMCfBKwAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vly1BWXQ6rNfPaSqolAsFkF6p4lUmIQQZESs/oFsR14=; b=gvrLfG4zYjZ/dFNQ19O7Cn+St/zpiZSFrYDCppS+ZHHw+fab1NQASik5672F+cEoW5DjKs iSPZCuO3dxmgkQRx702hf0CgZshYebXpBdlNEah9ngfOgoLZlA45ZUZQhQxrP2+s+QKS0b /VQ3clfnFXv7hImBCni7KacIjHahKrI1tgMG9d4xBsfKF8SEnnsZSvcUWmt3D9H7v5bTAR C8zrbGaBWHJDWlrrkpHRGjRLukRWU6wBdFC39HH3qn/Bvn2PD1i6Uf94UUnxH2OGViBHa3 dmgDIMJSuXjoj/J/mJSi2oL6YXlfPUocU5iYPtuRZkdQeSI5pyF1ixv7xxBN+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 4Rwc3h3j06zflR; Wed, 27 Sep 2023 12:53:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCrK3k024659; Wed, 27 Sep 2023 12:53:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCrKoX024656; Wed, 27 Sep 2023 12:53:20 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:53:20 GMT Message-Id: <202309271253.38RCrKoX024656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 49c1b353390c - stable/14 - dtrace: Fix a kernel panic in printm() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49c1b353390cf498bcd9a3e548039e2a64f654fe Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=49c1b353390cf498bcd9a3e548039e2a64f654fe commit 49c1b353390cf498bcd9a3e548039e2a64f654fe Author: Domagoj Stolfa AuthorDate: 2023-09-06 13:25:00 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:35:46 +0000 dtrace: Fix a kernel panic in printm() When using printm(), one should always pass a scratch pointer to it. This is achieved by calling printm with memref BEGIN { printm(fixed_len, memref(ptr, var_len)); } which will return a pointer to the DTrace scratch space of size sizeof(uintptr_t) * 2. However, one can easily call printm() as follows BEGIN { printm(10, (void *)NULL); } and panic the kernel as a result. This commit does two things: (1) adds a new macro DTRACE_INSCRATCHPTR(mstate, ptr, howmany) which checks if a certain pointer is in the DTrace scratch space; (2) uses DTRACE_INSCRATCHPTR() to implement a check on printm()'s DIFO return value in order to avoid the panic and sets CPU_DTRACE_BADADDR if the address is not in the scratch space. Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41722 (cherry picked from commit 8527bb2aee6ca9013c34445de88217a954b6628d) --- .../contrib/opensolaris/uts/common/dtrace/dtrace.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index 02a95bfab726..ce02676e0dc1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -515,6 +515,11 @@ do { \ ((mstate)->dtms_scratch_base + (mstate)->dtms_scratch_size - \ (mstate)->dtms_scratch_ptr >= (alloc_sz)) +#define DTRACE_INSCRATCHPTR(mstate, ptr, howmany) \ + ((ptr) >= (mstate)->dtms_scratch_base && \ + (ptr) <= \ + ((mstate)->dtms_scratch_base + (mstate)->dtms_scratch_size - (howmany))) + #define DTRACE_LOADFUNC(bits) \ /*CSTYLED*/ \ uint##bits##_t \ @@ -7739,9 +7744,24 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, } case DTRACEACT_PRINTM: { - /* The DIF returns a 'memref'. */ + /* + * printm() assumes that the DIF returns a + * pointer returned by memref(). memref() is a + * subroutine that is used to get around the + * single-valued returns of DIF and is assumed + * to always be allocated in the scratch space. + * Therefore, we need to validate that the + * pointer given to printm() is in the scratch + * space in order to avoid a potential panic. + */ uintptr_t *memref = (uintptr_t *)(uintptr_t) val; + if (!DTRACE_INSCRATCHPTR(&mstate, + (uintptr_t)memref, 2 * sizeof(uintptr_t))) { + *flags |= CPU_DTRACE_BADADDR; + continue; + } + /* Get the size from the memref. */ size = memref[1]; From nobody Wed Sep 27 14:00:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwdYg241zz4vW09; Wed, 27 Sep 2023 14:00: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 4RwdYg1c4Tz4cmr; Wed, 27 Sep 2023 14:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695823255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RPmZO0XAOCZmquMZ7OfXVX8zyImamMuilXBgh0rrLBM=; b=HV1egBhsFRZ/+y43SsbE/6mjNt16omTeHNICxugldyvY4SRriBa8aWal5ASPPfgMEPz6Wi hP9XTrb/q8VNQJ7z1INQvKXC+5Lo6b03p4AAqokyhfAv4qcIDA4uC8VyVuqrig6EQewB4g 32cRgFuNDBYWSFkxDvM2VMV6xAsnhVEw7APianMa/1BssLDDEbokV45rHOFM5fJn5lJphd LlZdmj73/6LOkKFQAYH0XbrELP4+AiL6kbayrBUCcWBFUwahPlCDfyK6kBcqAlPWttrfxn qvA8lRMb4a8ZTA8/EGTcQeP5wdRHxPLmShxav7OgS5fABpokzEBdhyvc7lLZAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695823255; a=rsa-sha256; cv=none; b=Kgsy/SDo9xfeP/2fa44Irbj4ERYpc7ttOERJebs5TYPL9c0PfQq+eZJt8IVJ7O/71PdsxC PMwPhnH+V9B1mniwOnO7nBILgXOeZTpzNLmnIOctQ/dW+F9vXYo0K3smaWfCsiTIQiF5xz O4QUW3t5SOBAc7U8AbKw8q5ZgV4adM4ZrMTOuKD+X6l4KSMNxCUZgk3YcvwpivH8raLPkE 0rP6b1TtWcMCVSFK3pf7yI7jSZQpvIGM60HJEn1/ki/EjLTGm+qmsxm54sU63QUbA+9j0d Ae0oJUJ7iV1R7y36HszqRNpLMkd5kLuG65hL4hBbJuNnDf51Fg3mgc7cBtKCfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695823255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RPmZO0XAOCZmquMZ7OfXVX8zyImamMuilXBgh0rrLBM=; b=CJLv7PhSbD9Qmz5CtaYn211wcbweygd1/8e8VZ1UE+znyjc4eRCdbQhaoCA1iIsFESpkL1 ctvOK1Km5iguSIHWz7ZT96eerNuDFAGK1VBI2hVlppmpTdGloRb5BaaxxpXdU2LHeqI00U bmJIUTrQ6Y7ZtOwbY8ZNHs16dv/mxXqU9QoMbXh8+tQDhFfXGawfdlIBGQ5pscFgMGSNSk NdolRC+98utnBCK2mejSSAxC0L8NzYLNZlc8ZpXMln1+D39V/inxx/pQPaynZxLynjfNIb ps9CHRjKV26KaoHhvaTvFiC9w61eEgtpTJFg8mKidIsWZqO2Xw9yPtAYBrZPRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwdYg0fv0zhgQ; Wed, 27 Sep 2023 14:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RE0s0e037016; Wed, 27 Sep 2023 14:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RE0s2R037013; Wed, 27 Sep 2023 14:00:54 GMT (envelope-from git) Date: Wed, 27 Sep 2023 14:00:54 GMT Message-Id: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 1f31e00e19f9 - main - flua: add fbsd module List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f31e00e19f9e24d4c891a24973e08a027c4f71c Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c Author: Baptiste Daroussin AuthorDate: 2023-09-13 07:43:33 +0000 Commit: Baptiste Daroussin CommitDate: 2023-09-27 14:00:00 +0000 flua: add fbsd module This module is bundled into flua, it only provides for now the exec function. The point of the function is to be able to execute a program without actually executing a shell. to use it: fbsd.exec({"id", "bapt"}) Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41840 --- libexec/flua/Makefile | 2 +- libexec/flua/linit_flua.c | 2 + libexec/flua/modules/lfbsd.c | 134 +++++++++++++++++++++++++++++++++++++++++++ libexec/flua/modules/lfbsd.h | 32 +++++++++++ 4 files changed, 169 insertions(+), 1 deletion(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 6d05d9d72a52..7a58b2265a5a 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -18,7 +18,7 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c -SRCS+= lfs.c lposix.c +SRCS+= lfs.c lposix.c lfbsd.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index 671a0300783c..4d4d69920e94 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -35,6 +35,7 @@ #include "lauxlib.h" #include "lfs.h" #include "lposix.h" +#include "lfbsd.h" #include "lua_ucl.h" /* @@ -60,6 +61,7 @@ static const luaL_Reg loadedlibs[] = { {"posix.sys.stat", luaopen_posix_sys_stat}, {"posix.unistd", luaopen_posix_unistd}, {"ucl", luaopen_ucl}, + {"fbsd", luaopen_fbsd}, {NULL, NULL} }; diff --git a/libexec/flua/modules/lfbsd.c b/libexec/flua/modules/lfbsd.c new file mode 100644 index 000000000000..30cafcc7309e --- /dev/null +++ b/libexec/flua/modules/lfbsd.c @@ -0,0 +1,134 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2023 Baptiste Daroussin + * + * 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. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include "lauxlib.h" +#include "lfbsd.h" + +extern char **environ; + +static const char** +luaL_checkarraystrings(lua_State *L, int arg) +{ + const char **ret; + lua_Integer n, i; + int t; + int abs_arg = lua_absindex(L, arg); + luaL_checktype(L, abs_arg, LUA_TTABLE); + n = lua_rawlen(L, abs_arg); + ret = lua_newuserdata(L, (n+1)*sizeof(char*)); + for (i=0; i 1 ? 2 : n, + "fbsd.exec takes exactly one argument"); + + if (pipe(stdin_pipe) < 0) { + lua_pushnil(L); + lua_pushstring(L, strerror(errno)); + lua_pushinteger(L, errno); + return (3); + } + + posix_spawn_file_actions_init(&action); + posix_spawn_file_actions_adddup2(&action, stdin_pipe[0], STDIN_FILENO); + posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); + + argv = luaL_checkarraystrings(L, 1); + if (0 != (r = posix_spawnp(&pid, argv[0], &action, NULL, + (char*const*)argv, environ))) { + lua_pushnil(L); + lua_pushstring(L, strerror(r)); + lua_pushinteger(L, r); + return (3); + } + while (waitpid(pid, &pstat, 0) == -1) { + if (errno != EINTR) { + lua_pushnil(L); + lua_pushstring(L, strerror(r)); + lua_pushinteger(L, r); + return (3); + } + } + + if (WEXITSTATUS(pstat) != 0) { + lua_pushnil(L); + lua_pushstring(L, "Abnormal termination"); + lua_pushinteger(L, r); + return (3); + } + + posix_spawn_file_actions_destroy(&action); + + if (stdin_pipe[0] != -1) + close(stdin_pipe[0]); + if (stdin_pipe[1] != -1) + close(stdin_pipe[1]); + lua_pushinteger(L, pid); + return 1; +} + +#define REG_SIMPLE(n) { #n, lua_ ## n } +static const struct luaL_Reg fbsd_lib[] = { + REG_SIMPLE(exec), + { NULL, NULL }, +}; +#undef REG_SIMPLE + +int +luaopen_fbsd(lua_State *L) +{ + luaL_newlib(L, fbsd_lib); + return (1); +} diff --git a/libexec/flua/modules/lfbsd.h b/libexec/flua/modules/lfbsd.h new file mode 100644 index 000000000000..01034a3ad7cd --- /dev/null +++ b/libexec/flua/modules/lfbsd.h @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2023 Baptiste Daroussin + * + * 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. + */ + +#pragma once + +#include + +int luaopen_fbsd(lua_State *L); From nobody Wed Sep 27 15:04:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwfyT5HVPz4vYmW; Wed, 27 Sep 2023 15:04: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 4RwfyT3byrz3GbY; Wed, 27 Sep 2023 15:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695827041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6z7peT2BYqvMqfxtCZpHItEzEIQlhlh+EBgxjEk7+E0=; b=nVhUAPd8gb1jrKuy1e+vBgVDMXcgr4bBqVIgcyRjsUDYb1fOHA84nMCabOBUEObMqk6hxl Z73rPw6+Ew3tVHg2r2N1ApNdgTv7HCxaahhdVZJalMj7qd7UkBA5AggjLngB+BYL/5WVj9 BTE1rRQ5OdbJZPTLpxPTgdespClFWnnTVv/KjiyQZpz8u8VyK6g4sblbJCHP9qBJL7C5hF Ymb9tYCRjMHVNpihAJsxFCgnPQ1m9HgoTZuSzf5ZqvaQFCrztzBEUt2Y7Ms0M/upqWCx6Z IeGa2O/8jdc1o7r2iW73wfD7QMJkG2z48s59ODYrySqosZmFtNG+YWVy9pwwTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695827041; a=rsa-sha256; cv=none; b=RWRA7GeTLFDR3FHK4yv/z+GpWely6fXt1AR7QXFTJVRwfFHUJ4RTlzpR8Ad8or0RcUN2SJ 61JPl0XkvWiMV5f6RUbplG1NePct7Tth4PJE+y8YeJ1cZnr4E0Qgi/lJDyoj7xTYrNQRBW KOuJa3oG1Pco0DYcpaWvmAk0+P+jLOe/8NeVEMxJMa02ni5UyBnseYQ+3/vhN8cqlPOLFy B2fGGqkDJVA3DCSXP3iDa7In6zFd2tR3Ii9z/7KZqIPaVsHsYalFqvcYo6XYeX7TLWyw3L N4OkD0d8+qvsbrTdfES+V3Habv8018AXmJ/12Sy7RnTXRHQ6jMpKM92MUU9vQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695827041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6z7peT2BYqvMqfxtCZpHItEzEIQlhlh+EBgxjEk7+E0=; b=ZHSjGOMPMPVxAvGedzi8cAfL0JATtOFDnkgo/QtOd0qKqG3XjQYFNmcb5kgYGr8TO60QIS TyLfS02NzirF6G34TvDE3J23TD0H5no1FXPwalazmAEtlIso3C7l13j+lDLotO0KO+HJzB EpE7lLFuS/TNYrvdwszq5iSbLfevTNkpWZHyTGPVgOg7yrNwrFCoAV5m2213fIEOOcc5v8 LMugrIY+Wc7Dlfgo53FNNZ/EAZO14U45m0qVisoLKR2m51wv7bmtlUb6W7uTGkcCkp4c/8 oDvaJEXC9GGIEcuex0vB3mFW24cXLmxnn50BiMdEutFwqcaVD5sXL4Nlg+QOyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwfyT2g10zkLq; Wed, 27 Sep 2023 15:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RF41Zk043323; Wed, 27 Sep 2023 15:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RF41Mv043320; Wed, 27 Sep 2023 15:04:01 GMT (envelope-from git) Date: Wed, 27 Sep 2023 15:04:01 GMT Message-Id: <202309271504.38RF41Mv043320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 1e3214571b78 - main - printenv: fix typo in a comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e3214571b78a659ccf8174e1528546d5c385a20 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1e3214571b78a659ccf8174e1528546d5c385a20 commit 1e3214571b78a659ccf8174e1528546d5c385a20 Author: Alan Somers AuthorDate: 2023-09-27 15:02:58 +0000 Commit: Alan Somers CommitDate: 2023-09-27 15:02:58 +0000 printenv: fix typo in a comment [skip ci] Reported by: gbe MFC with: c989957f28ef5b03f594265612e3437c1e826ed4 Sponsored by: Axcient --- usr.bin/printenv/tests/printenv_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/printenv/tests/printenv_test.sh b/usr.bin/printenv/tests/printenv_test.sh index 2bf809cb0977..754ad75d3b5b 100644 --- a/usr.bin/printenv/tests/printenv_test.sh +++ b/usr.bin/printenv/tests/printenv_test.sh @@ -3,7 +3,7 @@ # # Copyright (c) 2023 The FreeBSD Foundation # -# This software was developed1 by Yan-Hao Wang +# This software was developed by Yan-Hao Wang # under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without From nobody Wed Sep 27 16:00:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhD23xfQz4vd83; Wed, 27 Sep 2023 16:00: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 4RwhD23W2Mz3LkJ; Wed, 27 Sep 2023 16:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W108wX+3g7M8f6tKmzV4p1DH2OdoLVMKQq+LygdeCAw=; b=nNGPa3/x123LkUENBzCLRp13wom/y6ftNDQy6e0ywDVJ7F3dBuHWKGQYAwUkPtcBGY3kPZ Ji+cAgk8nFUb7fB9W67Wo5WQNsWdIK5+IpCKS9r4tl8zJwyc6w93GkGoL7RQL+0HDQnsPw 3l6R3eTiWPjsslappWWWjQv0NkQyBAs9R/JdlHS9J/MWVG6ngLqOLU4QssldgWrk6Ms5lM YovrdhiDS9UCt5idIUAjn6y8sIjpZDC5y+iewQ3U6EAKHR2uwL2FF1l6FMW0Yzllo2iOOa MtQRSvLTzaLw1gfqfBzAT74v7RV6qey6K28mxpuxyNR0tmdYcE3gLvqQ9Za9XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830450; a=rsa-sha256; cv=none; b=tNrYTXUE4OS0FgTd9ic67gSaNb72nIzqhsuLr1I1RmrIxPIQ6l6Drw3IM/vWieWqwSi8It vn5ardxSnfDrN28Bze+PghLc41khplVrPZmcsgenvdm/VTNMFFuAMoVNP0UUphXv3XPQLj ksjF7PJGo/d46Y1Tm960OlGIovltvGROTFA7tygtVu5Q1ph8RQrOc9Fv2BhGye0cmc4geu r6NseG9Fk7+sACLv1SGYEoMyaAxk4wPCk4Y0fzujeGaDEtGopJj0SYo2wSDxm9fesDHH8q TYuVnV1MMF2grIf8ijIpQQBgmcDR8I+DQUPdTdNNu3K6Qire3VCn5hQYyBc+zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W108wX+3g7M8f6tKmzV4p1DH2OdoLVMKQq+LygdeCAw=; b=nt+neqOJUfXOL8nYHFTCSaJQqu4b00U7YUeGxTzwszAbvm4TNFwTdVyL98nsStCnoyUVAB hDstQnBmf7tqEbf7pryfajBqR0BdybXuwMNiwmpHEhMVjfl4p0wdFgA5qJWhbCuf1MGX41 4OWOciKn/S0sMFeqNt3STizPgkdWL1Y4LTMwckY9O+PKlIaRiG6HcDgVB1ifSPe5YjKi6R deu3S50qmDzwc3w0xshZwtdoTh1+jC/qyQSLZ7XnMe6pM6M9CVYiQ91o7nJ0IDTaD9/gF2 Wc+oVDykADgJCNF9hGC2rFQ7DHmUPApX3buSmMBm5ibU2hqmrhQ+dg2DI9i4UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhD22YTGzlkk; Wed, 27 Sep 2023 16:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG0ode036396; Wed, 27 Sep 2023 16:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG0oDF036394; Wed, 27 Sep 2023 16:00:50 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:00:50 GMT Message-Id: <202309271600.38RG0oDF036394@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: b5a2bf512dbe - main - makefs/zfs: Use unsigned integers for indirect block level counts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b5a2bf512dbe5bc8535e28e9f584a08444965426 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b5a2bf512dbe5bc8535e28e9f584a08444965426 commit b5a2bf512dbe5bc8535e28e9f584a08444965426 Author: Mark Johnston AuthorDate: 2023-09-27 15:47:26 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 16:00:00 +0000 makefs/zfs: Use unsigned integers for indirect block level counts No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index 4d45926fb33f..db302fe1e760 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -673,7 +673,7 @@ dnode_cursor_init(zfs_opt_t *zfs, zfs_objset_t *os, dnode_phys_t *dnode, } static void -_dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, int levels) +_dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, unsigned int levels) { blkptr_t *bp, *pbp; void *buf; @@ -685,7 +685,7 @@ _dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, int levels) blksz = MAXBLOCKSIZE; blkid = (c->dataoff / c->datablksz) / BLKPTR_PER_INDIR; - for (int level = 1; level <= levels; level++) { + for (unsigned int level = 1; level <= levels; level++) { buf = c->inddir[level - 1]; if (level == c->dnode->dn_nlevels - 1) { @@ -724,7 +724,7 @@ blkptr_t * dnode_cursor_next(zfs_opt_t *zfs, struct dnode_cursor *c, off_t off) { off_t blkid, l1id; - int levels; + unsigned int levels; if (c->dnode->dn_nlevels == 1) { assert(off < MAXBLOCKSIZE); @@ -753,8 +753,9 @@ dnode_cursor_next(zfs_opt_t *zfs, struct dnode_cursor *c, off_t off) void dnode_cursor_finish(zfs_opt_t *zfs, struct dnode_cursor *c) { - int levels; + unsigned int levels; + assert(c->dnode->dn_nlevels > 0); levels = c->dnode->dn_nlevels - 1; if (levels > 0) _dnode_cursor_flush(zfs, c, levels); From nobody Wed Sep 27 16:00:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhD35T6dz4vd1L; Wed, 27 Sep 2023 16:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwhD34KlHz3Lmr; Wed, 27 Sep 2023 16:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1Ma15l8y2Hb7LVthSo3y7mUO7drDdtmr20mrFRJOzo=; b=cIWmlbyat0TtN9e2JW9XvMtgv0naHPNiJIMf/lSGLy+5R47iPOesTyub0/IKGNMl1+gpVu RK3kZc0BGwV5IuR48CEFIXSt4Ir+c2VJY7D+s2ldjfM41O2tdCKowhgvQZO2QFqGJBvqWt m0VipZfMkbOT2pRiJAHOuvg/CCm/wuKc9zOSDzH6IEftbj7L7Fzvwk6A3bRvQy6ZlJ0qC6 A9OdBwC5oJW1z7LTARyI4RK7xaHE2M+rflgTYfrcoYozRWa9lPfhfcjWEqyk0rohVNUn1v H9QJtePIF2B5FGvE66c39rxrhoLGXwLwfcSNK1OHo8f2PqTIUbLnDBkic0RkFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830451; a=rsa-sha256; cv=none; b=IFzSskpjbBw4veI6s7YhpFJL5WKOdof6Kd+gNeZM9kxpOJVIX7hyjyyQDTFQuaQ88Kjp5b RFjY5DWO3qbc5QlSITas06TB3Qyg9pYZoFgjvL1iQ+c/n9iNGFj8PNDQrfORWCW30noi+0 PWTEzna3MycL9nFzzuvCZLidXrKP4dfS7AJCQ1Lj9qdPPZ0tr60nJm4n1qrX24Yb6YVyPq PqG9rrM52aFAVLwDScVJnT7ylxGof37bRyrLbC5WEpYOSWoJJbqV5L/a+1+JTln+cFkmw6 5tEx6mA2uzutXbs8IaycHezw1cS8jVbQM9TvSnf8+KNgLMIgCVD9Vn1bgh6esg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1Ma15l8y2Hb7LVthSo3y7mUO7drDdtmr20mrFRJOzo=; b=qbJmVuRv9G3iwjbRmcXXUfcm0audTgbY+RKheLYZccW+FtAUYHNFLTa89MCcoc7wxWy/XG cf9TzDLvJGhLNiEtIM61iZR54VW4vhtDu8gStaCno/TXbjq4+CYDs0fUnDuylXTDsjjTrU lP6/4Y1NOXyxLE6Doem04UhFMZaCF9UZKm/tAU+2moN2/y3ksBdAeyyXRflcUBw/4XpA/v nB4lFonMw8Nmn/exLWQtjzfqFrhfUtuQhGZGrUsaOdA66UPNuRVsWRGrQ173fqchUDnkeI x5TggF/RePQnyWzb9db/NplwObjBYz/Kb4prk7QotAwNP18ejmOGuqDTNiOL7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhD33N7pzlNN; Wed, 27 Sep 2023 16:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG0pEQ036452; Wed, 27 Sep 2023 16:00:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG0pUO036449; Wed, 27 Sep 2023 16:00:51 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:00:51 GMT Message-Id: <202309271600.38RG0pUO036449@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: 46402fd21631 - main - makefs/zfs: Set the objset block pointer fill field correctly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 46402fd21631b7d4686f8c341d92db6bcb190e5d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=46402fd21631b7d4686f8c341d92db6bcb190e5d commit 46402fd21631b7d4686f8c341d92db6bcb190e5d Author: Mark Johnston AuthorDate: 2023-09-27 15:56:33 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 16:00:00 +0000 makefs/zfs: Set the objset block pointer fill field correctly It is supposed to contain the number of objects allocated from the set, excluding the meta dnode. Reported by: mav MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs/objset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/objset.c b/usr.sbin/makefs/zfs/objset.c index 22277c150712..3e3dcdeced4b 100644 --- a/usr.sbin/makefs/zfs/objset.c +++ b/usr.sbin/makefs/zfs/objset.c @@ -121,6 +121,7 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, STAILQ_FOREACH_SAFE(chunk, &os->dnodechunks, next, tmp) { unsigned int i; + assert(chunk->nextfree > 0); assert(chunk->nextfree <= os->dnodecount); assert(chunk->nextfree <= DNODES_PER_CHUNK); @@ -149,8 +150,8 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, * Write the object set itself. The saved block pointer will be copied * into the referencing DSL dataset or the uberblocks. */ - vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, 1, - os->phys, os->osblksz, os->osloc, &os->osbp); + vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, + os->dnodecount - 1, os->phys, os->osblksz, os->osloc, &os->osbp); } void From nobody Wed Sep 27 16:00:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhD45p14z4vcb7; Wed, 27 Sep 2023 16:00: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 4RwhD45MPRz3Lcn; Wed, 27 Sep 2023 16:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MEYVDR6ZsyYsNIojoUoIVNocjh/y9PXhwCr4ykUQ14=; b=UBcbjqYl26BXOIokXroneIGhojZfjXOJ/L/Wy7jfHp04JDzdUTAESflY6L4PtWiuiUbemb THU6ot6QuipkB22nLV3mCEBMNYqsKOnMODURr1ZbSvq5lNewruIb04WVmSli3wyXrSiEAB RxLBsFqORhfWlphbomqBh1KeVNPeqJVLWhms61Z1V7Bk3Cmmq1Han78+46LLZsw2f4OOe+ nlur48HB8aTWnPY3MOpeQSw0D/CU/VqtSMGBD4+U34fwZfQAux3R8GagJB1FVhicZgVyur E2fXjn3E0Sv8C6bavZCXU1qngdzVu8n0+E59pOJItBc2hQ3yIzldCP89+QQtxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830452; a=rsa-sha256; cv=none; b=O/9Sxfcx3zkle0SI6AhMxJYY5L80YXVKg2FAkleKUnHr7M+krTPdo6lBdzrCohgN4JlzYP Ng9ZH9E87tQE5OhGUNaZxKDlQJjY5PEBxEWPyr8aLWsoaW2LN11VkqAZ/NGstzPUd+sRuf iWycdKDOqkAbu+jt66PaEJVF0vpM6qd8yBiKEnkA6T9FbvXfzVqbcav0iJQkUSKkEEADj4 eD0LU329lYwDP7hTC1UNWVPb2fRFpErQFaiBN9umyziEJ2TkCj5mhJ+e4K98aFMmgM5Wue 2908836s6KFfyAhvmuvQwPT3zhS9xV5kyDZs21ck6eZlisueurZP3fS90L+gPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MEYVDR6ZsyYsNIojoUoIVNocjh/y9PXhwCr4ykUQ14=; b=SPxmVOlEysUiyVbDRyOMsBgH+seIKPKix82AySX9Nk72P31kj83FZFqxjHL8+KpdcEJl2I Qhbr//6UmLL1hRRo9M6/ooF77d72zoNDcP3HnaAuqO6vNS+hFB+1aPBSE6JN4vdKp8iaPr cDSZVu5fr2g0BaQ/wZ1PmxUwprzSQh0i7ldduLIGQ2rDolaXXly29M11rIB5hJo/0pvOhR ny6QQdAeefXohmKGK5ywwwEFEe87GgRBIydojzRV2I7dytXOlhzcAFZ0qKMVvyUJwyCs5M rde6mtu7HKfPUqQhF/lrRLlg6IS7S0KORt02ilwmVPJV8KSu1/B7fTz6MHxDeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhD44QmFzlNR; Wed, 27 Sep 2023 16:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG0qsH036506; Wed, 27 Sep 2023 16:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG0qVD036503; Wed, 27 Sep 2023 16:00:52 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:00:52 GMT Message-Id: <202309271600.38RG0qVD036503@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: 87534f95dd2e - main - makefs/zfs tests: Run zdb prior to importing makefs-created pools List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 87534f95dd2ed51e01165e0072cb1c7790809a8b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=87534f95dd2ed51e01165e0072cb1c7790809a8b commit 87534f95dd2ed51e01165e0072cb1c7790809a8b Author: Mark Johnston AuthorDate: 2023-09-27 15:58:34 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 16:00:00 +0000 makefs/zfs tests: Run zdb prior to importing makefs-created pools zdb contains quite a few assertions that can help catch bugs. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 250a313481d9..e8da4cc87055 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -56,6 +56,8 @@ import_image() { atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ mdconfig -a -f $TEST_IMAGE + atf_check -o ignore -e empty -s exit:0 \ + zdb -e -p /dev/$(cat $TEST_MD_DEVICE_FILE) -mmm -ddddd $ZFS_POOL_NAME atf_check zpool import -R $TEST_MOUNT_DIR $ZFS_POOL_NAME echo "$ZFS_POOL_NAME" > $TEST_ZFS_POOL_NAME } From nobody Wed Sep 27 16:01:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhDR3M1nz4vdFb for ; Wed, 27 Sep 2023 16:01: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 4RwhDR2Xl5z3Md8; Wed, 27 Sep 2023 16:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bQ3cGMUoQVoHAJtaD375km0LpIGVQSDH/mu8ObjRIcY=; b=fAG1va0d28V5WLrvaJtjUuUyLJCS/f7qtk8ADPqgmA1h4ftQFOg08I4FWJnGrwkJKC/bI8 hnYDiQk1N4cuctx6Og1qJIz++0wGnnyHHvoEocq/e4z697HIdP4gGVtDvu4j7dWbXjI50d wDPossNA4jMsFPtNqutsX3qjW5GG1K0ghEviLuMFTSQVCTprAlFCVkgly9rHIqj+0Laiy6 nFBqBMlbcEbKv1zML1brIcA5ArrxupROq5x7vLbaOr06B6aJG0gZOJe5hFd0mf4WX1iSpO 4xLxxt3z1m71rTvbaBsurhrT3xFHAA+jXZjlZ2+8Xm2MLTfpJB/U9dKkZfkTdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830471; a=rsa-sha256; cv=none; b=ISPLXpEZsyd8uQOvVjj6PjPQQu/V+fQ52tPKTZCcQUm4pJHEATEsQSpDku44HXimvfreXt BeTEZwXjBUtqjYnv0JnJA9dGES9/Uvn2Q6PZ/dHbEn2RoE5jXZkIB+C4dS1sWIdTpWwSSv 8RZg5ovT6wQOU/YfMkWczENn43aZ/v0RYFaMHnhds6RANakAeVNDuW3oLgVJ52EM4tIo0X eSY/Xyf8ZxOkKIGzrnzfO7v8GZd+7cEYAuBbvSvT0XFwjjkJA8PUVB/p5a76d3H9ADrZ4n N/IakA2AmGyBDkWx5Vnw+dLXxmWhCxZ3HQT90cMFXPfQjokp6KYrLOBp/FRCBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bQ3cGMUoQVoHAJtaD375km0LpIGVQSDH/mu8ObjRIcY=; b=HbsP2vrpnInlf0SP2I5aL6jpAznOiy4z7TRCPSMKWcQ+IIpcKrfd/zXVVtDjj94nJVBZJb 2CKAIvMevqnlXrK6TcFthoFm1ukmCWVQKQVXQ2sn6d4NEtzTc4DBluMeVMDh6yH59vB4F/ fXmuqa9HDI649Y4UZS3rVHhWzlbTlnwdqJzmwzwgW4BTkf35n+K+Q6M+ia1ZdV9VigZ9Qj LIya8+5DFIXIoHVLXLeRRrD6mBN1fvCF+W2R4StJY9FWUYnLIMpCkRQdWt8//5mt9fBxV+ xaQYx7r7Ym5KV7q3XAtEGO60mm/tRXjaN24SlfxKXtHdOosXWTErmZ6Zsao1Ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhDR1JnFzlNV; Wed, 27 Sep 2023 16:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG1BiI036672; Wed, 27 Sep 2023 16:01:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG1BHL036671; Wed, 27 Sep 2023 16:01:11 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:01:11 GMT Message-Id: <202309271601.38RG1BHL036671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: 8e6e1224184e..16c0a3151e5f - vendor/nvi - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/vendor/nvi X-Git-Reftype: branch X-Git-Commit: 16c0a3151e5fa4958711f64bbc2f172cfe781743 X-Git-Oldrev: 8e6e1224184eb6cd3dfa05b2ecd9515c59f4f425 X-Git-Newrev: 16c0a3151e5fa4958711f64bbc2f172cfe781743 Auto-Submitted: auto-generated The branch vendor/nvi has been updated by bapt: URL: https://cgit.FreeBSD.org/src/log/?id=8e6e1224184e..16c0a3151e5f 16c0a3151e5f nvi: import version 2.2.1 From nobody Wed Sep 27 16:01:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhDR3fJlz4vcwh for ; Wed, 27 Sep 2023 16:01: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 4RwhDR2vnZz3MYB; Wed, 27 Sep 2023 16:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iro20TeIc4QJyw/d2TmMsoi7XToPBRmQ62rEEuvnzhQ=; b=mC1jR8ljxn03cXnRHG2uNMQqeppMVe6ftSg2O/M006IMwDGi9JkRF83/1uKXLzl4HqHqLI /XSGvKjqNgqzBx34YqDKx6mkzmwIu4ycJk8mglMGh7fuzDOIVGH8jzzKJea9PjIZA4CSnr FU8Nhfble9mnAdoSA6h4rryqlB7JzJFkTDr1uYa1VGvwncxorMWioaUJ+nS3bjp89Sa+o0 PTC5X8B22HhPbuQRsEzP3YirUBVD7jWcbs0GzDaiaiDkzdVn08HEVAXcuxACR4Wcv5f4o2 g9dpww+gsuI7lGa1anTyoUEsWqcQImqBnFFU/2rLOv3kpQFB0K240bnXmfRX4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830471; a=rsa-sha256; cv=none; b=HFLI1VZLsv2u9B8GwXnX1PvDJlZ8neIL43sY7qCB9F3/KBCaTiRcKK08il5o8QBJjgDvrq flVvrUqQHz+OQZxeDjxMnDlh77pmP4tU8fvi7dv0cIy4XerXwd6DKbSHtJ1v75KVz/hj83 JwosprJJQ/4K9aJ2Tekz7JvPpxH1f2tYRkjMxYctMzNDwa2AmUBQiCnjh626tBIIEOY2+U HoWc4LNOgRWMgagwBmy0oKHYnu+IH8xhWPrNnqfk5tYoerBlKwH0eVl7ydkcVEl377lZPO 5O8wr/Pl0KVaCvDMY1kfOJtWmSclfJDE2i7toBEohO/9JPFTGZ+i7YItSrQgsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iro20TeIc4QJyw/d2TmMsoi7XToPBRmQ62rEEuvnzhQ=; b=jpxEIXcn5cLt9TpDeA279sc7G0lq2tGQJqYCTCcEltRH0JtiVAZNMQnki93CG2jvGVqS/x Fe9tFbZVd5qeEmOkT773QFGisiLmxYrsEi7OJZRY0STt/HYVHanx85oy/woUH4muZIhJCU 5Q3TTXx33g199/L/GgvkBh+Mo+7EVnoBd2jsx+e9I/2+xEDdAJ+ZtPy0sccJ9sNmEWxPT5 jkNpYfvntQ9FnB+3BQGNuj3Hg4fZ1fSQpcZW8wCvvp1rvu4kOXOWWVK7AqPZh3P8JMQXvZ mBrDy0XAabwPZK4c2VWmiL+0YCEFdYWacsD7D4RtWj+VkUDxO7t5QO9Jx3uR2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhDR20Ngzllc; Wed, 27 Sep 2023 16:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG1B7e036692; Wed, 27 Sep 2023 16:01:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG1Bn4036691; Wed, 27 Sep 2023 16:01:11 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:01:11 GMT Message-Id: <202309271601.38RG1Bn4036691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: 1f72987bcb11 - Create tag vendor/nvi/2.2.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/tags/vendor/nvi/2.2.1 X-Git-Reftype: annotated tag X-Git-Commit: 1f72987bcb11935e720d214378284e7b61a7cdbb Auto-Submitted: auto-generated The annotated tag vendor/nvi/2.2.1 has been created by bapt: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/nvi/2.2.1 tag vendor/nvi/2.2.1 Tagger: Baptiste Daroussin TaggerDate: 2023-09-27 16:00:41 +0000 nvi: tag import of nvi 2.2.1 commit 16c0a3151e5fa4958711f64bbc2f172cfe781743 Author: Baptiste Daroussin AuthorDate: 2023-09-26 07:08:15 +0000 Commit: Baptiste Daroussin CommitDate: 2023-09-26 07:08:15 +0000 nvi: import version 2.2.1 From nobody Wed Sep 27 16:15:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhXX07Gkz4vf52; Wed, 27 Sep 2023 16:15: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 4RwhXW6bQZz3PJX; Wed, 27 Sep 2023 16:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTGmQDqiEdr4C/BDMz2tr9pQdUUXi/0REEXzjomKU74=; b=hjNzUpzXzmlWt9YUavJCbj9i18BEYyGaCrXgBB468GajDGYOo8UtllRaYmpK/l5ifqbDof NOonr50rXjbTWE++5ehD8qWI13qLV/qRTLd6kpeyVWUQUk99fLRO4cjw7y8IA+5+QqfwkC GwccHBt/cKq5QrpQ1U+8pB7MH4HtU3IwqmlmfwZcUq0pWDdba9Sau1bnfZxCq9c5X6BcjS el1J53ARqKU/I8fdP7cfI1cQBW9TCMAokAD2Hl6Oq3YJKnXzwe8TUQo0yCgZJvmmeRftBH S7hZx1RLDYbb9h6wVvWypnPYCgR3hvTeRjw761inDv42HW3TsypCR1FkBI6Kbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695831307; a=rsa-sha256; cv=none; b=XnD6M59vj22zuvGujhx1tOgG8Xlbo7EREHKzRCz7Lc7+2YNzkvTOctKHVPm0NDZcG5hTtU snBGUr77cv1AQxwI6Zm2PCxlLJf8QlcdNXw8Y5bgs2f5UOo5/Q+404+hYUEEQQ/FxEJ10c QQycgSffx4WyunTOkFnCKphu8fjdW7vVjkLD9B84pqklsJg/h7hfpRjLoKiV7QG5cY3MWI +AG0bsboYcbSgyCNfcUCsTZ94ARmMtYMb5WoyOCHjlI1ESxKYpugovEPFRQCzxyp9sPR31 Pyt0COLlMwvHLL08jRsgW7/KiPcUpdWrBjNFpHhNsguxRh2eBLHlIC3oMJkQyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTGmQDqiEdr4C/BDMz2tr9pQdUUXi/0REEXzjomKU74=; b=xRNe5GqZdzr6uRg45VyUIWlfmw3qVN3e4ICuZXSqzFwfltCaf+xUpekxLMGwcMJ9xxDRCN VO8C22eWNtIHI7xowCiJzau7KBpmWeHEFjkqyi19CGsZNQ68oWnUmpAgtsOdlFNQz56at9 wJ2/2xHNd3eCHPf+4PDWC+Df+zl7lbkvQwLdlQXXrvbB+h+lHj1/5O3tKByBSU6PYvDwKi 8L2Npim8iSYXxmvuuxMKP4OZNpsl+y6l/EA5z7ZN6F84PtkgdhAZkbyd4s89lJTBgUkqei 7Kw8KU6FCS4uGDoB+rHlxNiKA1joUwzs1C1wRc/wGwOahfY7CFmIVlXhnO7osg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhXW5hFHzlsw; Wed, 27 Sep 2023 16:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGF7GW060636; Wed, 27 Sep 2023 16:15:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGF5nT060620; Wed, 27 Sep 2023 16:15:05 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:15:05 GMT Message-Id: <202309271615.38RGF5nT060620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 0fcececbac98 - main - nvi: import version 2.2.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0fcececbac9880b092aeb56a41a16f1ec8ac1ae6 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=0fcececbac9880b092aeb56a41a16f1ec8ac1ae6 commit 0fcececbac9880b092aeb56a41a16f1ec8ac1ae6 Merge: 87534f95dd2e 16c0a3151e5f Author: Baptiste Daroussin AuthorDate: 2023-09-27 16:01:58 +0000 Commit: Baptiste Daroussin CommitDate: 2023-09-27 16:14:45 +0000 nvi: import version 2.2.1 contrib/nvi/CMakeLists.txt | 4 + contrib/nvi/INSTALL.md | 47 ++++++++++++ contrib/nvi/README | 26 ++++++- contrib/nvi/common/key.c | 95 ++++++++++++++++++++++- contrib/nvi/common/main.c | 3 +- contrib/nvi/common/options.c | 2 + contrib/nvi/common/options_f.c | 2 +- contrib/nvi/common/search.c | 11 ++- contrib/nvi/ex/ex.c | 13 +++- contrib/nvi/ex/ex_argv.c | 6 +- contrib/nvi/ex/ex_subst.c | 7 +- contrib/nvi/man/vi.1 | 4 + contrib/nvi/vi/v_paragraph.c | 11 ++- contrib/nvi/vi/v_redraw.c | 1 + usr.bin/vi/ex/version.h | 3 +- usr.bin/vi/options_def.h | 169 +++++++++++++++++++++-------------------- 16 files changed, 298 insertions(+), 106 deletions(-) diff --cc contrib/nvi/INSTALL.md index 000000000000,7b2fd35b7c60..7b2fd35b7c60 mode 000000,100644..100644 --- a/contrib/nvi/INSTALL.md +++ b/contrib/nvi/INSTALL.md diff --cc usr.bin/vi/ex/version.h index 657da969e721,000000000000..1c18911cc593 mode 100644,000000..100644 --- a/usr.bin/vi/ex/version.h +++ b/usr.bin/vi/ex/version.h @@@ -1,2 -1,0 +1,1 @@@ - - #define VI_VERSION "2.2.0 (2020-08-01)" ++#define VI_VERSION "2.2.1 (2023-09-25)" diff --cc usr.bin/vi/options_def.h index 54dd6c20c891,000000000000..cd6f5ba3eb26 mode 100644,000000..100644 --- a/usr.bin/vi/options_def.h +++ b/usr.bin/vi/options_def.h @@@ -1,84 -1,0 +1,85 @@@ - #define O_ALTWERASE 0 - #define O_AUTOINDENT 1 - #define O_AUTOPRINT 2 - #define O_AUTOWRITE 3 - #define O_BACKUP 4 - #define O_BEAUTIFY 5 - #define O_CDPATH 6 - #define O_CEDIT 7 - #define O_COLUMNS 8 - #define O_COMBINED 9 - #define O_COMMENT 10 - #define O_TMPDIR 11 - #define O_EDCOMPATIBLE 12 - #define O_ERRORBELLS 13 - #define O_ESCAPETIME 14 - #define O_EXPANDTAB 15 - #define O_EXRC 16 - #define O_EXTENDED 17 - #define O_FILEC 18 - #define O_FILEENCODING 19 - #define O_FLASH 20 - #define O_HARDTABS 21 - #define O_ICLOWER 22 - #define O_IGNORECASE 23 - #define O_INPUTENCODING 24 - #define O_KEYTIME 25 - #define O_LEFTRIGHT 26 - #define O_LINES 27 - #define O_LISP 28 - #define O_LIST 29 - #define O_LOCKFILES 30 - #define O_MAGIC 31 - #define O_MATCHCHARS 32 - #define O_MATCHTIME 33 - #define O_MESG 34 - #define O_MODELINE 35 - #define O_MSGCAT 36 - #define O_NOPRINT 37 - #define O_NUMBER 38 - #define O_OCTAL 39 - #define O_OPEN 40 - #define O_OPTIMIZE 41 - #define O_PARAGRAPHS 42 - #define O_PATH 43 - #define O_PRINT 44 - #define O_PROMPT 45 - #define O_READONLY 46 - #define O_RECDIR 47 - #define O_REDRAW 48 - #define O_REMAP 49 - #define O_REPORT 50 - #define O_RULER 51 - #define O_SCROLL 52 - #define O_SEARCHINCR 53 - #define O_SECTIONS 54 - #define O_SECURE 55 - #define O_SHELL 56 - #define O_SHELLMETA 57 - #define O_SHIFTWIDTH 58 - #define O_SHOWMATCH 59 - #define O_SHOWMODE 60 - #define O_SIDESCROLL 61 - #define O_SLOWOPEN 62 - #define O_SOURCEANY 63 - #define O_TABSTOP 64 - #define O_TAGLENGTH 65 - #define O_TAGS 66 - #define O_TERM 67 - #define O_TERSE 68 - #define O_TILDEOP 69 - #define O_TIMEOUT 70 - #define O_TTYWERASE 71 - #define O_VERBOSE 72 - #define O_W1200 73 - #define O_W300 74 - #define O_W9600 75 - #define O_WARN 76 - #define O_WINDOW 77 - #define O_WINDOWNAME 78 - #define O_WRAPLEN 79 - #define O_WRAPMARGIN 80 - #define O_WRAPSCAN 81 - #define O_WRITEANY 82 - #define O_OPTIONCOUNT 83 ++#define O_ALTNOTATION 0 ++#define O_ALTWERASE 1 ++#define O_AUTOINDENT 2 ++#define O_AUTOPRINT 3 ++#define O_AUTOWRITE 4 ++#define O_BACKUP 5 ++#define O_BEAUTIFY 6 ++#define O_CDPATH 7 ++#define O_CEDIT 8 ++#define O_COLUMNS 9 ++#define O_COMBINED 10 ++#define O_COMMENT 11 ++#define O_TMPDIR 12 ++#define O_EDCOMPATIBLE 13 ++#define O_ERRORBELLS 14 ++#define O_ESCAPETIME 15 ++#define O_EXPANDTAB 16 ++#define O_EXRC 17 ++#define O_EXTENDED 18 ++#define O_FILEC 19 ++#define O_FILEENCODING 20 ++#define O_FLASH 21 ++#define O_HARDTABS 22 ++#define O_ICLOWER 23 ++#define O_IGNORECASE 24 ++#define O_INPUTENCODING 25 ++#define O_KEYTIME 26 ++#define O_LEFTRIGHT 27 ++#define O_LINES 28 ++#define O_LISP 29 ++#define O_LIST 30 ++#define O_LOCKFILES 31 ++#define O_MAGIC 32 ++#define O_MATCHCHARS 33 ++#define O_MATCHTIME 34 ++#define O_MESG 35 ++#define O_MODELINE 36 ++#define O_MSGCAT 37 ++#define O_NOPRINT 38 ++#define O_NUMBER 39 ++#define O_OCTAL 40 ++#define O_OPEN 41 ++#define O_OPTIMIZE 42 ++#define O_PARAGRAPHS 43 ++#define O_PATH 44 ++#define O_PRINT 45 ++#define O_PROMPT 46 ++#define O_READONLY 47 ++#define O_RECDIR 48 ++#define O_REDRAW 49 ++#define O_REMAP 50 ++#define O_REPORT 51 ++#define O_RULER 52 ++#define O_SCROLL 53 ++#define O_SEARCHINCR 54 ++#define O_SECTIONS 55 ++#define O_SECURE 56 ++#define O_SHELL 57 ++#define O_SHELLMETA 58 ++#define O_SHIFTWIDTH 59 ++#define O_SHOWMATCH 60 ++#define O_SHOWMODE 61 ++#define O_SIDESCROLL 62 ++#define O_SLOWOPEN 63 ++#define O_SOURCEANY 64 ++#define O_TABSTOP 65 ++#define O_TAGLENGTH 66 ++#define O_TAGS 67 ++#define O_TERM 68 ++#define O_TERSE 69 ++#define O_TILDEOP 70 ++#define O_TIMEOUT 71 ++#define O_TTYWERASE 72 ++#define O_VERBOSE 73 ++#define O_W1200 74 ++#define O_W300 75 ++#define O_W9600 76 ++#define O_WARN 77 ++#define O_WINDOW 78 ++#define O_WINDOWNAME 79 ++#define O_WRAPLEN 80 ++#define O_WRAPMARGIN 81 ++#define O_WRAPSCAN 82 ++#define O_WRITEANY 83 ++#define O_OPTIONCOUNT 84 From nobody Wed Sep 27 16:20:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhfT11V0z4vdp9; Wed, 27 Sep 2023 16:20: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 4RwhfT0PhNz3PqS; Wed, 27 Sep 2023 16:20:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3GNaoGaCjsLo6vAY4ZBjfqJ8Cngfno72OjUmZA/6Rk=; b=gJO7LDy/EYe12Wtjw0DNqWHmJrs3A/IE1bGsPu5XJAeJXfwFqfKLvcBIhgFzWoZk/HpGpy E01Hs4JjO87sDhTZbr+tkmNGij7lbfQP+bmcX8LjNdYgBeRm+mparFO2RBjaDUEeqNfPDV wgNxbnzqsDyRrtuis87zVWcM7+OBaUG5CyHxXWAfneHglmFvepUjsWS6H0d6fHaE68EV4G IK7f7zMgQ7vBHjFVRhfrVxRu0lrcFDYNnO016VKIX9TrlOHWYbsBkN53WbKeFCJScWsWza GBqJIdPZt+dYQxBD/W7CBeR4hz3q0MjZV2qXer4JS6blZ+HrVqRRXqR6ACRMsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695831617; a=rsa-sha256; cv=none; b=DFra4tyfxI6tnMw2vdLxRq6X5DjEKeB52oTTjPgRzvc7pp5zpm3LxOIN0Ii/0B8nGuJhDE OJWnjqS9MzCqxZM+Lvxsk99SEsxFSQbi6FJqYYYsywaQtT9yVWteOzAhxLitryfczRwaz7 WrxToj57tKXCOHo46Eta9zXcvQUxPRazzUOgdBYsEt5Y01uP3o31G+xaJrPaTy1dXxNlBN 5UilzZLJtiHIxqyA5lnTa+bvJgFJ+c9Sm+KQnqr11y2BRCdJuj0CLjbk3cEnQcmDOSTe26 SxsrCdSP9zXO55KoS0zk9+4V8hkM8Jh34m6zNCAguQFT5286QITD/w6B0e5OHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3GNaoGaCjsLo6vAY4ZBjfqJ8Cngfno72OjUmZA/6Rk=; b=w45lw5nCsG+c5kGt/JLadDP5gsz6bfI4ogrAixvj5zoPQB6blKnX6cA7195ZRRvF74XiG3 2R5kSH5FwZ87qXuTS4NZviknIRknxzylSwx9u6HdX7pujjoYKawBm+uB16puR/q9XIvKn9 LUoIT+Wf5c2Xlqvy5iCGZugl/Jdm/Ejz9yhr3taXsw7dg8/hZzQpWh9NknlN9ndLLxtVWA xSt9lgG7IX8/v+VYY/vKZm5KO0Ir913M7AH67rh+Q0961rTy64n9WrdWHlO7aIf+ycFr3m drpPplY25Oz8ex+M7sOj4P8aEgn0GTFcEvggNtaoAE38OyUwYBmLPSmjaYiDQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhfS69Whzm4Z; Wed, 27 Sep 2023 16:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGKG07069246; Wed, 27 Sep 2023 16:20:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGKGoX069240; Wed, 27 Sep 2023 16:20:16 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:20:16 GMT Message-Id: <202309271620.38RGKGoX069240@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: 2f0b059eeafc - main - intrng: switch from MAXCPU to mp_ncpus List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2f0b059eeafc545a4ab1835d6a5290e1e2ebb47f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2f0b059eeafc545a4ab1835d6a5290e1e2ebb47f commit 2f0b059eeafc545a4ab1835d6a5290e1e2ebb47f Author: Elliott Mitchell AuthorDate: 2023-09-26 17:06:04 +0000 Commit: Ed Maste CommitDate: 2023-09-27 16:19:37 +0000 intrng: switch from MAXCPU to mp_ncpus MAXCPU could be on the large side, while the hardware may not have many processors at all. As such only allocate counters for processors which actually exist, rather than always allocating for the maximum potentially allowed number. Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D41462 --- sys/kern/subr_intr.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 6535c42f2404..49fe20cdc890 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -175,11 +175,11 @@ intr_irq_init(void *dummy __unused) /* * - 2 counters for each I/O interrupt. - * - MAXCPU counters for each IPI counters for SMP. + * - mp_maxid + 1 counters for each IPI counters for SMP. */ nintrcnt = intr_nirq * 2; #ifdef SMP - nintrcnt += INTR_IPI_COUNT * MAXCPU; + nintrcnt += INTR_IPI_COUNT * (mp_maxid + 1); #endif intrcnt = mallocarray(nintrcnt, sizeof(u_long), M_INTRNG, @@ -312,18 +312,18 @@ intr_ipi_setup_counters(const char *name) mtx_lock(&isrc_table_lock); /* - * We should never have a problem finding MAXCPU contiguous counters, - * in practice. Interrupts will be allocated sequentially during boot, - * so the array should fill from low to high index. Once reserved, the - * IPI counters will never be released. Similarly, we will not need to - * allocate more IPIs once the system is running. + * We should never have a problem finding mp_maxid + 1 contiguous + * counters, in practice. Interrupts will be allocated sequentially + * during boot, so the array should fill from low to high index. Once + * reserved, the IPI counters will never be released. Similarly, we + * will not need to allocate more IPIs once the system is running. */ - bit_ffc_area(intrcnt_bitmap, nintrcnt, MAXCPU, &index); + bit_ffc_area(intrcnt_bitmap, nintrcnt, mp_maxid + 1, &index); if (index == -1) panic("Failed to allocate %d counters. Array exhausted?", - MAXCPU); - bit_nset(intrcnt_bitmap, index, index + MAXCPU - 1); - for (i = 0; i < MAXCPU; i++) { + mp_maxid + 1); + bit_nset(intrcnt_bitmap, index, index + mp_maxid); + for (i = 0; i < mp_maxid + 1; i++) { snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); intrcnt_setname(str, index + i); } From nobody Wed Sep 27 16:24:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwhlK28Tgz4vfL8; Wed, 27 Sep 2023 16:24: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 4RwhlK1XDqz3Qd0; Wed, 27 Sep 2023 16:24:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Hdev44iTjvdXgH1r9xdZsJdxKGQ6dcDqiPqtP8gtCY=; b=EKAf7T42rL/zpGjNrcLNUz/iiKQ2He+p0fThvZPyuJdTYT7DMw1I+zhKAGvllEn4DuRf0W Eg6bhHlXlpW/kmlCFDmxTj2EdWguSSijHBFLRY3pJNwcj2khREcYQVZdeHXEAih8IMe/WG NQ5cCUO6M80Ev7a7Y0sASzZ9xbxk+pkGP054ywT1gOFVg+fDwzBbWMWdn6SI/ets/H7fiN HGNOSWV6cYpatZhcc5XfFTXax/pWPcAmiyCFCT7fnV/YkI9rvsfe7jPh4bu9lppSnfZJhL 56BOGfCZTZT52QPuyL3/CpsaoL+0JJ7/6Ow4zodrTSHHxluCo+ycyYcnUbcjZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695831869; a=rsa-sha256; cv=none; b=qaM57tGDja/qL8PjrNhBYuZ2kXf9gROwDH+d0soSU1R/3ymPhGg3YMqjPXmrTW+X23zIys qh2UVB9ggrx/Vt1IH9BlJBO1aW3DMgt8JiHgcz6zqG3qylCqHcggkI7fKJ96pTu6sQjzUR dN69uPGvS//4gz9mttfYQQJy2oO3WJi2GKL+OOWbhscXx1Xs7zhAgpe0ZU0DBK6r1zrvrb Uj2oVlGQGOgXIQAdhq1Sn5CyXDCDqMz1WPoG5va3qpSwO3tu/B64mtTrOmnzIfCko2rBlj dE873AV+TSCcOX/ygYO1K3wQIc7TNMrpdw/HAKVq/WGZkFLbxC/z52Yt4JjoNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Hdev44iTjvdXgH1r9xdZsJdxKGQ6dcDqiPqtP8gtCY=; b=nfK4YBYQut/LY8Yn4VgvGHz3N8FVw6Dmyb28cA28FmyRTBetjPsRr5Oi3/UY/Zm3CFAwvx IstNYs6CdfmOX57W/H1/8nN5W5uaowViFW4uI4KcikFL0ap6wBcfB3ipadtGHB5sS/b8oF wjQu7ke8cjLKZVN7FY8Nkg7/omlozinMAL+FJh8//1TxdjgjcnO/x/D4zXuUruix7Yq8iI 2C5WJ+1Yh+VVP06IYK8JrYVQJHud5L3vzIWnIAZeKmW+oHekudLvdmKzIe/C2rPHUUj6DC M6NSf80IeN64//cemnsCh+knPVI4BmC7Nks8+5VlGYwQfLW4eQns1GTKylooWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhlK0bHQzm7P; Wed, 27 Sep 2023 16:24:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGOS8G076705; Wed, 27 Sep 2023 16:24:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGOSFV076702; Wed, 27 Sep 2023 16:24:28 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:24:28 GMT Message-Id: <202309271624.38RGOSFV076702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: f549e22901b3 - main - ip_mroute: Fix sysctl knobs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f549e22901b3a391c76659bee55802b1214112fd Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f549e22901b3a391c76659bee55802b1214112fd commit f549e22901b3a391c76659bee55802b1214112fd Author: Zhenlei Huang AuthorDate: 2023-09-27 16:23:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-27 16:23:22 +0000 ip_mroute: Fix sysctl knobs The loader tunable `net.inet.ip.mfchashsize` does not have corresponding sysctl MIB entry. Just add it. While here, the sysctl variable `net.inet.pim.squelch_wholepkt` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. Reviewed by: kp Fixes: 443fc3176dee Introduce a number of changes to the MROUTING code MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41997 --- sys/netinet/ip_mroute.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 2444fd9686f7..cda5f160e8fb 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -172,7 +172,9 @@ VNET_DEFINE_STATIC(u_long, mfchash); ((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & V_mfchash) #define MFCHASHSIZE 256 -static u_long mfchashsize; /* Hash size */ +static u_long mfchashsize = MFCHASHSIZE; /* Hash size */ +SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN, + &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size"); VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); @@ -226,7 +228,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_pim, PIMCTL_STATS, stats, struct pimstat, pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)"); static u_long pim_squelch_wholepkt = 0; -SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, +SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RWTUN, &pim_squelch_wholepkt, 0, "Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); @@ -2817,18 +2819,12 @@ ip_mroute_modevent(module_t mod, int type, void *unused) return (EINVAL); } - mfchashsize = MFCHASHSIZE; - if (TUNABLE_ULONG_FETCH("net.inet.ip.mfchashsize", &mfchashsize) && - !powerof2(mfchashsize)) { + if (!powerof2(mfchashsize)) { printf("WARNING: %s not a power of 2; using default\n", "net.inet.ip.mfchashsize"); mfchashsize = MFCHASHSIZE; } - pim_squelch_wholepkt = 0; - TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt", - &pim_squelch_wholepkt); - pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); ip_mcast_src = X_ip_mcast_src; From nobody Wed Sep 27 16:35:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwj0Q1XxXz4vfyG; Wed, 27 Sep 2023 16:35: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 4Rwj0Q13pNz3RHx; Wed, 27 Sep 2023 16:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jps47q7VHSgo/SPkEO1cfWpzxsHcjxf4EqDRnTPxpvk=; b=gZR0irTqLFCh1omoDNYnD+sj6PZU/LdgfzlPul+18dD5A+YwcgbzV62nPLmwMNNoDHEdR0 xj2Z7flctwvRt4lZtNszem+Z0GFxg18wvoAn8A7VntTiYR5RVh05L7dM3TMQZgh1jwBiMP 0AsskpF3L5a+a5f4q83Ij/Vf8ybk5ezX7qNuN3tBBpy1rMGOjiDOGn1MS6NIlRKcG3pB5c LvPSsM2I9HAbrJa6sW4nvXLjNI9N8j8o4a4gk5N10pV2tQY/HnXVnUuXm7qnsDZzUdzZHS 8j0Y03wvuTxTUWTYXFH3Gj9mp1Udu12JaiVgSajkPG0DqfaRnX2bniJCHtFmZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695832550; a=rsa-sha256; cv=none; b=ZmtEBM/LhvfmhXbLlLKZ+vtp540IjgQb/vCNnvtD/j850psOm7Cuf/FyBm8x1JPyJqZ+Ac ctApB28G8IaMjUyn5XTyvD5JvTPX52mG7wWixaX1/bqjRM6FEZXyzsBSC3gPYCL1ECQhr5 htR6XwVWA+7+tnHQw19kpmX/iN2WRE2ORTDYueH16HyeTT2yxRzF4KJJclrz0+gskSL9rJ jxyBgjKgfDo5ri5tOYNGIjoYkajM6kAUklPLORXSwDlb2K093fjnkln5seU0oxtmfK1tpy iBPzUFrHrimGXlwLZvyvPhGXDd1TXa831Vee8Yh8p0Xr0M1rBNfdaz06ry89qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jps47q7VHSgo/SPkEO1cfWpzxsHcjxf4EqDRnTPxpvk=; b=Uyan5Yqf1/vJmY9UT/puOZyaurVwrPQqHQ/b9qi8z3tawbtQktMrEzYP2iLGNf8qFO6P9l heO25mNzQRLhSZUarbxG+dxEjPHjbentOQ+vRTCk3eVwJ6m0QRLNWrAOdVZI+ybh1ZVM52 SV/7Z2/eC7WapJUCxGC3aA2LZI9Kbl1e6Is2JWCk9Hlsku4qLqRie4Bols3YQYDo3gyoSH C6+0EarWmXUk0Sg8gJw7oVFFO9pAQFx8ctNIGyTmP2Yh1pfD6PDANftrkiHyRAMI7OADhq hDxVJlkgLC7YF7DOoChe+E2b4ISRdT7xUOFYnRj4nB7eQNF4tLMR46T5FO43qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwj0Q06SkzmWH; Wed, 27 Sep 2023 16:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGZnDt093548; Wed, 27 Sep 2023 16:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGZnsM093545; Wed, 27 Sep 2023 16:35:49 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:35:49 GMT Message-Id: <202309271635.38RGZnsM093545@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: da695970cee9 - main - UPDATING: add a note about EARLY_AP_STARTUP on x86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: da695970cee95d0b460c451d5ff9c2cea04f1b73 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=da695970cee95d0b460c451d5ff9c2cea04f1b73 commit da695970cee95d0b460c451d5ff9c2cea04f1b73 Author: Ed Maste AuthorDate: 2023-09-27 16:34:07 +0000 Commit: Ed Maste CommitDate: 2023-09-27 16:35:17 +0000 UPDATING: add a note about EARLY_AP_STARTUP on x86 Requested by: wollman (in D41351) --- UPDATING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPDATING b/UPDATING index 38362cb86b73..a1bcecadd357 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20230927: + The EARLY_AP_STARTUP kernel option is mandatory on x86. The option + has been added to DEFAULTS, so it should automatically be included in + custom kernel configurations without any additional change. + 20230922: A new loader tunable net.pf.default_to_drop allows pf(4)’s default behaviour to be changed from pass to drop. Previously this required From nobody Wed Sep 27 16:40:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwj5S3CLhz4vgQ6; Wed, 27 Sep 2023 16:40: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 4Rwj5S2XJBz3RqL; Wed, 27 Sep 2023 16:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shOQgMS7tcGWaj0zGIVhOT6lRnTgFPcljNcFfso09/E=; b=iKmn8TZI2d7Qni6NumaaUfUXOjGue2FOw1SMzTJJxiytga8DBekpwoMnMuOSaRFGS8LRF/ TVMumGgPGum3wkYbda7fkvAB+BFDyqTtuky1wVmU/taS/OmaO2eQdeGdYc0NHqWf+AhHYQ AU5LG8zfclWDC+0dYe8hbdTDKeLOueAddxtm+dd2b4uZIAUBSKv6MetMcUX3A0TLVgsDRU fLhssI4T7BN6O4z383dGt6ChultpYk96QGLlF55OL3Kup3yrOajO1rWJTRA4rcYY8KHysA WdDUgGKj1h0OzFg+YNp/WwgHfxAB7/ZOnWgdnPLUjJ4SIsr3E3wnu7qnJ79swg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695832812; a=rsa-sha256; cv=none; b=Apbtc27/iq0D38/05x6S2T6Anm/Oaq3AMoJXsLxk2CR0jbMSg67V+rYdlwM71mbfajPN5S KB2In3U1bW+VCZZapUJ/whqYcUdIZ/LNJxHdnPOHGr80+quygcv8bVFOeg3erjDIrNxXE2 IJ1JBJBUueU2ksIDbc07AcnwhDL9aqQIhHjFaDILULsiZvFaLt2tEtJvRI8AECrEfCqt+s QKGRFMTCdtwEMhjvoI+S5KVRIVZtj3BBSvXfMn+jm6Yw13dDhYBzp+Ioq2AlJXYjF/ej6y EbvIMZ/qHzz/1kwixRa40o/L2k+HorVOBTPFD5blWMs5Lwh/fxV0o67fAXWW8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shOQgMS7tcGWaj0zGIVhOT6lRnTgFPcljNcFfso09/E=; b=HlwUu0VHz0bZLMfQvgN3ozqRHduhTLm/gXUWxZUxetTtWaC+czIJaA9f7rsAx6qDiIRpD/ EkPePt3ya4RpCREdHGQFVOsKAsS/7+Hda9dyAoNcez6/00mm0hNgCrT5JTsZqEeGXvextZ kx4o+DXbmVqOuovJrMFJIPe2V8AF/mJQJydQzenXaMt4SZg0+DYHllnJmlW6z3oRIBrHN1 sSHjRgcZo+ZZhTnRwTxbvLlv6nbjmZC7+NowOkNTKMabum07cJfzDzs4O5suPhZt4fJ6yb Ils2FMErq0RGYU3FeVkyZ+ug1Sgk0LB+6DsVHLT5Ar873pOTNSqVo9wok7mP3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwj5S1SVyzmXd; Wed, 27 Sep 2023 16:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGeC2M099550; Wed, 27 Sep 2023 16:40:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGeCPl099542; Wed, 27 Sep 2023 16:40:12 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:40:12 GMT Message-Id: <202309271640.38RGeCPl099542@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: c362fe939f6f - main - pmcstat: fix duplicate event allocation on CPU 0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c362fe939f6fe52056fb7506be9e5cbd0a5ef60b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c362fe939f6fe52056fb7506be9e5cbd0a5ef60b commit c362fe939f6fe52056fb7506be9e5cbd0a5ef60b Author: Mitchell Horne AuthorDate: 2023-09-27 16:37:46 +0000 Commit: Mitchell Horne CommitDate: 2023-09-27 16:39:56 +0000 pmcstat: fix duplicate event allocation on CPU 0 Commit b6e28991bf3a modified the allocation path for system scope PMCs so that the event was allocated early for CPU 0. The reason is so that the PMC's capabilities could be checked, to determine if pmcstat should allocate the event on every CPU, or just on one CPU in each NUMA domain. In the current scheme, there is no way to determine this information without performing the PMC allocation. This broke the established use-case of log analysis, and so 0aa150775179a was committed to fix the assertion. The result was what appeared to be functional, but in normal counter measurement pmcstat was silently allocating two counters for CPU 0. This cuts the total number of counters that can be allocated from a CPU in half. Additionally, depending on the particular hardware/event, we might not be able to allocate the same event twice on a single CPU. The simplest solution is to release the early-allocated PMC once we have obtained its capabilities, and reallocate it later on. This restores the event list logic to behave as it has for many years, and partially reverts commit b6e28991bf3a. Reported by: alc, kevans Reviewed by: jkoshy, ray MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41978 --- usr.sbin/pmcstat/pmcstat.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index fd4be99f83c8..c36cee436e55 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -713,8 +713,16 @@ main(int argc, char **argv) errx(EX_SOFTWARE, "ERROR: Out of memory."); (void) strncpy(ev->ev_name, optarg, c); *(ev->ev_name + c) = '\0'; + libpmc_initialize(&npmc); + if (args.pa_flags & FLAG_HAS_SYSTEM_PMCS) { + /* + * We need to check the capabilities of the + * desired event to determine if it should be + * allocated on every CPU, or only a subset of + * them. This requires allocating a PMC now. + */ if (pmc_allocate(ev->ev_spec, ev->ev_mode, ev->ev_flags, ev->ev_cpu, &ev->ev_pmcid, ev->ev_count) < 0) @@ -726,8 +734,14 @@ main(int argc, char **argv) err(EX_OSERR, "ERROR: Cannot get pmc " "capabilities"); } - } + /* + * Release the PMC now that we have caps; we + * will reallocate shortly. + */ + pmc_release(ev->ev_pmcid); + ev->ev_pmcid = PMC_ID_INVALID; + } STAILQ_INSERT_TAIL(&args.pa_events, ev, ev_next); @@ -751,10 +765,7 @@ main(int argc, char **argv) } if (option == 's' || option == 'S') { CPU_CLR(ev->ev_cpu, &cpumask); - pmc_id_t saved_pmcid = ev->ev_pmcid; - ev->ev_pmcid = PMC_ID_INVALID; pmcstat_clone_event_descriptor(ev, &cpumask, &args); - ev->ev_pmcid = saved_pmcid; CPU_SET(ev->ev_cpu, &cpumask); } From nobody Wed Sep 27 19:23:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwmkG5qcQz4ts8h; Wed, 27 Sep 2023 19: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 4RwmkG5FTvz4Flq; Wed, 27 Sep 2023 19: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=1695842630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSuzEkxLLEmgoSGP+GdLjIm+BFt5XVtei1fBphyXzKQ=; b=j86GbXso3DALbYL56GqRVmMz2COgP63+isjx5Xj30pgAN/i+GAhZgBrZDMLfZ3aVoyyeYg HcpU3ocqAcjcuU7uSX+PDtQeMg9nH+YkWz/ssDc11VhxKI3jlVQt46l7IDza67zTEX5T4Q RYlKuUi7Bf4KYEGpJXyRETiWvx/i7oMT2cs21qKmOl3P4KCBRSRF3wRmgPpzTpx64cGRFp OWYuacqmK4YlT9Sz1OaVwPTQOoH4c58ao+jSbxixCeQQaSh8+C18/R0RBo8TPKAjFe5eRI 49qL2SDAvNb8AGluevZOS0buU1WBVsRQ23PnGibJifRudM8CbK2V11Bd1jyS/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695842630; a=rsa-sha256; cv=none; b=cjXcp4MEg4ELeKb4nSKtKe+DGiPGLCl4tQPv2pY7lIOrqLh7rFmFONEVKTuYMtmljGMjoQ e90tY2999kUHHnldyU3YhJgDutERQhowygOg1QPuDkc+1GdXzuagCkXYfx7Y7pbx2luWZA wjXdJdMPGKbtX9gbEti35hHGFPAWnMCars7Tdn59Y1H2h4hW92EAVY1nd2Zqgi9oNb4Ly8 LmU4U3Mly3wAFgDUCPudF+YroXwU+Xe/TTpIxSe/9xPW63NuxNFcQ5tdOVh+i+watMFJXF eOsbh5BoKV61VVYZjTM7jOrrSuhjs4TyPGOYV3n1yyBqa06pmL2SIDrurqpAtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695842630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSuzEkxLLEmgoSGP+GdLjIm+BFt5XVtei1fBphyXzKQ=; b=KJMbnf4keUBOJ6Y/5DlsBOfiA+JJu/m/d1rayVSD08eyH1+tl3c30IQeHesenPMiyc0weY ZGViegMUz6d3v7GtU47PGS8N0lakXb2U/Wbd/mQTwuI23m3cG1h2Vz37SC0dY842ru9ZDR ofh4FYZ/zfiyoW33xuOF0LSEi/yHsctaNGOdeHV6KBbq/ZKfNd1OSdMqnz2xSBy3JTrY+D pWCkLOsELKpjL10qXdTgypJvBWAIVp2RQwvbLTPNmMQROIFFnu2oF+tnW2xrZRFJBjT5CW yho8zZapAQcBAlTugUeJpwjxqzDaShS+VyVR99Cd5IYpasPL8NQ+CVI8t3G/0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwmkG4Bx6zrvc; Wed, 27 Sep 2023 19:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RJNoGA076078; Wed, 27 Sep 2023 19:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RJNo0L076075; Wed, 27 Sep 2023 19:23:50 GMT (envelope-from git) Date: Wed, 27 Sep 2023 19:23:50 GMT Message-Id: <202309271923.38RJNo0L076075@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: f6d37c9ca13f - main - freebsd-update: handle file -> directory on upgrade List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85 commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85 Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Ed Maste CommitDate: 2023-09-27 19:23:08 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 29633b51b26c..c6432dcd6b0e 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2903,7 +2903,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Wed Sep 27 22:44:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwsB01Cjcz4v62C; Wed, 27 Sep 2023 22:44: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 4RwsB00bfZz4X7X; Wed, 27 Sep 2023 22:44:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695854680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAgFo4IbzQvXzp2bRZglyZhuO55EjY0vKgTJ8AFXFI4=; b=Th1tV/RBMyI98M0YTaM6ic2F1fRzAXbZeKSCYb1xPzvmewoermoP3kstpwiX+36ppzUE/v foY79Wqc9OYQ1j4X2EQyEJ/foH9vMRcXhvcyPSl02wCNPgOSUwk9pz9rPSiqDO7kOYYxdp G077OaHHRhtOvhCDCu1cK4lOsOrbpHGsCo7GFtJ0t/+fFktzkRxMyeEby3LQu97s0r5kf1 0XLjaDwjYp5D1znf4JvHnHgvc/AmTUUW8VJVt5aNONXIvVA3myvcnSgUXYx5usuGdZv1NM LsXkb5NZ6AaqEaK0CyalMBOMKigTT9ZK41uXwKQSSiU/SBXxuMnIWihmKdMxEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695854680; a=rsa-sha256; cv=none; b=XcPw1c7sDdJMiKQPek0UUaruf+QE11J1zBS4d7aQ8aBaMr1r9tc7XVWwbJvEoWFnV2r/59 kLSKmA29ll+0y/8Kq7F9r7OBAUVuk0L0gtHlkoaY1/fW0miGDpMYrYjtgaSyoyO6oQKhu8 TZJCzULeAtVM1PrncQ06gHPNx91DDB53GqO7sHqruAaVdLKmHT82r5BRpsxp1g6t1OiznS s5OSOju9wBNo/60J+qYCnCcy0FbP/1UZQOEpN7latCTGFEFomP2OZHROIs4OhvqB9EVaAE v0N3HZpxSYYh/4a4EE/gG22cw8lmL8tPLS6My85yi0BgkAQRtlx8KEpRXMRICQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695854680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAgFo4IbzQvXzp2bRZglyZhuO55EjY0vKgTJ8AFXFI4=; b=gGpUDxbQwWsT04KnWICjdVuP7pGHOiihOQphYD/mKz12ykBVT3sSOhOpuYnKN8ytHrB0z/ JhuFQuiviZ0+8jETz1qhegyga+2pkqpOjVeEcTV7I3/YPcKx09Xe2hlz+SQhUapEQMiXxC Whw3/s0QWE0tBXk/Wp+nStW+59LhIGfKBLUm6H9jk+PweNy6nJGrY2Co2isSo339RAk0lm vFfrAUXA1L7sZ+QjQoSO1LefJgLh7ullko0VYG/aUaY8mT1VuwLcCs/LZLaKtTS2yXuQbx YjmsRbcn7s8f1GzHO9ITBv2mlabSb1wr6G7aAlffSHtdjVjTc8tKXjx9StdHFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rws9z6YT2zxCj; Wed, 27 Sep 2023 22:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RMidGp007154; Wed, 27 Sep 2023 22:44:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RMidM9007151; Wed, 27 Sep 2023 22:44:39 GMT (envelope-from git) Date: Wed, 27 Sep 2023 22:44:39 GMT Message-Id: <202309272244.38RMidM9007151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 636c1933fe69 - releng/14.0 - zfs: update share/zfs/compatibility.d to match current ZFS code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 636c1933fe69f8ef549886f3f2f4e9c32938e978 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=636c1933fe69f8ef549886f3f2f4e9c32938e978 commit 636c1933fe69f8ef549886f3f2f4e9c32938e978 Author: Martin Matuska AuthorDate: 2023-09-21 23:34:47 +0000 Commit: Martin Matuska CommitDate: 2023-09-27 21:49:26 +0000 zfs: update share/zfs/compatibility.d to match current ZFS code Approved by: re (gjb) (cherry picked from commit 7a0e9e3f8f3a9379df793284f719f1a7ee5734c2) (cherry picked from commit bb438c08b86a32f13da16b2e7801f2cbd45bc5c1) --- cddl/share/zfs/compatibility.d/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile index e60bd172dcce..13d88fef184d 100644 --- a/cddl/share/zfs/compatibility.d/Makefile +++ b/cddl/share/zfs/compatibility.d/Makefile @@ -22,6 +22,7 @@ FILES= \ openzfs-2.0-linux \ openzfs-2.1-freebsd \ openzfs-2.1-linux \ + openzfs-2.2 \ zol-0.6.1 \ zol-0.6.4 \ zol-0.6.5 \ @@ -42,12 +43,17 @@ LINKS= \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.0 \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.1 \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.2 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.3 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.4 \ ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freenas-11.3 \ ${FILESDIR}/freenas-11.0 ${FILESDIR}/freenas-11.1 \ ${FILESDIR}/openzfsonosx-1.9.3 ${FILESDIR}/openzfsonosx-1.9.4 \ ${FILESDIR}/openzfs-2.0-freebsd ${FILESDIR}/truenas-12.0 \ ${FILESDIR}/zol-0.7 ${FILESDIR}/ubuntu-18.04 \ - ${FILESDIR}/zol-0.8 ${FILESDIR}/ubuntu-20.04 + ${FILESDIR}/zol-0.8 ${FILESDIR}/ubuntu-20.04 \ + ${FILESDIR}/openzfs-2.1-linux ${FILESDIR}/ubuntu-22.04 \ + ${FILESDIR}/openzfs-2.2 ${FILESDIR}/openzfs-2.2-linux \ + ${FILESDIR}/openzfs-2.2 ${FILESDIR}/openzfs-2.2-freebsd LINKMODE= ${NOBINMODE} From nobody Wed Sep 27 22:44:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwsB12LVXz4v5tc; Wed, 27 Sep 2023 22:44: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 4RwsB11cBLz4XJn; Wed, 27 Sep 2023 22:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695854681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZcBGbqnWhUclGH9k/t0Tl/vFMZ9A33D2AdVNk/3eUc0=; b=ep7fmjIb6ECWcZKmitLY/Dd++pje7CRC8dMEqnMC/0xI3CUjxDtvlVuKwFXo6X5TzfB7FB f5fHys0VwDr7fBpDl5eE26TASlgJR949TEyHTqLQ+ip5VFtaikEnU56QgZHSRwBp4Aw/KW Mrv0uyuXFvOqA0FrKX2B94/E80GYL6EcARB/XSZzINa1+E6gxG13pzIjbKcNn2um9Eqt/G ioQd4IHJd78a2azkcYzNZQO976UjkCatRliPMFbaSz2h9EH73qnx7n63IMFWCrUrslHBSw eonbptINvcyxOWiEZBDWbxFhfKOjIxDRRauPodUZEWvLs6RrD6hNJVFdenaFHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695854681; a=rsa-sha256; cv=none; b=tLBKHPH9xJNiPFN0z7AM2NeaeShTyz4gZWj8npTRFHjNTLwBOsOS/3JsgK7d2kKsrrjfCt NM5FUcMURcb067I+80wDR1OobGreMRaO3KY1gDM/nPZC97+/DD0j1XADVKFojF6OUHZS26 EWiRx1IBtNkciHj/6GKbofufN2RhHBccI4i4lesDToFIyctN+7dtvN2zKGxqoG8X+rPp4S jnodtl3AeOXDB/878bGuV5mOXBHzRAWNBIEaan0NkQ+lG1HW01foG6lCJdXem5ZBuhV4hz 4Xi625yKAJNACJel2NZHOHrEGYzqmU1FvEpAvkW8wXG0zXwfmze1lFrOgyhhzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695854681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZcBGbqnWhUclGH9k/t0Tl/vFMZ9A33D2AdVNk/3eUc0=; b=g8N/RkqP0L80KQZFlHKCqnYj2cU8vnYj3jTJslZmuo7Z/6SLGn5uU/1hLZfD9DbdOU7cBB dCnAcylwvTJjrOYuKRUj+HJNDe4YhcRbO/x9KnCK94aFZa//RL3ux6ps2P0L5xhrMPybHz z34ZZptGc4RrVqnQ/ElOXF9ccw0mK8bEJwxnzqNCjV2O8ip0WOOCsFVBo3DTrLVwLZjR97 CxtIjkczqhGZrX/k0ztQ4kNao+/NZ4a5ds6K1z1OdqF/nHkZtolupW//ET6XzvLJzqBDfj exWVoaTYlCekTBJW/vd+unjE9qzd5RhKuMGbUQuHpBs3URYgZJGSsPzJUXvsmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwsB10JFpzxNn; Wed, 27 Sep 2023 22:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RMieVe007200; Wed, 27 Sep 2023 22:44:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RMieZX007197; Wed, 27 Sep 2023 22:44:40 GMT (envelope-from git) Date: Wed, 27 Sep 2023 22:44:40 GMT Message-Id: <202309272244.38RMieZX007197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: b31ac0350909 - releng/14.0 - zfs: merge openzfs/zfs@5f3069867 (zfs-2.2-release) into stable/14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: b31ac03509092358597762d48b2ba82874387756 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=b31ac03509092358597762d48b2ba82874387756 commit b31ac03509092358597762d48b2ba82874387756 Author: Martin Matuska AuthorDate: 2023-09-24 22:26:28 +0000 Commit: Martin Matuska CommitDate: 2023-09-27 21:49:41 +0000 zfs: merge openzfs/zfs@5f3069867 (zfs-2.2-release) into stable/14 Notable upstream pull request merges: #15248 cc75c816c Fix l2arc_apply_transforms ztest crash #15273 6d9bc3ec9 Fix occasional rsend test crashes #15288 f63683fe0 cmd: add 'help' subcommand to zpool and zfs #15297 a199cac6c status: report pool suspension state under failmode=continue Approved by: re (gjb) Obtained from: OpenZFS OpenZFS commit: 5f30698670dec3fc2085663677021f0a592cf081 (cherry picked from commit 6cfb90c6ebe4c2eb8de4abad679289b9a6c7aae2) --- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 30 +++++++++++++++++++++ sys/contrib/openzfs/cmd/zpool/zpool_main.c | 31 ++++++++++++++++++++++ sys/contrib/openzfs/cmd/ztest.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 3 ++- sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c | 10 ++++--- sys/contrib/openzfs/module/zfs/arc.c | 11 ++++---- sys/contrib/openzfs/module/zfs/spa_misc.c | 4 +-- .../openzfs/tests/zfs-tests/tests/Makefile.am | 2 ++ ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 1 + .../cli_root/zfs_program/zfs_program_json.ksh | 4 ++- sys/modules/zfs/zfs_config.h | 4 +-- sys/modules/zfs/zfs_gitrev.h | 2 +- 12 files changed, 87 insertions(+), 17 deletions(-) diff --git a/sys/contrib/openzfs/cmd/zfs/zfs_main.c b/sys/contrib/openzfs/cmd/zfs/zfs_main.c index afd330630f69..533a21bba4d0 100644 --- a/sys/contrib/openzfs/cmd/zfs/zfs_main.c +++ b/sys/contrib/openzfs/cmd/zfs/zfs_main.c @@ -132,6 +132,8 @@ static int zfs_do_zone(int argc, char **argv); static int zfs_do_unzone(int argc, char **argv); #endif +static int zfs_do_help(int argc, char **argv); + /* * Enable a reasonable set of defaults for libumem debugging on DEBUG builds. */ @@ -606,6 +608,9 @@ usage(boolean_t requested) (void) fprintf(fp, gettext("\nFor the delegated permission list, run: %s\n"), "zfs allow|unallow"); + (void) fprintf(fp, + gettext("\nFor further help on a command or topic, " + "run: %s\n"), "zfs help []"); } /* @@ -8726,6 +8731,25 @@ zfs_do_version(int argc, char **argv) return (zfs_version_print() != 0); } +/* Display documentation */ +static int +zfs_do_help(int argc, char **argv) +{ + char page[MAXNAMELEN]; + if (argc < 3 || strcmp(argv[2], "zfs") == 0) + strcpy(page, "zfs"); + else if (strcmp(argv[2], "concepts") == 0 || + strcmp(argv[2], "props") == 0) + snprintf(page, sizeof (page), "zfs%s", argv[2]); + else + snprintf(page, sizeof (page), "zfs-%s", argv[2]); + + execlp("man", "man", page, NULL); + + fprintf(stderr, "couldn't run man program: %s", strerror(errno)); + return (-1); +} + int main(int argc, char **argv) { @@ -8781,6 +8805,12 @@ main(int argc, char **argv) if ((strcmp(cmdname, "-V") == 0) || (strcmp(cmdname, "--version") == 0)) return (zfs_do_version(argc, argv)); + /* + * Special case 'help' + */ + if (strcmp(cmdname, "help") == 0) + return (zfs_do_help(argc, argv)); + if ((g_zfs = libzfs_init()) == NULL) { (void) fprintf(stderr, "%s\n", libzfs_error_init(errno)); return (1); diff --git a/sys/contrib/openzfs/cmd/zpool/zpool_main.c b/sys/contrib/openzfs/cmd/zpool/zpool_main.c index 6d0dae8d8b05..d64fdfa5ba4c 100644 --- a/sys/contrib/openzfs/cmd/zpool/zpool_main.c +++ b/sys/contrib/openzfs/cmd/zpool/zpool_main.c @@ -126,6 +126,8 @@ static int zpool_do_version(int, char **); static int zpool_do_wait(int, char **); +static int zpool_do_help(int argc, char **argv); + static zpool_compat_status_t zpool_do_load_compat( const char *, boolean_t *); @@ -538,6 +540,10 @@ usage(boolean_t requested) (void) fprintf(fp, "%s", get_usage(command_table[i].usage)); } + + (void) fprintf(fp, + gettext("\nFor further help on a command or topic, " + "run: %s\n"), "zpool help []"); } else { (void) fprintf(fp, gettext("usage:\n")); (void) fprintf(fp, "%s", get_usage(current_command->usage)); @@ -11051,6 +11057,25 @@ zpool_do_version(int argc, char **argv) return (zfs_version_print() != 0); } +/* Display documentation */ +static int +zpool_do_help(int argc, char **argv) +{ + char page[MAXNAMELEN]; + if (argc < 3 || strcmp(argv[2], "zpool") == 0) + strcpy(page, "zpool"); + else if (strcmp(argv[2], "concepts") == 0 || + strcmp(argv[2], "props") == 0) + snprintf(page, sizeof (page), "zpool%s", argv[2]); + else + snprintf(page, sizeof (page), "zpool-%s", argv[2]); + + execlp("man", "man", page, NULL); + + fprintf(stderr, "couldn't run man program: %s", strerror(errno)); + return (-1); +} + /* * Do zpool_load_compat() and print error message on failure */ @@ -11118,6 +11143,12 @@ main(int argc, char **argv) if ((strcmp(cmdname, "-V") == 0) || (strcmp(cmdname, "--version") == 0)) return (zpool_do_version(argc, argv)); + /* + * Special case 'help' + */ + if (strcmp(cmdname, "help") == 0) + return (zpool_do_help(argc, argv)); + if ((g_zfs = libzfs_init()) == NULL) { (void) fprintf(stderr, "%s\n", libzfs_error_init(errno)); return (1); diff --git a/sys/contrib/openzfs/cmd/ztest.c b/sys/contrib/openzfs/cmd/ztest.c index 398c519cfc35..59c4be225f93 100644 --- a/sys/contrib/openzfs/cmd/ztest.c +++ b/sys/contrib/openzfs/cmd/ztest.c @@ -3767,7 +3767,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id) else if (ashift > oldvd->vdev_top->vdev_ashift) expected_error = EDOM; else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd)) - expected_error = ENOTSUP; + expected_error = EINVAL; else expected_error = 0; diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c b/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c index 85564edfd862..4ebd112f452f 100644 --- a/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c +++ b/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c @@ -29,7 +29,7 @@ * Copyright (c) 2017, Intel Corporation. * Copyright (c) 2018, loli10K * Copyright (c) 2021, Colm Buckley - * Copyright (c) 2021, Klara Inc. + * Copyright (c) 2021, 2023, Klara Inc. */ #include @@ -255,6 +255,7 @@ zpool_get_state_str(zpool_handle_t *zhp) if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { str = gettext("FAULTED"); } else if (status == ZPOOL_STATUS_IO_FAILURE_WAIT || + status == ZPOOL_STATUS_IO_FAILURE_CONTINUE || status == ZPOOL_STATUS_IO_FAILURE_MMP) { str = gettext("SUSPENDED"); } else { diff --git a/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c b/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c index c63a16de5ab6..01d803e21db0 100644 --- a/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c +++ b/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c @@ -650,10 +650,12 @@ send_worker(void *arg) unsigned int bufsiz = max_pipe_buffer(ctx->from); ssize_t rd; - while ((rd = splice(ctx->from, NULL, ctx->to, NULL, bufsiz, - SPLICE_F_MOVE | SPLICE_F_MORE)) > 0) - ; - + for (;;) { + rd = splice(ctx->from, NULL, ctx->to, NULL, bufsiz, + SPLICE_F_MOVE | SPLICE_F_MORE); + if ((rd == -1 && errno != EINTR) || rd == 0) + break; + } int err = (rd == -1) ? errno : 0; close(ctx->from); return ((void *)(uintptr_t)err); diff --git a/sys/contrib/openzfs/module/zfs/arc.c b/sys/contrib/openzfs/module/zfs/arc.c index 7023f448182a..22dc0ed5e3b6 100644 --- a/sys/contrib/openzfs/module/zfs/arc.c +++ b/sys/contrib/openzfs/module/zfs/arc.c @@ -9092,15 +9092,16 @@ l2arc_apply_transforms(spa_t *spa, arc_buf_hdr_t *hdr, uint64_t asize, * write things before deciding to fail compression in nearly * every case.) */ - cabd = abd_alloc_for_io(size, ismd); - tmp = abd_borrow_buf(cabd, size); + uint64_t bufsize = MAX(size, asize); + cabd = abd_alloc_for_io(bufsize, ismd); + tmp = abd_borrow_buf(cabd, bufsize); psize = zio_compress_data(compress, to_write, &tmp, size, hdr->b_complevel); if (psize >= asize) { psize = HDR_GET_PSIZE(hdr); - abd_return_buf_copy(cabd, tmp, size); + abd_return_buf_copy(cabd, tmp, bufsize); HDR_SET_COMPRESS(hdr, ZIO_COMPRESS_OFF); to_write = cabd; abd_copy(to_write, hdr->b_l1hdr.b_pabd, psize); @@ -9110,9 +9111,9 @@ l2arc_apply_transforms(spa_t *spa, arc_buf_hdr_t *hdr, uint64_t asize, } ASSERT3U(psize, <=, HDR_GET_PSIZE(hdr)); if (psize < asize) - memset((char *)tmp + psize, 0, asize - psize); + memset((char *)tmp + psize, 0, bufsize - psize); psize = HDR_GET_PSIZE(hdr); - abd_return_buf_copy(cabd, tmp, size); + abd_return_buf_copy(cabd, tmp, bufsize); to_write = cabd; } diff --git a/sys/contrib/openzfs/module/zfs/spa_misc.c b/sys/contrib/openzfs/module/zfs/spa_misc.c index 3b355e0debcc..72b690162d64 100644 --- a/sys/contrib/openzfs/module/zfs/spa_misc.c +++ b/sys/contrib/openzfs/module/zfs/spa_misc.c @@ -27,6 +27,7 @@ * Copyright (c) 2017 Datto Inc. * Copyright (c) 2017, Intel Corporation. * Copyright (c) 2019, loli10K . All rights reserved. + * Copyright (c) 2023, Klara Inc. */ #include @@ -2756,8 +2757,7 @@ spa_state_to_name(spa_t *spa) vdev_state_t state = rvd->vdev_state; vdev_aux_t aux = rvd->vdev_stat.vs_aux; - if (spa_suspended(spa) && - (spa_get_failmode(spa) != ZIO_FAILURE_MODE_CONTINUE)) + if (spa_suspended(spa)) return ("SUSPENDED"); switch (state) { diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am index 66aff5026f8f..1a58e6f774e9 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am @@ -1588,7 +1588,9 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \ functional/online_offline/setup.ksh \ functional/pam/cleanup.ksh \ functional/pam/pam_basic.ksh \ + functional/pam/pam_change_unmounted.ksh \ functional/pam/pam_nounmount.ksh \ + functional/pam/pam_recursive.ksh \ functional/pam/pam_short_password.ksh \ functional/pam/setup.ksh \ functional/pool_checkpoint/checkpoint_after_rewind.ksh \ diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh index a10545bc0769..74c5a5bece60 100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh @@ -51,6 +51,7 @@ log_onexit cleanup log_must zpool create -o feature@block_cloning=enabled $TESTPOOL $DISKS log_must set_tunable64 TXG_TIMEOUT 5000 +log_must sync_pool $TESTPOOL true log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=128K count=4 log_must clonefile -f /$TESTPOOL/file /$TESTPOOL/clone 0 0 524288 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh index b0265c5ee4a1..2241b77bf806 100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh @@ -117,7 +117,9 @@ usage: For the property list, run: zfs set|get -For the delegated permission list, run: zfs allow|unallow") +For the delegated permission list, run: zfs allow|unallow + +For further help on a command or topic, run: zfs help []") cnt=0 for cmd in ${neg_cmds[@]}; do log_mustnot zfs program $cmd $TESTPOOL $TESTZCP $TESTDS 2>&1 diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index f5d0a4d6d7d1..059989a79d1c 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -1095,7 +1095,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.2.0-FreeBSD_g62677576a" +#define ZFS_META_ALIAS "zfs-2.2.0-FreeBSD_g5f3069867" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -1125,7 +1125,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "FreeBSD_g62677576a" +#define ZFS_META_RELEASE "FreeBSD_g5f3069867" /* Define the project version. */ #define ZFS_META_VERSION "2.2.0" diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h index 9b7204050397..5b3f631df93a 100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@ -1 +1 @@ -#define ZFS_META_GITREV "zfs-2.2.0-rc4-20-g62677576a" +#define ZFS_META_GITREV "zfs-2.2.0-rc4-27-g5f3069867" From nobody Wed Sep 27 23:03:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwsbs0qZnz4v6rK; Wed, 27 Sep 2023 23:03: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 4Rwsbs0Kp0z4Z7m; Wed, 27 Sep 2023 23:03:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HqBJg9JOfpM9mGCRefJQVOmOSCBzxBIKe3m0U0X0h/Q=; b=vv4lQSrAm1cHWGrPbxWcUdwoMg3kik9UWBN+RzrA6c3wYqTM2z7laBhmwmFBI0m5bU1ZsN i6MdEWkLx4ge3ShO1J1IAnNN3ovb+fAdXltvMZ71+xAvZDZw9mv9WIQT1fnoMtW7BxgsjY x2Xb3mtqJGudAT4dm8omAdsV7jBj+FJkLJrltxwHnz9Dmhxok9/R/bFdbl/3T3MDB5DKbE 1ZdGrzbF12kYsmTqkosVCFgyLJBpMs3RjtTzc7zHHm9r+PzEJ7AJ5EbiGTawtwauhKH/9+ iMuMXtlRTlhomKoaz78UuLIvqFgzpg+odZAMVw90cFiK+lghXGBhhQTadm872g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695855817; a=rsa-sha256; cv=none; b=Ob7S8fJUgGQ1iP3Q0apPKqTXhLP+NnpsFL6bWoYVsf9xu3Xsvb/uJ7xVUJl3FRO5z+ybut d/j12NGEIs1ChEGnmnW0EhftDlJFR6p8nei7Wuk8QxTYpfB96qsnMZBy4+6XpsgM3a/Z3T X1nii+ST3uMeuL+JV+l7yf8eZEARaSZyemJ/PZUJNhSvQCiZu7uuMBtkdZNJV4RRXEBlNl pcCBS9NIMdo7TDWXjTVUGWBfeS7P9vS29ajAQ91/v8uc4awMWYSLda10cFSvtRhDMkOnPF dnPsGi6ojHgXWrewTo4lenL22lVOy1xERUtRTtbWsj/5/f7fSJcnXqL+PKX71Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HqBJg9JOfpM9mGCRefJQVOmOSCBzxBIKe3m0U0X0h/Q=; b=INYtza+7ilK2Mu/GwclbGW44LHSNhWxDhbDGZYg98D8agS+pz1hEGjP1EnB2qPYG8PPZ4v ciRienLkuf8XGOn7Ti3h6mr2LRr80NLkeBeoj+jxIjd1bleonymKODlktoi+Yxvbwb7jx2 6sothrs5Ml4qjctdZDE8ABAckoQfFUvu5Pg8/aBTFNwcUa2x3lFl3yI2go3oDIr5cuNlfD 31E+ms9zrFQf+GTPWxYwSqY94IV12B4mR2onTE65JZcFWvbZteN1mrj5+vOPEEPMNrykoB StdqMM/af6fEpyOJqUT805c+UgIywF+q7VlOFGYevWLxxwISIDw6pFjcDDmJEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwsbr6VGzzy59; Wed, 27 Sep 2023 23:03:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RN3aUG040887; Wed, 27 Sep 2023 23:03:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RN3a7m040885; Wed, 27 Sep 2023 23:03:36 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:03:36 GMT Message-Id: <202309272303.38RN3a7m040885@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: 63aa2e91342e - main - release/ec2: Remove references to portsnap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 63aa2e91342ead0495eada5667f413f0cf8eb56a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=63aa2e91342ead0495eada5667f413f0cf8eb56a commit 63aa2e91342ead0495eada5667f413f0cf8eb56a Author: Mark Johnston AuthorDate: 2023-09-27 22:02:36 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 23:03:25 +0000 release/ec2: Remove references to portsnap We no longer install a default portsnap.conf, so the sed invocation just generates an error. Reviewed by: cperciva MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42003 --- release/tools/ec2.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 71f9f5c330cb..d033739adc26 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -126,11 +126,9 @@ EOF 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ ${DESTDIR}/etc/ssh/sshd_config - # Use FreeBSD Update and Portsnap mirrors hosted in AWS + # Use FreeBSD Update mirrors hosted in AWS sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ ${DESTDIR}/etc/freebsd-update.conf - sed -i '' -e 's/portsnap.FreeBSD.org/aws.portsnap.FreeBSD.org/' \ - ${DESTDIR}/etc/portsnap.conf # Use the NTP service provided by Amazon sed -i '' -e 's/^pool/#pool/' \ From nobody Wed Sep 27 23:03:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwsbt31dNz4v6lV; Wed, 27 Sep 2023 23:03: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 4Rwsbt1htlz4ZBY; Wed, 27 Sep 2023 23:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuXQQGVdQ5erSn13TJF8jYLG3NJ6rpYKBBRmdj4Nmbw=; b=D47i+4cPZrOtH25cevhE6OW9Roo1/LErii6Cder0wrgP0hCu9RrMzg3tIV3ozp/JxFZC4E LTqqgwSZ5aGOI0oSlTlpw2/K2CYK5Ye4CloieO08WM+oUqeg5JeNTjtPQgWWLO/GGWSz5e HWxhkLpOwJAPyHyumHby1CzmsDAgebVyhxSkHHg9b+Ei0pcOYWOCRvrRmM5ZvqgxEjKS1z QHhZlpHJgZz+8pwh0FAnNmdszPN7Uy7f5qFYv+rHfisl7R7l4RGSXnbSZUywqTrZ90+km4 xfCDGo4UpR1Qlow1//NxEA70XFY0we2ER5THLp5SmisYYea/iUHP7wAAozYESg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695855818; a=rsa-sha256; cv=none; b=L4ggnySRsT1662gk5b28UgcdZUI+RbubRUP44G0srF7jIHAKKb/wPwfXhBmxHyAYHBSPFO HP+lxyAPuZES33anxRnfyNKbN3nKdAialqGn7PuGa4zY1Fcn0WJcFyW4EA5wkgJiAKEdQP Sa0B5VdpYhRm8hT1k/w9if91CrnJd2hx+piwQFTgfs0BOOriYYvX1UolVtiCu0OPnYCURM fyf1ZI43BNgPIcDpHvVnQ/EfM3EZEm0dPYPrJjk+YcEv+GUp3xgETVd/5Pat52Mcwu4C0Z mA5dC3+ZmFiUE/64700c2BUhYIiQSQwRVDcnmgDacg+RJmabYD4DKsTi3Eh8xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuXQQGVdQ5erSn13TJF8jYLG3NJ6rpYKBBRmdj4Nmbw=; b=rq/Jv4lqwAQyDBdpxd0KjIM3Mc6WYRNciI8spd8zyPx/LmfpPB3yfVK8+VBC3ZJ+X4ehR+ L6sjBhy/Vl/oW09pM3Cqh0rY2wr540Nu3hBObaOx6rb3WTvvhwZiONGHN/OHs6noSql07M gVxkcYD6lhHrB7S7UpUTIkW4aKySPPf+2/rfWnOIBPg33fSUkS78KndWjXVBTbW5Wt7T3x vnSGIGBADzlxE0t6LH6WRQkH218kzkKYOmsSfVHEHbN9iCrDxvs51uGarlsE1R9dznGx0+ AwtLEPC+6NbwkwP7hkIPeCSXPaaPTieUMxB57y0WjoQj49S8pbkdo4MmHRp7LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwsbt0dzvzxDr; Wed, 27 Sep 2023 23:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RN3bRW040930; Wed, 27 Sep 2023 23:03:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RN3bWw040927; Wed, 27 Sep 2023 23:03:37 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:03:37 GMT Message-Id: <202309272303.38RN3bWw040927@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: 60c95af88f6a - main - makefs/zfs: Remove a nonsensical comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d commit 60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d Author: Mark Johnston AuthorDate: 2023-09-27 22:21:37 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 23:03:26 +0000 makefs/zfs: Remove a nonsensical comment When populating files, makefs needs to copy their contents into userspace in order to compute a checksum, so copy_file_range(2) is out of the question. Though, it could possibly be used when building other types of filesystems. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs/fs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index a4968d5f91e8..0d85ea8eb9d8 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -551,8 +551,6 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) /* * Fill up our buffer, handling partial reads. - * - * It might be profitable to use copy_file_range(2) here. */ sofar = 0; target = MIN(size - foff, (off_t)bufsz); From nobody Wed Sep 27 23:11:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwsmZ4XDGz4v7KC; Wed, 27 Sep 2023 23:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwsmZ3xjnz4Zmn; Wed, 27 Sep 2023 23:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t0iAcFxhl9WxOruXumGbv8DexmSq0CWSEvabm0/nXvI=; b=tdHG5wNeLNfSK1HZXGIxGOvqsKHmGf8UP47Ah1XGI09CMkgKYvbPhNENXsN0XEj8egXav9 j7PAo2coNhE7Pg5XY3EO81eIdD2INy8IOT0JqQk5utaIOfkQ6A8x98ryHE3ciSk0m4ahAQ QCPpzKCwubkjw3PxF4bvAHlD5kAvnAzaRgsbsUJylYafsbbsd+riO1eJ/urUDpKiTLsJ8t FgZqOVFMfUB/yBT+NlHeP5txhD2Iaol49UH6k9Rxi/cOwPsmhjrTQlldSUxTHDuLCajl92 XJ9X1xCjg+Giv/246PERvgxcDmepu2gxRneyv6OOZXknYqwp+cJkw7kT9S7DEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695856270; a=rsa-sha256; cv=none; b=S38mlxDwu5KSj0/1xrr/M/Hk0JKD67KdtXxSPfEu/JbfuyyZjScdPl8vkDHwdNvw2Q9GA4 NMfOFd4gT/OonyFod8SUb91+6LxQaZ2pnfdAR9/zXzmw6HGxaT1QkRFR0S7A34LIzzWe20 QkCbS1eXID8TE60Waj/k5UXN8FXvIQQnTDVPVam7M8OM6iXIxwo4CmhfyHJNw6iKx/9shz 7lhry83JwLPf5Lrb6FQ8gHrp6CbQoNkvh7HDvHXtvsgpW4cZzNCt/VqJyYkz451tDigk/2 O+1xD8jziMkxwb+Belb+wRllvXwqZ7iHPYGaWSuTFDyRounqk432IDSnjarh+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t0iAcFxhl9WxOruXumGbv8DexmSq0CWSEvabm0/nXvI=; b=v0/GCH+M/Go+EjWFBGLrTZBdiZoolk6xd/XRmIyZ3/u9fm1aYimTQhTAw82m5mMSXwNVdJ 1TC7KgW+SUbkdICjraeerQfccaYD6JSmg0lKch/RvJPdU2TTEcjlLiFQUT/gt7FyR8T0yI /XXNS85huOPboNTtMc4ffi+1sZXMZnompHWsMdA4ZvPFt/E+9T9zvEWyYe5ao5DN1J/b3d mKMM1mFyv1OZYgvLVMmCNwXhpBpaPIeok0ddMakbhEe55J6iACACe3x1/UZZ+vH56nQnQA aafNfbHT07531ptcmlL3NYn9XJVO9l5UrvTtRTVFbrqWM80ZaaEgAk4REnMagQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwsmZ325GzxDx; Wed, 27 Sep 2023 23:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RNBAFB052385; Wed, 27 Sep 2023 23:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RNBA8R052382; Wed, 27 Sep 2023 23:11:10 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:11:10 GMT Message-Id: <202309272311.38RNBA8R052382@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: cb668587591c - main - Revert "sys/conf/newvers.sh: whack sccs tag" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: cb668587591c4850bf7fb939a2b79e0e9aa77f7c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb668587591c4850bf7fb939a2b79e0e9aa77f7c commit cb668587591c4850bf7fb939a2b79e0e9aa77f7c Author: Warner Losh AuthorDate: 2023-09-27 23:07:43 +0000 Commit: Warner Losh CommitDate: 2023-09-27 23:07:43 +0000 Revert "sys/conf/newvers.sh: whack sccs tag" This string is still in active use to find versions for core files before we have symbols. This is premature. This reverts commit e6dc6a27230f836a131118326731b7c5fd417723. Sponsored by: Netflix --- sys/conf/newvers.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 18b1817ca287..73fd6857d307 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,9 +311,11 @@ fi vers_content_new=$(cat << EOF $COPYRIGHT +#define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" +char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] = VERSTR; char compiler_version[] = "${compiler_v}"; char ostype[] = "${TYPE}"; From nobody Wed Sep 27 23:11:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwsmb5xMRz4v7KF; Wed, 27 Sep 2023 23:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwsmb55pgz4b4p; Wed, 27 Sep 2023 23:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zs8YC0M2KdoBQfeF8VnuL6J7ekpSJ789UQqAO2l1jvo=; b=jHrOTlW1rr0BXYlTvhS/yfEuoexAx41THVITCc103H9UtgFuld3GX6n/TiTujEIIqxNB9n tnp7kFhY7oNsxWhiviTX28eFxqpaDSyjJF0K1ioWxbcZ/1lcfJ1iiQMqHi8Hb4plZo7h7w HtTqYsjBkgJ3SESYBTLIM8/bX9Cpo4a16MQDy66I9DrDZKUhnjueza6XhbRMoOhHmYzGCh +4eh0tL4UhbuYQ6L4+qkQddLZ53Y4bN3sqGl415og4TuUqAyLluB723y6Ejw6qWuTtjf9w 9WcnZ5jNledNzbC6ot728u4vKrN33EUfd7GBM1qJg2HogvkDX14WfQouy8kSug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695856271; a=rsa-sha256; cv=none; b=jh08sOVoay/ZlA1tBjOjy2mjFv5adaVt3hqoYrBXiU+VHmB6mvHH1wh4Es3nzbgV/b3eSk I3tI66Sh/ZhZtcKSneS0e2x+K0vaLr+94lp7MQbY4+deRarMn6aYz5slMUgRzKuVStb2Tt vWo9LD749aMxl2EoYYych0qsQWrYsi0ZaTGViHaCYnYWY4D8E1dGXSCEvU+KdxaqH0QyS8 GQrbKkJOaVSrX8vkcqEseybsgJazUSBuYK8znYXxUOits04OFcnQQ3kL8OgKIg0coMp/Jl tb32Ifpr6kSpoLpe2VU6/F+vFonAVWj011FCYaFY/nRR9uMunpK4sNohCn+rXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zs8YC0M2KdoBQfeF8VnuL6J7ekpSJ789UQqAO2l1jvo=; b=rf7Wr/hBegy9dKGPrOn/bnmFOlfeU6ntKymLXRX2YoucT2zIMn99bD4AeZ95ezB6/XvvN4 sjL9hgkUzSrSFcTHLs+7A97moZtkQNwG37vCX9pL4Z3pdSQyu974sNKgY7hBB4vu4VkK8T Mwy1W2k1gKlJHBPPNESHMChMX2Cu+Bqzgvu93hjZO4Pcs6SL+MRwaOyS+EfBB8d4rxYwKG difXwTVTAqdjYDxhjStWDoKxOCsiqL8LUSouOps7RHGnB/RVtqnDs6km4NOS/8iGw6wY6/ fhhjQHeo0kmarQeC6OAvQii5MLmAn+vfGda8bPVezZMB3t8Rz+sPNUEj7eq1zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwsmb3px2zxDy; Wed, 27 Sep 2023 23:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RNBBgb052445; Wed, 27 Sep 2023 23:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RNBBuc052442; Wed, 27 Sep 2023 23:11:11 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:11:11 GMT Message-Id: <202309272311.38RNBBuc052442@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: fc4a6768272e - main - newvers: Add comment about why we need sccs, but deprecate it List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: fc4a6768272ea9e943661e0c34ff436dac872ac7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc4a6768272ea9e943661e0c34ff436dac872ac7 commit fc4a6768272ea9e943661e0c34ff436dac872ac7 Author: Warner Losh AuthorDate: 2023-09-27 23:07:53 +0000 Commit: Warner Losh CommitDate: 2023-09-27 23:07:53 +0000 newvers: Add comment about why we need sccs, but deprecate it The SCCS ID is still the most reliable way to dig out the version information from the kernel w/o false positives. Add a comment to that effect. savecore(8) neglects to save the kerneldumpheader that would have the version information at a fixed location. savecore(8) needs to be augmented to have the right data in the right places, but until then the old-school SCCS id needs to remain. Once that's fixed, we plan to remove it. The reason it needs to be in a fixed or easily findable location is because if you have an arbitrary core and want to pull the source and build artificts that went along with that core, you don't yet have the symbols you need to read the version string. To solve the chicken / egg problem, one needs an independent way to know what to use so that automated analysis of cores can happen. The sccs id being in the kernel ensures that it is in the core image written. The what(1) utility makes extracting the version easy. Sponsored by: Netflix Reviewed by: cy, emaste Differential Revision: https://reviews.freebsd.org/D41984 --- sys/conf/newvers.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 73fd6857d307..33615a8d94f8 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,6 +311,14 @@ fi vers_content_new=$(cat << EOF $COPYRIGHT +/* + * The SCCS stuff is a marker that by convention identifies the kernel. While + * the convention originated with SCCS, the current use is more generic and is + * used by different organizations to identify the kernel, the crash dump, + * etc. The what(1) utility prints these markers. Better methods exist, so this + * method is deprecated and will be removed in a future version of FreeBSD. Orgs + * that use it are encouraged to migrate before then. + */ #define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" From nobody Thu Sep 28 01:28:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwwqJ1W7Xz4vHSn; Thu, 28 Sep 2023 01:28: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 4RwwqH74SJz3Hhq; Thu, 28 Sep 2023 01:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695864524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzBXCUfWeiYCOc2Ox920kWeZcOgemYEDMOE2ENPMIfw=; b=rYcGzUI11WNU8J7Hs9IHogrbmjFkZZY+EXKdl91kduZQ2OP8Gd4PIMgBrDBT/yVUCPKp7i Z6P/4uBlb5TjMI92HYcEQk3LNuWH8pfUCa4hqK4hCQIdIud0aFeZXSTpzwivBMefdfcZdt XtE6zfd4+sXro8CWFOXj9iCOcK3g+V6IlehvON8Dn//xuGKx+5c31v42m4THOLtL9Oz7kC 04DnMBe3glfoo+XYe/Ui2pAqbWtG/WDtIvwXLRKTW8LZ7b6rBME+mfe5cNEOmnhSOPTrHt 1H4B+Alb3qZpocKSVv61vtWQ7SpRga4jSYPt8+Fse/EHVSQbWOw7rP0qPGlqlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695864524; a=rsa-sha256; cv=none; b=XGPj0kE3GV/FhNmDPb1iZwXE7oVJ5VGhUDLV/V11e4amBbM/ht1CDHGTHgbR5qVkDSYBH2 AuBnepiTjlDG/t/DarvVV+AR5uTQPNsEQ+dVEAd8thSXKEEeyfbv9merpQnfaMko0dHrYo DYpOS2bK9wLO6jXDR7dWUzJZWtdUFm+ibSz37I7PkZqwskHSLT4zTqPG4zGsU6Om67QxQ4 zlJT9b3JbLKDplHBgdzPlWX3g89UEtiTHBrZUhAJF1LBf0F0mcw6RhrtZCyrYrUJCGSPYP wbj5QUf2bs0gRK+y++F5ZtfBzAKJVxS80iI2JvWSmVgaSZ0jJnpp1WZWGfKp6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695864524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzBXCUfWeiYCOc2Ox920kWeZcOgemYEDMOE2ENPMIfw=; b=XXfAbl8ebjk7sBV9zLVanNXv5tAugmez+NSjTQQHaawW/6q/GJ+OovK40zoq0c4wcD0sBs hnaPGT8qrtpldqR1aJhHU7+UJPPZp+ervYEA0/2baiXyiDlMG43lfvjt5HyDHKepAoXnp0 /jbxmEMprgwUYCcJiy/QWlvAyEuduxW6ckq+V70WxG1/lKlunreAq+5Ah1uutsNeADMoEu 3s1yeNnGb8IIHOvK2lrorFiruMICghwwO1LGxTWsGNXFwsedfHU/Aw+rhieltaqdMEHHzj hpCx7IUe1kgXc17Aan4u4AsyvZyYO4MYk2VSlxhwivJFXr2trXg5h97ffet0yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwwqH69Z8z11y9; Thu, 28 Sep 2023 01:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S1Sh6o073481; Thu, 28 Sep 2023 01:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S1Shdg073478; Thu, 28 Sep 2023 01:28:43 GMT (envelope-from git) Date: Thu, 28 Sep 2023 01:28:43 GMT Message-Id: <202309280128.38S1Shdg073478@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Jason A. Harmening" Subject: git: 23332e34e653 - stable/14 - devfs: add integrity asserts for cdevp_list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 23332e34e653131c0ff3a948b57d06948102a06b Auto-Submitted: auto-generated The branch stable/14 has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=23332e34e653131c0ff3a948b57d06948102a06b commit 23332e34e653131c0ff3a948b57d06948102a06b Author: Jason A. Harmening AuthorDate: 2023-09-19 13:44:34 +0000 Commit: Jason A. Harmening CommitDate: 2023-09-28 00:46:38 +0000 devfs: add integrity asserts for cdevp_list It's possible for misuse of cdev KPIs or for bugs in devfs itself to result in e.g. a cdev object's container being freed while still on the global list used to populate each devfs mount; see PR 273418 for a recent example. Since a node may be marked inactive well before it is reaped from the list, add a new flag solely to track list membership, and employ it in some basic list integrity assertions to catch bad actors. Discussed with: kib, mjg (cherry picked from commit 67864268da53b792836f13be10299de8cd62997e) --- sys/fs/devfs/devfs_devs.c | 12 +++++++++++- sys/fs/devfs/devfs_int.h | 1 + sys/fs/devfs/devfs_vnops.c | 4 ++++ sys/kern/kern_conf.c | 2 ++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index c6efd0d421b1..db879efe803a 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -175,6 +175,9 @@ devfs_free(struct cdev *cdev) struct cdev_priv *cdp; cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & (CDP_ACTIVE | CDP_ON_ACTIVE_LIST)) == 0, + ("%s: cdp %p (%s) still on active list", + __func__, cdp, cdev->si_name)); if (cdev->si_cred != NULL) crfree(cdev->si_cred); devfs_free_cdp_inode(cdp->cdp_inode); @@ -516,6 +519,9 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup) dev_lock(); TAILQ_FOREACH(cdp, &cdevp_list, cdp_list) { KASSERT(cdp->cdp_dirents != NULL, ("NULL cdp_dirents")); + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) != 0, + ("%s: cdp %p (%s) should not be on active list", + __func__, cdp, cdp->cdp_c.si_name)); /* * If we are unmounting, or the device has been destroyed, @@ -547,6 +553,7 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup) if (!(cdp->cdp_flags & CDP_ACTIVE)) { if (cdp->cdp_inuse > 0) continue; + cdp->cdp_flags &= ~CDP_ON_ACTIVE_LIST; TAILQ_REMOVE(&cdevp_list, cdp, cdp_list); dev_unlock(); dev_rel(&cdp->cdp_c); @@ -698,7 +705,10 @@ devfs_create(struct cdev *dev) dev_lock_assert_locked(); cdp = cdev2priv(dev); - cdp->cdp_flags |= CDP_ACTIVE; + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) == 0, + ("%s: cdp %p (%s) already on active list", + __func__, cdp, dev->si_name)); + cdp->cdp_flags |= (CDP_ACTIVE | CDP_ON_ACTIVE_LIST); cdp->cdp_inode = alloc_unrl(devfs_inos); dev_refl(dev); TAILQ_INSERT_TAIL(&cdevp_list, cdp, cdp_list); diff --git a/sys/fs/devfs/devfs_int.h b/sys/fs/devfs/devfs_int.h index 32c6fb414250..916297425b53 100644 --- a/sys/fs/devfs/devfs_int.h +++ b/sys/fs/devfs/devfs_int.h @@ -55,6 +55,7 @@ struct cdev_priv { #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) #define CDP_UNREF_DTR (1 << 2) +#define CDP_ON_ACTIVE_LIST (1 << 3) u_int cdp_inuse; u_int cdp_maxdirent; diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 2f700f9dad25..1df7d13be919 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1664,6 +1664,10 @@ devfs_revoke(struct vop_revoke_args *ap) dev_lock(); cdp->cdp_inuse--; if (!(cdp->cdp_flags & CDP_ACTIVE) && cdp->cdp_inuse == 0) { + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) != 0, + ("%s: cdp %p (%s) not on active list", + __func__, cdp, dev->si_name)); + cdp->cdp_flags &= ~CDP_ON_ACTIVE_LIST; TAILQ_REMOVE(&cdevp_list, cdp, cdp_list); dev_unlock(); dev_rel(&cdp->cdp_c); diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index d6063696c85b..a7c22b7d118a 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -119,6 +119,8 @@ dev_free_devlocked(struct cdev *cdev) cdp = cdev2priv(cdev); KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, ("destroy_dev() was not called after delist_dev(%p)", cdev)); + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) == 0, + ("%s: cdp %p (%s) on active list", __func__, cdp, cdev->si_name)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } From nobody Thu Sep 28 01:42:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwx7T5SBqz4vHnT; Thu, 28 Sep 2023 01:42: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 4Rwx7T4xXnz3Jky; Thu, 28 Sep 2023 01:42:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695865365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=So3GYT0v2YR3GQlDa4UsoeH7V/MHH88PU5K3woZRQdw=; b=elGfrRO6W3MmBwXS4efz4JH/aejDcFqNiXydGUVIh27Wesy4fLRijeJwr7UGpNbxc+iLsk KdSDGl7X2AA+kGN2NSF+e7ZJQpQ6caC4+Yy3mSvOpyInyEhJKMozPMCI2cZrAyrxofhF2B mNXtQjCanwvjS4c3dX0ezmzZn8RRYP7STYA1Vlw5D9+eazeURhKAuMPIyOobW+gIz8uiRp D9XOzpwAZxZ3GnykVJFg5d950qlpKcfoMnxVttwwvdrhlBbeYxgvCYUR3LAQCnavLfg1rJ /YkBkIofjdgFELbeO0sVvxSmx0PjLysHYzwh/4Yw1ukp3MhQku4Sd/ll93IXUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695865365; a=rsa-sha256; cv=none; b=l7tKYdUZTD32phvYdmmvuwNuP7xhrQfGY3O4L38LXtX4V2GTa1I6rQJIP9XV2CccYJimxj tK6qBhaDQu1zK1rMNe1X2bi936BLbpVVWoLGWdJ0BUNYiKdOqRG5z6cgvBcMZe7puc4lLO R9OANr98HVzn9iJhfbuQL/09I2qGwonmShEX7Kf9+76xv2VY/UUmyi3mdrw+GyxYigcB6x HBJKzwkicg14cYpOuU8RBovcLqf+GhD8UdlPj37vFLSZdsh4tPAsN53AOuaVB4DI+if6tV MgtC2xlfm7AMTd3wrmjEVQfxQBrJmqSuJQIRMAs9goy/hm+CNJZV0wjXFreprw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695865365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=So3GYT0v2YR3GQlDa4UsoeH7V/MHH88PU5K3woZRQdw=; b=F1xaGVFB/Y95096DMNAZMUHKC62h85l+gTaYtPdqHg4ZYoOjm2isA+f1rxI+6kGCGhH3Ly iHR043ykhlXvDsEl9AJ6pczUIjq040jZF58/8U+B4mV7P/9iW5tLw/yVQDhcUdp+zE2JQU omrSI6dyibIoQBadVde3Sk9VBGgNWtD0dG68RQy3WbjXIwVgycSHWx6WhJNiOqNKKiz+I/ o8qqID2njZAxRr0qeGjM8p7xgn8RS3TmmJ18AdQHDymEncOeHKUf812EnZ4+e06jnNwBAi eUbIdoHa8FQgoqX1ub8ZV11OE2Gy5rd3y+oNmeS5wVqwUIl2AOmGXbAk3r4OMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwx7T40Nvz131P; Thu, 28 Sep 2023 01:42:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S1gjnR005518; Thu, 28 Sep 2023 01:42:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S1gj4X005515; Thu, 28 Sep 2023 01:42:45 GMT (envelope-from git) Date: Thu, 28 Sep 2023 01:42:45 GMT Message-Id: <202309280142.38S1gj4X005515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Jason A. Harmening" Subject: git: ee596061e5a5 - stable/13 - devfs: add integrity asserts for cdevp_list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ee596061e5a5952f1ddc68627492fbe94af8344b Auto-Submitted: auto-generated The branch stable/13 has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=ee596061e5a5952f1ddc68627492fbe94af8344b commit ee596061e5a5952f1ddc68627492fbe94af8344b Author: Jason A. Harmening AuthorDate: 2023-09-19 13:44:34 +0000 Commit: Jason A. Harmening CommitDate: 2023-09-28 01:29:52 +0000 devfs: add integrity asserts for cdevp_list It's possible for misuse of cdev KPIs or for bugs in devfs itself to result in e.g. a cdev object's container being freed while still on the global list used to populate each devfs mount; see PR 273418 for a recent example. Since a node may be marked inactive well before it is reaped from the list, add a new flag solely to track list membership, and employ it in some basic list integrity assertions to catch bad actors. Discussed with: kib, mjg (cherry picked from commit 67864268da53b792836f13be10299de8cd62997e) --- sys/fs/devfs/devfs_devs.c | 12 +++++++++++- sys/fs/devfs/devfs_int.h | 1 + sys/fs/devfs/devfs_vnops.c | 4 ++++ sys/kern/kern_conf.c | 2 ++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index 6d8ce5cc3a63..1e28db5966a7 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -175,6 +175,9 @@ devfs_free(struct cdev *cdev) struct cdev_priv *cdp; cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & (CDP_ACTIVE | CDP_ON_ACTIVE_LIST)) == 0, + ("%s: cdp %p (%s) still on active list", + __func__, cdp, cdev->si_name)); if (cdev->si_cred != NULL) crfree(cdev->si_cred); devfs_free_cdp_inode(cdp->cdp_inode); @@ -521,6 +524,9 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup) dev_lock(); TAILQ_FOREACH(cdp, &cdevp_list, cdp_list) { KASSERT(cdp->cdp_dirents != NULL, ("NULL cdp_dirents")); + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) != 0, + ("%s: cdp %p (%s) should not be on active list", + __func__, cdp, cdp->cdp_c.si_name)); /* * If we are unmounting, or the device has been destroyed, @@ -552,6 +558,7 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup) if (!(cdp->cdp_flags & CDP_ACTIVE)) { if (cdp->cdp_inuse > 0) continue; + cdp->cdp_flags &= ~CDP_ON_ACTIVE_LIST; TAILQ_REMOVE(&cdevp_list, cdp, cdp_list); dev_unlock(); dev_rel(&cdp->cdp_c); @@ -703,7 +710,10 @@ devfs_create(struct cdev *dev) dev_lock_assert_locked(); cdp = cdev2priv(dev); - cdp->cdp_flags |= CDP_ACTIVE; + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) == 0, + ("%s: cdp %p (%s) already on active list", + __func__, cdp, dev->si_name)); + cdp->cdp_flags |= (CDP_ACTIVE | CDP_ON_ACTIVE_LIST); cdp->cdp_inode = alloc_unrl(devfs_inos); dev_refl(dev); TAILQ_INSERT_TAIL(&cdevp_list, cdp, cdp_list); diff --git a/sys/fs/devfs/devfs_int.h b/sys/fs/devfs/devfs_int.h index 26589e0bded6..9cf50c58018d 100644 --- a/sys/fs/devfs/devfs_int.h +++ b/sys/fs/devfs/devfs_int.h @@ -57,6 +57,7 @@ struct cdev_priv { #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) #define CDP_UNREF_DTR (1 << 2) +#define CDP_ON_ACTIVE_LIST (1 << 3) u_int cdp_inuse; u_int cdp_maxdirent; diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index e8c8956d36fd..a71cfda9fa9a 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1676,6 +1676,10 @@ devfs_revoke(struct vop_revoke_args *ap) dev_lock(); cdp->cdp_inuse--; if (!(cdp->cdp_flags & CDP_ACTIVE) && cdp->cdp_inuse == 0) { + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) != 0, + ("%s: cdp %p (%s) not on active list", + __func__, cdp, dev->si_name)); + cdp->cdp_flags &= ~CDP_ON_ACTIVE_LIST; TAILQ_REMOVE(&cdevp_list, cdp, cdp_list); dev_unlock(); dev_rel(&cdp->cdp_c); diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 866788530e7f..a3af24a43b61 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -119,6 +119,8 @@ dev_free_devlocked(struct cdev *cdev) cdp = cdev2priv(cdev); KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, ("destroy_dev() was not called after delist_dev(%p)", cdev)); + KASSERT((cdp->cdp_flags & CDP_ON_ACTIVE_LIST) == 0, + ("%s: cdp %p (%s) on active list", __func__, cdp, cdev->si_name)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } From nobody Thu Sep 28 04:39:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rx13c0jYlz4vWTW; Thu, 28 Sep 2023 04:39: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 4Rx13c07G5z3dL0; Thu, 28 Sep 2023 04:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695875980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZzZ3uOvUW5f36npQokMziKneAkv7i81usUIXosKW5Cc=; b=oxx12OnIno+nP2SoWqe1fP+2woh5AwhNeFd3ziWhgitZVppo32H/7TAgjOutNNoaDTKEB7 Hjp57/3GVaLeeZOySj3VE/1WmUFTpIBczu1GdFIjfoDRc9TV6vPEtBXSsLY+xGsY3EfjDE MPsQNZX9+XEPWNChiwtDxzy9YbaYG0GzFZUIYDCVCYYDhGVNjLD4mty29l2AwewvZVJf68 4o3XzJnUopwY05W/3bbw2hu5Q0Glj+Al4QhPJEzf3jiFtC5g/bjFc3L0nyx3+bmG2gZeyW f8p//EFkRjy+MYskMvnhO/KLM2eKAT3FCU8atkT4Xbf12go5ZW9kDYg+IKbz8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695875980; a=rsa-sha256; cv=none; b=B3g5+yE49dPyIYGPIBqICFLHHCJT1ttjcz0jrGSjpQ+NdQJT9UB+JhWh4tfU1qi/3H6rg+ 3YaBQLd0kXIgtDJCa1c3LjpVTXk5jGmh1JXK3nphRCr/H0MHw66j+UUlFz/bEs/UbgDvQr 0Ps3j5YTm8kulWhRPUyevehmzmCfIheHg+eh+NgBMn8EElbsF4t1uDF6/aaM3JGihZy+0p G6clo5tLT2xvZLKBsWh4XgGNg3cUw1NrZXVMWNYEQwWkCiHr/D2ZbAzLO16khp+UWyxRSC LlZZ3t7mV6Y2V+YBwlKuSWPyNBWeNvdEtP3J7yci6zIRxluLT7XpPOoi3bXExQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695875980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZzZ3uOvUW5f36npQokMziKneAkv7i81usUIXosKW5Cc=; b=IsEXkgvfJhHO1bo1yfYHGKqWIJ1RL+qbVi73SKRJaqQOwSud+odlNf82vBMZ5+kXRw9gel teFza7Dq5YVegz7hz5MzmS2Uhcs93Gue8ys3VDqjDhVD2vWctkWsYWPQxr7EMimz7nFTg3 uBhP6NMQwNGKGbRPzj311HE7Dk59Tw7iexGgDyCHhifblqZeJ1JtEhuzOW9ufMzFi0ttHk EP4mHirgBT8vnogDu771wPL77mfs48ED6E2jnbNLlHJmnhQq9n9euwtGJ1UI5m9QjmTAAe 1pCJSRqcwjHvHsvk7CGOaLYq0XOZDyoH+gFdtktPgSLKY+zHuASivbp6bYl7lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rx13b6Hffz1738; Thu, 28 Sep 2023 04:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S4ddRb089813; Thu, 28 Sep 2023 04:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S4dd1m089810; Thu, 28 Sep 2023 04:39:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 04:39:39 GMT Message-Id: <202309280439.38S4dd1m089810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: c96d5c97bb65 - stable/14 - MFC jail: avoid a clash with /etc/jail.conf.d between rc and jail(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c96d5c97bb65a1b0bc135b452f13d0ca6a8d60c9 Auto-Submitted: auto-generated The branch stable/14 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=c96d5c97bb65a1b0bc135b452f13d0ca6a8d60c9 commit c96d5c97bb65a1b0bc135b452f13d0ca6a8d60c9 Author: Jamie Gritton AuthorDate: 2023-09-25 00:03:09 +0000 Commit: Jamie Gritton CommitDate: 2023-09-28 04:39:00 +0000 MFC jail: avoid a clash with /etc/jail.conf.d between rc and jail(8) Since 13.1, /etc/rc.d/jail has looked for a per-jail config file in /etc/jail.conf.d. For RELENG 14, the ".include" directive was added to jail(8), with a sample line in the jail.conf(5) man page that includes "/etc/jail.conf.d/*.conf". These two use cases don't work together. When the jail.conf.d files are included from a master jail.conf, the files in jail.conf.d are likely to hold only partial configurations, and shouldn't be directly loaded by rc.d/jail. But there are existing configurations that depend on the current rc.d behavior. While users could be advised not to include from /etc/jail.conf.d, it's the natural choice even if not mentioned in jail.conf.5. The workaround is for rc.d/jail to continue to load the individual files, but only when /etc/jail.conf doesn't include from that directory (via a simple grep test), This allows the current use while not breaking the previous use. Reported by: antranigv at freebsd.am Differential Revision: https://reviews.freebsd.org/D41962 (cherry picked from commit a2440348eed75bb7682579af0905b652747fd016) --- libexec/rc/rc.d/jail | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail index f8995c7e3b00..f12dae280bb0 100755 --- a/libexec/rc/rc.d/jail +++ b/libexec/rc/rc.d/jail @@ -126,7 +126,9 @@ parse_options() if [ -r "$_jconf" ]; then _conf="$_jconf" return 0 - elif [ -r "$_jconfdir" ]; then + elif [ -r "$_jconfdir" ] && ! egrep -q \ + '^\s*\.include\s*["'\'']?/etc/jail.conf.d/' "$jail_conf" \ + 2>/dev/null; then _conf="$_jconfdir" return 0 elif [ -r "$jail_conf" ]; then From nobody Thu Sep 28 05:00:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rx1WL2BP9z4vXJ2; Thu, 28 Sep 2023 05:00: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 4Rx1WL1kwQz3ft4; Thu, 28 Sep 2023 05:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695877214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E8y8w/Evmb9p1SaZ/fl/9FCY3R5Z/GP6O4dtPljWKKs=; b=q8bHIXeDfN/CzGnPp8Jq7ZbCwlD1YT5S1B3wj9HyYVJj5XtPvXEirYy5MGkOSPvFlx2sm5 Ef0DF+9uyCgwZeqo9CDfICd4uwQQxmAlrBMEW5cQN4x+ClvpElQeOhYeky/TdJ58p7/5SP eieYKwDECr3NzJdKqOQUgVaWbDv7vgQecrkkuf6gXz3DQZSXO4Y2AqDL5U+Ds5l9lb1aeP i6pQmiOXBVOa/b/TimTcG5KOpLiCvA6qPwSc8RPr1qxpb7oe9YEH/FUCp1aYYm9p7I750b ETLc1sAbwCKOmn9Cbi2gEZkUCd8IjNXaPDG1cJYilLzZRisWc3kd3eZB7OVcQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695877214; a=rsa-sha256; cv=none; b=x1vJgv61Gi+1t51Lq83gbizPBmxjb6eCj6BRcZQ0KqutEjZEGQ4q3aeNuG2oiZaM6so8D8 mNvZCgyrdUSNjantUapuiolFd6SCxmG4m1Si11Tw3qAbZpunK6duaAtkPtOVJPrq+bpQFG NgS4H8VTAWtBWFO0k/UpHTRuGrx+GJvXLi6jyvsGish0Yk+MCGdImS+7WC3HSO4zOoX4m6 edeX5m7ibYwjsQgCa8EF6ZiG2pLTu6EaPvnBu10kzDLb9oaVEhoyOTLj3x5AEHZbqs/yvg 4FqIBi7eM/SlAaso9jQgRvykD6VgrvExHSlVCDI+xazQgj8FMBkW2cF7zRb6ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695877214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E8y8w/Evmb9p1SaZ/fl/9FCY3R5Z/GP6O4dtPljWKKs=; b=gW6ajDRt72YBX6+St6ReZCYnoVjw2N1jnPg3Sxlm64u/qBhH/ImYGI5RiaXOzxzbAE8cAt COHVOLkvydNHCQWmau9ZbgQ8KWKNpakDwbjvpuxOxuqNDvqPn7Jirjquz6wkSsUAwMlaD0 k8eetmrXMY5bgKnzILtrGnDB11kRvLrOAxBBQRp7wfKwtK+Le7VwwIAz7wACx8FLDr3gO4 9tPhD/d+DNQ7602A+w7eSS40sDrfXUCnk5dIEIec4snqUqh+i9hAhI+gfIqT5+73HfCb9L 3/EQRNFimbgzvcp/pxkTvbapJ3+1tiX9Ar5ElM11CUnILOD09uvhN5+4lDRYNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rx1WL0qGnz16xG; Thu, 28 Sep 2023 05:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S50Epo030600; Thu, 28 Sep 2023 05:00:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S50EQ5030590; Thu, 28 Sep 2023 05:00:14 GMT (envelope-from git) Date: Thu, 28 Sep 2023 05:00:14 GMT Message-Id: <202309280500.38S50EQ5030590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 12349f38898f - main - ipfw.8: Adjust section for loader tunables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12349f38898f231ca803dcf526bac88cb1b5cd2b Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=12349f38898f231ca803dcf526bac88cb1b5cd2b commit 12349f38898f231ca803dcf526bac88cb1b5cd2b Author: Zhenlei Huang AuthorDate: 2023-09-28 04:58:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-28 04:58:44 +0000 ipfw.8: Adjust section for loader tunables Move the descriptions of loader tunables from section 'SYSCTL VARIABLES' to section 'LOADER TUNABLES'. See also 49197c391b3d (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables). MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D41981 --- sbin/ipfw/ipfw.8 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 1a042ae2bbbf..e62b8d6efc95 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd April 25, 2023 +.Dd September 28, 2023 .Dt IPFW 8 .Os .Sh NAME @@ -3761,6 +3761,16 @@ or .Xr kenv 1 before ipfw module gets loaded. .Bl -tag -width indent +.It Va net.inet.ip.fw.enable : No 1 +Enables the firewall. +Setting this variable to 0 lets you run your machine without +firewall even if compiled in. +.It Va net.inet6.ip6.fw.enable : No 1 +provides the same functionality as above for the IPv6 case. +.It Va net.link.ether.ipfw : No 0 +Controls whether layer2 packets are passed to +.Nm . +Default is no. .It Va net.inet.ip.fw.default_to_accept : No 0 Defines ipfw last rule behavior. This value overrides @@ -4154,12 +4164,6 @@ Keep dynamic states on rule/set deletion. States are relinked to default rule (65535). This can be handly for ruleset reload. Turned off by default. -.It Va net.inet.ip.fw.enable : No 1 -Enables the firewall. -Setting this variable to 0 lets you run your machine without -firewall even if compiled in. -.It Va net.inet6.ip6.fw.enable : No 1 -provides the same functionality as above for the IPv6 case. .It Va net.inet.ip.fw.one_pass : No 1 When set, the packet exiting from the .Nm dummynet @@ -4176,10 +4180,6 @@ Enables verbose messages. Limits the number of messages produced by a verbose firewall. .It Va net.inet6.ip6.fw.deny_unknown_exthdrs : No 1 If enabled packets with unknown IPv6 Extension Headers will be denied. -.It Va net.link.ether.ipfw : No 0 -Controls whether layer2 packets are passed to -.Nm . -Default is no. .It Va net.link.bridge.ipfw : No 0 Controls whether bridged packets are passed to .Nm . From nobody Thu Sep 28 08:50:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rx6dJ5XKlz4vlHx; Thu, 28 Sep 2023 08:50: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 4Rx6dJ4m5Mz4T42; Thu, 28 Sep 2023 08:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695891044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNvAREPxgwVvAJC7R7jw2urx05HDgbOruLJjdrd34Ec=; b=yqCg/eNtFe5XpNKoVvq2Ee68iTLEPjkH9tmGfv569+DYHDF238UGSstKrpUxMFNtCu3Wx+ Ew4wlwiRhaJUwVzLSV6/830/qj+0OiPIAVdFEMOxKBgcCjIxGpxHU5yJDXk04yy2it8WMs p9+ARHjdeqw8W/z/yAXgFxv/ts5WWn1GDAg2U/NThAIZYdCxsKeEscKvLVdwgBp+AWlB5a W0U3MiNK3gl9SOmZ/DaTCkISy6rHbw+dDTGOOMv3UEJzmPhevyVYhVUshGpTsEWTtC16Lw gMql2e/KbMRKUCz/ztLtfVpeuSX1AUdeFdrU224so2CtPNWOLPLz28A8J7Heaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695891044; a=rsa-sha256; cv=none; b=HOilAh6MaBJnQh8gAyAFdlsIZFD39oTPrbCaf1cJ2nrQdQ4AvWF5EidQgYfnN5Sit4r1Sn qe3XYvQ8lcULJmjVlQAkQe3rd2pJAP7ZSV5ogrpspTXzkD/7KoY/2UAsumV8a5Ie9salzi g625zvWMenIDUfBzKBz5JX/IBoQcyLJuMe/5ebviSAoEqAfImSRqDGQtdHpcKNGFmo1jNF x2Z4+sxSyQbqGUlVb4o8nigh4VPra4PYN+7YupQQzj+E5PCdzGoAv4YI9j3DVJgnDJ2FQv Cj3B/aBRHmse0J1QltwVPXluNiHYwI+st6aODRhUWwIgbwhen3dWNc+dj/GZFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695891044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNvAREPxgwVvAJC7R7jw2urx05HDgbOruLJjdrd34Ec=; b=Y5Rl/hF5sgpzb7tWPloI9CdNX2AblAAQ6weaVxplqII+HBbPi5DTmJQC47LENvnkqqT1Jk jzB5QeAuBWzbR6o3w6ap4G4s9XYg3vaaDXaJjKKDhDczALmo8ee4FLU8fjpSf1eLTIQjzE 34qw52wNzjwEf75yRsSccjGZpYG8NDe4A5mSTUea8qDBbB469ixH3Ehcx+EZqiPL+IqmBA bEYKqC6iMDWDf4zOzC/zPnUU8knREe4L57cF4K/xLdPHaR20+DrpVIzwg8Ktn3AYpaCwUF gS4rC/0vn5C3Yhvr/ktrNLGydRdek3g/JpbuqaFmfYkRpDXzUhaD5JpHcrb82g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rx6dJ3Vr8z1KC; Thu, 28 Sep 2023 08:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S8oiKe014642; Thu, 28 Sep 2023 08:50:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S8oiw7014639; Thu, 28 Sep 2023 08:50:44 GMT (envelope-from git) Date: Thu, 28 Sep 2023 08:50:44 GMT Message-Id: <202309280850.38S8oiw7014639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 6a0e7f908802 - main - bhyve: always generate ACPI tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 6a0e7f908802b86ca5d1c0b3c404b8391d0f626e Auto-Submitted: auto-generated The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=6a0e7f908802b86ca5d1c0b3c404b8391d0f626e commit 6a0e7f908802b86ca5d1c0b3c404b8391d0f626e Author: Corvin Köhne AuthorDate: 2023-09-08 06:56:41 +0000 Commit: Corvin Köhne CommitDate: 2023-09-28 08:43:04 +0000 bhyve: always generate ACPI tables Most systems don't work properly without sane ACPI tables. Therefore, we're always generating them. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41778 --- usr.sbin/bhyve/bhyve.8 | 4 +--- usr.sbin/bhyve/bhyve_config.5 | 2 +- usr.sbin/bhyve/bhyverun.c | 8 ++++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 7eddeec4647a..f80dd54fc2c3 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -112,9 +112,7 @@ exit is detected. .Bl -tag -width 10n .It Fl A Generate ACPI tables. -Required for -.Fx Ns /amd64 -guests. +bhyve always generates ACPI tables so this option is obsolete. .It Fl a The guest's local APIC is configured in xAPIC mode. The xAPIC mode is the default setting so this option is redundant. diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 6904ad096c0d..1322abd67958 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -120,7 +120,7 @@ The value must be formatted as described in .Xr expand_number 3 . .It Va memory.wired Ta bool Ta false Ta Wire guest memory. -.It Va acpi_tables Ta bool Ta false Ta +.It Va acpi_tables Ta bool Ta true Ta Generate ACPI tables. .It Va acpi_tables_in_memory Ta bool Ta true Ta .Xr bhyve 8 diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 3db796c65a28..1d4cf048b59b 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -1201,7 +1201,7 @@ static void set_defaults(void) { - set_config_bool("acpi_tables", false); + set_config_bool("acpi_tables", true); set_config_bool("acpi_tables_in_memory", true); set_config_value("memory.size", "256M"); set_config_bool("x86.strictmsr", true); @@ -1240,7 +1240,11 @@ main(int argc, char *argv[]) set_config_bool("x86.x2apic", false); break; case 'A': - set_config_bool("acpi_tables", true); + /* + * NOP. For backward compatibility. Most systems don't + * work properly without sane ACPI tables. Therefore, + * we're always generating them. + */ break; case 'D': set_config_bool("destroy_on_poweroff", true); From nobody Thu Sep 28 09:06:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rx6yy4Fsmz4vlZN; Thu, 28 Sep 2023 09:06: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 4Rx6yy3lXQz4VF0; Thu, 28 Sep 2023 09:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695891962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T7vO9JMD2bblddoujaA7AvNRa7ycoGGtW0WjX6dSepg=; b=QVBTAfmQitjquHbeGUQYc5HLTKCuHsPkaaftpqV2Z1DBSj0ZdIAKQi0z8kc9ody6im5MKo V8g+bIfI+KJtzjOz/iUJSeMbzw0HVvMEcq4AbTQuR3+2ADktqKUTPLTUkjhQGQklgsRRct jkWuW2Cd6+JCCVUmuY/w8YYpnf5uAxxxoDiGW/ZzDclO//ERBw/azYhgBli2L1xPpH8Z7P apHMfzSl5Q7lsMMIXXWIsfMKdDg9w4x4RVBODOB9wX+xNN91KyolQtcZqggnuljNs2ZwKu +oZmkx6HK/cBl6zdfNOeqQseo4VSyGkheYnWxiB4DrJnucp4FKcnKNCmXAwTMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695891962; a=rsa-sha256; cv=none; b=EOFJ7c9SNk7+A6IH34a+3xJCgJEXBa6E+kEBhwpEf4WGt35TfRBKHPSBW0TnFppbzHfr+F nfdDwO+vt9AUEBI4ULUEDXHeoh/JhoCWXuWl7On8erW1o+57T/Zap2PpFMDlO1fPjtX2gn X2R7eVQtr2Wi8u4xeLIybfHa7kZ/k60ZJf20ZYDTSAqhGjCLvVXf7hhbdXx8aLpQC1sRo6 tJWELOAm1V4vssKTeEExEHcbPLhlgMVjv0+s2FdeR4umOn2hpG9eW7wC+r0hJe3nibBIdO fnQwB0KJPkfdZLpzrSs9n8o2eHabDMOpRUnUYbLkG05deM+S7t10asWKjonpnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695891962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T7vO9JMD2bblddoujaA7AvNRa7ycoGGtW0WjX6dSepg=; b=NpIGBa9+qX2pdGfJcXZXZEXycuEPAX7tslczU3TohqkpqEyvw4+rJsO9RgFp6/QzOdv+aO lIPatT6JqXkRZQ0TVusWJbmYqJ6nFwZetrNVI0gOm9XJrpvoGUXK+lGsKKHTKAmXScEMzi R8HUlS4rpyT9OLgsB/+AFWsiRdCpAk0mSu36YvsIgFrr0RelvgE6N8wZfYcUdLz+1JDtCN M/gXaX/x8erp+OsXhbsBkrpIYHlru+ofubeRAWsCxhyyIJvGOax+M+iT68Sfn+mx+JGQ2I w89OpwjHiFxKmSJvnQPHq4McoRi4JqPTGnUPimwacsG32PHD66uZ0j8PRA8kcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rx6yy2hxQz1d7; Thu, 28 Sep 2023 09:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S962FI040035; Thu, 28 Sep 2023 09:06:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S962r6040032; Thu, 28 Sep 2023 09:06:02 GMT (envelope-from git) Date: Thu, 28 Sep 2023 09:06:02 GMT Message-Id: <202309280906.38S962r6040032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5b200ff58126 - stable/14 - vfs_remount_ro(): mnt_lockref should be only accessed after vfs_op_enter() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5b200ff58126a028ba357f297cbb596a7475962c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5b200ff58126a028ba357f297cbb596a7475962c commit 5b200ff58126a028ba357f297cbb596a7475962c Author: Konstantin Belousov AuthorDate: 2023-09-20 03:42:31 +0000 Commit: Konstantin Belousov CommitDate: 2023-09-28 09:05:05 +0000 vfs_remount_ro(): mnt_lockref should be only accessed after vfs_op_enter() PR: 273953 (cherry picked from commit c584bb9cac16bc200ac45cc8b709e7e7e99e24bb) --- sys/kern/vfs_mount.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 45ab9cfc93cc..8364081585f8 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -3004,6 +3004,7 @@ vfs_remount_ro(struct mount *mp) struct vnode *vp_covered, *rootvp; int error; + vfs_op_enter(mp); KASSERT(mp->mnt_lockref > 0, ("vfs_remount_ro: mp %p is not busied", mp)); KASSERT((mp->mnt_kern_flag & MNTK_UNMOUNT) == 0, @@ -3012,17 +3013,19 @@ vfs_remount_ro(struct mount *mp) rootvp = NULL; vp_covered = mp->mnt_vnodecovered; error = vget(vp_covered, LK_EXCLUSIVE | LK_NOWAIT); - if (error != 0) + if (error != 0) { + vfs_op_exit(mp); return (error); + } VI_LOCK(vp_covered); if ((vp_covered->v_iflag & VI_MOUNT) != 0) { VI_UNLOCK(vp_covered); vput(vp_covered); + vfs_op_exit(mp); return (EBUSY); } vp_covered->v_iflag |= VI_MOUNT; VI_UNLOCK(vp_covered); - vfs_op_enter(mp); vn_seqc_write_begin(vp_covered); MNT_ILOCK(mp); From nobody Thu Sep 28 09:06:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rx70312W0z4vm0h; Thu, 28 Sep 2023 09:06:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rx702736Qz4Wd3; Thu, 28 Sep 2023 09:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695892019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8UVw8Y99F+QhpoynhBXamiqJas2nE+410HiYfOWXm40=; b=aWioR0goOIzF66zsSBOeX+AmGvmwoQHNZzdrIRhZ9L4+Cs4Bz9H4UGp2X3IIWBsKLTIxFH ar4IjtlhYmJ+5UGfIagJcTYi0k/w4nJqylAG3tT58akhZSPF2woZ5pEgOl9FHm+kdNUENx sffq/neXKQXBuvuOvwvEqooE4/1HLS4MFqG/iyY6URSX1ieQitXf7qtNK2ozHXZE0aF1xa vhS4NtLUgVIrX4e6vqyUe3Zfpv0yE0lOQM65Qd8/yYSojq7LoJ/5JDVKvjB9DsdB5tTIVY 2FaoIwF7W7x4YMHa/clgEV2WkGOouNK+P5eI2btU/MseO/zOzQ1JAdIB5jZ2pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695892019; a=rsa-sha256; cv=none; b=kfnFkY6m2XLDuQYBx2KeOcO9lXoNRPX34nNPLYDwjWNkWBat3pVIdsvK+XKReGbLs1omLg EnvblvsLUgAQjO6ia3FOgXvJIALqjazOabVXTFHKkipPTTycwrgwjzK7aDw6+GkVREihv9 mkkOHV/DFhaIFgg2OWk9SoI9EAJaVwSUNLdobsNXAfA+XqwaRP9yXubD1FAv9nPwDovbZR FGpIEiOLHEJ6Dio9J0ltt/Itit8a71BORy80y9dBJmIO+QWYt9JNC9W0VyfUm9ZDqIq+GT tYtEuiY5MJ0rW8L93Bd3WttkFeD6Fc07PQ0hyhmFPuY0/ZZCNNg+7/Yk93jVUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695892019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8UVw8Y99F+QhpoynhBXamiqJas2nE+410HiYfOWXm40=; b=Ha9mSOtQB4vOVkBnq0vFLSXVjhVkae3xOSRauxmgDLx9Cc52b/tQbZuHERLc1CpsxXV+2z xYtWZClZ/F/v+jq19hFlm5hN+J404uDSgdJ8Nf7GuKiAT3lX6V2kkzdmY5FxM9wEFgLYOt Q76V9tugKjWoBtSw4TZTLVZik8u2/YhzFlT065nlp+aTSB555LDADONvtY9YRfdwzH3CHT 1Mc1VZu2YSaVB+gSI7sdwdPdIyMS4CKrym/CE5SGWPAYqr9Vn5KQnyYZzuR42bAv0B8bis rsv1bUwpHRZeeD7LrKjIsvnO2ZFWknlNR0VLoiBKz4g61plNBn93dgDhwG+3mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rx70266mBz1pr; Thu, 28 Sep 2023 09:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S96wnd040290; Thu, 28 Sep 2023 09:06:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S96wJ1040287; Thu, 28 Sep 2023 09:06:58 GMT (envelope-from git) Date: Thu, 28 Sep 2023 09:06:58 GMT Message-Id: <202309280906.38S96wJ1040287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 40cec659c167 - stable/13 - vfs_remount_ro(): mnt_lockref should be only accessed after vfs_op_enter() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 40cec659c167d1773826cf44f5ef6394cb0ad8fd Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=40cec659c167d1773826cf44f5ef6394cb0ad8fd commit 40cec659c167d1773826cf44f5ef6394cb0ad8fd Author: Konstantin Belousov AuthorDate: 2023-09-20 03:42:31 +0000 Commit: Konstantin Belousov CommitDate: 2023-09-28 09:06:23 +0000 vfs_remount_ro(): mnt_lockref should be only accessed after vfs_op_enter() PR: 273953 (cherry picked from commit c584bb9cac16bc200ac45cc8b709e7e7e99e24bb) --- sys/kern/vfs_mount.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index d81a42885a79..25c4adeaae62 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -2692,6 +2692,7 @@ vfs_remount_ro(struct mount *mp) struct vnode *vp_covered, *rootvp; int error; + vfs_op_enter(mp); KASSERT(mp->mnt_lockref > 0, ("vfs_remount_ro: mp %p is not busied", mp)); KASSERT((mp->mnt_kern_flag & MNTK_UNMOUNT) == 0, @@ -2700,17 +2701,19 @@ vfs_remount_ro(struct mount *mp) rootvp = NULL; vp_covered = mp->mnt_vnodecovered; error = vget(vp_covered, LK_EXCLUSIVE | LK_NOWAIT); - if (error != 0) + if (error != 0) { + vfs_op_exit(mp); return (error); + } VI_LOCK(vp_covered); if ((vp_covered->v_iflag & VI_MOUNT) != 0) { VI_UNLOCK(vp_covered); vput(vp_covered); + vfs_op_exit(mp); return (EBUSY); } vp_covered->v_iflag |= VI_MOUNT; VI_UNLOCK(vp_covered); - vfs_op_enter(mp); vn_seqc_write_begin(vp_covered); MNT_ILOCK(mp); From nobody Thu Sep 28 12:20:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxCGx6JG9z4vwW4; Thu, 28 Sep 2023 12:20: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 4RxCGx5f0Wz3JDs; Thu, 28 Sep 2023 12:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695903609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1v2YyP0LhlhYgE5VDckZ5dgacPJpfVq7LHXeFQNjnk=; b=j2ND9PzgdVeXnaptDauLiHzm3XXLOEOX5Qj2Q8vH7hIT4o5/PtWk/pfORSpbuOq2GsCCm0 ZchNxoTIDDSJF+Ys7W3tfg5v99sfJB/yumIqgTWz12+O/YRr1iwwQVOxA5zzPDtbl2ezli d2kS+A+JtyOao6kyMkWiuX7cgibaA74eswp2snC68wpN7nvw+Kj1F58Seq/cM6iRB97pvo bE3y8Xh3oHk2k1zYDAmLsdmHM9OnMOxAiqL3CC8kzxxQuZeMsYiplGFB5LJnJcHLRrnemD tD5bd6krTSZPZsUiQLwJV2E0Rm2tkLNlb5KMgLkSleAn0OTTHD0dCKBFa7OkPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695903609; a=rsa-sha256; cv=none; b=OoCHfDTZacQGw2m5M0BNMzhnVx9g86Hq4XnJfC/uQXG/EZXl3oyPRNkeZqC2ZbEZ0F9Som T7DeJBejqgzBjY74/qedTsoOLhNQ75BlCnddLp+g6xIzu3+KmY37aoBtkFfxL388+3QKsQ 2UfSBduBC0Se1SUkbzmAt1Mok/ygL1xQw4lg4Q3IwNn/ubT4DlB+882o0/zcbsZL+Pp2h/ ArM6+bdSrYdLiteEPrSRkvc707BPhV1wZSEkSL1tQ9MRbaqPo8GIQNGFipWlz5cQviittJ aIsnz3M2PmSCCbVL5gmYVXrqChWbu2jckJaRTdlorHXIWE9TOGKqKOzsJqCcFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695903609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1v2YyP0LhlhYgE5VDckZ5dgacPJpfVq7LHXeFQNjnk=; b=gfeXSL91rAN2V3riYiVh9cs5xBJxktntT2Q1ep5OZ+7JOMsN8Ut4gq3Qp7q0YjKV1/E7jO TNWSHHZeY++v+RSlQjUOqNMY/tDocNiR/FZfm8fSt8idi92gUyujLPRW1dNR96D04lHzfC ozAriYYlDe8Uy5pLZOUu2B9b+qCWBIbyZH7FPH+W/z1v+s5Eq5VO8SFdKamHbJJvOm6bbq 4qNfBAGeh5nCSzxU1iBbBHyf3pDdxwZTCybh4JJwSxdTgqqUwf3yZDKYAjYggkcpQusPY8 8O9LAFgLJd0JR3STgF8Ts0g5WvXgGb1hZX3cemdr0fhzZF/MakWjxoQUXbWBjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxCGx4jhQz6gW; Thu, 28 Sep 2023 12:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SCK9xn060189; Thu, 28 Sep 2023 12:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SCK9Wk060185; Thu, 28 Sep 2023 12:20:09 GMT (envelope-from git) Date: Thu, 28 Sep 2023 12:20:09 GMT Message-Id: <202309281220.38SCK9Wk060185@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: 3e609fd481c0 - main - pf: add note about changes ported from OpenBSD after 4.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3e609fd481c07802fe837ed834c3710b8c19493c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3e609fd481c07802fe837ed834c3710b8c19493c commit 3e609fd481c07802fe837ed834c3710b8c19493c Author: Ed Maste AuthorDate: 2023-09-27 17:59:30 +0000 Commit: Ed Maste CommitDate: 2023-09-28 12:19:40 +0000 pf: add note about changes ported from OpenBSD after 4.5 The last comprehensive sync with OpenBSD's pf corresponds to OpenBSD 4.5, but many changes have been ported over since then. Reviewed by: kp, gbe, Kajetan Staszkiewicz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42002 --- share/man/man4/pf.4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index c4c1d6cc8604..67d85b7b1a92 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -1228,6 +1228,9 @@ and then .Pp This implementation is derived from .Ox 4.5 . +A number of individual features, improvements, bug fixes and security fixes +have been ported from later versions of +.Ox . It has been heavily modified to be capable of running in multithreaded .Fx kernel and scale its performance on multiple CPUs. From nobody Thu Sep 28 13:41:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxF4Z0Dbhz4tnQS; Thu, 28 Sep 2023 13:41: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 4RxF4Y6tlnz3Phw; Thu, 28 Sep 2023 13:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695908478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=USsSYy9VG+VQQWDFR812VjeVLm2ITFtDg2nUZltzE+Q=; b=VE6vn3N/mwhFUPd+d56tfBZlF1LtPyIYOcLnPYU7Vp40bKpIUknejp6+xEWow3wN/4X3HM eKLfCBw4p2trMclFCM6r+zOL4sizWU0Ow0xlGd+9yPwRgFqI/oZyOxLboPC1SgIZaNK/5k XCMri7mMfWHv1C6302JqNX3mGR9Ajtum1XCXTdtYMYzvE+Qdv7TwLh4LEdN5GDdis3Ejvg xYHXINOE/Vt3X1qJv4a+tBEi/ob/ZDzNbm3oS7o2eKwC8AMPYd+oQ6WTcT2zYZVqYzN8nD iSUyEvnhCv+/qipT+7OZWPUYZch9jV9aiagPO/qlTaGjUz+cfSj8dY59szgdQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695908478; a=rsa-sha256; cv=none; b=w0cxXMVk84ZYM9YPV1Fd7KB/NqAIL46WzG2WLwBnUU8rmcdLONSrB1RBr+fNCraRR6zVMI UYtS+xBDyP29nY3mGyKuUvcfeFwI0myGDAF+brJIdju0pZi4gG4Lu9hAoRkQtvajFAZ2k6 SL0NJR0in1HgyAdeJ1iRmnHd3Y52DeWYC2iKiYTcmyfmlCEHrdh3ZQ6TySIk/e7mqhiNDG u4R3yyP4/1/2lLaR0Npfmyh1JF64pGEKAXEcvyOZTXvhhC3Qf7tmO4AIRDgIG4lvh2+pyE IkBp5lDD+WHYEqsay7odM16EIz7Sh66bUM5B+1NsMObUs20yWW7xr7zx2n/KGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695908478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=USsSYy9VG+VQQWDFR812VjeVLm2ITFtDg2nUZltzE+Q=; b=xqDNMYeRQAWWhy+M6JCiu2YD44oa7sIOdvO4N1aTBOT9hCbTvWkuk4FReNabj6mrZWPdHC q3ueduqdSifzynntyEq+2cTBUUNcb7axBp/pffLpudMbSuhMIxTGPE+3svl20RgXACgbzb OwcrI5JnaeKBsgLgSRI+EOokEVhQl2PG/3FpBNSc8C9u3ZmT37m5kPsZNapYnv+skOlxzi SwDVk1CY1GbMqEc7fJINYEuiYPkIZNimDTJFeJYkTBJWfglO6SmKQOBxdzfrAqJOdzDgfc lvdITDnQiuQ5x2kfE2aABo9c3KkISk3ZjTWgDbz4LpuTlxiDVoaeaypyDJ3VQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxF4Y5yZwz8ZB; Thu, 28 Sep 2023 13:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SDfHuI000778; Thu, 28 Sep 2023 13:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SDfHaL000775; Thu, 28 Sep 2023 13:41:17 GMT (envelope-from git) Date: Thu, 28 Sep 2023 13:41:17 GMT Message-Id: <202309281341.38SDfHaL000775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5f446a12dac2 - stable/12 - freebsd-update: Fix merging already-updated files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5f446a12dac2a8be8a1b4fc53a383d18896df611 Auto-Submitted: auto-generated The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5f446a12dac2a8be8a1b4fc53a383d18896df611 commit 5f446a12dac2a8be8a1b4fc53a383d18896df611 Author: Colin Percival AuthorDate: 2023-05-05 03:00:58 +0000 Commit: Ed Maste CommitDate: 2023-09-28 13:40:38 +0000 freebsd-update: Fix merging already-updated files When performing an "upgrade" (moving between FreeBSD releases, as opposed to "update" which merely applies security/errata updates to the installed release) FreeBSD Update: 1. Generates a list of "files needing to be merged", namely those files which don't match the version installed in the "old" release and have paths matching the MergeChanges configuration directive (by default, /boot/device.hints and everything under /etc/). and later on, 2. Compares the currently-installed files to the versions in the "new" release, removing index entries for files which "don't need to be updated because they're not changing". Unfortunately if a file falls into both of these categories -- that is to say, if a file in /etc/ is the same as the version in the new release and not the same as the version in the old release -- the resulting "merge" step saw that the file was no longer listed as being part of the new release, resulting in the file being deleted. For the first 18 years of FreeBSD Update's existence, this never happened, since $FreeBSD$ tags resulted in "new release" files always being different from any files systems would already have installed. This commit fixes this behaviour by only placing a file into the "files needing to be merged" list if it does not match the version in the old release *or* the version in the new release. Reported by: des Reviewed by: delphij (earlier version), des, emaste MFC after: 7 days X-EN-Candidate: yes Differential Revision: https://reviews.freebsd.org/D39973 (cherry picked from commit c55b7e522629cb78adeb54bd9964304481d55eab) --- usr.sbin/freebsd-update/freebsd-update.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index b0e7ea1ce538..0641aa41921c 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1677,11 +1677,12 @@ fetch_inspect_system () { echo "done." } -# For any paths matching ${MERGECHANGES}, compare $1 and $2 and find any -# files which differ; generate $3 containing these paths and the old hashes. +# For any paths matching ${MERGECHANGES}, compare $2 against $1 and $3 and +# find any files with values unique to $2; generate $4 containing these paths +# and their corresponding hashes from $1. fetch_filter_mergechanges () { # Pull out the paths and hashes of the files matching ${MERGECHANGES}. - for F in $1 $2; do + for F in $1 $2 $3; do for X in ${MERGECHANGES}; do grep -E "^${X}" ${F} done | @@ -1689,9 +1690,10 @@ fetch_filter_mergechanges () { sort > ${F}-values done - # Any line in $2-values which doesn't appear in $1-values and is a - # file means that we should list the path in $3. - comm -13 $1-values $2-values | + # Any line in $2-values which doesn't appear in $1-values or $3-values + # and is a file means that we should list the path in $3. + sort $1-values $3-values | + comm -13 - $2-values | fgrep '|f|' | cut -f 1 -d '|' > $2-paths @@ -1703,10 +1705,10 @@ fetch_filter_mergechanges () { while read X; do look "${X}|" $1-values | head -1 - done < $2-paths > $3 + done < $2-paths > $4 # Clean up - rm $1-values $2-values $2-paths + rm $1-values $2-values $3-values $2-paths } # For any paths matching ${UPDATEIFUNMODIFIED}, remove lines from $[123] @@ -2711,7 +2713,7 @@ upgrade_run () { # Based on ${MERGECHANGES}, generate a file tomerge-old with the # paths and hashes of old versions of files to merge. - fetch_filter_mergechanges INDEX-OLD INDEX-PRESENT tomerge-old + fetch_filter_mergechanges INDEX-OLD INDEX-PRESENT INDEX-NEW tomerge-old # Based on ${UPDATEIFUNMODIFIED}, remove lines from INDEX-* which # correspond to lines in INDEX-PRESENT with hashes not appearing From nobody Thu Sep 28 14:07:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxFfx1Qqzz4tq9C; Thu, 28 Sep 2023 14:07: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 4RxFfx0zBHz3SM4; Thu, 28 Sep 2023 14:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4T9kTbjgZTDTRC0q6gUr4g4BS2p+3s6pJBPrJPPGFi4=; b=Pv2kZ6Nx/pcaUEvID5rTYqTOXPl0gA7S7JNMAT1SzLed4wzc4CtAL5Tk8pq/+VopQAPNkU oQRdFkUsOuFkWU7oBF2LWNnOryXapA8cIMjQAiC+66EzsjjV54wVTmX7tCDcpfR5eiBxga 3cqRpHg7ibSziJeNm6iUXrcUeUf8s0O/3s6LzRSLpTUUgHvXY9sQg1+CurBjtVTgzVQydD GUGuenhA4rGueiquEZbJPWyyxsVQceE9SgIvuhMu/GuqYSjiI9iSbo+6r5ISwEV6XZ/BRc HxBOWj17U37yAQxle32W4EXmBbLJOVfU3AGTKTDl1XjDJIuUH4Gsk02hsbN/OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695910057; a=rsa-sha256; cv=none; b=PJevXEPToQkyTHFhMoyggniIEW/59YXNcDrOjn+eipTD6nilRTnm3e509gCxisd3Pb2G8b MU5GcJvDF+sNwx1Wz77IcssVYd3m/WdfnWP0uSz6FyPcTmvKLTr2uIVjjWO+IcZ0sjygTJ JBBl3J2zfAWFtWc12MTF2SqHJ1McHr57KtzpGk13smJPLYWj1kDYslQdWNlGV6rJl3eWov QjujCOXDxWOQj4d2XZG/H4pCq0Uyh84/rY9pRM9PMF6UKj5Hs4n4fbGnyUSSe/pDiFdrmv PUNwaERrNKl84ofg2RYwRP8/iOM+b/4rDMzUM3yoPAHNLyRD6ZNDCzqL/IWSig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4T9kTbjgZTDTRC0q6gUr4g4BS2p+3s6pJBPrJPPGFi4=; b=k4tLrBzes5MCmTkUdtKNUFjsqKuA2F+/KsVbvk1Frr9ZUGJOYO+guynV6jOCAHadAbf60+ MGV5SJTKH0Sq098N+UoTYNMlIPCIWdNOXX2IOuj5dzhEftEx2tOfBnMszTne1btrC61D4Q ZkQhqnSTmAqh5dmMi8v2wTjrKxIAMEXnOPx1sNe+0vwovGJ5WA6UOBH/+2bKCcncAJM/aa cRgUrgcVqFpFf6MOh2d7/vOFhACYmBN0TkxL+PmdJK5zYwGvbsh9vtSKhCULij5kuqRnOV czxGLLpROoXKhYzPrC2cutrYRpUkwDtCFC/ngDLMgqXEW3OlGPH+/EuEVdquCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxFfx029wz8yw; Thu, 28 Sep 2023 14:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SE7a1r039195; Thu, 28 Sep 2023 14:07:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SE7aBN039191; Thu, 28 Sep 2023 14:07:36 GMT (envelope-from git) Date: Thu, 28 Sep 2023 14:07:36 GMT Message-Id: <202309281407.38SE7aBN039191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 64c6327738fc - main - cat: add CAP_SEEK capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64c6327738fc24bb34b9f40ff1c223ab460ef637 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=64c6327738fc24bb34b9f40ff1c223ab460ef637 commit 64c6327738fc24bb34b9f40ff1c223ab460ef637 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:20:47 +0000 Commit: Mariusz Zaborski CommitDate: 2023-09-28 13:38:36 +0000 cat: add CAP_SEEK capability The copy_file_range might require that. Reviewed by: emaste, theraven, kib, markj Differential Revision: https://reviews.freebsd.org/D41967 --- bin/cat/cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index ec14451acd0c..ce7a83d59d5a 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -155,7 +155,7 @@ init_casper(int argc, char *argv[]) err(EXIT_FAILURE, "unable to create Casper"); fa = fileargs_cinit(casper, argc, argv, O_RDONLY, 0, - cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL), + cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL | CAP_SEEK), FA_OPEN | FA_REALPATH); if (fa == NULL) err(EXIT_FAILURE, "unable to create fileargs"); From nobody Thu Sep 28 14:07:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxFfy2lxmz4tq6p; Thu, 28 Sep 2023 14:07: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 4RxFfy2DDFz3SXT; Thu, 28 Sep 2023 14:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vu3AYRSU3fKWoVvmDLCOX6Q4j3dp9Rnyh9puom8XmPM=; b=h70gXRLSqpdQuiOD7xCweEt06ruyGmCNyO9QBTT13NsS9UbTm7ZZVVJs83cp9LTTOOjlQt wjqwJMXViWl8zFEbUSoxCA/9yEHyTvtGUyxSYZx69fu2MolGNE+yxivPFSTHsHbMImA721 h6PsBf/xAVuuUu07xCun3dSoc8jzmOW5EIlg9U4CFY6YpMREn4/a1RZOQ0SwPRdeEQBq1f 1TjVwmZE7rHVrcRSk9t60CrWMf4lBJcNW8Y2PKiFw4PCKywDHOfCz0nCxBMnWiUv/ph1Lx 1YZnmeiJ8tdutnT/Jl10x1u9JLNwAsL+j3h2XnUMkf43pvLVXyTvJRIB4eoSfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695910058; a=rsa-sha256; cv=none; b=qcJVdw1BNqdyH2gKmgc25RR5G0YESC6SILG5DGkFk0/vMvbG3rp64QYcFZgwP6UmaoAw9j IHXYozwTtOlmGeqd8pu85cy1MbCkjmi97zbG3gwHoDpLeIt9Mt7cJK2KoVu3e3Br+Ku0DT Q45yz9Kg9fY/krl5/LakRV3qbe1g57ij78aRQa1EW9U6BAKDfCovOcF21RDeJhPe1038wE 8y81oerEguuy1jrG+5f+e9fKpansH0KFPIzEiWdxiDfu4Bo3rp+N30OX8FH0wK4QmgNFAT e5klNH1+JYNgqxyT8mHWxNwFlxz5K8jnaAk069YgnvJ9WrrJCscboVjSOvidbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vu3AYRSU3fKWoVvmDLCOX6Q4j3dp9Rnyh9puom8XmPM=; b=as/Uf99RUCfQXo6Y7Cu+FwMYcA9tACO8S8yXg6x1Sj6T3dg132p7SEEP3JQbf9hq7r7VNa cUGmDGI/SvzIs/W2x0VaPv1j+Pp9lNwHZSvUz2D3r1/lhrYRKiNo/v82G1y/sbY3jIJ0C/ xbSKbVJO0m/9OW/aJyXK3G7CN8oimM1uz7oNoPLyHpwspss7L1p49YwkU6g/fPLr2V0j9w 7DALpmz38xkMT9ve6yPli6Zwh6U9zu1l/idTr2Y+knlu/ZprMAu/lG7DktsEFhSjciel+h TuXCRXMOJ7iJ1pqU3udO+vmeOCsc6fISwJXKNpSPvYCb0b9dKG2fipSf2h+fFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxFfy0ymjz977; Thu, 28 Sep 2023 14:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SE7cQh039239; Thu, 28 Sep 2023 14:07:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SE7cW9039236; Thu, 28 Sep 2023 14:07:38 GMT (envelope-from git) Date: Thu, 28 Sep 2023 14:07:38 GMT Message-Id: <202309281407.38SE7cW9039236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 15a51d3abaef - main - copy_file_range: require CAP_SEEK capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15a51d3abaef27ddea66320cac7caa549738a1a6 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=15a51d3abaef27ddea66320cac7caa549738a1a6 commit 15a51d3abaef27ddea66320cac7caa549738a1a6 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:24:39 +0000 Commit: Mariusz Zaborski CommitDate: 2023-09-28 13:48:07 +0000 copy_file_range: require CAP_SEEK capability When using copy_file_range(2) with an offset parameter, the CAP_SEEK capability should be required. This requirement is similar to the behavior observed with pread(2)/pwrite(2). Reported by: theraven Reviewed by: emaste, theraven, kib, markj Approved by: secteam Differential Revision: https://reviews.freebsd.org/D41967 --- sys/kern/vfs_syscalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 06b861a2eb73..9d85a295a6ef 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4899,7 +4899,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, len = SSIZE_MAX; /* Get the file structures for the file descriptors. */ - error = fget_read(td, infd, &cap_read_rights, &infp); + error = fget_read(td, infd, + inoffp != NULL ? &cap_pread_rights : &cap_read_rights, &infp); if (error != 0) goto out; if (infp->f_ops == &badfileops) { @@ -4910,7 +4911,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, error = EINVAL; goto out; } - error = fget_write(td, outfd, &cap_write_rights, &outfp); + error = fget_write(td, outfd, + outoffp != NULL ? &cap_pwrite_rights : &cap_write_rights, &outfp); if (error != 0) goto out; if (outfp->f_ops == &badfileops) { From nobody Thu Sep 28 14:07:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxFfz4T74z4tpnW; Thu, 28 Sep 2023 14:07: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 4RxFfz2yrXz3SNL; Thu, 28 Sep 2023 14:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeQ6v2RsRDKadogavUFqgXC+M3bXof0Jf7ktJTu5NGM=; b=CX08/VLqUxQvLnnCXxAtKFws7mvcWTQkgFHn+lE0sNLv8DDYD8ilv80Tjg0ISbS+rTK6Rt XKGZsrhp5jR1kQJQn3oo+YZhfu1ZDJUIaZ9GYxP4sCAazfxVMAqqEWJXSKbd8bhG4c259j 2UKRrcoKWaUoZufQ5KWxu3weOGk4oppakFYbxjL+4hc5JhbSWshZPPGcGUsd1LHNg+1RXP xqSoQNa5yHUwAB1ycrguEoVx+/FSf6nifTEsPQsePGT8EsITbB3xGboF2Mdy8l0ke/yGeK mcKVz/OQlvvmqSiZKSMGKrbQ5xEc2MeMt8syA4morOE2nBPEJtJKJTCY7O5ffg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695910059; a=rsa-sha256; cv=none; b=KKs1H9/32V57+xVXUR5K1Af3/rPZMiLF7700JJ2mR00hbAyAFostyTBsJRucC1gKD53V7T x4ruJYTBvef1EUWpqgXCZ0fIH/FRqDTW/dgPMGXLWo0bXXOm57E3EqJtc3zRVtUM+T43KB KOLI1z94SUH2/n7h6jfUEv6P40YTLm/6jvJQWID23GkA3UJEKB+l0OkXf0s2au687aKRVB 3h3vEhZPyrL058nCSwGsQ2/c1mHGe2Fa+TohosQWPJSxamIyTUPcpVMB+S5H9yrbrHw07U IJgXGzRbWo1XLbqLkXMy6EgPNWYu6QIa6rM1Mm7uqWR4CRo0kSymW9yKRRnm1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeQ6v2RsRDKadogavUFqgXC+M3bXof0Jf7ktJTu5NGM=; b=dyn9br5JEdFpqQMJlwGX/SVHm1s062+wyl5pJFtBsAHGtAMHP79/YH0ZcRrDayUGAOANAN rp4xLJ9rNShiJS2Jkl9NQUDOQIobutZe+2yuCDcJMEd7Ij2/g+wXimT2Gj6TYQr3dRG7EY iakyjAoIs8zxEq4JEBg2qWWHtiXpUSq5UkxwvMjn8G8qLwYQDFiQNCjoDq48xjGhIux1cP BjTAzUd3U8Gz7TfLGH5NICsVjZpsE7gwL+Jo5/YgqdUFkw+GbeDnx8aBZ5XwRLJSLpsGxx ww9VfW0pnml3VIi8BfXtcd26fhHmCr8C70aXwtJvW2Qvvm+iKLNyUhg+Bt8JSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxFfz20mqz978; Thu, 28 Sep 2023 14:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SE7dbg039281; Thu, 28 Sep 2023 14:07:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SE7dAR039278; Thu, 28 Sep 2023 14:07:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 14:07:39 GMT Message-Id: <202309281407.38SE7dAR039278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 62d3f57c22ee - main - capsicum: add tests for copy_file_range List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83 commit 62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:27:27 +0000 Commit: Mariusz Zaborski CommitDate: 2023-09-28 13:48:32 +0000 capsicum: add tests for copy_file_range Reviewed by: emaste, theraven, kib, markj (all previous version) Differential Revision: https://reviews.freebsd.org/D41967 --- contrib/capsicum-test/copy_file_range.cc | 228 +++++++++++++++++++++++++++++++ contrib/capsicum-test/makefile | 2 +- tests/sys/capsicum/Makefile | 1 + 3 files changed, 230 insertions(+), 1 deletion(-) diff --git a/contrib/capsicum-test/copy_file_range.cc b/contrib/capsicum-test/copy_file_range.cc new file mode 100644 index 000000000000..b785eb7f1e97 --- /dev/null +++ b/contrib/capsicum-test/copy_file_range.cc @@ -0,0 +1,228 @@ +#include +#include + +#include + +#include "capsicum.h" +#include "capsicum-test.h" +#include "syscalls.h" + +#define TOPDIR "cap_copy_file_range" +#define INFILE "infile" +#define OUTFILE "outfile" + +/* Test that copy_file_range() checks capabilities correctly. + * When used without offset arguments, copy_file_range() should + * require only CAP_READ on the source and CAP_WRITE on the destination + * file descriptors, respectively. + * When used with offset arguments, copy_file_range() should + * additionally require CAP_SEEK. + */ +class CopyFileRangeTest : public ::testing::Test { + public: + CopyFileRangeTest() { + int rc = mkdir(TmpFile(TOPDIR), 0755); + EXPECT_OK(rc); + if (rc < 0) { + EXPECT_EQ(EEXIST, errno); + } + wd_ = open(TmpFile(TOPDIR), O_DIRECTORY); + EXPECT_OK(wd_); + CreateFile(TmpFile(TOPDIR "/" INFILE)); + CreateFile(TmpFile(TOPDIR "/" OUTFILE)); + } + ~CopyFileRangeTest() { + close(wd_); + unlink(TmpFile(TOPDIR "/" INFILE)); + unlink(TmpFile(TOPDIR "/" OUTFILE)); + rmdir(TmpFile(TOPDIR)); + } + + private: + void CreateFile(const char *filename) { + int fd = open(filename, O_CREAT|O_RDWR, 0644); + const char *contents = "lorem ipsum dolor sit amet"; + EXPECT_OK(fd); + for (int i = 0; i < 100; i++) { + EXPECT_OK(write(fd, contents, strlen(contents))); + } + close(fd); + } + + protected: + int wd_; + + int openInFile(cap_rights_t *rights) { + int fd = openat(wd_, INFILE, O_RDONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_limit(fd, rights)); + return fd; + } + int openOutFile(cap_rights_t *rights) { + int fd = openat(wd_, OUTFILE, O_WRONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_limit(fd, rights)); + return fd; + } +}; + +TEST_F(CopyFileRangeTest, WriteReadNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_WRITE); + cap_rights_init(&rights_out, CAP_READ); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadReadNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_READ); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, WriteWriteNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_WRITE); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadWrite) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadSeekWrite) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ, CAP_SEEK); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadWriteSeek) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadSeekWriteSeek) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ, CAP_SEEK); + cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} diff --git a/contrib/capsicum-test/makefile b/contrib/capsicum-test/makefile index ad697f160e2e..e55393bbf131 100644 --- a/contrib/capsicum-test/makefile +++ b/contrib/capsicum-test/makefile @@ -1,5 +1,5 @@ all: capsicum-test smoketest mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS) -OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o +OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o copy_file_range.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o GTEST_DIR=gtest-1.10.0 GTEST_INCS=-I$(GTEST_DIR)/include -I$(GTEST_DIR) diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 542c6720521c..81cb4fa1ceee 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -19,6 +19,7 @@ SRCS.capsicum-test+= \ capsicum-test-main.cc \ capsicum-test.cc \ capability-fd.cc \ + copy_file_range.cc \ fexecve.cc \ procdesc.cc \ capmode.cc \ From nobody Thu Sep 28 14:58:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxGnb0hvRz4ttGM; Thu, 28 Sep 2023 14:58:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 4RxGnZ0F2Cz3WfN; Thu, 28 Sep 2023 14:58:26 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=jKDd4zEQ; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::734 as permitted sender) smtp.mailfrom=markjdb@gmail.com; dmarc=none Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-773ac11de71so824389785a.2; Thu, 28 Sep 2023 07:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695913105; x=1696517905; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=mnGe/XnXHy6XuDMnAyeurHjpezqSvdN3t5IJdBaBIlw=; b=jKDd4zEQUBKwW6RFVpWuNbqCj+u2I4h1mEiEWh/BNgPtd4v8z8UTPkbOSQ4AJxVKzK oZunmXC0JAu2AWwiC0upv+Jq/nWV10dEH04st7WVWkJdL32BS3ehEMwoU77UheTY+ywZ eV/wQhHIcekoyWQetB5NlsFlg5pwgUKgPL0exdI0blnknnvW46UxMChxnT35dKHjB5OI kiFEu747jUJPKihJPKZGXnTOeoNgKVHChkh8x2/S0nFMRwOwgVQZtxZMQDxuyrK1PxSk jCpknmgkzAc4wwAFYAnzRLYyUU6UOdV2xVIUzO3qkXljwlEkC1eCmwvy56lY9hpFtTLV JGZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695913105; x=1696517905; 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=mnGe/XnXHy6XuDMnAyeurHjpezqSvdN3t5IJdBaBIlw=; b=WD7eyiwAZff4irZaepNnFvKut/kqjDuJcsH7A4JC4OoX72jSFcPUbA5VLTsXEkSXUQ bdRHm+4NbvWt4yMOaEEJYfHpf3eGlgKkvtmGdMK7DIpZ+SHTcFnpxlcYtSeYVoupVuS2 7/WaMlwJ5l/Q3dmfVmuCGnNsRJ3J+7f/eo0QqP4eJbRVfjn0Jg0F3Syptcyd/+jSZlI+ E76TlNaMRi4cMHaXPN8YrCF0RPBh8aeJUwRpiX+OAJyqBCJpMrLQclTFb5lAfIc+pi9U x7H3YtnJLLDyU7kf/KkQIYc8jqvR9rBVBh6f36/Kl5POOMpL+mwW7CNmBvgXm6X0dUYv quHw== X-Gm-Message-State: AOJu0YwT/SoTyuob7cl52TrLO+c8fsGVhsUmz24GNfL9DY/GqVBBQUK0 /Lkbi7nLjyodBabS2yHvM9FVH3zfX+M= X-Google-Smtp-Source: AGHT+IEnfsLDxhXIuxYbil8bhTeN4VPNJM+c0gsX6rv2GfPzeu4RbpGZQJDURrSImUiqK0F0sZvVVg== X-Received: by 2002:a05:620a:4489:b0:76d:5126:65d8 with SMTP id x9-20020a05620a448900b0076d512665d8mr1639488qkp.6.1695913104613; Thu, 28 Sep 2023 07:58:24 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id vu4-20020a05620a560400b00774309d3e89sm3445577qkn.7.2023.09.28.07.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 07:58:23 -0700 (PDT) Date: Thu, 28 Sep 2023 10:58:20 -0400 From: Mark Johnston To: Baptiste Daroussin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: References: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.69 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::734:from]; BLOCKLISTDE_FAIL(0.00)[2607:f8b0:4864:20::734:server fail,192.0.220.237:server fail]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxGnZ0F2Cz3WfN On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > Author: Baptiste Daroussin > AuthorDate: 2023-09-13 07:43:33 +0000 > Commit: Baptiste Daroussin > CommitDate: 2023-09-27 14:00:00 +0000 > > flua: add fbsd module > > This module is bundled into flua, it only provides for now the exec > function. The point of the function is to be able to execute a program > without actually executing a shell. > > to use it: > fbsd.exec({"id", "bapt"}) Hi Baptiste, How is this different from posix.unistd.exec in the luaposix module? Wouldn't it be better to add this to the existing posix.unistd namespace in lposix.c? exec does not seem FreeBSD-specific. I have a related question: this week I wrote some FreeBSD-specific lua modules wrapping some system calls like sysctl(2) and cap_enter(2). How do we want to organize the flua namespace for such things? Should we have a freebsd.sys namespace for system call wrappers? I would then put bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we could have freebsd.lib.procstat, for example. From nobody Thu Sep 28 15:10:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3Y2p4Hz4ttjn; Thu, 28 Sep 2023 15:10: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 4RxH3Y2MYwz3XXd; Thu, 28 Sep 2023 15:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tDd5OaJBxq0udQZtL2KJDR5crnDlxpIwNpE52whURvM=; b=pAVSE3Whb/lOdK5G8/yHDEc0Hkr4tLT3iarcsB7VENRyQzeaseBsmg0amPod3J0YcOZNWr DvVkh3cLrglFqO09rrgi8aV2Z2UWhqb1fLRujt01giuwfCqb9F5YWgy6XJgJzfyM2uSdX6 rGUAXM5w1Cg99Os1EBBYnFj6pfQLcFUpSdhaj81AjxNTkQ3WjcRrl4epAGMYZqvjq7IkyN 6AbdHEaGOADkmwTfNduzkLvATLHytb8b7ZnxNq2SLVRIW9DsRVnSNp8g6h4bwRe1Hhu2XK zpkVp2cnEFC2J1+N6EHRFerlnpPTXne8dpSdGuuosXywx7UeWLV3YGT3VkMTgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913833; a=rsa-sha256; cv=none; b=VlLP+1iIYHlq9O/x4XTTukln2nyLNjzChMfaXhUIeU6tcCrihG9gVkywx+uKXHHYYsb106 5FBiMNfisGfAPSQj2XbFysMNuJwB8Q5z5ptEocYqs06oipEaot8cawbH5A1Rd3eMFJ+j0L IyKidXbTWMb91TRkwmAoV0QV+WgE6JgbtoDGknvf44V8K8Ky6UM6NORWYcK4NZSQ9k2ric lBzEtGo/dyvT2Nm1u+ifqVT7fTpQt0VGYQ9c0zTnIojyJbUuncgCMiNpHVr/v8IoyeyR/j O3e66udYmHmbXgy+ATGuebGqCFhjUfcZIFxEAv4pveHOIIT9aBr/K84kr4VJ/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tDd5OaJBxq0udQZtL2KJDR5crnDlxpIwNpE52whURvM=; b=ou6brUkTQCJBHDrW3E6XdVKUZBPL9Uui+W2qfgLentX7t1aENDxdDNM5f6IlPUD/SwX1gp oaILG9rlfuBAWiB/oLaqrGTGpkAk5v+ovNA4nDlePfH0JDyBHKg9OX8Dhdf9/FnuFeMeJO PjdVYypzMPY1yU2XDHwNLfNjsZwnZWZtaHY1EIEIFbtN5uNzNnFxTsNlKBepPW+m6JLHc6 xvih7Swky4LKHUP5g7R9/suIiOKdiuHzrblGtHJohGuSZ1EhXSEoKNruVeyJGc5nRBShWt q4SDfeWUwSuveJdhc5ZMpMMaFrtEBjiRPkcc45ZhOEVCM0k8AHWmzBt+27vQkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3Y1J15zC03; Thu, 28 Sep 2023 15:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAXaA047108; Thu, 28 Sep 2023 15:10:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAXVg047105; Thu, 28 Sep 2023 15:10:33 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:33 GMT Message-Id: <202309281510.38SFAXVg047105@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: 7974ca1cdbee - main - cr_canseejailproc(): New privilege, no direct check for UID 0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 7974ca1cdbee949f5e453eea112be265b425c407 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7974ca1cdbee949f5e453eea112be265b425c407 commit 7974ca1cdbee949f5e453eea112be265b425c407 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:37 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 14:42:22 +0000 cr_canseejailproc(): New privilege, no direct check for UID 0 Use priv_check_cred() with a new privilege (PRIV_SEEJAILPROC) instead of explicitly testing for UID 0 (the former has been the rule for almost 20 years). As a consequence, cr_canseejailproc() now abides by the 'security.bsd.suser_enabled' sysctl and MAC policies. Update the MAC policies Biba and LOMAC, and prison_priv_check() so that they don't deny this privilege. This preserves the existing behavior (the 'root' user is not restricted, even when jailed, unless 'security.bsd.suser_enabled' is not 0) and is consistent with what is done for the related policies/privileges (PRIV_SEEOTHERGIDS, PRIV_SEEOTHERUIDS). Reviewed by: emaste (earlier version), mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40626 --- sys/kern/kern_jail.c | 1 + sys/kern/kern_prot.c | 7 +++++-- sys/security/mac_biba/mac_biba.c | 1 + sys/security/mac_lomac/mac_lomac.c | 1 + sys/sys/priv.h | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 0c1f565638da..66bcd77ca8d2 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -3939,6 +3939,7 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: /* * Jail implements inter-process debugging limits already, so diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 19e0b78c6709..ed15cb566499 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1426,9 +1426,12 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { - if (u1->cr_uid == 0) + if (see_jail_proc || /* Policy deactivated. */ + u1->cr_prison == u2->cr_prison || /* Same jail. */ + priv_check_cred(u1, PRIV_SEEJAILPROC) == 0) /* Privileged. */ return (0); - return (!see_jail_proc && u1->cr_prison != u2->cr_prison ? ESRCH : 0); + + return (ESRCH); } /*- diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 6948548503e1..5d66e2fd4b9b 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -1924,6 +1924,7 @@ biba_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 05bd0da06960..aa9abf458721 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -1702,6 +1702,7 @@ lomac_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 45cb5bab4275..a61de8d32fe0 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -105,6 +105,7 @@ #define PRIV_CRED_SETRESGID 58 /* setresgid. */ #define PRIV_SEEOTHERGIDS 59 /* Exempt bsd.seeothergids. */ #define PRIV_SEEOTHERUIDS 60 /* Exempt bsd.seeotheruids. */ +#define PRIV_SEEJAILPROC 61 /* Exempt from bsd.see_jail_proc. */ /* * Debugging privileges. From nobody Thu Sep 28 15:10:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3Z4FBHz4ttjq; Thu, 28 Sep 2023 15:10: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 4RxH3Z3Nmpz3XQ5; Thu, 28 Sep 2023 15:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f+jGDzmbpv6mHNAlgdiIkA1JWWcwJtmr5HL4z9RAHTg=; b=uDYh/Y8rGRGBC4j6cR7qcO1/c49xgA+eez5jFUiSzdxaoB6hCTlAWJqBtKcnYMNHeLQdJ+ vEZEPS54K9qLuAOlopyg00XMu7897ed1E06eT7/UgzfYpcHyY64pLAo8n9X7XDS6Cv+oD5 w8xzunjSBy9u0Vr95rwKK+lf0FnAuQ2PqEeoHUS/PtMUi1M6qOlUuvRJ+F/Nq9Ugoycvog Gwicwk8eatlDF/tkfJ/zbMOz7E4s8kpOiRjUHvlKPbyGufCQRKny5fXC0HTPJTEu4t+0ev fqMyXj10s+EMy3MIc+4fdPTJObMurRlxwmLfg6HRq5yEKvI5nhhnN3kGbQaXiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913834; a=rsa-sha256; cv=none; b=DNCA7sfd8OQke2v6+4wCTWAjadLYYt+QwNCvtJOiZC5ZmW8K3drUnrLFxvZIMhgVM/PRkY Yw9kI+xQ5wzrunNXcMAWr+qQKGu41PSenE2W+/8ENGZg7zMpreEpfZzrkcIIFjHZRhiRdS O7HEXNRIehpml48XitRX1xTal/Pw9uWg2sts1qQtVsuvbC79MJU8cl5crAd6kVNYyodMgW 0B+ZowZi9y2n/y5i74ze7urYr/YcFA+8u5tmo8qXKhtapwLmZH9gpxQo11XsJvLVSf7z9s U47MDlND7+wI1korLTrSkVsCohosbQZpDqeMsgpF4fFzRtfBkZLhzLiPr5uupQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f+jGDzmbpv6mHNAlgdiIkA1JWWcwJtmr5HL4z9RAHTg=; b=rjadCt6dHFuLw2uYNPZ7jwz6Y/Wda7GhhmosAB6s828ZlP2mwXqudwVB7lwvV1Fpz7XD// /lsGnNXr9mIewTGOBdVGyJLVzZTAk32VeWvBz+FHVJVjz2lLVHpAdraDi+S9Vy2Z+rL/oR Mv7vX/YYdLvTMXe/SWh6pKfXjA7mItbB8wwZO2BwmyI09f88KhH6FAxhsjzcvWPmdx0nYP EfE5HFjZch5q8148llRC3k8gnL/DQDP+VGgTMWoBCT19s3s9mro+VkCDXZ4Bp+nYkDNSl+ zxqBjHWPNRDVC7wug+BJ0wW1gA8eiY3+/Zc28bATGL16vYYd8JfYLgRZYpKZZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3Z26BKzBJd; Thu, 28 Sep 2023 15:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAYoc047160; Thu, 28 Sep 2023 15:10:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAYbn047157; Thu, 28 Sep 2023 15:10:34 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:34 GMT Message-Id: <202309281510.38SFAYbn047157@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: e4a7b4f99cfd - main - New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e4a7b4f99cfd4931468c0866da4ae8b49cf5badb Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e4a7b4f99cfd4931468c0866da4ae8b49cf5badb commit e4a7b4f99cfd4931468c0866da4ae8b49cf5badb Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 14:57:43 +0000 New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects This is a new helper function that leverages existing code: It calls successively cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() (as long as the previous didn't deny access). Will be used in a subsequent commit. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40627 --- sys/kern/kern_prot.c | 19 +++++++++++++++++++ sys/sys/proc.h | 1 + 2 files changed, 20 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ed15cb566499..1e6073b554e4 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1434,6 +1434,25 @@ cr_canseejailproc(struct ucred *u1, struct ucred *u2) return (ESRCH); } +/* + * Helper for cr_cansee*() functions to abide by system-wide security.bsd.see_* + * policies. Determines if u1 "can see" u2 according to these policies. + * Returns: 0 for permitted, ESRCH otherwise + */ +int +cr_bsd_visible(struct ucred *u1, struct ucred *u2) +{ + int error; + + if ((error = cr_canseeotheruids(u1, u2))) + return (error); + if ((error = cr_canseeothergids(u1, u2))) + return (error); + if ((error = cr_canseejailproc(u1, u2))) + return (error); + return (0); +} + /*- * Determine if u1 "can see" the subject specified by u2. * Returns: 0 for permitted, an errno value otherwise diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 3102cae7add0..8609bbd124ad 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1163,6 +1163,7 @@ void ast_sched(struct thread *td, int tda); void ast_unsched_locked(struct thread *td, int tda); struct thread *choosethread(void); +int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); int cr_canseeothergids(struct ucred *u1, struct ucred *u2); From nobody Thu Sep 28 15:10:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3b50nlz4tttm; Thu, 28 Sep 2023 15:10: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 4RxH3b45swz3XWQ; Thu, 28 Sep 2023 15:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BniWYCjjhmPmlI2rfajkXezcRIyyqGeQkeNXx8sUoF0=; b=lNX0R0frnWZmVGQtNRXtxNo0DiHCYX7tPzr2Og+D1MCqUEaECb32KkJnDgZ9ZcbE5IniEW HX8ADP6aKmWmY3Ex5vGHMkxd0buCBB2CaihulOMvdVGcMIL6MMwYPsnDbQQbXGMWzjhcvb sKtZM+RrFP8k987QtgYQLYdkWkSokhK4+aVUCUbqU4kJeQ/1rnXRWMNhpnZntuSwwHObv0 RjDY+PDLeEjm8KUsms/F6X6+HyWspz4jXL/n2W+aMXYZPSQ7LXvGqjw0ArYz5ma/s7gv3R QWdZUIrmlcW/Yo7OPXwReTYD4QQQtcu8Z35gztGALNCabfoqlyqsRBGhi00zCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913835; a=rsa-sha256; cv=none; b=Yb9mAuRC3pTiW7lGZdjEQtWwfLpwojQ6MGo/nfa35EEWH7pUGb78uoi+1MT/cqP9sLn9tU Uz7s4y20wKwMfwyDAusFpXrSnZBvw4j/TGk4GOP34Bkdm9IUlhdNqEQVC0P5M1XPv+O1uY iqoYKY1DLaU6HiQPyPAbJYpfxAcaf9N67hjwNYu/T7e/l0iUv05zZXx7FyHp/8cmeKPUia ZIrHsUuAewzkmaB17ZSpTI/XSYRkxsRtj2y4wtp/Jt3RTsEZol/rD380s7PNhTbOTgZCpG 8Ge78bReSMqUdvYdxCeLU3v72X0v/YGZ72seuIU0Cbb0hU4BZahNHEbNMjMsdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BniWYCjjhmPmlI2rfajkXezcRIyyqGeQkeNXx8sUoF0=; b=egXbSr6UDrnnjF7jABi5p7nepYykqgPyiOCH2EYciWdc2bTtR0Lz8h8ddDubSrMrKYWsRV EFWtLK5e+eLnCnf6cAFGQnK/BmKr1w+qsLRotVbdQ2I25MHYscpHycHINqvBJY/q3bIkmm NQaus04wIuUS+sdMX+G45v/xvEBHdY5eQTbyPP8QvfH2nKoF7EBuQcFJ9r25LWnQ5Gd61Y fR2Iohxwnoc1Vwk3LXDUA+4ikGRyxEeMJRIUps1rzeQN1tBKUAqUK+htGWLwhi3mezGgth pp3lpwMuoOvFiDIzGt0FzATaZrhVevS/xN/xTz/twKQaH/bEuQg0TqZxyMhMcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3b355fzBpj; Thu, 28 Sep 2023 15:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAZ9t047202; Thu, 28 Sep 2023 15:10:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAZNF047199; Thu, 28 Sep 2023 15:10:35 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:35 GMT Message-Id: <202309281510.38SFAZNF047199@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: 5817169bc4a0 - main - Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5817169bc4a06a35aa5ef7f5ed18f6cb35037e18 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5817169bc4a06a35aa5ef7f5ed18f6cb35037e18 commit 5817169bc4a06a35aa5ef7f5ed18f6cb35037e18 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 14:59:08 +0000 Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() As implemented, this security policy would only prevent seeing processes in sub-jails, but would not prevent sending signals to, changing priority of or debugging processes in these, enabling attacks where unprivileged users could tamper with random processes in sub-jails in particular circumstances (conflated UIDs) despite the policy being enforced. PR: 272092 Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40628 --- sys/kern/kern_prot.c | 25 +++++++------------------ sys/netinet/in_prot.c | 4 +--- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 1e6073b554e4..648c067dc528 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1471,11 +1471,7 @@ cr_cansee(struct ucred *u1, struct ucred *u2) if ((error = mac_cred_check_visible(u1, u2))) return (error); #endif - if ((error = cr_canseeotheruids(u1, u2))) - return (error); - if ((error = cr_canseeothergids(u1, u2))) - return (error); - if ((error = cr_canseejailproc(u1, u2))) + if ((error = cr_bsd_visible(u1, u2))) return (error); return (0); } @@ -1536,9 +1532,7 @@ cr_cansignal(struct ucred *cred, struct proc *proc, int signum) if ((error = mac_proc_check_signal(cred, proc, signum))) return (error); #endif - if ((error = cr_canseeotheruids(cred, proc->p_ucred))) - return (error); - if ((error = cr_canseeothergids(cred, proc->p_ucred))) + if ((error = cr_bsd_visible(cred, proc->p_ucred))) return (error); /* @@ -1653,10 +1647,9 @@ p_cansched(struct thread *td, struct proc *p) if ((error = mac_proc_check_sched(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); + if (td->td_ucred->cr_ruid != p->p_ucred->cr_ruid && td->td_ucred->cr_uid != p->p_ucred->cr_ruid) { error = priv_check(td, PRIV_SCHED_DIFFCRED); @@ -1723,9 +1716,7 @@ p_candebug(struct thread *td, struct proc *p) if ((error = mac_proc_check_debug(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); /* @@ -1815,9 +1806,7 @@ cr_canseesocket(struct ucred *cred, struct socket *so) if (error) return (error); #endif - if (cr_canseeotheruids(cred, so->so_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, so->so_cred)) + if (cr_bsd_visible(cred, so->so_cred)) return (ENOENT); return (0); @@ -1847,7 +1836,7 @@ p_canwait(struct thread *td, struct proc *p) #endif #if 0 /* XXXMAC: This could have odd effects on some shells. */ - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); #endif diff --git a/sys/netinet/in_prot.c b/sys/netinet/in_prot.c index 222e39c6bcd2..204f4f60456e 100644 --- a/sys/netinet/in_prot.c +++ b/sys/netinet/in_prot.c @@ -67,9 +67,7 @@ cr_canseeinpcb(struct ucred *cred, struct inpcb *inp) if (error) return (error); #endif - if (cr_canseeotheruids(cred, inp->inp_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, inp->inp_cred)) + if (cr_bsd_visible(cred, inp->inp_cred)) return (ENOENT); return (0); From nobody Thu Sep 28 15:10:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3c5ZGdz4tv1L; Thu, 28 Sep 2023 15:10: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 4RxH3c50FWz3XhH; Thu, 28 Sep 2023 15:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ufTOl4pZ/X0MAr96KClR8k77SnKsFPAJ8oENLAHYghY=; b=PvIzHNSrIFJIaMDEUXya0hGyDXOzff+5yecBhFkH51iLqdFLupIPycSwx01ADqLIbDKaFT pFyfxZYPqK4IgL6R0ixG/mjP+B0zsfaXWetFuiIlowVJO7b6s1opaPKXJ2RN4ehCJIqiod MHH4Es5BltMpEW2DPL6oXeQDuyaZNoJQHWUH4wTB2ibphwY/bpowEjxjqC9PsKx0Tkl+eg IOPlhGSLdJhrca/R3ToIkpxDb28U8T12MjTLzU+KN35I69So2jaiMycCBM1cPV5HU8aCT1 i7j2ML6yuN3tOn6dqG82E370Q9QVvGg94Vw63uSsnrZiVPD7oHa7XmHNuQ0KYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913836; a=rsa-sha256; cv=none; b=pHMjdi08U1WdoCHxyIx+pHyrBRskI0Iw/dUYD0wrSdPrHUbLxo5WIEYa+B85AacTUgmhAa d9PAktgXZpkn/SkSou78/o11Nwi75J/WlekH1nGsS71r6770rj/9HOR1QOkr/tbiwp1SxB LoqY+woB9+f5ANWpHe3y19jNL2jWm5WCQ+sgqateb4Co1aZl5FnrLb39Uw9SbCvohZiA2q yGCnXakLRzWLRKUSTIs/m+iJcLf3NiwYuKD0IAh4/SJAbKNUxB5Uw+phMDuChvkuh/ELuS Z+xeeANqZRyKxT1lLy3uPs/EW8A5ZIQx2hgYNlOdOgjmrpM/LcsRAaBKRGb+Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ufTOl4pZ/X0MAr96KClR8k77SnKsFPAJ8oENLAHYghY=; b=hQpMTH0nF0gKBHQz5lhBPFXLaw5k2Qm7y9m3HsX7G73cAbG2G6TKdAdQ9wr+N/arhr0jyP jjMB1bD3k6S3VLvLVrkzmlP0BhAroy/8srdACcxCkaCxmNOOnFGb6+4zXH0BEhKTe76ZXb nMomaqtp8+Ovtb5HkkS91BItGQVKy/gXvzDKv/e7p8QHldW35vIPSKx1oSEheMXpPshBkp cAKEdcBFr8DDpLuKM5nNTC+kRqzpQFrvjqD/96IGcNaOpbZeGWkHWjPrNE4sWOCO1OwEzy hy7K6OcujOLJNMcW9+IjzCXbz6nCy97/dy9KfxBhFf73qcxR6NBBEE0WIU393Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3c3pDQzBjk; Thu, 28 Sep 2023 15:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAarr047251; Thu, 28 Sep 2023 15:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAaV7047248; Thu, 28 Sep 2023 15:10:36 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:36 GMT Message-Id: <202309281510.38SFAaV7047248@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: 91e9d669b475 - main - Make cr_bsd_visible()'s sub-functions internal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 91e9d669b475d1900e8dc01a49ad90a621c4a068 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=91e9d669b475d1900e8dc01a49ad90a621c4a068 commit 91e9d669b475d1900e8dc01a49ad90a621c4a068 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 Make cr_bsd_visible()'s sub-functions internal cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() should not be used directly now. cr_bsd_visible() has to be called instead. Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40629 --- sys/kern/kern_prot.c | 10 +++++++--- sys/sys/proc.h | 3 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 648c067dc528..04aaebf0de63 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -91,6 +91,10 @@ static void crfree_final(struct ucred *cr); static void crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups); +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2); +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2); + #ifndef _SYS_SYSPROTO_H_ struct getpid_args { int dummy; @@ -1351,7 +1355,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_uids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2) { @@ -1381,7 +1385,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { int i, match; @@ -1423,7 +1427,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { if (see_jail_proc || /* Policy deactivated. */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 8609bbd124ad..0b91b2a1a0b5 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1166,9 +1166,6 @@ struct thread *choosethread(void); int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); -int cr_canseeothergids(struct ucred *u1, struct ucred *u2); -int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); -int cr_canseejailproc(struct ucred *u1, struct ucred *u2); int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); From nobody Thu Sep 28 15:10:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3f1bXMz4ttm8; Thu, 28 Sep 2023 15:10: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 4RxH3d6TDgz3Xcd; Thu, 28 Sep 2023 15:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Et4345SL0WFd9b3A8jvoBonKTiUDszWTgkcVIFkMzTc=; b=moUY3dnoZjVwGLihHNViaEKEai0Pai5Ny86AMu8F/Rk7eCMEn7LH+myFxkTm/Ri2+wR2n5 lTATzLHcc1AcR09MEJTks1kAdWA61HPrx2DNbOwkiRImyX1ib1r5v2gp48KEiDMN6dCY7X BQm0JaiAvhaWJ6GV6TLs/ftBAIeZpsd68XELMcw3YLUNeGukDHpvNvdw4BB48s1j6gK59g rq1VpLGjzSTMzQHG9LmaW29yxQHH9hfq0X6B6s/AESx8fBI3BObsI/cC/QPkJ1IyStqQB0 C/KOCKb4OjU6YYdEjnL0BFNpZaqQkf6U+k/rKcJQJJMPn/ygtJViwgl8UmN6Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913837; a=rsa-sha256; cv=none; b=Q0l8XMoxXSd877Eame4YNVsx5BiPFNRCoMXwC1gwhLBkwRzrMLgOXmU1epUy6kXSSKt2sd v0Y14iqV+2KjPTi+AI5P2DpR4ZMDxS4qbonL8aiMg+WfM0NPs55SOU7r1ZfSf3eMo5kaks IVM3Iq5mJ3ttrk2COpdSdWOX3Km4tDpTJ4BoOvKJ56LgN0lLLu47zb6W3Bg+2XKf1slln7 shQ4eB71Ai3TIgQ5j1YT3e5dD/I4wo1lIre/CelaLXDZmu7ujMTT4006HakOjGdg3mMQOE C5nbS0OrwYI/qDf9s7ZIWxda6xGyFywSv3+dtwCcLGkser9dgenAlwPAq4ZFnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Et4345SL0WFd9b3A8jvoBonKTiUDszWTgkcVIFkMzTc=; b=Up3w5Q1W78oq8ATYgNGRv9tZOMZLMMWXqvyeAntIGklB6Qz3UMeqgLgvvfWcBKEegzxVua GzxlefUPwSpSOsY0yUDjDHlwjnrkHOnnrxmxeJC+68WhjxW63c+khNeKVTUHwZsRgt2XEK bx5dI8+uMVm+yyjrrVljL1hKtSJC+Ilb47x2AvByemD4Ox3k6fXR6IFEnFQPrAaCyRQtdD sL8Ga2PSz2cKWzo/h1NTWni4O+SYW5uAE6Fkh2j4Lqj/UR6w4/SfeZL0OWd/I1opU5NyQm xT2DIcoMtVMGO8OevbrkPZhoulPG6kVumwXl1vVVoPXS3XEVOnJwPCIHmol4Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3d5VyZzBJg; Thu, 28 Sep 2023 15:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAbeF047299; Thu, 28 Sep 2023 15:10:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAbGf047296; Thu, 28 Sep 2023 15:10:37 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:37 GMT Message-Id: <202309281510.38SFAbGf047296@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: c59ab75c04fa - main - cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c59ab75c04fa32bc6d292596ff5e4593a05a6b1b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c59ab75c04fa32bc6d292596ff5e4593a05a6b1b commit c59ab75c04fa32bc6d292596ff5e4593a05a6b1b Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename When these functions were renamed 7 years ago, their man pages were not. Rename the latter in accordance and fix the names inside them. Fix references to them as well. Add the old man pages to the list of obsolete files. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40630 --- ObsoleteFiles.inc | 4 ++++ share/man/man9/Makefile | 4 ++-- share/man/man9/cr_cansee.9 | 8 ++++---- share/man/man9/{cr_seeothergids.9 => cr_canseeothergids.9} | 8 ++++---- share/man/man9/{cr_seeotheruids.9 => cr_canseeotheruids.9} | 8 ++++---- share/man/man9/p_candebug.9 | 8 ++++---- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 0b9d6247629b..64003b2c976f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20230927: Man pages renamed to match the actual functions +OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz +OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz + # 20230925 OLD_FILES+=usr/share/examples/diskless/ME OLD_FILES+=usr/share/examples/diskless/README.BOOTP diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 07a107b4bd7d..a989f4105d5c 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,9 +69,9 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseeothergids.9 \ + cr_canseeotheruids.9 \ critical_enter.9 \ - cr_seeothergids.9 \ - cr_seeotheruids.9 \ crypto.9 \ crypto_buffer.9 \ crypto_driver.9 \ diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 8e058eb4e3e5..4824a231170b 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -50,9 +50,9 @@ variables and .Va security.bsd.see_other_uids , as per the description in -.Xr cr_seeothergids 9 +.Xr cr_canseeothergids 9 and -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 respectively. .Sh RETURN VALUES This function returns zero if the object with credential @@ -84,7 +84,7 @@ does not belong to the same jail as The MAC subsystem denied visibility. .El .Sh SEE ALSO -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 diff --git a/share/man/man9/cr_seeothergids.9 b/share/man/man9/cr_canseeothergids.9 similarity index 94% rename from share/man/man9/cr_seeothergids.9 rename to share/man/man9/cr_canseeothergids.9 index bd8eb5d2e9d9..79269533ae5c 100644 --- a/share/man/man9/cr_seeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERGIDS 9 +.Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME -.Nm cr_seeothergids +.Nm cr_canseeothergids .Nd determine visibility of objects given their group memberships .Sh SYNOPSIS .Ft int -.Fn cr_seeothergids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the group IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeotheruids 9 , +.Xr cr_canseeotheruids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/cr_seeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 similarity index 94% rename from share/man/man9/cr_seeotheruids.9 rename to share/man/man9/cr_canseeotheruids.9 index 2cefd0f9dc8e..80acc2d7a6ca 100644 --- a/share/man/man9/cr_seeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERUIDS 9 +.Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME -.Nm cr_seeotheruids +.Nm cr_canseeotheruids .Nd determine visibility of objects given their user credentials .Sh SYNOPSIS .Ft int -.Fn cr_seeotheruids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the real user IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeothergids 9 , +.Xr cr_canseeothergids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index ffa4fedb6172..e80d313de55c 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -113,9 +113,9 @@ Process is not visible to thread .Fa td as determined by -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 or -.Xr cr_seeothergids 9 . +.Xr cr_canseeothergids 9 . .It Bq Er ESRCH Thread .Fa td @@ -129,8 +129,8 @@ The MAC subsystem denied debuggability. .Sh SEE ALSO .Xr jail 2 , .Xr sysctl 8 , -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 , .Xr prison_check 9 From nobody Thu Sep 28 15:10:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3g0SK5z4ttk1; Thu, 28 Sep 2023 15:10: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 4RxH3f7117z3XwS; Thu, 28 Sep 2023 15:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLK+ZXRLZ9HmlcYyO1rhIabORERBJIAaXJcVER4eE84=; b=xt/+2s9u2BhIssqNrNst7IP99sTeW3RPp0Eiv3db5cFXipk4/MutQyeiA9rnhtmpbbbP3y PuaoVcVLn9WY9xjb2kGpU/0DEuY9hS9wrfZzzUmnJn5fgsxOw+e4NmbyjTAGgFWSVSPC61 X3aOgC8qElQgZ0qnXck1UdWE7XScE36aOS2Qah/VHc+EtuFHCRzXuXnrR6RqElKZzS62Fy MnwWzAAijGOUNn6EUranV070hbAmZnh4wO0WNiy8O9s+awBdlHRyXGy9PQvQHNJhSRZThI kIcuBbGEUPloVPEAZyO5d/PK9LxyNnmRYsCIWQE8APBqnteugtWEisMpmQlwCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913839; a=rsa-sha256; cv=none; b=ldPFxoGo4yfCUOushGzCwyt+VhgmlEGEdQq1N+Zmcx/kRDFWFibWdZjbHObLoHIs1LxWpT 8dB+LpDc5+j98Q4sZFgTSuY77o4WGSukV7DUT8te9NfJIBV82Ija/XHaOR5PkjCfONTHGX 93NK4cA7gdS/upYk1a8xMUWrEd+2h9X6CHcYZX3J8mjXWK/kMH++vpQ7NyjJx7TygZKoco KdbDvKDtQ84ccqaKJDzpt2KqH0eSI4urJUNxum5BVVU5oGldwAdhsPrS6hHskzzkviTZyi NAGJkKlcmsdKWKpkHAdVbgAh1hWqbw2Me706k4PZdjRGbnNirA96NDAucDKppw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLK+ZXRLZ9HmlcYyO1rhIabORERBJIAaXJcVER4eE84=; b=GN4mXk86/vGfqRi1Kb8LsND4C4dLgglVyzoSqxLlpZsNrlKQKnAeMONIYHsCuG0b4InTDL 9fSrZdWAOfC4TRbRnD9WyHEpgmBpBUmqmYakYa0VabChYxpJAyTCZWvVTGC98stKQgm219 vIOef0qt8EWilarg0FY8LS0uOrcV9RgmVRxORd/1aHze0gcCcesnib5GTOQb/Sr3+QcbcR L3k3vDEeSY7M+3FiL2Kwdsbr19S6oNZyy/BSDoX6uFX/Z49z96MHzSwz0NE7SoFiEOrpN6 uZwJ4mBxKT82QfS6GHlFq9u7QLoFW2lVXWigkH5xDnDeDLPHsLHyfJOFlMgDgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3f65DXzBJh; Thu, 28 Sep 2023 15:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAcnX047339; Thu, 28 Sep 2023 15:10:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAcvq047336; Thu, 28 Sep 2023 15:10:38 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:38 GMT Message-Id: <202309281510.38SFAcvq047336@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: 29d863bb7ffc - main - cr_canseejailproc(9): New man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 29d863bb7ffc692998f21fa3e7a91afa1151cf1c Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=29d863bb7ffc692998f21fa3e7a91afa1151cf1c commit 29d863bb7ffc692998f21fa3e7a91afa1151cf1c Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseejailproc(9): New man page Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40631 --- share/man/man9/Makefile | 1 + share/man/man9/cr_canseejailproc.9 | 81 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index a989f4105d5c..a33c42018dbf 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,6 +69,7 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseejailproc.9 \ cr_canseeothergids.9 \ cr_canseeotheruids.9 \ critical_enter.9 \ diff --git a/share/man/man9/cr_canseejailproc.9 b/share/man/man9/cr_canseejailproc.9 new file mode 100644 index 000000000000..775c76722b05 --- /dev/null +++ b/share/man/man9/cr_canseejailproc.9 @@ -0,0 +1,81 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 August 18, 2023 +.Dt CR_CANSEEJAILPROC 9 +.Os +.Sh NAME +.Nm cr_canseejailproc +.Nd determine if subjects may see entities in sub-jails +.Sh SYNOPSIS +.Ft int +.Fn cr_canseejailproc "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials +.Fa u1 +is denied seeing a subject or object associated to credentials +.Fa u2 +by a policy that requires both credentials to be associated to the same jail. +This is a restriction to the baseline jail policy that a subject can see +subjects or objects in its own jail or any sub-jail of it. +.Pp +This policy is active if and only if the +.Xr sysctl 8 +variable +.Va security.bsd.see_jail_proc +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Sh RETURN VALUES +The +.Fn cr_canseejailproc +function returns 0 if the policy is disabled, both credentials are associated to +the same jail, or if +.Fa u1 +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . +.Sh SEE ALSO +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 +.Sh AUTHORS +This manual page was written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Thu Sep 28 15:10:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3h1f9Mz4ttxP; Thu, 28 Sep 2023 15:10: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 4RxH3h1Db2z3Xx5; Thu, 28 Sep 2023 15:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R6z1+0WVu30IM4dsoF7ReTVjJIs6mmYg9J8KQB8wgJ0=; b=u1ZCMh+BAUnSEmbYc5CEDHLZsRWKkHlgs/uNnibFGjwva+xPwc75/gHIOPhVaenWe3XWne VOsm/w/nFLpk5tSnmqH4lIkECxKX3s7phIuq2br0mQIqwkrSJldUUASVu/SBvlibcdS4eb MB67d/S7KjcHTJz/YVTQOaTRMxLSVbLJILcXgAMyh5Tv6cBLY4nPYtXcfcRC8jW0aQ+t7z WV4eG31dZEBxvPHwxGKXpTmN7Fzjry0arfppLmpVcXbmxAzCqhRyGaGMLd+XoT1tna30tl yyQnx5U0PaW91i8tGA1NP7maxviRrpZ3aZgp58KvjkfjoVJ8/iy0x1hhfF25tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913840; a=rsa-sha256; cv=none; b=QF7IitgpFPXts7tnVutVE55v1T2FcHTRmh7CrVTSZSfXUwlwO6UB1fU7q81oBg5JmIFKTm gr2d46lquhqegQt8huX5T0sxFjbkt9ehlCudW/blperSXle5Qsr8mH/+JEhMILq08M+x20 HfER8paKBrFjPHcokoHH6BNjFQG8zAXiWIxE8MlFC3vnllQ748QAd8HhJ0eNXBoWpVdK8B +vlBTnj+A0chQCnS0msSw5ccSQJZoMz5Dm0jAHWMYbYUzsH5gpssYD3FO98qojoGDcuEcu euY1+a4NCaMcv2OziJGvG7uboleBcanTSyOz4Fxh72l7REN1y5qeGeDG1QSjiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R6z1+0WVu30IM4dsoF7ReTVjJIs6mmYg9J8KQB8wgJ0=; b=Sisz15Koi1xMj6fnWYDMqd14wcxUykl0oUxkifQsEOaT47k3/na2gmxIVW/AJBtlPfVOMK /U+zjikyDZzxwCSSu07DH2RdyvasixsKkFKSVoDLktGxzMquT83jcGFyvxU3MDUFx/nXcz 5P6nxBOGoT36NhQRVJy5EV72ihEr1NMOpk507MsE5soVm6w16TqI9TvCXxf4JD4csrL63H bMzF+npK6eDdQ/cSFdDxvpOIXgBIwPBcVt1cbgyTV2Obs5uEkCx/Wna8Ib6A9av9WMG86K klrxdK84BfaG5AvP6camIVNIVIy4Z2Exz606hRG37HXwQneMWXb8QOOadvka7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3h07pfzC1K; Thu, 28 Sep 2023 15:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAd2E047378; Thu, 28 Sep 2023 15:10:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAden047375; Thu, 28 Sep 2023 15:10:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:39 GMT Message-Id: <202309281510.38SFAden047375@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: 0d6bf73c4f20 - main - cr_bsd_visible(9): New man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f commit 0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_bsd_visible(9): New man page Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40632 --- share/man/man9/Makefile | 1 + share/man/man9/cr_bsd_visible.9 | 117 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index a33c42018dbf..f07a886277e0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -68,6 +68,7 @@ MAN= accept_filter.9 \ copy.9 \ counter.9 \ cpuset.9 \ + cr_bsd_visible.9 \ cr_cansee.9 \ cr_canseejailproc.9 \ cr_canseeothergids.9 \ diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 new file mode 100644 index 000000000000..bd676e6f5705 --- /dev/null +++ b/share/man/man9/cr_bsd_visible.9 @@ -0,0 +1,117 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 August 18, 2023 +.Dt CR_BSD_VISIBLE 9 +.Os +.Sh NAME +.Nm cr_bsd_visible +.Nd determine if subjects may see entities according to BSD security policies +.Sh SYNOPSIS +.In sys/proc.h +.Ft int +.Fn cr_bsd_visible "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +This function determines if a subject with credentials +.Fa u1 +is denied seeing an object or subject associated to credentials +.Fa u2 +by the following policies and associated +.Xr sysctl 8 +knobs: +.Bl -tag -width indent +.It Va security.bsd.seeotheruids +If set to 0, subjects cannot see other subjects or objects if they are not +associated with the same real user ID. +The corresponding internal function is +.Xr cr_canseeotheruids 9 . +.It Va security.bsd.seeothergids +If set to 0, subjects cannot see other subjects or objects if they are not both +a member of at least one common group. +The corresponding internal function is +.Xr cr_canseeothergids 9 . +.It Va security.bsd.see_jail_proc +If set to 0, subjects cannot see other subjects or objects that are not +associated with the same jail as they are. +The corresponding internal function is +.Xr cr_canseejailproc 9 . +.El +.Pp +As usual, the superuser (effective user ID 0) is exempt from any of these +policies provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Pp +This function is intended to be used as a helper to implement +.Xr cr_cansee 9 +and similar functions. +.Sh RETURN VALUES +This function returns zero if a subject with credentials +.Fa u1 +may see a subject or object with credentials +.Fa u2 +by the active above-mentioned policies, or +.Er ESRCH +otherwise. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +do not have the same real user ID. +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not members of any common group +.Po +as determined by +.Xr groupmember 9 +.Pc . +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not in the same jail. +.El +.Sh SEE ALSO +.Xr cr_canseeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseejailproc 9 , +.Xr priv_check_cred 9 , +.Xr cr_cansee 9 +.Sh AUTHORS +This function and its manual page were written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Thu Sep 28 15:10:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3j2MGNz4ttk9; Thu, 28 Sep 2023 15:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3j1t15z3Xxj; Thu, 28 Sep 2023 15:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WGohu+CO03Mc360r9SpRZXd4pZj8qrTwIoi8cN79cMs=; b=tvCOFovxHx4kvprwPUgI5fjfNSPPfMlFcvOC/N9HUaNkG35t4d97wUn2CdLgKkw95HpqME fW8dI8MaKtLo3f7x4a7fw0NUj5VgQW8uDRbGmF6B+sDf0cTt633YaaiSZ/HvfHk5wDC+sR 8FoRxa44UrUdUz+41xtWaD2LJtyF8if8mcFsNI5noo318qDVa9zAXYSraLbeZYnacQsxxE MCjzBb2G3yFcWAlR+1ifq9NSEU/vav3bR/BZM9oi5uTjn0RFMD/2mDIIvYS/HTJX46vwhk huJTXQW7kEFSv3ABxXy8Wt1MvlcfUbf2pEgu7VxdAN+Fx8T41xamPU4G14KWLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913841; a=rsa-sha256; cv=none; b=dvMfinoTaeqOGiety+rEovwr+Srx6YdmFesE6uF0OiB3FshAdgri/d5JhMM+c/DWX9Xahw 5jnSKKgxUehPsigFhUYWYZPvnr1so9R2PK6U7xH7ZFUhfcCKv1JnSUH3u8vCr0yzorEeXt GeDPFUmUzg+Jlawp4WTdOwk8G7+tdKPzli4hV+nAKJjS2GsElDjK4I9qJseIebYo8smPJK 6HAgvnRYjVsHgE/u16REdDFhE4zMWmRrf1ivf1hZTb77AOb6GP0aK6o3OUSOCBvrHWtEkH 26LOqU9+F6so7W+vLMTt2bgfI7I3CG7hamYbHZiCtPdU0176vRzuudxvsDjCLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WGohu+CO03Mc360r9SpRZXd4pZj8qrTwIoi8cN79cMs=; b=vbhhO3XciN7Y03WBERlUJkpxEw5JCLUom7ZsNbgN5mz580TapAkESVNuzztEELX6pPj5Fd OJSL5ZbKMPqqkRmVaC+m4MGwu96M4303A0m2ZQjVPgxl9iqU8g9731D3N3jWlvWHheG/0S GHp8EFPbDthI9x6cVo5RmRvBBKGKNUeNRkwMyLiJeKRWc5eJ6uapK355vWYODxa6e554yn P4HTLMuYLjSBNDTJt+52EqiKGeYOPHcidGHw2soMUOsJy+aPSxmwv9jxZJMZr57Y3vOrPK PKV2VUObjHR8VYzOfGeOvOsgSpgoMmsDWre0DS7rqsAUQxgE/Mbmdb3mCtyRoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3j0whjzC1L; Thu, 28 Sep 2023 15:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAfHj047430; Thu, 28 Sep 2023 15:10:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAfAi047427; Thu, 28 Sep 2023 15:10:41 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:41 GMT Message-Id: <202309281510.38SFAfAi047427@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: 3fe9ea4d2d04 - main - cr_canseeothergids(9): Revamp, mark as internal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e commit 3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseeothergids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeotheruids(9) by ones to cr_bsd_visible(9). Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40633 --- share/man/man9/cr_canseeothergids.9 | 77 +++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index 79269533ae5c..f0c1e5c4e726 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,58 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME .Nm cr_canseeothergids -.Nd determine visibility of objects given their group memberships +.Nd determine if subjects may see entities in a disjoint group set .Sh SYNOPSIS .Ft int .Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the group IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have at least one group in common. +For this determination, the effective and supplementary group IDs are used, but +not the real group IDs, as per +.Xr groupmember 9 . .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_gids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their group membership. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if at least one of -.Fa u1 Ns 's -group IDs is present in -.Fa u2 Ns 's -group set. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_gids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_gids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeothergids +function returns 0 if the policy is disabled, the credentials share at least one +common group, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeotheruids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr groupmember 9 , +.Xr priv_check_cred 9 From nobody Thu Sep 28 15:10:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3k3Rkwz4ttqD; Thu, 28 Sep 2023 15:10: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 4RxH3k2pplz3YGh; Thu, 28 Sep 2023 15:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wng7FCZlRhx257FHklYMjtuZGTzHVoUk8yu8L5kIRzA=; b=O6qOsiQiVp3kwk3Bt3vzwOxNMgHnrsv91gWqJ9a0kHWak/Blvz7lswEo5eV3puRTQlZmp5 O09G6RRf7seLZW9Sg2XuEQxvF+NlbBJQHBe/rO5E0l3scmZT3+IwF4b4uyaegkUK6yR//L bBQHYrcPY4fqeTOuqF1tLRdlxu+LarsqGIHLheURL1t5O5yfnKvo4QBUU+P7HiwF5dzPGl DRcirY50oF5zd4e+hKA3T20rJK/IM+QxIkjGqVZHx9MlMh0MMwZlgbyktuNXJEwL/nrfS1 QW2clUlj2cua/ic6x726+l0biu+EZ2iMGreZORAubFjGSmoEzPtypIjvk1Dz5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913842; a=rsa-sha256; cv=none; b=Y6T6ydg+dcLMYxj3tJOQLg6L0vsjz6QwbYZ9MUCFZIvM81AkpagbJBcimlz9qD8LBNEra0 8PpqDRrrs4vPxRkBhcGiBDuC87fqYTRmooVmdwPQwlr4H5GYAwEGQHtpEauRV3NOkdER5F XDbLb3+6uxcWOxxGIK0gbsudcDKRwpiAvyyEahTXMlmN+uqMBeXEno0n2VKWPipWLvYZci QjlFOirjZNdIUcTo6WOvhGTV3EA6HHHHJurnJD9HWyDYj+7Ftk9hCONOevcLsfQearN0DU qpASIN8wHj5wf5Ny4zeD31rQEwUDwFQN/VFl5QV/W6wXaNMLp4ZgttjUyh3tuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wng7FCZlRhx257FHklYMjtuZGTzHVoUk8yu8L5kIRzA=; b=D4G36GYCvgY7Ps3Dg4+0sTLXzDyTssJII2nY2twjchX4mUT1aA2Q1MHhoWaayYtASjWfoL H2T3MASuNT5zcHkvJsvSJF+BuQhcUPSg4aePLEF+P859DVY8pxilibFlhMhpj8eA/BNhBu SVuMScl17GC1ftwh4RBZsE11knaFrCMX2EJJeB2S6ON6EUfedqLSoaNgYg/27iGVZbr4eo ZWzDJgn/OkPj5cvnW2EwFBkRLhKuALE6fRO7NydSzXNGW1C4jHnrlQPDDn+/p07vGqBIyf r2ZzjVEXdDpmgmAOaOCSpiVFtrztQ5oslATNXYdKTaJayajOPDrBs/+ZY5J8sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3k1XDbzBqY; Thu, 28 Sep 2023 15:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAgrA047478; Thu, 28 Sep 2023 15:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAgFF047475; Thu, 28 Sep 2023 15:10:42 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:42 GMT Message-Id: <202309281510.38SFAgFF047475@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: 75a45ca3b340 - main - groupmember(9): Detail which groups are considered, simplify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 75a45ca3b34062fe793ae326ad9da614a1a06df1 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=75a45ca3b34062fe793ae326ad9da614a1a06df1 commit 75a45ca3b34062fe793ae326ad9da614a1a06df1 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 groupmember(9): Detail which groups are considered, simplify Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40634 --- share/man/man9/groupmember.9 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index d447bf64c482..3a516622efce 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. +.\" Copyright (C) 2023 Olivier Certner .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 9, 2001 +.Dd August 18, 2023 .Dt GROUPMEMBER 9 .Os .Sh NAME .Nm groupmember -.Nd checks group set for a group ID +.Nd checks if credentials mandate some group membership .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h @@ -38,21 +39,26 @@ .Sh DESCRIPTION The .Fn groupmember -function checks to see if the given -.Fa gid -is in the group set of the credentials. +function checks if credentials +.Fa cred +indicate that the associated subject or object is a member of the group +designated by the group ID +.Fa gid . .Pp -Its arguments are: -.Bl -tag -width ".Fa cred" -.It Fa gid -The group ID to check for. -.It Fa cred -The credentials to search for the group in. -.El +Considered groups in +.Fa cred +are the effective and supplementary groups. +The real group is not taken into account. .Sh RETURN VALUES If the .Fa gid -is found, 1 is returned; otherwise, 0 is returned. +is found, 1 is returned, otherwise 0. +.Sh SEE ALSO +.Xr getgroups 2 +.Xr setgroups 2 .Sh AUTHORS -This manual page was written by -.An Chad David Aq Mt davidc@acns.ab.ca . +This manual page was initially written by +.An -nosplit +.An Chad David Aq Mt davidc@acns.ab.ca +and was revised by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Thu Sep 28 15:10:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3l5fs1z4ttkF; Thu, 28 Sep 2023 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3l3v1Sz3YKF; Thu, 28 Sep 2023 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LXkHCIcDyyIxr4Mjk5cxllfhV+WkghdbD+ZwT5xWkiY=; b=rweKlfuhJjJSXj4fZ5TJvEjM5oSWYFhUJTOL1YLXsTE5uH1VTUkHndmhkMxEIberOhwjtP 62cOOkprGTLvD53u2IWl/s6CVzVDTf77MWmwDID/wdMHJRI9XZs2qqstlc/4Oo0OkCzJx8 vjnERl4xtyid+KwsAdhH7NhNkVOEYOIK5tgXbGnXX+Zpy+cNyhiMwDFt7FuEtJw8UnpzwM P6THkKY6Zzp1TivkR+/wwM6PC6sUnMB+KAWMUOfOo3tIHh0V5B53Wj0kNlK/GLwlHW2yby U402XpCslkhQ9Ky7F3ZDZlXgvj2ssvaXVCfdxUKwyxYjbn+JtB+atxhCYxIOag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913843; a=rsa-sha256; cv=none; b=NZ9lkQQBtMpFoM9TkcwPHfJOd0ASCEfH3i/WIz4gHQAxTOTA9J0uVqVycnRSKYXZrn3cGQ aHLoSRrZ//6smlu1wfaW0hXF0tceExI5PBmeSfDplB+D919u94ajEPiSLGoDO+rt62s7IC +HMy0bkB6vbJkBqZZX/ft0BO+6YoekVpG8DnSxSVmy37pBJYzjbeC6JVFOIOdqE4sKtxFY 2ZZhY3EDg5TsdMqv9PIDqzRT8dXKFUbR4SbwmvT/md9MPjtPEpf9X9P4XeC8QoKrRp9hEh LrnRFM8GhamiOAmJQbYce+pYRujLSqDtLAXLapAXkb+B2ripl7/9k8FzUHwz1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LXkHCIcDyyIxr4Mjk5cxllfhV+WkghdbD+ZwT5xWkiY=; b=QLiCMdu3VaQIZZdA8+U/Vuk7dhyUXAeFFu7XpQlW1L8EGJvE9itrOawMo1qVDAT4ZTauNs 14bC4cQIvJgtY9aQPYlahzzvZUKFvRNRBWZHjV7S4VIaMPFoZkk4M/CKv+UMjPowe5cxn3 VwWAZ/kOO4ZBRk2VkGIEstS6qzWuRwfBrkA0sIuKZv5niPTkEfbrp1oNQxNNXhdzcsyMls GOAjLUljud5SlauqFvHfgWCZUZsc1OKyS93w4/StZbiQAvGMvEm8pCnA57k+YVLizEVjtv /faIGPU1geXIQ4t4lzcee8S6WJAX8qMfx8j8hm6r+c5YqVh5c4ZBbSlmffS8DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3l2kt2zBjr; Thu, 28 Sep 2023 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAh3m047520; Thu, 28 Sep 2023 15:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAhCw047517; Thu, 28 Sep 2023 15:10:43 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:43 GMT Message-Id: <202309281510.38SFAhCw047517@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: 4ddd253b38df - main - cr_canseeotheruids(9): Revamp, mark as internal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4ddd253b38dff8725555355cc1b5238b1bbfd380 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4ddd253b38dff8725555355cc1b5238b1bbfd380 commit 4ddd253b38dff8725555355cc1b5238b1bbfd380 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseeotheruids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeothergids(9) by ones to cr_bsd_visible(9). Reviewed by: bcr, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40635 --- share/man/man9/cr_canseeotheruids.9 | 73 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 index 80acc2d7a6ca..230c5ea59b78 100644 --- a/share/man/man9/cr_canseeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,54 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME .Nm cr_canseeotheruids -.Nd determine visibility of objects given their user credentials +.Nd determine if subjects may see entities with differing user ID .Sh SYNOPSIS .Ft int .Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have the same real user ID. .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_uids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their user IDs. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if -.Fa u1 -and -.Fa u2 -have the same real user ID. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_uids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_uids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeotheruids +function returns 0 if the policy is disabled, both credentials have the same +real user ID, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 From nobody Thu Sep 28 15:10:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3m5BzQz4tts4; Thu, 28 Sep 2023 15:10: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 4RxH3m4Rp3z3YBF; Thu, 28 Sep 2023 15:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nMbqgc9PkQuFVmCO1f7k89B+9QWg1ExSNPo5jm8AOyo=; b=SkvsEodDaGbXFpr0ZQ+WLbMhSuomAgW7dSv5D2u5HDR8T7TfJzoxRFzI0rA0BCCpMWsSjM lASgHdfr9cZPeHLI2bXS8yviXp89KSdOpb2xPrqh8czOsXggNfyF4n0VaRN8o69eq9E48w 9+yeKuy7N0TV8xFIplUV67Hhc2tlzNRjzE/7d3nir3gIKg4lq0Ep//3v16KKmS9z2Kjw8D 4TiemHIFo8kvBj8pfbHS8yJd3C7H/m5DavexhYTlgrrug24rvaQUc3jmmKSL7qTdiurSQZ 67w7U6ZY8TkmhuJYaMINXH5DWvrDrWEEemv38EeLBj6tf5v6LwFVRjeFU7fJxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913844; a=rsa-sha256; cv=none; b=kyDswCrH5jvkN12qkbHJHJ8jfPVkSAkLwOeyB3fLrPXaE0CeNjcABzb/Sfn2Enzqfji4tl pLS716mBA/wS6lvrSBLAYQqpm1weeL1prZ+f1Ws3c4fQA68Jw4Szpg3jxVG5tCpL1gD88n v4BQgUgrw/JGG60wRC+src4m9q84+gw0i20dAR8sBXxvVKfhg2AA9YIjtjh1gbSY/F6Byo KW2jBOVuQkUzsyWn17m8g3Sa0YnWbRKLwCcEVoZo7CViVjOiqGz1j524fn4OgNeFig2caA ivcdCFyDKz3+7hHYemCSASgbPPZzdVWwfdVVZQiBlfaJHuNNS4iBNS2gAGRdgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nMbqgc9PkQuFVmCO1f7k89B+9QWg1ExSNPo5jm8AOyo=; b=p62nObPz6aL8uWS2vnYfbhuNmfs2K8Ark9n5CIGpTI3rw5DQttCb7axrUMqY98Dh5kM1I7 /Nn4NTQ97RvhjHISPKNzTVZ8NnaPEKzJvdFKQEN3384CZ/RCrc9Q7IkAWTTSzzaVfQL076 mMRHkNLnbAT3EVqPc85Q0cUFu6RvZSaCuYjoVuORWJwFpUrsoeDd92x6q/2r++Cj1K4rkn UizzfCXXxHgEHvz7Pbq02Qmlf0wtErkSRymS8Ygt4GiS6NmAZiXYRSOjhQwV/Shc6+axLw 91cZG+hBs8ADRVKFDYeN6kOsqpS1cpcM/FY7yVgQNTszdf/Xqlo8pMEONtRz1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3m3Y4PzC4m; Thu, 28 Sep 2023 15:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAiiC047559; Thu, 28 Sep 2023 15:10:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAi5E047556; Thu, 28 Sep 2023 15:10:44 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:44 GMT Message-Id: <202309281510.38SFAi5E047556@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: 82f9bc9ea8ed - main - cr_cansee(9): cr_bsd_visible() impacts, simplifications List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 82f9bc9ea8ed660c61050ad1d92f1a64108c7004 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=82f9bc9ea8ed660c61050ad1d92f1a64108c7004 commit 82f9bc9ea8ed660c61050ad1d92f1a64108c7004 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 cr_cansee(9): cr_bsd_visible() impacts, simplifications Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9). Defer to cr_bsd_visible() for controlling sysctl(8) variables. Reviewed by: bcr, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40636 --- share/man/man9/cr_cansee.9 | 61 ++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 4824a231170b..d5cdfdd6f8e5 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2006 Ceri Davies +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -23,43 +24,39 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt CR_CANSEE 9 .Os .Sh NAME .Nm cr_cansee .Nd "determine visibility of objects given their user credentials" .Sh SYNOPSIS -.In sys/param.h -.In sys/systm.h -.In sys/ucred.h +.In sys/proc.h .Ft int .Fn cr_cansee "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs and group IDs in the credentials +This function determines if a subject with credential .Fa u1 -and -.Fa u2 -associated with them. +can see a subject or object associated to credential +.Fa u2 . .Pp -The visibility of objects is influenced by the +Specific types of subjects may need to submit to additional or different +restrictions. +As an example, for processes, see +.Xr p_cansee 9 , +which calls this function. +.Pp +The implementation relies on +.Xr cr_bsd_visible 9 +and consequently the .Xr sysctl 8 -variables -.Va security.bsd.see_other_gids -and -.Va security.bsd.see_other_uids , -as per the description in -.Xr cr_canseeothergids 9 -and -.Xr cr_canseeotheruids 9 -respectively. +variables referenced in its manual page influence the result. .Sh RETURN VALUES -This function returns zero if the object with credential +This function returns zero if the subject with credential .Fa u1 can .Dq see -the object with credential +the subject or object with credential .Fa u2 , or .Er ESRCH @@ -67,24 +64,20 @@ otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -The object with credential -.Fa u1 -cannot -.Dq see -the object with credential -.Fa u2 . -.It Bq Er ESRCH -The object with credential +The subject with credential .Fa u1 -has been jailed and the object with credential +has been jailed and the subject or object with credential .Fa u2 -does not belong to the same jail as -.Fa u1 . +does not belong to the same jail or one of its sub-jails, as determined by +.Xr prison_check 9 . .It Bq Er ESRCH The MAC subsystem denied visibility. +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .El .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , +.Xr cr_bsd_visible 9 , .Xr p_cansee 9 From nobody Thu Sep 28 15:10:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3n6PjSz4ttvm; Thu, 28 Sep 2023 15:10: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 4RxH3n5p76z3Y41; Thu, 28 Sep 2023 15:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtfE3527S7k9dnQ5t7JWD6+mffgJWcNnuNWzlL1Nbes=; b=Qbf4JSaSvdoITe/PEwHRbau2MRXq+pWoME0zBUzuCTY3Ww4osHJD4GcecjM2fg1mM8tZi5 hszoWavuYtDy4Zs3FqgBzRCaGmniEvewAUqhXV0eyAcjPWTKzjrpF5EVhhoG3Ks95M3mZI kmH7S3Tf1sDBMyTaBaBGKMF2GP5sBtUKtUgLK2oIN8kgFnBUrpwMInXfVxFuBbl67v31jW Kf23x8pIUl18WF3LU3Zmheb8sBbcsYm+dLKgHCGIpZLUh9iuiM0vDZBTktQZa0DqhsY2IF CqfPUPiZxHE5PEHyKhkae8mQ9o5DIsNPC3sNe8oIIej6e1oCutWs+Yo0BbksNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913845; a=rsa-sha256; cv=none; b=T2VMzeamH2wegs2kYQQRD5mIIXvOPUtK+MJg9OTOjQiNRgkNnVu4EY+ZCVmNCptcy4i66s wrxCngdYrgHoKkobm3LJ3217SlsTPZDihQeuZWqv51gajPKMQ5FEOiaL4NsL2h2WIoVwRD kdin69/L27YNED5rAPQICNqxQkf2w4kIVYOaP5k9JZibpQPzL5hUf0rljKCiE4mJ9jByuZ SFR15m6lBMNm9cbEJNkfcjyeBa1GuPHksrN7GB4j3kkbDddKDgPw24OA2gLtOSwcz0W3I8 18J1LF18UgiGWwZUqFvivUZwfSyy5qioei2G9xWMI8ZkRNZIChRiNqxryoH79g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtfE3527S7k9dnQ5t7JWD6+mffgJWcNnuNWzlL1Nbes=; b=vyl5GogEC6f0jEezG6hj4qflvugAkMSKQuFpyj4AFqk7pvi56L87Xc/7vtOCAlLh674aum DZ9bWXlw+Viu7kPH22/ieCAbR8WFRr1utwMrBi5ZpeS+zSuhOxPoeP5TPtnvwC/2z4lZxq Q33EEZs7XZAcN1DJjIWhTOPUipu6dXLNrnVlQwjCEN6jk/Hyp8W761BV6UH4ON2TpIgz+I vhpl0h6/D3+mUi+SYaAZ0T1rAIXPxCLzMSUW48QlYKzm6/j7PdF6N3SFqAMLFBm3+g34Xj OAnpr/F9jCljSnmORppMCvaCmWr5aW60ijglwzI4uuotBrnzGZ0NWZxwdcdo3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3n4Ws8zBjx; Thu, 28 Sep 2023 15:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAj2W047605; Thu, 28 Sep 2023 15:10:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAja9047602; Thu, 28 Sep 2023 15:10:45 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:45 GMT Message-Id: <202309281510.38SFAja9047602@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: 2ede38aff5d4 - main - p_cansee(9): Bring up-to-date, misc fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2ede38aff5d4c91a17ab6d093f2e8cce24b5418b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2ede38aff5d4c91a17ab6d093f2e8cce24b5418b commit 2ede38aff5d4c91a17ab6d093f2e8cce24b5418b Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 p_cansee(9): Bring up-to-date, misc fixes Essentially defer to cr_cansee(9), except for the specifics. Be more specific on the return codes. Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40637 --- share/man/man9/p_cansee.9 | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/share/man/man9/p_cansee.9 b/share/man/man9/p_cansee.9 index 84287dac951b..9fdce460dfea 100644 --- a/share/man/man9/p_cansee.9 +++ b/share/man/man9/p_cansee.9 @@ -24,19 +24,18 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt P_CANSEE 9 .Os .Sh NAME .Nm p_cansee .Nd determine visibility of a process .Sh SYNOPSIS -.In sys/param.h .In sys/proc.h .Ft int .Fn p_cansee "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p is visible to the thread .Fa td , @@ -45,13 +44,14 @@ where the notion of may be read as .Dq "awareness of existence" . .Pp -The function is implemented using -.Xr cr_cansee 9 , -and the dependencies on -.Xr sysctl 8 -variables documented in the -.Xr cr_cansee 9 -manual page apply. +This function explicitly allows a thread to always see its own process, +even with pending credentials changes +.Po +see +.Xr ucred 9 +.Pc . +Otherwise, it simply defers to +.Xr cr_cansee 9 . .Sh RETURN VALUES The .Fn p_cansee @@ -62,30 +62,18 @@ if the process denoted by .Fa p is visible by thread .Fa td , -or a non-zero error return value otherwise. +or ESRCH otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -Process -.Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_cansee 9 . -.It Bq Er ESRCH Thread .Fa td -has been jailed and process +is not part of process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied visibility. +and cannot see it as determined by +.Xr cr_cansee 9 . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , +.Xr ucred 9 , .Xr cr_cansee 9 , -.Xr mac 9 , -.Xr p_candebug 9 , -.Xr prison_check 9 +.Xr p_candebug 9 From nobody Thu Sep 28 15:10:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3p6jpRz4tts8; Thu, 28 Sep 2023 15:10: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 4RxH3p6DhJz3YBv; Thu, 28 Sep 2023 15:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i+ak0VARHmp/UrMMk7rOnk5I9iZl23+DQkWhUtqR2jA=; b=P9RlXTD8c5Leg2SIMrZ3auxSfzSg+8D3g5VaSvMIXMAOCqI63xIVAd6thT2xLSmr5u/zzc 2xzgBSeEDerUlx3IMiSPAZixiymPpG5bqMtjMuxJd3pjikvZCYBfTCHbpNUExkSfNuEUzg Mbt1nUBKUE8HTI7rvBTgC3CrH5lXKywMSAAtTSoqLmwbhG2rpeM+dhK9DRzyt23mCaLqRb 2zctMz1rphWOHCLXhEwUyNWdeLeWSf3Hq/lQIyss9MmPt08XcLpbk2dvdKAWEE3sTQPecb F0CQIekNK0KlDxSHh3U6Pgq1Wh9K9jFwK/ilYo4bMQKcSwL1jocHDHstZfmjtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913846; a=rsa-sha256; cv=none; b=cYZ6tVXL8DkK+XWOYAqplrbkTfzSgWMsgpk9rPUZ55tMtTMQP6DXfSuesfeoqby57INF7V vZrMd276IHWr3f0Vbb0dJ9Lspy1FOApPeJmzpEoaWU48HK0/YhqENU9uDDBflRwpDUtfpL 50El+aOkvfBRxkAlnLZ3UbUWg+mt6E7edVNH7CcuudhnNeEhUU10AHEy9Fj1q6fX4xflYn ab69QV7vkMJh+D1kC8zkPCyY13/PxSCWl24oq08oV53qn306GGjKGtk3bbKDIfINXp8OzG rJRhJb/zqfIcWywCWCVcZmYoREgfwVDwFKNl35ms5d7B3GuVOJE/JURF+/8nNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i+ak0VARHmp/UrMMk7rOnk5I9iZl23+DQkWhUtqR2jA=; b=J+49b0RkSEJbT46j1N7vTIVqlrIOUMgoUCIFy+SFnCTKT07BK3F8lYIPXDOT7O0peihm52 2Pijnnert50lSbvx36FR8V/ECYpRO0D1MvGqTl6dqC3XwKc6Q2N/qB5ozVnr41T8p4C1UP KB4Xi4K1+t9poRqxNnxG3WXjsUTK1qcYqlx9Aj/GXLQAyw6Tt5vJzbB46rmY0/GeoHHzh1 APXbNc3W/UQwAIRTsg0peglG3X0E4TGmB+TFealID7o0WLWfOM/IN7vLavDW6FAyzozlAd SXwe5lvwJKUhQoF7UDqdqF2o3gwvA5HlImNctVZNj6dOWij7OJSSbyrFHfmXlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3p5KSyzBqf; Thu, 28 Sep 2023 15:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAkfc047647; Thu, 28 Sep 2023 15:10:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAk9B047644; Thu, 28 Sep 2023 15:10:46 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:46 GMT Message-Id: <202309281510.38SFAk9B047644@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: eb94f24fab4b - main - p_candebug(9): cr_bsd_visible() impacts, misc fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: eb94f24fab4b44f13ca045370d9fcf12ca8835f2 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=eb94f24fab4b44f13ca045370d9fcf12ca8835f2 commit eb94f24fab4b44f13ca045370d9fcf12ca8835f2 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 p_candebug(9): cr_bsd_visible() impacts, misc fixes Mention cr_bsd_visible(9). Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9), as well as indirect references not immediately useful. Fix description of credentials checks to match reality. Re-order errors to match code's check order. Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40638 --- share/man/man9/p_candebug.9 | 103 ++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index e80d313de55c..c824db974154 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 19, 2006 +.Dd August 18, 2023 .Dt P_CANDEBUG 9 .Os .Sh NAME @@ -37,24 +38,27 @@ .Ft int .Fn p_candebug "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p -is debuggable by the thread +is debuggable by some thread .Fa td . -.Sh SYSCTL VARIABLES +.Pp The following .Xr sysctl 8 variables directly influence the behaviour of .Fn p_candebug : .Bl -tag -width indent +.It Va security.bsd.unprivileged_proc_debug +Must be set to a non-zero value to allow unprivileged processes +access to the kernel's debug facilities. .It Va kern.securelevel Debugging of the init process is not allowed if this variable is .Li 1 or greater. -.It Va security.bsd.unprivileged_proc_debug -Must be set to a non-zero value to allow unprivileged processes -access to the kernel's debug facilities. .El +.Pp +Other such variables indirectly influence it; see +.Xr cr_bsd_visible 9 . .Sh RETURN VALUES The .Fn p_candebug @@ -68,35 +72,45 @@ is debuggable by thread or a non-zero error return value otherwise. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EACCESS -The MAC subsystem denied debuggability. -.It Bq Er EAGAIN -Process -.Fa p -is in the process of being -.Fn exec Ns 'ed. .It Bq Er EPERM +An unprivileged process attempted to debug another process but the system is +configured to deny it +.Po +see +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_proc_debug +above +.Pc . +.It Bq Er ESRCH Thread .Fa td -lacks super-user credentials and process -.Fa p -is executing a set-user-ID or set-group-ID executable. +has been jailed and the process to debug does not belong to the same jail or one +of its sub-jails, as determined by +.Xr prison_check 9 . +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process +lacks superuser credentials and its (effective) group set is not a superset of +process .Fa p Ns 's -group set is not a subset of -.Fa td Ns 's -effective group set. +whole group set +.Pq "including real, effective and saved group IDs" . .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process -.Fa p Ns 's -user IDs do not match thread -.Fa td Ns 's -effective user ID. +lacks superuser credentials and its (effective) user ID does not match all user +IDs of process +.Fa p . +.It Bq Er EPERM +Thread +.Fa td +lacks superuser credentials and process +.Fa p +is executing a set-user-ID or set-group-ID executable. .It Bq Er EPERM Process .Fa p @@ -107,30 +121,25 @@ and the variable .Va kern.securelevel is greater than zero. -.It Bq Er ESRCH +.It Bq Er EBUSY Process .Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_canseeotheruids 9 -or -.Xr cr_canseeothergids 9 . -.It Bq Er ESRCH -Thread -.Fa td -has been jailed and process +is in the process of being +.Fn exec Ns 'ed. +.It Bq Er EPERM +Process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied debuggability. +denied debuggability +.Po +see +.Xr procctl 2 , +command +.Dv PROC_TRACE_CTL +.Pc . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , -.Xr p_cansee 9 , -.Xr prison_check 9 +.Xr cr_bsd_visible 9 , +.Xr procctl 2 , +.Xr p_cansee 9 From nobody Thu Sep 28 15:10:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3r2C0Lz4tts9; Thu, 28 Sep 2023 15:10: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 4RxH3r00jpz3YQ8; Thu, 28 Sep 2023 15:10:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COlhE/v1yalMdSCmj8/ZYl6nI7qndhCjifhjIWf4dTI=; b=FZwl6J/lcAF2Sy3NJSqISqZqJAF5L3OVT9De2Vz5f3yarFHC7oAVmg4FpWZo/s2zeHBsQZ tIACCW3LTlnGwu6++stwxj1dsQmths96ORr+qyJ/3wcjbprAV6miEeQ13tOJQ+xqhn3D0J LlNnXRzkFR9ySkR+SKc9uO+mp1YKcpNQ2o445uwBELbZZ9yH3TCF6WFIPWFljNotkU8sst 6LHEAQlgsN62HX3vaTT/egOAtk2+aBuG5gcIUXztMSUriv7tf1XEGx2RWzKNMvuZm6AoYQ 9t+kahb6X+rZjVlshE9/Z1++tr9kLnYRwrGCEh887Q/MiB9Rw7OvgxH9cIBVrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913848; a=rsa-sha256; cv=none; b=QdedqQcJ/XLza1mcVO+VIhecoXkiYpyV2XgOIr0nHXQSX1mBsZZ9dVQ21ZO94HWNQZklS+ wbKnkIvkZBHEIMGH6PSS8AWM6ia2kzavR2xV80RBv/NRw4Asa7eTlXCQ21/BO65So1XGng w6tl3p2YfE/UmdCPr3zff1imUkwzqA8V72ECgkX/Tl6GNe4/YZZfFpALBz34Ulf7km33Yj iGQorJCjWhJ2Z4LzHEZnyFL9sdd/i9eXjCLjTB/BXknI/Bb3SAMur8Sjjvw7Ogr4ODIDOn gx1MyPILUKVIvS+PfksSAcVoEBu3Kw8COUhrM4UB58pCJsqc67dnF4F1E30RSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COlhE/v1yalMdSCmj8/ZYl6nI7qndhCjifhjIWf4dTI=; b=x6u/QB3pf+dxE/sIqsw2Iou/bVqtmzwyx++Q9d8hH/BLUMK5Yljmgg7FXkEI98VC5eR3Yq vjyYSDUsmYMY9N7vjzWRebkQQdcb2xMlQ3P8Mubk1QFN7PoZxA7qswKSti/Lnwfz93JyGx 6UVAMHOls3kBlw0WmvTSvUi4zVbXEAoud6c530tQ8LrqXBKaPKn8SQoXyr20KraD5zRmPe fs5UxvXKtxp0gN16QoAwNKRdBMLGw5B0DkZVU1bWfd8TDQS8KaVxc1NwihM75FqXcCV4xZ 5ASf+pU2I0Z8zrKJd9agx9lRbpc8YbSLePZ9XlR9U1ENCuX1X1PMUL+KhEqjuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3q6CfrzC6M; Thu, 28 Sep 2023 15:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAlp7047692; Thu, 28 Sep 2023 15:10:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAlAn047689; Thu, 28 Sep 2023 15:10:47 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:47 GMT Message-Id: <202309281510.38SFAlAn047689@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: e9fdd494537c - main - prison_check(9): Bring up-to-date with hierarchical jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e9fdd494537ca45b14e0917e8bb1595b6460f3a3 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e9fdd494537ca45b14e0917e8bb1595b6460f3a3 commit e9fdd494537ca45b14e0917e8bb1595b6460f3a3 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 prison_check(9): Bring up-to-date with hierarchical jails Reviewed by: bcr, emaste, pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40639 --- share/man/man9/prison_check.9 | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/share/man/man9/prison_check.9 b/share/man/man9/prison_check.9 index b3bdcf6b4571..7f174e3ceb2e 100644 --- a/share/man/man9/prison_check.9 +++ b/share/man/man9/prison_check.9 @@ -25,22 +25,23 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 11, 2003 +.Dd August 18, 2023 .Dt PRISON_CHECK 9 .Os .Sh NAME .Nm prison_check -.Nd determine if two credentials belong to the same jail +.Nd determine if subjects may see entities according to jail restrictions .Sh SYNOPSIS .In sys/jail.h .Ft int .Fn prison_check "struct ucred *cred1" "struct ucred *cred2" .Sh DESCRIPTION -This function can be used to determine if the two credentials +This function determines if a subject with credentials .Fa cred1 -and +is denied access to subjects or objects with credentials .Fa cred2 -belong to the same jail. +according to the policy that a subject can see subjects or objects in its own +jail or any sub-jail of it. .Sh RETURN VALUES The .Fn prison_check @@ -48,12 +49,9 @@ function returns .Er ESRCH if -.Fa cred1 -has been jailed, and -.Fa cred1 -and .Fa cred2 -do not belong to the same jail. +is not in the same jail or a sub-jail of that of +.Fa cred1 . In all other cases, .Fn prison_check returns zero. From nobody Thu Sep 28 15:10:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3s3bCYz4ttxt; Thu, 28 Sep 2023 15:10: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 4RxH3s2sPHz3YQQ; Thu, 28 Sep 2023 15:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoeaAgMO5FpiD7mNHi8KRvf75XyPl4xuLwPx1JXy7Ms=; b=S/8QIGzDTDZaBq/t9PdwvGMr7PmyGNA3gGjFjks5c+I07scozh3+BejSi44ewJBldh8H+t 9as7oUfd4H+RmTEBKtNnZWR/6aWaWhkSDXNFMAaaOdKRN1GPD7zR0SpSsP75t5BLESBFLW WC9om4ZkSpGCdfwYw5feE1FGoFRItsuf76geB1LN59YYdZAV/XNQ+LNhAwM+CXHYqYqCKM H/3cco5ApLhVcSU2ZdhWTp6A7OBMjHCUhKLCRtndzp3psPEJSMkRmrzUKN3wnc8wGiJdqZ r1pdsshtRL8yCeQC8pa121/2cT0Od2E2AdQZcxipBZmfTPGfYCZsWscQmaRIog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913849; a=rsa-sha256; cv=none; b=gmaOfcTv0NLr6aLGxusxfbHJv+srVCgGKBHByRNrGrabg2VQvRTw6ll6/pnZU/V4pozujO YG37cX2iv9EC7NSbxPsixaysCihdJwAe8x82Aj9ee6Z0uNKjQos2h8/R5fTzZwYkJH3VK+ pCesw1qGbziovSgceFFK3Evgj0VvKKyvKwW8iZkEIRIuHSWRRF/TiDe8q9E1HLe4ywMYKG W6+fbWvEA9Zf9+gcfX5pSrr2biyiIbTuslmAWLZtcKbcUvQ/Iknz0BGOxPDjfdjcjpla2V qthRav8V7qpPRF9JOSCpz5syJrmXoEgBytGpdv9FPi7tHVInjD6iaGtFVFFN6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoeaAgMO5FpiD7mNHi8KRvf75XyPl4xuLwPx1JXy7Ms=; b=gr/AygbL09k5ZR7WXgyKMiU3lsQladlCOx8Ax//O+xf3pgvJ+rnC2WXqT6a9A/EwPiltj8 8AXL170mdiG0POIz6mSraXMSKFjqn2Phb9q1sxus/LzsH9QK5EsdKx7Jx18+OQoikuZoVR OXrrZHZa72lYJPzw6SzSNRxYGaCC82Tw8gJF5cpTFm54aqWsuWkrp1onrfslcteRHjF4CA jFl/LArwNIsV0ZYZNsHYwN2A4LxF1GxBm6xoneE3fEGqj8FOSGlXDGPbu/bZDOBNJlXjPx REsFDLb/6M3NrV+Pa4Ht3Zk47iSgbQem1BGOWZ9dUDcluReKZPt3w7FN95SbXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3s1dVbzBXd; Thu, 28 Sep 2023 15:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAmo3047755; Thu, 28 Sep 2023 15:10:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAm0q047752; Thu, 28 Sep 2023 15:10:48 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:48 GMT Message-Id: <202309281510.38SFAm0q047752@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: b725f232f3b0 - main - groupmember(): Extract the supplementary group search in a separate function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b725f232f3b09b4bcbc426854fe1545234c66965 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b725f232f3b09b4bcbc426854fe1545234c66965 commit b725f232f3b09b4bcbc426854fe1545234c66965 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 groupmember(): Extract the supplementary group search in a separate function This is in preparation for the introduction of the new realgroupmember() function, which does the same search into supplementary groups as groupmember(). Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40640 --- sys/kern/kern_prot.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 04aaebf0de63..cbaeb1a50814 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1277,36 +1277,43 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) } /* - * Check if gid is a member of the group set. + * Returns whether gid designates a supplementary group in cred. */ -int -groupmember(gid_t gid, struct ucred *cred) +static int +supplementary_group_member(gid_t gid, struct ucred *cred) { - int l; - int h; - int m; - - if (cred->cr_groups[0] == gid) - return(1); + int l, h, m; /* - * If gid was not our primary group, perform a binary search - * of the supplemental groups. This is possible because we - * sort the groups in crsetgroups(). + * Perform a binary search of the supplemental groups. This is possible + * because we sort the groups in crsetgroups(). */ l = 1; h = cred->cr_ngroups; + while (l < h) { - m = l + ((h - l) / 2); + m = l + (h - l) / 2; if (cred->cr_groups[m] < gid) - l = m + 1; + l = m + 1; else - h = m; + h = m; } - if ((l < cred->cr_ngroups) && (cred->cr_groups[l] == gid)) + + return (l < cred->cr_ngroups && cred->cr_groups[l] == gid); +} + +/* + * Check if gid is a member of the (effective) group set (i.e., effective and + * supplementary groups). + */ +int +groupmember(gid_t gid, struct ucred *cred) +{ + + if (cred->cr_groups[0] == gid) return (1); - return (0); + return (supplementary_group_member(gid, cred)); } /* From nobody Thu Sep 28 15:10:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3t3jRxz4tv1x; Thu, 28 Sep 2023 15:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3t2YgWz3YcD; Thu, 28 Sep 2023 15:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA+A5ClCaqMbd435ulrTxeYBPqAikLumD6iFCsfPnEs=; b=vullueJjRZb8KXjRAbc4dp8Qh5qUo3hnYHfgBnGAqjDBwfxOiXBVmCAtgN9UpH3aOan4T4 N4Y+CI6wZIivopWDPmj2CuPUGow2ZnmaiyRq3CDBQ9haawhALcbH+xOdWjyrozj0PnD51M kMyQMIpIzSl3FNQl0rBE683LGWDnTjNbAKjYf32bhLu6sJ3u5fpEgDBbJomVa1NI03sfqk hwksV6K0jewKFf5i14pSG+HSi5dfpDc7fTUK1miKMv5blHcP0AfHkd1W6KRx2ghAT8dMzf 6RbfUWEqObQsWbwoejwYhC9PUkjNycAXlWlNkhfefeeb0n4uxN0uzD+RFpF8/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913850; a=rsa-sha256; cv=none; b=cNFJeltPIZ4ueeEDWnQQDt8FpNKmQrAH7x+uDijqRMdzLnsM3Ix0UobM0y5pITD518/mGo 38n/zBG5xWXl+qSja5hmyihCHkGnC2wv4ipMbhvMcdfjtLrDZ1+7nv3XSw5ZcQbNIGyu1m XRq/eLAljMEX/Z08PRVd2bhLnJZwQQ8aWAGH+8eR+Jg5YRlGAN8Ts4MAyNinRmhUp0zdFf T78h9fRG2A1nDZtUqMYuxMqujxJWIt0+j7B/O474gaE0qstso8MN6NFJ7Ykmdy4TVGcA5+ wlzpdiGJqGhSoDY93XolVYt/WQLnlR5Jm+sqXOlJjP9M2wuomMRrkowMzfEpzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA+A5ClCaqMbd435ulrTxeYBPqAikLumD6iFCsfPnEs=; b=WiVW11z+dztmlifPyeev4jSa1gVNy2tgsdSch2DgqHw66A4ovGHL7c5ze5NqoCfTr0Ve9y ZSnliMbB3THYeN2GsZomC6hYZgPtovjAtJwM/Wfu8/RuSyJq/W5+6/79vk369UaAen9yMR zm+WClfWUvSoLuOIuT/Sx3xbIOoRrJpgAMrNDY32dPlN1azovKxdsPo6b1zi48FkNgR/oZ oiDa9+Mw0QWe4Vl/iRs9j11i295JecXiLp7AFTihLNLPIQnXDrOVuXgxFTslmn2zI6qXW4 ZaM5jhwt0taUXI5wqP2OMSZwU34hIyd+U5Ip2jEiIe4hL8Or1z5o2IbGpKMzCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3t17pVzC6P; Thu, 28 Sep 2023 15:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAob8047788; Thu, 28 Sep 2023 15:10:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAoEA047785; Thu, 28 Sep 2023 15:10:50 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:50 GMT Message-Id: <202309281510.38SFAoEA047785@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: 2a2bfa6ad92e - main - New realgroupmember() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559 commit 2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 New realgroupmember() Like groupmember(), but taking into account the real group instead of the effective group. Leverages the new supplementary_group_member() function. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40641 --- sys/kern/kern_prot.c | 13 +++++++++++++ sys/sys/ucred.h | 1 + 2 files changed, 14 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index cbaeb1a50814..b62a5e9ee20b 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1316,6 +1316,19 @@ groupmember(gid_t gid, struct ucred *cred) return (supplementary_group_member(gid, cred)); } +/* + * Check if gid is a member of the real group set (i.e., real and supplementary + * groups). + */ +int +realgroupmember(gid_t gid, struct ucred *cred) +{ + if (gid == cred->cr_rgid) + return (1); + + return (supplementary_group_member(gid, cred)); +} + /* * Test the active securelevel against a given level. securelevel_gt() * implements (securelevel > level). securelevel_ge() implements diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index eb92776c158a..633bf436fcd4 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -159,6 +159,7 @@ void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); int groupmember(gid_t gid, struct ucred *cred); +int realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Thu Sep 28 15:10:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3v3Xwlz4tty0; Thu, 28 Sep 2023 15:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3v329Jz3YjW; Thu, 28 Sep 2023 15:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29SYkhbCTDDk/huSLbQsy6pYKT3innbxm+icDtnrNU=; b=nLDJJt3ID7rZ9Q0ZhtczynZySLKNNaMoT+eqK5W83Tx0n8suDeeI0ATr4RWldGTy0XRf0N WhsP8n9Rh3D9Rt9x5n2Rmjc7izwqcjvGr3aHMr2/XKKI3dS+WCK3ACqcfh3TxWDRhCZZHO uGJKEWgoLOjhDfPj5vFhImFvDo9H85EJUkpISeYZkRPsXZ8bWQmZ7NkmXqItEp/+OPLYwg bwFaUnxbeKMB5iYUBcnkC8KqPTrmzF6vJ7BGAP+D5G1oDOmpKQ/y7Hr2zido3rI7OKCd0u 5ZkVrZuGA7Koz4/5D65o3HuSmyTOll7mPOi9gzgS/yQkKYxk3xJpvgoPZcyW+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913851; a=rsa-sha256; cv=none; b=Rv0rH1mwL810zEX2VQqjRnZSL/y1Bx8LfcNa+YJ+Kd/yI1/2hZHo22PHpQ4YYY+kSHJlhq JghwCtUsow1Nn1CjLHLBskKulkgC0ehlC+kv/4sDtyTpTytz/j98zhkap3ZOMZX0HChUKO yz4WnS39nYthEQ/AoSxh6pDtZHeOvEyvs4vl8EGaotTRBG5wCaoasSRqLfgYWEr+P8kWOI +kE1+vedczXVXHWzTci6xywER8dZtprIq3Ux4p+cFAkbAbcxaHZXiPi4uJOXxTTxoibSNr M6JTZU07GQPLELgScnDPbj6kXJM+PppMDrnhsakI9mlFtRI5tB0NWvnO+QT8Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29SYkhbCTDDk/huSLbQsy6pYKT3innbxm+icDtnrNU=; b=lJOobfB5+UoNErT8BAX6HwUa7vx8DQFJm8FewPPucE7za484QEHd3D3EvPJXcW//blTvtC Yw+PFWkaboAVp+EUoBzquiDzX+5bbZExatGNWQGPg8De/c68A/eWGwBy2HO7cx35b9zajv 9+1g9wi4nh1uVxuz6D1T2imfDzFwuX54CcV/LyAZS9pIjsKcDD9IVV3we0SOHEOTWGEGxO rLZTOes8XXLdbUhlDeWqyofVSPrn9uHSVBdYcDUshKjogncBebtJdboyNPt/gtkfMj9E1l z6HDCNekeDn7FkiSZ6vDnYVi/w4eukzUq8PZsIxIfT+mH3a9j/sWnQJ9AdcOfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3v25lxzBk0; Thu, 28 Sep 2023 15:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFApj1047841; Thu, 28 Sep 2023 15:10:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAp4u047838; Thu, 28 Sep 2023 15:10:51 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:51 GMT Message-Id: <202309281510.38SFAp4u047838@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: 91658080f1a5 - main - cr_canseeothergids(): Use real instead of effective group membership List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 91658080f1a598ddda03943a783c9a941199f7d2 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=91658080f1a598ddda03943a783c9a941199f7d2 commit 91658080f1a598ddda03943a783c9a941199f7d2 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 cr_canseeothergids(): Use real instead of effective group membership Using the effective group and not the real one when testing membership has the consequence that unprivileged processes cannot see setuid commands they launch until these have relinquished their privileges. This is also in contradiction with how the similar cr_canseeotheruids() works, i.e., by taking into account real user IDs. Fix this by substituting groupmember() with realgroupmember(). While here, simplify the code. PR: 272093 Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40642 --- sys/kern/kern_prot.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index b62a5e9ee20b..0f15771fb00d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1408,21 +1408,18 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, static int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { - int i, match; - if (!see_other_gids) { - match = 0; - for (i = 0; i < u1->cr_ngroups; i++) { - if (groupmember(u1->cr_groups[i], u2)) - match = 1; - if (match) - break; - } - if (!match) { - if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) - return (ESRCH); - } + if (realgroupmember(u1->cr_rgid, u2)) + return (0); + + for (int i = 1; i < u1->cr_ngroups; i++) + if (realgroupmember(u1->cr_groups[i], u2)) + return (0); + + if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) + return (ESRCH); } + return (0); } From nobody Thu Sep 28 15:10:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3x11Ybz4tty5; Thu, 28 Sep 2023 15:10: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 4RxH3w4GxFz3Yls; Thu, 28 Sep 2023 15:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHU+jE8PD49z8rIvlQoz6hAWS4/vNJA8zQVIzOcdAyg=; b=BtMSQ7Q0ebfoY16i+M5pVDKTlZ7oiGUVCeS/r6upZ15U0EJoUslDqovj/QrycRVQVr58/P Ffr4LPGOp4n9qCaSgA5GuhJyj8ItKZvM+0dxw7n6h4oGAxsF81uKckHjlDZe1n4z0fp5NN yNk+zUXt61PjenhKp2vy3UznhZlFnPkXFIQ5IYR5dH3gTS1eIE5lJvOmhI72Kd8XUhgoxj 9XYawQIesgcavNs8fu8PcgWD8UerGFSKpg8hBokWNDNdSl3lu2HtzqUQV5nS7aBTPGpm0w mMQqBe3mRozXwjWcVHSGwFBtFURp4SUyaY3Z68YhLzE5uDjX0aoIbTfEuDM/vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913852; a=rsa-sha256; cv=none; b=oFBZgo89fL4K18+tLMChErlaTa19o9jnSFUxvmwev1PPePObPi6LD3d5lgWtcozz3FJH0N n7+S/ikRfz2+CFUmcGrbrnG59NA8iChv7tw0yVb0N2G7LkC2WhuCALvF2E52i2Y9vSy/17 z1aAsAE6FjEpeTIGz1lWAYx4WTpd+vG6ldP/hUb1VEOg/EIoo0jS0AL0luchGLlsDAYkWF cid0/Pi8dIgi+nqE06z3hV0dYuoXlEi9/j8JNPOZ6yYdOmGw9v+Cvy4oyzbahZZ4e/OREu cbhV3XfzTv+AWa+hDhGV5TFRyapr0M1VHhr3U3VfGj15Iln/exBKt8mNvWwIUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHU+jE8PD49z8rIvlQoz6hAWS4/vNJA8zQVIzOcdAyg=; b=Be8ZoEJ1Ff02OV8AbbxO2rX8RV9+g+1sMPc5oxN6mOkvl+51iaYvYwDzi2toV9fTw6jqRM iYgssKe2sz6R+30MmpUcdYW64e18wfxypir0x5IphzRBi6qptdDXFUMqJ8/TVtoimR4Qoi aPpYPkTZty12vvfBGJGAETvHIcxZ4Mr4F1Y+QrIbxLdoKFCAGE0rMalzuQ38vsqGF34Jko 54uLjCVsp/R+93v/jmOlcqddoqXGlPSI66ndy4Tde6NkbWCORp2LAohFsi8DttFLHZ2/zc gOZyvynMI1RnC9Y3/xaXLt6Cg7PbyXs+KCx5lNHxMnY7zlIm1MCjulcVrdK2NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3w3KXxzBk1; Thu, 28 Sep 2023 15:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAqkM047889; Thu, 28 Sep 2023 15:10:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAqTQ047886; Thu, 28 Sep 2023 15:10:52 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:52 GMT Message-Id: <202309281510.38SFAqTQ047886@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: 5d9f38405a10 - main - realgroupmember(9): Link to groupmember(9), document the function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5d9f38405a10fdcd9fc108c940dcf2642e9f1833 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9f38405a10fdcd9fc108c940dcf2642e9f1833 commit 5d9f38405a10fdcd9fc108c940dcf2642e9f1833 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:46 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 realgroupmember(9): Link to groupmember(9), document the function Reviewed by: bcr (older version), mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40643 --- share/man/man9/Makefile | 1 + share/man/man9/groupmember.9 | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index f07a886277e0..1e38eaf8adae 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1157,6 +1157,7 @@ MLINKS+=g_provider.9 g_destroy_provider.9 \ g_provider.9 g_error_provider.9 \ g_provider.9 g_new_providerf.9 MLINKS+=gone_in.9 gone_in_dev.9 +MLINKS+=groupmember.9 realgroupmember.9 MLINKS+=hash.9 hash32.9 \ hash.9 hash32_buf.9 \ hash.9 hash32_str.9 \ diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index 3a516622efce..ae7ccd477955 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -36,6 +36,8 @@ .In sys/ucred.h .Ft int .Fn groupmember "gid_t gid" "struct ucred *cred" +.Ft int +.Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember @@ -49,6 +51,11 @@ Considered groups in .Fa cred are the effective and supplementary groups. The real group is not taken into account. +.Pp +Function +.Fn realgroupmember +works the same except that it considers instead the real and supplementary +groups, and not the effective one. .Sh RETURN VALUES If the .Fa gid From nobody Thu Sep 28 15:10:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3x71jVz4tv44; Thu, 28 Sep 2023 15:10: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 4RxH3x5QRTz3YkQ; Thu, 28 Sep 2023 15:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J/fetu3wzsHMIWGEgWqek6rB5hy+iBBFpHBV1lah9kE=; b=sNNBhJlZWwTdj9jz92YBK42xqsHHZalkrJ8CHp84eg+UVieXw2bYQLE8hMkB0QEWUvqmiJ gFczVb0BJMVUCDrslZUoI1qnpvy4KXdJFIeCUZRzXPbLIqIpfW7iCilDlPuNrFDz9edFbJ MWvETVkXWJaztsSD7RnvcMpQl887PDkGkpULCfOqLTpDW2LZ7RW5d9h+zjLQ+G/deWopJv H1yyO03VAwn/tEwO/2/ni9nnlMUVKlaHEkohFrrVCk+3Iix6GPgiRehzaaoHgnGGeDdvcs xCDrlTvsCU/PlOIUcgldjWswqwNAyMOVBMWZ6pDFGdQJo1WFRZIcgAYDQ5Sw2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913853; a=rsa-sha256; cv=none; b=dy2/rh2q9Mhlkr3nc6o+XO1ri65gjxnSIdSzO8XqLbwrWWh0IR+uMKtwRb64n8AI3cuAPi zx1CMG6NkPXYjf84P5xjWr5TL3gu/rvt/38bQmcrSyQlV1LxVmDyhvN8AedosJ8xLY1SIL mRcMFCYdnedH4FTvoG2q5ujrEiOkS7DqxgYf/TqnPkvbF/4CIBOnZcOtSZMNO3VGcZYYq9 iGgo53U+usnvYbdGoqPdtjru1O6Aj62TZuHyTRC5nPiodnx6rTGwr8YEUyOv2AFCwuwcWc o5do1yaszQ5j0PDnDGZho+FRWSYRiDC8U/7nHUtRFDBi4Et3YqjaTI5gfyqIOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J/fetu3wzsHMIWGEgWqek6rB5hy+iBBFpHBV1lah9kE=; b=RJs8fgIjIXx6FbLozgBU0hLnp8OZ5D8Mi7RDuPiYBEU2W6ThLXJsB+sE7TOgKdhI84+upI qiwQI+qvw3A5v5K9Fb+gP0sYoNQIx1ZC2Kft8Fq3TuOPtmxgjoM345FplB3HFPbWgyRFpg cPc8s8jDsIevAZoSIyiAFtsac59xham9eatiCZFgGA3mPX+5FO7PWu+7dP8QeiRi5+isuj YTmQm4oMmfLAekJyBemg55wfPIjOhAL/PBsR2r8zCZj8yqSj8+V6cK6irAoQGCmFzkgPlq PHd2tJb7AWjePGvnEjR5Cmh1MbX9TBw8lSC2wB8XmSWh7YgvCrKE1FiZHTlOVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3x4WMYzBXg; Thu, 28 Sep 2023 15:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAruD047935; Thu, 28 Sep 2023 15:10:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFArFg047932; Thu, 28 Sep 2023 15:10:53 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:53 GMT Message-Id: <202309281510.38SFArFg047932@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: 0452dd841336 - main - cr_canseeothergids(): Policy change's manual pages impact List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0452dd841336cea7cd979b13ef12b6ea5e992eff Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0452dd841336cea7cd979b13ef12b6ea5e992eff commit 0452dd841336cea7cd979b13ef12b6ea5e992eff Author: Olivier Certner AuthorDate: 2023-08-17 23:54:46 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 cr_canseeothergids(): Policy change's manual pages impact See previous commit that made cr_canseeothergids() use the new realgroupmember() function, taking into account real group IDs instead of effective ones. PR: 272093 Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40644 --- share/man/man9/cr_bsd_visible.9 | 2 +- share/man/man9/cr_canseeothergids.9 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 index bd676e6f5705..f2d42f3835dc 100644 --- a/share/man/man9/cr_bsd_visible.9 +++ b/share/man/man9/cr_bsd_visible.9 @@ -97,7 +97,7 @@ and are not members of any common group .Po as determined by -.Xr groupmember 9 +.Xr realgroupmember 9 .Pc . .It Bq Er ESRCH Credentials diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index f0c1e5c4e726..109d41a8545d 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -48,9 +48,9 @@ This function checks if a subject associated to credentials is denied seeing a subject or object associated to credentials .Fa u2 by a policy that requires both credentials to have at least one group in common. -For this determination, the effective and supplementary group IDs are used, but -not the real group IDs, as per -.Xr groupmember 9 . +For this determination, the real and supplementary group IDs are used, but +not the effective group IDs, as per +.Xr realgroupmember 9 . .Pp This policy is active if and only if the .Xr sysctl 8 @@ -79,5 +79,5 @@ Otherwise, it returns .Er ESRCH . .Sh SEE ALSO .Xr cr_bsd_visible 9 , -.Xr groupmember 9 , +.Xr realgroupmember 9 , .Xr priv_check_cred 9 From nobody Thu Sep 28 15:10:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH3y726jz4tv7j; Thu, 28 Sep 2023 15:10: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 4RxH3y6J44z3Ykn; Thu, 28 Sep 2023 15:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QV/2cfSfKqZ/4MgoLOxlchgs8wScGS+69xfn+GNgSiI=; b=kpDVtc8FgEMVZHaz/b+6/F+5QeWc0vSS6sD0qQOIAg4xO2H6EseIMdkYbQSERFTzGsIHMY u1TttR20wzlICfjqEniep5KjTntqDX6gf5j8AZqOWa4HEfnR3+j708zfqGL8yQYLP6Z8OP k0DTA5OT/D8fwlzOEP1KmXPfxBTvmrsqU6D+6cK7dgzbc1fE4bz40Owo6HfYbDT/FywVGU qNUNR5jOW3bFJQtVRsOLiEre8yPPi+QThZor/wpHwoUZkMDDwU7MdvEsv9EHygZ92zQYqi WQzscYbbSMHYhekXLiFk1M9GAXOM5Yvaz2UB7sGfOezGiwX0lzubD+bVTrk35g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913854; a=rsa-sha256; cv=none; b=l1kW3D3uzIHLLOLWJMMq4gCgFhbackMOJuj0BA0HsV/sy2UAC5TPY5CxMP9eP+B8VGn315 hfevRnItTNEmzqFZcfysGxsaSzqPUqFmR+l6xRDjrnSE4fTsPMoTaYGt42wqSg2gWwNApg OrblmIyFH4mXuxcdegecxw0og/rBK6cQxykpsxqKsCpRfbMw+YeEEmH2Zsu+wpXOdKWmvT ywdSOs/L7pOhphE220nc30BKLbBLaGnPClE69IZwWDhFGSu9G7O0YGiYKxQHWr5JWEyiAw 2k/ZYB7j/qLR0RZyn6buUr0LO/0cf92duEIL0hNjw+sg8nf6miOItGzdV4OGZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QV/2cfSfKqZ/4MgoLOxlchgs8wScGS+69xfn+GNgSiI=; b=qy9lWQ6acVTMNxb4h5uFzdBl95XpvR297wQG90m1TarhiorjPfPJdVNpi2yJcHk126x3rd dMWNpq43Q+Y/L8DsCYkCKYMC4jmJFOfExIBa+mJMK1lvDydfRd0yqwXbMJNj48YF5EtUqS +nHThKv/Bwyb6xvJraIU22325Kd4ABhxWQYZtp+WDKO8eCl41MnEdVSr+VZLAa883wM31A K/SH2kUN0IZLQSL5N2efXDRRKg4gH7ObovPLNO52YvlpED/Y5e89KV0VWWYE0yuyEy3PWb Sw59nhf6quYSopjVCGxXwdppf6YERCxfbxlBd9zPHn7c23E/W6+CTiM+lwOIzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3y5P0xzC4p; Thu, 28 Sep 2023 15:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAsLj047995; Thu, 28 Sep 2023 15:10:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAsnI047992; Thu, 28 Sep 2023 15:10:54 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:54 GMT Message-Id: <202309281510.38SFAsnI047992@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: ffd3ef8ee025 - main - groupmember(), realgroupmember(): Return a bool instead of an int List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6 commit ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:47 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 groupmember(), realgroupmember(): Return a bool instead of an int Requested by: mhorne Reviewed by: mhorne MFC after: 2 weeks MFC to: stable/14 releng/14.0 Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40958 --- sys/kern/kern_prot.c | 12 ++++++------ sys/sys/ucred.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0f15771fb00d..00eb2fccdeef 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1279,7 +1279,7 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) /* * Returns whether gid designates a supplementary group in cred. */ -static int +static bool supplementary_group_member(gid_t gid, struct ucred *cred) { int l, h, m; @@ -1306,12 +1306,12 @@ supplementary_group_member(gid_t gid, struct ucred *cred) * Check if gid is a member of the (effective) group set (i.e., effective and * supplementary groups). */ -int +bool groupmember(gid_t gid, struct ucred *cred) { - if (cred->cr_groups[0] == gid) - return (1); + if (gid == cred->cr_groups[0]) + return (true); return (supplementary_group_member(gid, cred)); } @@ -1320,11 +1320,11 @@ groupmember(gid_t gid, struct ucred *cred) * Check if gid is a member of the real group set (i.e., real and supplementary * groups). */ -int +bool realgroupmember(gid_t gid, struct ucred *cred) { if (gid == cred->cr_rgid) - return (1); + return (true); return (supplementary_group_member(gid, cred)); } diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 633bf436fcd4..7c9e46e47774 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,8 +158,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); -int groupmember(gid_t gid, struct ucred *cred); -int realgroupmember(gid_t gid, struct ucred *cred); +bool groupmember(gid_t gid, struct ucred *cred); +bool realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Thu Sep 28 15:10:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH401HVFz4tv4B; Thu, 28 Sep 2023 15:10: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 4RxH400Y7vz3Yn1; Thu, 28 Sep 2023 15:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKWEQEQel/8otS5ol7J7/CtjF8xLNn1vss1Bie791ao=; b=JLiGNxkv4cVv6VCL+i+8a96Bk77wdXc7wn5vouI0hwKpM6WXf8W0zOiv3oYBH+iyq8eY5e 3zaGFSR5jajTk4XB9wRBu58dBv6IAyap5bD7KjrB6l2H3lrs2LklFwOeHILlflNG8B7Q4S LDqVQieTEqzWQm0a/f8P1lLKDBtqKZy9OoPDmA3Y2k/NNPZDz3sMTiRC3GM3NUF/ateG7l JC0ZeFCO470FMT7N5hh+NmAIZP6hjD4so2zP8G5V+XFVap8sk0vD89AuH0JHuK2otw3DZ3 WDx2Sk23cDnC6mCHKFalwQEeUjBluHrcTKYTcOg7WmYCpnd4RRbRM6dYOG4/NA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913856; a=rsa-sha256; cv=none; b=wq52I7UrF0jTCrO4J+3zWKCIDRPQP6R1OzhQgZqRQU0gcp8IZn4ufOI3FRh/CdLG/4weDD N7wfg9ym+/B3tTXN1/DNsfOWEdaV8bxo6MGDkB/Y0PVklYVKpQwknPeqYHBvGZwG3iKeTY h10rvW4P5zXLdGVw386pfqg6p+dgDzX6hDrwbweLAmN9vVuE+WomZoQaMaUwnU8C57SGJ5 e2q6mxc7iyi0zAIstqHDmEA53kOAGrDB1tLPCN7ONsDFyLcvV0E9cHQGHz6G9eXxe61D2R m9KbW+vfj3EQPFVU6+TFh1xXdPB9NDF4fV52fSpUtShmbJVe73K9WGhYDKLpHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKWEQEQel/8otS5ol7J7/CtjF8xLNn1vss1Bie791ao=; b=dL0p/OdEr6AeS5lXt0HC/JvbYpD+3ohwlZqcqzCCrjuy5PDTCOU4UVtY9a0SoN+YAPtBV6 RnLP/fDonGLyhdaMKES/TDOZHUVhs80VKt57i6DesPoUzXfzy8P+Uu7d+o5eESEX06toi7 +WLQVDojR0XpQ5nhLvJTEQ70+UEkqIEnz8RXGjpcbdO8jsdQkpl/YZcqt19UmDUpkir0mI ODvwErKUsGD73WwPnfrF+zjRXlqFlzHN64DPiS4ffEYs/VttmuoFRNhC8MNaH53mspF1Go psVJ7IrdL6W7ZmBIsrFwtczcBGl1BsKutBF9HU1QC2XrbKOYibpLwNUM/VqWnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3z6mZczC6T; Thu, 28 Sep 2023 15:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAttx048044; Thu, 28 Sep 2023 15:10:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAtiv048041; Thu, 28 Sep 2023 15:10:55 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:55 GMT Message-Id: <202309281510.38SFAtiv048041@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: 845b7c80887a - main - groupmember(9), realgroupmember(9): Impact of signature change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 845b7c80887ac84c82ee776836ef86d68ea71c94 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=845b7c80887ac84c82ee776836ef86d68ea71c94 commit 845b7c80887ac84c82ee776836ef86d68ea71c94 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:47 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 groupmember(9), realgroupmember(9): Impact of signature change Reviewed by: mhorne MFC after: 2 weeks MFC to: stable/14 releng/14.0 Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40959 --- share/man/man9/groupmember.9 | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index ae7ccd477955..b7865a35fdc9 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -34,9 +34,9 @@ .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h -.Ft int +.Ft bool .Fn groupmember "gid_t gid" "struct ucred *cred" -.Ft int +.Ft bool .Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The @@ -57,9 +57,17 @@ Function works the same except that it considers instead the real and supplementary groups, and not the effective one. .Sh RETURN VALUES -If the -.Fa gid -is found, 1 is returned, otherwise 0. +The +.Fn groupmember +and +.Fn realgroupmember +functions return +.Dv true +if the given credentials indicate membership of the group +.Fa gid , +or +.Dv false +otherwise. .Sh SEE ALSO .Xr getgroups 2 .Xr setgroups 2 From nobody Thu Sep 28 15:10:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH4121HQz4ttyB; Thu, 28 Sep 2023 15:10: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 4RxH411bvwz3YnW; Thu, 28 Sep 2023 15:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/hnLBI1wpCQGtyoDJ9pG4tYNDbYUMukDrSnUb14qF2s=; b=w3U95koe4NVEObdQ/xHMY9MIXxvEchmKHZ8uJXKT1NFDtHNvhZkjF9cSVoXl1aEEwTTv5k QVAYPMC/NMuFUmxEPEgv6GCRtx/TJMR8a90wYZge2z7BUCk+SfwmaF+iHMJD+BWp6EKq// zGkVwl88pt7D9A0OfzIo1ULcdDP3dyUbdXnkvIRM1os8E83Ylf+OXTjUW5/b8au5kfzkxH 22h551cGI4FDBcFkkRMdNd7UgfGtGWjeescH9KT0SW+W8aWU0tynouIi5xwuGOebgMXLPF 4leiObQ/vUqtbv+umfck3llDP5HE3wnE0C9dcFsPp+sa7Y7lhPOrR7rxp0jZlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913857; a=rsa-sha256; cv=none; b=Jvz1b955TZFvJwYEkBRLoWS6PqWX1FtWVe4Ka603zSlZwewGdhUGh3d4GTFO5yAVrnyEGf uV7KKctH2wclM9gN/nz7NDaq9utaJz9Mcw6OqTnhV1DUee/PGVzRK06ZzhuZfvGdOEGf/P kU2KZuambKi+tMMDFEZJskmvGei+q9nPW2MGrdMiu12RbayW7+8rERJomtSLt2vMn28Aec JvQbqYqqp/6x014nCm+gn6pjRcgd+C7UHQNx7We1kSe5DBA51FMm2mnhp5h5UDjrGdQ3Tn s7ZZrCjkqdOTAfjocitynQuJHYoeCIQkn3B0pQTklFjNhzCBesNnwmj6VZSqSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/hnLBI1wpCQGtyoDJ9pG4tYNDbYUMukDrSnUb14qF2s=; b=h870c6EUJ750qEedvMRWq/jMMcFgGLb7C4xelAKOlp6w9Kydh+IvPOk7n56V1pJQWhhqbu ni7iEg65knIMNLrpK46Xrpbvh9LTBa3ojqrzwJSlbSswUhW5r5xXNax7GdHmiPViKPXFtz PdcgCewpkbaPqw3jNfxE3GI43hsEtaOmhrbrzzzeXrhXGBXslg+AF8Gmh1JBNTy/22tyV6 HSF/qEZzvMqiMnMT+JVcCoICTOrsk3FqKjN0/yTYHWuJP3nbJCjuUvhtryYuWQz4fUHc/9 +Nru8gt9Yn/zYa19I1FkS9V0tZdfqTnui+ZBH3+ev1d7r+mgWTnNR/v6ORKcBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH410hfhzC6V; Thu, 28 Sep 2023 15:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAv8J048095; Thu, 28 Sep 2023 15:10:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAusR048092; Thu, 28 Sep 2023 15:10:56 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:56 GMT Message-Id: <202309281510.38SFAusR048092@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: 61b6e00bee1d - main - security(7): security.bsd.see*: Be more accurate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 61b6e00bee1d39e9c688e728fbf3a4efcdb61e66 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=61b6e00bee1d39e9c688e728fbf3a4efcdb61e66 commit 61b6e00bee1d39e9c688e728fbf3a4efcdb61e66 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:47 +0000 security(7): security.bsd.see*: Be more accurate Reviewed by: mhorne, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41108 --- share/man/man7/security.7 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 63b984ff66dd..6d6742fca0bb 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 30, 2023 +.Dd August 18, 2023 .Dt SECURITY 7 .Os .Sh NAME @@ -959,16 +959,18 @@ Backwards compatibility shims for the interim sysctls under will not be added. .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.see_other_uids -Controls visibility of processes owned by different uid. +Controls visibility and reachability of subjects (e.g., processes) and objects +(e.g., sockets) owned by a different uid. The knob directly affects the .Dv kern.proc sysctls filtering of data, which results in restricted output from utilities like .Xr ps 1 . .It Dv security.bsd.see_other_gids -Same, for processes owned by different gid. +Same, for subjects and objects owned by a different gid. .It Dv security.bsd.see_jail_proc -Same, for processes belonging to a jail. +Same, for subjects and objects belonging to a different jail, including +sub-jails. .It Dv security.bsd.conservative_signals When enabled, unprivileged users are only allowed to send job control and usual termination signals like From nobody Thu Sep 28 15:10:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH4251wRz4tv81; Thu, 28 Sep 2023 15:10: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 4RxH422Pc2z3Z6k; Thu, 28 Sep 2023 15:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyaRaWRV44bWRtzVaswd7rPLc0ZybKiT42gfsIcWQcY=; b=dpbbEoHplttvJrryRfcF5cuze+XBvJbFbaNkmQg5FoCKP5Jijh3SPCsaaN9YFdTH1RObpy sCkAkMJVRnBAH+oyuuUVNL8Lbfa4V+dv+KOIIAabl5a23Pfc1Jjvj7DPGOminDI1wOYp4M afHpVikVVft8zxhZzvf+sfEP1negtctag1BB1uH7QhvlGQpwAwREYNZxpO0f8bjMKOCUjw BQ17mC3htn+On5ScE8PincvhHy1bgxwOWBcH9munBu7qvoTC+UMkAFaYm9Ihti8ewjmdLk DI2+dBnekZNiBBXFpzvTEDCUSz8AcfYt4UCygJH+rOR3kAE+q2bQy2kOkY3bCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913858; a=rsa-sha256; cv=none; b=qE5NLY2HA2jgnexVKAbmlGS+bsUGMpZYM+5F/OhYHEg00fp//Nz2XGzgq/f/6+0rpi1DqV 8RJhjHuuqtrtrr4G5T5pF8OBj+wXG0BJy+PY+W7+vkaZOe2s3puMtFN3uvOdTFaDiyWRxa s9T0kvcMIakpRrFst3p0JkJfQ7lWPuXARlvfI9f1c0Bqfs9S8NLHRud1XmfkmpOXOZuXnn i6s6VVFg9yifrArkNRdRsR/7CHTnN58qPfT/dOK5I9JNnCHtQbFEzCEMjF9ekznhqAlpo8 wHHtb1yNK1fP5wpZ+caNL44B6YXtCpcujNCvuJ4FIkuOCNrAOp78f4nMyvycLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyaRaWRV44bWRtzVaswd7rPLc0ZybKiT42gfsIcWQcY=; b=efFD9AW8pmM84knZxgTbu6lGw9OcOn4FHHHAkmZVkjNWPv4gtslF3dhm5RaVbxoXfHSV+o oZGQ59n/6uwy2rlROoPqpjgE2xAE3OdZWTzD5b+Vatpc6BvB+pOHwTXEz+gPdT+SM6oGDu FJm/d1KnL4WYJ6ehMAx7qRjJb1WRzBytnFEK+m1ssVVleVcmBGdZG8eg8yokFuayz4hgt2 YDgHPacNh+pOESv0HhArFqIYqIAK5vsnuKZSZFPZGMTBM6v7mirb670QIKyoMz5S78vdfZ HKIzuD2/UFc3VizfFDD7y1liPODKIkGfZc1CUSMhlo515S9aXxA0C7VKbA3FOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH421ClZzBXj; Thu, 28 Sep 2023 15:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAw9U048140; Thu, 28 Sep 2023 15:10:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAwYd048137; Thu, 28 Sep 2023 15:10:58 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:58 GMT Message-Id: <202309281510.38SFAwYd048137@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: d952820105d6 - main - ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d952820105d6a2ad87ddf3bdc6c5fc5215d13b87 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d952820105d6a2ad87ddf3bdc6c5fc5215d13b87 commit d952820105d6a2ad87ddf3bdc6c5fc5215d13b87 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:47 +0000 ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc Reviewed by: mhorne, emaste, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41109 --- lib/libc/sys/ptrace.2 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index d7d244b1d84a..ae1770315aa5 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,7 +1,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd December 15, 2022 +.Dd August 18, 2023 .Dt PTRACE 2 .Os .Sh NAME @@ -149,31 +149,37 @@ its scope. The following controls are provided for this: .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.allow_ptrace -Setting this sysctl to zero value makes +Setting this sysctl to zero makes .Nm return .Er ENOSYS always as if the syscall is not implemented by the kernel. .It Dv security.bsd.unprivileged_proc_debug -Setting this sysctl to zero disallows use of +Setting this sysctl to zero disallows the use of .Fn ptrace by unprivileged processes. .It Dv security.bsd.see_other_uids -Setting this sysctl to zero value disallows +Setting this sysctl to zero prevents .Fn ptrace -requests from targeting processes with the real user identifier different -from the real user identifier of the caller. -The requests return -.Er ESRCH -if policy is not met. +requests from targeting processes with a real user identifier different +from the caller's. +These requests will fail with error +.Er ESRCH . .It Dv security.bsd.see_other_gids -Setting this sysctl to zero value disallows +Setting this sysctl to zero disallows .Fn ptrace -requests from process belonging to a group that is not also one of -the group of the target process. -The requests return -.Er ESRCH -if policy is not met. +requests from processes that have no groups in common with the target process, +considering their sets of real and supplementary groups. +These requests will fail with error +.Er ESRCH . +.It Dv security.bsd.see_jail_proc +Setting this sysctl to zero disallows +.Fn ptrace +requests from processes belonging to a different jail than that of the target +process, even if the requesting process' jail is an ancestor of the target +process'. +These requests will fail with error +.Er ESRCH . .It Dv securelevel and init The .Xr init 1 From nobody Thu Sep 28 15:10:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxH434L33z4ttn2; Thu, 28 Sep 2023 15:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH433vfpz3Z8f; Thu, 28 Sep 2023 15:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TiVQAO2N/dHmk85oa4A+uVcWDzfgDr/gsamY7W2olLg=; b=UuoGW6hW5Coss7uWVuIWGOVLD57kvpjjTUY0i/8FVa1oaczGxtjOiCNQpHEIQk22O29xHr 7F+9XZzTkvxwPl07lc0ZxC7W04mLYSzgPqcWxA0ojm5YOaYVE97n1dupgsw1a48cYV0Jel KYO25/SLyQ2pYeEfMMKHqFvHxOS8FgyJFQlsYKt6f2xxssa4LDwJcrWF3jh3t7OtgnLS1S O/lV7dbO3BlmI4TIYYKuMuUl9iBrqa9SDwpO/jqLFiHemIQ7V9jAdvNji94oxILvW5jbis fMIpRR80dk+2MmYaPoicik06JG4GHHlqRy0hoNazuzZKfAy2V74IXuUQ6xiCMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913859; a=rsa-sha256; cv=none; b=ZPEZfYVtXc3CCR5zx37uxEpAuyH4ogIMge0YnJJXUpYqamBV3Suo6SkBATXiFZJ1d/OSHA 88DqXkskT7W11RDU6jl/lTR290otSmMzP1Jx5qdDSMnNFhltozN0pPdqAqUvNaMapJ/UNy J1auW+JL7IvQmzYyKhtn2HXdjaiqUicT27OqZL3XSK9OG1LhUFMOxI+8dyCW53/GKIqusL ij40Bz/2MH6bnIPyVTIMm98kCocwiWi/VdSOcXh7PNpbGWShuZ0VVnL/wTgwy859ynNey2 LL5oFrvcp6fO8T+J4ak5qOBleN7KaM+r0yZtUkChMPoJcnrRhYeW8tTEOHrCUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TiVQAO2N/dHmk85oa4A+uVcWDzfgDr/gsamY7W2olLg=; b=sJYxLjsJ2XeEm/d2joWQ52hyGzVBeCo+MUE1aGnwiNE1Kb6YmSEOnlXEQCwpQeDo96wM7d rDXzhKAizfxiRp3s0yiLArYbbbnxyQjnJtThdfeILFz2FxcDrW23QxYROv6iAU0bOuZ1bA Ikfqf1oHq0sfLXBV3WdXgJoPwDuF7f2+XvP0gaIZccD0a1lRr8uA7i7xrQe64euvdXEJ4L ByCcLbVPOHsynARyAX2lh46p1ZVdnLwjEpAaGIAx5A0wgqMVVz1i4lNFKJsYzsZ4u54Blz HpG1WkEKL9hcRKBLtAdol+Ol3/NAJzFcsGUq+0FlqR6suJoosXTL0gYD9er8ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH432npNzC0k; Thu, 28 Sep 2023 15:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAxMh048193; Thu, 28 Sep 2023 15:10:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAxHI048190; Thu, 28 Sep 2023 15:10:59 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:59 GMT Message-Id: <202309281510.38SFAxHI048190@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: 8d7a48d367ff - main - sysctl(8): Mention more security.bsd knobs; Refer to security(7) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8d7a48d367ffde2a29419ef943c4099984e3af4d Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8d7a48d367ffde2a29419ef943c4099984e3af4d commit 8d7a48d367ffde2a29419ef943c4099984e3af4d Author: Olivier Certner AuthorDate: 2023-08-17 23:54:49 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:47 +0000 sysctl(8): Mention more security.bsd knobs; Refer to security(7) Reviewed by: mhorne, pauamma_gundo.com, emaste MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41113 --- sbin/sysctl/sysctl.8 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 3e995e40131b..ed768510eb6c 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" -.Dd December 24, 2022 +.Dd August 18, 2023 .Dt SYSCTL 8 .Os .Sh NAME @@ -194,7 +194,9 @@ for more information on which tunables are available and how to set them. .Pp The string and integer information is summarized below. For a detailed description of these variables see -.Xr sysctl 3 . +.Xr sysctl 3 +and +.Xr security 7 . .Pp The changeable column indicates whether a process with appropriate privilege can change the value. @@ -231,6 +233,8 @@ String and integer values can be set using .It "kern.logsigexit integer yes" .It "security.bsd.suser_enabled integer yes" .It "security.bsd.see_other_uids integer yes" +.It "security.bsd.see_other_gids integer yes" +.It "security.bsd.see_jail_proc integer yes" .It "security.bsd.unprivileged_proc_debug integer yes" .It "security.bsd.unprivileged_read_msgbuf integer yes" .It "vm.loadavg struct no" @@ -320,6 +324,7 @@ option has been deprecated and is silently ignored. .Xr sysctl 3 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , +.Xr security 7, .Xr loader 8 .Sh HISTORY A From nobody Thu Sep 28 15:27:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHRb47B5z4twWK; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHRb3cGKz4GbV; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695914875; 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=U3Q87xzEMRnnEx6CuYhStx8qLLCWsPy/u6TGYQp1sR8=; b=t/F6sNucg0U1Dk4pp8b2OULdoxRF8EQwmLoU0LmIil05XAzBRZ6sF0Pbl3wVj+F203f85c NrikOtppNS9oBJrvewpfmZsMBE/7BdmR3eBwPqVbqOeN3SEMS1DXAOxiWzDCO5ZNJisYWI ooO8hi7V6I35mBMPzX26V7M0ZX8LnGbdnZF7OvdOACf7bnP1Plw55W8wtuhbLBC88GoqKh jXhP0BYhcpwNuaNP7GFDcnXqoo7gLBp6VEQt9bn+090K4IY88tyimnwqba+1a2ZKxquh3W D3nacAwkJzMZbeNVIg/h0V0zGRjFwbh2JiSeaiFys8y92f/0zt0Ogmo0cqyluA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695914875; a=rsa-sha256; cv=none; b=G4n1eZQd7+M+ojVvB3jFf2ZUZZBX5P05FtJY0I8n6SKJc8VCqLIyvka1Szr1IRZwX/Mabg EeELKzNBe5y8wzJAATApQF4tY0kJDTGowDkGUmnlkul+x+OwtJGve9gCwXTJO5J4j2w249 oIFuiuUUVY9f3ej/MogeH86lsZQjt1SY+jonZqxajTuu3uA8Ol9vaZtIQbx0E+V2/lBjd1 fciCS3Uvig7KycnwiIQwi66vI0UKliCMJwYlyrKf8bbLiUZfa8MmUkQsaBo62DLqY7EpRD VD4eP2xL+tlcedSzP8rHrbqLeliIL0NaaEHXNqa6As/6qsbiKE8woJIT/ZQg0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695914875; 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=U3Q87xzEMRnnEx6CuYhStx8qLLCWsPy/u6TGYQp1sR8=; b=mFvrx8Thi5+b34i9SoIoUGO0XU0mxUtgEgENwTKGJYZjxW1BKauGdeQAYO+mibIWFdk8F4 b1v2F705hiSUSszP+Q0HAUJ4jEjrleFc5fdid9ob10fOXoz4rruNyf4elQQvC94PXvntWV elXvN+tzcdNMVCGZdygFOxTA/7lyPzNObXRYLiRTWYyNtbefF+o0R31eKeMe7BDlzo7APB +44VO8Ay1fnc8zH7M6Dp9rMStd/hW1Feb7mM0K7H5/WSwbg3z4XuhWxybZE52fcEAKx5gt Nc//Ngiv5JR0gDAlMWSd3fnkaoOPv1OTDB1YfvY2WYxGD/X7XV1fDwHx+XRfTA== Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::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) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RxHRb1wZdz9JP; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 1663C16F94; Thu, 28 Sep 2023 17:27:52 +0200 (CEST) Date: Thu, 28 Sep 2023 17:27:52 +0200 From: Baptiste Daroussin To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: References: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Sep 28, 2023 at 10:58:20AM -0400, Mark Johnston wrote: > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > > Author: Baptiste Daroussin > > AuthorDate: 2023-09-13 07:43:33 +0000 > > Commit: Baptiste Daroussin > > CommitDate: 2023-09-27 14:00:00 +0000 > > > > flua: add fbsd module > > > > This module is bundled into flua, it only provides for now the exec > > function. The point of the function is to be able to execute a program > > without actually executing a shell. > > > > to use it: > > fbsd.exec({"id", "bapt"}) > > Hi Baptiste, > > How is this different from posix.unistd.exec in the luaposix module? > Wouldn't it be better to add this to the existing posix.unistd namespace > in lposix.c? exec does not seem FreeBSD-specific. This is more like os.execure without the invocation of /bin/sh! > > I have a related question: this week I wrote some FreeBSD-specific lua > modules wrapping some system calls like sysctl(2) and cap_enter(2). How > do we want to organize the flua namespace for such things? Should we > have a freebsd.sys namespace for system call wrappers? I would then put > bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we > could have freebsd.lib.procstat, for example. I am fine with a module named freebsd.lib.* I plan to add kenv, rcctl, procctl so, (I scratched sysctl and cap_enter has you have them ;) ) Bapt From nobody Thu Sep 28 15:41:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHlD42Hcz4tx9n; Thu, 28 Sep 2023 15:41:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (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 4RxHlD10kbz4HPk; Thu, 28 Sep 2023 15:41:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-418201cb9e9so43319641cf.0; Thu, 28 Sep 2023 08:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695915686; x=1696520486; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=5NJu7QAEHXpBxHR4KmywSCXWI6vI2Yvzw2k9/SuFdDs=; b=b4n8iELel/nPaLoWdTLPAIUXzf4LxyAybygJZizW0AUsuDHcfbWM5hEYEpdZFSJjCr d02HFA2qru6ovqN7TgthNbIWft8LNTAz/Hs5jRf03UpZ0CuEakGgYxCfZSnEbt/UmQVo a1boJ0p6mxMQlzN5AX6KsqNUrmZNE5EkRhNedqxBWY3TptlWMPJfVGQzX6e1I3T3ankd OF93RJwaJ0JCteEizphOPRpsthvT40SaH7mtHul/5jBg+fQsjApqp+att8V9FB48aRID nWPWuVF26eJfO8nyrl2zs4+B1typhfEyGwNiwjxP+K7+TMJCTh6lxSkAODRunN0X7pwu OEOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695915686; x=1696520486; 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=5NJu7QAEHXpBxHR4KmywSCXWI6vI2Yvzw2k9/SuFdDs=; b=vulO/P8tWxqYXN0/LKTx4vi78Sjlfo3Qvn3nM/ud/eoNCmrGSObkCUFqShfJZ0ASL8 lMkex5uBMV0MQ/6/T/6Bx5QY74G3grtq6+bdGf6AH1auJqvcmMQDK7bvuIqCfjF8doqv XY/R+yQ6xzkluCYY2pPUKJrEXUrmYKaB22MWr3kUK7BPcfejv0I5OxFYTkT7Y3BxtPli Fgwk6hOXx8kAHty30kHnHPKd5Nm7zsEKhqgQt6p9tw0xqpB/d9mQlHgl+vEubO0CNXX9 B66sAYdahon9Hoe9EZm7Fne9WnY82t2yymCRv5Q6esGuxKmIrT2PmAbJJGBJB1QKabe0 MZjA== X-Gm-Message-State: AOJu0YwZvtqwywGg47yLfOu5nDRvkpYY2YUT73qc37IzL3XCtHiWb0TD eNT104Mjh+BgizhWvuwc7Kfhwv6ayj4= X-Google-Smtp-Source: AGHT+IE94gPM0kuP86UxPiPzYPYAE0XffdVyBtW/76Q39dVwprtUxcw7WZYogYLnqC9Y6VTJpfLK7g== X-Received: by 2002:a05:622a:1109:b0:417:a514:72cd with SMTP id e9-20020a05622a110900b00417a51472cdmr1922705qty.19.1695915686496; Thu, 28 Sep 2023 08:41:26 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id y17-20020ac87091000000b00419732075b4sm274775qto.84.2023.09.28.08.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 08:41:25 -0700 (PDT) Date: Thu, 28 Sep 2023 11:41:23 -0400 From: Mark Johnston To: Baptiste Daroussin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: References: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RxHlD10kbz4HPk On Thu, Sep 28, 2023 at 05:27:52PM +0200, Baptiste Daroussin wrote: > On Thu, Sep 28, 2023 at 10:58:20AM -0400, Mark Johnston wrote: > > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > > > The branch main has been updated by bapt: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > Author: Baptiste Daroussin > > > AuthorDate: 2023-09-13 07:43:33 +0000 > > > Commit: Baptiste Daroussin > > > CommitDate: 2023-09-27 14:00:00 +0000 > > > > > > flua: add fbsd module > > > > > > This module is bundled into flua, it only provides for now the exec > > > function. The point of the function is to be able to execute a program > > > without actually executing a shell. > > > > > > to use it: > > > fbsd.exec({"id", "bapt"}) > > > > Hi Baptiste, > > > > How is this different from posix.unistd.exec in the luaposix module? > > Wouldn't it be better to add this to the existing posix.unistd namespace > > in lposix.c? exec does not seem FreeBSD-specific. > > This is more like os.execure without the invocation of /bin/sh! Right, different from os.execute, but almost identical to posix.unistd.exec: https://luaposix.github.io/luaposix/modules/posix.unistd.html#exec We have a subset of luaposix already, in libexec/flua/modules/lposix.c. So my question is, how about we extend that to provide "exec"? "exec" is not FreeBSD-specific at all. I am happy to write the patch. > > I have a related question: this week I wrote some FreeBSD-specific lua > > modules wrapping some system calls like sysctl(2) and cap_enter(2). How > > do we want to organize the flua namespace for such things? Should we > > have a freebsd.sys namespace for system call wrappers? I would then put > > bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we > > could have freebsd.lib.procstat, for example. > > > I am fine with a module named freebsd.lib.* I plan to add kenv, rcctl, > procctl so, (I scratched sysctl and cap_enter has you have them ;) ) So my proposal is, raw system call wrappers should live under freebsd.sys.*; some higher-level interfaces can be built on top, hopefully written in lua as much as possible. Also, if we start adding more FreeBSD modules, I suspect it will be useful to maintain these modules of the tree. I have some plain lua (not flua) programs for which I wrote FreeBSD modules, and they could be useful to others. It'd also be useful to target multiple lua versions, at least 5.1 as well so that luajit can be used. But that's a topic for later. From nobody Thu Sep 28 15:45:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHqd2dqWz4txWF; Thu, 28 Sep 2023 15:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHqd22ftz4Hrh; Thu, 28 Sep 2023 15:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695915917; 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=aGp/2b/OKuMAWV+FUyUGCRyJeosvKHmDkkOEfmQ/ghM=; b=PFcuBybS4D6DoHAj0FgBZHukpyd0OkDUilBjL5mPJP+/+7yQl5MFAzuqfy2cFXn4M5mzQL +aWdUpkNQTnelB7HqcH3s4vlk6ku25OV6nV382eaZhEmcq/wAOkvkZZU3mDkDbVAn4L+ym Q73Xf2egYyEnj8OPVJakf0fOWWcV2J71zHKh0T5SpKV0zgFZlGpZnuB0DNKhnPG7ED8IDi mtm2SM9G6pLHsuyXt48QQVa+N/VKbVY4GX0GPCUeUxxOYkWBxJtshQSa4UF4rjMEXzaNPA fUTSA4OGYuIIA5EyJLRTWzKdKRw4nUfu365AmOPlZuMWQzl9+3ozjzwzddYV6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695915917; a=rsa-sha256; cv=none; b=gjKJ+EwMD/5DUTUYQ6lWQp1Z0GQ74RRRF5LKguSr7IuQm0czx6o6IGkL1BG4GH9k0JcQDZ YY71URxS6D12ciJLgJxLDbf7wpc3GkXAEo4U+x5g47RVNjAMN5JI+EDudwGrwZ6TFerox6 82JzRkF1lT8rzZsQvjBbZ7OG/XOCcjrQnFF08s4TAtCFEokmlup04TO1NI0OtzIb2iDGbO HGjVLw5nK37w1GuvYgt8jA7nfvB8qBczlCWT56wLE4h7wjYWB0N2xbHDiTDTeSMU85vJfs OCAa/4PP0Oum62LYsoMOEX8u/3Ed3jCp53yVjfXrs3DZNKRWo6PphvEjpdv3xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695915917; 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=aGp/2b/OKuMAWV+FUyUGCRyJeosvKHmDkkOEfmQ/ghM=; b=fr5pO+MKUhA4q8978cH4o0WyOP82AuxzYZrKS58jD0vGqhZqLg3tNRRkLeMLpEPe6aD0ee Etisj5dgKFwcoZxuerWJ/If4bWIqMSNw3XY97b7V+NI3A2NQqWGFLM/PjnuAEvkYs49u9L +a3scJxukiAzv7tSL/IX+S+MSVQWyeAwrI4+Vp7hmE/jtp09qmDGge9eHRxLFzsTcEAtfg kmcjTqbNDAY3iqVccnhYwKml+bmSin08vjHspJr6ley6WnMNVqCTXo1yn6Dc7kzJ0PD3wD sXuXjKkwplDz611abB7hqfffgnzKBN2UQ9f4JEikd4IG+OpGB67M/oDj9JwS2g== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RxHqc4yQYzB9J; Thu, 28 Sep 2023 15:45:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Thu, 28 Sep 2023 10:45:14 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Content-Language: en-US To: Mark Johnston , Baptiste Daroussin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/28/23 09:58, Mark Johnston wrote: > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: >> The branch main has been updated by bapt: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c >> >> commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c >> Author: Baptiste Daroussin >> AuthorDate: 2023-09-13 07:43:33 +0000 >> Commit: Baptiste Daroussin >> CommitDate: 2023-09-27 14:00:00 +0000 >> >> flua: add fbsd module >> >> This module is bundled into flua, it only provides for now the exec >> function. The point of the function is to be able to execute a program >> without actually executing a shell. >> >> to use it: >> fbsd.exec({"id", "bapt"}) > > Hi Baptiste, > > How is this different from posix.unistd.exec in the luaposix module? > Wouldn't it be better to add this to the existing posix.unistd namespace > in lposix.c? exec does not seem FreeBSD-specific. > fwiw, posix.unistd is expected to match some subset of the actual lposix module: https://github.com/luaposix/luaposix -- we could add something there, but I'd prefer to see it go upstream first before we adopt it, in general, if it's one of these subsets-of-a-module that we implement. Thanks, Kyle Evans From nobody Thu Sep 28 15:52:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzm38sDz4ty9B; Thu, 28 Sep 2023 15:52: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 4RxHzm2khbz4JsX; Thu, 28 Sep 2023 15:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=me8xWwILW21I9F0T/QRmVre8Ri0mT0eBNAZ5Dw2CdaQ=; b=fhgj0wHxpxyHdbeJdyStrIRp3kKcJiXtoKJK7vXmux9QsBECmJB80onIxBJxLT/xepSfNA CnukhTVke5IsW6BYi6/A9IO+MsgVu9cxAzyfcDKKd6XMVLlgdfdWm3OAcnQ+odm6QKJt8c QEZD4pJr8kRAmm1s7JnXHnw+Q/GhM5FSvpgdaLp+5AwfJm+TgnLPU8TMWajzCKNyUarXfL hpsXCZdcNBZlNpZo94kf4OyExfJE9/IPIafiqkeG/wG9qhZWRLZEzsIR/98T+Yam9tzgH9 IPGlV2z+u4a6VxaIkalxV4XKwi2RHL5SId5Kat1/razxQYV8q48nGOQPGng/rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916340; a=rsa-sha256; cv=none; b=SaHHryBHovHR4aBPCbUeQTgH0XNq5RMQQ9uiNHaNSl88O4GtqehRDGCcf1It0XGMcDJKtR P0TWb4SS89XI4sLQxFU00fY875MRWTaoi3YPsKkYTPD2UrN5ojXumxn62afbfRI5s2R+c9 dUsXKH8m1M31lZhAaM78AMtcE1RMajWyam/8bNh3zFxIjWSMH13gBNMONW6iQOXNqpRHDS y5J9L0EaRYxJ3X9p6Kbk6aoDRyLD0nhGxHY1ElVEk+fsmdCXFenR1oDM0nOspZAiE8Oijk +X3KXPfYxytFWqInj51jjmr8s2BssM2TZi710UUb9k+DH8vImrQKZvx16y8lzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=me8xWwILW21I9F0T/QRmVre8Ri0mT0eBNAZ5Dw2CdaQ=; b=pxBDMpNbL67ajmtl/vZE3KfrTLb0fv8yUQtEfxPo2VvEFWpVhLFcU3CnSdr/sr/9XKXN8g InU7a/P/PQNXsKSQsnmS31oh/E6VvDhi0ET5Phidegdfek7wpz4KhpMkELCrlYeSvgGxkb 4IZqB9s5cemXU2gQvOJGzy/W5607wQ0sawfQ8Lc0rUk/YL4pjBw42L2K5jFVj/fHfn625B pCFDWFaBnyS9laJUn/sLKjoKxHsfvzkOj2x/z8Y9+DJHcc+eZQHDw+i73fys0Pt6YDqUAQ /i3+kqMqXNPvKasIqlYnw3ZTcxI2oUZHcpkJMznjf8opoo9lY7mKnuu/SfOXvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzm1nj8zCqQ; Thu, 28 Sep 2023 15:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqKI1021422; Thu, 28 Sep 2023 15:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqKI9021419; Thu, 28 Sep 2023 15:52:20 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:20 GMT Message-Id: <202309281552.38SFqKI9021419@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: 518bd54167a8 - main - syslogd: Fix fd type, add enum for filed types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 518bd54167a8990d1233f216d9ecd0db68f7bf81 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=518bd54167a8990d1233f216d9ecd0db68f7bf81 commit 518bd54167a8990d1233f216d9ecd0db68f7bf81 Author: Mark Johnston AuthorDate: 2023-09-01 02:48:18 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Fix fd type, add enum for filed types Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41357 --- usr.sbin/syslogd/syslogd.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index de3d7c106f8a..701b062802b0 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -247,6 +247,17 @@ struct prop_filter { size_t pflt_strlen; }; +enum f_type { + F_UNUSED, /* unused entry */ + F_FILE, /* regular file */ + F_TTY, /* terminal */ + F_CONSOLE, /* console terminal */ + F_FORW, /* remote machine */ + F_USERS, /* list of users */ + F_WALL, /* everyone logged on */ + F_PIPE, /* pipe to program */ +}; + /* * This structure represents the files that will have log * copies printed. @@ -256,8 +267,8 @@ struct prop_filter { struct filed { STAILQ_ENTRY(filed) next; /* next in linked list */ - short f_type; /* entry type, see below */ - short f_file; /* file descriptor */ + enum f_type f_type; + int f_file; /* file descriptor */ time_t f_time; /* time this was last written */ char *f_host; /* host from which to recd. */ u_char f_pmask[LOG_NFACILITIES+1]; /* priority mask */ @@ -351,16 +362,6 @@ static int repeatinterval[] = { 30, 120, 600 }; /* # of secs before flush */ (f)->f_repeatcount = MAXREPEAT; \ } while (0) -/* values for f_type */ -#define F_UNUSED 0 /* unused entry */ -#define F_FILE 1 /* regular file */ -#define F_TTY 2 /* terminal */ -#define F_CONSOLE 3 /* console terminal */ -#define F_FORW 4 /* remote machine */ -#define F_USERS 5 /* list of users */ -#define F_WALL 6 /* everyone logged on */ -#define F_PIPE 7 /* pipe to program */ - static const char *TypeNames[] = { "UNUSED", "FILE", "TTY", "CONSOLE", "FORW", "USERS", "WALL", "PIPE" @@ -472,7 +473,6 @@ close_filed(struct filed *f) f->fu_forw_addr = NULL; } /* FALLTHROUGH */ - case F_FILE: case F_TTY: case F_CONSOLE: @@ -481,6 +481,8 @@ close_filed(struct filed *f) case F_PIPE: f->fu_pipe_pid = 0; break; + default: + break; } (void)close(f->f_file); f->f_file = -1; @@ -1978,6 +1980,8 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) iovlist_append(il, "\r\n"); wallmsg(f, il->iov, il->iovcnt); break; + default: + break; } } @@ -2616,6 +2620,8 @@ init(int signo) deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); close_filed(f); break; + default: + break; } } while(!STAILQ_EMPTY(&fhead)) { @@ -2713,6 +2719,8 @@ init(int signo) for (i = 0; i < MAXUNAMES && *f->fu_uname[i]; i++) printf("%s, ", f->fu_uname[i]); break; + default: + break; } if (f->f_program) printf(" (%s)", f->f_program); From nobody Thu Sep 28 15:52:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzn4vQJz4tyLY; Thu, 28 Sep 2023 15:52: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 4RxHzn4KYkz4K8P; Thu, 28 Sep 2023 15:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzSD69flA1nyZjmyKjLQDWIVTnFY6cD7BkdVSJsBPy8=; b=cdCQtVGQ3w3dzP/WPrPrzfOeWTnffq0Kqi5knGyjkYv9H+3KKR93Av1aXH9bnHh3h1h07u A3NwnvO3KYevM2fZln5/4P7CZgZttV7NAF8kTl2Z+TFahvdw+jVatKd9r7JSlMC6hnaFN0 GL0SvBzf4diDryEf7R0RawW9qba3eTi0G++KoNmgQ64MhClbUy1txCEYDjkFljV0V5jbtx nLahAnFHWczvNCVzu1S8ZkKb4S54tmgMXvSOqWijsdLS/nSFBWmn7AQZtuQ3FjlJ8tPqJm XDKBJXiTQq5OAF6bMllpb0WcJ7IJQblsdB18pjDEcu//yylw8VmB/thchGHYiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916341; a=rsa-sha256; cv=none; b=yFDJeq3/3y4rIIWVNfWPEFmwPkpjGNTn5tN31NAmIN9/Kyw+H6ZKouBAmzx8+3m8z1bVPQ OY2rDZjRy5lv1LmerjLINOsTINrXwoe3dsWyfnFEOUEWFwDbEv3YI80bQrEIYga1ANIrIp xmnutLFrg8YUR4x3rDUp1WzM0mbeXyCOEAKn+Z6bs+Z6xi0Er8h0+PqLFfjP0z2ppJDjhB gz+yg/0ljRGxleTj8+G8wJMBQAQU2Au2oL26gq2Di9bpgrT+J/zPnWZSN4Kjt+NmY9M3bU FaFDlaRfkbYbVpnEA8Jh+rCEEPw4ceIfx0FXWHEf0aAt8oevNeOnFbtGaaS3Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzSD69flA1nyZjmyKjLQDWIVTnFY6cD7BkdVSJsBPy8=; b=NtONC6xsi0DhejMB4NcL8L15OpOjTGy0l6G/AuBE4fVZilbaEKXcbIrZnX6WNRxIBc+ys3 pxreVrO7n8jIyJARVOseMfX8EED4CD0jS4Vn948+iHCf88G1uH3SgIyJlJx3dcHEFPBhYO q/gHEPYGfGdCTUwndm39RgUU8PRokUYogvNsvhzc0ckcn06jJkmSgtbTFjcV+N874t56Lt v2WHlWmymtWMuNuHMlYjZE+5QSDLXzrVX56qeY1ZJsARH1YPDxtEqkC/UitSqRXlqxA2NF vCswdMF3ZJtTvy9EufbMg9y0sBiCtFP6t1QFQZP1eL+0xrlQWsgBTyL8+kThww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzn2pw9zDHy; Thu, 28 Sep 2023 15:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqLrJ021472; Thu, 28 Sep 2023 15:52:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqLca021469; Thu, 28 Sep 2023 15:52:21 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:21 GMT Message-Id: <202309281552.38SFqLca021469@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: 931d05fc088b - main - syslogd: Read configuration outside of init loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 931d05fc088bb83a9d0b1aacbf09590b22422351 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=931d05fc088bb83a9d0b1aacbf09590b22422351 commit 931d05fc088bb83a9d0b1aacbf09590b22422351 Author: Jake Freeland AuthorDate: 2023-09-01 02:48:53 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Read configuration outside of init loop Move all configuration-file code outside of the initialization loop and into its own set of functions. Create a readconfigfile() to open the config and call parseconfigfile() to parse it. The init() function no longer returns if there was a failure to open the configuration file. Initialization will be finished, using the backup logging rules: *.ERR to /dev/console and *.PANIC to all logged in users. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41358 --- usr.sbin/syslogd/syslogd.c | 49 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 701b062802b0..bf00f4ae4cef 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2403,7 +2403,7 @@ configfiles(const struct dirent *dp) } static void -readconfigfile(FILE *cf, int allow_includes) +parseconfigfile(FILE *cf, bool allow_includes) { FILE *cf2; struct filed *f; @@ -2464,7 +2464,7 @@ readconfigfile(FILE *cf, int allow_includes) if (cf2 == NULL) continue; dprintf("reading %s\n", file); - readconfigfile(cf2, 0); + parseconfigfile(cf2, false); fclose(cf2); } free(ent); @@ -2540,6 +2540,28 @@ readconfigfile(FILE *cf, int allow_includes) } } +static void +readconfigfile(const char *path) +{ + FILE *cf; + struct filed *f; + + if ((cf = fopen(path, "r")) != NULL) { + parseconfigfile(cf, true); + (void)fclose(cf); + } else { + dprintf("cannot open %s\n", ConfFile); + f = cfline("*.ERR\t/dev/console", "*", "*", "*"); + if (f != NULL) + addfile(f); + free(f); + f = cfline("*.PANIC\t*", "*", "*", "*"); + if (f != NULL) + addfile(f); + free(f); + } +} + static void sighandler(int signo) { @@ -2555,7 +2577,6 @@ static void init(int signo) { int i; - FILE *cf; struct filed *f; char *p; char oldLocalHostName[MAXHOSTNAMELEN]; @@ -2646,27 +2667,7 @@ init(int signo) free(f); } - /* open the configuration file */ - if ((cf = fopen(ConfFile, "r")) == NULL) { - dprintf("cannot open %s\n", ConfFile); - f = cfline("*.ERR\t/dev/console", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); - f = cfline("*.PANIC\t*", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); - Initialized = 1; - - return; - } - - readconfigfile(cf, 1); - - /* close the configuration file */ - (void)fclose(cf); - + readconfigfile(ConfFile); Initialized = 1; if (Debug) { From nobody Thu Sep 28 15:52:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzq3P97z4ty9G; Thu, 28 Sep 2023 15:52: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 4RxHzp59zYz4KFV; Thu, 28 Sep 2023 15:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WP/DpYXbVXI10LpROMWKh5oNCAluHtQtueo+1u9LW90=; b=q2tTpbGCqmyHi4E9S1IVBDP1Xiz+aT8HgbCSC67+KPF4iyUjV9eT8DUAL/k8g/GxYY6lFB 4hXVXu0hBZLXy1m4FpkR9jTcR872iZrOnf0Z617qedz93xSDYoU982x6Bh9fccHygQgnj8 BgtaZbtm7ruf1NtscqoF4PS0jmuQy4C3v4ZsV6ZY78TYqDPPsXCmM8fLlq8gjYzvztNWcK ZRGdvtV989GVDjnZKdrzQYSMJWbeogfupvfUsS91x7TGxX5dhOtMHb/Gs+3InNTR0sw+7n X4r9LParF1xTGsJEpbqY/p1uR50L/P7EOC9vSI370guL4YiIR0jS6HkmYZPZDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916342; a=rsa-sha256; cv=none; b=qctr7+OOQ8lEFikfJvqapafwQzO9s74Jo7ESB1E3nG4a8nTRbjBPrq3Nmkvo0w7GOrQ7OG ZzFAatPBMmX9S90HdH6PtTLz1dW3K5+lOt2TdhG/YQf2TW4nxspiKMIU8T201VQhMDRdGj c64LkQdd3/VwbdVe0xraHkTAMNnxglik48RbHGc+D/q6REnbKTbuSiIwe9PhZoS6crYqnZ X6dtIm85NqDXYeowYGVxkubyxJIBoiNGllP85sqJEla510guUu9prrN7zxlFQJlqQYJLql c7g8HJd8rwBhY2+mtHO0O5zGzxHSULLjM/hPOzYgQ33eWNPB6fptAwJWwRPe+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WP/DpYXbVXI10LpROMWKh5oNCAluHtQtueo+1u9LW90=; b=nZPTbk9bgRYJYfw5Fa+Xgytj9/693XQ1HJmTAF2XqGxDOkm3sQeBaudOya4HANq9yYTIOX ZlrbHx/d2HWYp/l+scRijlApsOBK2nu/02NXB5wamsb1vQIVw+3aI2DrxwXgr1rdfdJ80w k+JVAZ8+hdrbmt8bU4GgqVJbMgEHLWgHxPKIDZkbm38dUSvBiABj9Ny4st1IfHoWoBj9AH hi1BpzGnKoGk1jfH8b8zBD9Bi3sAkbYkzsPr740wN/ebl4+8Ol6HvmW7gSjMeO22wr7iHm wgsKYpvVPb95FHH9XohsaPjW2FI2aStL924R7GjeIIEcfKMvB9tdmio1k1bUdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzp3wt6zD65; Thu, 28 Sep 2023 15:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqMah021523; Thu, 28 Sep 2023 15:52:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqMf8021520; Thu, 28 Sep 2023 15:52:22 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:22 GMT Message-Id: <202309281552.38SFqMf8021520@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: 2d69e4c37332 - main - syslogd: Remove addfile() and free up some memory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2d69e4c37332c396582ac93ead289d5212ce5c23 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2d69e4c37332c396582ac93ead289d5212ce5c23 commit 2d69e4c37332c396582ac93ead289d5212ce5c23 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:00 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Remove addfile() and free up some memory cfline() already allocates a filed structure on the heap, so we can avoid redundant memory allocations by skipping a second calloc() inside addfile(). addfile() can be removed altogether since a simple STAILQ_INSERT_TAIL() will add the filed to the global filed list. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41359 --- usr.sbin/syslogd/syslogd.c | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index bf00f4ae4cef..3e4dc25603b0 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -412,11 +412,9 @@ static volatile sig_atomic_t MarkSet, WantDie, WantInitialize, WantReapchild; struct iovlist; static int allowaddr(char *); -static int addfile(struct filed *); static int addpeer(struct peer *); static int addsock(struct addrinfo *, struct socklist *); -static struct filed *cfline(const char *, const char *, const char *, - const char *); +static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); static void deadq_enter(pid_t, const char *); static int deadq_remove(struct deadq_entry *); @@ -488,20 +486,6 @@ close_filed(struct filed *f) f->f_file = -1; } -static int -addfile(struct filed *f0) -{ - struct filed *f; - - f = calloc(1, sizeof(*f)); - if (f == NULL) - err(1, "malloc failed"); - *f = *f0; - STAILQ_INSERT_TAIL(&fhead, f, next); - - return (0); -} - static int addpeer(struct peer *pe0) { @@ -2406,7 +2390,6 @@ static void parseconfigfile(FILE *cf, bool allow_includes) { FILE *cf2; - struct filed *f; struct dirent **ent; char cline[LINE_MAX]; char host[MAXHOSTNAMELEN]; @@ -2533,10 +2516,7 @@ parseconfigfile(FILE *cf, bool allow_includes) } for (i = strlen(cline) - 1; i >= 0 && isspace(cline[i]); i--) cline[i] = '\0'; - f = cfline(cline, prog, host, pfilter); - if (f != NULL) - addfile(f); - free(f); + cfline(cline, prog, host, pfilter); } } @@ -2544,21 +2524,14 @@ static void readconfigfile(const char *path) { FILE *cf; - struct filed *f; if ((cf = fopen(path, "r")) != NULL) { parseconfigfile(cf, true); (void)fclose(cf); } else { dprintf("cannot open %s\n", ConfFile); - f = cfline("*.ERR\t/dev/console", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); - f = cfline("*.PANIC\t*", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); + cfline("*.ERR\t/dev/console", "*", "*", "*"); + cfline("*.PANIC\t*", "*", "*", "*"); } } @@ -2903,7 +2876,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* * Crack a configuration file line */ -static struct filed * +static void cfline(const char *line, const char *prog, const char *host, const char *pfilter) { @@ -3041,7 +3014,7 @@ cfline(const char *line, const char *prog, const char *host, "unknown priority name \"%s\"", buf); logerror(ebuf); free(f); - return (NULL); + return; } } if (!pri_cmp) @@ -3072,7 +3045,7 @@ cfline(const char *line, const char *prog, const char *host, buf); logerror(ebuf); free(f); - return (NULL); + return; } f->f_pmask[i >> 3] = pri; f->f_pcmp[i >> 3] = pri_cmp; @@ -3190,7 +3163,7 @@ cfline(const char *line, const char *prog, const char *host, f->f_type = F_USERS; break; } - return (f); + STAILQ_INSERT_TAIL(&fhead, f, next); } From nobody Thu Sep 28 15:52:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzr1SMHz4tyLk; Thu, 28 Sep 2023 15:52: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 4RxHzq6f5gz4Jqm; Thu, 28 Sep 2023 15:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jw7KvOlx1VSa0coKcBybYAWZxx9XOl1OLK1ZosOgp8A=; b=kjxR+blxmVhdnD8NSjYcxUB65Rgv9hBr6ZnhMPF1u1TW0QjwBbolLgW2yG/p2Bp5DqyjWc Sd1wHObiLytXs4L/oTxadc4csfOV2VdTG84xLr7t4w8k1ABCa2HnlOcGwLOPg08Kf+xAni oZmxNuTD/yolVsaKc94esHTzxgRiGvyJOeYl2XFisndNGbL48KTyHrOgnbY1kCSMVvzPPT e94ZOKrA9CIiGAZsFxiapBAgw+pyPb0aq91JZpo1QAagSbf9ujcVbniS61207ptA/uIeaU NxgT9Tcldfks/bxzVn557ub/XqjR8Pwx7WXV1Xmc/XTW3vW5r5LC4qVoaqWKoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916343; a=rsa-sha256; cv=none; b=Z4IY7/pFMami49IlUE5j1qgAVUBxkO4GY+BXL119RJ3saRWnHPk87Hk2tJbrjt/A6oZsXS /aarbAwgcLyt03HbV1GqKJE2zINEbfUWpwTHtSSiqYkAs55OEpPsx7jTAxdpaaXPhjxhb+ W0EJhCHXxFp8PetfrIMwUvhHKN3L1eaBhDl1uOhSAu+qvaykbiU0rFRDORCkEbjncgtImO ni3Yc/PtJzG3yod2VHBwMEx8ije6I9Rm2nOJBSHjPXU0ePJElYxBg+s6+gVv1+Ex8Ql0LW elQwagWqByy74wvFYS/NzuFZhYTJIXsbPRiistNC+kTmnz5lyhHxSTEowt7PwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jw7KvOlx1VSa0coKcBybYAWZxx9XOl1OLK1ZosOgp8A=; b=xzfqzlVPGCgc5L87ZvP17sHkSbzYdFLipHuXZjYtFCX+Y7MaoNXhhbJ7gVqB4gJQnR+L6v k0cWik64/pBZB4K1Yrg4F17ZsIWJCzUgBoOQ3kRpBXqCkJX9VoYrx5CFiwjuR8IHlNR6MU YtqVp0VIw54bL/nhsPEiWOXCiT0g3MecBaUrl5kLUD8eB2rmrnJpv2RLDo7JAJy+uRHEAG xHfelIJhSleMzxixIvLP+HMko0/DYc+UPJASPcYyEdlqljI4rHc9vYctl1yh10/fDJJxbQ oFbLW18jq+Y4sEhAamtKyZ+mhESS1tEADBy5vBE2M5z46MZdxS46/Voh4NpD9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzq5BSkzDJ2; Thu, 28 Sep 2023 15:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqNLc021571; Thu, 28 Sep 2023 15:52:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqNEI021568; Thu, 28 Sep 2023 15:52:23 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:23 GMT Message-Id: <202309281552.38SFqNEI021568@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: 8113e030f96f - main - syslogd: Move fhead under filed struct declaration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8113e030f96fb29a6ea03d55377cb97725c20576 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8113e030f96fb29a6ea03d55377cb97725c20576 commit 8113e030f96fb29a6ea03d55377cb97725c20576 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:07 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Move fhead under filed struct declaration Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41360 --- usr.sbin/syslogd/syslogd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 3e4dc25603b0..0f0a3cac1417 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -307,6 +307,10 @@ struct filed { #define FFLAG_SYNC 0x01 #define FFLAG_NEEDSYNC 0x02 }; +static STAILQ_HEAD(, filed) fhead = + STAILQ_HEAD_INITIALIZER(fhead); /* Log files that we write to */ +static struct filed consfile; /* Console */ + /* * Queue of about-to-be dead processes we should watch out for. @@ -367,10 +371,6 @@ static const char *TypeNames[] = { "FORW", "USERS", "WALL", "PIPE" }; -static STAILQ_HEAD(, filed) fhead = - STAILQ_HEAD_INITIALIZER(fhead); /* Log files that we write to */ -static struct filed consfile; /* Console */ - static int Debug; /* debug flag */ static int Foreground = 0; /* Run in foreground, instead of daemonizing */ static int resolve = 1; /* resolve hostname */ From nobody Thu Sep 28 15:52:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzs28Shz4tyJZ; Thu, 28 Sep 2023 15:52: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 4RxHzs07mJz4K9D; Thu, 28 Sep 2023 15:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJqxrK3YWzrxT0MMww6hqfQcIRatvNUuJ7zZdzTnASI=; b=GEFCbD742Nr5Yty55+qZTE/TUj/i7NOcDgjgdotS9rbvQlC1dkuQsENimnKlfaRBo5tfpC 5L0dIi+bNR04LnLgHMPF6ddeYkNQDpO4rSVSLivJcibKy/5eUaIWC0SvJx/wMGsja6O5s9 ywbMWTjy7FxKEXBV6008G9naIrsZVzsOBssMUj942j+0cUlQoKNKDgX6GSuIH0fmL8I12Q bUWIj3CMkNIdiwOyldeZi15SyDGFT6n/zx7jZl5H6LKnHsOz7b3UGRq3W7YYUjGi8R8v+B ni+21kPfp3QeRdPCzqO+5imWDL2YgYmVCsyDK5UVFPbI7mCMKnmUmhaSavHCSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916345; a=rsa-sha256; cv=none; b=JChd1+MFeoRc3ZZv2iemOLT4GIYOkDeLsI6tGRx9jlAc/l3oj4NxG2Quv6ivq0zbE8a/Vl Z5ZN07Je9XEWVt+NTt3IC8Er9doLbXJE46Tb5LDolJstAn/SyCAsjXUDQ1rvVnG0iwwvl1 tJv0k3DQThkrVBrmsJiOGRGXP82Hj1s6HDApexrCIxYEo2fGRLzgupLD1vOt5mc53FOahs bhBfgaJ+ZTIQ9bADWq0cqB1OrIj8JPcI4R1fbjvwIpRgvuND+LyTXWyK/nX434Rpoj96Xs oROnBjPhtlLwWWZkuJ2A8p0yiS8rqVe7MoheFRbQwiySvdWMsR4qmemQHfz8pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJqxrK3YWzrxT0MMww6hqfQcIRatvNUuJ7zZdzTnASI=; b=T9x33+jaoWk7iYVdpcurQjgoaZjqwo0MufyIDVzRm3ns3lZ2SAG5W8PLLeBA9BqtQBo8Qu qgPZp9rg9qB0XJPRQWD0M4GZ3oucn68IimvjYFEXYJV8kQFS52uw22IGNZIeWUkviqjuJ2 N/rp9ZybV1txSg52UnoWj/U9s6WYTXMQTXSyL4WnrMX4ep872abefovdNEzigN0ngjmyjC CJpnNYI9QfgovrBZguSs+CIZhrlAXts0TW1Wh69trqfoBKcjnN+z4oPh2Vq8UpBfmjWNpe n1N0A7BeYvysN6M8jkWnPB/weLdPSU+xvZXQCBGENwW5sseRwDCSQ0hrGpA+/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 4RxHzr5l52zCqR; Thu, 28 Sep 2023 15:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqOkT021626; Thu, 28 Sep 2023 15:52:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqOrt021623; Thu, 28 Sep 2023 15:52:24 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:24 GMT Message-Id: <202309281552.38SFqOrt021623@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: 3f8b49dd1af1 - main - syslogd: Replace int with bool, where applicable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3f8b49dd1af1cff852d57c44096b24091a2930f8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3f8b49dd1af1cff852d57c44096b24091a2930f8 commit 3f8b49dd1af1cff852d57c44096b24091a2930f8 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:14 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Replace int with bool, where applicable Many of syslogd's global configuration options are declared as integers but are treated as booleans. Declare those options as booleans instead. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41362 --- usr.sbin/syslogd/syslogd.c | 59 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 0f0a3cac1417..c8420298f117 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -371,15 +371,15 @@ static const char *TypeNames[] = { "FORW", "USERS", "WALL", "PIPE" }; -static int Debug; /* debug flag */ -static int Foreground = 0; /* Run in foreground, instead of daemonizing */ -static int resolve = 1; /* resolve hostname */ +static bool Debug; /* debug flag */ +static bool Foreground = false; /* Run in foreground, instead of daemonizing */ +static bool resolve = true; /* resolve hostname */ static char LocalHostName[MAXHOSTNAMELEN]; /* our hostname */ static const char *LocalDomain; /* our local domain name */ -static int Initialized; /* set when we have initialized ourselves */ +static bool Initialized; /* set when we have initialized ourselves */ static int MarkInterval = 20 * 60; /* interval between marks in seconds */ static int MarkSeq; /* mark sequence number */ -static int NoBind; /* don't bind() as suggested by RFC 3164 */ +static bool NoBind; /* don't bind() as suggested by RFC 3164 */ static int SecureMode; /* when true, receive only unix domain socks */ static int MaxForwardLen = 1024; /* max length of forwared message */ #ifdef INET6 @@ -395,14 +395,14 @@ static int logflags = O_WRONLY|O_APPEND; /* flags used to open log files */ static char bootfile[MAXPATHLEN]; /* booted kernel file */ -static int RemoteAddDate; /* Always set the date on remote messages */ -static int RemoteHostname; /* Log remote hostname from the message */ +static bool RemoteAddDate; /* Always set the date on remote messages */ +static bool RemoteHostname; /* Log remote hostname from the message */ -static int UniquePriority; /* Only log specified priority? */ +static bool UniquePriority; /* Only log specified priority? */ static int LogFacPri; /* Put facility and priority in log message: */ /* 0=no, 1=numeric, 2=names */ -static int KeepKernFac; /* Keep remotely logged kernel facility */ -static int needdofsync = 0; /* Are any file(s) waiting to be fsynced? */ +static bool KeepKernFac; /* Keep remotely logged kernel facility */ +static bool needdofsync = false; /* Are any file(s) waiting to be fsynced? */ static struct pidfh *pfh; static int sigpipe[2]; /* Pipe to catch a signal during select(). */ static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ @@ -526,7 +526,8 @@ addsock(struct addrinfo *ai, struct socklist *sl0) int main(int argc, char *argv[]) { - int ch, i, s, fdsrmax = 0, bflag = 0, pflag = 0, Sflag = 0; + int ch, i, s, fdsrmax = 0; + bool bflag = false, pflag = false, Sflag = false; fd_set *fdsr = NULL; struct timeval tv, *tvp; struct peer *pe; @@ -554,14 +555,14 @@ main(int argc, char *argv[]) mask_C1 = 0; break; case 'A': - send_to_all++; + send_to_all = true; break; case 'a': /* allow specific network addresses only */ if (allowaddr(optarg) == -1) usage(); break; case 'b': - bflag = 1; + bflag = true; p = strchr(optarg, ']'); if (p != NULL) p = strchr(p + 1, ':'); @@ -593,19 +594,19 @@ main(int argc, char *argv[]) logflags |= O_CREAT; break; case 'd': /* debug */ - Debug++; + Debug = true; break; case 'f': /* configuration file */ ConfFile = optarg; break; case 'F': /* run in foreground instead of daemon */ - Foreground++; + Foreground = true; break; case 'H': - RemoteHostname = 1; + RemoteHostname = true; break; case 'k': /* keep remote kern fac */ - KeepKernFac = 1; + KeepKernFac = true; break; case 'l': case 'p': @@ -619,10 +620,10 @@ main(int argc, char *argv[]) mode = DEFFILEMODE; else if (ch == 'p') { mode = DEFFILEMODE; - pflag = 1; + pflag = true; } else { mode = S_IRUSR | S_IWUSR; - Sflag = 1; + Sflag = true; } if (optarg[0] == '/') name = optarg; @@ -660,12 +661,12 @@ main(int argc, char *argv[]) MarkInterval = atoi(optarg) * 60; break; case 'N': - NoBind = 1; + NoBind = true; if (!SecureMode) SecureMode = 1; break; case 'n': - resolve = 0; + resolve = false; break; case 'O': if (strcmp(optarg, "bsd") == 0 || @@ -678,7 +679,7 @@ main(int argc, char *argv[]) usage(); break; case 'o': - use_bootfile = 1; + use_bootfile = true; break; case 'P': /* path for alt. PID */ PidFile = optarg; @@ -687,10 +688,10 @@ main(int argc, char *argv[]) SecureMode++; break; case 'T': - RemoteAddDate = 1; + RemoteAddDate = true; break; case 'u': /* only log specified priority */ - UniquePriority++; + UniquePriority = true; break; case 'v': /* log facility and priority */ LogFacPri++; @@ -793,7 +794,7 @@ main(int argc, char *argv[]) errx(1, "calloc fd_set"); for (;;) { - if (Initialized == 0) + if (!Initialized) init(0); else if (WantInitialize) init(WantInitialize); @@ -818,7 +819,7 @@ main(int argc, char *argv[]) switch (i) { case 0: dofsync(); - needdofsync = 0; + needdofsync = false; if (tvp) { tvp = NULL; if (ppid != 1) @@ -1917,7 +1918,7 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) } } else if ((flags & SYNC_FILE) && (f->f_flags & FFLAG_SYNC)) { f->f_flags |= FFLAG_NEEDSYNC; - needdofsync = 1; + needdofsync = true; } break; @@ -2597,7 +2598,7 @@ init(int signo) /* * Close all open log files. */ - Initialized = 0; + Initialized = false; STAILQ_FOREACH(f, &fhead, next) { /* flush any pending output */ if (f->f_prevcount) @@ -2641,7 +2642,7 @@ init(int signo) } readconfigfile(ConfFile); - Initialized = 1; + Initialized = true; if (Debug) { int port; From nobody Thu Sep 28 15:52:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzt10N3z4txsn; Thu, 28 Sep 2023 15:52: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 4RxHzt0SFbz4K9c; Thu, 28 Sep 2023 15:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fuWb5g0HiJpN5KnC3HqKNlLVQvSI6EeKzG9rzdDOKo0=; b=bkogasuItkOICtk9Qgk10y6TZhf0Ivm5oGm8ZL0Jx6xC1fYq493QDuuvHq/djukoG4FJwZ WFC4Or7W2nhFW3qw2FeJ5iPidTF25tGl6+SRlZM+valE6vJxVqU1nKPva4rkx0MboUMeDE GWwbD1fkhqm5m05N84mr9bu0iQLt71DDGChUWI/UP44uW2C2p8cJ59xEcUGUaJu1XGRgBB jTyInNsNAATzEfk4lkKGQMzoGKXOTf0wVf6X1fSGYWdU1htnPFHgSIjXEy2taVaCvtWw/1 5GPjnHGGHXSUdLoURRQFvK5eCeO99OIf3q/vd3hD5usFz0NkKHCS/kge0NtfOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916346; a=rsa-sha256; cv=none; b=q7C4pHSVXjdAKtnLJ1Ix4SNZDyVNjejIO7kLqkNsrKlEXOs4rArH1kH5tzQRn8/AjPoLiW BBGWCZ3keJr2h8luyB1eOlXJR/IS919RYgx2WA1ZIIbgpiJB9ScovSKj3B39lyoIxeM04X /2OojwuMHStQvo/VET9HqjzYR5J2n6G75WrZ3UoTKK3PEhxv/Hxaxdxve8Ls/iHk1v8eZA ynvNeegXaOKxRWbi0HRhn4ks/i1se2P/KXUNNIsys7I1Js2uvu+k0A9vxtwgR7v49M5GNH nUTeF7iCsu8pohJyv+5UG51moAiTAZ4OPNalBsY9gqUBDkl4H7zc54kw+bmvbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fuWb5g0HiJpN5KnC3HqKNlLVQvSI6EeKzG9rzdDOKo0=; b=indQsSJZzoMcuSgHTnmpDPvKM2yeTZzq8mja9XW4R39EPiRfMF/AxecHCAYZb0Q/VaIzG/ 9bCAMopWB/Bn2Cn7YXFuLZ7hAB3vEBrcOmdYSQPyRUQnptQ/yIrG1nL9GItLJKa5c7NZGD NsJGn3mudpIc0NXHxnXVOTTo1zpXvAL6rF1i68hX+uFVZTetBK9oMsPZAOgN8YFNbgr4mH oEmuiRqylMfcVXdLS/MyxfRcP13OvqOiYbVFgEYSZC5dCOR5z41EX9dzT1OqHHze3A2UAO GEylDffAmldEI8mkLKjt3Zvr4LaKyVjLT3g3HA+psbtr+q8ualyW46PCL+UREA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzs6fcZzD66; Thu, 28 Sep 2023 15:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqPQN021675; Thu, 28 Sep 2023 15:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqPKB021672; Thu, 28 Sep 2023 15:52:25 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:25 GMT Message-Id: <202309281552.38SFqPKB021672@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: f804f2365081 - main - syslogd: Centralize operations into a kevent loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f804f23650815dd3a96b3ab2b24152d25c7364c3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f804f23650815dd3a96b3ab2b24152d25c7364c3 commit f804f23650815dd3a96b3ab2b24152d25c7364c3 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:29 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Centralize operations into a kevent loop Use kqueue(2) for socket I/O and signal notification. Previously, select(2) and traditional signal handlers were being used. This change centralizes all of the async notification delivery into a single loop so future Capsicum sandboxing will be easier. It also simplifies the code by removing boiler-plate cruft that comes with the older interfaces. Reviewed by: Slawa Olhovchenkov, markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41363 --- usr.sbin/syslogd/syslogd.c | 226 +++++++++++++++++---------------------------- 1 file changed, 86 insertions(+), 140 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c8420298f117..21e2d48b0c37 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -104,6 +104,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #define RCVBUF_MINSIZE (80 * 1024) /* minimum size of dgram rcv buffer */ #include +#include #include #include #include @@ -371,6 +372,16 @@ static const char *TypeNames[] = { "FORW", "USERS", "WALL", "PIPE" }; +static const int sigcatch[] = { + SIGHUP, + SIGINT, + SIGQUIT, + SIGPIPE, + SIGALRM, + SIGTERM, + SIGCHLD, +}; + static bool Debug; /* debug flag */ static bool Foreground = false; /* Run in foreground, instead of daemonizing */ static bool resolve = true; /* resolve hostname */ @@ -402,13 +413,10 @@ static bool UniquePriority; /* Only log specified priority? */ static int LogFacPri; /* Put facility and priority in log message: */ /* 0=no, 1=numeric, 2=names */ static bool KeepKernFac; /* Keep remotely logged kernel facility */ -static bool needdofsync = false; /* Are any file(s) waiting to be fsynced? */ +static bool needdofsync = true; /* Are any file(s) waiting to be fsynced? */ static struct pidfh *pfh; -static int sigpipe[2]; /* Pipe to catch a signal during select(). */ static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ -static volatile sig_atomic_t MarkSet, WantDie, WantInitialize, WantReapchild; - struct iovlist; static int allowaddr(char *); @@ -421,9 +429,7 @@ static int deadq_remove(struct deadq_entry *); static int deadq_removebypid(pid_t); static int decode(const char *, const CODE *); static void die(int) __dead2; -static void dodie(int); static void dofsync(void); -static void domark(int); static void fprintlog_first(struct filed *, const char *, const char *, const char *, const char *, const char *, const char *, int); static void fprintlog_write(struct filed *, struct iovlist *, int); @@ -437,8 +443,6 @@ static void markit(void); static int socksetup(struct peer *); static int socklist_recv_file(struct socklist *); static int socklist_recv_sock(struct socklist *); -static int socklist_recv_signal(struct socklist *); -static void sighandler(int); static int skip_message(const char *, const char *, int); static int evaluate_prop_filter(const struct prop_filter *filter, const char *value); @@ -526,14 +530,14 @@ addsock(struct addrinfo *ai, struct socklist *sl0) int main(int argc, char *argv[]) { - int ch, i, s, fdsrmax = 0; - bool bflag = false, pflag = false, Sflag = false; - fd_set *fdsr = NULL; - struct timeval tv, *tvp; - struct peer *pe; + sigset_t sigset = { }; + struct kevent ev; struct socklist *sl; - pid_t ppid = 1, spid; + struct peer *pe; + pid_t ppid = -1, spid; + int ch, kq, s; char *p; + bool bflag = false, pflag = false, Sflag = false; if (madvise(NULL, 0, MADV_PROTECT) != 0) dprintf("madvise() failed: %s\n", strerror(errno)); @@ -705,17 +709,6 @@ main(int argc, char *argv[]) if (RFC3164OutputFormat && MaxForwardLen > 1024) errx(1, "RFC 3164 messages may not exceed 1024 bytes"); - /* Pipe to catch a signal during select(). */ - s = pipe2(sigpipe, O_CLOEXEC); - if (s < 0) { - err(1, "cannot open a pipe for signals"); - } else { - addsock(NULL, &(struct socklist){ - .sl_socket = sigpipe[0], - .sl_recv = socklist_recv_signal - }); - } - /* Listen by default: /dev/klog. */ s = open(_PATH_KLOG, O_RDONLY | O_NONBLOCK | O_CLOEXEC, 0); if (s < 0) { @@ -767,108 +760,82 @@ main(int argc, char *argv[]) (void)strlcpy(consfile.fu_fname, ctty + sizeof _PATH_DEV - 1, sizeof(consfile.fu_fname)); (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); - (void)signal(SIGTERM, dodie); - (void)signal(SIGINT, Debug ? dodie : SIG_IGN); - (void)signal(SIGQUIT, Debug ? dodie : SIG_IGN); - (void)signal(SIGHUP, sighandler); - (void)signal(SIGCHLD, sighandler); - (void)signal(SIGALRM, domark); - (void)signal(SIGPIPE, SIG_IGN); /* We'll catch EPIPE instead. */ + + kq = kqueue(); + if (kq == -1) { + warn("failed to initialize kqueue"); + pidfile_remove(pfh); + exit(1); + } + STAILQ_FOREACH(sl, &shead, next) { + EV_SET(&ev, sl->sl_socket, EVFILT_READ, EV_ADD, 0, 0, sl); + if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { + warn("failed to add kevent to kqueue"); + pidfile_remove(pfh); + exit(1); + } + } + for (size_t i = 0; i < nitems(sigcatch); ++i) { + EV_SET(&ev, sigcatch[i], EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); + if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { + warn("failed to add kevent to kqueue"); + pidfile_remove(pfh); + exit(1); + } + (void)sigaddset(&sigset, sigcatch[i]); + } + if (sigprocmask(SIG_BLOCK, &sigset, NULL) != 0) { + warn("failed to apply signal mask"); + pidfile_remove(pfh); + exit(1); + } (void)alarm(TIMERINTVL); /* tuck my process id away */ pidfile_write(pfh); dprintf("off & running....\n"); - - tvp = &tv; - tv.tv_sec = tv.tv_usec = 0; - - STAILQ_FOREACH(sl, &shead, next) { - if (sl->sl_socket > fdsrmax) - fdsrmax = sl->sl_socket; - } - fdsr = (fd_set *)calloc(howmany(fdsrmax+1, NFDBITS), - sizeof(*fdsr)); - if (fdsr == NULL) - errx(1, "calloc fd_set"); - + init(false); for (;;) { - if (!Initialized) - init(0); - else if (WantInitialize) - init(WantInitialize); - if (WantReapchild) - reapchild(WantReapchild); - if (MarkSet) - markit(); - if (WantDie) { - free(fdsr); - die(WantDie); - } - - bzero(fdsr, howmany(fdsrmax+1, NFDBITS) * - sizeof(*fdsr)); - - STAILQ_FOREACH(sl, &shead, next) { - if (sl->sl_socket != -1 && sl->sl_recv != NULL) - FD_SET(sl->sl_socket, fdsr); - } - i = select(fdsrmax + 1, fdsr, NULL, NULL, - needdofsync ? &tv : tvp); - switch (i) { - case 0: + if (needdofsync) { dofsync(); - needdofsync = false; - if (tvp) { - tvp = NULL; - if (ppid != 1) - kill(ppid, SIGALRM); + if (ppid != -1) { + kill(ppid, SIGALRM); + ppid = -1; } - continue; - case -1: + } + if (kevent(kq, NULL, 0, &ev, 1, NULL) == -1) { if (errno != EINTR) - logerror("select"); + logerror("kevent"); continue; } - STAILQ_FOREACH(sl, &shead, next) { - if (FD_ISSET(sl->sl_socket, fdsr)) - (*sl->sl_recv)(sl); - } - } - free(fdsr); -} - -static int -socklist_recv_signal(struct socklist *sl __unused) -{ - ssize_t len; - int i, nsig, signo; - - if (ioctl(sigpipe[0], FIONREAD, &i) != 0) { - logerror("ioctl(FIONREAD)"); - err(1, "signal pipe read failed"); - } - nsig = i / sizeof(signo); - dprintf("# of received signals = %d\n", nsig); - for (i = 0; i < nsig; i++) { - len = read(sigpipe[0], &signo, sizeof(signo)); - if (len != sizeof(signo)) { - logerror("signal pipe read failed"); - err(1, "signal pipe read failed"); - } - dprintf("Received signal: %d from fd=%d\n", signo, - sigpipe[0]); - switch (signo) { - case SIGHUP: - WantInitialize = 1; + switch (ev.filter) { + case EVFILT_READ: + sl = ev.udata; + if (sl->sl_socket != -1 && sl->sl_recv != NULL) + sl->sl_recv(sl); break; - case SIGCHLD: - WantReapchild = 1; + case EVFILT_SIGNAL: + switch (ev.ident) { + case SIGHUP: + init(true); + break; + case SIGINT: + case SIGQUIT: + case SIGTERM: + if (ev.ident == SIGTERM || Debug) + die(ev.ident); + break; + case SIGALRM: + markit(); + break; + case SIGCHLD: + reapchild(ev.ident); + break; + } break; } } - return (0); } static int @@ -1758,6 +1725,7 @@ dofsync(void) (void)fsync(f->f_file); } } + needdofsync = false; } /* @@ -2259,7 +2227,6 @@ reapchild(int signo __unused) } } } - WantReapchild = 0; } /* @@ -2298,20 +2265,6 @@ cvthname(struct sockaddr *f) return (hname); } -static void -dodie(int signo) -{ - - WantDie = signo; -} - -static void -domark(int signo __unused) -{ - - MarkSet = 1; -} - /* * Print syslogd errors some place. */ @@ -2536,14 +2489,6 @@ readconfigfile(const char *path) } } -static void -sighandler(int signo) -{ - - /* Send an wake-up signal to the select() loop. */ - write(sigpipe[1], &signo, sizeof(signo)); -} - /* * INIT -- Initialize syslogd from configuration table */ @@ -2558,7 +2503,6 @@ init(int signo) char bootfileMsg[MAXLINE + 1]; dprintf("init\n"); - WantInitialize = 0; /* * Load hostname (may have changed). @@ -3245,7 +3189,6 @@ markit(void) dq->dq_timeout--; } } - MarkSet = 0; (void)alarm(TIMERINTVL); } @@ -3621,6 +3564,7 @@ validate(struct sockaddr *sa, const char *hname) static int p_open(const char *prog, pid_t *rpid) { + sigset_t sigset = { }; int pfd[2], nulldesc; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ @@ -3650,10 +3594,12 @@ p_open(const char *prog, pid_t *rpid) alarm(0); - /* Restore signals marked as SIG_IGN. */ - (void)signal(SIGINT, SIG_DFL); - (void)signal(SIGQUIT, SIG_DFL); - (void)signal(SIGPIPE, SIG_DFL); + for (size_t i = 0; i < nitems(sigcatch); ++i) + (void)sigaddset(&sigset, sigcatch[i]); + if (sigprocmask(SIG_UNBLOCK, &sigset, NULL) != 0) { + logerror("sigprocmask"); + exit(1); + } dup2(pfd[0], STDIN_FILENO); dup2(nulldesc, STDOUT_FILENO); From nobody Thu Sep 28 15:52:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzv2G49z4tyNQ; Thu, 28 Sep 2023 15:52: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 4RxHzv1br5z4KJl; Thu, 28 Sep 2023 15:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cdmP0TlG0MvzRQUrpMZVBPtX22woAVrMjek0jPH1Qy0=; b=HwI8FKPQoSYHu/1q4YZ44iGsE3o4NLIq6ErMC36/f1fv3wkGegvntokthIYnh8bvxyXyeJ TbuuRq6CmVi+58uhsamM/KJtiVuJM8zgqw63QSxrj0IBoHh4URQruzQozIrk4OeycEHJuX 6oyFX/+Ic86PZX0Kab9VOQKQRn7/2L41WELxc63XKfnhQ6UjAwS4InUJEwFKkCKfQVh6kr 2uRU3CMDcQiJNOy//z6GS0NUxPJhkqfXPvLIcW0PZKqRZuBfPNszsusmqXJNSRXAC/odkw KgN5KUgMK27hPh43fZB2m2qUNqu/2JyYvAavZUWBAIKScHLDMMSXJ473hHdXQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916347; a=rsa-sha256; cv=none; b=AjKeuXPmXlfZJivRLX3utHSi4be5vNUTHSLcabsAPKhzV12cScCrcZTnS3NrGW4uBciAF3 sJaqDdHVxwyDUXVCsS7/vdVwaBspK/VY/sZjVpNvwcUoJfr4FGO4hr+mqm8p/wK8KK+6NY wqHM+bYCM4bKVt++DIAAQQ8Qk+OGH2KOGXtBJwkeT5X6KGBMPSoLnNVKtWxMRl3+xNTvtR e9kM1pU1Ms1lN2c2WEa9+jMlr5J/I9Wd9CiS1jlbc2ZIrOdHF939BgQ+XfeMq8b6BOrqpE CjQcMH898s5D+rKfQZ5mlzsGXaHHaCOWwc1/DDpbJsSJewYU38aMONCG4xY2wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cdmP0TlG0MvzRQUrpMZVBPtX22woAVrMjek0jPH1Qy0=; b=mxhYRock57Q1RmuNrbtGiwaStxiWsgdHZqG4NabIaiwkrZwdKneE3xtZyNhD3kYHG1/mIC GkWcv5QOqoULshwF7g/GXvkP5XwqA5FW9OvGxNxnaP0S2w0g0dUesbFhly5JwM2CGP1FHN vtN2YLOfae8EQZOkvkwksfDm0iBNvjYEns0Y+1ci/w3D52kAn9gdgS5xeyNYmQ2rIF3dcY Qp8cPyZsBH+xRHhM4zydQliAnR+xktoy/u5tvP9Ps45Z/vSoRnXNJP+KpoPuscItJmKfth aY68iOAz1Q770PhGEwwg0EBLOKiXtTCRRALVjIkY7E4Y5gWdRr7BRWCpEEsTSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzv0H5YzDL3; Thu, 28 Sep 2023 15:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqQph021723; Thu, 28 Sep 2023 15:52:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqQGS021720; Thu, 28 Sep 2023 15:52:26 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:26 GMT Message-Id: <202309281552.38SFqQGS021720@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: 1bb61348e69e - main - syslogd: Use boolean reload parameter for init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1bb61348e69e6facc1fbac49d82236218028eeb8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1bb61348e69e6facc1fbac49d82236218028eeb8 commit 1bb61348e69e6facc1fbac49d82236218028eeb8 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:36 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Use boolean reload parameter for init() Replace init()'s integer "signo" parameter with boolean "reload" for clarity. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41416 --- usr.sbin/syslogd/syslogd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 21e2d48b0c37..b61a10c20aca 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -434,7 +434,7 @@ static void fprintlog_first(struct filed *, const char *, const char *, const char *, const char *, const char *, const char *, int); static void fprintlog_write(struct filed *, struct iovlist *, int); static void fprintlog_successive(struct filed *, int); -static void init(int); +static void init(bool); static void logerror(const char *); static void logmsg(int, const struct logtime *, const char *, const char *, const char *, const char *, const char *, const char *, int); @@ -2493,7 +2493,7 @@ readconfigfile(const char *path) * INIT -- Initialize syslogd from configuration table */ static void -init(int signo) +init(bool reload) { int i; struct filed *f; @@ -2507,7 +2507,7 @@ init(int signo) /* * Load hostname (may have changed). */ - if (signo != 0) + if (reload) (void)strlcpy(oldLocalHostName, LocalHostName, sizeof(oldLocalHostName)); if (gethostname(LocalHostName, sizeof(LocalHostName))) @@ -2651,9 +2651,9 @@ init(int signo) NULL, NULL, "restart", 0); dprintf("syslogd: restarted\n"); /* - * Log a change in hostname, but only on a restart. + * Log a change in hostname, but only on reload. */ - if (signo != 0 && strcmp(oldLocalHostName, LocalHostName) != 0) { + if (reload && strcmp(oldLocalHostName, LocalHostName) != 0) { (void)snprintf(hostMsg, sizeof(hostMsg), "hostname changed, \"%s\" to \"%s\"", oldLocalHostName, LocalHostName); @@ -2663,9 +2663,9 @@ init(int signo) } /* * Log the kernel boot file if we aren't going to use it as - * the prefix, and if this is *not* a restart. + * the prefix, and if this is *not* a reload. */ - if (signo == 0 && !use_bootfile) { + if (!reload && !use_bootfile) { (void)snprintf(bootfileMsg, sizeof(bootfileMsg), "kernel boot file is %s", bootfile); logmsg(LOG_KERN | LOG_INFO, NULL, LocalHostName, "syslogd", From nobody Thu Sep 28 15:52:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzw2kF8z4tyCm; Thu, 28 Sep 2023 15:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzw2Lc5z4KH8; Thu, 28 Sep 2023 15:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/CStJWQACuVDSyuD1dpKTiRglEL0S6Bd/gSeJ2qeZc=; b=ikhKlImCDev5/iYPaqgeRC+QQkikBvA+jWZttY2fvk+Vs7x6K1DTmhyZSdLMehct0kYbbE edvpNz7E6kNHIVkIybz8p0oOcM3S1s0IBa8TbNaBEf5UlQDDbHIJW9t0ShTdj015beQ7Zi aWmsvWDBEjH3QAf5i9AMBeVtKFxB/8dQMAoFegFWY8hl9gpJiwp9CsiwB1Tq+Xz/nl8cmd 1yWptIEJVg179ZDIfVyod4Zr7JEkSOGKLL8XGeZLtaWDkBvBhmKYqfHMrxRPmK3hWEs2xG 8t0e0nb4javS3B0zXUi2kJHLmlCIETgcimZdjDJyYDv0EAFM4/mYJP6BcrJR/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916348; a=rsa-sha256; cv=none; b=TIF3u7v6dtEnMMYqv47oPWkK6sC/wDf5qxGe5xUrHXYyaJTFL129Sg+EYk+eref/Aumvds FjhiqiK6HBqQK2Dd32EezfW4iwEWU6/O7RFmZaStWZGBK58gO3p2OdEwMLAGFOCEFneS9Y 48AQSBDBS7p58XVi7vDjLU2qg/PDyb0Q8196JqPdcS1iNacOFkIE2bdWBHVl8pIZYRX/8B R5Tj3+aHSj3N+qzsbi+zaZFtt665hQT0EHxTr5d4mdhUYDIHpcYTlERTSaEMJCFlJ4Ka+B WpPoIr5oABJL9djqbvLM0yQ//qQcd6bs9eWDDTiuFZE070A+VVq+jEEErynqRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/CStJWQACuVDSyuD1dpKTiRglEL0S6Bd/gSeJ2qeZc=; b=Wdjdue1PQ3VY30CwItY30wKxjAPuq4WElptdoFwrzueckqOCTsk4gxLfkaMTC6Mrg4nnVi yhIlvZlyhHj3aPwxZY58GtlZFZvTsN2eduhOjR3CS6kRBHN+MhSuGG/YtFi6g0IHcHTu/o B5i8+zKHTndBn6ALgtdbZhqLIigWELWr5/JS8TpkKCnvcnzx1P2SK1itOK8NBpPTTdNwOU jzH5dIqds5RzdEHgEv6aPPR1g34JLPZNv9UO0033DWrClXjvGMewAezc1c7GPnsB2dOKYF ymbU4e1wIaxVNJ2+5k1UvuPxNxh2f/NrpYl9R4nB9S9WZHYMM84Di5zT1rZp9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzw1JzwzCTg; Thu, 28 Sep 2023 15:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqSYr021771; Thu, 28 Sep 2023 15:52:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqS61021768; Thu, 28 Sep 2023 15:52:28 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:28 GMT Message-Id: <202309281552.38SFqS61021768@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: f30b063ee667 - main - syslogd: Only use peerlist during flag parsing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f30b063ee6678d8192a075bf907773b8b54d4354 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f30b063ee6678d8192a075bf907773b8b54d4354 commit f30b063ee6678d8192a075bf907773b8b54d4354 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:45 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Only use peerlist during flag parsing Add logging sockets directly to the socklist, unless parsing flags. The peerlist is still needed to temporarily hold socket information until the configuration flags have been parsed. It is tempting to remove the entire peerlist, but addsock() can not determine if syslogd is in secure mode unless the flags have been parsed. Also, call pidfile_open() right after flag parsing so we can terminate if another syslogd instance is already running. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41364 --- usr.sbin/syslogd/syslogd.c | 421 ++++++++++++++++++++++----------------------- 1 file changed, 201 insertions(+), 220 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index b61a10c20aca..c03acf301fd8 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -176,7 +176,8 @@ static const char include_ext[] = ".conf"; (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 ) #endif /* - * List of peers and sockets for binding. + * List of peers and sockets that can't be bound until + * flags have been parsed. */ struct peer { const char *pe_name; @@ -186,13 +187,16 @@ struct peer { }; static STAILQ_HEAD(, peer) pqueue = STAILQ_HEAD_INITIALIZER(pqueue); +/* + * Sockets used for logging; monitored by kevent(). + */ struct socklist { struct addrinfo sl_ai; #define sl_sa sl_ai.ai_addr #define sl_salen sl_ai.ai_addrlen #define sl_family sl_ai.ai_family int sl_socket; - struct peer *sl_peer; + const char *sl_name; int (*sl_recv)(struct socklist *); STAILQ_ENTRY(socklist) next; }; @@ -419,9 +423,9 @@ static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ struct iovlist; -static int allowaddr(char *); -static int addpeer(struct peer *); -static int addsock(struct addrinfo *, struct socklist *); +static bool allowaddr(char *); +static void addpeer(const char *, const char *, mode_t); +static void addsock(const char *, const char *, mode_t); static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); static void deadq_enter(pid_t, const char *); @@ -440,7 +444,7 @@ static void logmsg(int, const struct logtime *, const char *, const char *, const char *, const char *, const char *, const char *, int); static void log_deadchild(pid_t, int, const char *); static void markit(void); -static int socksetup(struct peer *); +static struct socklist *socksetup(struct addrinfo *, const char *, mode_t); static int socklist_recv_file(struct socklist *); static int socklist_recv_sock(struct socklist *); static int skip_message(const char *, const char *, int); @@ -490,41 +494,91 @@ close_filed(struct filed *f) f->f_file = -1; } -static int -addpeer(struct peer *pe0) +static void +addpeer(const char *name, const char *serv, mode_t mode) { - struct peer *pe; - - pe = calloc(1, sizeof(*pe)); + struct peer *pe = calloc(1, sizeof(*pe)); if (pe == NULL) err(1, "malloc failed"); - *pe = *pe0; + pe->pe_name = name; + pe->pe_serv = serv; + pe->pe_mode = mode; STAILQ_INSERT_TAIL(&pqueue, pe, next); - - return (0); } -static int -addsock(struct addrinfo *ai, struct socklist *sl0) +static void +addsock(const char *name, const char *serv, mode_t mode) { + struct addrinfo hints = { }, *res, *res0; struct socklist *sl; + int error; + char *cp, *msgbuf; - /* Copy *ai->ai_addr to the tail of struct socklist if any. */ - sl = calloc(1, sizeof(*sl) + ((ai != NULL) ? ai->ai_addrlen : 0)); + /* + * We have to handle this case for backwards compatibility: + * If there are two (or more) colons but no '[' and ']', + * assume this is an inet6 address without a service. + */ + if (name != NULL) { +#ifdef INET6 + if (name[0] == '[' && + (cp = strchr(name + 1, ']')) != NULL) { + name = &name[1]; + *cp = '\0'; + if (cp[1] == ':' && cp[2] != '\0') + serv = cp + 2; + } else { +#endif + cp = strchr(name, ':'); + if (cp != NULL && strchr(cp + 1, ':') == NULL) { + *cp = '\0'; + if (cp[1] != '\0') + serv = cp + 1; + if (cp == name) + name = NULL; + } +#ifdef INET6 + } +#endif + } + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_DGRAM; + hints.ai_flags = AI_PASSIVE; + if (name != NULL) + dprintf("Trying peer: %s\n", name); + if (serv == NULL) + serv = "syslog"; + error = getaddrinfo(name, serv, &hints, &res0); + if (error) { + asprintf(&msgbuf, "getaddrinfo failed for %s%s: %s", + name == NULL ? "" : name, serv, + gai_strerror(error)); + errno = 0; + if (msgbuf == NULL) + logerror(gai_strerror(error)); + else + logerror(msgbuf); + free(msgbuf); + die(0); + } + for (res = res0; res != NULL; res = res->ai_next) { + sl = socksetup(res, name, mode); + if (sl == NULL) + continue; + STAILQ_INSERT_TAIL(&shead, sl, next); + } + freeaddrinfo(res0); +} + +static void +addfile(int fd) +{ + struct socklist *sl = calloc(1, sizeof(*sl)); if (sl == NULL) err(1, "malloc failed"); - *sl = *sl0; - if (ai != NULL) { - memcpy(&sl->sl_ai, ai, sizeof(*ai)); - if (ai->ai_addrlen > 0) { - memcpy((sl + 1), ai->ai_addr, ai->ai_addrlen); - sl->sl_sa = (struct sockaddr *)(sl + 1); - } else - sl->sl_sa = NULL; - } + sl->sl_socket = fd; + sl->sl_recv = socklist_recv_file; STAILQ_INSERT_TAIL(&shead, sl, next); - - return (0); } int @@ -533,7 +587,6 @@ main(int argc, char *argv[]) sigset_t sigset = { }; struct kevent ev; struct socklist *sl; - struct peer *pe; pid_t ppid = -1, spid; int ch, kq, s; char *p; @@ -562,7 +615,7 @@ main(int argc, char *argv[]) send_to_all = true; break; case 'a': /* allow specific network addresses only */ - if (allowaddr(optarg) == -1) + if (!allowaddr(optarg)) usage(); break; case 'b': @@ -577,18 +630,12 @@ main(int argc, char *argv[]) } if (p == NULL) { /* A hostname or filename only. */ - addpeer(&(struct peer){ - .pe_name = optarg, - .pe_serv = "syslog" - }); + addpeer(optarg, "syslog", 0); } else { /* The case of "name:service". */ *p++ = '\0'; - addpeer(&(struct peer){ - .pe_serv = p, - .pe_name = (strlen(optarg) == 0) ? - NULL : optarg, - }); + addpeer(strlen(optarg) == 0 ? NULL : optarg, + p, 0); } break; case 'c': @@ -649,10 +696,7 @@ main(int argc, char *argv[]) } else errx(1, "invalid filename %s, exiting", optarg); - addpeer(&(struct peer){ - .pe_name = name, - .pe_mode = mode - }); + addpeer(name, NULL, mode); break; } case 'M': /* max length of forwarded message */ @@ -709,42 +753,39 @@ main(int argc, char *argv[]) if (RFC3164OutputFormat && MaxForwardLen > 1024) errx(1, "RFC 3164 messages may not exceed 1024 bytes"); + pfh = pidfile_open(PidFile, 0600, &spid); + if (pfh == NULL) { + if (errno == EEXIST) + errx(1, "syslogd already running, pid: %d", spid); + warn("cannot open pid file"); + } + + /* + * Now that flags have been parsed, we know if we're in + * secure mode. Add peers to the socklist, if allowed. + */ + while (!STAILQ_EMPTY(&pqueue)) { + struct peer *pe = STAILQ_FIRST(&pqueue); + STAILQ_REMOVE_HEAD(&pqueue, next); + addsock(pe->pe_name, pe->pe_serv, pe->pe_mode); + free(pe); + } /* Listen by default: /dev/klog. */ s = open(_PATH_KLOG, O_RDONLY | O_NONBLOCK | O_CLOEXEC, 0); if (s < 0) { dprintf("can't open %s (%d)\n", _PATH_KLOG, errno); } else { - addsock(NULL, &(struct socklist){ - .sl_socket = s, - .sl_recv = socklist_recv_file, - }); + addfile(s); } /* Listen by default: *:514 if no -b flag. */ if (bflag == 0) - addpeer(&(struct peer){ - .pe_serv = "syslog" - }); + addsock(NULL, "syslog", 0); /* Listen by default: /var/run/log if no -p flag. */ if (pflag == 0) - addpeer(&(struct peer){ - .pe_name = _PATH_LOG, - .pe_mode = DEFFILEMODE, - }); + addsock(_PATH_LOG, NULL, DEFFILEMODE); /* Listen by default: /var/run/logpriv if no -S flag. */ if (Sflag == 0) - addpeer(&(struct peer){ - .pe_name = _PATH_LOG_PRIV, - .pe_mode = S_IRUSR | S_IWUSR, - }); - STAILQ_FOREACH(pe, &pqueue, next) - socksetup(pe); - - pfh = pidfile_open(PidFile, 0600, &spid); - if (pfh == NULL) { - if (errno == EEXIST) - errx(1, "syslogd already running, pid: %d", spid); - warn("cannot open pid file"); - } + addsock(_PATH_LOG_PRIV, NULL, S_IRUSR | S_IWUSR); if ((!Foreground) && (!Debug)) { ppid = waitdaemon(30); @@ -2312,7 +2353,7 @@ die(int signo) } STAILQ_FOREACH(sl, &shead, next) { if (sl->sl_sa != NULL && sl->sl_family == AF_LOCAL) - unlink(sl->sl_peer->pe_name); + unlink(sl->sl_name); } pidfile_remove(pfh); @@ -3272,9 +3313,9 @@ timedout(int sig __unused) * * netaddr/maskbits[:{servicename|portnumber|*}] * - * Returns -1 on error, 0 if the argument was valid. + * Returns false on error, true if the argument was valid. */ -static int +static bool #if defined(INET) || defined(INET6) allowaddr(char *s) #else @@ -3442,13 +3483,13 @@ allowaddr(char *s __unused) printf("port = %d\n", ap->port); } - return (0); + return (true); err: if (res != NULL) freeaddrinfo(res); free(ap); #endif - return (-1); + return (false); } /* @@ -3710,167 +3751,107 @@ log_deadchild(pid_t pid, int status, const char *name) logerror(buf); } -static int -socksetup(struct peer *pe) +static struct socklist * +socksetup(struct addrinfo *ai, const char *name, mode_t mode) { - struct addrinfo hints, *res, *res0; - int error; - char *cp; + struct socklist *sl; int (*sl_recv)(struct socklist *); - /* - * We have to handle this case for backwards compatibility: - * If there are two (or more) colons but no '[' and ']', - * assume this is an inet6 address without a service. - */ - if (pe->pe_name != NULL) { -#ifdef INET6 - if (pe->pe_name[0] == '[' && - (cp = strchr(pe->pe_name + 1, ']')) != NULL) { - pe->pe_name = &pe->pe_name[1]; - *cp = '\0'; - if (cp[1] == ':' && cp[2] != '\0') - pe->pe_serv = cp + 2; - } else { -#endif - cp = strchr(pe->pe_name, ':'); - if (cp != NULL && strchr(cp + 1, ':') == NULL) { - *cp = '\0'; - if (cp[1] != '\0') - pe->pe_serv = cp + 1; - if (cp == pe->pe_name) - pe->pe_name = NULL; - } -#ifdef INET6 - } -#endif - } - hints = (struct addrinfo){ - .ai_family = AF_UNSPEC, - .ai_socktype = SOCK_DGRAM, - .ai_flags = AI_PASSIVE - }; - if (pe->pe_name != NULL) - dprintf("Trying peer: %s\n", pe->pe_name); - if (pe->pe_serv == NULL) - pe->pe_serv = "syslog"; - error = getaddrinfo(pe->pe_name, pe->pe_serv, &hints, &res0); - if (error) { - char *msgbuf; + int s, optval = 1; - asprintf(&msgbuf, "getaddrinfo failed for %s%s: %s", - pe->pe_name == NULL ? "" : pe->pe_name, pe->pe_serv, - gai_strerror(error)); - errno = 0; - if (msgbuf == NULL) - logerror(gai_strerror(error)); - else - logerror(msgbuf); - free(msgbuf); - die(0); + if (ai->ai_family != AF_LOCAL && SecureMode > 1) { + /* Only AF_LOCAL in secure mode. */ + return (NULL); } - for (res = res0; res != NULL; res = res->ai_next) { - int s; - - if (res->ai_family != AF_LOCAL && - SecureMode > 1) { - /* Only AF_LOCAL in secure mode. */ - continue; - } - if (family != AF_UNSPEC && - res->ai_family != AF_LOCAL && res->ai_family != family) - continue; + if (family != AF_UNSPEC && ai->ai_family != AF_LOCAL && + ai->ai_family != family) + return (NULL); - s = socket(res->ai_family, res->ai_socktype, - res->ai_protocol); - if (s < 0) { - logerror("socket"); - error++; - continue; - } + s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + if (s < 0) { + logerror("socket"); + return (NULL); + } #ifdef INET6 - if (res->ai_family == AF_INET6) { - if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, - &(int){1}, sizeof(int)) < 0) { - logerror("setsockopt(IPV6_V6ONLY)"); - close(s); - error++; - continue; - } - } -#endif - if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, - &(int){1}, sizeof(int)) < 0) { - logerror("setsockopt(SO_REUSEADDR)"); + if (ai->ai_family == AF_INET6) { + if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &optval, + sizeof(int)) < 0) { + logerror("setsockopt(IPV6_V6ONLY)"); close(s); - error++; - continue; + return (NULL); } + } +#endif + if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &optval, + sizeof(int)) < 0) { + logerror("setsockopt(SO_REUSEADDR)"); + close(s); + return (NULL); + } - /* - * Bind INET and UNIX-domain sockets. - * - * A UNIX-domain socket is always bound to a pathname - * regardless of -N flag. - * - * For INET sockets, RFC 3164 recommends that client - * side message should come from the privileged syslogd port. - * - * If the system administrator chooses not to obey - * this, we can skip the bind() step so that the - * system will choose a port for us. - */ - if (res->ai_family == AF_LOCAL) - unlink(pe->pe_name); - if (res->ai_family == AF_LOCAL || - NoBind == 0 || pe->pe_name != NULL) { - if (bind(s, res->ai_addr, res->ai_addrlen) < 0) { - logerror("bind"); - close(s); - error++; - continue; - } - if (res->ai_family == AF_LOCAL || - SecureMode == 0) - increase_rcvbuf(s); - } - if (res->ai_family == AF_LOCAL && - chmod(pe->pe_name, pe->pe_mode) < 0) { - dprintf("chmod %s: %s\n", pe->pe_name, - strerror(errno)); + /* + * Bind INET and UNIX-domain sockets. + * + * A UNIX-domain socket is always bound to a pathname + * regardless of -N flag. + * + * For INET sockets, RFC 3164 recommends that client + * side message should come from the privileged syslogd port. + * + * If the system administrator chooses not to obey + * this, we can skip the bind() step so that the + * system will choose a port for us. + */ + if (ai->ai_family == AF_LOCAL) + unlink(name); + if (ai->ai_family == AF_LOCAL || NoBind == 0 || name != NULL) { + if (bind(s, ai->ai_addr, ai->ai_addrlen) < 0) { + logerror("bind"); close(s); - error++; - continue; - } - dprintf("new socket fd is %d\n", s); - if (res->ai_socktype != SOCK_DGRAM) { - listen(s, 5); + return (NULL); } - sl_recv = socklist_recv_sock; + if (ai->ai_family == AF_LOCAL || SecureMode == 0) + increase_rcvbuf(s); + } + if (ai->ai_family == AF_LOCAL && chmod(name, mode) < 0) { + dprintf("chmod %s: %s\n", name, strerror(errno)); + close(s); + return (NULL); + } + dprintf("new socket fd is %d\n", s); + if (ai->ai_socktype != SOCK_DGRAM) { + listen(s, 5); + } + sl_recv = socklist_recv_sock; #if defined(INET) || defined(INET6) - if (SecureMode && (res->ai_family == AF_INET || - res->ai_family == AF_INET6)) { - dprintf("shutdown\n"); - /* Forbid communication in secure mode. */ - if (shutdown(s, SHUT_RD) < 0 && - errno != ENOTCONN) { - logerror("shutdown"); - if (!Debug) - die(0); - } - sl_recv = NULL; - } else + if (SecureMode && (ai->ai_family == AF_INET || + ai->ai_family == AF_INET6)) { + dprintf("shutdown\n"); + /* Forbid communication in secure mode. */ + if (shutdown(s, SHUT_RD) < 0 && errno != ENOTCONN) { + logerror("shutdown"); + if (!Debug) + die(0); + } + sl_recv = NULL; + } else #endif - dprintf("listening on socket\n"); - dprintf("sending on socket\n"); - addsock(res, &(struct socklist){ - .sl_socket = s, - .sl_peer = pe, - .sl_recv = sl_recv - }); + dprintf("listening on socket\n"); + dprintf("sending on socket\n"); + /* Copy *ai->ai_addr to the tail of struct socklist if any. */ + sl = calloc(1, sizeof(*sl) + ai->ai_addrlen); + if (sl == NULL) + err(1, "malloc failed"); + sl->sl_socket = s; + sl->sl_name = name; + sl->sl_recv = sl_recv; + (void)memcpy(&sl->sl_ai, ai, sizeof(*ai)); + if (ai->ai_addrlen > 0) { + (void)memcpy((sl + 1), ai->ai_addr, ai->ai_addrlen); + sl->sl_sa = (struct sockaddr *)(sl + 1); + } else { + sl->sl_sa = NULL; } - freeaddrinfo(res0); - - return(error); + return (sl); } static void From nobody Thu Sep 28 15:52:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzx6NNVz4tyNb; Thu, 28 Sep 2023 15:52: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 4RxHzx2m2sz4KKg; Thu, 28 Sep 2023 15:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8VnVPiYKa15UewwDN9lVhfGC3U4CUOJBccFiBC4Q6xg=; b=WnPgjwQJwd/PzYTpYIxHZaocrIKoFUw0JL23fbCsvdZ+2L/EH/lWXQDEe/xJTenqm+PUI1 pSdEECKKglcUKvEpwQIiNWzfpzWuojXhJ+s1kreczs1AYhkqpuGIm27ftecOG/HJl5kO3t GUxHDlaK+iLLqbUCtOcg9Rhi4A7YBsBx1wTUhhpU3KaeBhMAuERkexhtH85tJLg27TyUXo /vONb7BEYLcpZZRiLV5S7zTYQSvYfAD7L/o/cUc8pVtAwvo3oZfXqm4Kd3kkVfOeV32DYK PFLr0DnYX/sBbVZJwNUAnXJV+SMVrrOk7NZWD+ivUjHm3LgsUQ4CwIjsKu6HKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916349; a=rsa-sha256; cv=none; b=s7M1S54e674xdGgvoiAu5Gu9sS9B4DfjS3YEvv35TFD8BlSALcaal7rVOIZPttwWIhadxR 37InO0lshMGAeF849eEQjuVc8Pq+zbHFqe31a38sRxbPabUh7+B1ml+JiIBClvE1cRuJTO A9Lqy9X5Fo8iEUAn2xTmp3IyrMhx1/cx3YBBYteJuDJZxOA10mAhQbD9vzeZH+zAh0DCki W52poPvw88T1UNXveBNtZXty0C/labwzHLMBppuLRHz7QCaMug/CuHvGEQkDvOUFZz3YZ5 na8oDbKOjoS9R6YTtROg34DAoOJmxqiZjCiJFy/1wPrFuJHw549S6LtPiXH0pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8VnVPiYKa15UewwDN9lVhfGC3U4CUOJBccFiBC4Q6xg=; b=ai+IzKpv/nyd1MLg1c3rGo+8bGOw3vGW9RHCcYvKgdNbgeHEvF+h1AqhXCgsjnxgwUnIKt Ax9OqEETnkX2ATS1SjT2O/rtIc0Yld7HsoCe13QFTcDM/jzNXfNw5pIVpjtMbAuq3om/YX QHI5N6CG0JQi68IZjHmagxdrKahrdh7sFq7hYItQeXsKEU63JpYAvK0+pNVIU+QHR4GdRW S5kmsFPzroxGyzNG70sApRQuDUAePXJ7/ZOPgUcU909Ps2o+lsWX5ovuC8HB+h+VWbJGjK l6f/tJGEpYqqePNrc85tHJ+ZPfOhuIAH9J8TzMqrl3TqgetodU3NCB20irKFNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzx1t4zzD8t; Thu, 28 Sep 2023 15:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqTrs021815; Thu, 28 Sep 2023 15:52:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqTn2021812; Thu, 28 Sep 2023 15:52:29 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:29 GMT Message-Id: <202309281552.38SFqTn2021812@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: b772f1ce14a0 - main - syslogd: Clean up allowedpeer structure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b772f1ce14a0b3de6c3e9aa72e8b83696c782a3d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b772f1ce14a0b3de6c3e9aa72e8b83696c782a3d commit b772f1ce14a0b3de6c3e9aa72e8b83696c782a3d Author: Jake Freeland AuthorDate: 2023-09-01 02:49:53 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Clean up allowedpeer structure * Use boolean values in validate() and struct allowedpeer. * Remove useless peer count loop. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41365 --- usr.sbin/syslogd/syslogd.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c03acf301fd8..02c125f36f91 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -175,6 +175,7 @@ static const char include_ext[] = ".conf"; (((d)->s6_addr32[2] ^ (a)->s6_addr32[2]) & (m)->s6_addr32[2]) == 0 && \ (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 ) #endif + /* * List of peers and sockets that can't be bound until * flags have been parsed. @@ -337,11 +338,10 @@ static TAILQ_HEAD(, deadq_entry) deadq_head = #define DQ_TIMO_INIT 2 /* - * Struct to hold records of network addresses that are allowed to log - * to us. + * Network addresses that are allowed to log to us. */ struct allowedpeer { - int isnumeric; + bool isnumeric; u_short port; union { struct { @@ -357,7 +357,6 @@ struct allowedpeer { }; static STAILQ_HEAD(, allowedpeer) aphead = STAILQ_HEAD_INITIALIZER(aphead); - /* * Intervals at which we flush out "message repeated" messages, * in seconds after previous message is logged. After each flush, @@ -458,7 +457,7 @@ static int p_open(const char *, pid_t *); static void reapchild(int); static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); -static int validate(struct sockaddr *, const char *); +static bool validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); static void wallmsg(struct filed *, struct iovec *, const int iovlen); static int waitdaemon(int); @@ -3391,7 +3390,7 @@ allowaddr(char *s __unused) .ai_flags = AI_PASSIVE | AI_NUMERICHOST }; if (getaddrinfo(s, NULL, &hints, &res) == 0) { - ap->isnumeric = 1; + ap->isnumeric = true; memcpy(&ap->a_addr, res->ai_addr, res->ai_addrlen); ap->a_mask = (struct sockaddr_storage){ .ss_family = res->ai_family, @@ -3452,7 +3451,7 @@ allowaddr(char *s __unused) freeaddrinfo(res); } else { /* arg `s' is domain name */ - ap->isnumeric = 0; + ap->isnumeric = false; ap->a_name = s; if (cp1) *cp1 = '/'; @@ -3495,7 +3494,7 @@ err: /* * Validate that the remote peer has permission to log to us. */ -static int +static bool validate(struct sockaddr *sa, const char *hname) { int i; @@ -3509,15 +3508,10 @@ validate(struct sockaddr *sa, const char *hname) #endif struct addrinfo hints, *res; u_short sport; - int num = 0; - STAILQ_FOREACH(ap, &aphead, next) { - num++; - } - dprintf("# of validation rule: %d\n", num); - if (num == 0) - /* traditional behaviour, allow everything */ - return (1); + /* traditional behaviour, allow everything */ + if (STAILQ_EMPTY(&aphead)) + return (true); (void)strlcpy(name, hname, sizeof(name)); hints = (struct addrinfo){ @@ -3533,7 +3527,7 @@ validate(struct sockaddr *sa, const char *hname) } if (getnameinfo(sa, sa->sa_len, ip, sizeof(ip), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) != 0) - return (0); /* for safety, should not occur */ + return (false); /* for safety, should not occur */ dprintf("validate: dgram from IP %s, port %s, name %s;\n", ip, port, name); sport = atoi(port); @@ -3593,9 +3587,9 @@ validate(struct sockaddr *sa, const char *hname) } } dprintf("accepted in rule %d.\n", i); - return (1); /* hooray! */ + return (true); /* hooray! */ } - return (0); + return (false); } /* From nobody Thu Sep 28 15:52:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzy5qcwz4tyCr; Thu, 28 Sep 2023 15:52: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 4RxHzy41Y9z4KMw; Thu, 28 Sep 2023 15:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W1FeezCVLCPz87SfU5+GZ+p9WlKyiZ6VXd4h+8+sw58=; b=BjoSoRjkR+tV1Gu0i2OSRERHZYSkQImHAGQFax3EJPqc270HctU56DZ6YV9wg+M6Ea7d+D 3mGywVGmQyP9B/6Y0cL13msYzhOX0oPIiroEmrs2lvBWmCdJRqezdSGzgI9tiQ2j+IOuth SerR9MxBKmHcQp5w4AG82ZPyd7lu8s2daguBeUTq76COflthLXCftgx5XPFh/6Eo1/Gz/l w1pJh8QNWJ8pETlS2IeVqE6rAlhycr3ux2XrYCmu8npsScuefD2P8L8t+I5OjsWjkhe9Eq WKfX3k06WZMUYm1p5i42EU4mAAPV3OCnKqsLiLGOarBSPh4UhnNivtYX+hAMeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916350; a=rsa-sha256; cv=none; b=K6yTFDkgeLZmZEkqUIji1TiYwaT6utBcu/hdL9NSl/9MyvoXfl8E5BYKLB8lznmsEl/h65 /Dy7t9l4KAuKwWVDuThFlk2hXxDwU/ElGiFsHDdBCaCIKrnsq6ehBqdtGyPsA2IA3DQWrV YiZtLN2dsDnbWRxgne08qBZP9sLcJu+Ip79l2DzuoqrvgXJRgryFudpowQ30NDvWI5XzDz NZq4xMNIYostDk5J4wFR8IGX3W2Bm7f+A+aT80pjBArOD3svaf5QYBoD/ZCqZ/P37ODhKR 7+n3sVfpommYnT/5me7sv04d449mFpvswjsF6DpiUR6jook5tvAaSn5IMQRlCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W1FeezCVLCPz87SfU5+GZ+p9WlKyiZ6VXd4h+8+sw58=; b=XYLORqWQKUtt2vLT9XCUeA+bzGG3b+x4S9sbajSCKp/7kI/ly+5epLHALqKMnMsRYhQ4WS f6IRr42NqFWB/mTE72zMN3B4NHebq3FqsHl1m/PtKYFj6EMkHDVSW3r5otQtWvhBIVL9+L NvmXDdXEQXtGig7SI6LdBSLGvipTcOAH8Tdk6gieosuhpqgidWNgueY3GYfJDmToq+qzh9 HfQn4pZ5B3q7svb/fCCMeNiIInLlpE+XV2NgXYTzcfgBbH5r5+/4S6cc1Gb5Rch1Kjj0+L YJSJN1JDl2ddGP+lGpHRiGIcUAKpRGfGUwqk89Ce0D/l1Q40YhQaDHB03hVXUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzy2t6HzCNc; Thu, 28 Sep 2023 15:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqUSg021857; Thu, 28 Sep 2023 15:52:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqUvn021854; Thu, 28 Sep 2023 15:52:30 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:30 GMT Message-Id: <202309281552.38SFqUvn021854@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: fcc1e1777d42 - main - syslogd: Simplify property filters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: fcc1e1777d42d99d5505aa7273d73cb98c9c4ca4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fcc1e1777d42d99d5505aa7273d73cb98c9c4ca4 commit fcc1e1777d42d99d5505aa7273d73cb98c9c4ca4 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:58 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Simplify property filters * Use enums for property filter properties and comparisons. * Rename property and comparison values. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41366 --- usr.sbin/syslogd/syslogd.c | 101 +++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 02c125f36f91..d1027773494f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -222,34 +222,35 @@ struct logtime { #define RFC3164_DATELEN 15 #define RFC3164_DATEFMT "%b %e %H:%M:%S" +enum filt_proptype { + FILT_PROP_NOOP, + FILT_PROP_MSG, + FILT_PROP_HOSTNAME, + FILT_PROP_PROGNAME, +}; + +enum filt_cmptype { + FILT_CMP_CONTAINS, + FILT_CMP_EQUAL, + FILT_CMP_STARTS, + FILT_CMP_REGEX, +}; + /* * This structure holds a property-based filter */ - struct prop_filter { - uint8_t prop_type; -#define PROP_TYPE_NOOP 0 -#define PROP_TYPE_MSG 1 -#define PROP_TYPE_HOSTNAME 2 -#define PROP_TYPE_PROGNAME 3 - - uint8_t cmp_type; -#define PROP_CMP_CONTAINS 1 -#define PROP_CMP_EQUAL 2 -#define PROP_CMP_STARTS 3 -#define PROP_CMP_REGEX 4 - - uint16_t cmp_flags; -#define PROP_FLAG_EXCLUDE (1 << 0) -#define PROP_FLAG_ICASE (1 << 1) - + enum filt_proptype prop_type; + enum filt_cmptype cmp_type; + uint8_t cmp_flags; +#define FILT_FLAG_EXCLUDE (1 << 0) +#define FILT_FLAG_ICASE (1 << 1) union { char *p_strval; regex_t *p_re; } pflt_uniptr; #define pflt_strval pflt_uniptr.p_strval #define pflt_re pflt_uniptr.p_re - size_t pflt_strlen; }; @@ -1519,13 +1520,13 @@ static int evaluate_prop_filter(const struct prop_filter *filter, const char *value) { const char *s = NULL; - const int exclude = ((filter->cmp_flags & PROP_FLAG_EXCLUDE) > 0); + const int exclude = ((filter->cmp_flags & FILT_FLAG_EXCLUDE) > 0); size_t valuelen; if (value == NULL) return (-1); - if (filter->cmp_type == PROP_CMP_REGEX) { + if (filter->cmp_type == FILT_CMP_REGEX) { if (regexec(filter->pflt_re, value, 0, NULL, 0) == 0) return (exclude); else @@ -1535,31 +1536,31 @@ evaluate_prop_filter(const struct prop_filter *filter, const char *value) valuelen = strlen(value); /* a shortcut for equal with different length is always false */ - if (filter->cmp_type == PROP_CMP_EQUAL && + if (filter->cmp_type == FILT_CMP_EQUAL && valuelen != filter->pflt_strlen) return (!exclude); - if (filter->cmp_flags & PROP_FLAG_ICASE) + if (filter->cmp_flags & FILT_FLAG_ICASE) s = strcasestr(value, filter->pflt_strval); else s = strstr(value, filter->pflt_strval); /* - * PROP_CMP_CONTAINS true if s - * PROP_CMP_STARTS true if s && s == value - * PROP_CMP_EQUAL true if s && s == value && + * FILT_CMP_CONTAINS true if s + * FILT_CMP_STARTS true if s && s == value + * FILT_CMP_EQUAL true if s && s == value && * valuelen == filter->pflt_strlen * (and length match is checked * already) */ switch (filter->cmp_type) { - case PROP_CMP_STARTS: - case PROP_CMP_EQUAL: + case FILT_CMP_STARTS: + case FILT_CMP_EQUAL: if (s != value) return (!exclude); /* FALLTHROUGH */ - case PROP_CMP_CONTAINS: + case FILT_CMP_CONTAINS: if (s) return (exclude); else @@ -1685,19 +1686,19 @@ logmsg(int pri, const struct logtime *timestamp, const char *hostname, /* skip messages if a property does not match filter */ if (f->f_prop_filter != NULL && - f->f_prop_filter->prop_type != PROP_TYPE_NOOP) { + f->f_prop_filter->prop_type != FILT_PROP_NOOP) { switch (f->f_prop_filter->prop_type) { - case PROP_TYPE_MSG: + case FILT_PROP_MSG: if (evaluate_prop_filter(f->f_prop_filter, msg)) continue; break; - case PROP_TYPE_HOSTNAME: + case FILT_PROP_HOSTNAME: if (evaluate_prop_filter(f->f_prop_filter, hostname)) continue; break; - case PROP_TYPE_PROGNAME: + case FILT_PROP_PROGNAME: if (evaluate_prop_filter(f->f_prop_filter, app_name == NULL ? "" : app_name)) continue; @@ -2610,13 +2611,13 @@ init(bool reload) free(f->f_host); if (f->f_prop_filter) { switch (f->f_prop_filter->cmp_type) { - case PROP_CMP_REGEX: + case FILT_CMP_REGEX: regfree(f->f_prop_filter->pflt_re); free(f->f_prop_filter->pflt_re); break; - case PROP_CMP_CONTAINS: - case PROP_CMP_EQUAL: - case PROP_CMP_STARTS: + case FILT_CMP_CONTAINS: + case FILT_CMP_EQUAL: + case FILT_CMP_STARTS: free(f->f_prop_filter->pflt_strval); break; } @@ -2752,13 +2753,13 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* fill in prop_type */ if (strcasecmp(argv[0], "msg") == 0) - pfilter->prop_type = PROP_TYPE_MSG; + pfilter->prop_type = FILT_PROP_MSG; else if(strcasecmp(argv[0], "hostname") == 0) - pfilter->prop_type = PROP_TYPE_HOSTNAME; + pfilter->prop_type = FILT_PROP_HOSTNAME; else if(strcasecmp(argv[0], "source") == 0) - pfilter->prop_type = PROP_TYPE_HOSTNAME; + pfilter->prop_type = FILT_PROP_HOSTNAME; else if(strcasecmp(argv[0], "programname") == 0) - pfilter->prop_type = PROP_TYPE_PROGNAME; + pfilter->prop_type = FILT_PROP_PROGNAME; else { logerror("unknown property"); return (-1); @@ -2766,25 +2767,25 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* full in cmp_flags (i.e. !contains, icase_regex, etc.) */ if (*argv[1] == '!') { - pfilter->cmp_flags |= PROP_FLAG_EXCLUDE; + pfilter->cmp_flags |= FILT_FLAG_EXCLUDE; argv[1]++; } if (strncasecmp(argv[1], "icase_", (sizeof("icase_") - 1)) == 0) { - pfilter->cmp_flags |= PROP_FLAG_ICASE; + pfilter->cmp_flags |= FILT_FLAG_ICASE; argv[1] += sizeof("icase_") - 1; } /* fill in cmp_type */ if (strcasecmp(argv[1], "contains") == 0) - pfilter->cmp_type = PROP_CMP_CONTAINS; + pfilter->cmp_type = FILT_CMP_CONTAINS; else if (strcasecmp(argv[1], "isequal") == 0) - pfilter->cmp_type = PROP_CMP_EQUAL; + pfilter->cmp_type = FILT_CMP_EQUAL; else if (strcasecmp(argv[1], "startswith") == 0) - pfilter->cmp_type = PROP_CMP_STARTS; + pfilter->cmp_type = FILT_CMP_STARTS; else if (strcasecmp(argv[1], "regex") == 0) - pfilter->cmp_type = PROP_CMP_REGEX; + pfilter->cmp_type = FILT_CMP_REGEX; else if (strcasecmp(argv[1], "ereregex") == 0) { - pfilter->cmp_type = PROP_CMP_REGEX; + pfilter->cmp_type = FILT_CMP_REGEX; re_flags |= REG_EXTENDED; } else { logerror("unknown cmp function"); @@ -2835,14 +2836,14 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) return (-1); } - if (pfilter->cmp_type == PROP_CMP_REGEX) { + if (pfilter->cmp_type == FILT_CMP_REGEX) { pfilter->pflt_re = calloc(1, sizeof(*pfilter->pflt_re)); if (pfilter->pflt_re == NULL) { logerror("RE calloc() error"); free(pfilter->pflt_re); return (-1); } - if (pfilter->cmp_flags & PROP_FLAG_ICASE) + if (pfilter->cmp_flags & FILT_FLAG_ICASE) re_flags |= REG_ICASE; if (regcomp(pfilter->pflt_re, filter, re_flags) != 0) { logerror("RE compilation error"); @@ -2922,7 +2923,7 @@ cfline(const char *line, const char *prog, const char *host, exit(1); } if (*pfilter == '*') - f->f_prop_filter->prop_type = PROP_TYPE_NOOP; + f->f_prop_filter->prop_type = FILT_PROP_NOOP; else { pfilter_dup = strdup(pfilter); if (pfilter_dup == NULL) { From nobody Thu Sep 28 15:52:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxHzz5jRkz4tyQl; Thu, 28 Sep 2023 15:52: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 4RxHzz4nvDz4KNV; Thu, 28 Sep 2023 15:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GXOhWIiMgFhyH2QGFj7XiWIrXiLIyv0Faq8G7088A6o=; b=GWh5D3y5EY1AfBMvsQtlwsbzzMtBGxNwAntU3NlpjY95SD8BBtN9iunELbyVJL8jaRI03T 24bGlhW5TXBln9MCkJxlDdXjYATez5LIPPR62os2C/ufW2sje2w1Ick8/XdEAW8iNnhWci W1rrxuF6WVif5JdBZ0FsfiPHKbO829+vBfNuO1NON1fOEs5E5rcNMiEBb/WpdEQ1bYNK3U PK0on5/Qh/2u69F/sZx6Vh+tinmiysVZ8aSW45TBt4cXqsrmZQJwiu5QIcG/cC/uyL5MQq ZGiLxnIFvw8wIZFcBuWXH2KwwZz1tynrsq/EmamP6T9V+ax36pNgdkofX33U2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916351; a=rsa-sha256; cv=none; b=TKKhWpdmaXkzyHwaWBjh6TmrChH0rHvRJjQAtnYOu9n2MCR1Bj1dQUWvznb76SO8CCnFQl JMXfXVfMcBggOuUYQeX8EJ4giEzYdDHSY3f7jiY0kdE+jIJNSG7S37hW82ILq6dfyGv67l h+Qj8jJhLip7Q0bjm8Ge5/iOABZbEiUzNlz6SipTMgSHgujYtYSAUsePdN+82wPG23wJ8g bbrAXWqrVaus98E2C8cRpUfkRpNrIZ6DrpVt7y84w24XNfAk+SejQFLnAe5w53J4qETOgB lmSmH9olQWWcTJVS/GsVvbm+/OiBTN5R2oQ0sGufWALCz7Syp+/VIK5RFOKfyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GXOhWIiMgFhyH2QGFj7XiWIrXiLIyv0Faq8G7088A6o=; b=GIKwmst0p1CPzgmGhirJvHFc8W5uLNQjV2LkF0OHCokuch2AvnoDTBS0ZcGCQgJ9aJEyWF TRQpS8w4vhdm3s64qIerpMkCOri5+yrT+MsMoAmQvvDsjRzV78rt0KQReqHY4qbZJWX+RP Ki1eTwudEkGhM5hAPis7CzfMcufBJo/zv65f3RnptnhvbwicBIndvpwYLjY2Qap4PpB+57 GWiRpm4vfXAYdwLQmot6I+inOAK+kWdWtcbFY50yugLymiw8ZA8W37CN5PGr38rpVQN90m R+t+0fpmSLlDiC8LEwaeZXtnaUqnNXTLqCZdeT5g+wEj//uviziPPcjdlpPrYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzz3tnMzDL5; Thu, 28 Sep 2023 15:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqVOu021899; Thu, 28 Sep 2023 15:52:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqVeW021896; Thu, 28 Sep 2023 15:52:31 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:31 GMT Message-Id: <202309281552.38SFqVeW021896@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: 929568b9d527 - main - syslogd: Style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 929568b9d52739679965e81b7d2f19b2d209479e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=929568b9d52739679965e81b7d2f19b2d209479e commit 929568b9d52739679965e81b7d2f19b2d209479e Author: Jake Freeland AuthorDate: 2023-09-01 02:50:03 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Style fixes Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41367 --- usr.sbin/syslogd/syslogd.c | 52 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index d1027773494f..22ba9deaa5d8 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -133,6 +133,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -142,7 +143,6 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include -#include #include "pathnames.h" #include "ttymsg.h" @@ -372,8 +372,14 @@ static int repeatinterval[] = { 30, 120, 600 }; /* # of secs before flush */ } while (0) static const char *TypeNames[] = { - "UNUSED", "FILE", "TTY", "CONSOLE", - "FORW", "USERS", "WALL", "PIPE" + "UNUSED", + "FILE", + "TTY", + "CONSOLE", + "FORW", + "USERS", + "WALL", + "PIPE", }; static const int sigcatch[] = { @@ -1480,7 +1486,7 @@ skip_message(const char *name, const char *spec, int checkcase) /* Behaviour on explicit match */ if (spec == NULL) - return 0; + return (0); switch (*spec) { case '-': exclude = 1; @@ -1503,12 +1509,12 @@ skip_message(const char *name, const char *spec, int checkcase) if (prev == ',' && (next == '\0' || next == ',')) /* Explicit match: skip iff the spec is an exclusive one. */ - return exclude; + return (exclude); } /* No explicit match for this name: skip the message iff the spec is an inclusive one. */ - return !exclude; + return (!exclude); } /* @@ -1760,8 +1766,8 @@ dofsync(void) struct filed *f; STAILQ_FOREACH(f, &fhead, next) { - if ((f->f_type == F_FILE) && - (f->f_flags & FFLAG_NEEDSYNC)) { + if (f->f_type == F_FILE && + (f->f_flags & FFLAG_NEEDSYNC) != 0) { f->f_flags &= ~FFLAG_NEEDSYNC; (void)fsync(f->f_file); } @@ -2243,7 +2249,7 @@ ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) if ((sb.st_mode & S_IWGRP) == 0) /* Messages disabled. */ return (NULL); - return ttymsg(iov, iovcnt, line, tmout); + return (ttymsg(iov, iovcnt, line, tmout)); } static void @@ -2398,7 +2404,7 @@ parseconfigfile(FILE *cf, bool allow_includes) /* * Foreach line in the conf table, open that file. */ - include_len = sizeof(include_str) -1; + include_len = sizeof(include_str) - 1; (void)strlcpy(host, "*", sizeof(host)); (void)strlcpy(prog, "*", sizeof(prog)); (void)strlcpy(pfilter, "*", sizeof(pfilter)); @@ -2410,7 +2416,7 @@ parseconfigfile(FILE *cf, bool allow_includes) */ for (p = cline; isspace(*p); ++p) continue; - if (*p == 0) + if (*p == '\0') continue; if (allow_includes && strncmp(p, include_str, include_len) == 0 && @@ -2457,7 +2463,7 @@ parseconfigfile(FILE *cf, bool allow_includes) host[0] = *p++; while (isspace(*p)) p++; - if ((!*p) || (*p == '*')) { + if (*p == '\0' || *p == '*') { (void)strlcpy(host, "*", sizeof(host)); continue; } @@ -2474,8 +2480,9 @@ parseconfigfile(FILE *cf, bool allow_includes) } if (*p == '!') { p++; - while (isspace(*p)) p++; - if ((!*p) || (*p == '*')) { + while (isspace(*p)) + p++; + if (*p == '\0' || *p == '*') { (void)strlcpy(prog, "*", sizeof(prog)); continue; } @@ -2484,14 +2491,14 @@ parseconfigfile(FILE *cf, bool allow_includes) break; prog[i] = p[i]; } - prog[i] = 0; + prog[i] = '\0'; continue; } if (*p == ':') { p++; while (isspace(*p)) p++; - if ((!*p) || (*p == '*')) { + if (*p == '\0' || *p == '*') { (void)strlcpy(pfilter, "*", sizeof(pfilter)); continue; } @@ -2754,11 +2761,11 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* fill in prop_type */ if (strcasecmp(argv[0], "msg") == 0) pfilter->prop_type = FILT_PROP_MSG; - else if(strcasecmp(argv[0], "hostname") == 0) + else if (strcasecmp(argv[0], "hostname") == 0) pfilter->prop_type = FILT_PROP_HOSTNAME; - else if(strcasecmp(argv[0], "source") == 0) + else if (strcasecmp(argv[0], "source") == 0) pfilter->prop_type = FILT_PROP_HOSTNAME; - else if(strcasecmp(argv[0], "programname") == 0) + else if (strcasecmp(argv[0], "programname") == 0) pfilter->prop_type = FILT_PROP_PROGNAME; else { logerror("unknown property"); @@ -2868,10 +2875,11 @@ cfline(const char *line, const char *prog, const char *host, { struct filed *f; struct addrinfo hints, *res; - int error, i, pri, syncfile; + int error, i, pri; const char *p, *q; char *bp, *pfilter_dup; char buf[LINE_MAX], ebuf[100]; + bool syncfile; dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, host, pfilter); @@ -3048,10 +3056,10 @@ cfline(const char *line, const char *prog, const char *host, p++; if (*p == '-') { - syncfile = 0; + syncfile = false; p++; } else - syncfile = 1; + syncfile = true; switch (*p) { case '@': From nobody Thu Sep 28 15:52:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ006WpGz4tyQn; Thu, 28 Sep 2023 15:52: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 4RxJ0063Zbz4Kks; Thu, 28 Sep 2023 15:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nng9Zi6Ccq7rfXY4VgrThQSiT2KonyjrvYmW1mXYOg=; b=RjTn/JkSpjbfgW51EOKqLVWcJ78leYI01JObAYBpgd2uXm8eI6a16MHbkm0Bb3Uy1fPxag ToD8jFDQaovJpvPglDmJAuxWced5f9Gs46u8Q/Nsq4kqC+5S8br1ghxriUOQdIjhtkI1sx DUxSrRa5tlIgJ54PFaNqFOBxIihZQRlrCUOTuPPTzQE7xU9bDeiTgaATXW5qhbZQvNPMnR QZSRlAfq/pcxK/R3lhQfa0OqPo6pc/3k2uK1v9BzCQUHlxVzlmvZXW/jBd9GIu2BSLgWis rFBXjHbXRxLLCfe9SQeI6Hz6YaA2mU+fFgCsaMJklWn0yVB/TD63q+XkTVUchA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916352; a=rsa-sha256; cv=none; b=Hjs/rsvh6a2fKvqsPLoV1VoE9x+Xp7kvD9KsTvPhpUkElR6r5pBmdE6blsAdpiqQEGiYQw FsymzBtESQJF8JcUoO0u6tpAPEZDNt1kvJt/EykXGKTtlrlIj7gBKPpb7r/sFNWm0lVYBJ MKdopSjybYUZ5enEJgMdYcIlLyVEihYwFklIXdrpk+1ayq/6EU2U+ZB4TfWFuZtLbiBBJ3 gX0pSXU9lDcBaJsXkMP+W9Ll4Sryf5go8hLahxU5qETQDl0FEg6izRS4hRWaZ0kTHiCUqR yvJqjbckCvWLYj2ORzfF/ncf8uVBCyroFnrxkTkEKqbnFB4nLJ/8hdVZhTgoNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nng9Zi6Ccq7rfXY4VgrThQSiT2KonyjrvYmW1mXYOg=; b=F82+VRcwqbg9L4vzuNX5IyRw4ehMosz5oBXOGWCqP6IcmI76M0MpBVUGwPGZ8IRbdAtj5s /KsZMLQyD1fusKengaDG+LElkGfl8c7Bo3l45T3fkSNOdKsaT8Z2pzUBeUWZ8Qqrg7Wpoz PTcn++uXUpFoq7oSzFTi+WgiIJiUfOqJFX2ZlocHoWS5/Lvve6ggpG6Wg8OKuyK3am/kvi fJ+0ggfD+M9iK4SLpj0chWWEglKufwanztEIWvOfi/UP7qaZHrfUy2sEGYJ8rg2jnPPCpy LTvKBta4ByMpqi6W3O1YJT1Sb9MVwjUJ3aPiEM07dl3pCctzwvfp2WXREmzxJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ004y4QzCNf; Thu, 28 Sep 2023 15:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqWV2021941; Thu, 28 Sep 2023 15:52:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqWG1021938; Thu, 28 Sep 2023 15:52:32 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:32 GMT Message-Id: <202309281552.38SFqWG1021938@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: 599db1e026c7 - main - syslogd: Simplify filed structure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 599db1e026c7bd375cd9cead34994a88fdea1761 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=599db1e026c7bd375cd9cead34994a88fdea1761 commit 599db1e026c7bd375cd9cead34994a88fdea1761 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:08 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Simplify filed structure Rearrange fields and add some comments. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41368 --- usr.sbin/syslogd/syslogd.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 22ba9deaa5d8..9498b900ed9b 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -271,52 +271,56 @@ enum f_type { * We require f_file to be valid if f_type is F_FILE, F_CONSOLE, F_TTY * or if f_type is F_PIPE and f_pid > 0. */ - struct filed { - STAILQ_ENTRY(filed) next; /* next in linked list */ enum f_type f_type; - int f_file; /* file descriptor */ - time_t f_time; /* time this was last written */ - char *f_host; /* host from which to recd. */ + + /* Used for filtering. */ + char *f_host; /* host from which to recd. */ + char *f_program; /* program this applies to */ + struct prop_filter *f_prop_filter; /* property-based filter */ u_char f_pmask[LOG_NFACILITIES+1]; /* priority mask */ u_char f_pcmp[LOG_NFACILITIES+1]; /* compare priority */ #define PRI_LT 0x1 #define PRI_EQ 0x2 #define PRI_GT 0x4 - char *f_program; /* program this applies to */ - struct prop_filter *f_prop_filter; /* property-based filter */ + + /* Logging destinations. */ + int f_file; /* file descriptor */ + int f_flags; /* file-specific flags */ +#define FFLAG_SYNC 0x01 +#define FFLAG_NEEDSYNC 0x02 union { - char f_uname[MAXUNAMES][MAXLOGNAME]; + char f_uname[MAXUNAMES][MAXLOGNAME]; /* F_WALL, F_USERS */ + char f_fname[MAXPATHLEN]; /* F_FILE, F_CONSOLE, F_TTY */ struct { char f_hname[MAXHOSTNAMELEN]; struct addrinfo *f_addr; - - } f_forw; /* forwarding address */ - char f_fname[MAXPATHLEN]; + } f_forw; /* F_FORW */ struct { char f_pname[MAXPATHLEN]; pid_t f_pid; - } f_pipe; + } f_pipe; /* F_PIPE */ } f_un; #define fu_uname f_un.f_uname +#define fu_fname f_un.f_fname #define fu_forw_hname f_un.f_forw.f_hname #define fu_forw_addr f_un.f_forw.f_addr -#define fu_fname f_un.f_fname #define fu_pipe_pname f_un.f_pipe.f_pname #define fu_pipe_pid f_un.f_pipe.f_pid + + /* Book-keeping. */ char f_prevline[MAXSVLINE]; /* last message logged */ + time_t f_time; /* time this was last written */ struct logtime f_lasttime; /* time of last occurrence */ int f_prevpri; /* pri of f_prevline */ size_t f_prevlen; /* length of f_prevline */ int f_prevcount; /* repetition cnt of prevline */ u_int f_repeatcount; /* number of "repeated" msgs */ - int f_flags; /* file-specific flags */ -#define FFLAG_SYNC 0x01 -#define FFLAG_NEEDSYNC 0x02 + STAILQ_ENTRY(filed) next; /* next in linked list */ }; static STAILQ_HEAD(, filed) fhead = STAILQ_HEAD_INITIALIZER(fhead); /* Log files that we write to */ -static struct filed consfile; /* Console */ +static struct filed consfile; /* Console */ /* From nobody Thu Sep 28 15:52:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ020XPwz4ty9l; Thu, 28 Sep 2023 15:52: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 4RxJ016sSHz4KcS; Thu, 28 Sep 2023 15:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vhs3pWPOGGH72/gVPsXQGPjtyrPlzoccNSysCdipefo=; b=CSka65XQggF5zdIBKwygikWI5ppA98KjujkpZsbGjwn9fSNXxDhi5s3z//7b2x0OYWAiSY sn2KUzisY6qfceoCBNRMVficonP1Jp2eJmELfwlULC5c0hRCMrc3LFQhVp3m2Cy6Mhr0Sy WuGtFS9cwQD8b8l6G/Fva7qMPmCBU2FWwbfOAxE65BCF02vo54w+nz/Lj8Y7gyFM9h7s8N Ykx8O2pXIToBcYh7DCESK7V89TXXgu4M8p2tI2qHjBrbcW9fw/cnXYv88wXaiJstgWL9Ty RkctQwwh9EQFmzguYwz8+JUF+L6pgkbXPyl0u5HuMn59uu82qxbSfvKPwhFUOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916354; a=rsa-sha256; cv=none; b=fQpFEGvMLgxe6c0Q+++sZ32Y5WpoT0gsr+AxLOFp6yn4w9TAVhzSkuQNmLbmj41awnjM4O upuQEOIdhfUR1Vc91CgBA3Niutx7Mo5sFI44mgyWGYtz3R0oq7PKkhIzaD9OuM83G6Znzz AvFG7WZmji5Pm2IPTaTz8hnm1+/2qUHCn7ysi94oC1KfGnQS0WYlM4TOAdDsSEbI0QuDJd /GCMIoGnRxjjrifm6N/7SJ3wgFDxaQEXJT0YIrreIoe0OY+5wm+5xm+tzQQWeh+BFPi4/f NwgQtQATy9nKfgNrFcK8xD7S53hL9FJu+TXf7LrlpttkOB7BzkVrbNttBdFQMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vhs3pWPOGGH72/gVPsXQGPjtyrPlzoccNSysCdipefo=; b=yebru0GF2JIySAXxS6GoDrSzRTHiqLU0OL99APCRS8LRxSSrl69zxfatT5AuQUaPEnoSsJ IuOb/vJpCf8CYruKMjQSD/n/+9XfR+d7MpmO59tgokVAOOhXINrMt6YVe00ee6V+MPgWeO +zq2ZvRZKYpzekwNnSpn27lJolcH0SiCui5hPBcwheTdUY6WS/QVWhMc3IMX5A+ptvUEQX JAGSLQUxj6De2jeSNzvjnXkOSQq2SGRO4gZt4X2mvqX+8tEZFJqHZiKvCtDpmsHhe0JJ5n vVKz3hD4BlFHLCdgjxWi1nVap2inGozoLOViWatK1FB+azOOGNVuuNniVrobqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ015jtwzD8w; Thu, 28 Sep 2023 15:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqXDh021983; Thu, 28 Sep 2023 15:52:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqXnV021980; Thu, 28 Sep 2023 15:52:33 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:33 GMT Message-Id: <202309281552.38SFqXnV021980@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: 95381c0139d6 - main - syslogd: Use process descriptors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 95381c0139d639c78c922956621cae152471a09b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=95381c0139d639c78c922956621cae152471a09b commit 95381c0139d639c78c922956621cae152471a09b Author: Jake Freeland AuthorDate: 2023-09-01 02:50:14 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Use process descriptors Prepare for program Capsicumization by storing process descriptors instead of pids. Signal delivery is not permitted in capability mode, so we can use pdkill(2) to terminate child processes. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41369 --- usr.sbin/syslogd/syslogd.c | 109 ++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 9498b900ed9b..fff45372fda8 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -107,6 +107,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -298,7 +299,7 @@ struct filed { } f_forw; /* F_FORW */ struct { char f_pname[MAXPATHLEN]; - pid_t f_pid; + int f_procdesc; } f_pipe; /* F_PIPE */ } f_un; #define fu_uname f_un.f_uname @@ -306,7 +307,7 @@ struct filed { #define fu_forw_hname f_un.f_forw.f_hname #define fu_forw_addr f_un.f_forw.f_addr #define fu_pipe_pname f_un.f_pipe.f_pname -#define fu_pipe_pid f_un.f_pipe.f_pid +#define fu_pipe_pd f_un.f_pipe.f_procdesc /* Book-keeping. */ char f_prevline[MAXSVLINE]; /* last message logged */ @@ -327,7 +328,7 @@ static struct filed consfile; /* Console */ * Queue of about-to-be dead processes we should watch out for. */ struct deadq_entry { - pid_t dq_pid; + int dq_procdesc; int dq_timeout; TAILQ_ENTRY(deadq_entry) dq_entries; }; @@ -438,9 +439,9 @@ static void addpeer(const char *, const char *, mode_t); static void addsock(const char *, const char *, mode_t); static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); -static void deadq_enter(pid_t, const char *); -static int deadq_remove(struct deadq_entry *); -static int deadq_removebypid(pid_t); +static void deadq_enter(int); +static void deadq_remove(struct deadq_entry *); +static bool deadq_removebypid(pid_t); static int decode(const char *, const CODE *); static void die(int) __dead2; static void dofsync(void); @@ -495,7 +496,10 @@ close_filed(struct filed *f) f->f_type = F_UNUSED; break; case F_PIPE: - f->fu_pipe_pid = 0; + if (f->fu_pipe_pd >= 0) { + deadq_enter(f->fu_pipe_pd); + f->fu_pipe_pd = -1; + } break; default: break; @@ -1944,20 +1948,16 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) case F_PIPE: dprintf(" %s\n", f->fu_pipe_pname); iovlist_append(il, "\n"); - if (f->fu_pipe_pid == 0) { + if (f->fu_pipe_pd == -1) { if ((f->f_file = p_open(f->fu_pipe_pname, - &f->fu_pipe_pid)) < 0) { + &f->fu_pipe_pd)) < 0) { logerror(f->fu_pipe_pname); break; } } if (writev(f->f_file, il->iov, il->iovcnt) < 0) { - int e = errno; - - deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); - close_filed(f); - errno = e; logerror(f->fu_pipe_pname); + close_filed(f); } break; @@ -2260,7 +2260,7 @@ static void reapchild(int signo __unused) { int status; - pid_t pid; + pid_t pid, pipe_pid; struct filed *f; while ((pid = wait3(&status, WNOHANG, (struct rusage *)NULL)) > 0) { @@ -2270,8 +2270,16 @@ reapchild(int signo __unused) /* Now, look in list of active processes. */ STAILQ_FOREACH(f, &fhead, next) { - if (f->f_type == F_PIPE && - f->fu_pipe_pid == pid) { + if (f->f_type == F_PIPE) { + if (pdgetpid(f->fu_pipe_pd, &pipe_pid) == -1) { + dprintf("Failed to query PID: %s\n", + strerror(errno)); + continue; + } + if (pipe_pid != pid) + continue; + /* Do not enter into deadq. */ + f->fu_pipe_pd = -1; close_filed(f); log_deadchild(pid, status, f->fu_pipe_pname); break; @@ -2352,7 +2360,8 @@ die(int signo) /* flush any pending output */ if (f->f_prevcount) fprintlog_successive(f, 0); - if (f->f_type == F_PIPE && f->fu_pipe_pid > 0) + /* close our end of the pipe */ + if (f->f_type == F_PIPE) close_filed(f); } if (signo) { @@ -2608,7 +2617,6 @@ init(bool reload) close_filed(f); break; case F_PIPE: - deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); close_filed(f); break; default: @@ -3135,7 +3143,7 @@ cfline(const char *line, const char *prog, const char *host, break; case '|': - f->fu_pipe_pid = 0; + f->fu_pipe_pd = -1; (void)strlcpy(f->fu_pipe_pname, p + 1, sizeof(f->fu_pipe_pname)); f->f_type = F_PIPE; @@ -3220,7 +3228,7 @@ markit(void) switch (dq->dq_timeout) { case 0: /* Already signalled once, try harder now. */ - if (kill(dq->dq_pid, SIGKILL) != 0) + if (pdkill(dq->dq_procdesc, SIGKILL) != 0) (void)deadq_remove(dq); break; @@ -3233,7 +3241,7 @@ markit(void) * didn't even really exist, in case we simply * drop it from the dead queue). */ - if (kill(dq->dq_pid, SIGTERM) != 0) + if (pdkill(dq->dq_procdesc, SIGTERM) != 0) (void)deadq_remove(dq); else dq->dq_timeout--; @@ -3610,10 +3618,10 @@ validate(struct sockaddr *sa, const char *hname) * opposed to a FILE *. */ static int -p_open(const char *prog, pid_t *rpid) +p_open(const char *prog, int *rpd) { sigset_t sigset = { }; - int pfd[2], nulldesc; + int nulldesc, pfd[2], pd; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ char errmsg[200]; @@ -3624,7 +3632,7 @@ p_open(const char *prog, pid_t *rpid) /* we are royally screwed anyway */ return (-1); - switch ((pid = fork())) { + switch ((pid = pdfork(&pd, PD_CLOEXEC))) { case -1: close(nulldesc); return (-1); @@ -3676,63 +3684,54 @@ p_open(const char *prog, pid_t *rpid) (int)pid); logerror(errmsg); } - *rpid = pid; + *rpd = pd; return (pfd[1]); } static void -deadq_enter(pid_t pid, const char *name) +deadq_enter(int pd) { struct deadq_entry *dq; - int status; - if (pid == 0) + if (pd == -1) return; - /* - * Be paranoid, if we can't signal the process, don't enter it - * into the dead queue (perhaps it's already dead). If possible, - * we try to fetch and log the child's status. - */ - if (kill(pid, 0) != 0) { - if (waitpid(pid, &status, WNOHANG) > 0) - log_deadchild(pid, status, name); - return; - } dq = malloc(sizeof(*dq)); if (dq == NULL) { logerror("malloc"); exit(1); } - *dq = (struct deadq_entry){ - .dq_pid = pid, - .dq_timeout = DQ_TIMO_INIT - }; + + dq->dq_procdesc = pd; + dq->dq_timeout = DQ_TIMO_INIT; TAILQ_INSERT_TAIL(&deadq_head, dq, dq_entries); } -static int +static void deadq_remove(struct deadq_entry *dq) { - if (dq != NULL) { - TAILQ_REMOVE(&deadq_head, dq, dq_entries); - free(dq); - return (1); - } - - return (0); + TAILQ_REMOVE(&deadq_head, dq, dq_entries); + close(dq->dq_procdesc); + free(dq); } -static int +static bool deadq_removebypid(pid_t pid) { struct deadq_entry *dq; + pid_t dq_pid; TAILQ_FOREACH(dq, &deadq_head, dq_entries) { - if (dq->dq_pid == pid) - break; + if (pdgetpid(dq->dq_procdesc, &dq_pid) == -1) { + dprintf("Failed to query PID: %s\n", strerror(errno)); + continue; + } + if (dq_pid == pid) { + deadq_remove(dq); + return (true); + } } - return (deadq_remove(dq)); + return (false); } static void From nobody Thu Sep 28 15:52:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ032RzGz4tyQx; Thu, 28 Sep 2023 15:52: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 4RxJ030lkPz4KgC; Thu, 28 Sep 2023 15:52:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gx66RsGiBI+lLnIrrgGjvWw8O3jpF78eaBTd6FohqGQ=; b=lUsU/XVEprW9Qz2bxSGBVc5WgFJhYhN6TWFsv8qWvMaqMmKCTBhgLyVqY3z3kvzhYyMz7h S2Rr3WO1SamW+phSpRAjhaF6ynaYYrBqg8bwzwprg8Tjkl8W044gOz0DF3RROu0clrEo3c jASo1o1PT4afahRr48WI3e09B1Ehou53FR0PqtcNNO5+IHCkroyV/wPfjllhOylI2rDBMy ry7wF4d4VbFHaOv1+PfHqZZ1M1yDCWUUwz6itqjmoRslMUfUuwFTBISiADW9+vwnNnNxLy N1GEF+fAL56TCWIwj7muoqJvPYn0u9bvMapEmSsHOSOCRNMqdNAVIJBgxO0QLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916355; a=rsa-sha256; cv=none; b=qfZf45autHad1ol6DH2DYf1GRrae5cGyjO99kLBkrfBbqKJsVdTirKF09X/agDgKPhm8yY q2sNE1QhIMyugpZJmY0Lyo/fauY8w0ggOAQtUl13M32ORDQfzFzFSCFdFNu0MIpZulUEb1 jA1i5uT8Iwbtkvf49A+D9G3D4r5PPJhI8gZggTOJh0cAibQVNmtAMc27QaFTXD8VC74L9e x2jUqg7VzceLOYCXVOWnqoTGcr7Zet0QSNFyaYbuZ5bGr3ExVGUcqmmxDe5I2/5XguALR1 6POLx8iSvZkEncusZJ0YWRrinoJddHnf6K6WmvjH77X+OkLFsjQZEXsBxKe1lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gx66RsGiBI+lLnIrrgGjvWw8O3jpF78eaBTd6FohqGQ=; b=Z+xEdNVCsyBs8Ge5gfL0lAy3HkXjHIThvu7oWZd8fwvVWpnQda6SBRstBXVwBERPAWFxql y1DZBC2pI3anGIYlO4MKRjZNn8gf9GlgGVYXQXsG5x6Xdh9tzjWD48rHzTIrA06idKlclz BMd2ylQW4wz0XcjpAmfHFaMWi+QFPzCiWFXus5TgPQM11kYnQ9MTQBIZU801X0RBzcZC6A jLDE9paVhFo+dHE8b7tF0cMD8QzpUrWh4rThH42q3N+7DFjA5AAlCgYShtKW5LOhM6qrEs tnaenjMIx2i9Rod2U7AKA8lpoYmt4LWwU9ZBgUQVxSKvAXMeTfEAhqkc+8QQbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ026zJnzD68; Thu, 28 Sep 2023 15:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqYBI022028; Thu, 28 Sep 2023 15:52:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqYHt022025; Thu, 28 Sep 2023 15:52:34 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:34 GMT Message-Id: <202309281552.38SFqYHt022025@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: fe233250d6fd - main - syslogd: Do not reap child processes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: fe233250d6fd0d4b915c89244f2b1f79cb45284e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fe233250d6fd0d4b915c89244f2b1f79cb45284e commit fe233250d6fd0d4b915c89244f2b1f79cb45284e Author: Jake Freeland AuthorDate: 2023-09-01 02:50:19 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Do not reap child processes Use the SA_NOCLDWAIT sigaction() flag to disable the creation of zombie processes. This leaves no reason to wait() on children, so remove the reaping routine. Previously, deadq entries were removed in reapchild(). Move deadq removal into markit() after SIGKILL is sent. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41415 --- usr.sbin/syslogd/syslogd.c | 101 +++++---------------------------------------- 1 file changed, 11 insertions(+), 90 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index fff45372fda8..c20928d48495 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -441,7 +441,6 @@ static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); static void deadq_enter(int); static void deadq_remove(struct deadq_entry *); -static bool deadq_removebypid(pid_t); static int decode(const char *, const CODE *); static void die(int) __dead2; static void dofsync(void); @@ -453,7 +452,6 @@ static void init(bool); static void logerror(const char *); static void logmsg(int, const struct logtime *, const char *, const char *, const char *, const char *, const char *, const char *, int); -static void log_deadchild(pid_t, int, const char *); static void markit(void); static struct socklist *socksetup(struct addrinfo *, const char *, mode_t); static int socklist_recv_file(struct socklist *); @@ -466,7 +464,6 @@ static int prop_filter_compile(struct prop_filter *pfilter, static void parsemsg(const char *, char *); static void printsys(char *); static int p_open(const char *, pid_t *); -static void reapchild(int); static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); static bool validate(struct sockaddr *, const char *); @@ -598,6 +595,7 @@ addfile(int fd) int main(int argc, char *argv[]) { + struct sigaction act = { }; sigset_t sigset = { }; struct kevent ev; struct socklist *sl; @@ -846,6 +844,14 @@ main(int argc, char *argv[]) } (void)alarm(TIMERINTVL); + /* Do not create zombie processes. */ + act.sa_flags = SA_NOCLDWAIT; + if (sigaction(SIGCHLD, &act, NULL) == -1) { + warn("failed to apply signal handler"); + pidfile_remove(pfh); + exit(1); + } + /* tuck my process id away */ pidfile_write(pfh); @@ -884,9 +890,6 @@ main(int argc, char *argv[]) case SIGALRM: markit(); break; - case SIGCHLD: - reapchild(ev.ident); - break; } break; } @@ -2256,38 +2259,6 @@ ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) return (ttymsg(iov, iovcnt, line, tmout)); } -static void -reapchild(int signo __unused) -{ - int status; - pid_t pid, pipe_pid; - struct filed *f; - - while ((pid = wait3(&status, WNOHANG, (struct rusage *)NULL)) > 0) { - /* First, look if it's a process from the dead queue. */ - if (deadq_removebypid(pid)) - continue; - - /* Now, look in list of active processes. */ - STAILQ_FOREACH(f, &fhead, next) { - if (f->f_type == F_PIPE) { - if (pdgetpid(f->fu_pipe_pd, &pipe_pid) == -1) { - dprintf("Failed to query PID: %s\n", - strerror(errno)); - continue; - } - if (pipe_pid != pid) - continue; - /* Do not enter into deadq. */ - f->fu_pipe_pd = -1; - close_filed(f); - log_deadchild(pid, status, f->fu_pipe_pname); - break; - } - } - } -} - /* * Return a printable representation of a host address. */ @@ -3228,19 +3199,11 @@ markit(void) switch (dq->dq_timeout) { case 0: /* Already signalled once, try harder now. */ - if (pdkill(dq->dq_procdesc, SIGKILL) != 0) - (void)deadq_remove(dq); + (void)pdkill(dq->dq_procdesc, SIGKILL); + (void)deadq_remove(dq); break; case 1: - /* - * Timed out on dead queue, send terminate - * signal. Note that we leave the removal - * from the dead queue to reapchild(), which - * will also log the event (unless the process - * didn't even really exist, in case we simply - * drop it from the dead queue). - */ if (pdkill(dq->dq_procdesc, SIGTERM) != 0) (void)deadq_remove(dq); else @@ -3715,48 +3678,6 @@ deadq_remove(struct deadq_entry *dq) free(dq); } -static bool -deadq_removebypid(pid_t pid) -{ - struct deadq_entry *dq; - pid_t dq_pid; - - TAILQ_FOREACH(dq, &deadq_head, dq_entries) { - if (pdgetpid(dq->dq_procdesc, &dq_pid) == -1) { - dprintf("Failed to query PID: %s\n", strerror(errno)); - continue; - } - if (dq_pid == pid) { - deadq_remove(dq); - return (true); - } - } - return (false); -} - -static void -log_deadchild(pid_t pid, int status, const char *name) -{ - int code; - char buf[256]; - const char *reason; - - errno = 0; /* Keep strerror() stuff out of logerror messages. */ - if (WIFSIGNALED(status)) { - reason = "due to signal"; - code = WTERMSIG(status); - } else { - reason = "with status"; - code = WEXITSTATUS(status); - if (code == 0) - return; - } - (void)snprintf(buf, sizeof buf, - "Logging subprocess %d (%s) exited %s %d.", - pid, name, reason, code); - logerror(buf); -} - static struct socklist * socksetup(struct addrinfo *ai, const char *name, mode_t mode) { From nobody Thu Sep 28 15:52:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ042077z4tyD5; Thu, 28 Sep 2023 15:52: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 4RxJ041Skdz4Km3; Thu, 28 Sep 2023 15:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpaNHhMesP1diCQH6KFx+T5rklksPu7I3a8phQtpa7o=; b=DsLXqFxZ8QyK5mpa1uOVKoNQx31AgVGVBZoEgNqT5mPUDtmSu+D57KtPla75FympJnx6av ROl1VA+/FvuvjN7BrfmTRPGz7kKoWW+g09QteqiulKrqHQZ7903o7yYe7ZcfH0HV+vyV1W MMokiY2t8sN5x5m0Uoeit/6vTR5tV0sjCvlj1h4zZd3MI//Dq6DWf4+Tj8nTPCHX6S8N/H VXrk14IZE6IT5rjKqqAeG35nRBzuBIncksTjXb+/3QErRD6PFeyOki6AFS2H5pDi0DJzkV PjGfr1H4iuIk7C1fiR2egbFmYO7Oq81nbFHFHWcKUUdB4ByqP2RKneVLiMeV6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916356; a=rsa-sha256; cv=none; b=eF3Uz16Nyk9kpoU5vowh9mWgXYFUoxm1vXUHIvxt12J71RFUf4XuJOJMOItF7zaXbJWi5Z ViLlZ849+Itxhc0dYfgYL1XIUyWrtYqUNHRV7X5OOft3uljMduJsi4nWZyqLaDd/t2T3xK /3CuaLhiPfXzzIJaKjG+K7kSgHBUsWujsGdUyqChNO7R3jSCA6ry86EShvAtwc0Oi9PRtX LyCP925f84mOZpmz2EklDvGVSKsBprs43/TWS6QYV2TqNCSxrAAmiV8CUjtCSbueV6F1Zk o9TP2gp8knomdPIOlSIsY6meyrkEFyi/TDl97+6cbwAtVUqSoRjFv6Dz8Q5ODw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpaNHhMesP1diCQH6KFx+T5rklksPu7I3a8phQtpa7o=; b=NKxqeXwKOEBmzOXsTAnPVp6ugDFuO3bGdmJ8E/wfGKZxmWjbE1Mvl9D4snrLs9001lNjCA oLh2eTAu4PFGr3X6cKUXVN0xSyAbWK7sp0pRyqhIn7OgMdPcq0lE2NX1OgHLa+Mo1cQVgt brTSXzPXSyJ1toP5I2MAjZPwXjRwrEo5u/hP6RJmmq6Q1vzs+52D/7quGXmYN7ggHYG/5P RqTPJvyhHAOUEkFTzcXMppEtB94SOtgCFxj0xzSEzNpkkjM4AiUhziq+qY1ntcEUcP2Fdv OeRt3iVwUvHBHwgg4aW23YF3WnKtFSrcKivpOII+9DAOQyN1/EMrrJSIX31UMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ040ZwxzDL7; Thu, 28 Sep 2023 15:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqaRG022075; Thu, 28 Sep 2023 15:52:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqaxk022072; Thu, 28 Sep 2023 15:52:36 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:36 GMT Message-Id: <202309281552.38SFqaxk022072@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: bbde787c6668 - main - syslogd: Merge loops List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: bbde787c6668803e2c4e999ef699d545b26160a6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bbde787c6668803e2c4e999ef699d545b26160a6 commit bbde787c6668803e2c4e999ef699d545b26160a6 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:26 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Merge loops Merge the two loops that traverse the global filed queue. Both loops' actions are not dependent on the other, so combining them is safe. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41370 --- usr.sbin/syslogd/syslogd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c20928d48495..a37f3a9482bf 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2575,7 +2575,10 @@ init(bool reload) * Close all open log files. */ Initialized = false; - STAILQ_FOREACH(f, &fhead, next) { + while (!STAILQ_EMPTY(&fhead)) { + f = STAILQ_FIRST(&fhead); + STAILQ_REMOVE_HEAD(&fhead, next); + /* flush any pending output */ if (f->f_prevcount) fprintlog_successive(f, 0); @@ -2593,10 +2596,7 @@ init(bool reload) default: break; } - } - while(!STAILQ_EMPTY(&fhead)) { - f = STAILQ_FIRST(&fhead); - STAILQ_REMOVE_HEAD(&fhead, next); + free(f->f_program); free(f->f_host); if (f->f_prop_filter) { From nobody Thu Sep 28 15:52:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ053hpHz4tyR1; Thu, 28 Sep 2023 15:52: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 4RxJ052mxCz4KvY; Thu, 28 Sep 2023 15:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aiG+BVyiKG/kLspx18ZbFEdmiUjI7IKOrNR1CQglw44=; b=xQC3fdL3eKEOKkOQrwCeLArZvVFNt9KyJtwRlHBwmTZRSZO/ZConTH5JAnp13cQdae+DSV SSl++XwcYetejvWF29h66KvEZr7JdYIeOKiI7MA7MJtsta0maomLXCtTHec9HJ/vf7xjMH 3PkuwUlU1SplvWWR77mS6gzrIebvE1QqmG/2+KbTlWa0wmqBUvcq5yNQteVRS6UBSp7ilu CragBMOMslaiZQXLooXhfSa2AWU7VimZEpgtuANG57wCswTrIMIOIYuKGEV/unSqapIs7/ 3PHtuMHBuyxg0CN/kf2H/auB7kgAWpoUmBNiOpGyPT5hltbKw/ttwLTpWelqyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916357; a=rsa-sha256; cv=none; b=STu2T0nfj/QzWS1vAVyW8Hwlw8WPnjVOGNwU7b1HQuOllSNGZUveV2DD3sEluhXFZIO95J 2RWht/NETLWZitcqp8ViHzJVi0ielRM8Avvvq7+IGUK+YDwet2MlIftJ05fTa0aYilt9Gv fqS/xIS4Z1Sv8i0K3b0fqA7dDWryqoLGpoKioaoFsaozRnAZ7SipoyH71TTj974EYfrU51 RX980PjQANZs1xbRDKFcDdHKXOfB3XCxikdIqTm/Dmyf9qM+4OneWYIV34J1tZQKhn7mmU GhSVaGtd2qfm6F1SxpDh+4Bu7PcfpYODeq3WtmcJzkrEkAMJg4xPdJ7kNxfkkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aiG+BVyiKG/kLspx18ZbFEdmiUjI7IKOrNR1CQglw44=; b=wKxEHBZu9Qdty6fWD1bYH6DgII4dHsHJQfahlqJFEOC4FbePGqN6P3X8S7U3fvAH+ZdVj+ rXCt726Fc1svtHymUagzkfYt0vYUrseFOktSYh9+6TVx4lUXFu9GFeS04B1PaEQYU4qUym hIKTHPEcvm7LivuxpRYT8vITLk/Bm8LaShCJem13mgWawU5USIOkD7IWPcYtvwuxOzeQyi jCC+v345ta+VKg/CrmDKNsTW+oUX7kU7jgsBSICd0jPeWOVjxgkhhxiiCCMQqETPgYlX12 9zENuTKCds5QsWS8EZUk2LRZCbs0oDrGXsp9MBuKuPc6seznafdygu8J9A7y+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 4RxJ051rB1zDL8; Thu, 28 Sep 2023 15:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqbLK022123; Thu, 28 Sep 2023 15:52:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqb94022120; Thu, 28 Sep 2023 15:52:37 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:37 GMT Message-Id: <202309281552.38SFqb94022120@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: cd90f3afb72a - main - syslogd: Do not print bad data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: cd90f3afb72a31415996fffd46026a74d64124ea Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd90f3afb72a31415996fffd46026a74d64124ea commit cd90f3afb72a31415996fffd46026a74d64124ea Author: Jake Freeland AuthorDate: 2023-09-01 02:50:35 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Do not print bad data If errno is zero, then buf is never filled and we're printing uninitialized data. Print the msg buffer instead to mitigate this. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41371 --- usr.sbin/syslogd/syslogd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index a37f3a9482bf..c63683efead6 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2314,7 +2314,7 @@ logerror(const char *msg) msg = buf; } errno = 0; - dprintf("%s\n", buf); + dprintf("%s\n", msg); logmsg(LOG_SYSLOG|LOG_ERR, NULL, LocalHostName, "syslogd", NULL, NULL, NULL, msg, 0); recursed--; From nobody Thu Sep 28 15:52:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ064bjkz4tyR3; Thu, 28 Sep 2023 15:52: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 4RxJ063m37z4KsT; Thu, 28 Sep 2023 15:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916358; h=from:from:reply-to:subject:subject: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+ZiwWlyJ5mZ2tavvX3vLrKWTA/Ax6swOwogTwfP/1g=; b=NCaEiXNiYNV4P0NfkJFqWgR7HjNs/CqRNHBVSpLH+Urog/iBB5zwtNRWT2kossMbH0xC0t 9gnOy1yn0kRlicLuYL1hGjME+Ik56cBog18tzY7jleZ+jwKhPVOx0UvtJUoXEqrAahguA7 Sbg65qrN67w/JJ0mIVJzZuxEoDQk7mOR8zbnAecoCEzD3OFNHByDgZvpzsNzxzUNnCxq7A P6RVNhApjGsLv+KElTr8gEjND7z43jrk81wWvbsY/jVwvB3rN12dEL81I9OON9KVNOgFaB fTA7C4x6Miz1Ki+y2ceLTpFHQnN4BNYJGRXyCWXDiv8FmtQgKkY3wrSFYcc1cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916358; a=rsa-sha256; cv=none; b=raa9vK/jQhQp0rgV2GDSO8MZ8fsHpEBOuaNiTIRAWUI4wqIn/jy8afg2TwdjT1tY0el4nW zzU+WiLReKTV07SA0+SIWUF+Ax5JP/GnV7UKcwgsSmbz/OLVyPRdQEwY+TquzDlKflZtHa v+Hfiw1NF03ou7N2cSIpuTHQne3+FdWB0uKtKveTFCq64v0Pd8moTjLMQeeo+XGFi6RwI7 VVFnA1LC5ebzFKdXsDaFxIGzgTiVt0Lk7pAPBdM3mvztWNPNsK5C21gzgF0t+RJV8wAZbh 1Q2xTGcXp8o2wcLT5KNjeJYcYgr98c6QhTPmN0VSM/tEIPJQmVvC+u5tg0VTRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916358; h=from:from:reply-to:subject:subject: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+ZiwWlyJ5mZ2tavvX3vLrKWTA/Ax6swOwogTwfP/1g=; b=FYiHh7qkw5ctKtUU/gxPrseHtXM5oAnK7UPg1ZOyDGSBc//kdvsssXuuMTMr4UpciK2vg/ yxRILZ+0Tsy6p7ZJ9hB5gnUzNcpdFa9r/4OqDsnqmDH02GIQF4jm733IUcis+swhG7ZS0b 6sWrI1sDYXiBBwQbtmhRVY6lFhTiuVeQgnYDTIq8TN/T7FLC/6ABaSEg2RP7ZMtU/xHPUC QV6uVwNmblW05V5hlXIOag+p24YFBToOJ92ViuwKOKWDNEvtOVsqiBKKFuVkJRPIkTeREn EJBj4we+Q1AFo2/+5z8+EVyFROMJARURA8Twp/6xikpKhSM9N3o9Pf3raOkMqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ062smKzDL9; Thu, 28 Sep 2023 15:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqcrA022168; Thu, 28 Sep 2023 15:52:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqcEA022165; Thu, 28 Sep 2023 15:52:38 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:38 GMT Message-Id: <202309281552.38SFqcEA022165@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: 688ecad8e197 - main - syslogd: Move prop_filter allocation into function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 688ecad8e197b1e1337de5160c56e4137276974b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=688ecad8e197b1e1337de5160c56e4137276974b commit 688ecad8e197b1e1337de5160c56e4137276974b Author: Jake Freeland AuthorDate: 2023-09-01 02:50:39 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Move prop_filter allocation into function Clean up the cfline() function by moving the prop_filter memory allocation into the prop_filter_compile() function. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41373 --- usr.sbin/syslogd/syslogd.c | 72 ++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c63683efead6..40c233f02d7f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -459,8 +459,7 @@ static int socklist_recv_sock(struct socklist *); static int skip_message(const char *, const char *, int); static int evaluate_prop_filter(const struct prop_filter *filter, const char *value); -static int prop_filter_compile(struct prop_filter *pfilter, - char *filterstr); +static struct prop_filter *prop_filter_compile(const char *); static void parsemsg(const char *, char *); static void printsys(char *); static int p_open(const char *, pid_t *); @@ -2707,17 +2706,31 @@ init(bool reload) /* * Compile property-based filter. - * Returns 0 on success, -1 otherwise. */ -static int -prop_filter_compile(struct prop_filter *pfilter, char *filter) +static struct prop_filter * +prop_filter_compile(const char *cfilter) { - char *filter_endpos, *p; + struct prop_filter *pfilter; + char *filter, *filter_endpos, *filter_begpos, *p; char **ap, *argv[2] = {NULL, NULL}; int re_flags = REG_NOSUB; int escaped; - bzero(pfilter, sizeof(struct prop_filter)); + pfilter = calloc(1, sizeof(*pfilter)); + if (pfilter == NULL) { + logerror("pfilter calloc"); + exit(1); + } + if (*cfilter == '*') { + pfilter->prop_type = FILT_PROP_NOOP; + return (pfilter); + } + filter = strdup(cfilter); + if (filter == NULL) { + logerror("strdup"); + exit(1); + } + filter_begpos = filter; /* * Here's some filter examples mentioned in syslog.conf(5) @@ -2738,7 +2751,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) if (argv[0] == NULL || argv[1] == NULL) { logerror("filter parse error"); - return (-1); + goto error; } /* fill in prop_type */ @@ -2752,7 +2765,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) pfilter->prop_type = FILT_PROP_PROGNAME; else { logerror("unknown property"); - return (-1); + goto error; } /* full in cmp_flags (i.e. !contains, icase_regex, etc.) */ @@ -2779,7 +2792,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) re_flags |= REG_EXTENDED; } else { logerror("unknown cmp function"); - return (-1); + goto error; } /* @@ -2791,7 +2804,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) filter += strspn(filter, ", \t\n"); if (*filter != '"' || strlen(filter) < 3) { logerror("property value parse error"); - return (-1); + goto error; } filter++; @@ -2823,30 +2836,33 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* We should not have anything but whitespace left after closing '"' */ if (*p != '\0' && strspn(p, " \t\n") != strlen(p)) { logerror("property value parse error"); - return (-1); + goto error; } if (pfilter->cmp_type == FILT_CMP_REGEX) { pfilter->pflt_re = calloc(1, sizeof(*pfilter->pflt_re)); if (pfilter->pflt_re == NULL) { logerror("RE calloc() error"); - free(pfilter->pflt_re); - return (-1); + goto error; } if (pfilter->cmp_flags & FILT_FLAG_ICASE) re_flags |= REG_ICASE; if (regcomp(pfilter->pflt_re, filter, re_flags) != 0) { logerror("RE compilation error"); - free(pfilter->pflt_re); - return (-1); + goto error; } } else { pfilter->pflt_strval = strdup(filter); pfilter->pflt_strlen = strlen(filter); } - return (0); - + free(filter_begpos); + return (pfilter); +error: + free(filter_begpos); + free(pfilter->pflt_re); + free(pfilter); + return (NULL); } /* @@ -2860,8 +2876,7 @@ cfline(const char *line, const char *prog, const char *host, struct addrinfo hints, *res; int error, i, pri; const char *p, *q; - char *bp, *pfilter_dup; - char buf[LINE_MAX], ebuf[100]; + char *bp, buf[LINE_MAX], ebuf[100]; bool syncfile; dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, @@ -2908,24 +2923,11 @@ cfline(const char *line, const char *prog, const char *host, } if (pfilter) { - f->f_prop_filter = calloc(1, sizeof(*(f->f_prop_filter))); + f->f_prop_filter = prop_filter_compile(pfilter); if (f->f_prop_filter == NULL) { - logerror("pfilter calloc"); + logerror("filter compile error"); exit(1); } - if (*pfilter == '*') - f->f_prop_filter->prop_type = FILT_PROP_NOOP; - else { - pfilter_dup = strdup(pfilter); - if (pfilter_dup == NULL) { - logerror("strdup"); - exit(1); - } - if (prop_filter_compile(f->f_prop_filter, pfilter_dup)) { - logerror("filter compile error"); - exit(1); - } - } } /* scan through the list of selectors */ From nobody Thu Sep 28 15:52:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ076j4rz4tyKH; Thu, 28 Sep 2023 15:52: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 4RxJ074gDVz4LGy; Thu, 28 Sep 2023 15:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iaBoYLpHqpHO0NkD0yQtZcWOYS08mWfuTBtJOJO8ErE=; b=atXCdqiKTfhWOrP9LFVzczpVJyQY7SajI2stLBHME6JKdJtrGECE+2yFTiZveVzZAqHYhj Up/ighIrAE9VR744K7zRLp8Te/c01n50B8Vvb0C2cFcbMdrRZeC1up0zIfDO8obCz+ZLNX Tx/gLhISPd7Zsbr06X6A3Ik7tdoWzSOMKvnoel2+SG6heH6sOeD+i6PojVriPPhyCLZwpb PZgYxdHz9yTQwbtLvG8NSos8qPnVuGPg1eRmoAjtIxFb9Uvza/EM5mlEUaX+HcVoYTMAA8 maAUosqJmB5IT5B+GBbxWPhQrViVF/GJKx7jSwcuCjT/QWysudkx+khvUWn69Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916359; a=rsa-sha256; cv=none; b=aQlaZYV12ZgrLg2K8qdJQCql54sloJRWl2utFduMDMiyGrDq8Q33XuK8jqIjUF28Pj7Mes 26jRiE89YYU3ZthmYMLunCq9TFFtA0Nnsy6FPSmX9mbRr7nDedQdsmZAdBcQzIMqcLnz82 WTh0KhK1MKo59TBbyBs9QF7533v3bS3woCpF+MS7J1cRL4yfQ2gEoSYNe22dk1hyYufX+7 5RVcR7Px51Ax33H843IwUKS6A4mFoKf6a3Q4+LDmTPmid8g1Ed96ahXKnYj8jwR92N6XU3 xB2PgRPmxhBPp2eQ8hMGZSQYfgL8H68WwOPa74h7pS0Lgx6c8lmcXsm2baZpGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iaBoYLpHqpHO0NkD0yQtZcWOYS08mWfuTBtJOJO8ErE=; b=Cr8J6KFeCsFx5yGt0/ZnWS1JfIPy+RY6tUMejMDr7jPCubq+J1HwCUmvyoWRxLKYyuqiZZ G8OT3TlYYrUw0/TdPKg9xYtGV1/5sz46Mgyz4GzoSOmwVfLPLx6sDd3pSTmLkmJ9TYTpNP 77+KIK3Ynuis9cYXJPz9jd8zmhONoUgZPRoQzmPKAWZQv+lfgVCo9I+mAoN/A9Z8cTEzCZ 1gJLLraiHW2dIDIuzD44vOXruNXD1xKhZUAEoVB9MMhfw8jsQMVsD0i2cYtoeRKJKQHAU9 wDRV15qKZeVUJd+fepMLQ0fO4wKlk2Xzm7iiSt1loTPHadqIdIWmBiKxFJUvsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ073fqSzD69; Thu, 28 Sep 2023 15:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqdLR022219; Thu, 28 Sep 2023 15:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqdOL022216; Thu, 28 Sep 2023 15:52:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:39 GMT Message-Id: <202309281552.38SFqdOL022216@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: f4b4a10abb26 - main - syslogd: Move selector parsing into its own function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f4b4a10abb2688f0fef9a0cf15117b10a7f2d398 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f4b4a10abb2688f0fef9a0cf15117b10a7f2d398 commit f4b4a10abb2688f0fef9a0cf15117b10a7f2d398 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:45 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Move selector parsing into its own function Clean up the cfline() function by moving selector parsing into its own function. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41374 --- usr.sbin/syslogd/syslogd.c | 210 ++++++++++++++++++++++----------------------- 1 file changed, 104 insertions(+), 106 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 40c233f02d7f..6c07d60b484f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2865,6 +2865,107 @@ error: return (NULL); } +static const char * +parse_selector(const char *p, struct filed *f) +{ + int i, pri; + int pri_done = 0, pri_cmp = 0, pri_invert = 0; + char *bp, buf[LINE_MAX], ebuf[100]; + const char *q; + + /* find the end of this facility name list */ + for (q = p; *q && *q != '\t' && *q != ' ' && *q++ != '.';) + continue; + + /* get the priority comparison */ + if (*q == '!') { + pri_invert = 1; + q++; + } + while (!pri_done) { + switch (*q) { + case '<': + pri_cmp |= PRI_LT; + q++; + break; + case '=': + pri_cmp |= PRI_EQ; + q++; + break; + case '>': + pri_cmp |= PRI_GT; + q++; + break; + default: + pri_done++; + break; + } + } + + /* collect priority name */ + for (bp = buf; *q != '\0' && !strchr("\t,; ", *q); ) + *bp++ = *q++; + *bp = '\0'; + + /* skip cruft */ + while (strchr(",;", *q)) + q++; + + /* decode priority name */ + if (*buf == '*') { + pri = LOG_PRIMASK; + pri_cmp = PRI_LT | PRI_EQ | PRI_GT; + } else { + /* Ignore trailing spaces. */ + for (i = strlen(buf) - 1; i >= 0 && buf[i] == ' '; i--) + buf[i] = '\0'; + + pri = decode(buf, prioritynames); + if (pri < 0) { + errno = 0; + (void)snprintf(ebuf, sizeof ebuf, + "unknown priority name \"%s\"", buf); + logerror(ebuf); + free(f); + return (NULL); + } + } + if (!pri_cmp) + pri_cmp = UniquePriority ? PRI_EQ : (PRI_EQ | PRI_GT); + if (pri_invert) + pri_cmp ^= PRI_LT | PRI_EQ | PRI_GT; + + /* scan facilities */ + while (*p != '\0' && !strchr("\t.; ", *p)) { + for (bp = buf; *p != '\0' && !strchr("\t,;. ", *p); ) + *bp++ = *p++; + *bp = '\0'; + + if (*buf == '*') { + for (i = 0; i < LOG_NFACILITIES; i++) { + f->f_pmask[i] = pri; + f->f_pcmp[i] = pri_cmp; + } + } else { + i = decode(buf, facilitynames); + if (i < 0) { + errno = 0; + (void)snprintf(ebuf, sizeof ebuf, + "unknown facility name \"%s\"", + buf); + logerror(ebuf); + free(f); + return (NULL); + } + f->f_pmask[i >> 3] = pri; + f->f_pcmp[i >> 3] = pri_cmp; + } + while (*p == ',' || *p == ' ') + p++; + } + return (q); +} + /* * Crack a configuration file line */ @@ -2874,9 +2975,8 @@ cfline(const char *line, const char *prog, const char *host, { struct filed *f; struct addrinfo hints, *res; - int error, i, pri; + int error, i; const char *p, *q; - char *bp, buf[LINE_MAX], ebuf[100]; bool syncfile; dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, @@ -2931,110 +3031,8 @@ cfline(const char *line, const char *prog, const char *host, } /* scan through the list of selectors */ - for (p = line; *p && *p != '\t' && *p != ' ';) { - int pri_done; - int pri_cmp; - int pri_invert; - - /* find the end of this facility name list */ - for (q = p; *q && *q != '\t' && *q != ' ' && *q++ != '.'; ) - continue; - - /* get the priority comparison */ - pri_cmp = 0; - pri_done = 0; - pri_invert = 0; - if (*q == '!') { - pri_invert = 1; - q++; - } - while (!pri_done) { - switch (*q) { - case '<': - pri_cmp |= PRI_LT; - q++; - break; - case '=': - pri_cmp |= PRI_EQ; - q++; - break; - case '>': - pri_cmp |= PRI_GT; - q++; - break; - default: - pri_done++; - break; - } - } - - /* collect priority name */ - for (bp = buf; *q && !strchr("\t,; ", *q); ) - *bp++ = *q++; - *bp = '\0'; - - /* skip cruft */ - while (strchr(",;", *q)) - q++; - - /* decode priority name */ - if (*buf == '*') { - pri = LOG_PRIMASK; - pri_cmp = PRI_LT | PRI_EQ | PRI_GT; - } else { - /* Ignore trailing spaces. */ - for (i = strlen(buf) - 1; i >= 0 && buf[i] == ' '; i--) - buf[i] = '\0'; - - pri = decode(buf, prioritynames); - if (pri < 0) { - errno = 0; - (void)snprintf(ebuf, sizeof ebuf, - "unknown priority name \"%s\"", buf); - logerror(ebuf); - free(f); - return; - } - } - if (!pri_cmp) - pri_cmp = (UniquePriority) - ? (PRI_EQ) - : (PRI_EQ | PRI_GT) - ; - if (pri_invert) - pri_cmp ^= PRI_LT | PRI_EQ | PRI_GT; - - /* scan facilities */ - while (*p && !strchr("\t.; ", *p)) { - for (bp = buf; *p && !strchr("\t,;. ", *p); ) - *bp++ = *p++; - *bp = '\0'; - - if (*buf == '*') { - for (i = 0; i < LOG_NFACILITIES; i++) { - f->f_pmask[i] = pri; - f->f_pcmp[i] = pri_cmp; - } - } else { - i = decode(buf, facilitynames); - if (i < 0) { - errno = 0; - (void)snprintf(ebuf, sizeof ebuf, - "unknown facility name \"%s\"", - buf); - logerror(ebuf); - free(f); - return; - } - f->f_pmask[i >> 3] = pri; - f->f_pcmp[i >> 3] = pri_cmp; - } - while (*p == ',' || *p == ' ') - p++; - } - - p = q; - } + for (p = line; *p != '\0' && *p != '\t' && *p != ' ';) + p = parse_selector(p, f); /* skip to action part */ while (*p == '\t' || *p == ' ') From nobody Thu Sep 28 15:52:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ085vqSz4tyKP; Thu, 28 Sep 2023 15:52: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 4RxJ085KHXz4LHP; Thu, 28 Sep 2023 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LstUF1dmLcaZ0E8sTDmZ/96tdEnLLA292yFBmmJ+Dlw=; b=DHauTtd3aRM/iQxtwZAIgpN+FgulZnLkLBcATufE7FOxJ5eCT3l1XAlPpJeGi357W1gr6p ZyljK+z1IZogI0vhLvrNO7aMK3bcm+RF5dfdSnFslHp2dFmbppu136FoVE2UNkOSeNGFD3 c452R8jJpb7wjuAFOeJSoChPKylEsoZfXIVtfWie9ZvUJYziQLvR4/Irk6E6ydkf1H9u6P SAOH9iHmCSiZebikGZQ3nRGldnnsegZf/QGjj7WKO1QWswP0Tz00/nl8jhmBR8yAY9gmM4 9dtOZIvy1dPhzVJ1M29O9x612ymrcyGT6u0fFdbuZtR8trIJ0vhp6KMKYTc6+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916360; a=rsa-sha256; cv=none; b=bHi2IsEEUt7LT3mNmPKd51nFxpr69K4ja/MgU3lqEH2L0OSPZFTxF5s5u67M5BVSkqyyyO runzB1On8WAoLLVav/yrg9ydk+zZ8/as7eqnP4GU8saMPhACOLMbC3LXY7XYt9FMcOsDE0 2uGD+GEpr4EQMu2uf1J32P6eZiOXKDxdYIMYcLvNnKtQauAoXPQ6SrpC2Y7Fz9nVWnwhn9 ySJQYlEU5FD9D4hT+dbKdHDK1V0PaEhQI1A5b848bnz63MODLMq8IiT9c9/KmG4w+Vd6uB 5AhxKzUNCp9YmnWng9cuxpgOT7oZu056e/W6cXCyopqnfcQ+KJk4zuthpGGl3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LstUF1dmLcaZ0E8sTDmZ/96tdEnLLA292yFBmmJ+Dlw=; b=JfOrLA0hpHkpdQJRPKOGX6XKfr/GJktJp2G3Bc0rVtzXUQYk34q7S8QmjVYzHl0eHj+vY/ CjbqwjzckvVV2+bIMmX6MzdvESW00o71P+PIooT+3qRHTcp0i2uR7IXnuNbryIlq0f477M qkiAh6xOtJCEF5KkxZ/p00ZIvWl1dv0pSONRDQGPSgJM/sVEG67hp2CXsbO+11mXwSLEoc 6UiLp58jzrONvgoh36ehBC2NiGNqh7A2CHv8X8alkG5DZc2WyutCMHjsECaTjnr7HKrkKy Ibsos5HFBAPhZoN7Rfs6I2QqwMtxsqdQcKhlqo2xxeLfjZwvL85J94TvaFnnHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ084PNBzCTk; Thu, 28 Sep 2023 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqeUo022271; Thu, 28 Sep 2023 15:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqeNX022268; Thu, 28 Sep 2023 15:52:40 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:40 GMT Message-Id: <202309281552.38SFqeNX022268@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: 8f49f83ef5f3 - main - syslogd: Move action parsing into its own function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8f49f83ef5f3059621365adc958eab560776a9f0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8f49f83ef5f3059621365adc958eab560776a9f0 commit 8f49f83ef5f3059621365adc958eab560776a9f0 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:49 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Move action parsing into its own function Clean up the cfline() function by moving action parsing into its own function. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41375 --- usr.sbin/syslogd/syslogd.c | 141 ++++++++++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 67 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 6c07d60b484f..5965eb2b0252 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2966,78 +2966,14 @@ parse_selector(const char *p, struct filed *f) return (q); } -/* - * Crack a configuration file line - */ static void -cfline(const char *line, const char *prog, const char *host, - const char *pfilter) +parse_action(const char *p, struct filed *f) { - struct filed *f; struct addrinfo hints, *res; int error, i; - const char *p, *q; + const char *q; bool syncfile; - dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, - host, pfilter); - - f = calloc(1, sizeof(*f)); - if (f == NULL) { - logerror("malloc"); - exit(1); - } - errno = 0; /* keep strerror() stuff out of logerror messages */ - - for (i = 0; i <= LOG_NFACILITIES; i++) - f->f_pmask[i] = INTERNAL_NOPRI; - - /* save hostname if any */ - if (host && *host == '*') - host = NULL; - if (host) { - int hl; - - f->f_host = strdup(host); - if (f->f_host == NULL) { - logerror("strdup"); - exit(1); - } - hl = strlen(f->f_host); - if (hl > 0 && f->f_host[hl-1] == '.') - f->f_host[--hl] = '\0'; - /* RFC 5424 prefers logging FQDNs. */ - if (RFC3164OutputFormat) - trimdomain(f->f_host, hl); - } - - /* save program name if any */ - if (prog && *prog == '*') - prog = NULL; - if (prog) { - f->f_program = strdup(prog); - if (f->f_program == NULL) { - logerror("strdup"); - exit(1); - } - } - - if (pfilter) { - f->f_prop_filter = prop_filter_compile(pfilter); - if (f->f_prop_filter == NULL) { - logerror("filter compile error"); - exit(1); - } - } - - /* scan through the list of selectors */ - for (p = line; *p != '\0' && *p != '\t' && *p != ' ';) - p = parse_selector(p, f); - - /* skip to action part */ - while (*p == '\t' || *p == ' ') - p++; - if (*p == '-') { syncfile = false; p++; @@ -3140,9 +3076,80 @@ cfline(const char *line, const char *prog, const char *host, f->f_type = F_USERS; break; } - STAILQ_INSERT_TAIL(&fhead, f, next); } +/* + * Crack a configuration file line + */ +static void +cfline(const char *line, const char *prog, const char *host, + const char *pfilter) +{ + struct filed *f; + const char *p; + + dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, + host, pfilter); + + f = calloc(1, sizeof(*f)); + if (f == NULL) { + logerror("malloc"); + exit(1); + } + errno = 0; /* keep strerror() stuff out of logerror messages */ + + for (int i = 0; i <= LOG_NFACILITIES; i++) + f->f_pmask[i] = INTERNAL_NOPRI; + + /* save hostname if any */ + if (host && *host == '*') + host = NULL; + if (host) { + int hl; + + f->f_host = strdup(host); + if (f->f_host == NULL) { + logerror("strdup"); + exit(1); + } + hl = strlen(f->f_host); + if (hl > 0 && f->f_host[hl-1] == '.') + f->f_host[--hl] = '\0'; + /* RFC 5424 prefers logging FQDNs. */ + if (RFC3164OutputFormat) + trimdomain(f->f_host, hl); + } + + /* save program name if any */ + if (prog && *prog == '*') + prog = NULL; + if (prog) { + f->f_program = strdup(prog); + if (f->f_program == NULL) { + logerror("strdup"); + exit(1); + } + } + + if (pfilter) { + f->f_prop_filter = prop_filter_compile(pfilter); + if (f->f_prop_filter == NULL) { + logerror("filter compile error"); + exit(1); + } + } + + /* scan through the list of selectors */ + for (p = line; *p != '\0' && *p != '\t' && *p != ' ';) + p = parse_selector(p, f); + + /* skip to action part */ + while (*p == '\t' || *p == ' ') + p++; + parse_action(p, f); + + STAILQ_INSERT_TAIL(&fhead, f, next); +} /* * Decode a symbolic name to a numeric value From nobody Thu Sep 28 15:52:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ096tMZz4txtZ; Thu, 28 Sep 2023 15:52: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 4RxJ096M99z4LMt; Thu, 28 Sep 2023 15:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJy90gNDtkSRNx+P+4cKEka5tZko8UOCWPjc5KqsbG4=; b=kwEpNYzqCoYXZiCxwRKrJESHMnhEAxSuUBqGMbQc9r0P4e/xHRSMYg6L33N9xvC/mjwFRR aX+6LsDjfAfN6qFXglPWsl+C1V9vKZTwhFgJKWYt203j+SxtNIJ0kPFo+x77JwtnVFJpmz 8s6Hq2aEs8S/A/k+QaP1nyXuechJOe9L1wxygdAqkHixoo+yZmDWNoLjfv4867Kv5tqj3E c6PBCePae2M4SCzdTMYqP+8sNA/ySZWhCDBDVrecp+5QEZr1YDdHO2ZHzO5BTLpxMlTeaV Uxeit4hi3utEu5j3b6VSAdMMo6wCE0y9WzYqHlp/GBClto+8xmzNLat8MuLQ4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916361; a=rsa-sha256; cv=none; b=m/Pr/0eGq4VYWxSo2J6B/B48UOZCMFyUwRCwRN8sZxlqbjbhl/YkCuhRP+o9JOwooKyLAN RDXwpbN2/L/k5HF9PMA8zk3ZLvNHWnQbEmyPdcD0mLTIp2ZpS3I/aiobvnmAToZir1v2Qs N0bd3+jUDze0YVY5k1v635H+AsoUUDHa09O2AA2fecmKLJ6+aiFeuPq+EJ7Z6eVt/KNUol pOAG8AFYiglEsbUiioWokXAC4vKX4V95OT2o4szNwAxZpQ3ilXpsrjXLhr8wbB6ZTrO/D8 jMugm0vSOot+A137l+Jp7dDjHn4Oi8SYQcP+RmGCOmkW+DIhg2ux9MBqTJe67A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJy90gNDtkSRNx+P+4cKEka5tZko8UOCWPjc5KqsbG4=; b=NjnhqFK8dYbfnXuXlJlJ+9MHVLG4E8V3zdYnNLCAneLmv6aG10XtrvQAgOAtk+uZMfvwHj 8//UQVv+N90xbeqAjrs14eqgg4OVg1Z/etd5IFNqT85MEHfJOFLMOVmP0t+oojll/iey3N LHGGc3ZfLzjueXTaoDuQvm+DFxHHUo6jVm9psUtM8iR5YjDtDwutQfbCq8f14wG2jG1peS fn1Ri1gCU+UM2T4+IbwBDfpTyFlvJInizP8gM45JBoOHbdoVkT4UhziE9j04K8J/V2cXWa uYF2I74GoM/mZXG5YD7lAa5UrbIptdFQcP1nhdQ1iNkfVYt49tAK2sehDPXIPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0957YFzDLB; Thu, 28 Sep 2023 15:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqfFr022318; Thu, 28 Sep 2023 15:52:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqfDr022315; Thu, 28 Sep 2023 15:52:41 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:41 GMT Message-Id: <202309281552.38SFqfDr022315@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: 09080d8ec52b - main - syslogd: Fix sizeof() styling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 09080d8ec52bb37ccb1c6bd99fe6360b68225092 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=09080d8ec52bb37ccb1c6bd99fe6360b68225092 commit 09080d8ec52bb37ccb1c6bd99fe6360b68225092 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:55 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Fix sizeof() styling Use parentheses when applying sizeof() per style(9). Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41376 --- usr.sbin/syslogd/syslogd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 5965eb2b0252..659b71385087 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -809,7 +809,7 @@ main(int argc, char *argv[]) setlinebuf(stdout); consfile.f_type = F_CONSOLE; - (void)strlcpy(consfile.fu_fname, ctty + sizeof _PATH_DEV - 1, + (void)strlcpy(consfile.fu_fname, ctty + sizeof(_PATH_DEV) - 1, sizeof(consfile.fu_fname)); (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); @@ -2923,7 +2923,7 @@ parse_selector(const char *p, struct filed *f) pri = decode(buf, prioritynames); if (pri < 0) { errno = 0; - (void)snprintf(ebuf, sizeof ebuf, + (void)snprintf(ebuf, sizeof(ebuf), "unknown priority name \"%s\"", buf); logerror(ebuf); free(f); @@ -2950,7 +2950,7 @@ parse_selector(const char *p, struct filed *f) i = decode(buf, facilitynames); if (i < 0) { errno = 0; - (void)snprintf(ebuf, sizeof ebuf, + (void)snprintf(ebuf, sizeof(ebuf), "unknown facility name \"%s\"", buf); logerror(ebuf); @@ -3461,11 +3461,11 @@ allowaddr(char *s __unused) printf("numeric, "); getnameinfo(sstosa(&ap->a_addr), (sstosa(&ap->a_addr))->sa_len, - ip, sizeof ip, NULL, 0, NI_NUMERICHOST); + ip, sizeof(ip), NULL, 0, NI_NUMERICHOST); printf("addr = %s, ", ip); getnameinfo(sstosa(&ap->a_mask), (sstosa(&ap->a_mask))->sa_len, - ip, sizeof ip, NULL, 0, NI_NUMERICHOST); + ip, sizeof(ip), NULL, 0, NI_NUMERICHOST); printf("mask = %s; ", ip); } else { printf("domainname = %s; ", ap->a_name); @@ -3513,8 +3513,8 @@ validate(struct sockaddr *sa, const char *hname) if (getaddrinfo(name, NULL, &hints, &res) == 0) freeaddrinfo(res); else if (strchr(name, '.') == NULL) { - strlcat(name, ".", sizeof name); - strlcat(name, LocalDomain, sizeof name); + strlcat(name, ".", sizeof(name)); + strlcat(name, LocalDomain, sizeof(name)); } if (getnameinfo(sa, sa->sa_len, ip, sizeof(ip), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) != 0) @@ -3648,7 +3648,7 @@ p_open(const char *prog, int *rpd) */ if (fcntl(pfd[1], F_SETFL, O_NONBLOCK) == -1) { /* This is bad. */ - (void)snprintf(errmsg, sizeof errmsg, + (void)snprintf(errmsg, sizeof(errmsg), "Warning: cannot change pipe to PID %d to " "non-blocking behaviour.", (int)pid); From nobody Thu Sep 28 15:52:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ0C0gKxz4tyRB; Thu, 28 Sep 2023 15:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0C0Bsqz4LJd; Thu, 28 Sep 2023 15:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QDgjUIMAeloC6Nhn8AC5tAmaDn//SlTOIPSlN4lOVtQ=; b=GZeHQeS2jqZuQL3EKzDW1g3rGUZV5EcR/+aZ5uUfrutNw8yNwz7naZqUiG14c8Zqe7zMg5 RYxHPtBD/5S5zYORszXKFm+YUjH2C195Ef7ziUz5oC4pPB980DJUEO3FCI03kylrud15Am wonZiiJNOhkt+FLFCpsVsNgbUTvs1dwyAnL7huFgtvNMB44VD3PrUC+GZxQwH5KQIjc1Rs qkrujB7tjUF/Idj/wNpSNUrcGEMim9Fy7DPDIvhSG0cnDEIY1gw4k398td6+6dtczXWhN5 uM4YYCbO4I+XzRUiCf9W8s4awPAB1JcZesQjMMDuPqIuZFvUa0BQL36MJempqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916363; a=rsa-sha256; cv=none; b=JZdNQo9nfnTg5KvK/mXy9HFmihT+6pvjHfPOqq079z6VEpR+kIyIGjRaYq2IdUk17ooQtm sa0Uk3yHUGzxHDc70Do/Su7oSuRosKRaRCTxOdUjmibKKEnrLss2MOS1D2SxjqQd052KHC 37mG0CpzHz7ASGTltV290Pt1tRXrpc7MU/ERKQzMSYkeiRy+hed69gQbR6bRHa40+7S30E uckGOFqNnpMnbHJvQB7IyxLKdpuu3YQZKVr0Mk+wDp0peOq/pRD6pCLS4GMajKl22jSC/S WCWNqLLZ6Y5oFAgWP40XLRpPJYSrIJRNufqWjAFvnRcCWJK0+w3cQGFWvL1AYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QDgjUIMAeloC6Nhn8AC5tAmaDn//SlTOIPSlN4lOVtQ=; b=C/Lkzv4/a6nESjSKv3fmDNzKILC22ohVx9Xnee6x9lhWsdszhU0P/QlmoODw0h0A/KQyc3 1/KiJUBMQozHXktJcnB/5cGoLK/LHuJjrV/+K+9/53cfi2bdOJ8pxbGZUpEbsXFWgK9nhD U6WYVyLghk33lIJq+rxP7NM4EsosDo+rwEOccqFSSfcjzZXelGt7dCy+piZY5Dpcm5TpNB FMU6nkOqvGNulrytEnkYHQpRaFVx5ef+hb7h779t5HKPLmtNqW45uXTpnH22SXB17OF2uI kczqRcAFVJJniT9WN/EwNIZ7B63NMeKGJMEfO3Pm+UC24YjiHJppNSHOxFk2NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0B6M8kzD8y; Thu, 28 Sep 2023 15:52:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqgrL022360; Thu, 28 Sep 2023 15:52:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqgF3022357; Thu, 28 Sep 2023 15:52:42 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:42 GMT Message-Id: <202309281552.38SFqgF3022357@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: 3854dd52a3d3 - main - syslogd: Add closelogfiles() function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3854dd52a3d3ff4a7a298fba10c96c8988fb814d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3854dd52a3d3ff4a7a298fba10c96c8988fb814d commit 3854dd52a3d3ff4a7a298fba10c96c8988fb814d Author: Jake Freeland AuthorDate: 2023-09-01 02:51:00 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Add closelogfiles() function The closelogfiles() function completely disassembles the global filed list by freeing all filed components and removing them from the list. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41388 --- usr.sbin/syslogd/syslogd.c | 96 ++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 659b71385087..d317afa73844 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2520,6 +2520,54 @@ readconfigfile(const char *path) } } +/* + * Close all open log files. + */ +static void +closelogfiles(void) +{ + struct filed *f; + + while (!STAILQ_EMPTY(&fhead)) { + f = STAILQ_FIRST(&fhead); + STAILQ_REMOVE_HEAD(&fhead, next); + + /* flush any pending output */ + if (f->f_prevcount) + fprintlog_successive(f, 0); + + switch (f->f_type) { + case F_FILE: + case F_FORW: + case F_CONSOLE: + case F_TTY: + case F_PIPE: + close_filed(f); + break; + default: + break; + } + + free(f->f_program); + free(f->f_host); + if (f->f_prop_filter) { + switch (f->f_prop_filter->cmp_type) { + case FILT_CMP_REGEX: + regfree(f->f_prop_filter->pflt_re); + free(f->f_prop_filter->pflt_re); + break; + case FILT_CMP_CONTAINS: + case FILT_CMP_EQUAL: + case FILT_CMP_STARTS: + free(f->f_prop_filter->pflt_strval); + break; + } + free(f->f_prop_filter); + } + free(f); + } +} + /* * INIT -- Initialize syslogd from configuration table */ @@ -2527,7 +2575,6 @@ static void init(bool reload) { int i; - struct filed *f; char *p; char oldLocalHostName[MAXHOSTNAMELEN]; char hostMsg[2*MAXHOSTNAMELEN+40]; @@ -2570,56 +2617,15 @@ init(bool reload) unsetenv("TZ"); } - /* - * Close all open log files. - */ Initialized = false; - while (!STAILQ_EMPTY(&fhead)) { - f = STAILQ_FIRST(&fhead); - STAILQ_REMOVE_HEAD(&fhead, next); - - /* flush any pending output */ - if (f->f_prevcount) - fprintlog_successive(f, 0); - - switch (f->f_type) { - case F_FILE: - case F_FORW: - case F_CONSOLE: - case F_TTY: - close_filed(f); - break; - case F_PIPE: - close_filed(f); - break; - default: - break; - } - - free(f->f_program); - free(f->f_host); - if (f->f_prop_filter) { - switch (f->f_prop_filter->cmp_type) { - case FILT_CMP_REGEX: - regfree(f->f_prop_filter->pflt_re); - free(f->f_prop_filter->pflt_re); - break; - case FILT_CMP_CONTAINS: - case FILT_CMP_EQUAL: - case FILT_CMP_STARTS: - free(f->f_prop_filter->pflt_strval); - break; - } - free(f->f_prop_filter); - } - free(f); - } - + closelogfiles(); readconfigfile(ConfFile); Initialized = true; if (Debug) { + struct filed *f; int port; + STAILQ_FOREACH(f, &fhead, next) { for (i = 0; i <= LOG_NFACILITIES; i++) if (f->f_pmask[i] == INTERNAL_NOPRI) From nobody Thu Sep 28 15:52:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ0D2yCTz4tyWp; Thu, 28 Sep 2023 15:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0D1228z4LLg; Thu, 28 Sep 2023 15:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2p2MZepxBQtEecnqY9gGt836faRkL429Nas+a1aCiQ=; b=Qps3tFOUVq6qNfmaNAm+nJmfgGw5S8qvgsyG2GOEOf4aPoffipAI0u+F5lZ5wFtEJwgbQm 8BZBe+G/shT2iao8IDbnWoLmSwGhtyX+6InhPIe4J0yKU+BN+Y8kvtXP7OIEOL/ur1A6AL ksAEmoOm9SE1OAueQVPYh9c2wiivV0ErnK1aIyZGQfG4te3JxSm6GvT9NKOsPwlWCP9bqO mJfP542ZsOAbvG1SlLViJtQhTagSC7mdG6VmsiB+AEOvS8urWJqrHvO3+bQGdyTxlan22l 3qcvadZjDdBvDDifEnGGInWjDR6MHSPR40p0iGCkyN+hX/6LfdSUwc6aUBQ3/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916364; a=rsa-sha256; cv=none; b=OeklR43J+h2+jp5aPHa0gL0+ocLdXu0s+jnocz3ksWPS3GSXa0nLRgLeZnvfs2O7boegU+ vz9jIdp6iUjSO3PwVORI+Qr3XJwN8pP7Inv310VhuFN9u5Fb5HQL2VXC6INyRkR8yeiYf4 Hll1A37pW3O3RzL9rk2sBWFinfdvBCYb48ek/guRqo1CwenDwyBA7CjKxMK6RDZlsjJ3ry XQzsf5zy05hAHtiNgNa3c0oYVrfkBLx5yIpc0OmgG9tLfW2T7bnPGi3OB3kERgWQHAHx9H bvs4LrjZMHxZGv75poAeglt5SatS8Ao3t96fLbEzN+xi5QwUkhh092BHVKQWSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2p2MZepxBQtEecnqY9gGt836faRkL429Nas+a1aCiQ=; b=LYflaOM5gbIKb8fS/pyPt4pVEteZkJLcSU1rHAo6giIPtgb6UbdM3re6/mf5sfzKvsPqZJ RplcZyJurvoRXgkpJ6jAdAboYd3ukgipEWDREUNZgTkzA6QVW128NuUCmy6C0SNODTlZVa RBVLTpBuK9ugM1Ugw3RuMQ2QJZK0jnekwejcEgUyVwEFlKSI6FiEYjCylLclTLcI8LOJSA 2CcXmDShDMfWzAyHJ3YiUzryq2y1yu3NzHdUg9WyQYG5JZ7MQ6scxEi3omSpHpuBH6hKNQ ozRCE55xGqlfKaChJ7HhuAjYXjVOf8rS8JPladWsz0gTxRF0ybtek5MGd/p51w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0D06gCzDJ8; Thu, 28 Sep 2023 15:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqh7r022399; Thu, 28 Sep 2023 15:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqhZF022396; Thu, 28 Sep 2023 15:52:43 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:43 GMT Message-Id: <202309281552.38SFqhZF022396@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: 5b44c24f8524 - main - syslogd: unlink() -> unlinkat() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5b44c24f8524558b4e4c4c24dc465e9f4eed5ae9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5b44c24f8524558b4e4c4c24dc465e9f4eed5ae9 commit 5b44c24f8524558b4e4c4c24dc465e9f4eed5ae9 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:06 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: unlink() -> unlinkat() Save basename and dirname for use in unlinkat() when removing UNIX sockets from fs. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41379 --- usr.sbin/syslogd/syslogd.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index d317afa73844..5ccea8ce424b 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -130,6 +130,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -198,7 +199,8 @@ struct socklist { #define sl_salen sl_ai.ai_addrlen #define sl_family sl_ai.ai_family int sl_socket; - const char *sl_name; + char *sl_name; + int sl_dirfd; int (*sl_recv)(struct socklist *); STAILQ_ENTRY(socklist) next; }; @@ -2341,8 +2343,12 @@ die(int signo) logerror(buf); } STAILQ_FOREACH(sl, &shead, next) { - if (sl->sl_sa != NULL && sl->sl_family == AF_LOCAL) - unlink(sl->sl_name); + if (sl->sl_sa != NULL && sl->sl_family == AF_LOCAL) { + if (unlinkat(sl->sl_dirfd, sl->sl_name, 0) == -1) { + dprintf("Failed to unlink %s: %s", sl->sl_name, + strerror(errno)); + } + } } pidfile_remove(pfh); @@ -3782,7 +3788,16 @@ socksetup(struct addrinfo *ai, const char *name, mode_t mode) if (sl == NULL) err(1, "malloc failed"); sl->sl_socket = s; - sl->sl_name = name; + if (ai->ai_family == AF_LOCAL) { + char *name2 = strdup(name); + if (name2 == NULL) + err(1, "strdup failed"); + sl->sl_name = strdup(basename(name2)); + sl->sl_dirfd = open(dirname(name2), O_DIRECTORY); + if (sl->sl_name == NULL || sl->sl_dirfd == -1) + err(1, "failed to save dir info for %s", name); + free(name2); + } sl->sl_recv = sl_recv; (void)memcpy(&sl->sl_ai, ai, sizeof(*ai)); if (ai->ai_addrlen > 0) { From nobody Thu Sep 28 15:52:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ0F3pCVz4tyTQ; Thu, 28 Sep 2023 15:52: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 4RxJ0F23q0z4LVQ; Thu, 28 Sep 2023 15:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5nPGGzR1okCfIpeJvPGZzV3+QEmdhW9QFkeDwuWYIY=; b=Gjyg/djthN8pd2i2J6h4R9P++Dn7J1VQkh0HVWvpMtjIbY/ZWBHA9V/wPRV2sxGs2Pu4fV vCWdUnf7OvWEsN9nch/Ypkv9dVajNlfFaDgzZv0PhLORLs97TiVQytGZo0a+d0E3LpOD/M bRXZkyodnVIhcNnZqjPAXHD2DoRjwkWg1ilwtGEfGC3HZQDxjkaJL29mfq9mmlWt/mSwE5 6cHSHeLa3/6pMiyGtCLhUl8BC0xUUkruZ8WERVYDVLhiQfyMK4Xf0rm+TKMzCUA8AjKE90 2RmNp/vU5P1bS8i/QTh3PICnKuPboqCg+CCq+qdhAbOU+iaDyOLIgZBItZ30Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916365; a=rsa-sha256; cv=none; b=kYZXxxXKji23+kTa8z2WHLLdP1W7io+n2qDnO0pdtPIv7yLR98BIhAIht2WmUSbOPNe/7l VU1jI1mOTMxZfj7d9Llv0D41+npdGjyr20zkWHAnoZJCnv/K7dLiT2MLVfPQPJkfI9P39g YMioiIfPB/A38Wd5c2W1s1L+HrWyp7jRx0wQVggyhMbpwzdJ/SL6I8DTiLpYDksGa9TgiI rxJIfkBKyoDeoLlwUG5YrnVa3D1eZPJ7UGd981dbZ+pDAPMzKhYhrxdm9ZRdC//ZPHqC+O zIjetzzM0iFoM4n25+jQk4EiUeUXKUUAQntGGBP6MmdOQELujdWml4WLh25M0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5nPGGzR1okCfIpeJvPGZzV3+QEmdhW9QFkeDwuWYIY=; b=b5anzByTL/ETjHTzLUoihZV5AtfCvbgnKcR+N/ezjDd1cdQmjP89T94dpLIBHXslvr8EB6 9qRIhgInw2ycRsEeewe18cVaQvV4gGEWtNxNv/xW4+ONlvoSizlffJjrtqraOHJGNZW7v9 TXST/azzd79QBmTq18uw8aGNCFXsUu7SwFyoI37CEWzZnhHYxyF27LiFYX5HbsVdyrUr6f elEgxFNE8M4n4WnIycbREdxzvb3zvbdcwTaJwG93jISGC7IP3xynM9tHaYQ0GCvyA04RWi wGgPzXndrm3JKj6RdYgLEfhguoiaAZCp1UHdf7gRDznJ9DI6w36N+m/LsVynlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0F19mNzCTm; Thu, 28 Sep 2023 15:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqjif022448; Thu, 28 Sep 2023 15:52:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqjBL022445; Thu, 28 Sep 2023 15:52:45 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:45 GMT Message-Id: <202309281552.38SFqjBL022445@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: c3175a6e1c5a - main - syslogd: Do not open console descriptor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c3175a6e1c5a4b6337368ea140e3a3837b327ef2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c3175a6e1c5a4b6337368ea140e3a3837b327ef2 commit c3175a6e1c5a4b6337368ea140e3a3837b327ef2 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:12 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Do not open console descriptor Setup consfile filed for logging while Initialized is false, but do not bother opening the console. Close console/tty descriptors after parsing, as well. The ttymsg() function will re-open these descriptors for us. Also, remove references to the ctty global variable since it will always be _PATH_CONSOLE. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41380 --- usr.sbin/syslogd/syslogd.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 5ccea8ce424b..9f4c21cab026 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -154,7 +154,6 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; static const char *ConfFile = _PATH_LOGCONF; static const char *PidFile = _PATH_LOGPID; -static const char ctty[] = _PATH_CONSOLE; static const char include_str[] = "include"; static const char include_ext[] = ".conf"; @@ -800,6 +799,12 @@ main(int argc, char *argv[]) if (Sflag == 0) addsock(_PATH_LOG_PRIV, NULL, S_IRUSR | S_IWUSR); + consfile.f_type = F_CONSOLE; + consfile.f_file = -1; + (void)strlcpy(consfile.fu_fname, _PATH_CONSOLE + sizeof(_PATH_DEV) - 1, + sizeof(consfile.fu_fname)); + (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); + if ((!Foreground) && (!Debug)) { ppid = waitdaemon(30); if (ppid < 0) { @@ -810,11 +815,6 @@ main(int argc, char *argv[]) } else if (Debug) setlinebuf(stdout); - consfile.f_type = F_CONSOLE; - (void)strlcpy(consfile.fu_fname, ctty + sizeof(_PATH_DEV) - 1, - sizeof(consfile.fu_fname)); - (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); - kq = kqueue(); if (kq == -1) { warn("failed to initialize kqueue"); @@ -1651,20 +1651,9 @@ logmsg(int pri, const struct logtime *timestamp, const char *hostname, /* log the message to the particular outputs */ if (!Initialized) { - f = &consfile; - /* - * Open in non-blocking mode to avoid hangs during open - * and close(waiting for the port to drain). - */ - f->f_file = open(ctty, O_WRONLY | O_NONBLOCK, 0); - - if (f->f_file >= 0) { - f->f_lasttime = *timestamp; - fprintlog_first(f, hostname, app_name, procid, msgid, - structured_data, msg, flags); - close(f->f_file); - f->f_file = -1; - } + consfile.f_lasttime = *timestamp; + fprintlog_first(&consfile, hostname, app_name, procid, + msgid, structured_data, msg, flags); return; } @@ -3049,12 +3038,15 @@ parse_action(const char *p, struct filed *f) if (syncfile) f->f_flags |= FFLAG_SYNC; if (isatty(f->f_file)) { - if (strcmp(p, ctty) == 0) + if (strcmp(p, _PATH_CONSOLE) == 0) f->f_type = F_CONSOLE; else f->f_type = F_TTY; (void)strlcpy(f->fu_fname, p + sizeof(_PATH_DEV) - 1, sizeof(f->fu_fname)); + /* This will be reopened by ttymsg(). */ + close(f->f_file); + f->f_file = -1; } else { (void)strlcpy(f->fu_fname, p, sizeof(f->fu_fname)); f->f_type = F_FILE; From nobody Thu Sep 28 15:52:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ0G4DC6z4tyWw; Thu, 28 Sep 2023 15:52: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 4RxJ0G3QrJz4Lgf; Thu, 28 Sep 2023 15:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usrmWjhLd+PqRUrijKB9Uot7by5eIeWEBULkdEv/Kkk=; b=AkSCAKmez5hOp2pPmvbl/TycdrzoQ+irPjwPwpL9i1jinybcbpMem5xDYF462tkkIpU2aA HiHHoXBmWpyDo35yadnWSKCiancf7V9JVWHZjMjNfZpFTjJPfb0y0GjfUyA8lf3mdN8rH2 7Pj8K0/TTq7VTq9Uhykt/+UaUCkfSuAkltNO1VgUcdMuRwZfOq2o6JgIIxDunPKDiyykIa 8M4y9+dB6YYCJxJT8L65rHscoXcp/lfuHBjCP69t2aHXovVC9JLExX9x+4txrdEduPoOhH fg63npV0CWzehy7yuIXdE9oX7N4X/W3m7MVPIO/wFFcnyo7UJ8IeKy8a3oKCCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916366; a=rsa-sha256; cv=none; b=ri3pgBCksWd5Otjki/VFbNMyRuM/T0LgBc98PytSKKhcP4tUl7hrWonQMKY9d9898nR8rB MqXH3C7XSaTEGr00hew9LHxoptpqrlc8Fo07NhcnniePFlZK2dX4vnaUx4f2LH02V8AZ7j LFDyusKOiL4GSLHDHhkU0tl72NHG7iu3WC2E69pEylyZEEb6rsyWeQmtYFSVCzR8VoQTo5 dhkg4WGUBPaa7vyDe96HE3MtAkoGbMLPpDj2AamTfYnVIl1ir6e2x5ethNdZSmVyYPbA/n 78OVm2043utAYzk3U/2cBnby22Oi+XZc1WM5AYzaXNg/LREiiwd1yxWGooBm9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usrmWjhLd+PqRUrijKB9Uot7by5eIeWEBULkdEv/Kkk=; b=iKTEWTyB53ERCi7skSOBUi1Sr5q21DS1d88h/8LgXUYLfnSqSCgdmF3m1ty6X4YE96AdZg 1rWeLs2tmbTSmx179pEjkJwgEdeUaaS3scU1L5PafnpbwgdGttqfG6Zw2kwFUlMLeyPXOy NIbIsktJIfSqDHO5rXcJuj74ZmjvRJNEKV5qWBN3v7Na3gI6IBH4jjQOynqpkkznKvBCNv bcZxe7gQTNaYs68c4OdJT/pW2UuV4gZrPpKAG6aENlmnFMLg3OT0UfjJCuBoILL5Fy/b7N 8xkBGM7zf0L5VRbAgsd9Tc1himVq9X6YcuI2zzo0NUOdYo8AjdCZajqVQSJ6gA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0G2BqczCy1; Thu, 28 Sep 2023 15:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqk5m022490; Thu, 28 Sep 2023 15:52:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqkQe022487; Thu, 28 Sep 2023 15:52:46 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:46 GMT Message-Id: <202309281552.38SFqkQe022487@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: 7428ebfe7e25 - main - syslogd: Pre-open null file descriptor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 7428ebfe7e25d56e2a5853d36d2c34c54a2f4db3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7428ebfe7e25d56e2a5853d36d2c34c54a2f4db3 commit 7428ebfe7e25d56e2a5853d36d2c34c54a2f4db3 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:17 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Pre-open null file descriptor Open _PATH_DEVNULL before entering capability mode. Access to /dev/null is needed for dup2() when piping commands. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41381 --- usr.sbin/syslogd/syslogd.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 9f4c21cab026..2ff39d8c3676 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -398,6 +398,7 @@ static const int sigcatch[] = { SIGCHLD, }; +static int nulldesc; /* /dev/null descriptor */ static bool Debug; /* debug flag */ static bool Foreground = false; /* Run in foreground, instead of daemonizing */ static bool resolve = true; /* resolve hostname */ @@ -803,6 +804,14 @@ main(int argc, char *argv[]) consfile.f_file = -1; (void)strlcpy(consfile.fu_fname, _PATH_CONSOLE + sizeof(_PATH_DEV) - 1, sizeof(consfile.fu_fname)); + + nulldesc = open(_PATH_DEVNULL, O_RDWR); + if (nulldesc == -1) { + warn("cannot open %s", _PATH_DEVNULL); + pidfile_remove(pfh); + exit(1); + } + (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); if ((!Foreground) && (!Debug)) { @@ -3235,7 +3244,6 @@ markit(void) static int waitdaemon(int maxwait) { - int fd; int status; pid_t pid, childpid; @@ -3266,13 +3274,9 @@ waitdaemon(int maxwait) return (-1); (void)chdir("/"); - if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { - (void)dup2(fd, STDIN_FILENO); - (void)dup2(fd, STDOUT_FILENO); - (void)dup2(fd, STDERR_FILENO); - if (fd > STDERR_FILENO) - (void)close(fd); - } + (void)dup2(nulldesc, STDIN_FILENO); + (void)dup2(nulldesc, STDOUT_FILENO); + (void)dup2(nulldesc, STDERR_FILENO); return (getppid()); } @@ -3595,20 +3599,16 @@ static int p_open(const char *prog, int *rpd) { sigset_t sigset = { }; - int nulldesc, pfd[2], pd; + int pfd[2], pd; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ char errmsg[200]; if (pipe(pfd) == -1) return (-1); - if ((nulldesc = open(_PATH_DEVNULL, O_RDWR)) == -1) - /* we are royally screwed anyway */ - return (-1); switch ((pid = pdfork(&pd, PD_CLOEXEC))) { case -1: - close(nulldesc); return (-1); case 0: @@ -3639,7 +3639,6 @@ p_open(const char *prog, int *rpd) (void)execvp(_PATH_BSHELL, argv); _exit(255); } - close(nulldesc); close(pfd[0]); /* * Avoid blocking on a hung pipe. With O_NONBLOCK, we are From nobody Thu Sep 28 15:52:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ0H4xJ5z4tyF9; Thu, 28 Sep 2023 15:52: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 4RxJ0H3xRdz4LPf; Thu, 28 Sep 2023 15:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EQWmUsoss9uS1ZxShm7ADGNm8hNDLoAUz+WGoGQM3WM=; b=Vch+GwE9IiALTCkz+6OJH31cNuw97Q8KmSwTmjY26jhwgAkP9e7EkHANJAPDpk6oV/GRgX 2rBm73O81RDz4zg/I/fmlKRhlKICSAvnMcy1jpwHwakurvPKTXC+F5knxwoHImWWyVN878 sL1ylzFW+sOVCj8TUjVCPu+tkf29i8Fvxbb0ptE2LSofRoDJ/lwC2z00btCi8YMRmrkuCA Mjk6RcD8TStaPLqt4sLJiuk67DzSvqTx4fIDnHquXYbAFHmtvwJpbf9yDX69bb8+0+x2dQ DWK9pExC6wMG/bxFwoCaaknZG7h0uRW79Zptkp6X0Lkyg/d581LEwvep9k0Q/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916367; a=rsa-sha256; cv=none; b=uMXmuj30AZB1LCtyO+e/xcIz5uNZWKMIonY1Tp29jsNFwAGwwtd5dYhJJeJlhPAwFL6c1o BZupRV3EsfQpkXCLjgnt/1rlRpQRhJAp+slpJFlXtWMA1iEmC68MK5I5rszJyEblTGsY5F xqphOldO4gp6MCNUfMgnJfXsO8vD1tyPUWE/xXKEQOsDQ/V/JLPbLAdTStAoJtbo1uz6k3 24PMIps7YegNz39pCC/4WfJgOdYwlISO/fasOeEC2aeRXyBmEkBj5orPrD0tA/T3zgUO4s KFK0Q4MwAWd8PuP6XD//OvRyCJ/lFQaIB+Hp9yvoJc6vWQyN0a+1VvCvm5Gfig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EQWmUsoss9uS1ZxShm7ADGNm8hNDLoAUz+WGoGQM3WM=; b=rOSP3toenT0ZTC9mP3G2Pts6uASEfegAm/kV1Hj5xFWEt4qpYOEY42yvjyDLUS0kIaCjw0 A7imfZgYSCBYlwcer/FOfzkTrDcXHvTeiNO49VYmff40NaI8npDCgn4+TyyKdGrDwYYETv rluhnag+rVpj5eL2H/GDoH7Y7utzslxIFsQVSc1setCH81opD4is+CyV7TaP92S+/rkrun +RdmojEezTZB8Xm0VVornX9wYHoQPoOTiXvnVlPQ2sSi4eiSnxai7HbA0bPg4RNfgZiR9D uqHvquK5BJhsoG9YpcoSI1I0m8yCjDAWcjBz3CIv9nCdsvcKdgi4k9FZ5EcGSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0H32F3zDLC; Thu, 28 Sep 2023 15:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqlQR022537; Thu, 28 Sep 2023 15:52:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqlOW022534; Thu, 28 Sep 2023 15:52:47 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:47 GMT Message-Id: <202309281552.38SFqlOW022534@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: 4ac6582472a2 - main - syslogd: Ignore signals in sigcatch[] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4ac6582472a2f4be06217cfbfd7a9d049f2cd6d6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4ac6582472a2f4be06217cfbfd7a9d049f2cd6d6 commit 4ac6582472a2f4be06217cfbfd7a9d049f2cd6d6 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:22 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Ignore signals in sigcatch[] Instead of blocking signals in sigcatch[], just ignore them. This frees up some space on the proc's sigqueue. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41433 --- usr.sbin/syslogd/syslogd.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 2ff39d8c3676..3f9633ca8c35 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -597,7 +597,6 @@ int main(int argc, char *argv[]) { struct sigaction act = { }; - sigset_t sigset = { }; struct kevent ev; struct socklist *sl; pid_t ppid = -1, spid; @@ -838,6 +837,14 @@ main(int argc, char *argv[]) exit(1); } } + + /* + * Syslogd will not reap its children via wait(). + * When SIGCHLD is ignored, zombie processes are + * not created. A child's PID will be recycled + * upon its exit. + */ + act.sa_handler = SIG_IGN; for (size_t i = 0; i < nitems(sigcatch); ++i) { EV_SET(&ev, sigcatch[i], EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { @@ -845,23 +852,14 @@ main(int argc, char *argv[]) pidfile_remove(pfh); exit(1); } - (void)sigaddset(&sigset, sigcatch[i]); - } - if (sigprocmask(SIG_BLOCK, &sigset, NULL) != 0) { - warn("failed to apply signal mask"); - pidfile_remove(pfh); - exit(1); + if (sigaction(sigcatch[i], &act, NULL) == -1) { + warn("failed to apply signal handler"); + pidfile_remove(pfh); + exit(1); + } } (void)alarm(TIMERINTVL); - /* Do not create zombie processes. */ - act.sa_flags = SA_NOCLDWAIT; - if (sigaction(SIGCHLD, &act, NULL) == -1) { - warn("failed to apply signal handler"); - pidfile_remove(pfh); - exit(1); - } - /* tuck my process id away */ pidfile_write(pfh); @@ -3598,7 +3596,7 @@ validate(struct sockaddr *sa, const char *hname) static int p_open(const char *prog, int *rpd) { - sigset_t sigset = { }; + struct sigaction act = { }; int pfd[2], pd; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ @@ -3623,12 +3621,12 @@ p_open(const char *prog, int *rpd) } alarm(0); - - for (size_t i = 0; i < nitems(sigcatch); ++i) - (void)sigaddset(&sigset, sigcatch[i]); - if (sigprocmask(SIG_UNBLOCK, &sigset, NULL) != 0) { - logerror("sigprocmask"); - exit(1); + act.sa_handler = SIG_DFL; + for (size_t i = 0; i < nitems(sigcatch); ++i) { + if (sigaction(sigcatch[i], &act, NULL) == -1) { + logerror("sigaction"); + exit(1); + } } dup2(pfd[0], STDIN_FILENO); From nobody Thu Sep 28 15:52:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ0J5kTrz4txtw; Thu, 28 Sep 2023 15:52: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 4RxJ0J59RKz4LjY; Thu, 28 Sep 2023 15:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XmEKu5FiD9EuoBaZd4HYdgU9ckMvE3Gab6rewi4+q4=; b=Ko1Br65Lyilse3m/ItIXos3q/Wni9wXijxg2Ar0HCwdfIZE3iPtlg4YdbkvbV9ep90bbYC eIqGfvG+uXixz5ajQIHWejBLp5Ywz+Lvlrqgx6DqlHulSAXnDUBgFq6LpJY9ql5Srn9VQ9 uB8vgSZ6KQVnIsX1hEBURtlMCCHBj0xEVintOjbcEz24t1Gr2mqFuHfOmtu56V5pJFLwaH KrbhPaTWVxy8ihdb0xgN+95QCfK1TBXsC4U785NypBsacjQTuyw7ZX+NjipjPmnJYSDaJy VUvz6llB8SzNslzDA2RBXpYXpN2eaQxO+AsirW1h+uDHtVTgw+jalDXahdeJcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916368; a=rsa-sha256; cv=none; b=qmi1Qjr18kvmHYUbNi78QgYXxber+3bvMF2XqtFqVFhxRXfWeBRSm81Dob9KPk+AbMVZ9I 9uG7eY18yd/X2jGDefsYNY9IQKegNkJfGb5W4PmXJK2V7WEAZvce2S6yHJxRD+6Gcd07MA L+IXofDKgJm0h3mvRDFQ96h5V8BjG/Nfl48+D3xOBbTwrB0wFDvp2R3VJlTwyE556HT/Ho 0arPNFbOrH4dpwEDIYLREIfd3XRdP/nYq+rm17PuuN86D+ILk9dEW9aEPUIJt6OE8rcdp5 YDoaVcZo3eWWYuKCPXkaO37ci7iGTcT9RoQXxPZWoMlCYBZ6EqnfolRvd9Az5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XmEKu5FiD9EuoBaZd4HYdgU9ckMvE3Gab6rewi4+q4=; b=tItNp2fijsjenwYiCMdtLVrz/E6K0qZdvD9gU+BvGtlmcjhBD8xebOwfGO5Tjm2SFqN6+u Fv0A0PGNurv8PDWylGPK4HOlag9BU4cXs7GM3Vcz4SGoYW8acM+4bHTk5mMmjVVkzM4+ry HCz07EXBL1eK6aj7B39+/UzPa6OuUM76V5cC7yvi8M7QBo+2Qn8lYWYKRlYDGJY/xMEYrk b2w1KprT5T6xmLWQLWJvXTkq2CNf9y+P91Gj9LhMAsyNINUxhPaugYj/pbuAtyHDWemsO1 6hZUyS+tAkCz8HO4jeV/zTRkjla9yx/ti+YZcBCQEC6qAv6CFYaW2k2nSDnaPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0J3rQ6zCqV; Thu, 28 Sep 2023 15:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqmVm022589; Thu, 28 Sep 2023 15:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqm8b022587; Thu, 28 Sep 2023 15:52:48 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:48 GMT Message-Id: <202309281552.38SFqm8b022587@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: 8536447a07fa - main - syslogd: Use pipe to communicate with daemon List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8536447a07fa29073f93af70808db58c760aa6f9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8536447a07fa29073f93af70808db58c760aa6f9 commit 8536447a07fa29073f93af70808db58c760aa6f9 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:28 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Use pipe to communicate with daemon Previously, syslogd's daemon process would signal that it had finished initialization using SIGALRM. In capability mode, signal delivery is not allowed, so use a pipe to indicate that it is ready to accept messages. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41459 --- usr.sbin/syslogd/syslogd.c | 100 ++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 56 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 3f9633ca8c35..8d2f3c3edf14 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -135,6 +135,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -471,7 +472,6 @@ static bool validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); static void wallmsg(struct filed *, struct iovec *, const int iovlen); static int waitdaemon(int); -static void timedout(int); static void increase_rcvbuf(int); static void @@ -599,8 +599,8 @@ main(int argc, char *argv[]) struct sigaction act = { }; struct kevent ev; struct socklist *sl; - pid_t ppid = -1, spid; - int ch, kq, s; + pid_t spid; + int ch, kq, ppipe_w = -1, s; char *p; bool bflag = false, pflag = false, Sflag = false; @@ -813,14 +813,9 @@ main(int argc, char *argv[]) (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); - if ((!Foreground) && (!Debug)) { - ppid = waitdaemon(30); - if (ppid < 0) { - warn("could not become daemon"); - pidfile_remove(pfh); - exit(1); - } - } else if (Debug) + if (!Foreground && !Debug) + ppipe_w = waitdaemon(30); + else if (Debug) setlinebuf(stdout); kq = kqueue(); @@ -868,9 +863,14 @@ main(int argc, char *argv[]) for (;;) { if (needdofsync) { dofsync(); - if (ppid != -1) { - kill(ppid, SIGALRM); - ppid = -1; + if (ppipe_w != -1) { + /* + * Close our end of the pipe so our + * parent knows that we have finished + * initialization. + */ + (void)close(ppipe_w); + ppipe_w = -1; } } if (kevent(kq, NULL, 0, &ev, 1, NULL) == -1) { @@ -3237,64 +3237,52 @@ markit(void) /* * fork off and become a daemon, but wait for the child to come online * before returning to the parent, or we get disk thrashing at boot etc. - * Set a timer so we don't hang forever if it wedges. */ static int waitdaemon(int maxwait) { - int status; - pid_t pid, childpid; + struct pollfd pollfd; + int events, pipefd[2], status; + pid_t pid; - switch (childpid = fork()) { - case -1: - return (-1); - case 0: - break; - default: - signal(SIGALRM, timedout); - alarm(maxwait); - while ((pid = wait3(&status, 0, NULL)) != -1) { + if (pipe(pipefd) == -1) { + warn("failed to daemonize, pipe"); + die(0); + } + pid = fork(); + if (pid == -1) { + warn("failed to daemonize, fork"); + die(0); + } else if (pid > 0) { + close(pipefd[1]); + pollfd.fd = pipefd[0]; + pollfd.events = POLLHUP; + events = poll(&pollfd, 1, maxwait * 1000); + if (events == -1) + err(1, "failed to daemonize, poll"); + else if (events == 0) + errx(1, "timed out waiting for child"); + if (waitpid(pid, &status, WNOHANG) > 0) { if (WIFEXITED(status)) errx(1, "child pid %d exited with return code %d", - pid, WEXITSTATUS(status)); + pid, WEXITSTATUS(status)); if (WIFSIGNALED(status)) errx(1, "child pid %d exited on signal %d%s", - pid, WTERMSIG(status), - WCOREDUMP(status) ? " (core dumped)" : - ""); - if (pid == childpid) /* it's gone... */ - break; + pid, WTERMSIG(status), + WCOREDUMP(status) ? " (core dumped)" : ""); } exit(0); } - - if (setsid() == -1) - return (-1); - + close(pipefd[0]); + if (setsid() == -1) { + warn("failed to daemonize, setsid"); + die(0); + } (void)chdir("/"); (void)dup2(nulldesc, STDIN_FILENO); (void)dup2(nulldesc, STDOUT_FILENO); (void)dup2(nulldesc, STDERR_FILENO); - return (getppid()); -} - -/* - * We get a SIGALRM from the child when it's running and finished doing it's - * fsync()'s or O_SYNC writes for all the boot messages. - * - * We also get a signal from the kernel if the timer expires, so check to - * see what happened. - */ -static void -timedout(int sig __unused) -{ - int left; - left = alarm(0); - signal(SIGALRM, SIG_DFL); - if (left == 0) - errx(1, "timed out waiting for child"); - else - _exit(0); + return (pipefd[1]); } /* From nobody Thu Sep 28 15:52:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJ0L19nFz4tyX8; Thu, 28 Sep 2023 15:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0K5lMYz4Lhj; Thu, 28 Sep 2023 15:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mO3eviVT0VufjxjbqS0cJHiF54RsqtTWcaV0dQaHhp4=; b=ive3wi52OKTVKTb3oG8rgVmZVyuXWE0ypmdGJXAwyin8cQJ2Wczsz6bcX3Gdz66h10uQI3 lsnXK8DUk/RFJLpmQsaTorDCs5kNC9TUd/1mpRXT7rxOWxSJjPjrSu5eW3GkTL37uwBIHs cjOPyKzQSCMvVrxPaOiH1nykfURYOIJGPyeK9bC062X3hMt1uM0ubGrUSxCzVA7ldmICwO bo7+St7EwT3LXbaBu9hmwYVd7RfQvnyviuRMeW11VPCXe7+bbUxdApZEtT7MdrOogxWhZ9 seQCDiC1qg86U/PupGcOxKzWeC5txJrWp8irutCoUY+IwtGTYR8EhNatADuEjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916369; a=rsa-sha256; cv=none; b=fDYbe2l1ethcKb6Ylcczr1wGwiHC0FMhhiqFEvBNtsE3LHFUCcImX9NNGdoghBoXtcIP6T nVExHtq6/WCBiQElLiHBagO5MYkFya02bBhFvhSjEKuX3kx6GvyuJb/bn+5/psRFaNkErZ cYq7woGE4IqSj5Wj4NlSC0lLkKW0DWPYqra6j6iVGjvo25fqY2rtvVIisiosC/JRLFFL1r SUyKN6l+nE/wEh4c5TzNNUc/6KOJaawe5zerp04hFMfjPf8DS/oKoa71KCaOfWTfGc0lPJ 3C6QI9hBOfvG9JKoyinl2iFML0pIeJjZallDZth4C6CJ/fUpBHOHjcgHvNg5Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mO3eviVT0VufjxjbqS0cJHiF54RsqtTWcaV0dQaHhp4=; b=fi64AHGN+hgRgTATtjoHz8lM1vqpElQuxonRmIQE2xCdYj6f/r7/7xbJmbRlccl0DA7iYp tL+S0eAy79n0ghneW3H1ctoOYEPznZGNfBQO7VZ5LhANSU5fcKB2SdhXmGMCu0Xwk4rY52 a4RhFNbLQgvgogQ2Rd6wL56eWi/zO/Y01KscX3R66NOSnLljfWYALLQKd/1FJjUI/1mbxe +68WsSIRPdWNudjRrnK0TGHV/LWi3gs9ZJjxniefJ4aUB7Rxr9xbObUgz37UF36yWMDFHI H8PiaIkjm5JbzbfNy2eJ2v7Yrst6O+tfU/8/7e4P5xc74s7cN30Od9O7Nc8sHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0K4rqkzDLD; Thu, 28 Sep 2023 15:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqnjV022643; Thu, 28 Sep 2023 15:52:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqn9a022640; Thu, 28 Sep 2023 15:52:49 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:49 GMT Message-Id: <202309281552.38SFqn9a022640@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: 94cae4cb339a - main - syslogd: Do not add shutdown sockets to the kqueue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 94cae4cb339a839b9f9a1b35226de06271017b25 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=94cae4cb339a839b9f9a1b35226de06271017b25 commit 94cae4cb339a839b9f9a1b35226de06271017b25 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:33 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Do not add shutdown sockets to the kqueue If syslogd is in secure mode, all INET sockets are shutdown. Do not add these to the kqueue because we can't read from them. Also, remove the listen() call when setting up sockets. Syslogd exclusively uses SOCK_DGRAM sockets, so calling listen() is useless. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41526 --- usr.sbin/syslogd/syslogd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 8d2f3c3edf14..7db5bab11008 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -825,6 +825,8 @@ main(int argc, char *argv[]) exit(1); } STAILQ_FOREACH(sl, &shead, next) { + if (sl->sl_recv == NULL) + continue; EV_SET(&ev, sl->sl_socket, EVFILT_READ, EV_ADD, 0, 0, sl); if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { warn("failed to add kevent to kqueue"); @@ -3741,9 +3743,6 @@ socksetup(struct addrinfo *ai, const char *name, mode_t mode) return (NULL); } dprintf("new socket fd is %d\n", s); - if (ai->ai_socktype != SOCK_DGRAM) { - listen(s, 5); - } sl_recv = socklist_recv_sock; #if defined(INET) || defined(INET6) if (SecureMode && (ai->ai_family == AF_INET || From nobody Thu Sep 28 16:10:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxJNy0FPcz4v0W1; Thu, 28 Sep 2023 16:10:42 +0000 (UTC) (envelope-from bapt@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 4RxJNx6y0Hz4VLM; Thu, 28 Sep 2023 16:10:41 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695917442; 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=J7X5Lp5RGK8Ywx4lyeUchZghp7CviSSRjo10kbv9/+A=; b=Qi61RcRjlDCaihfFOgSDSaEOhqf6zW/3Dg3lkSUvB11JjBKtE/qRQTG4GMZT1cxkeqj9im 0S96T4iz3WTqw2K4/kyWzphkZlH/rFVWt2RZbsBSSsjjIXXr347stiaOitNTCmAnixrKCR IyKg7KniHmgE+eUgp735rgUoczKk0G6Id/0hz4cjjLOMD9F7R11bajfoIGu/xciVHtusy1 7Oi7qU0gz6iwTWFyaOmiTq6/8IFH6PL02YojwvtPRRr8mJVZbSRNwZoBJ0v1BkCn+9SAys w06YcCUx1POJTu8UQvE/OIhLIUnyCMBvXA2txwM/fvljjwGvZxCnkRFi9RdHWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695917442; a=rsa-sha256; cv=none; b=N1apoNQIadyIdNh8v7O1/dMiiruNUpwhCOOjRd3/x1bTP/LHRU386bdj5Cnl/Ex8wOsfBh VNXQSXx66W1opyRxiwfHwGebda3ST9NDgChA+ZamXHXQ92kVfYGn8JObg4EMrwmJoqEy/d UORk0dvMpKukonm8b9relXO5PoO4wfgirOh6m9KJ4HXKewPOiEpP2Na569Gew8JOaHupd0 d2ctPLY2yJdviLmab3b45j46lj5C7lvfbMT2yCYWK6kbguFdVC4JqIOQnH2jFfOt2ziadJ 8brkO8mKSCYO6LwkUVEJaGDAyMwQeCV6VCYUKvo7+3U3kw6bYrlFrzR0g4KVww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695917442; 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=J7X5Lp5RGK8Ywx4lyeUchZghp7CviSSRjo10kbv9/+A=; b=TnNwrmR33fWWqVhB8d9yBQI/Lnn8Q+PMj/QwwQwGcwb6yhzWq5u7r55Z7rLyHo7P2LG33o RRID/xL2K3AUiDrVnqBSg/68cSHzDJqIJQCiR7j+yyQqPh8LHdvqTfk91Ku5vZ9ODzcoLe LqMWPDxqqafoC8qiGrVSNU2Wd49eBKoSHLeiKbs9mXic1h+peYnGKZ0i46xrCk8WFK8QH5 JKpsxOL77WwCC6cyQns0vJQ/giLfKsABzACcUygF3HhnGWlON+tkG7Q568UZl7llPNQRqp IWnAIfjUAQqZC0ynKMrBmj5YeFJg2Q+dvunodsuVviAQQ5ChmtfAoUpYdTdI3w== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RxJNx5MQrzB3w; Thu, 28 Sep 2023 16:10:41 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id D6CB11711E; Thu, 28 Sep 2023 18:10:38 +0200 (CEST) Date: Thu, 28 Sep 2023 18:10:38 +0200 From: Baptiste Daroussin To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: <6enez4khdaqrwbkm4zointeoyt6p4tyf5vd3gwkattahmsehst@nbpu4vwnqkas> References: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Sep 28, 2023 at 11:41:23AM -0400, Mark Johnston wrote: > On Thu, Sep 28, 2023 at 05:27:52PM +0200, Baptiste Daroussin wrote: > > On Thu, Sep 28, 2023 at 10:58:20AM -0400, Mark Johnston wrote: > > > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > > > > The branch main has been updated by bapt: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > > > > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > Author: Baptiste Daroussin > > > > AuthorDate: 2023-09-13 07:43:33 +0000 > > > > Commit: Baptiste Daroussin > > > > CommitDate: 2023-09-27 14:00:00 +0000 > > > > > > > > flua: add fbsd module > > > > > > > > This module is bundled into flua, it only provides for now the exec > > > > function. The point of the function is to be able to execute a program > > > > without actually executing a shell. > > > > > > > > to use it: > > > > fbsd.exec({"id", "bapt"}) > > > > > > Hi Baptiste, > > > > > > How is this different from posix.unistd.exec in the luaposix module? > > > Wouldn't it be better to add this to the existing posix.unistd namespace > > > in lposix.c? exec does not seem FreeBSD-specific. > > > > This is more like os.execure without the invocation of /bin/sh! > > Right, different from os.execute, but almost identical to > posix.unistd.exec: https://luaposix.github.io/luaposix/modules/posix.unistd.html#exec not indentical this fbsd.exec will fork/exec while posix.unistd.exec, will just exec. yes if add to lposix.c fork() and exec() then we can replace fbsd.exec by a pure lua version calling unistd.fork() and unistd.exec() is that is what you meant by almost identical. > > We have a subset of luaposix already, in libexec/flua/modules/lposix.c. > So my question is, how about we extend that to provide "exec"? "exec" > is not FreeBSD-specific at all. I am happy to write the patch. I am fine if we extend lposix with fork and exec and remove my fbsd.exec. I am happy to work on it as well. > > > > I have a related question: this week I wrote some FreeBSD-specific lua > > > modules wrapping some system calls like sysctl(2) and cap_enter(2). How > > > do we want to organize the flua namespace for such things? Should we > > > have a freebsd.sys namespace for system call wrappers? I would then put > > > bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we > > > could have freebsd.lib.procstat, for example. > > > > > > I am fine with a module named freebsd.lib.* I plan to add kenv, rcctl, > > procctl so, (I scratched sysctl and cap_enter has you have them ;) ) > > So my proposal is, raw system call wrappers should live under > freebsd.sys.*; some higher-level interfaces can be built on top, > hopefully written in lua as much as possible. I do like this proposal and it is better with that my ugly fbsd.* :) > > Also, if we start adding more FreeBSD modules, I suspect it will be > useful to maintain these modules of the tree. I have some plain lua > (not flua) programs for which I wrote FreeBSD modules, and they could be > useful to others. It'd also be useful to target multiple lua versions, > at least 5.1 as well so that luajit can be used. But that's a topic for > later. Best regards, Bapt From nobody Thu Sep 28 16:37:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxK0R1H7pz4v2Qv; Thu, 28 Sep 2023 16:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxK0R0qB8z4YFZ; Thu, 28 Sep 2023 16:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVVgHa7dK8CI3Ne5u3tCqO4MgfBzcTP5PVBgnO7yOZ0=; b=NE/5eq5I5dY1FKEb710ttKfsI2cT/x18CRoiMopIiiZVl8TIBLXNUoQKHFQopu7+zgW3Ol vtJprB25YpbSoOaCYMPU5mk2CCLpxekNy0nsM7whjp0wu293KNSAo+ljup5HWYrlS/bhgP p+5r3/1e+j1LoCt/+ZTy5O4G6yoitEVKdkvacpnchEemm2dInst32W+bSu9PiTztT8cIq6 RMesjxTop02ghs8QgwaKSDST4z1WGCyi7L3GfT5VCtIn7rsYJzd0BRBuynjU5bdfwgVQC9 W5wO2jl9ABTLPQwNsOn0aVL86we63W05p69Hbp+Afomzo/6RH9lzsGRvfx7G7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695919079; a=rsa-sha256; cv=none; b=eJkCK+jhzSqUBshvWiRcM+c/TvsK5tsGMIPsepEH7isF4z0FxYjxhpSulQcpTKHti5le/Z NuLguWHIG+2gykplg24O5ty1cfUASb+90sIeMRLltsJegdXP1d6/YbI5V224Z0kMiTEI0Z BtsPKcpLskMlGCaykqCbxl1/uuO7NJo+K0N+BmMwLi7J+auVg9jHnD1CJ1FcPvyc8Zo78s upHm22ZDXSKd/5eXrq3EVqyDLNJt4WwhSDAI1ennZ+i8QgooYY+3XF2j/0k8qQGWYq+2Fo NwMgWxfRpXTXE7dNhp5VQID6yI+y9h4ldHC8fulCay0ie1qRwO1cIsMCg/y55Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVVgHa7dK8CI3Ne5u3tCqO4MgfBzcTP5PVBgnO7yOZ0=; b=VDAV4fXx7cXMdYCSVMU06AMJ/OA53ubgV8gzA124ZD3bCCM9K3lvDmDIw4cdRQHtxA+3rF 4JH5nvRHn8ppA+/EiEiNJlt4SitGPDec2sRtvp6G41y4c8tfZigHAyaz58kYjkPq6hi81U HV/5d7ews8U2GiQbBT6q7+/V/tiu0A1F34Vre0b1wUVoqs49S+bnAhE4MJWkcGUgBvSa0X n5cUydWz2kqLrg5iMCPTz+VBe79EYmToZcdAJNBmln9sCLrmhMvtEtnUY/m0n5U2B9sEf2 1DT7iFn6CROn31NV1DVBLel/6nV9mcKcDjbgnxR8AO4aUpFFqXxnyZEpCkuiUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxK0Q6zvLzVWs; Thu, 28 Sep 2023 16:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SGbwKw089961; Thu, 28 Sep 2023 16:37:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SGbwUi089958; Thu, 28 Sep 2023 16:37:58 GMT (envelope-from git) Date: Thu, 28 Sep 2023 16:37:58 GMT Message-Id: <202309281637.38SGbwUi089958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d7399551b028 - main - split: Further option parsing improvements. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d7399551b02861b910b15c7b7a78a2835644aa45 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d7399551b02861b910b15c7b7a78a2835644aa45 commit d7399551b02861b910b15c7b7a78a2835644aa45 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-28 16:29:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-28 16:30:15 +0000 split: Further option parsing improvements. * Whenever possible, use strtonum() to parse numeric arguments. * Improve usefulness and consistency of error messages. * While here, fix some type and style issues. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42010 --- usr.bin/split/split.c | 84 ++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index af1ed69c9482..ba98d82b25c4 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -63,7 +63,7 @@ static const char sccsid[] = "@(#)split.c 8.2 (Berkeley) 4/16/94"; #define DEFLINE 1000 /* Default num lines per file. */ static off_t bytecnt; /* Byte count to split on. */ -static off_t chunks = 0; /* Chunks count to split into. */ +static long chunks; /* Chunks count to split into. */ static bool clobber = true; /* Whether to overwrite existing output files. */ static long numlines; /* Line count to split on. */ static int file_open; /* If a file open. */ @@ -73,7 +73,7 @@ static regex_t rgx; static int pflag; static bool dflag; static long sufflen = 2; /* File name suffix length. */ -static int autosfx = 1; /* Whether to auto-extend the suffix length. */ +static bool autosfx = true; /* Whether to auto-extend the suffix length. */ static void newfile(void); static void split1(void); @@ -84,8 +84,8 @@ static void usage(void) __dead2; int main(int argc, char **argv) { - const char *p; - char *ep; + char errbuf[64]; + const char *p, *errstr; int ch, error; setlocale(LC_ALL, ""); @@ -106,20 +106,22 @@ main(int argc, char **argv) while (numlines >= 0 && *p >= '0' && *p <= '9') numlines = numlines * 10 + *p++ - '0'; if (numlines <= 0 || *p != '\0') - errx(EX_USAGE, "%c%s: illegal line count", ch, - optarg ? optarg : ""); + errx(EX_USAGE, "%c%s: line count is invalid", + ch, optarg ? optarg : ""); break; case 'a': /* Suffix length */ - if ((sufflen = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal suffix length", optarg); - autosfx = 0; + sufflen = strtonum(optarg, 0, INT_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: suffix length is %s", + optarg, errstr); + } + autosfx = false; break; case 'b': /* Byte count. */ - errno = 0; - error = expand_number(optarg, &bytecnt); - if (error == -1) - errx(EX_USAGE, "%s: offset too large", optarg); + if (expand_number(optarg, &bytecnt) != 0) { + errx(EX_USAGE, "%s: byte count is invalid", + optarg); + } break; case 'c': /* Continue, don't overwrite output files. */ clobber = false; @@ -130,22 +132,27 @@ main(int argc, char **argv) case 'l': /* Line count. */ if (numlines != 0) usage(); - if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal line count", optarg); + numlines = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: line count is %s", + optarg, errstr); + } break; case 'n': /* Chunks. */ - if (!isdigit((unsigned char)optarg[0]) || - (chunks = (size_t)strtoul(optarg, &ep, 10)) == 0 || - *ep != '\0') { - errx(EX_USAGE, "%s: illegal number of chunks", - optarg); + chunks = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: number of chunks is %s", + optarg, errstr); } break; case 'p': /* pattern matching. */ - if (regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB) != 0) - errx(EX_USAGE, "%s: illegal regexp", optarg); + error = regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB); + if (error != 0) { + regerror(error, &rgx, errbuf, sizeof(errbuf)); + errx(EX_USAGE, "%s: regex is invalid: %s", + optarg, errbuf); + } pflag = 1; break; default: @@ -163,9 +170,10 @@ main(int argc, char **argv) --argc; } if (argc > 0) { /* File name prefix. */ - if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) - errx(EX_USAGE, "file name prefix is too long: %s", + if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) { + errx(EX_USAGE, "%s: file name prefix is too long", *argv); + } ++argv; --argc; } @@ -182,16 +190,16 @@ main(int argc, char **argv) else if (bytecnt != 0 || chunks != 0) usage(); - if (bytecnt && chunks) + if (bytecnt != 0 && chunks != 0) usage(); if (ifd == -1) /* Stdin by default. */ ifd = 0; - if (bytecnt) { + if (bytecnt != 0) { split1(); exit (0); - } else if (chunks) { + } else if (chunks != 0) { split3(); exit (0); } @@ -225,7 +233,7 @@ split1(void) /* NOTREACHED */ default: if (!file_open) { - if (!chunks || (nfiles < chunks)) { + if (chunks == 0 || nfiles < chunks) { newfile(); nfiles++; } @@ -236,24 +244,24 @@ split1(void) err(EX_IOERR, "write"); len -= dist; for (C = bfr + dist; len >= bytecnt; - len -= bytecnt, C += bytecnt) { - if (!chunks || (nfiles < chunks)) { - newfile(); + len -= bytecnt, C += bytecnt) { + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } - if (write(ofd, - C, bytecnt) != bytecnt) + if (write(ofd, C, bytecnt) != bytecnt) err(EX_IOERR, "write"); } if (len != 0) { - if (!chunks || (nfiles < chunks)) { - newfile(); + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } if (write(ofd, C, len) != len) err(EX_IOERR, "write"); - } else + } else { file_open = 0; + } bcnt = len; } else { bcnt += len; From nobody Thu Sep 28 16:38:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxK0S45Nzz4v21j; Thu, 28 Sep 2023 16:38: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 4RxK0S3Sqzz4YJL; Thu, 28 Sep 2023 16:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wv66meaZj1K618mz053ZWH1Ku2cfCdLlUUj5cPXOjFw=; b=FrRYMDMNQh2tY1mk+WQGWqg5OACvayBcwIIz59KquC0r1wPYjDioHI5Zt23LGs1cWSTT4M zry534j/hGq0jctKW9BXYY9o9MQ7iU31CNc/q1Re8jBZkfzlJQ0VlmUBm7ra1afYFzh8q0 OwHwRR56U3HkajJT4yvLe/Phqx0iZj9SlHMw1O5G0bjIMr5Tp6xe40oWS1/SPoPQXtMIEZ dZFRtVtusjFovWJFM8aIneo7YmAj5XDg7cip94byh/16XROyAW4e7czZnrXIsb9+X8mIUu Q/gku1T/F60f7W4RZORztJtjL7g26Crtlqv34NDS5zD4WrOm4Wdc/D8wNqONzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695919080; a=rsa-sha256; cv=none; b=GRfZQjCUkhBWABri9jsy3MEB56rRRk4CmYJFYlAbIpmyKmNU7f3pr/qd86k2Xa7bORRb8L appnW5UF4v9zUhfpQA8Gfl5ZHaLcM1S4RtFJvxYCe4crLJTNJNsDJI4P5vfauESzxPEYUR qhtLT+IKb/kXy6JGhUs2+nVXQm23+LPHanmbPuC3yAO53g1DfsZCTAA0meGxDjWgY8QW8s ytbHLf8So1klBfWGPHZf80fxHmYKwXwbiqrvTcxF6Nz5qOA1MCklOAzE1tygmPEnPUGGVs 3jk6JxMlVRdMYEBdsYXuLsZKPH/2RdAj0uAnVFP3VsnWRGR9jN81JXj1kbSp8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wv66meaZj1K618mz053ZWH1Ku2cfCdLlUUj5cPXOjFw=; b=yag7M8g6lQC3f3+/9jDb3ym0j12TWyApUTAdbJJdOg/WUEXwuW6pvKD+TAvWybbM58G5Dz wcSQ5ttZDqZUSFwT+HbyI1QRNVqjPIDqAu2ZcP9euJ1A0WHscxCeSY0PNJTa9ecF/ntzYM wiz1IdWuWp3VbmYb4cH6HGn3TSzXO8lLNs29bUxQs6DZZO+lH/RFibNdJCYo7RVSBLaawJ 3D3a3JyQsmSv7lP4w6E5Akuv37J2yn+fvs0SLy9WnJ3jQ4qqY+SvTPkdah+LEEvJzt6+DH yHEVQNldVDCIAOT2xF826H2dA93Dp+YIuc9YFOkoDnkjSKLG2iLZ9oWXcQHDxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxK0S17VdzVWt; Thu, 28 Sep 2023 16:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SGc00n090012; Thu, 28 Sep 2023 16:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SGc02g090009; Thu, 28 Sep 2023 16:38:00 GMT (envelope-from git) Date: Thu, 28 Sep 2023 16:38:00 GMT Message-Id: <202309281638.38SGc02g090009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d9d69a6f6fc1 - main - split: Improve GNU compatibility. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d9d69a6f6fc1f8d80df9ce6493e8ab9388781615 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d9d69a6f6fc1f8d80df9ce6493e8ab9388781615 commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-28 16:30:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-28 16:30:16 +0000 split: Improve GNU compatibility. * Like GNU split, turn autoextend back on if given -a0. * Add a test case that verifies that -a turns autoextend off. * Add a test case that verifies that -a0 turns autoextend back on. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42011 --- usr.bin/split/split.c | 7 ++++++- usr.bin/split/tests/split_test.sh | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index ba98d82b25c4..e246a0d4adfc 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -115,7 +115,12 @@ main(int argc, char **argv) errx(EX_USAGE, "%s: suffix length is %s", optarg, errstr); } - autosfx = false; + if (sufflen == 0) { + sufflen = 2; + autosfx = true; + } else { + autosfx = false; + } break; case 'b': /* Byte count. */ if (expand_number(optarg, &bytecnt) != 0) { diff --git a/usr.bin/split/tests/split_test.sh b/usr.bin/split/tests/split_test.sh index c9b87c01618c..48065719055a 100755 --- a/usr.bin/split/tests/split_test.sh +++ b/usr.bin/split/tests/split_test.sh @@ -209,6 +209,23 @@ autoextend_body() atf_check -o inline:"$((26*25+1))\n" cat xzaaa } +atf_test_case noautoextend +noautoextend_body() +{ + seq $((26*26)) >input + atf_check split -a2 -l1 input + atf_check -o inline:"$((26*26))\n" cat xzz +} + +atf_test_case reautoextend +reautoextend_body() +{ + seq $((26*25+1)) >input + atf_check split -a2 -a0 -l1 input + atf_check -o inline:"$((26*25))\n" cat xyz + atf_check -o inline:"$((26*25+1))\n" cat xzaaa +} + atf_test_case continue continue_body() { @@ -249,6 +266,8 @@ atf_init_test_cases() atf_add_test_case larger_suffix_length atf_add_test_case pattern atf_add_test_case autoextend + atf_add_test_case noautoextend + atf_add_test_case reautoextend atf_add_test_case continue atf_add_test_case undocumented_kludge atf_add_test_case duplicate_linecount From nobody Thu Sep 28 19:48:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxPD246Nhz4vVXL for ; Thu, 28 Sep 2023 19:48:18 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxPD12q4Vz4q4k for ; Thu, 28 Sep 2023 19:48:17 +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.45 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-405361bb9cdso136139495e9.0 for ; Thu, 28 Sep 2023 12:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695930495; x=1696535295; 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=93M3xtaxos/M905ELTCRSBo4xS4zERsiBo4dPRFFHjA=; b=fCXaajUraYnHc6g3llDNVwWVMgp+ONMElChdxoAasqjhbByRz6zpAGrlqorYhEJ/Bz 2YkeJI5njJbFjxGOXCvqeD9ElIqsYOXh9m1jilj8DRdWAeUMHYlf8QUst6LwxCaHOhqM aG/JY/I8+PG3kVeXcPEdmyOyIC73C6Lf4pIWF1YHgJYWU6EOEsJFHjkd619PYsEjlbCw 7Az/jEvj0+4a34wLilmUMlzkDernjzxoWLfG9DOuY5iX23iW5OUOXvifw+HF5P2jn9BG PJ//QxUzw94YkfjoddmmZ6ThzhB6/wh+XBP2pZZUzJClsNIaDn7J24DSM+78xBTBIneE S+vQ== X-Gm-Message-State: AOJu0YypNgvxj/VUmJaa1q0KnewvQnkzKy2YF4pcUoSfcnnGkGP17E12 VEAun5Vi00HmX620VvXP7t/efA== X-Google-Smtp-Source: AGHT+IHZJ2C+4x3WNoOs4VfaftSN23yZ08nuG6ZSpgfMMlk+hH4gJxuMRxalagkfoaaQfIjBy2P+nQ== X-Received: by 2002:a7b:c397:0:b0:401:b53e:6c40 with SMTP id s23-20020a7bc397000000b00401b53e6c40mr2135499wmj.10.1695930495190; Thu, 28 Sep 2023 12:48:15 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id q20-20020a1cf314000000b004064ac107c8sm3111386wmq.0.2023.09.28.12.48.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2023 12:48:14 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 29a55fd09b0a - main - dtc: Sync with upstream commit 26a0fe5 From: Jessica Clarke In-Reply-To: <202309261700.38QH06di038371@gitrepo.freebsd.org> Date: Thu, 28 Sep 2023 20:48:04 +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: <202309261700.38QH06di038371@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.47 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.969]; 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]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.45:from]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.45:from]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxPD12q4Vz4q4k On 26 Sep 2023, at 18:00, Ed Maste wrote: >=20 > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D29a55fd09b0a3cc4c888f7a630fde416= 94699343 >=20 > commit 29a55fd09b0a3cc4c888f7a630fde41694699343 > Author: Jose Luis Duran > AuthorDate: 2023-09-26 16:37:52 +0000 > Commit: Ed Maste > CommitDate: 2023-09-26 16:59:17 +0000 >=20 > dtc: Sync with upstream commit 26a0fe5 >=20 > - 0206c0f ("Handle top-level /delete-node/ directives.") > - d612a9e ("Remove C++11 standard constrain") > - Remove extra white lines after the $FreeBSD$ tag removal >=20 > Reviewed by: kevans (earlier), theraven, emaste > Differential Revision: https://reviews.freebsd.org/D41482 > --- > usr.bin/dtc/HACKING | 1 - > usr.bin/dtc/Makefile | 3 -- > usr.bin/dtc/fdt.cc | 134 = ++++++++++++++++++++++++++++++++++++++++----------- > usr.bin/dtc/fdt.hh | 24 ++++++--- > 4 files changed, 121 insertions(+), 41 deletions(-) >=20 > diff --git a/usr.bin/dtc/HACKING b/usr.bin/dtc/HACKING > index 9447c4f6ebf9..ef858c8885c0 100644 > --- a/usr.bin/dtc/HACKING > +++ b/usr.bin/dtc/HACKING > @@ -1,4 +1,3 @@ > - > Notes for people hacking on dtc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >=20 > diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile > index d242ed80e8b1..d7661ae164c3 100644 > --- a/usr.bin/dtc/Makefile > +++ b/usr.bin/dtc/Makefile > @@ -1,4 +1,3 @@ > - > PROG_CXX=3Ddtc > SRCS=3D dtc.cc input_buffer.cc string.cc dtb.cc fdt.cc checking.cc > MAN=3D dtc.1 > @@ -7,8 +6,6 @@ WARNS?=3D 3 >=20 > CXXFLAGS+=3D -fno-rtti -fno-exceptions >=20 > -CXXSTD=3D c++11 This broke building FreeBSD on macOS, as it defaults to C++98 not C++11, despite using modern Clang. Unlike CSTD there is no CXXSTD default in bsd.sys.mk. Please reinstate this until we have a better way to deal with CXXSTD. (See = https://github.com/freebsd/freebsd-src/actions/runs/6341785142/job/1722617= 0311) Jess From nobody Thu Sep 28 19:56:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxPPD64m2z4vWXF for ; Thu, 28 Sep 2023 19:56:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 4RxPPD1nLkz4qh1 for ; Thu, 28 Sep 2023 19:56:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.51 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3214cdb4b27so12395353f8f.1 for ; Thu, 28 Sep 2023 12:56:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695930974; x=1696535774; 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=i9Aq+EKlEuQiB/3BS2w4VBcUtstb7+cXpPK7fHK7sig=; b=qK4OO+Oqwz9DbMo1bD7R22Z9hNxDnb2nNLkBc2zawxD4bF8lzZqeq0C0l2OrdUFq9/ xyJL4U8s4WfzEcl7VeNMMVQ+vNzjEj3DNRzI0iiVjVgv5asGLP1yvySVvb+0vDhreVoI /cZ4ly5RC+gac7bi/iukU6rixw8JNzKhsY4Ck9Viapj3iHm7rroHLWGkmMlrj1m71RSz rkMUc+5Qesg9xQ4ekYHzhfhfZafYcyR6iZ1oaAmMFzK86sUAh7ruaSoMZc2t69er/ibI W4Ww+u5sSqL+ASVe8ziJ9vCdkI29rt34mW0vw+/VZfvPm8sxajjs8wkk8mZSUNafFfiL 6YZw== X-Gm-Message-State: AOJu0YzzEDEDMf8jQX77HIT/CN62ZwSRFOCjfANbTKAXfOAy5ZrsKoQY ZuNUgsebu8lV+xX5byEwp2q12g== X-Google-Smtp-Source: AGHT+IHUMCHljLtMoQvO3JZAT/LkWzHFsAEJgxVt0GMT3p33+KfhMVXFjGXd+tU74K9QQgVUuoiXEw== X-Received: by 2002:a5d:46c2:0:b0:31f:fdd8:7d56 with SMTP id g2-20020a5d46c2000000b0031ffdd87d56mr2031221wrs.12.1695930974469; Thu, 28 Sep 2023 12:56:14 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id y6-20020a5d4706000000b003253523d767sm297868wrq.109.2023.09.28.12.56.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2023 12:56:14 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 29a55fd09b0a - main - dtc: Sync with upstream commit 26a0fe5 From: Jessica Clarke In-Reply-To: Date: Thu, 28 Sep 2023 20:56:02 +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: <202309261700.38QH06di038371@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.47 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.971]; 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]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.51:from]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.51:from]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxPPD1nLkz4qh1 On 28 Sep 2023, at 20:48, Jessica Clarke wrote: >=20 > On 26 Sep 2023, at 18:00, Ed Maste wrote: >>=20 >> The branch main has been updated by emaste: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D29a55fd09b0a3cc4c888f7a630fde416= 94699343 >>=20 >> commit 29a55fd09b0a3cc4c888f7a630fde41694699343 >> Author: Jose Luis Duran >> AuthorDate: 2023-09-26 16:37:52 +0000 >> Commit: Ed Maste >> CommitDate: 2023-09-26 16:59:17 +0000 >>=20 >> dtc: Sync with upstream commit 26a0fe5 >>=20 >> - 0206c0f ("Handle top-level /delete-node/ directives.") >> - d612a9e ("Remove C++11 standard constrain") >> - Remove extra white lines after the $FreeBSD$ tag removal >>=20 >> Reviewed by: kevans (earlier), theraven, emaste >> Differential Revision: https://reviews.freebsd.org/D41482 >> --- >> usr.bin/dtc/HACKING | 1 - >> usr.bin/dtc/Makefile | 3 -- >> usr.bin/dtc/fdt.cc | 134 = ++++++++++++++++++++++++++++++++++++++++----------- >> usr.bin/dtc/fdt.hh | 24 ++++++--- >> 4 files changed, 121 insertions(+), 41 deletions(-) >>=20 >> diff --git a/usr.bin/dtc/HACKING b/usr.bin/dtc/HACKING >> index 9447c4f6ebf9..ef858c8885c0 100644 >> --- a/usr.bin/dtc/HACKING >> +++ b/usr.bin/dtc/HACKING >> @@ -1,4 +1,3 @@ >> - >> Notes for people hacking on dtc >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >>=20 >> diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile >> index d242ed80e8b1..d7661ae164c3 100644 >> --- a/usr.bin/dtc/Makefile >> +++ b/usr.bin/dtc/Makefile >> @@ -1,4 +1,3 @@ >> - >> PROG_CXX=3Ddtc >> SRCS=3D dtc.cc input_buffer.cc string.cc dtb.cc fdt.cc checking.cc >> MAN=3D dtc.1 >> @@ -7,8 +6,6 @@ WARNS?=3D 3 >>=20 >> CXXFLAGS+=3D -fno-rtti -fno-exceptions >>=20 >> -CXXSTD=3D c++11 >=20 > This broke building FreeBSD on macOS, as it defaults to C++98 not > C++11, despite using modern Clang. Unlike CSTD there is no CXXSTD > default in bsd.sys.mk. Please reinstate this until we have a better = way > to deal with CXXSTD. >=20 > (See = https://github.com/freebsd/freebsd-src/actions/runs/6341785142/job/1722617= 0311) In fact dtc now requires C++14 due to using auto in lambdas, and upstream=E2=80=99s build systems explicitly use C++17. Jess From nobody Thu Sep 28 20:39:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxQMH6BW2z4vZ8q; Thu, 28 Sep 2023 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQMH5hhbz4tZH; Thu, 28 Sep 2023 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Rivfbj1Uf7ux919zwIxTiAYtJgk7/uCGyZzDhTOJKA=; b=rYjIBy0N9W3RBj7ra3LdiSFA7HsJLo5ePBV6uziquAY8e7oRuXupuHQAcpIInDOcl62SOd lCfy5lLxAf+HEoSbSNzG47veEIhD7wbWBsX/hzJF24UocQ94EvVGKDZK+AoHlVPqzfHXHn ++rn5hTEBXbgE92JnmWkmb5xlYygIvpJvf0u/c7GiOjttUBgGA2IrsVixiLS/yncFwf7eY YSRPxbyiKhFvC0ph3jl83mzcblkAtrUqzd0Es061V4mCh/aSbC74vzytqPkHJW3FqtX2Uc 3TaiCsQW7SeePJztZpPRDmQkzD5lRTMoy5rU1vclaUvRYvB9fJK/GIMQRUvIuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695933579; a=rsa-sha256; cv=none; b=Hyv4RB9KQhIQVvgTwRj/+D5+5TVDVj6lhSgI+jtPDG7P+YqBPQMYT5tmAxzSQa5o6TPEW/ EpojLuaMp5HE+p1fgpB2uos3jCoGrodkhiOtoZ5J9/Ttp8Il8Xsbc3YDnPp61eNH3D8bcE Y7YlMMVucj75XMmR2Nz4zkkZ5ck01gd/q+TTltbsUXtaQqy/gVWpTKXUDPXW75f8utWKhh vA5MDjv3M5KB2q5nqKEGDMokGTnpQJQZ+IGstmzG/Bax7rNBG2h8AbkX1g0xRxNpmSZJzM VDsv9fFX6dRFhr79rgbZPcbW/8Sk7vqV0E3DMBY2J/jtyi/7bhvR8Zo7HXe9tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Rivfbj1Uf7ux919zwIxTiAYtJgk7/uCGyZzDhTOJKA=; b=azhRP1m4rbtRbuJi4ZjOKczJL2EzZQrrH9WKoc0g9abSNjpPAAXjIqEzeSGBbYcnlQ4xdu HHcTQNFavE1Pi5ZWW4FyyosAmILsEi41jMaP/h7d51RLRydSt0M/AILcAhrU1Z0zJxJpzQ 08ouSSkEaEjq82Zr7fy2i161Zw260hHGdShkU/dRpjg8712HVaK+PCo4+Rh8BA+jAccBA6 TbP+zy6Gn4xi5xRBe1OGTfOkh7y/cMDjsVzDYLjGlhYziLPw40OL/LNkV8xN2GlsNO9GXD s7khTbJ0e8kP3H1Lw+rNwmGPrFufkPdwGkx4iQ0FQde1GidI/+bl2+SZ3XqvDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQMH4mTMzc3j; Thu, 28 Sep 2023 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SKddAU089603; Thu, 28 Sep 2023 20:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SKdd0O089600; Thu, 28 Sep 2023 20:39:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 20:39:39 GMT Message-Id: <202309282039.38SKdd0O089600@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: ef20cd33d328 - main - makefs/zfs: Ensure that the last block of a file has the right size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ef20cd33d3287ebead0d30f2e177fc57a97dc2d5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ef20cd33d3287ebead0d30f2e177fc57a97dc2d5 commit ef20cd33d3287ebead0d30f2e177fc57a97dc2d5 Author: Mark Johnston AuthorDate: 2023-09-28 20:16:17 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 20:16:17 +0000 makefs/zfs: Ensure that the last block of a file has the right size When copying a file's contents into the pool, a loop copies blocks of the maximum size (128KB), allocating space from the vdev for each block. The space allocator rounds up to the nearest block size, but for files larger than the maximum size, this can result in the last block having a smaller logical size than the rest of the blocks belonging to that dnode. This violates some ZFS invariants when appending to that file. Modify fs_populate_file() to use the same block size for the final block. Reported by: cperciva MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs/fs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index 0d85ea8eb9d8..b0a4c639f256 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -515,7 +515,7 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) uint64_t dnid; ssize_t n; size_t bufsz; - off_t size, target; + off_t nbytes, reqbytes, size; int fd; assert(cur->type == S_IFREG); @@ -546,29 +546,30 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) bufsz = sizeof(zfs->filebuf); size = cur->inode->st.st_size; c = dnode_cursor_init(zfs, arg->fs->os, dnode, size, 0); - for (off_t foff = 0; foff < size; foff += target) { + for (off_t foff = 0; foff < size; foff += nbytes) { off_t loc, sofar; /* * Fill up our buffer, handling partial reads. */ sofar = 0; - target = MIN(size - foff, (off_t)bufsz); + nbytes = MIN(size - foff, (off_t)bufsz); do { - n = read(fd, buf + sofar, target); + n = read(fd, buf + sofar, nbytes); if (n < 0) err(1, "reading from '%s'", cur->name); if (n == 0) errx(1, "unexpected EOF reading '%s'", cur->name); sofar += n; - } while (sofar < target); + } while (sofar < nbytes); - if (target < (off_t)bufsz) - memset(buf + target, 0, bufsz - target); + if (nbytes < (off_t)bufsz) + memset(buf + nbytes, 0, bufsz - nbytes); - loc = objset_space_alloc(zfs, arg->fs->os, &target); - vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, target, loc, + reqbytes = foff == 0 ? nbytes : MAXBLOCKSIZE; + loc = objset_space_alloc(zfs, arg->fs->os, &reqbytes); + vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, reqbytes, loc, dnode_cursor_next(zfs, c, foff)); } eclose(fd); From nobody Thu Sep 28 20:39:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxQMK0sczz4vZBn; Thu, 28 Sep 2023 20:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQMJ6zMKz4tS2; Thu, 28 Sep 2023 20:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wURPJ8p70V/ckbFNC9/RoManyw2avE3Q4XvVarBc0V4=; b=kjmb/ibNmSfEtBSYl2ldI6ERdDP8RCLCyTSebJXBQfnzJpzAxNtI8E9CuGpBJ5MyqgoBXI zUSZrdH/uAXmgz9MEh+NrJreMgaWbKZfVGiZVz7vVN5Y1De52T7evoVQcRdjMNVRoalDeD /uHu7s56gL8vTNDIpzzRoL9MaKRdnDkvl2AXCwWRPwNERELrJ28IMO0lSjD82sXy2m/5yq XKuTi6om4BrIvGLllH11O/Hi6JbIej5cl4Zqmh9hCCH5RC/HPgSyTNfM0Vk/JXqRb7szeA Jt+a9GWjEw1HXGdov5yEl/H73Ew1G6hnoibMkEQHf3R4H+2Q8Bv0Ob2MY+5Uwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695933581; a=rsa-sha256; cv=none; b=egRh+thIA+kENE+gfFPTpa2W7hMLB5r86NxNCyvyNSMk9OxReTiCvh9AyWh/ynPUrmMJYU NiYayjs3LbK2aTTEWfr82vF5eYvM6rnyatD+DPQUHBrtjr6CyoxSuFf+014mztxL7PHFjD pvQg5FOW5rSNmCitGnCs9XGOkiyek5WmCQvfrnsnL4PUVy8SAo//fE6suhejQs1Ryu/6ej zWsiCBGkZFtMk5xx6YOqzgi4bOgOIZLLWtNDD4nzKubYjjUbCiGAWZHo285dkq1x+QrAyC s7y4t0auV54wwPpikoOQAXbV4BbWEp/WqJbdJeQaU8fsT+fYdzbkth1ymJYuNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wURPJ8p70V/ckbFNC9/RoManyw2avE3Q4XvVarBc0V4=; b=qLvqYOUXY4GUBtoNPZH7YxqrycpcoEiNkcNmiass64YB1GiBwKsgs4WoH7GovkIQlFa8nx Bs75AfKiX66PRLucRD//TUUWwLC8MDgj2JJZO/UPvFpv9uWUUZQNvGVcS7Z0oEj8jcLBFW VQHY/Ul2iJ6DNFdkeOiTuNJvoV4K49Z4OiP5l0ccZdCmHXiLp+wmBsV4Uaimu/XOYn205r hz2uJqjKnpzih9l4NvC/Oyfa1gpy92xrH9rWqKq7tojMxxbWx4mC8l65e0bR/hyUc3YTo5 sUHqw6Wkd4wgfyaUsZGgZWZ+hJ9uyg+WjLSm3tgvqwg9VQFrr4/XKmM3dyxpgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQMJ60llzcRT; Thu, 28 Sep 2023 20:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SKdehi089670; Thu, 28 Sep 2023 20:39:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SKdeWx089667; Thu, 28 Sep 2023 20:39:40 GMT (envelope-from git) Date: Thu, 28 Sep 2023 20:39:40 GMT Message-Id: <202309282039.38SKdeWx089667@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: b6da7f2fd127 - main - makefs/zfs tests: Add a test case which appends to a file after import List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b6da7f2fd127f447aa20843666b98d3a1d07b8c9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6da7f2fd127f447aa20843666b98d3a1d07b8c9 commit b6da7f2fd127f447aa20843666b98d3a1d07b8c9 Author: Mark Johnston AuthorDate: 2023-09-28 20:25:06 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 20:36:12 +0000 makefs/zfs tests: Add a test case which appends to a file after import MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index e8da4cc87055..9173600dc555 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -191,6 +191,40 @@ empty_fs_cleanup() common_cleanup } +atf_test_case file_extend cleanup +file_extend_body() +{ + local i start + + create_test_dirs + + # Create a file slightly longer than the maximum block size. + start=132 + dd if=/dev/random of=${TEST_INPUTS_DIR}/foo bs=1k count=$start + md5 -q ${TEST_INPUTS_DIR}/foo > foo.md5 + + atf_check $MAKEFS -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \ + $TEST_IMAGE $TEST_INPUTS_DIR + + import_image + + check_image_contents + + i=0 + while [ $i -lt 1000 ]; do + dd if=/dev/random of=${TEST_MOUNT_DIR}/foo bs=1k count=1 \ + seek=$(($i + $start)) conv=notrunc + # Make sure that the first $start blocks are unmodified. + dd if=${TEST_MOUNT_DIR}/foo bs=1k count=$start of=foo.copy + atf_check -o file:foo.md5 md5 -q foo.copy + i=$(($i + 1)) + done +} +file_extend_cleanup() +{ + common_cleanup +} + atf_test_case file_sizes cleanup file_sizes_body() { @@ -699,6 +733,7 @@ atf_init_test_cases() atf_add_test_case dataset_removal atf_add_test_case empty_dir atf_add_test_case empty_fs + atf_add_test_case file_extend atf_add_test_case file_sizes atf_add_test_case hard_links atf_add_test_case indirect_dnode_array From nobody Thu Sep 28 20:41:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxQPM4VYpz4vZC6; Thu, 28 Sep 2023 20:41: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 4RxQPM2y6Bz4v7j; Thu, 28 Sep 2023 20:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNDidHEKeJn6XatY3mn7QWjjo0CrT0hWA/SPfBQ+Gn8=; b=VzfYjC+sClzlwG6dfVfQdtdxIThkMkiTOXP/iSlKUGBUof2T9oVSjzd0y6z2YmDjtS6lgT euH+Mz/Xh758OebgNScXrfS0S/hkHGPBnE1fbDzBY6+93Po2oYdboQUEJu2AluzrGo4azl vigO8s/iI6BQ9YyIm+qFc8qUFk1Dc0YGDI4ERrhpWLMS8KP5J8E3lj22nSXfO7zXHXNc4r YzIz3cWCxCyYxqnoHbRsGlB6K+61QnDli3rdXu316RO/A1exn1S4sSXL/oO4wdIHxcojZn eP1ZYTa8JvxDrfglWxKCdnVJnJ3SjTTWPxcQdsCb1QnSOcJjb6KwPbHoawpncA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695933687; a=rsa-sha256; cv=none; b=AtIa59+e+UVTCC5CJa4Yz/yywlWZQ03oXd8HxmnvO3r1BQ+dY4wQnZo+VKT4EVQysXgoFN e5M5LSO85jrHKZEa7lE3iFTYEcEIuvY3IaTeYtDvQ7uq5AVy63ArXjFIDyCYnTyUJEatkY sxzbaYuNW9VXN8JPPSjCPzbAeL7Vgk7RFsu6xiSsOzvjNZ1SXqc5mTI0QuVg2FGEMeoOwu VuKwQ1hp51EJUwuK/D0YvJadpsWD6TnqCBCLIzvlMDtlkWJKml2EmzzDMedGXRyb8uMsJT pvGNTdS93WqfkS7MSPkujqc3VMXMQeWPu31MQUORdFH7BUokJ/qGq1XWeydXLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNDidHEKeJn6XatY3mn7QWjjo0CrT0hWA/SPfBQ+Gn8=; b=qBkK4SqCYujPulh9GYo/74E+0KKh5pfsk2LKbkwmuPKEKuPMXajxEUNh8h5kdWqJaqxnfg mVkKaYiFMUa1vrWL3hJdWT+AhFaDapWJV80EMO5+jzhW+oIRZ95uEz4WaDBjSWkiEoBHda kzaIqX554XplhUMHFOCknhbI+3zKVfFSXAusxi4uvhxESjzv4v0a5AgL4LQxIct0e/5DzY hPn5dV/eUx+DUOY3Z1Jd7YUPZTtEk+uhWCW7B2kDUPCuReew1lnAWd1GT5BuUIe5aXLtui mG3JDMlg4aU3vZkB6pKLrPZgymJhpGf7ZKVKqtOyacLCEZFYUEsZZ+lQNTCqRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQPM222Qzch0; Thu, 28 Sep 2023 20:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SKfRkE002954; Thu, 28 Sep 2023 20:41:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SKfRca002952; Thu, 28 Sep 2023 20:41:27 GMT (envelope-from git) Date: Thu, 28 Sep 2023 20:41:27 GMT Message-Id: <202309282041.38SKfRca002952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d7ee24d0d5ae - releng/14.0 - sockets: re-check socket state after call to pr_rcvd() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d7ee24d0d5aed1180e9f65058c3a5ff45a52210e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d7ee24d0d5aed1180e9f65058c3a5ff45a52210e commit d7ee24d0d5aed1180e9f65058c3a5ff45a52210e Author: Greg Becker AuthorDate: 2023-09-09 23:38:24 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 20:41:09 +0000 sockets: re-check socket state after call to pr_rcvd() Socket state may have changed after dropping the receive buffer lock in order to call pr_rcvd(). If the buffer is empty, re-check the state after reaquiring the lock and skip calling sbwait() if the socket is in error or the peer has closed. Approved by: re (gjb) PR: 212716 Reviewed by: markj, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41783 (cherry picked from commit f44102411e1b16363e91a074c9c403069c550e4d) (cherry picked from commit caaea455773898bee9a0c59466a84256192e0980) --- sys/kern/uipc_socket.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index ffd5e06c34b7..3c7e5c4cb4bb 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -2429,6 +2429,10 @@ dontblock: VNET_SO_ASSERT(so); pr->pr_rcvd(so, flags); SOCKBUF_LOCK(&so->so_rcv); + if (__predict_false(so->so_rcv.sb_mb == NULL && + (so->so_error || so->so_rerror || + so->so_rcv.sb_state & SBS_CANTRCVMORE))) + break; } SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); From nobody Thu Sep 28 20:41:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxQPN51pMz4vZC8; Thu, 28 Sep 2023 20:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQPN4GZBz4vPZ; Thu, 28 Sep 2023 20:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lDII95SLzQHIOZiUoTJ/Y9whtTR19OvUqpABiYsly0g=; b=yNx4PCoRJZRQTxJ1QBQWH//uqZ1Y08hxrflXTVNvBT4PiQ6Qz1lvO26ZgOhr38DEyXWgVW pf+GDV/mgSKA0Qroja+WJuqbGi4LXOBLhc1LIn5p8pQUs/YYZetzBEHX+nY+z+g/AQ4XZN XLf4lK5nc1fVOSV1ZH7192JUqGlvvQ4xH9Gx6EWyavSVBp2zOeCI10zVWkjHtiUoOLxMgf 8GKrQ/7ki7vHByuudBnxqe318kgjtTCd6wc8HfQXfEKxJJJmbAc9X8GKbaRI+Lb0NCDRTO w0xvFwQ6plyVRS2j4RYm9oQW6oKBxBZoc1RSep+FAdhwxPqkxjrDd1uTrIOFOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695933688; a=rsa-sha256; cv=none; b=TBt8/XmXhmqUspJ3MheB+B0VM9Qw7SD5uO6VIA16UQC8yLaHVGUAmwO9gOt5u4RtTR06pL u93Jz389qAtzp2JyCm5XOj//4p+1rZ5s2kdjJlvUeFDgrTXqp2xuXXVQfKKkEqtbKbBIPE 9Tt/+f61sWqwIydsCCNLTU2Mh3/hJqjstLtVlySHOS5w6GWOEH/s4SGIy5w9nsgUGcZfUX IP5Ub3q1ArF7794z6zC5rOSRwklnoV2//CQ0cutPxdH0bj1l4RTwqQDvZy00dnp4foFM5O PEBn2fRjtZchqL89yqx93+osB8VNmYoKfMUW45XKM6aA9onLKa5n22WE3Zq3Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lDII95SLzQHIOZiUoTJ/Y9whtTR19OvUqpABiYsly0g=; b=qfgYJ29Ci7XzCbdfyCmOrbgvCk0ifCVBWwdPunOJVEBcHn3mXl5ra/HR27v8IAM2TJX9E9 ADVOfY1vIpAMamsB6XZNN0fmX0Xiwjhgcwl1YsDnHknTcNhO/wB765YrTevFSJydP0RtXY Glp9j4Cmvs9dfQezNAYZaNIb2DDw5oF2qOVGN2NmTQ36a0YpiieIdoXoErI4wRHAY5NVk2 n1noUU1rQYIif1P3svYB0mVAFT1t/rO6MVMKPjDKTOdkoilFb4TISjYB4l1R8f3VoD96US ntjmHN1U1nL8f/cSlg5EVdrG/FEhWpuyaxSoV+ieTuRd0iY93dIJdsNaTlxLzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQPN3Kx6zcjP; Thu, 28 Sep 2023 20:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SKfS5Y003002; Thu, 28 Sep 2023 20:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SKfSOw002999; Thu, 28 Sep 2023 20:41:28 GMT (envelope-from git) Date: Thu, 28 Sep 2023 20:41:28 GMT Message-Id: <202309282041.38SKfSOw002999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8ad93f44a5da - releng/14.0 - dtrace: Fix a kernel panic in printm() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 8ad93f44a5daf804a281782271cec7423572e7c4 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ad93f44a5daf804a281782271cec7423572e7c4 commit 8ad93f44a5daf804a281782271cec7423572e7c4 Author: Domagoj Stolfa AuthorDate: 2023-09-06 13:25:00 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 20:41:15 +0000 dtrace: Fix a kernel panic in printm() When using printm(), one should always pass a scratch pointer to it. This is achieved by calling printm with memref BEGIN { printm(fixed_len, memref(ptr, var_len)); } which will return a pointer to the DTrace scratch space of size sizeof(uintptr_t) * 2. However, one can easily call printm() as follows BEGIN { printm(10, (void *)NULL); } and panic the kernel as a result. This commit does two things: (1) adds a new macro DTRACE_INSCRATCHPTR(mstate, ptr, howmany) which checks if a certain pointer is in the DTrace scratch space; (2) uses DTRACE_INSCRATCHPTR() to implement a check on printm()'s DIFO return value in order to avoid the panic and sets CPU_DTRACE_BADADDR if the address is not in the scratch space. Approved by: re (gjb) Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41722 (cherry picked from commit 8527bb2aee6ca9013c34445de88217a954b6628d) (cherry picked from commit 49c1b353390cf498bcd9a3e548039e2a64f654fe) --- .../contrib/opensolaris/uts/common/dtrace/dtrace.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index 02a95bfab726..ce02676e0dc1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -515,6 +515,11 @@ do { \ ((mstate)->dtms_scratch_base + (mstate)->dtms_scratch_size - \ (mstate)->dtms_scratch_ptr >= (alloc_sz)) +#define DTRACE_INSCRATCHPTR(mstate, ptr, howmany) \ + ((ptr) >= (mstate)->dtms_scratch_base && \ + (ptr) <= \ + ((mstate)->dtms_scratch_base + (mstate)->dtms_scratch_size - (howmany))) + #define DTRACE_LOADFUNC(bits) \ /*CSTYLED*/ \ uint##bits##_t \ @@ -7739,9 +7744,24 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, } case DTRACEACT_PRINTM: { - /* The DIF returns a 'memref'. */ + /* + * printm() assumes that the DIF returns a + * pointer returned by memref(). memref() is a + * subroutine that is used to get around the + * single-valued returns of DIF and is assumed + * to always be allocated in the scratch space. + * Therefore, we need to validate that the + * pointer given to printm() is in the scratch + * space in order to avoid a potential panic. + */ uintptr_t *memref = (uintptr_t *)(uintptr_t) val; + if (!DTRACE_INSCRATCHPTR(&mstate, + (uintptr_t)memref, 2 * sizeof(uintptr_t))) { + *flags |= CPU_DTRACE_BADADDR; + continue; + } + /* Get the size from the memref. */ size = memref[1]; From nobody Thu Sep 28 20:50:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxQbY4CWGz4vZC2 for ; Thu, 28 Sep 2023 20:50:17 +0000 (UTC) (envelope-from 0100018add8e7811-bd111b81-e9c0-48b5-a964-a0b90d6c68f7-000000@amazonses.com) Received: from a8-60.smtp-out.amazonses.com (a8-60.smtp-out.amazonses.com [54.240.8.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQbY1nfWz3ByS for ; Thu, 28 Sep 2023 20:50:17 +0000 (UTC) (envelope-from 0100018add8e7811-bd111b81-e9c0-48b5-a964-a0b90d6c68f7-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1695934216; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=Y4tgPcWNEBQUacTrPqk0l86OZ0EXuKCn8sQ888+3/ls=; b=AnceomaTa6/f/155vK2HpuOX+YhdTjDjr8PZ7750OWD2DtvanKW+ZycCMsrgROSo ZbDHkROT9HkrbA7MBwp4AyknRkWTcAn6jtBPBQ94QbvbSSifJD+p5XNG9R9ESUoEiB0 kmHueWBL5xjvbIuNxIwwfB7JF969/L8T+QjBDPj0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1695934216; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=Y4tgPcWNEBQUacTrPqk0l86OZ0EXuKCn8sQ888+3/ls=; b=Fj9a/K1JFDLKMGqlS+yLwjPpZD8uyuGtoC/j+IQ+3TGMoNIBV7bpOOK2iYJLAgfL 1M4Izgw+azf1dQC29Q3inheM/YIPanQIErUAM7kPSDCkkIf/wD552UyZtEtZ/TqZ8kv /q5D1lMz8kBD2WwVgJkip6fD1QKfbJhhWvMZuUXE= Message-ID: <0100018add8e7811-bd111b81-e9c0-48b5-a964-a0b90d6c68f7-000000@email.amazonses.com> Date: Thu, 28 Sep 2023 20:50:16 +0000 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: git: ef20cd33d328 - main - makefs/zfs: Ensure that the last block of a file has the right size Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202309282039.38SKdd0O089600@gitrepo.freebsd.org> From: Colin Percival In-Reply-To: <202309282039.38SKdd0O089600@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2023.09.28-54.240.8.60 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US] X-Rspamd-Queue-Id: 4RxQbY1nfWz3ByS On 9/28/23 13:39, Mark Johnston wrote: > makefs/zfs: Ensure that the last block of a file has the right size Thank you! > MFC after: 1 week Can we make this 5 days instead? I'd like to have this land in time for 14.0-RC1. -- Colin Percival FreeBSD Deputy Release Engineer & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Thu Sep 28 20:56:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxQkh5SVxz4vb5J; Thu, 28 Sep 2023 20:56:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (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 4RxQkg5DXGz3CHk; Thu, 28 Sep 2023 20:56:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="N/eda9yh"; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::830 as permitted sender) smtp.mailfrom=markjdb@gmail.com; dmarc=none Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-4194d89a6dfso37898431cf.0; Thu, 28 Sep 2023 13:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695934586; x=1696539386; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=AWxXZOyxRY/XtE+vLgwXkWIfLnY5ZKNN0rMzReOOvuo=; b=N/eda9yhinaOMXP8VyGaWZB04VKJWxn1NkSEZtzNNhubNS/KtEF60XNrPkYRwcg0wk E4zP2HjHpneZOy0Iy754zF58EByPm+w+E1xhoVVl9zwDre2/2TfYykmTwCLK+Rm5kRC3 u5Etd2PbGqNR8N3pFHqNoEICMESRLvMYE6DSKdEENOfin56zNMvPj9fM8hE4UU6fQupQ i5wHFJGpPWQNOF+prGkbwBXOuDg34qZUPv37B/gfiaYgmzwt4qe1WfcQEGGuK8aHvyKW pB88lEY8TUewlbJyUz4HEtVRq2BInUx4cxwuIctarQXERqsWqWbRlbg6tNgCsOlM4l3L ib2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695934586; x=1696539386; 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=AWxXZOyxRY/XtE+vLgwXkWIfLnY5ZKNN0rMzReOOvuo=; b=mu+2vKW72PDiudQKNM2xBqns6B5TUrhEmxCebjX7UiSYrwgeoYySqJ4UCdMIeKRoqF FGRsfH0wnFiUuhpw+A3wOQqYLxXILDnphU7UrkSaVhmf5bxDS0TazuZgc1uG6rwLZzC5 n4Uf+rEWb81uxpwgVBACaU4jaT0zIXJ2YSkiI9qMfMVyl4OmNdS9M5Jy3XH10+Q2c/9o XOvgmDQdQO/SfpwMVx6c+F05uInbMqapOyhxOCBSxLBhX5Cq9OL4BK26H1k0eCaWte5B DpaKFI67lxcQcWJgigYF5SgkSbW43Hq/M7HdciIFplI5uzs7azHvxbcjPz7X+Rr8rlsL 1dbw== X-Gm-Message-State: AOJu0YxMrQzzZgKZXGQEsJIYd2Y3BTrZGJK7EcAPbRHaF0rbs1P8e81D 7Xb9mVBuZhn6Pos99UUHO9HQiXtLL4o= X-Google-Smtp-Source: AGHT+IFFPnP2fZ2QpR+U/85Q3/yKbbRXJ3i8VQO4n6yQu4rcnc4C5+9YGH9Ig1pNR2jzp8mc2NgXdA== X-Received: by 2002:ac8:5ad1:0:b0:412:2b1b:2d53 with SMTP id d17-20020ac85ad1000000b004122b1b2d53mr2821083qtd.8.1695934586559; Thu, 28 Sep 2023 13:56:26 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id ex14-20020a05622a518e00b0041815bcea29sm3572075qtb.19.2023.09.28.13.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 13:56:25 -0700 (PDT) Date: Thu, 28 Sep 2023 16:56:23 -0400 From: Mark Johnston To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ef20cd33d328 - main - makefs/zfs: Ensure that the last block of a file has the right size Message-ID: References: <202309282039.38SKdd0O089600@gitrepo.freebsd.org> <0100018add8e784e-64b5c7d1-7e4b-4381-8e27-504295179ec1-000000@email.amazonses.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100018add8e784e-64b5c7d1-7e4b-4381-8e27-504295179ec1-000000@email.amazonses.com> X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.67 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.973]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::830:from]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(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)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxQkg5DXGz3CHk On Thu, Sep 28, 2023 at 08:50:16PM +0000, Colin Percival wrote: > On 9/28/23 13:39, Mark Johnston wrote: > > makefs/zfs: Ensure that the last block of a file has the right size > > Thank you! > > > MFC after: 1 week > Can we make this 5 days instead? I'd like to have this land in time for > 14.0-RC1. Sure, that's fine with me. From nobody Thu Sep 28 21:02:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxQsv6jVlz4vbfh; Thu, 28 Sep 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQsv68L2z3DJh; Thu, 28 Sep 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695934963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cpc2pRAfVIVTwTED0Hd41iS6/6endcle7IKMOHmnt8k=; b=XXQpGUpJ+ISwFqatWdPSfTXZG2vtxpodTt2+YkyRveNNJf2E2uc24qOzgGczG3ekTDMRv7 SvktIWmYYILaEN8rGWxYO0Q1KZT0kWF53mkRH2RKSPMTz7Yc0g7D2ergRyM12nxRlWTV2J 9qmXkNfJ4SDVroGQ62ErIi5HwykTyALgps/QS3SB+IGIeojV8BNKclAI4UZIUrvwXp7jgR fQ9eCn5MqED5NOdWFydPTT9UotaHcMweJzFrIz44pk2oNlQckaJk26vKOqgulow4PZA7rV tSVpYOBeSRi6qaFOu3xNmWcftpwkdTFEeWkvg+0uMYSMEokh6f0IlTr+s1OaiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695934963; a=rsa-sha256; cv=none; b=UAFl5KC1NppWTu6c5YXO9KLuPIv6CKFHrYut6SEz2Yd5ranUxMFsSCg0bYg6REKroWxp2c 59GwA5k5YmBdinkFMzTV7c3ZHgs021azAyoVSp57bt3nkmeaj3MmzbsFxmMgRBjQtDpIkG NUv4QfXKNMpRIYp4XVKv7CN3ZEmAmcs3e6upEvw5GjWcsW2sc0/nLBgFd6C84UKUqgL35d nQr8EZwd8KxO3JvBOIBKKTIaM3RE+ORF0Y6I0q4dwxudJDmtUeEloAswhCGnTiDGxO65nL 7tnnLDz3F5Z3XhyJdgXprgu8+hLMDLZzV/ddnWAFu5xU9FTBCUo91zOHT7+Yxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695934963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cpc2pRAfVIVTwTED0Hd41iS6/6endcle7IKMOHmnt8k=; b=APRcp3wWR/yfElpfwZM3wAGeGQWehTHr3kiu2qAIM1+S0D8TqZU7fygFWgZjiT3gnAfmYF NyrFttY7Rg3v4EYrEbOJh95Mi7HrQIRoymaNzUuG9mJhOe+lBnRb1MIH4xyPloKhILUPiN TPmSeaOI2yxBQ+LIEjM8i00z4y5CJJQYutN1r5iHsFnIt6SgLYPX2b5IBLU0x7jqMbLIfM 6Z4MFc9xwLw8Fpm3wPXdSfhVIZ+d187fqvcxogA7qvcFeDa+z0a4wpvQphstXZe8OpfoPf sOmO+x2q1MeviwFKxANzyZzTDHlvL8ALXaPsLa3FV4mYfxgfJyMTU4AjJxLUxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQsv5947zd4s; Thu, 28 Sep 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SL2hO4038940; Thu, 28 Sep 2023 21:02:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SL2hqZ038937; Thu, 28 Sep 2023 21:02:43 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:02:43 GMT Message-Id: <202309282102.38SL2hqZ038937@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: b45ab4b000b4 - main - Move the adding of CFLAGS_LAST to bsd.sys.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b45ab4b000b46d301a0d95b856590067e3d67eb5 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b45ab4b000b46d301a0d95b856590067e3d67eb5 commit b45ab4b000b46d301a0d95b856590067e3d67eb5 Author: Simon J. Gerraty AuthorDate: 2023-09-28 21:01:56 +0000 Commit: Simon J. Gerraty CommitDate: 2023-09-28 21:01:56 +0000 Move the adding of CFLAGS_LAST to bsd.sys.mk The point of CFLAGS_LAST is to be the last thing in CFLAGS so add it last. For DIRDEPS_BUILD this can best be done via local.dirdeps-build.mk which is guaranteed to be the last makefile read, but that does nothing for non-DIRDEPS_BUILD bsd.sys.mk is close enough to the end. Reviewed by: obrien Differential Revision: https://reviews.freebsd.org/D42001 --- share/mk/bsd.sys.mk | 5 +++++ share/mk/local.autodep.mk | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 2b1a3e103b89..4cbe01404876 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -501,3 +501,8 @@ ${_tgt}: ${META_DEPS} .endif .endfor .endif + +# we are generally the last makefile read +CFLAGS+= ${CFLAGS_LAST} +CXXFLAGS+= ${CXXFLAGS_LAST} +LDFLAGS+= ${LDFLAGS_LAST} diff --git a/share/mk/local.autodep.mk b/share/mk/local.autodep.mk index d3772aa2b819..bc5bfd3e75db 100644 --- a/share/mk/local.autodep.mk +++ b/share/mk/local.autodep.mk @@ -11,10 +11,6 @@ NOSSPPICO?= .nossppico PIEO?= .pieo OBJ_EXTENSIONS+= ${NOSSPPICO} ${PIEO} -CFLAGS+= ${CFLAGS_LAST} -CXXFLAGS+= ${CXXFLAGS_LAST} -LDFLAGS+= ${LDFLAGS_LAST} - CLEANFILES+= .depend # handy for debugging From nobody Thu Sep 28 21:10:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxR2b75YXz4vbn2; Thu, 28 Sep 2023 21:10: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 4RxR2b5Xzcz3DcV; Thu, 28 Sep 2023 21:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ylEfp9ZozGfmVvJSqwHyBWUePNORHd/QhE8QJsMFoMM=; b=NEElSsAm3qAzlPS2Z0CrW5wyGRtZp7KX6kxnNxFJTuI1Q+YOL02thSATeDKRr3m+gJt+sQ ZO4NRGhfflhnhB4oP5SEamaI/w+SWUPvSZ0wI65WNuMlWZaWKLmpySmKLG+5Dl6l58NNh4 VT5oW+e3Zup8O+5wYTdNhjOOrmUhZPl3zdhZCFqyk4p6SG8nIa+5vGxn+brNfYvZuGXoXN 0TI5Xzek36h8qVHNeXYifG75Aj89hJcdS8Tx5bCTvj/25WMfUYopVyzTtSfHkMiIP+PqGd t054f2tTsPmrNqiQ4vgNPMr4e9U4Sj7Tdq4ex8MuA+I50Scm8Hf6df9uk49NrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935415; a=rsa-sha256; cv=none; b=a4zw3zHUfpA2i7Zy+/2l69Vzs9Ne9wgIz+sLZUuKAbjgPx5k9MjrTZwV0FIsFSfd3ajFmT 55sboqHU8Sh0up8IDBmOyG2YIsNJILHeCEG4o/67VYrKKomhREbtMnJCrQVMRc6Ix/gH9z 90QsC9OHMZYOBLz4gXcRVmi9LY9JmmH4/1wkb4f/PZccqHeI2NU4OAMOXPECY0WZc3/DDZ zge6c1KfRWNfnItn48hFktILsJ0MxRktVQH2qPopmu4O8h+PM+e+eEelYFp6jZEhaInaGg BYMK9xGIXx8nzaS9qNlUa6nU900YmsdFJnt7uvolTm2uDt+nqrzHagVL+IxIvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ylEfp9ZozGfmVvJSqwHyBWUePNORHd/QhE8QJsMFoMM=; b=Ud9Tr1+4a90VpPIWDIjQOgPPt3mhaPdzp83mysDXwxvIw/+sT3zuRKXt3/5rxF7tMSUcO+ +Md4Cs7AcYIZEMUeiF0VYeqEKzNBqUGW7DVjcFlpyiSEZc5wKN1fbLmVhbASlBQSFe3sq1 hOOy40QxzRtKItO53RninIoIDUpwZaPYzvNLGKiLkvWg2amgFkpCDWPLYzmcujuFY683dZ HrGyp55TR/CYlnJY4H0Z1h7fgvb3GCliwehEv51l/OxpPwhf+y6aUdWwyuWugyxPf8h6+E sfxCaUI/Xevx8c0s8lk5jHOLQCeV68/XLmuTSqKZYWWDmrA3W+4ZIi/qRGNhlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxR2b4ZZmzd4y; Thu, 28 Sep 2023 21:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLAFCQ047228; Thu, 28 Sep 2023 21:10:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLAF3P047218; Thu, 28 Sep 2023 21:10:15 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:10:15 GMT Message-Id: <202309282110.38SLAF3P047218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: a276199fef37 - stable/14 - nvme: Timeout expired transactions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a276199fef37b04b8b3678eab90f0c33095a6c4d Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a276199fef37b04b8b3678eab90f0c33095a6c4d commit a276199fef37b04b8b3678eab90f0c33095a6c4d Author: Warner Losh AuthorDate: 2023-09-28 20:45:49 +0000 Commit: Warner Losh CommitDate: 2023-09-28 21:05:14 +0000 nvme: Timeout expired transactions When we went to having a shared timeout routine, failing the timed-out transaction code was inadvertantly dropped. Reinstate it. Fixes: 502dc84a8b670 Sponsored by: Netflix MFC After: 2 weeks Reviewed by: chuck, jhb Differential Revision: https://reviews.freebsd.org/D36921 (cherry picked from commit 2a6b7055a980f7e7543dfdbda4aa0c356133b77d) --- sys/dev/nvme/nvme_qpair.c | 60 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 45a999c17d89..0ad0b7cbe17f 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -944,6 +944,30 @@ nvme_io_qpair_destroy(struct nvme_qpair *qpair) nvme_qpair_destroy(qpair); } +static void +nvme_abort_complete(void *arg, const struct nvme_completion *status) +{ + struct nvme_tracker *tr = arg; + + /* + * If cdw0 == 1, the controller was not able to abort the command + * we requested. We still need to check the active tracker array, + * to cover race where I/O timed out at same time controller was + * completing the I/O. + */ + if (status->cdw0 == 1 && tr->qpair->act_tr[tr->cid] != NULL) { + /* + * An I/O has timed out, and the controller was unable to + * abort it for some reason. Construct a fake completion + * status, and then complete the I/O's tracker manually. + */ + nvme_printf(tr->qpair->ctrlr, + "abort command failed, aborting command manually\n"); + nvme_qpair_manual_complete_tracker(tr, + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 0, ERROR_PRINT_ALL); + } +} + static void nvme_qpair_timeout(void *arg) { @@ -952,36 +976,44 @@ nvme_qpair_timeout(void *arg) struct nvme_tracker *tr; sbintime_t now; bool idle; + bool expired; uint32_t csts; uint8_t cfs; mtx_lock(&qpair->lock); idle = TAILQ_EMPTY(&qpair->outstanding_tr); + again: switch (qpair->recovery_state) { case RECOVERY_NONE: - if (idle) - break; + /* + * Check to see if we need to timeout any commands. If we do, then + * we also enter a recovery phase. + */ now = getsbinuptime(); - idle = true; + expired = false; TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) { if (tr->deadline == SBT_MAX) continue; idle = false; if (now > tr->deadline) { - /* - * We're now passed our earliest deadline. We - * need to do expensive things to cope, but next - * time. Flag that and close the door to any - * further processing. - */ - qpair->recovery_state = RECOVERY_START; - nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n", - (uintmax_t)now, (uintmax_t)tr->deadline); - break; + expired = true; + nvme_ctrlr_cmd_abort(ctrlr, tr->cid, qpair->id, + nvme_abort_complete, tr); } } - break; + if (!expired) + break; + + /* + * We're now passed our earliest deadline. We need to do + * expensive things to cope, but next time. Flag that + * and close the door to any further processing. + */ + qpair->recovery_state = RECOVERY_START; + nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n", + (uintmax_t)now, (uintmax_t)tr->deadline); + /* FALLTHROUGH */ case RECOVERY_START: /* * Read csts to get value of cfs - controller fatal status. From nobody Thu Sep 28 21:10:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxR2c6z8qz4vby0; Thu, 28 Sep 2023 21:10: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 4RxR2c6M0bz3Dcr; Thu, 28 Sep 2023 21:10:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SxzX6fqMTVBXoqryaGTme2AwifjJ7kwKXs958uok2cU=; b=iBzD2lrw8Uqf6zmYkPrl2qobTNUFUFN7cpRrKjdv4Ldr+dxNqlZbxHiLdWCXDc+Lcpm4Lx TAr+uGklGGvDVdYGTPJ5yB7uUDf9V/aBH18jXLWRE1yDLdkYOPR3/xkimcL3cD7XSg1flX /XVpQyuzS9LS+KVAFOX2+HTGtRhJ7GtSDnIiT1UxnnhyaRbpWPVBoearXM/zhqiS7fNJna Ey4BijDn9t7+hH/wT7y6aZn23L9LpaCjLlpQrRgelwjo52BwLkiVEx7XZdc1V9qRSsk/IZ AW2kjN05MXdvR5dU55eM3PMhe5cHTJgEmKqBMEhR6nhHgjTDeDxhhzXschUM6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935416; a=rsa-sha256; cv=none; b=t3D49axNYPH8C0K9WITwUBuAArJNFNxL7IkpB1Pyp+Ch1LST5gPqPOoG7HdM7Sfm+VKnFm 76i5gE5CCPp+4ZPFEqF7zX4EZmCIKbWbGeYbi6VqaWDzDQ6mDL2lEsNX9mvZu34rWHnQT7 VubzbnV7lsWw3rwy6ZmcyXMXbgjIjLer0ztXZru/QUHsvsVNEOi/GRJEsQfOFx4vgeWBfh //JBDKvH0jgOXvC0+vWPKwATnNVVL0Pz7ZoYMBub9093SuMfZvIZYSMSeVkeRwA4iudq6C JHP9EpIoo50l1uFsjTYFIW+4EpQfnBTDOq9MFUgTcDIFeUIHOP//wDMvNjf/Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SxzX6fqMTVBXoqryaGTme2AwifjJ7kwKXs958uok2cU=; b=ICQG6OgbV0I7PzQxHyTGNd56pRhr8AOHAAms3lCU122VRtIXMuvb4cliXoqqp2SCeLBJe9 kM0XcL/w2P8e9LrMu2wMtwpEXNrRjN9xUhya2EfdCwnGeJgX95103ytAcFh0TL9WqPcb8I T1831Aw5Too611YCHpm0INvSr20qjp02duJPu5AQbgvaZtw4AduWtU/ZNClXRiINFCZiQO Ofwr85xrBGhzV1i50I6PqVaQLqMeTw7ymqM3vgKMaeLuyyoMo4xYCOJ2Qk89A3iEZJ80y+ S2Mr4j2Jf5dqS28Shmk7NQjMxwyity2JjL4py3KTaMyZZ9+71QHmUpVWZQpfQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxR2c5BjVzcnY; Thu, 28 Sep 2023 21:10:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLAGED047895; Thu, 28 Sep 2023 21:10:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLAGvG047887; Thu, 28 Sep 2023 21:10:16 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:10:16 GMT Message-Id: <202309282110.38SLAGvG047887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 5d627e0669c5 - stable/14 - nvme: Greatly improve error recovery List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d627e0669c5f047580b6f71d9f042afc68307d0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d627e0669c5f047580b6f71d9f042afc68307d0 commit 5d627e0669c5f047580b6f71d9f042afc68307d0 Author: Warner Losh AuthorDate: 2023-09-28 20:45:50 +0000 Commit: Warner Losh CommitDate: 2023-09-28 21:05:14 +0000 nvme: Greatly improve error recovery Next phase of error recovery: Eliminate the REOVERY_START phase, since we don't need to wait to start recovery. Eliminate the RECOVERY_RESET phase since it is transient, we now transition from RECOVERY_NORMAL into RECOVERY_WAITING. In normal mode, read the status of the controller. If it is in failed state, or appears to be hot-plugged, jump directly to reset which will sort out the proper things to do. This will cause all pending I/O to complete with an abort status before the reset. When in the NORMAL state, call the interrupt handler. This will complete all pending transactions when interrupts are broken or temporarily misbehaving. We then check all the pending completions for timeouts. If we have abort enabled, then we'll send an abort. Otherwise we'll assume the controller is wedged and needs a reset. By calling the interrupt handler here, we'll avoid an issue with the current code where we transitioned to RECOVERY_START which prevented any completions from happening. Now completions happen. In addition and follow-on I/O that is scheduled in the completion routines will be submitted, rather than queued, because the recovery state is correct. This also fixes a problem where I/O would timeout, but never complete, leading to hung I/O. Resetting remains the same as before, just when we chose to reset has changed. A nice side effect of these changes is that we now do I/O when interrupts to the card are totally broken. Followon commits will improve the error reporting and logging when this happens. Performance will be aweful, but will at least be minimally functional. There is a small race when we're checking the completions if interrupts are working, but this is handled in a future commit. Sponsored by: Netflix MFC After: 2 weeks Differential Revision: https://reviews.freebsd.org/D36922 (cherry picked from commit d4959bfcd110ea471222c7dd87775ba1f4e3d1d9) --- sys/dev/nvme/nvme_private.h | 2 - sys/dev/nvme/nvme_qpair.c | 114 +++++++++++++++++++++++++------------------- 2 files changed, 66 insertions(+), 50 deletions(-) diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index dc69012cfd71..e4b319b9d8b7 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -149,8 +149,6 @@ struct nvme_tracker { enum nvme_recovery { RECOVERY_NONE = 0, /* Normal operations */ - RECOVERY_START, /* Deadline has passed, start recovering */ - RECOVERY_RESET, /* This pass, initiate reset of controller */ RECOVERY_WAITING, /* waiting for the reset to complete */ }; struct nvme_qpair { diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 0ad0b7cbe17f..6d34c7ddba2d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -976,88 +976,106 @@ nvme_qpair_timeout(void *arg) struct nvme_tracker *tr; sbintime_t now; bool idle; - bool expired; + bool needs_reset; uint32_t csts; uint8_t cfs; + mtx_lock(&qpair->lock); idle = TAILQ_EMPTY(&qpair->outstanding_tr); -again: switch (qpair->recovery_state) { case RECOVERY_NONE: + /* + * Read csts to get value of cfs - controller fatal status. If + * we are in the hot-plug or controller failed status proceed + * directly to reset. We also bail early if the status reads all + * 1's or the control fatal status bit is now 1. The latter is + * always true when the former is true, but not vice versa. The + * intent of the code is that if the card is gone (all 1's) or + * we've failed, then try to do a reset (which someitmes + * unwedges a card reading all 1's that's not gone away, but + * usually doesn't). + */ + csts = nvme_mmio_read_4(ctrlr, csts); + cfs = (csts >> NVME_CSTS_REG_CFS_SHIFT) & NVME_CSTS_REG_CFS_MASK; + if (csts == NVME_GONE || cfs == 1) + goto do_reset; + + /* + * Next, check to see if we have any completions. If we do, + * we've likely missed an interrupt, but the card is otherwise + * fine. This will also catch all the commands that are about + * to timeout (but there's still a tiny race). Since the timeout + * is long relative to the race between here and the check below, + * this is still a win. + */ + mtx_unlock(&qpair->lock); + nvme_qpair_process_completions(qpair); + mtx_lock(&qpair->lock); + if (qpair->recovery_state != RECOVERY_NONE) { + /* + * Somebody else adjusted recovery state while unlocked, + * we should bail. Unlock the qpair and return without + * doing anything else. + */ + mtx_unlock(&qpair->lock); + return; + } + /* * Check to see if we need to timeout any commands. If we do, then * we also enter a recovery phase. */ now = getsbinuptime(); - expired = false; + needs_reset = false; TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) { if (tr->deadline == SBT_MAX) continue; - idle = false; if (now > tr->deadline) { - expired = true; - nvme_ctrlr_cmd_abort(ctrlr, tr->cid, qpair->id, - nvme_abort_complete, tr); + if (tr->req->cb_fn != nvme_abort_complete && + ctrlr->enable_aborts) { + /* + * This isn't an abort command, ask + * for a hardware abort. + */ + nvme_ctrlr_cmd_abort(ctrlr, tr->cid, + qpair->id, nvme_abort_complete, tr); + } else { + /* + * Otherwise we have a live command in + * the card (either one we couldn't + * abort, or aborts weren't enabled). + * The only safe way to proceed is to do + * a reset. + */ + needs_reset = true; + } + } else { + idle = false; } } - if (!expired) + if (!needs_reset) break; /* - * We're now passed our earliest deadline. We need to do - * expensive things to cope, but next time. Flag that - * and close the door to any further processing. - */ - qpair->recovery_state = RECOVERY_START; - nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n", - (uintmax_t)now, (uintmax_t)tr->deadline); - /* FALLTHROUGH */ - case RECOVERY_START: - /* - * Read csts to get value of cfs - controller fatal status. - * If no fatal status, try to call the completion routine, and - * if completes transactions, report a missed interrupt and - * return (this may need to be rate limited). Otherwise, if - * aborts are enabled and the controller is not reporting - * fatal status, abort the command. Otherwise, just reset the - * controller and hope for the best. - */ - csts = nvme_mmio_read_4(ctrlr, csts); - cfs = (csts >> NVME_CSTS_REG_CFS_SHIFT) & NVME_CSTS_REG_CFS_MASK; - if (cfs) { - nvme_printf(ctrlr, "Controller in fatal status, resetting\n"); - qpair->recovery_state = RECOVERY_RESET; - goto again; - } - mtx_unlock(&qpair->lock); - if (nvme_qpair_process_completions(qpair)) { - nvme_printf(ctrlr, "Completions present in output without an interrupt\n"); - qpair->recovery_state = RECOVERY_NONE; - } else { - nvme_printf(ctrlr, "timeout with nothing complete, resetting\n"); - qpair->recovery_state = RECOVERY_RESET; - mtx_lock(&qpair->lock); - goto again; - } - mtx_lock(&qpair->lock); - break; - case RECOVERY_RESET: - /* + * We've had a command timeout that we weren't able to abort + * * If we get here due to a possible surprise hot-unplug event, * then we let nvme_ctrlr_reset confirm and fail the * controller. */ + do_reset: nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n", (csts == 0xffffffff) ? " and possible hot unplug" : (cfs ? " and fatal error status" : "")); nvme_printf(ctrlr, "RECOVERY_WAITING\n"); qpair->recovery_state = RECOVERY_WAITING; nvme_ctrlr_reset(ctrlr); + idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "waiting\n"); + nvme_printf(ctrlr, "waiting for reset to complete\n"); break; } From nobody Thu Sep 28 21:10:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxR2d6pFsz4vbqh; Thu, 28 Sep 2023 21:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxR2d6V3zz3F03; Thu, 28 Sep 2023 21:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c8MGYSefcrfIwAJHYvoQG/AW9Ue0iyZTko1JGmJzwGY=; b=L8pxZ1P33TK/mgMW3MWWbtR9mMGkqa0EbhIdVVYeWIpgf1rw6hwrHPY+CxsT66yADwaen7 TMXr6YxpRTUxPm/ZBjrr/i6uLgMrVJRcQ4CjSN46EdvdDwO+r765vVjvs7R2ZCw3lsi2hH W+gbBxV5L/9OoaeDLv6yJsFd0HOHKQNXrP4LDhAm7ThdiRieqxxHY0irD4RyfAIoWWsDC8 dvKR15GYtLYGeV2EKoT1YNLFXiG1FDiBX6Fjf63yYde7ZT8rIuLC6NYIIOygtspbq5zeYU I7M2NnUIejtY7eXhCEy9IjZdLVh72bc0HYUpi8yycYOpnNsrkxTMLGDJCcoK2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935417; a=rsa-sha256; cv=none; b=bXQ8Wc6YKqNWCtfaNlFI40nXU6062L1MqMCW0rmANbJepG8WHeaYFyzc2TWY3B4Elr5SxX ttfPTV8pXoxNOIYDFmgJ+ZZJ+XiMmkLjslnPs8hXyM1oghQfP5amd73YWSeznB2rDDM2nj zKaYjWGhSCeWt0/C6hKNn49nRIEaFnCMn6Lq1OqXhQx4JG94U5G4YisfrnOT52Qdh9S6Db 1ULFuEsYZnIfKoejK04Gr6spVWYVfU6QodHPknFPfb7+wRROvOHyDYtyzJwW9/2jpqgoxu Wtxj62kEnrceYb2iBofyPkbVp1dBASAxfIrPrKbw0oFxGp5A15P03scRp0jhHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c8MGYSefcrfIwAJHYvoQG/AW9Ue0iyZTko1JGmJzwGY=; b=hnP9sIURHAGipqeOmp381xbz8BueAV3Ln2RmLiiziJbq4+iv5xgF7c3vMcr1ZWp8t9bNNi e3URLEHtTovJPun90bRYLvuyCjrhYn1+LDo0vSFbrjK/e+6bLr7+WKiOO/I8dzZVnoFBZ3 gduqfVEEw70HiAZbvHpWnse3GmrIszINE8JG8gxZxk+3FzOEvcJXub3670zxBWE0YPN24b 4QTocxbryWUauWqj0K6CbpQcNOd8Dmyhdww82ypeCVX+W4DRcMWr6rPOEvlBH5KdOdCBQ5 bScknoYJOyRUZAr6KfTTimZHcIO3dg0QahwkU1vM/q0735sM/WyQYqf+JOzvfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxR2d5bZzzdGv; Thu, 28 Sep 2023 21:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLAHWS048509; Thu, 28 Sep 2023 21:10:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLAHdN048497; Thu, 28 Sep 2023 21:10:17 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:10:17 GMT Message-Id: <202309282110.38SLAHdN048497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: c7cb2dcdf2ab - stable/14 - nvme: Add exclusion for ISR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c7cb2dcdf2abe6c382628c80fe99f11236829cfb Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c7cb2dcdf2abe6c382628c80fe99f11236829cfb commit c7cb2dcdf2abe6c382628c80fe99f11236829cfb Author: Warner Losh AuthorDate: 2023-09-28 20:46:00 +0000 Commit: Warner Losh CommitDate: 2023-09-28 21:05:14 +0000 nvme: Add exclusion for ISR Add a basically uncontended spinlock that we take out while the ISR is running. This has two effects: First, when we get a timeout, we can safely call the nvme_qpair_process_completions w/o racing any ISRs. Second, we can use it to ensure that we don't reset the card while the ISRs are active (right now we just sleep and hope for the best, which usually is fine, but not always). Sponsored by: Netflix MFC After: 2 weeks Reviewed by: chuck, gallatin Differential Revision: https://reviews.freebsd.org/D41452 (cherry picked from commit 8052b01e7e4113fa8296ce43c354116b0a1774b7) --- sys/dev/nvme/nvme_ctrlr.c | 51 ++++++++++++++++---- sys/dev/nvme/nvme_private.h | 10 ++-- sys/dev/nvme/nvme_qpair.c | 115 ++++++++++++++++++++++++++++++-------------- sys/dev/nvme/nvme_sysctl.c | 24 +++++++++ 4 files changed, 148 insertions(+), 52 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 7a2ecffe81d4..c4a750901743 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -416,6 +416,34 @@ nvme_ctrlr_disable_qpairs(struct nvme_controller *ctrlr) } } +static void +nvme_pre_reset(struct nvme_controller *ctrlr) +{ + /* + * Make sure that all the ISRs are done before proceeding with the reset + * (and also keep any stray interrupts that happen during this process + * from racing this process). For startup, this is a nop, since the + * hardware is in a good state. But for recovery, where we randomly + * reset the hardware, this ensure that we're not racing the ISRs. + */ + mtx_lock(&ctrlr->adminq.recovery); + for (int i = 0; i < ctrlr->num_io_queues; i++) { + mtx_lock(&ctrlr->ioq[i].recovery); + } +} + +static void +nvme_post_reset(struct nvme_controller *ctrlr) +{ + /* + * Reset complete, unblock ISRs + */ + mtx_unlock(&ctrlr->adminq.recovery); + for (int i = 0; i < ctrlr->num_io_queues; i++) { + mtx_unlock(&ctrlr->ioq[i].recovery); + } +} + static int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { @@ -427,9 +455,11 @@ nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) err = nvme_ctrlr_disable(ctrlr); if (err != 0) - return err; + goto out; err = nvme_ctrlr_enable(ctrlr); +out: + TSEXIT(); return (err); } @@ -1157,6 +1187,11 @@ nvme_ctrlr_start_config_hook(void *arg) TSENTER(); + /* + * Don't call pre/post reset here. We've not yet created the qpairs, + * haven't setup the ISRs, so there's no need to 'drain' them or + * 'exclude' them. + */ if (nvme_ctrlr_hw_reset(ctrlr) != 0) { fail: nvme_ctrlr_fail(ctrlr); @@ -1201,16 +1236,9 @@ nvme_ctrlr_reset_task(void *arg, int pending) int status; nvme_ctrlr_devctl_log(ctrlr, "RESET", "resetting controller"); + nvme_pre_reset(ctrlr); status = nvme_ctrlr_hw_reset(ctrlr); - /* - * Use pause instead of DELAY, so that we yield to any nvme interrupt - * handlers on this CPU that were blocked on a qpair lock. We want - * all nvme interrupts completed before proceeding with restarting the - * controller. - * - * XXX - any way to guarantee the interrupt handlers have quiesced? - */ - pause("nvmereset", hz / 10); + nvme_post_reset(ctrlr); if (status == 0) nvme_ctrlr_start(ctrlr, true); else @@ -1697,6 +1725,7 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (ctrlr->is_failed) return (0); + nvme_pre_reset(ctrlr); if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; #ifdef NVME_2X_RESET @@ -1708,6 +1737,7 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; #endif + nvme_post_reset(ctrlr); /* * Now that we've reset the hardware, we can restart the controller. Any @@ -1724,6 +1754,7 @@ fail: * the controller. However, we have to return success for the resume * itself, due to questionable APIs. */ + nvme_post_reset(ctrlr); nvme_printf(ctrlr, "Failed to reset on resume, failing.\n"); nvme_ctrlr_fail(ctrlr); (void)atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index e4b319b9d8b7..a6239f30f3bf 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -162,10 +162,9 @@ struct nvme_qpair { struct resource *res; void *tag; - struct callout timer; - sbintime_t deadline; - bool timer_armed; - enum nvme_recovery recovery_state; + struct callout timer; /* recovery lock */ + bool timer_armed; /* recovery lock */ + enum nvme_recovery recovery_state; /* recovery lock */ uint32_t num_entries; uint32_t num_trackers; @@ -182,6 +181,7 @@ struct nvme_qpair { int64_t num_retries; int64_t num_failures; int64_t num_ignored; + int64_t num_recovery_nolock; struct nvme_command *cmd; struct nvme_completion *cpl; @@ -200,7 +200,7 @@ struct nvme_qpair { struct nvme_tracker **act_tr; struct mtx_padalign lock; - + struct mtx_padalign recovery; } __aligned(CACHE_LINE_SIZE); struct nvme_namespace { diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 6d34c7ddba2d..b256c4713c8d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -528,14 +528,17 @@ nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, nvme_free_request(req); } -bool -nvme_qpair_process_completions(struct nvme_qpair *qpair) +/* Locked version of completion processor */ +static bool +_nvme_qpair_process_completions(struct nvme_qpair *qpair) { struct nvme_tracker *tr; struct nvme_completion cpl; - int done = 0; + bool done = false; bool in_panic = dumping || SCHEDULER_STOPPED(); + mtx_assert(&qpair->recovery, MA_OWNED); + /* * qpair is not enabled, likely because a controller reset is in * progress. Ignore the interrupt - any I/O that was associated with @@ -629,7 +632,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair) else tr = NULL; - done++; + done = true; if (tr != NULL) { nvme_qpair_complete_tracker(tr, &cpl, ERROR_PRINT_ALL); qpair->sq_head = cpl.sqhd; @@ -666,12 +669,35 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair) } } - if (done != 0) { + if (done) { bus_space_write_4(qpair->ctrlr->bus_tag, qpair->ctrlr->bus_handle, qpair->cq_hdbl_off, qpair->cq_head); } - return (done != 0); + return (done); +} + +bool +nvme_qpair_process_completions(struct nvme_qpair *qpair) +{ + bool done; + + /* + * Interlock with reset / recovery code. This is an usually uncontended + * to make sure that we drain out of the ISRs before we reset the card + * and to prevent races with the recovery process called from a timeout + * context. + */ + if (!mtx_trylock(&qpair->recovery)) { + qpair->num_recovery_nolock++; + return (false); + } + + done = _nvme_qpair_process_completions(qpair); + + mtx_unlock(&qpair->recovery); + + return (done); } static void @@ -699,6 +725,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, qpair->ctrlr = ctrlr; mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); + mtx_init(&qpair->recovery, "nvme qpair recovery", NULL, MTX_DEF); /* Note: NVMe PRP format is restricted to 4-byte alignment. */ err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), @@ -765,7 +792,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, qpair->cpl_bus_addr = queuemem_phys + cmdsz; prpmem_phys = queuemem_phys + cmdsz + cplsz; - callout_init(&qpair->timer, 1); + callout_init_mtx(&qpair->timer, &qpair->recovery, 0); qpair->timer_armed = false; qpair->recovery_state = RECOVERY_WAITING; @@ -903,6 +930,8 @@ nvme_qpair_destroy(struct nvme_qpair *qpair) if (mtx_initialized(&qpair->lock)) mtx_destroy(&qpair->lock); + if (mtx_initialized(&qpair->recovery)) + mtx_destroy(&qpair->recovery); if (qpair->res) { bus_release_resource(qpair->ctrlr->dev, SYS_RES_IRQ, @@ -975,14 +1004,12 @@ nvme_qpair_timeout(void *arg) struct nvme_controller *ctrlr = qpair->ctrlr; struct nvme_tracker *tr; sbintime_t now; - bool idle; + bool idle = false; bool needs_reset; uint32_t csts; uint8_t cfs; - - mtx_lock(&qpair->lock); - idle = TAILQ_EMPTY(&qpair->outstanding_tr); + mtx_assert(&qpair->recovery, MA_OWNED); switch (qpair->recovery_state) { case RECOVERY_NONE: @@ -1003,25 +1030,10 @@ nvme_qpair_timeout(void *arg) goto do_reset; /* - * Next, check to see if we have any completions. If we do, - * we've likely missed an interrupt, but the card is otherwise - * fine. This will also catch all the commands that are about - * to timeout (but there's still a tiny race). Since the timeout - * is long relative to the race between here and the check below, - * this is still a win. + * Process completions. We already have the recovery lock, so + * call the locked version. */ - mtx_unlock(&qpair->lock); - nvme_qpair_process_completions(qpair); - mtx_lock(&qpair->lock); - if (qpair->recovery_state != RECOVERY_NONE) { - /* - * Somebody else adjusted recovery state while unlocked, - * we should bail. Unlock the qpair and return without - * doing anything else. - */ - mtx_unlock(&qpair->lock); - return; - } + _nvme_qpair_process_completions(qpair); /* * Check to see if we need to timeout any commands. If we do, then @@ -1029,7 +1041,13 @@ nvme_qpair_timeout(void *arg) */ now = getsbinuptime(); needs_reset = false; + idle = true; + mtx_lock(&qpair->lock); TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) { + /* + * Skip async commands, they are posted to the card for + * an indefinite amount of time and have no deadline. + */ if (tr->deadline == SBT_MAX) continue; if (now > tr->deadline) { @@ -1055,6 +1073,7 @@ nvme_qpair_timeout(void *arg) idle = false; } } + mtx_unlock(&qpair->lock); if (!needs_reset) break; @@ -1076,6 +1095,7 @@ nvme_qpair_timeout(void *arg) break; case RECOVERY_WAITING: nvme_printf(ctrlr, "waiting for reset to complete\n"); + idle = false; /* We want to keep polling */ break; } @@ -1087,7 +1107,6 @@ nvme_qpair_timeout(void *arg) } else { qpair->timer_armed = false; } - mtx_unlock(&qpair->lock); } /* @@ -1196,9 +1215,12 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) if (tr == NULL || qpair->recovery_state != RECOVERY_NONE) { /* - * No tracker is available, or the qpair is disabled due to - * an in-progress controller-level reset or controller - * failure. + * No tracker is available, or the qpair is disabled due to an + * in-progress controller-level reset or controller failure. If + * we lose the race with recovery_state, then we may add an + * extra request to the queue which will be resubmitted later. + * We only set recovery_state to NONE with qpair->lock also + * held. */ if (qpair->ctrlr->is_failed) { @@ -1260,7 +1282,10 @@ nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) static void nvme_qpair_enable(struct nvme_qpair *qpair) { - mtx_assert(&qpair->lock, MA_OWNED); + if (mtx_initialized(&qpair->recovery)) + mtx_assert(&qpair->recovery, MA_OWNED); + if (mtx_initialized(&qpair->lock)) + mtx_assert(&qpair->lock, MA_OWNED); qpair->recovery_state = RECOVERY_NONE; } @@ -1311,9 +1336,11 @@ nvme_admin_qpair_enable(struct nvme_qpair *qpair) nvme_printf(qpair->ctrlr, "done aborting outstanding admin\n"); + mtx_lock(&qpair->recovery); mtx_lock(&qpair->lock); nvme_qpair_enable(qpair); mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } void @@ -1340,8 +1367,8 @@ nvme_io_qpair_enable(struct nvme_qpair *qpair) if (report) nvme_printf(qpair->ctrlr, "done aborting outstanding i/o\n"); + mtx_lock(&qpair->recovery); mtx_lock(&qpair->lock); - nvme_qpair_enable(qpair); STAILQ_INIT(&temp); @@ -1360,6 +1387,7 @@ nvme_io_qpair_enable(struct nvme_qpair *qpair) nvme_printf(qpair->ctrlr, "done resubmitting i/o\n"); mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } static void @@ -1367,27 +1395,40 @@ nvme_qpair_disable(struct nvme_qpair *qpair) { struct nvme_tracker *tr, *tr_temp; - mtx_lock(&qpair->lock); + if (mtx_initialized(&qpair->recovery)) + mtx_assert(&qpair->recovery, MA_OWNED); + if (mtx_initialized(&qpair->lock)) + mtx_assert(&qpair->lock, MA_OWNED); + qpair->recovery_state = RECOVERY_WAITING; TAILQ_FOREACH_SAFE(tr, &qpair->outstanding_tr, tailq, tr_temp) { tr->deadline = SBT_MAX; } - mtx_unlock(&qpair->lock); } void nvme_admin_qpair_disable(struct nvme_qpair *qpair) { + mtx_lock(&qpair->recovery); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); nvme_admin_qpair_abort_aers(qpair); + + mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } void nvme_io_qpair_disable(struct nvme_qpair *qpair) { + mtx_lock(&qpair->recovery); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); + + mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } void diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index a1a8a968eebe..ac0d507e2337 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -163,6 +163,7 @@ nvme_qpair_reset_stats(struct nvme_qpair *qpair) qpair->num_retries = 0; qpair->num_failures = 0; qpair->num_ignored = 0; + qpair->num_recovery_nolock = 0; } static int @@ -240,6 +241,21 @@ nvme_sysctl_num_ignored(SYSCTL_HANDLER_ARGS) return (sysctl_handle_64(oidp, &num_ignored, 0, req)); } +static int +nvme_sysctl_num_recovery_nolock(SYSCTL_HANDLER_ARGS) +{ + struct nvme_controller *ctrlr = arg1; + int64_t num; + int i; + + num = ctrlr->adminq.num_recovery_nolock; + + for (i = 0; i < ctrlr->num_io_queues; i++) + num += ctrlr->ioq[i].num_recovery_nolock; + + return (sysctl_handle_64(oidp, &num, 0, req)); +} + static int nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS) { @@ -298,6 +314,9 @@ nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_ignored", CTLFLAG_RD, &qpair->num_ignored, "Number of interrupts posted, but were administratively ignored"); + SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_recovery_nolock", + CTLFLAG_RD, &qpair->num_recovery_nolock, + "Number of times that we failed to lock recovery in the ISR"); SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO, "dump_debug", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, @@ -366,6 +385,11 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) ctrlr, 0, nvme_sysctl_num_ignored, "IU", "Number of interrupts ignored administratively"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "num_recovery_nolock", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE, + ctrlr, 0, nvme_sysctl_num_recovery_nolock, "IU", + "Number of times that we failed to lock recovery in the ISR"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "reset_stats", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, ctrlr, 0, nvme_sysctl_reset_stats, "IU", "Reset statistics to zero"); From nobody Thu Sep 28 21:10:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxR2g0h7fz4vbkR; Thu, 28 Sep 2023 21:10: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 4RxR2g0FVRz3F9d; Thu, 28 Sep 2023 21:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fy9aIVbM4R9RzEsRjZb58cfEpVzcBrCw1+4B59foARs=; b=hCdvJ0ta+t9Alo2Q/kr8Cm2T/8IK7aUmFKt0Q+4vf2Is3RotqeisU/uTCV9/23xS4ch4J/ 2nGmpi2zUifD5ODfh3DU83FSU0wTaSWNof3e3Qw8hJwV9ZVTANnnPN+RZ5EHx1tSKW9Vu+ MVfzza5b8W0JAIXkSZqxbAjqfB1kqotPjNWvrBidzRNmxl52fpOPzJ3a0xOJxqk6vaFQOG wTlaSXYHVROezYaUI+gb/XgRVr/uF0tWAJPSOlMLq7lbkvGJZGU0k7bPtafk0OCmYr8r7m 3dVnhxYMd4df0VLv/t5S107F2E1AO0ANPYivwEE2VGgic/5e9Ka3tw2GyG3jIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935419; a=rsa-sha256; cv=none; b=gxk0oiSZhiL5xNEZ7DQvTNN4ZzWQSt42fe4aYVAPZtXLO92R6kVZeacTGYb9pQI1if0VHG ZfcfZLAbWmtIF3c9eMtUbTUnyre6ptHj0iieR0m8eRw3p4WZYqHCv4KNByWXNHW7bxERPY LLyw2NT6mdAPI3PTwAPCKI4wm+jTaIGwcJmx5gQXDEAnV8tjaWYzFZVLDdFitVfT5jbuJI /qsMzOddV8fwLthzBke5+HHDSQewJTD5Y3hfvnH5XxRcVgogIgNtNZuCcLeyEuIG5a0QOQ ThU+GByCU1IBShqYQOcUnT9UtSWNeeXE7YavF23MmLiO070ABNmFqpvgWFp6/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fy9aIVbM4R9RzEsRjZb58cfEpVzcBrCw1+4B59foARs=; b=fHdB30QN7xWZ53ijjako52sCISeYlUr8Kciuvt1sMd2yVK6Cq/D1wo1XIQnVB8Pm5BXWsd smwWIgl8LJfRpBn+Lb+5eXmuUGXlSLtGEzzTTNutqYpsENMP2BPjxlrvaGgiWeWY46KyNc MUJdqS8IintNo08+VD9gnoJ0wnz5B6uY/wUQLWm+g4tCkPmCSNxZ1f5YYukCfSSOQ4pMxq YxwxxcXz7NkOlPIkZgDBoRQCjsDbwoww/B9im1p2QBzj/bZj2kpFAE/VEcnWB/Ebjd2/MG dwFfT56CeTq0K0Rv79XiwuYXwRdxVH5OI9NIx9ex/MIcpxsaWlURcUq0pp2vsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxR2f6HMGzdGw; Thu, 28 Sep 2023 21:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLAIvH048659; Thu, 28 Sep 2023 21:10:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLAI6Z048656; Thu, 28 Sep 2023 21:10:18 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:10:18 GMT Message-Id: <202309282110.38SLAI6Z048656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 5e9b7d0e0e0b - stable/14 - nvme: Give up when we've failed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5e9b7d0e0e0bd4cba29de33569ab0ca86763f635 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e9b7d0e0e0bd4cba29de33569ab0ca86763f635 commit 5e9b7d0e0e0bd4cba29de33569ab0ca86763f635 Author: Warner Losh AuthorDate: 2023-09-28 20:46:00 +0000 Commit: Warner Losh CommitDate: 2023-09-28 21:05:14 +0000 nvme: Give up when we've failed Normally, we poll the device every so often to see if commands have timed out. However, we'll go into the recovery state as part of failing the drive. To account for all possibilties, if we're failed when we get into the polling function, just stop polling: Party is over. Sponsored by: Netflix (cherry picked from commit d95431624f934fe4740211738fc787808005b14e) --- sys/dev/nvme/nvme_qpair.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index b256c4713c8d..4e37aa0e1020 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1011,6 +1011,17 @@ nvme_qpair_timeout(void *arg) mtx_assert(&qpair->recovery, MA_OWNED); + /* + * If the controller has failed, give up. We're never going to change + * state from a failed controller: no further transactions are possible. + * We go ahead and let the timeout expire in many cases for simplicity. + */ + if (qpair->ctrlr->is_failed) { + nvme_printf(ctrlr, "Controller failed, giving up\n"); + qpair->timer_armed = false; + return; + } + switch (qpair->recovery_state) { case RECOVERY_NONE: /* @@ -1094,8 +1105,8 @@ nvme_qpair_timeout(void *arg) idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "waiting for reset to complete\n"); - idle = false; /* We want to keep polling */ + nvme_printf(ctrlr, "Waiting for reset to complete\n"); + idle = false; /* We want to keep polling */ break; } From nobody Thu Sep 28 21:10:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxR2h1cGdz4vbVp; Thu, 28 Sep 2023 21:10: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 4RxR2h19wlz3FB3; Thu, 28 Sep 2023 21:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q++YuaFTsFaQ3elVo9vtx0pxkMOX5ebfMye9rHujY4s=; b=Ai3iJipU1KQkxQBJefwlaiG6dWTY9GHk0EsEuDNWXTB1F3wkA5czovAbUAQ+l95BUjHPae 6O0U0Il90Cy6fOz9TmtriNTKZhnjdsDz1aw3kyACjEDkEZNd/AWDH98Frm8Zbpc0lRRai+ 5BFH/GBt4Y1bSdrbbhtSIXgcDSKz3wLYwtWSDC5Qy7H5sxmNxyaxhS+CYOgpcn5MZo3oib NNS1h7nqevAOOhT6op5E7M8vIh9qI5zmmDrqxGl5fjimObif5EDYAchNoGJn14x5YTJXro yYBVjuBoJr8k3wcGfrq7timLGogl8TCQBoVJw7YvxGWgxfIFjyluDKUmBXZxXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935420; a=rsa-sha256; cv=none; b=RqbYrDzKtviJdnfgyZtCONGrU5MEtI0gzpLKEq5cUD13EwWvXIsk9Uzud5ghb/Viz99OEg tiiQER1I8AMW/YwQxUrsjCyPZe8WejUheWjJF6h2XkTlOdbH7NzMJXmXAWrDh+XvPc370j m5eW0yF32R99Bt1jJOQgLbtndtboSPwjdvTKCwTxERBZ8TI7s0ULT0p5AKZqBxHs8Uwcpr 2b9j722q+rjVSAdg32w+kMbERBdUy9UT7fxR5sT/adVhy9Mq6dJn/h3IF83E1/WrJYohO3 66vOQteMnpo5lRHE51jexjR/szeY8wfXkVz4AXUGNMb61geJyrCm40AWHBWJAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q++YuaFTsFaQ3elVo9vtx0pxkMOX5ebfMye9rHujY4s=; b=ejTYGo0c5DIwQV9amJQ38VzZQiyneM9BHhvl4Q3YpHudUktucBvYMEQLA/TSzmXymRM28d iEpS8P7/lz+AmN9ABLLIzDZQ9UYx0mxPi/12XMvKuXzTnhPCr+2g5qRj+PK/JAp/3fk0Zt ZV9/mdPlc3UlIapJQ8zT3K2TN5YAhcjCwWpLAoieGZkxXDHfrQurDNyvIdwwAZd6vlUAq3 HkTRZCFcw7++W7rem92L5uNkAoMFRIwIIKxJE1zpUzjMm3pLBfldGRiJnqnf9I19ltcy5M 7/TotYWOEyhPzc9Ng4uIfP6Fipp3T/bYZa8yRE/ltcIeWFmgQMdiS2so1EjW+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 4RxR2h0FhBzdJq; Thu, 28 Sep 2023 21:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLAJWs048716; Thu, 28 Sep 2023 21:10:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLAJCX048713; Thu, 28 Sep 2023 21:10:19 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:10:19 GMT Message-Id: <202309282110.38SLAJCX048713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 81b118e842f1 - stable/14 - nvme: Fix locking protocol violation to fix suspend / resume List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 81b118e842f16ff5e1132212f966e23cb0f8e316 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=81b118e842f16ff5e1132212f966e23cb0f8e316 commit 81b118e842f16ff5e1132212f966e23cb0f8e316 Author: Warner Losh AuthorDate: 2023-09-28 20:46:01 +0000 Commit: Warner Losh CommitDate: 2023-09-28 21:05:15 +0000 nvme: Fix locking protocol violation to fix suspend / resume Currently, when we suspend, we need to tear down all the qpairs. We call nvme_admin_qpair_abort_aers with the admin qpair lock held, but the tracker it will call for the pending AER also locks it (recursively) hitting an assert. This routine is called without the qpair lock held when we destroy the device entirely in a number of places. Add an assert to this effect and drop the qpair lock before calling it. nvme_admin_qpair_abort_aers then locks the qpair lock to traverse the list, dropping it around calls to nvme_qpair_complete_tracker, and restarting the list scan after picking it back up. Note: If interrupts are still running, there's a tiny window for these AERs: If one fires just an instant after we manually complete it, then we'll be fine: we set the state of the queue to 'waiting' and we ignore interrupts while 'waiting'. We know we'll destroy all the queue state with these pending interrupts before looking at them again and we know all the TRs will have been completed or rescheduled. So either way we're covered. Also, tidy up the failure case as well: failing a queue is a superset of disabling it, so no need to call disable first. This solves solves some locking issues with recursion since we don't need to recurse.. Set the qpair state of failed queues to RECOVERY_FAILED and stop scheduling the watchdog. Assert we're not failed when we're enabling a qpair, since failure currently is one-way. Make failure a little less verbose. Next, kill the pre/post reset stuff. It's completely bogus since we disable the qparis, we don't need to also hold the lock through the reset: disabling will cause the ISR to return early. This keeps us from recursing on the recovery lock when resuming. We only need the recovery lock to avoid a specific race between the timer and the ISR. Finally, kill NVME_RESET_2X. It'S been a major release since we put it in and nobody has used it as far as I can tell. And it was a motivator for the pre/post uglification. These are all interrelated, so need to be done at the same time. Sponsored by: Netflix Reviewed by: jhb Tested by: jhb (made sure suspend / resume worked) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D41866 (cherry picked from commit da8324a9258f1791cd10423103c1746646e33104) --- sys/dev/nvme/nvme_ctrlr.c | 49 +++++-------------------------------------- sys/dev/nvme/nvme_private.h | 1 + sys/dev/nvme/nvme_qpair.c | 51 ++++++++++++++++++++++++++++++++------------- 3 files changed, 42 insertions(+), 59 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index c4a750901743..30a5ee81b2a4 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -217,12 +217,15 @@ nvme_ctrlr_fail(struct nvme_controller *ctrlr) { int i; + /* + * No need to disable queues before failing them. Failing is a superet + * of disabling (though pedantically we'd abort the AERs silently with + * a different error, though when we fail, that hardly matters). + */ ctrlr->is_failed = true; - nvme_admin_qpair_disable(&ctrlr->adminq); nvme_qpair_fail(&ctrlr->adminq); if (ctrlr->ioq != NULL) { for (i = 0; i < ctrlr->num_io_queues; i++) { - nvme_io_qpair_disable(&ctrlr->ioq[i]); nvme_qpair_fail(&ctrlr->ioq[i]); } } @@ -416,34 +419,6 @@ nvme_ctrlr_disable_qpairs(struct nvme_controller *ctrlr) } } -static void -nvme_pre_reset(struct nvme_controller *ctrlr) -{ - /* - * Make sure that all the ISRs are done before proceeding with the reset - * (and also keep any stray interrupts that happen during this process - * from racing this process). For startup, this is a nop, since the - * hardware is in a good state. But for recovery, where we randomly - * reset the hardware, this ensure that we're not racing the ISRs. - */ - mtx_lock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_lock(&ctrlr->ioq[i].recovery); - } -} - -static void -nvme_post_reset(struct nvme_controller *ctrlr) -{ - /* - * Reset complete, unblock ISRs - */ - mtx_unlock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_unlock(&ctrlr->ioq[i].recovery); - } -} - static int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { @@ -1236,9 +1211,7 @@ nvme_ctrlr_reset_task(void *arg, int pending) int status; nvme_ctrlr_devctl_log(ctrlr, "RESET", "resetting controller"); - nvme_pre_reset(ctrlr); status = nvme_ctrlr_hw_reset(ctrlr); - nvme_post_reset(ctrlr); if (status == 0) nvme_ctrlr_start(ctrlr, true); else @@ -1725,19 +1698,8 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (ctrlr->is_failed) return (0); - nvme_pre_reset(ctrlr); if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; -#ifdef NVME_2X_RESET - /* - * Prior to FreeBSD 13.1, FreeBSD's nvme driver reset the hardware twice - * to get it into a known good state. However, the hardware's state is - * good and we don't need to do this for proper functioning. - */ - if (nvme_ctrlr_hw_reset(ctrlr) != 0) - goto fail; -#endif - nvme_post_reset(ctrlr); /* * Now that we've reset the hardware, we can restart the controller. Any @@ -1754,7 +1716,6 @@ fail: * the controller. However, we have to return success for the resume * itself, due to questionable APIs. */ - nvme_post_reset(ctrlr); nvme_printf(ctrlr, "Failed to reset on resume, failing.\n"); nvme_ctrlr_fail(ctrlr); (void)atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index a6239f30f3bf..496bd8229e0a 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -150,6 +150,7 @@ struct nvme_tracker { enum nvme_recovery { RECOVERY_NONE = 0, /* Normal operations */ RECOVERY_WAITING, /* waiting for the reset to complete */ + RECOVERY_FAILED, /* We have failed, no more I/O */ }; struct nvme_qpair { struct nvme_controller *ctrlr; diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 4e37aa0e1020..9806096de81d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -945,22 +945,38 @@ nvme_admin_qpair_abort_aers(struct nvme_qpair *qpair) { struct nvme_tracker *tr; + /* + * nvme_complete_tracker must be called without the qpair lock held. It + * takes the lock to adjust outstanding_tr list, so make sure we don't + * have it yet (since this is a general purpose routine). We take the + * lock to make the list traverse safe, but have to drop the lock to + * complete any AER. We restart the list scan when we do this to make + * this safe. There's interlock with the ISR so we know this tracker + * won't be completed twice. + */ + mtx_assert(&qpair->lock, MA_NOTOWNED); + + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); while (tr != NULL) { if (tr->req->cmd.opc == NVME_OPC_ASYNC_EVENT_REQUEST) { + mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0, ERROR_PRINT_NONE); + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); } else { tr = TAILQ_NEXT(tr, tailq); } } + mtx_unlock(&qpair->lock); } void nvme_admin_qpair_destroy(struct nvme_qpair *qpair) { + mtx_assert(&qpair->lock, MA_NOTOWNED); nvme_admin_qpair_abort_aers(qpair); nvme_qpair_destroy(qpair); @@ -1011,17 +1027,6 @@ nvme_qpair_timeout(void *arg) mtx_assert(&qpair->recovery, MA_OWNED); - /* - * If the controller has failed, give up. We're never going to change - * state from a failed controller: no further transactions are possible. - * We go ahead and let the timeout expire in many cases for simplicity. - */ - if (qpair->ctrlr->is_failed) { - nvme_printf(ctrlr, "Controller failed, giving up\n"); - qpair->timer_armed = false; - return; - } - switch (qpair->recovery_state) { case RECOVERY_NONE: /* @@ -1108,6 +1113,11 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; + case RECOVERY_FAILED: + KASSERT(qpair->ctrlr->is_failed, + ("Recovery state failed w/o failed controller\n")); + idle = true; /* nothing to monitor */ + break; } /* @@ -1297,6 +1307,8 @@ nvme_qpair_enable(struct nvme_qpair *qpair) mtx_assert(&qpair->recovery, MA_OWNED); if (mtx_initialized(&qpair->lock)) mtx_assert(&qpair->lock, MA_OWNED); + KASSERT(qpair->recovery_state != RECOVERY_FAILED, + ("Enabling a failed qpair\n")); qpair->recovery_state = RECOVERY_NONE; } @@ -1421,12 +1433,13 @@ void nvme_admin_qpair_disable(struct nvme_qpair *qpair) { mtx_lock(&qpair->recovery); - mtx_lock(&qpair->lock); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); + mtx_unlock(&qpair->lock); + nvme_admin_qpair_abort_aers(qpair); - mtx_unlock(&qpair->lock); mtx_unlock(&qpair->recovery); } @@ -1451,18 +1464,27 @@ nvme_qpair_fail(struct nvme_qpair *qpair) if (!mtx_initialized(&qpair->lock)) return; + mtx_lock(&qpair->recovery); + qpair->recovery_state = RECOVERY_FAILED; + mtx_unlock(&qpair->recovery); + mtx_lock(&qpair->lock); + if (!STAILQ_EMPTY(&qpair->queued_req)) { + nvme_printf(qpair->ctrlr, "failing queued i/o\n"); + } while (!STAILQ_EMPTY(&qpair->queued_req)) { req = STAILQ_FIRST(&qpair->queued_req); STAILQ_REMOVE_HEAD(&qpair->queued_req, stailq); - nvme_printf(qpair->ctrlr, "failing queued i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_request(qpair, req, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); mtx_lock(&qpair->lock); } + if (!TAILQ_EMPTY(&qpair->outstanding_tr)) { + nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); + } /* Manually abort each outstanding I/O. */ while (!TAILQ_EMPTY(&qpair->outstanding_tr)) { tr = TAILQ_FIRST(&qpair->outstanding_tr); @@ -1470,7 +1492,6 @@ nvme_qpair_fail(struct nvme_qpair *qpair) * Do not remove the tracker. The abort_tracker path will * do that for us. */ - nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); From nobody Thu Sep 28 21:10:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxR2j52f8z4vbwJ; Thu, 28 Sep 2023 21:10: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 4RxR2j2TKFz3F4M; Thu, 28 Sep 2023 21:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUmxq7qabnEl98pXyv0T+ap3nHUcB6pI2YruL2Ghb6o=; b=QtYGJt/yvAzzR7vAKt3T8hgylBL1Nuo2zQwshz9R+qRxufWokkkCeOoEFSTT3h5bJ6KZsI V14tJLpdia/0cNFuCs+JxHBSaaTe8cEppxhRHY3zo2r4WoKTEceTnTNCdvjq25PBBKOiIu AgK3TQubgY0Bixx3O9WtyTQMZVC/2z8tXX5RA12ZlDfgYy1Yty4lV9Hdta/vy3wD1rXSEX 51fhjaJhGJt5Ezt7Ft2cPgk8bWG4i4KEKlWJwj/XzHTprsZjGxpf1KvkucrHaTCY4iQgCy ODEx0prAauxGqNZqRupF8aOR6nd/sFGt7hME+YU5iv1MRwwkpC3Zr2n6hxh2Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935421; a=rsa-sha256; cv=none; b=aDz1HBffAO98m+F9A4rtBa5YL7eVKeW9jrRgrX42KgQ/MB3Fjw3XE0Y+uCn4CeFXqeTc6P 8Buk2QFXxgSFogORw1+qhGig4Q1RtiaUn0O60gu7yi7p39BNUCe3C4534/TlR8D8RJFMa2 cRmq0LTgjeUnQEkIa+Aq7jed6rSUg9XU6mWpjVZ7Cn2EiMDLvzGW6G9266ty/XNy6uejbq 42KBuvcsJcitA7EdBHTs6d8c6JJHnKQqsFv3C9Qs7uZbk3ElP9yO92+Q11QflSy5eRBPGl ESvHTtfeSalmG130v8u7lUb/b+wNXBvFIdlI9bm+4U2Xik8yMRCBPVj8yOFWGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUmxq7qabnEl98pXyv0T+ap3nHUcB6pI2YruL2Ghb6o=; b=rwNwMIJOGtTAdPLyakb9Z1sH7oFGi5GVyMFL9Y+xvV2umAKOjbwP0ELL3Yl/b+eYoBAGA+ 6ke/ycaGvZLJpD3hNWK54WvLy5jW1AepOcdZnJklRdSyNmoghhpXXMliNH5tCyHxGfw0k7 ynkzBSX7LyEzO23D20VqBrKGYUhUxtRS9V8PNNUw+oYy+FSOCYu8kThhNTTXWGsNFfyaWW bvyqjgoKnWOu6oZiCYmF+f7ERh3dyngHYu2HX+T7QwHpfWzlP9VDdRzii8BJYK181Va2RJ ey++0mVnnlfn4cejbxVAqncO7sggNIiFfJGRTx/CI4bxjIuBxsUcGcMUaCAP2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxR2j1VJCzdGx; Thu, 28 Sep 2023 21:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLALLo048757; Thu, 28 Sep 2023 21:10:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLALDD048754; Thu, 28 Sep 2023 21:10:21 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:10:21 GMT Message-Id: <202309282110.38SLALDD048754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 3cd49bc5b33f - stable/14 - nvme: Supress noise messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3cd49bc5b33fed7c305bfbf4b0c014520e65bc02 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3cd49bc5b33fed7c305bfbf4b0c014520e65bc02 commit 3cd49bc5b33fed7c305bfbf4b0c014520e65bc02 Author: Warner Losh AuthorDate: 2023-09-28 20:46:01 +0000 Commit: Warner Losh CommitDate: 2023-09-28 21:05:15 +0000 nvme: Supress noise messages When we're suspending, we get messages about waiting for the controller to reset. These are in error: we're not waiting for it to reset. We put the recovery state as part of suspending, so we should suppress these as a false positive. Also remove a stray debug that's left over from earlier versions of the recovery code that no longer makes sense. Sponsored by: Netflix (cherry picked from commit 1d6021cd72689f54093af4ed77066a2f8abde664) --- sys/dev/nvme/nvme_qpair.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 9806096de81d..cd0057f444b8 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1104,13 +1104,20 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n", (csts == 0xffffffff) ? " and possible hot unplug" : (cfs ? " and fatal error status" : "")); - nvme_printf(ctrlr, "RECOVERY_WAITING\n"); qpair->recovery_state = RECOVERY_WAITING; nvme_ctrlr_reset(ctrlr); idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "Waiting for reset to complete\n"); + /* + * These messages aren't interesting while we're suspended. We + * put the queues into waiting state while + * suspending. Suspending takes a while, so we'll see these + * during that time and they aren't diagnostic. At other times, + * they indicate a problem that's worth complaining about. + */ + if (!device_is_suspended(ctrlr->dev)) + nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; case RECOVERY_FAILED: From nobody Thu Sep 28 21:18:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxRDG12MLz4vcRq; Thu, 28 Sep 2023 21:18: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 4RxRDG0WJBz3Gcy; Thu, 28 Sep 2023 21:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tuw7ZJCNjYJRaYEPM1kJ5SqPkizWzmQoADi73t1hoEM=; b=CC5+RRuwOzFOESKaSR1bYc8y0H9gDTyN/xSDYWzURrZrwQkD3BjAnIeHxF2nkAxUbjPhiG bQgRgIyIwZx4a/9hIovaDYGGRnxU/zd28wWBTZarQp73XYZ5jCsiLnoZWr//tb+DQWNZuB MxXQJ3jk+C0OzC5GG8Idx+B9GeTKnM9vbmasb3hId89g0jnxLraC+jaPon5FbIyld9FlHs MS3P8lJuzwJNjg5A/2RNpAX17rrFvflN2kzHoWTjDQUCGpyIM5q8p9LJ2K8d/cxhrc+fSd Lti3TGLbh0bUDStHweuSn5BdOzuF6DzIpAO1r1JcsOTH0pPMpnC6vO0Zk3BEPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935918; a=rsa-sha256; cv=none; b=doBtdZHCGp5gSOTrNufg8atzvRSyQCiEN1XvMD28ySJdQZQsPxLA/GUFZfNf1/Hd0LvtAF YYYHb3ieXR9JpP4c/dvs7y4w9y1YccBKAwDQIbhftXctjxXaKwz7Ck4U5dUw/J0GLmB15e a+I3dAwqUvDJbVU4w5bePlXT/iegf76ABiAO/FOmO4YxjwaZZ/EQOFcbRSRbG5PQWbRbzF iwTVbljRAQHnYfIOz6ctl3ShQZ2XR639ZyaVpBesBphWmoHzSd80dCeQZafXreY1rmAW5H NbRjPtEhscYZaVDKkIbuq7UYRCxj2oiuS6O7OC57aUag1JUqnSDMnvNSBv5+0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tuw7ZJCNjYJRaYEPM1kJ5SqPkizWzmQoADi73t1hoEM=; b=Yi6Z666iVUohOrnNsrBNo3KxOE9sDL8MpyIlb3fbwYoR0mSWrO1kR07KyeR4jONB47QWEY Gu/zRhYlUHdiAKxsgftvUyK796lgDLVfIsIeoPwlI8xbiH5YrQnXpgtfn5UrYrMOA9XeGv K7benCu6fX8NhOtIC72q/mFY0ANwbMBfQH6x2ecb67+iaUs0xRb6dUAgo5f/01l87i2ZqW Oft4lv1Raa/Hkg9vMTUwPPjdr5gKTjHN7U3Mx4TAyjFZv6YdMQpGat0Q6aMZIYFG63tHiZ OZcQhvHpD5twzulBv/AhWrJZBO8qBh2kwAFHvJRM0A4YIvxD4pMtsI6gIISUGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxRDF6jP5zdgG; Thu, 28 Sep 2023 21:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLIbHl056935; Thu, 28 Sep 2023 21:18:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLIbFA056932; Thu, 28 Sep 2023 21:18:37 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:18:37 GMT Message-Id: <202309282118.38SLIbFA056932@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: d33a4ae8ba53 - main - x86: Properly align interrupt vectors for MSI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d33a4ae8ba5343f555842e6e32321f9cd64dfd09 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d33a4ae8ba5343f555842e6e32321f9cd64dfd09 commit d33a4ae8ba5343f555842e6e32321f9cd64dfd09 Author: John Hay AuthorDate: 2023-09-28 21:08:08 +0000 Commit: John Baldwin CommitDate: 2023-09-28 21:08:08 +0000 x86: Properly align interrupt vectors for MSI MSI (not MSI-X) interrupt vectors must be allocated in groups that are powers of 2, and the block of IDT vectors must be aligned to the size of the request. The code in native_apic_alloc_vectors() does an alignment check in the loop: if ((vector & (align - 1)) != 0) continue; first = vector; But it adds APIC_IO_INTS to the value it returns: return (first + APIC_IO_INTS); The problem is that APIC_IO_INTS is not a multiple of 32. It is 48: As a result, a request for 32 vectors (the max supported by MSI), was not always aligned. To fix, check the alignment of 'vector + APIC_IO_INTS' in the loop. PR: 274074 Reviewed by: jhb --- sys/x86/x86/local_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 17b0223f834b..b382368cc626 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -1582,7 +1582,7 @@ apic_alloc_vectors(u_int apic_id, u_int *irqs, u_int count, u_int align) /* Start a new run if run == 0 and vector is aligned. */ if (run == 0) { - if ((vector & (align - 1)) != 0) + if (((vector + APIC_IO_INTS) & (align - 1)) != 0) continue; first = vector; } From nobody Thu Sep 28 21:20:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxRFs6FLSz4vcQT; Thu, 28 Sep 2023 21:20: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 4RxRFs5kgTz3H6w; Thu, 28 Sep 2023 21:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695936001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX3Jxk6l/2ruwfAI/DggtXiY7HcgqwKErXgpNePtZdM=; b=rqUICqh0k6YEXgr+cTarW53ghGmJqHGe/ppdHHpgKFMHkCOwwUbM1tXSM/1jZHD+l7BcQE TS07evB6kO2KopV2HKsOsIR3P2ww21ZawXHrM9r0psvfFpwSdqYz4YMONfmgcEGPAloKW7 BfgRhCgAHRoNurwLmWmzcjYTpQ5HFMkVNUiZucJC3yvZC08Io2/dQzais51Xm5XAK2EQOR LzI8MOIrK6UyPKo0tbSlpeQeOsmz2/N3ak3gc2Y7gOXhDKT/dG216IMvvIk1LILEavZ0yM EOK241wB41mzT0js6uNu1cVSCjpmlBST/njmgKcrHQtPogPCUM/utFEVxX6oIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695936001; a=rsa-sha256; cv=none; b=S367WyRBedEHWjdSl5aMhxQHa8xZCwiPtUgnIUqyqobpbrsLxR1/BXX11hlEVzMqXYXh6C 9GL9ZgMJv6D0ekdGIyZiOg4O0YzUu2xy3G+MqWLUFxaCkUZzgC+J0GjCMGKFxd4Zj4vEL8 EMBnvYm9PhjePgyoJSgXJrmj1nycy6vX0TQNMX4jex/jatz3Z5gHQhKjeHBas/+jMCtJHH Ji7Xzzsq7xWBDK3CY2VF/Or1pkdwZ8TpWQ+WH2470W3oyU0CQtril8VZSyM/GEkbtWX5H4 8DjJHGyvBHRgcDgGagNRKhEqNQqmDvaQua1xM2V1K7MpcO5nrZZpqfLpww2STg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695936001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX3Jxk6l/2ruwfAI/DggtXiY7HcgqwKErXgpNePtZdM=; b=oxG4wT/rUxpGn/6NAJCUOtBBsSA/wmcTEOdznmHoVOgGF9jPsWqFq7BUb42m6XWOBnho5G m8XqW5//FaRoR3Ws3pkI/IQazs33ZBoOrLMO2ooDm+IEZ5VJN7XtRBTsvPeSyVY8f5p+Ku xzivmQpXwN6cttyRSS6DLO42iURMn7KP38Vd8s6ZwDA0lYHGaecqxbA8gARxhBmwy54Gqa 9jlCW6V3IyASLxQtD8Pyy0OWcnTf/MEK3cNdvSp2vhQAwNYoakT4wHnNGdN5HTM/WtyYPK JhW5Lok+dWJgR0ZwrPskqE8OgMluI856x7x9syqEvbYu0LBO1FDPo5GhtQ2dFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxRFs4pMZzdDV; Thu, 28 Sep 2023 21:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLK12v059144; Thu, 28 Sep 2023 21:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLK1bw059139; Thu, 28 Sep 2023 21:20:01 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:20:01 GMT Message-Id: <202309282120.38SLK1bw059139@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: 0f87915f4338 - main - Remove unnecessary -isystem for host List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0f87915f4338cbe2bb73999a85fb8b91a7936ac7 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0f87915f4338cbe2bb73999a85fb8b91a7936ac7 commit 0f87915f4338cbe2bb73999a85fb8b91a7936ac7 Author: Simon J. Gerraty AuthorDate: 2023-09-28 21:19:11 +0000 Commit: Simon J. Gerraty CommitDate: 2023-09-28 21:19:25 +0000 Remove unnecessary -isystem for host Turns out we do not need -isystem/usr/include and it can interfere with newer toolchains. Reviewed by: stevek --- share/mk/src.init.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/share/mk/src.init.mk b/share/mk/src.init.mk index 580f9c9c8e09..e35d615d0e1a 100644 --- a/share/mk/src.init.mk +++ b/share/mk/src.init.mk @@ -32,10 +32,6 @@ LIBADD+= egacy .endif .endif -.if ${MK_STAGING} == "yes" -ISYSTEM= /usr/include -CFLAGS+= -I${STAGE_INCLUDEDIR} -.endif .endif .endif # !target(____) From nobody Thu Sep 28 21:43:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxRmk4w4kz4vdst; Thu, 28 Sep 2023 21:43: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 4RxRmk4K4yz3JwN; Thu, 28 Sep 2023 21:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695937398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lg8bUBkoh1rDTZIeLD4JEMwgiVcScG8t9Nc+lbpbS40=; b=JO8dGumzyUYBj9gxJ+AJPa/UnD01G6TL7mENO1fFBttlNQDW+9BQA6K+3r4C9JvMG5A2rb G/CNsPmWuXe4jL8NtoDhF3y/jMSJVOIeieRS4MBKFtyiD0ro7+dur4TKh3LOBjqKoVvTes VRR9MgnQGChXJob/s6HnvJKxz3fYRY4Abavoy/7Cw7GdUILULdaBbr0pFxbHD7d05ksOIH jPCCJP9dpg3JXioMttglhQmP6RIyZ6yP/PpnQIspKnJ4TKSvOiNLudFvWZxs1+8qPAktz2 JFh5soM3501rgQ7lzOq1CMEGHI8AjbuSbzbQobaYl6La13HyQ6Vsna+6VDah2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695937398; a=rsa-sha256; cv=none; b=uLluvvlJLGsexJO41OMd36iov5dMKFe3uRTtKaisMmL2fmzD47+nl4+MIT8gUCafFwdpow Qhw2C0eifjgcuJRGepERZfCOu4rjmu3kkf2KmJAS6lA85EirwnyZnpMExmy0Y49/5etc8h odo5xPedGS1VyrtlmeoxjOAOmIHB7zds1MTFGnyM9GvkkEHfdzIgkkbksgbwimJncyA9i4 7Jgk1GReWyYNXQFAQ5nU+Oc1dLjlcYsJ0mQfD52zEsYRxnVY5KYLxbZb2kro+yJw8aPulZ 8ucQAVrec0FA+1LPQo+o3vD7AQMvpVPouL3qI080ejO6fTacNSUpLZYy5EtIBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695937398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lg8bUBkoh1rDTZIeLD4JEMwgiVcScG8t9Nc+lbpbS40=; b=W0JK1Ko1mMbbkTallAvBKrAIxjwfy6FEboIXqqO9PV2YZCP0VUo1meJhlN86MnvMF0jSwX F0cS4B4/ScIljKt6S6g6hP+CvQ6ugX0Tgu3iL2v5VxR+g/1Ya+qGigaxZTq1PaR3BtRu/2 995kvZfOpq5/CQv2rHHpZ6fjqjfUsueoaHwLA/953iSVJTun+Nbgb79fpbzvPoF+vFHKO1 bF85I2pXC+z5nmghUFR3oqry0nXqKGcQfW9JmwP6skv0AHBky5LJB4rEop70aiRgxlxxuf 1OK4rtg81emYKmZJXEXwQUSM0cm5WDFBiVcB9ii5EW4Ik9qKWlTM8/KfyTx1Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxRmk3MmnzfHc; Thu, 28 Sep 2023 21:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLhIZe005739; Thu, 28 Sep 2023 21:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLhIZa005736; Thu, 28 Sep 2023 21:43:18 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:43:18 GMT Message-Id: <202309282143.38SLhIZa005736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 992ec09f3783 - main - bsd-family-tree: add macOS 14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 992ec09f37837a3f7d131bc70a66d6e41b814e9b Auto-Submitted: auto-generated The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=992ec09f37837a3f7d131bc70a66d6e41b814e9b commit 992ec09f37837a3f7d131bc70a66d6e41b814e9b Author: Sergey A. Osokin AuthorDate: 2023-09-28 21:42:08 +0000 Commit: Sergey A. Osokin CommitDate: 2023-09-28 21:42:08 +0000 bsd-family-tree: add macOS 14 MFC after: 3 days --- share/misc/bsd-family-tree | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 0910f577bdbd..1a99910e1297 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -446,6 +446,8 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.3 | | FreeBSD | | | | | 13.2 | | | | + | macOS | | | + | 14 | | | | | | | | FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -872,6 +874,7 @@ FreeBSD 12.4 2022-12-05 [FBD] DragonFly 6.4 2022-12-30 [DFB] OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] +macOS 14 2023-09-26 [APL] Bibliography ------------------------ From nobody Thu Sep 28 22:16:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSWC2vPmz4vh5w; Thu, 28 Sep 2023 22:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSWC1j5dz3LfR; Thu, 28 Sep 2023 22:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yDQxgYXu17dbIGnULLU/7e0y6swVe81upzriWj8XyIc=; b=ZAzLhl0Gd6MrSKNkOynQapDc2viPtaNLcuRPNrYeCozedF1cEvIQeNxG8hG50F65zqcFIG gk1Pc1LxqVWVQbJWX9uleq9AlJ+7zYkM9TgyiNa2x8D/y62QMd/2UGkk2Dqy4JEuCP+oZk gVW/g78SykvqWKlY7NUNw+Cx4kgvsfRI2qlpFeFgzLUoJkNz9o/J+sJLydxRMm90Bk2Yzi mpiDKfnxbprgkw8YSMv7eMy8Qgw4p98ybpWaccc7XckpbW5edxsJ9Y0YeV2LSqvU+L3/V6 D9z6j2mHGGx1p+3Xl2qWChlhK0fyPLLdW0HVelWsYH6muxOO1b5g6NmaHNfkvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939399; a=rsa-sha256; cv=none; b=N0QuZBD7f1TkQpxxKVx8cfe/sSnU47vU1ZyCUwrXarAnOSb7FwzNgHDXHBNh/IHs27DCe4 DTb4IyGQymCi+KjcrD5cEUGLLDfimP2MWwj+KNWUk69vnTRkpKbj/hWnVbsgaO1ZETwzpZ Dbxivr7s77T6wseUowfrly4w55G3E1O1IHYuBpIHkeHj0NyiW+P1n4jb/ZsCY6nzQ/XnIt x8ML9L0fhDl/u0E7RSK5VJtthz5k0SzOkaLlmH8+AM0Q3eXH/VWuTic8GweJkgL4tpHATb VCaT9zR3DUYSlF6tJO8ggbHLddS5EeXOO89gI3MoUm9emciQ0Sjl+qEfUNcvgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yDQxgYXu17dbIGnULLU/7e0y6swVe81upzriWj8XyIc=; b=nzz8lPAevFmWWCPq2G/I/lt/DNNQC5WY+GtWQbSVvSnjfGQv3JTTPGFPcqc7n03e+dR4os cZVpY//t7aKmKnIOLtZ4zs862HgiIZEUd1QT82OtBm/xPrKmr7yFDeb+Wz/pkAk2Aoys6b wuV6nEcge2dHFtHtE8ZRt+hmwwJ2ci30qHo1mSp09zJ0HvSA5y73PvH7uRZVcuaYRKVJS6 AUDSN7iGPNVU2NoomiU9v0bHTTOF8LGILZBRJo5mR6KcL/cqSRg07jQAu5KLwKIF2oRkSn b1PfOhIVhx4aXjI6wm0osz4cf0g8rmLWZEHZnKdjWVsdQIrGxotch5MjsxqYEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSWC0pbbzfhq; Thu, 28 Sep 2023 22:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMGd7t056087; Thu, 28 Sep 2023 22:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMGdZO056084; Thu, 28 Sep 2023 22:16:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:16:39 GMT Message-Id: <202309282216.38SMGdZO056084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: dea589710881 - releng/14.0 - ice_ddp: Update to 1.3.35.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: dea5897108818a61bbae702c77839930421433e3 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=dea5897108818a61bbae702c77839930421433e3 commit dea5897108818a61bbae702c77839930421433e3 Author: Eric Joyner AuthorDate: 2023-08-22 04:55:34 +0000 Commit: Eric Joyner CommitDate: 2023-09-28 22:15:49 +0000 ice_ddp: Update to 1.3.35.0 This is intended to be used with the upcoming updated ice(4) version 1.38.16-k. Signed-off-by: Eric Joyner Approved by: re (cperciva) Sponsored by: Intel Corporation (cherry picked from commit e04c4b4a369df3f1dcbebbdf726193f02af60801) (cherry picked from commit 65d0d780732853b5ddb2278497d2c72b2b42d7d0) --- sys/conf/files.amd64 | 6 +++--- sys/conf/files.arm64 | 6 +++--- sys/conf/files.powerpc | 6 +++--- sys/contrib/dev/ice/LICENSE | 2 +- .../dev/ice/{ice-1.3.30.0.pkg => ice-1.3.35.0.pkg} | Bin 692660 -> 692776 bytes sys/modules/ice_ddp/Makefile | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index e1499b19bb12..dfbe278f0c46 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -194,7 +194,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -203,8 +203,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 7b033c979c55..02dcadc0aa5c 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -322,7 +322,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -331,8 +331,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index aad29d050b68..48251ab07d9e 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -95,7 +95,7 @@ dev/ice/irdma_di_if.m optional ice pci powerpc64 | ice pci powerpc64le \ dev/ice/ice_ddp_common.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ @@ -104,8 +104,8 @@ ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp powerpc64 | ice pci powerpc64le \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ixl/if_ixl.c optional ixl pci powerpc64 \ diff --git a/sys/contrib/dev/ice/LICENSE b/sys/contrib/dev/ice/LICENSE index 7faadfc55aac..97fe53c2d998 100644 --- a/sys/contrib/dev/ice/LICENSE +++ b/sys/contrib/dev/ice/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2021, Intel Corporation. +Copyright (c) 2006-2023, Intel Corporation. All rights reserved. Redistribution. Redistribution and use in binary form, without diff --git a/sys/contrib/dev/ice/ice-1.3.30.0.pkg b/sys/contrib/dev/ice/ice-1.3.35.0.pkg similarity index 88% rename from sys/contrib/dev/ice/ice-1.3.30.0.pkg rename to sys/contrib/dev/ice/ice-1.3.35.0.pkg index 454a2a6ea193..fc3e8ebc640f 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.30.0.pkg and b/sys/contrib/dev/ice/ice-1.3.35.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index 41ed4ac92888..ad85bc2a9935 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,5 +1,5 @@ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.30.0.pkg:ice_ddp:0x01031e00 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.35.0.pkg:ice_ddp:0x01032300 .include From nobody Thu Sep 28 22:16:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSWD4Cb0z4vh8B; Thu, 28 Sep 2023 22:16: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 4RxSWD31PPz3LfY; Thu, 28 Sep 2023 22:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wWZwhwBTS75ncc062jdgqQBRY74tEfJGKkFNNz9/Aww=; b=h6qaShzhq5pnp/hcXhBAJW7mt+k2aKR6Ne8r84tbIn1V4Cbay9E/pDQtH5YsErn9McGTAw fc6trODtJ+AlxDozomaWMSzb1Ph9DJUjym7cOJVKyzHTss6Haf8gmvfwUYs42KezsZJdJk xUIC+wxzk5b+EVH4IZmCEyjlMLgZ7OZ8fUnL/8mQiWKkWGrHHFqd662lJQ/karfsHlOvoM E3wFOcriZl7tS2yBRvTq72wThB+3dLHHyKCYqSma3mhiOMq3/tExOQuaJtHFkpwVfC8Uev ZgWVn9I5NlJnyb4u6Ab/0XTrhdwLXdfZMCwT7v0X92iSGS29pfb0NRWt6F5uMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939400; a=rsa-sha256; cv=none; b=yZbuzVXWFfw+7P5uDeSAOapGRjk35Z0AbjYczHQvVubv2faXr3lVp416Vw9ON6aeZQ4VKL 1TXJkFiwMGmE3YdChIBxlttZ9bPR3m7lVLBqk6gRQxhjXAH5CvRREerHQVLBXFDICauT5N jKYpkWqAD3UAoMtM3Kqg9E24RzkDaJaw8nyZNBCDGhsJFyu1jpua1PHwtguHWseZnYPMXJ ufwOkyPzv9KxgRjzPiTMyAX6OxCWF7pxjWeJWIm4Ui/97xPW5RZahEyHRNYjvO9RtX9i91 dfV+ricYwao+QX6sZ/y6RwWcE4wMWKjpEmnAa86y4l6Rn66ve0eh5bNk6iDHyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wWZwhwBTS75ncc062jdgqQBRY74tEfJGKkFNNz9/Aww=; b=gHER1hry6rBPsSXEFhMp9dmrx5mna4F8WhMbsgtT9RKGZCXehfDP4NV0a0jsZ5LlSaTJyf k34SsJqrh+pOvAJIKOj2lgmZJRAkUhYiB0l0oDrVX8wcaRZEr+m+Ih0hUwbyeyGrIe2bz8 gic62RiZotZKQaKPJN/Or+V82KBpHZc5/qKfU2xz+RxplvthLQ1Ltg1X2RPyikn2xS8zgC 6qHd1l6G51kdlzpyz1SNv/c1zqqgEYJx6EDv2TFjI5OakXs+gSBlqLZeB9nyNoR01om6Mf e0pX8fy+CjQm0m9soTKko4AEOjX0abi3SaDhXvXkvsoUdVHdfBIZDPSDOAlHrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSWD1rxWzg03; Thu, 28 Sep 2023 22:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMGe03056135; Thu, 28 Sep 2023 22:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMGeji056132; Thu, 28 Sep 2023 22:16:40 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:16:40 GMT Message-Id: <202309282216.38SMGeji056132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: d4a087dcba62 - releng/14.0 - irdma(4): use related vnet for searching netdev List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d4a087dcba628f00aa14a7efbb9a1418f5396e47 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a087dcba628f00aa14a7efbb9a1418f5396e47 commit d4a087dcba628f00aa14a7efbb9a1418f5396e47 Author: Bartosz Sobczak AuthorDate: 2023-09-12 21:31:39 +0000 Commit: Eric Joyner CommitDate: 2023-09-28 22:15:58 +0000 irdma(4): use related vnet for searching netdev It was found through testing that when ULP uses individual vnet, the search for the correct vlan_id may failing because of no proper interface with given address. The solution is to use vnet associated to the connection whenever possible. Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: erj@ Approved by: re (cperciva) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41592 (cherry picked from commit bc3a013ccd23c50bb48f17211ffc36fe85d11e18) (cherry picked from commit cc1abdc6ab34211748988684800d5b54705b36c2) --- sys/dev/irdma/fbsd_kcompat.c | 6 ++---- sys/dev/irdma/fbsd_kcompat.h | 14 ++++++++++++++ sys/dev/irdma/irdma_cm.c | 35 ++++++++++++++++++++++++----------- sys/dev/irdma/irdma_main.h | 5 +++-- sys/dev/irdma/irdma_verbs.c | 4 ++-- 5 files changed, 45 insertions(+), 19 deletions(-) diff --git a/sys/dev/irdma/fbsd_kcompat.c b/sys/dev/irdma/fbsd_kcompat.c index 013f9279952e..fbfa5c9e5fc4 100644 --- a/sys/dev/irdma/fbsd_kcompat.c +++ b/sys/dev/irdma/fbsd_kcompat.c @@ -393,8 +393,7 @@ irdma_get_dst_mac(struct irdma_cm_node *cm_node, struct sockaddr *dst_sin, u8 *d { struct ifnet *netdev = cm_node->iwdev->netdev; #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif struct ifnet *ifp; struct llentry *lle; @@ -492,8 +491,7 @@ irdma_resolve_neigh_lpb_chk(struct irdma_device *iwdev, struct irdma_cm_node *cm struct irdma_cm_info *cm_info) { #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif int arpindex; int oldarpindex; diff --git a/sys/dev/irdma/fbsd_kcompat.h b/sys/dev/irdma/fbsd_kcompat.h index eb1e615fc048..f465f97167cc 100644 --- a/sys/dev/irdma/fbsd_kcompat.h +++ b/sys/dev/irdma/fbsd_kcompat.h @@ -121,6 +121,20 @@ static inline u64 *irdma_next_pbl_addr(u64 *pbl, struct irdma_pble_info **pinfo, return (*pinfo)->addr; } + +static inline struct vnet * +irdma_cmid_to_vnet(struct iw_cm_id *cm_id) +{ + struct rdma_cm_id *rdma_id; + + if (!cm_id) + return &init_net; + + rdma_id = (struct rdma_cm_id *)cm_id->context; + + return rdma_id->route.addr.dev_addr.net; +} + #if __FreeBSD_version < 1400026 struct ib_cq *irdma_create_cq(struct ib_device *ibdev, const struct ib_cq_init_attr *attr, diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index 48aefda681cb..c1d5875961f0 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1624,10 +1624,13 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4) * vlan id and mac for that address. */ if_t -irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) +irdma_netdev_vlan_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, u8 *mac) { if_t ip_dev = NULL; struct in6_addr laddr6; +#ifdef VIMAGE + struct vnet *vnet = irdma_cmid_to_vnet(cm_id); +#endif struct ifaddr *ifa; u16 scope_id = 0; @@ -1641,7 +1644,11 @@ irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) IN6_IS_ADDR_MC_INTFACELOCAL(&laddr6)) scope_id = ntohs(laddr6.__u6_addr.__u6_addr16[1]); +#ifdef VIMAGE + ip_dev = ip6_ifp_find(vnet, laddr6, scope_id); +#else ip_dev = ip6_ifp_find(&init_net, laddr6, scope_id); +#endif if (ip_dev) { if (vlan_id) *vlan_id = rdma_vlan_dev_vlan_id(ip_dev); @@ -1658,12 +1665,19 @@ irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac) * @addr: local IPv4 address */ u16 -irdma_get_vlan_ipv4(u32 *addr) +irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) { if_t netdev; +#ifdef VIMAGE + struct vnet *vnet = irdma_cmid_to_vnet(cm_id); +#endif u16 vlan_id = 0xFFFF; +#ifdef VIMAGE + netdev = ip_ifp_find(vnet, htonl(addr[0])); +#else netdev = ip_ifp_find(&init_net, htonl(addr[0])); +#endif if (netdev) { vlan_id = rdma_vlan_dev_vlan_id(netdev); dev_put(netdev); @@ -2060,8 +2074,7 @@ irdma_cm_create_ah(struct irdma_cm_node *cm_node, bool wait) struct irdma_ah_info ah_info = {0}; struct irdma_device *iwdev = cm_node->iwdev; #ifdef VIMAGE - struct rdma_cm_id *rdma_id = (struct rdma_cm_id *)cm_node->cm_id->context; - struct vnet *vnet = rdma_id->route.addr.dev_addr.net; + struct vnet *vnet = irdma_cmid_to_vnet(cm_node->cm_id); #endif ether_addr_copy(ah_info.mac_addr, if_getlladdr(iwdev->netdev)); @@ -3520,11 +3533,11 @@ irdma_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (((struct sockaddr_in *)&cm_id->local_addr)->sin_family == AF_INET) { cm_node->ipv4 = true; - cm_node->vlan_id = irdma_get_vlan_ipv4(cm_node->loc_addr); + cm_node->vlan_id = irdma_get_vlan_ipv4(cm_id, cm_node->loc_addr); } else { cm_node->ipv4 = false; - irdma_netdev_vlan_ipv6(cm_node->loc_addr, &cm_node->vlan_id, - NULL); + irdma_netdev_vlan_ipv6(cm_id, cm_node->loc_addr, + &cm_node->vlan_id, NULL); } irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM, "Accept vlan_id=%d\n", cm_node->vlan_id); @@ -3719,7 +3732,7 @@ irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) cm_info.rem_addr[0] = ntohl(raddr->sin_addr.s_addr); cm_info.loc_port = ntohs(laddr->sin_port); cm_info.rem_port = ntohs(raddr->sin_port); - cm_info.vlan_id = irdma_get_vlan_ipv4(cm_info.loc_addr); + cm_info.vlan_id = irdma_get_vlan_ipv4(cm_id, cm_info.loc_addr); } else { if (iwdev->vsi.mtu < IRDMA_MIN_MTU_IPV6) return -EINVAL; @@ -3731,7 +3744,7 @@ irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) raddr6->sin6_addr.__u6_addr.__u6_addr32); cm_info.loc_port = ntohs(laddr6->sin6_port); cm_info.rem_port = ntohs(raddr6->sin6_port); - irdma_netdev_vlan_ipv6(cm_info.loc_addr, &cm_info.vlan_id, NULL); + irdma_netdev_vlan_ipv6(cm_id, cm_info.loc_addr, &cm_info.vlan_id, NULL); } cm_info.cm_id = cm_id; cm_info.qh_qpid = iwdev->vsi.ilq->qp_id; @@ -3846,7 +3859,7 @@ irdma_create_listen(struct iw_cm_id *cm_id, int backlog) cm_info.loc_port = ntohs(laddr->sin_port); if (laddr->sin_addr.s_addr != htonl(INADDR_ANY)) { - cm_info.vlan_id = irdma_get_vlan_ipv4(cm_info.loc_addr); + cm_info.vlan_id = irdma_get_vlan_ipv4(cm_id, cm_info.loc_addr); } else { cm_info.vlan_id = 0xFFFF; wildcard = true; @@ -3860,7 +3873,7 @@ irdma_create_listen(struct iw_cm_id *cm_id, int backlog) laddr6->sin6_addr.__u6_addr.__u6_addr32); cm_info.loc_port = ntohs(laddr6->sin6_port); if (!IN6_IS_ADDR_UNSPECIFIED(&laddr6->sin6_addr)) { - irdma_netdev_vlan_ipv6(cm_info.loc_addr, + irdma_netdev_vlan_ipv6(cm_id, cm_info.loc_addr, &cm_info.vlan_id, NULL); } else { cm_info.vlan_id = 0xFFFF; diff --git a/sys/dev/irdma/irdma_main.h b/sys/dev/irdma/irdma_main.h index 25c3fcfc939e..aa5bbee2fb77 100644 --- a/sys/dev/irdma/irdma_main.h +++ b/sys/dev/irdma/irdma_main.h @@ -584,8 +584,9 @@ void irdma_gen_ae(struct irdma_pci_f *rf, struct irdma_sc_qp *qp, struct irdma_gen_ae_info *info, bool wait); void irdma_copy_ip_ntohl(u32 *dst, __be32 *src); void irdma_copy_ip_htonl(__be32 *dst, u32 *src); -u16 irdma_get_vlan_ipv4(u32 *addr); -if_t irdma_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac); +u16 irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr); +if_t irdma_netdev_vlan_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, + u8 *mac); struct ib_mr *irdma_reg_phys_mr(struct ib_pd *ib_pd, u64 addr, u64 size, int acc, u64 *iova_start); int irdma_upload_qp_context(struct irdma_qp *iwqp, bool freeze, bool raw); diff --git a/sys/dev/irdma/irdma_verbs.c b/sys/dev/irdma/irdma_verbs.c index 8b7b34f7b2fb..cda8041ab397 100644 --- a/sys/dev/irdma/irdma_verbs.c +++ b/sys/dev/irdma/irdma_verbs.c @@ -3336,7 +3336,7 @@ irdma_attach_mcast(struct ib_qp *ibqp, union ib_gid *ibgid, u16 lid) if (!ipv6_addr_v4mapped((struct in6_addr *)ibgid)) { irdma_copy_ip_ntohl(ip_addr, sgid_addr.saddr_in6.sin6_addr.__u6_addr.__u6_addr32); - irdma_netdev_vlan_ipv6(ip_addr, &vlan_id, NULL); + irdma_netdev_vlan_ipv6(iwqp->cm_id, ip_addr, &vlan_id, NULL); ipv4 = false; irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_VERBS, "qp_id=%d, IP6address=%x:%x:%x:%x\n", ibqp->qp_num, @@ -3345,7 +3345,7 @@ irdma_attach_mcast(struct ib_qp *ibqp, union ib_gid *ibgid, u16 lid) } else { ip_addr[0] = ntohl(sgid_addr.saddr_in.sin_addr.s_addr); ipv4 = true; - vlan_id = irdma_get_vlan_ipv4(ip_addr); + vlan_id = irdma_get_vlan_ipv4(iwqp->cm_id, ip_addr); irdma_mcast_mac_v4(ip_addr, dmac); irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_VERBS, "qp_id=%d, IP4address=%x, MAC=%x:%x:%x:%x:%x:%x\n", From nobody Thu Sep 28 22:16:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSWF5rVZz4vh4K; Thu, 28 Sep 2023 22:16: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 4RxSWF3pk2z3M3X; Thu, 28 Sep 2023 22:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+lE34Xp1590+Gt66Ak0b1BSWx27lDeuVDhbh1WJyxNM=; b=WQQX4u0wGdh7q2gs6PghqzcnWqHuavpFXYhuiDDnDLl29hgGLYU4FYA7iV1gV7z7LJQVXC BOrfSf37UH5fNXMBxxCi8W62QMHc3EKV2HbuIBtwNLTD/iXGWdAERJGDMl48KonJkfRY2D LlA3nqIGC77ESvRcXPd8zJSUXpQK2bzBEmfyOEKarXigyKVEi8iO0k2eT6xuT2M3Nuezdj rMMpoE/mCx6Mmiwf5MImWq6fYKxGQsmaY1mjtLIB8UoDKWa2yNKjWwFyKDlji5iaDGZ3Di br1Wa+NJV+zLUM4B0iZL4nXN7B69cO9JfmQ7X6RMX9NHm+HJB2Pw4dx4Ynr6fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939401; a=rsa-sha256; cv=none; b=EEcLBY73mFGeZIKnhEsNuIbfiGibw2Jso3gbbyGM+RIzOdefmNxZ5ZoYSwgFs2tk+r6mJt u2pTbp011LyZnJ/D5DyAeAqZlbwXSNMxzfvT+x30sFpAr0U39pxjQ+RPHP740lLe7hc3CI eWku4MqLHk+NBST4Muts8SHOf0aHcwu02H4bUE9hsF6y92svzFZI3vaPXZfsr/9RrkEjez pNq1U0ZOZKJhbiHBYH9ie4vy6swH3w42u4PoFaa7MZl2s5TqcRNRHPPbMW6H3i8qPDGtwz fQ3MdOs46Dj5kSNQU1loYdBgglPOSJ1BupAGgHeNzTtNkWhm9E/V479D9FQGwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+lE34Xp1590+Gt66Ak0b1BSWx27lDeuVDhbh1WJyxNM=; b=sFgvS/XJfk8j8pJLF18iEY4o+pd8liNl1DMucDEwQ6SyYhOujEp0wiUC2JUy1HT0vqhLUW v2GDzABu/8wfewmPkrBqeWrEKmirs0mLKS6wgsPGpLKOObODMsVmUkHFGPjeVNxjs3OlMy iFdeA3AT5e/pcEozZ+VXUQo8Tr+wwAhg3Yx1AZEM/o2GwgEE3BPmyU3PI1rvJeOTTmMsfe g+YhoxQBn5vGSNA6QLxooO1lCJc345E9IJmpJ4DgQl5ENv89Ki5WstOctQONXaYeq/sFDs C6CQgSG09AMzo3stmO5hDlqF0FQ3y94ppPaJTJ/xr/DEAaUzQsNqH3q/fbeYpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSWF2sWpzfKk; Thu, 28 Sep 2023 22:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMGfi3056183; Thu, 28 Sep 2023 22:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMGf80056180; Thu, 28 Sep 2023 22:16:41 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:16:41 GMT Message-Id: <202309282216.38SMGf80056180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: 243853dab752 - releng/14.0 - irdma(4): remove artificial completion generator List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 243853dab752495ffc77007c94e1e77a71a9edaf Auto-Submitted: auto-generated The branch releng/14.0 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=243853dab752495ffc77007c94e1e77a71a9edaf commit 243853dab752495ffc77007c94e1e77a71a9edaf Author: Bartosz Sobczak AuthorDate: 2023-09-12 21:35:06 +0000 Commit: Eric Joyner CommitDate: 2023-09-28 22:16:09 +0000 irdma(4): remove artificial completion generator Removing artificial completion generator as there had been no indication of the code being required for E810 cards. Further more it was found that the code may have unpleasant side effects on user experience when using ucmatose tool. Signed-off-by: Bartosz Sobczak Signed-off-by: Eric Joyner Reviewed by: erj@ Approved by: re (cperciva) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D41593 (cherry picked from commit ffafa6a4d157e49e6b12567958c4ab0c9151c080) (cherry picked from commit 4e80493a33feeabd358ffc233463934a85649c45) --- contrib/ofed/libirdma/irdma_umain.h | 8 -- contrib/ofed/libirdma/irdma_uverbs.c | 161 +---------------------------------- 2 files changed, 1 insertion(+), 168 deletions(-) diff --git a/contrib/ofed/libirdma/irdma_umain.h b/contrib/ofed/libirdma/irdma_umain.h index c67c5d7076f9..7ff850c46b72 100644 --- a/contrib/ofed/libirdma/irdma_umain.h +++ b/contrib/ofed/libirdma/irdma_umain.h @@ -109,11 +109,6 @@ struct verbs_cq { }; }; -struct irdma_cmpl_gen { - LIST_ENTRY(irdma_cmpl_gen) list; - struct irdma_cq_poll_info cpi; -}; - struct irdma_ucq { struct verbs_cq verbs_cq; struct verbs_mr vmr; @@ -130,7 +125,6 @@ struct irdma_ucq { struct list_head resize_list; /* for extended CQ completion fields */ struct irdma_cq_poll_info cur_cqe; - struct list_head_cmpl cmpl_generated; }; struct irdma_uqp { @@ -150,7 +144,6 @@ struct irdma_uqp { struct irdma_qp_uk qp; enum ibv_qp_type qp_type; struct irdma_sge *recv_sges; - pthread_t flush_thread; }; /* irdma_uverbs.c */ @@ -207,5 +200,4 @@ void irdma_async_event(struct ibv_context *context, void irdma_set_hw_attrs(struct irdma_hw_attrs *attrs); void *irdma_mmap(int fd, off_t offset); void irdma_munmap(void *map); -void *irdma_flush_thread(void *arg); #endif /* IRDMA_UMAIN_H */ diff --git a/contrib/ofed/libirdma/irdma_uverbs.c b/contrib/ofed/libirdma/irdma_uverbs.c index c59d409e72cd..bc6bec34e6cd 100644 --- a/contrib/ofed/libirdma/irdma_uverbs.c +++ b/contrib/ofed/libirdma/irdma_uverbs.c @@ -459,7 +459,6 @@ ucreate_cq(struct ibv_context *context, info.cq_size = get_cq_size(attr_ex->cqe, hw_rev, cqe_64byte_ena); iwucq->comp_vector = attr_ex->comp_vector; LIST_INIT(&iwucq->resize_list); - LIST_INIT(&iwucq->cmpl_generated); total_size = get_cq_total_bytes(info.cq_size, cqe_64byte_ena); cq_pages = total_size >> IRDMA_HW_PAGE_SHIFT; @@ -615,142 +614,6 @@ irdma_process_resize_list(struct irdma_ucq *iwucq, return cq_cnt; } -static void -irdma_remove_cmpls_list(struct irdma_ucq *iwucq) -{ - struct irdma_cmpl_gen *cmpl_node, *next; - - LIST_FOREACH_SAFE(cmpl_node, &iwucq->cmpl_generated, list, next) { - LIST_REMOVE(cmpl_node, list); - free(cmpl_node); - } -} - -static int -irdma_generated_cmpls(struct irdma_ucq *iwucq, struct irdma_cq_poll_info *cq_poll_info) -{ - struct irdma_cmpl_gen *cmpl; - - if (!iwucq || LIST_EMPTY(&iwucq->cmpl_generated)) - return ENOENT; - cmpl = LIST_FIRST(&iwucq->cmpl_generated); - LIST_REMOVE(cmpl, list); - memcpy(cq_poll_info, &cmpl->cpi, sizeof(*cq_poll_info)); - - free(cmpl); - - return 0; -} - -/** - * irdma_set_cpi_common_values - fill in values for polling info struct - * @cpi: resulting structure of cq_poll_info type - * @qp: QPair - * @qp_num: id of the QP - */ -static void -irdma_set_cpi_common_values(struct irdma_cq_poll_info *cpi, - struct irdma_qp_uk *qp, __u32 qp_num) -{ - cpi->comp_status = IRDMA_COMPL_STATUS_FLUSHED; - cpi->error = 1; - cpi->major_err = IRDMA_FLUSH_MAJOR_ERR; - cpi->minor_err = FLUSH_GENERAL_ERR; - cpi->qp_handle = (irdma_qp_handle) (uintptr_t)qp; - cpi->qp_id = qp_num; -} - -static bool -irdma_cq_empty(struct irdma_ucq *iwucq) -{ - struct irdma_cq_uk *ukcq; - __u64 qword3; - __le64 *cqe; - __u8 polarity; - - ukcq = &iwucq->cq; - cqe = IRDMA_GET_CURRENT_CQ_ELEM(ukcq); - get_64bit_val(cqe, 24, &qword3); - polarity = (__u8) FIELD_GET(IRDMA_CQ_VALID, qword3); - - return polarity != ukcq->polarity; -} - -/** - * irdma_generate_flush_completions - generate completion from WRs - * @iwuqp: pointer to QP - */ -static void -irdma_generate_flush_completions(struct irdma_uqp *iwuqp) -{ - struct irdma_qp_uk *qp = &iwuqp->qp; - struct irdma_ring *sq_ring = &qp->sq_ring; - struct irdma_ring *rq_ring = &qp->rq_ring; - struct irdma_cmpl_gen *cmpl; - __le64 *sw_wqe; - __u64 wqe_qword; - __u32 wqe_idx; - - if (pthread_spin_lock(&iwuqp->send_cq->lock)) - return; - if (irdma_cq_empty(iwuqp->send_cq)) { - while (IRDMA_RING_MORE_WORK(*sq_ring)) { - cmpl = malloc(sizeof(*cmpl)); - if (!cmpl) { - pthread_spin_unlock(&iwuqp->send_cq->lock); - return; - } - - wqe_idx = sq_ring->tail; - irdma_set_cpi_common_values(&cmpl->cpi, qp, qp->qp_id); - cmpl->cpi.wr_id = qp->sq_wrtrk_array[wqe_idx].wrid; - sw_wqe = qp->sq_base[wqe_idx].elem; - get_64bit_val(sw_wqe, 24, &wqe_qword); - cmpl->cpi.op_type = (__u8) FIELD_GET(IRDMAQPSQ_OPCODE, wqe_qword); - /* remove the SQ WR by moving SQ tail */ - IRDMA_RING_SET_TAIL(*sq_ring, sq_ring->tail + qp->sq_wrtrk_array[sq_ring->tail].quanta); - LIST_INSERT_HEAD(&iwuqp->send_cq->cmpl_generated, cmpl, list); - } - } - pthread_spin_unlock(&iwuqp->send_cq->lock); - if (pthread_spin_lock(&iwuqp->recv_cq->lock)) - return; - if (irdma_cq_empty(iwuqp->recv_cq)) { - while (IRDMA_RING_MORE_WORK(*rq_ring)) { - cmpl = malloc(sizeof(*cmpl)); - if (!cmpl) { - pthread_spin_unlock(&iwuqp->recv_cq->lock); - return; - } - - wqe_idx = rq_ring->tail; - irdma_set_cpi_common_values(&cmpl->cpi, qp, qp->qp_id); - cmpl->cpi.wr_id = qp->rq_wrid_array[wqe_idx]; - cmpl->cpi.op_type = IRDMA_OP_TYPE_REC; - /* remove the RQ WR by moving RQ tail */ - IRDMA_RING_SET_TAIL(*rq_ring, rq_ring->tail + 1); - LIST_INSERT_HEAD(&iwuqp->recv_cq->cmpl_generated, cmpl, list); - } - } - pthread_spin_unlock(&iwuqp->recv_cq->lock); -} - -void * -irdma_flush_thread(void *arg) -{ - __u8 i = 5; - struct irdma_uqp *iwuqp = arg; - - while (--i) { - if (pthread_spin_lock(&iwuqp->lock)) - break; - irdma_generate_flush_completions(arg); - pthread_spin_unlock(&iwuqp->lock); - sleep(1); - } - pthread_exit(NULL); -} - /** * irdma_udestroy_cq - destroys cq * @cq: ptr to cq to be destroyed @@ -771,8 +634,6 @@ irdma_udestroy_cq(struct ibv_cq *cq) if (ret) goto err; - if (!LIST_EMPTY(&iwucq->cmpl_generated)) - irdma_remove_cmpls_list(iwucq); irdma_process_resize_list(iwucq, NULL); ret = ibv_cmd_destroy_cq(cq); if (ret) @@ -1016,15 +877,6 @@ __irdma_upoll_cq(struct irdma_ucq *iwucq, int num_entries, while (npolled < num_entries) { ret = irdma_poll_one(&iwucq->cq, cur_cqe, entry ? entry + npolled : NULL); - if (ret == ENOENT) { - ret = irdma_generated_cmpls(iwucq, cur_cqe); - if (!ret) { - if (entry) - irdma_process_cqe(entry + npolled, cur_cqe); - else - irdma_process_cqe_ext(cur_cqe); - } - } if (!ret) { ++npolled; cq_new_cqe = true; @@ -1710,14 +1562,7 @@ irdma_umodify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask) return ret; } else { - int ret; - - ret = ibv_cmd_modify_qp(qp, attr, attr_mask, &cmd, sizeof(cmd)); - if (ret) - return ret; - if (attr_mask & IBV_QP_STATE && attr->qp_state == IBV_QPS_ERR) - pthread_create(&iwuqp->flush_thread, NULL, irdma_flush_thread, iwuqp); - return 0; + return ibv_cmd_modify_qp(qp, attr, attr_mask, &cmd, sizeof(cmd)); } } @@ -1770,10 +1615,6 @@ irdma_udestroy_qp(struct ibv_qp *qp) int ret; iwuqp = container_of(qp, struct irdma_uqp, ibv_qp); - if (iwuqp->flush_thread) { - pthread_cancel(iwuqp->flush_thread); - pthread_join(iwuqp->flush_thread, NULL); - } ret = pthread_spin_destroy(&iwuqp->lock); if (ret) goto err; From nobody Thu Sep 28 22:16:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSWG58SCz4vgyF; Thu, 28 Sep 2023 22:16: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 4RxSWG4h5jz3M7w; Thu, 28 Sep 2023 22:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pYTzDHC/JbRZ1RCO7ijrYKWx5nl74JfM24VEobK07W4=; b=RWyPvSLhTVYtNqjj3VLrDpkWXDYic5mEWKSLIKSE9XUDZXqURqMPTW215Pv4vqebplYONX sbwDQ9BxROCcvS2dw7R8xWCMCXHtoAXTCKyImDcAi0nQ63MVfq7K9Cnlsecxh0EsRb3dyI 5NKGvFoVjv5lr6LP4NjF/gGdd3dhEf2BfDoOuJSneV4xzLshVc3yPsSwGYTIZH/J81N5k6 7lOkNbD0OVKjky50pZ+3pdfhwk/+ajXboaVGPsADAGMkK02ytVDZ56sa0mM3PF724hSX6h NHE/5ird72xiD+a5ntp0TppbSpYhEDsYCUAjJySmJtSEiJujHgzdRbCvsvIJPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939402; a=rsa-sha256; cv=none; b=TnCFx83Z913kYobd+L1pUllbXe+KfcYRxooTMFUjMaETznXHB3NpOQ4ei9/Zw2ZZaEJZeS W9ZavzvQeGH0aMq1wG/U3BIasegNNyK1fZMyk529gxQwxZyYDc5ghM07wNFB1t4/u6vvmc f+HWVtZSKJ55b71hJCNtxFLRDBe+8GF1ZSCBUJV3p5XqAc3oXfhuj/7Cv52OjZUpvCUWJh RR3cqjTJryXDRscOTD7zNBowoEqSCt6MWjRbtr4B7F84PbN4KC9NEuqp1wJt0GFKjm7v2Z pgCrLzNnc+gRDG5PFE4WsDFb2nI/tXNoTUjipTIbWiBjSGTPJ/KhxhhdgmKx1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pYTzDHC/JbRZ1RCO7ijrYKWx5nl74JfM24VEobK07W4=; b=JNjTdHAkrbLujMe5rzylyMNvU1TAqYVa1slUqUqOT7IsF2zsztk2v/vlXUuuf0bjgo7ROb Atu3uil0acLeJMPs866BsvWEkVZxcu9Yhh4dRqm8R6IMHTiEwkDcIWyViISR9QtvxFguE3 Asa+yT+ZJzld3gfHXaO7jR9lheLqeM1juVZnbYm44/HdVShqh5P6AvbHzw428BEsvvnKGd baS8bypmGN4BSL4tnAU0kRZDcbU2wKeeqgJasvdoWDLqlcQ/b1/gM7wf9Cv1+j9Ut+O0yQ HJMMgqUv3x5y9X8KoTm6NE4KbhO/csVuna6UbfSiTz3CJkbN6ic6ZbZ92/zMDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSWG3lLczfKl; Thu, 28 Sep 2023 22:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMGg0K056222; Thu, 28 Sep 2023 22:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMGg1t056219; Thu, 28 Sep 2023 22:16:42 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:16:42 GMT Message-Id: <202309282216.38SMGg1t056219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: afade1da188e - releng/14.0 - ice(4): Update to 1.38.16-k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: afade1da188ed3d0d267051aeb357367ca1050c2 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=afade1da188ed3d0d267051aeb357367ca1050c2 commit afade1da188ed3d0d267051aeb357367ca1050c2 Author: Eric Joyner AuthorDate: 2023-08-24 23:26:13 +0000 Commit: Eric Joyner CommitDate: 2023-09-28 22:16:21 +0000 ice(4): Update to 1.38.16-k New features - Add sysctl "link_active_on_if_down" (defaults to 1 to match previous behavior): set this to 0 to have the driver bring the physical link down when the interface is brought administratively down - Add sysctl "temp" to read chip temperature on E810 devices; this requires a 4.30 or newer NVM (see package sysutils/intel-nvmupdate-100g) Bug fixes and general changes - (linked to irdma) properly propagate PF reset request from irdma driver - (linked to irdma) properly notify irdma of an impending PF reset - (linked to irdma) move Protocol Engine error handling to irdma - Print log message when using a DDP that doesn't support the "TX balancing" mode - Block LLDP agent configuration when DSCP QoS mode is enabled - Fix kernel panic when updating NVM when adapter is in the "TX balancing" mode - Remove ice_sbq_cmd.h since it's unused - Fix LLDP RX filter to still allow LLDP frames to be received by SW after a PF reset in SW LLDP mode - Add ice_if_needs_restart handler in order to fix a bad VLAN and link down interaction - Issue PF reset during unload - nvmupdate process fixes - Use pci_msix_table_bar() to get MSI-X bar index at runtime instead of hardcoding it Signed-off-by: Eric Joyner Reviewed by: anzhu@netapp.com Approved by: re (cperciva) Sponsored by: Intel Corporation, NetApp Differential Revision: https://reviews.freebsd.org/D41655 (cherry picked from commit 9c30461dd25bac49045acbeac10e00b6cc13d2bc) (cherry picked from commit 6a196646cd15d56945d751abc82837e065cbcb1a) --- sys/dev/ice/ice_adminq_cmd.h | 123 ++++++---- sys/dev/ice/ice_common.c | 490 +++++++++++++++++++++------------------- sys/dev/ice/ice_common.h | 6 +- sys/dev/ice/ice_controlq.c | 110 ++++----- sys/dev/ice/ice_controlq.h | 3 - sys/dev/ice/ice_dcb.c | 2 +- sys/dev/ice/ice_ddp_common.c | 4 + sys/dev/ice/ice_ddp_common.h | 1 + sys/dev/ice/ice_defs.h | 4 +- sys/dev/ice/ice_features.h | 2 + sys/dev/ice/ice_flow.c | 41 +++- sys/dev/ice/ice_flow.h | 6 +- sys/dev/ice/ice_fw_logging.c | 4 +- sys/dev/ice/ice_fwlog.c | 1 + sys/dev/ice/ice_lan_tx_rx.h | 1 - sys/dev/ice/ice_lib.c | 239 ++++++++++++++++++-- sys/dev/ice/ice_lib.h | 16 +- sys/dev/ice/ice_rdma.c | 16 ++ sys/dev/ice/ice_rdma.h | 80 ++++++- sys/dev/ice/ice_rdma_internal.h | 17 ++ sys/dev/ice/ice_sbq_cmd.h | 120 ---------- sys/dev/ice/ice_sched.c | 104 +++++++-- sys/dev/ice/ice_sched.h | 42 +++- sys/dev/ice/ice_strings.c | 4 + sys/dev/ice/ice_switch.c | 334 +++++++++++++++------------ sys/dev/ice/ice_switch.h | 86 ++++--- sys/dev/ice/ice_type.h | 112 ++++++++- sys/dev/ice/if_ice_iflib.c | 130 +++++++++-- sys/dev/ice/irdma_di_if.m | 5 + sys/dev/ice/irdma_if.m | 4 + sys/dev/ice/virtchnl.h | 2 +- 31 files changed, 1360 insertions(+), 749 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 710830e95a16..e4dc14b0162c 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -168,6 +168,7 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_LED 0x0061 #define ICE_AQC_CAPS_SDP 0x0062 #define ICE_AQC_CAPS_WR_CSR_PROT 0x0064 +#define ICE_AQC_CAPS_SENSOR_READING 0x0067 #define ICE_AQC_CAPS_LOGI_TO_PHYSI_PORT_MAP 0x0073 #define ICE_AQC_CAPS_SKU 0x0074 #define ICE_AQC_CAPS_PORT_MAP 0x0075 @@ -180,7 +181,8 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_EXT_TOPO_DEV_IMG3 0x0084 #define ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085 #define ICE_AQC_CAPS_NAC_TOPOLOGY 0x0087 -#define ICE_AQC_CAPS_DYN_FLATTENING 0x0090 +#define ICE_AQC_CAPS_DYN_FLATTENING 0x008A +#define ICE_AQC_CAPS_OROM_RECOVERY_UPDATE 0x0090 #define ICE_AQC_CAPS_ROCEV2_LAG 0x0092 u8 major_ver; @@ -793,12 +795,30 @@ struct ice_aqc_sw_rules { __le32 addr_low; }; +/* Add switch rule response: + * Content of return buffer is same as the input buffer. The status field and + * LUT index are updated as part of the response + */ +struct ice_aqc_sw_rules_elem_hdr { + __le16 type; /* Switch rule type, one of T_... */ +#define ICE_AQC_SW_RULES_T_LKUP_RX 0x0 +#define ICE_AQC_SW_RULES_T_LKUP_TX 0x1 +#define ICE_AQC_SW_RULES_T_LG_ACT 0x2 +#define ICE_AQC_SW_RULES_T_VSI_LIST_SET 0x3 +#define ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR 0x4 +#define ICE_AQC_SW_RULES_T_PRUNE_LIST_SET 0x5 +#define ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR 0x6 + __le16 status; +}; + /* Add/Update/Get/Remove lookup Rx/Tx command/response entry * This structures describes the lookup rules and associated actions. "index" * is returned as part of a response to a successful Add command, and can be * used to identify the rule for Update/Get/Remove commands. */ struct ice_sw_rule_lkup_rx_tx { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 recipe_id; #define ICE_SW_RECIPE_LOGICAL_PORT_FWD 10 /* Source port for LOOKUP_RX and source VSI in case of LOOKUP_TX */ @@ -877,14 +897,17 @@ struct ice_sw_rule_lkup_rx_tx { * lookup-type */ __le16 hdr_len; - u8 hdr[STRUCT_HACK_VAR_LEN]; + u8 hdr_data[STRUCT_HACK_VAR_LEN]; }; +#pragma pack(1) /* Add/Update/Remove large action command/response entry * "index" is returned as part of a response to a successful Add command, and * can be used to identify the action for Update/Get/Remove commands. */ struct ice_sw_rule_lg_act { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 index; /* Index in large action table */ __le16 size; /* Max number of large actions */ @@ -939,50 +962,30 @@ struct ice_sw_rule_lg_act { #define ICE_LG_ACT_STAT_COUNT_M (0x7F << ICE_LG_ACT_STAT_COUNT_S) __le32 act[STRUCT_HACK_VAR_LEN]; /* array of size for actions */ }; +#pragma pack() +#pragma pack(1) /* Add/Update/Remove VSI list command/response entry * "index" is returned as part of a response to a successful Add command, and * can be used to identify the VSI list for Update/Get/Remove commands. */ struct ice_sw_rule_vsi_list { + struct ice_aqc_sw_rules_elem_hdr hdr; + __le16 index; /* Index of VSI/Prune list */ __le16 number_vsi; __le16 vsi[STRUCT_HACK_VAR_LEN]; /* Array of number_vsi VSI numbers */ }; +#pragma pack() #pragma pack(1) /* Query VSI list command/response entry */ struct ice_sw_rule_vsi_list_query { __le16 index; - ice_declare_bitmap(vsi_list, ICE_MAX_VSI); + u8 vsi_list[DIVIDE_AND_ROUND_UP(ICE_MAX_VSI, BITS_PER_BYTE)]; }; #pragma pack() -#pragma pack(1) -/* Add switch rule response: - * Content of return buffer is same as the input buffer. The status field and - * LUT index are updated as part of the response - */ -struct ice_aqc_sw_rules_elem { - __le16 type; /* Switch rule type, one of T_... */ -#define ICE_AQC_SW_RULES_T_LKUP_RX 0x0 -#define ICE_AQC_SW_RULES_T_LKUP_TX 0x1 -#define ICE_AQC_SW_RULES_T_LG_ACT 0x2 -#define ICE_AQC_SW_RULES_T_VSI_LIST_SET 0x3 -#define ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR 0x4 -#define ICE_AQC_SW_RULES_T_PRUNE_LIST_SET 0x5 -#define ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR 0x6 - __le16 status; - union { - struct ice_sw_rule_lkup_rx_tx lkup_tx_rx; - struct ice_sw_rule_lg_act lg_act; - struct ice_sw_rule_vsi_list vsi_list; - struct ice_sw_rule_vsi_list_query vsi_list_query; - } pdata; -}; - -#pragma pack() - /* PFC Ignore (direct 0x0301) * The command and response use the same descriptor structure */ @@ -994,8 +997,8 @@ struct ice_aqc_pfc_ignore { u8 reserved[14]; }; -/* Set PFC Mode (direct 0x0303) - * Query PFC Mode (direct 0x0302) +/* Query PFC Mode (direct 0x0302) + * Set PFC Mode (direct 0x0303) */ struct ice_aqc_set_query_pfc_mode { u8 pfc_mode; @@ -1098,9 +1101,9 @@ struct ice_aqc_txsched_elem { u8 generic; #define ICE_AQC_ELEM_GENERIC_MODE_M 0x1 #define ICE_AQC_ELEM_GENERIC_PRIO_S 0x1 -#define ICE_AQC_ELEM_GENERIC_PRIO_M (0x7 << ICE_AQC_ELEM_GENERIC_PRIO_S) +#define ICE_AQC_ELEM_GENERIC_PRIO_M (0x7 << ICE_AQC_ELEM_GENERIC_PRIO_S) #define ICE_AQC_ELEM_GENERIC_SP_S 0x4 -#define ICE_AQC_ELEM_GENERIC_SP_M (0x1 << ICE_AQC_ELEM_GENERIC_SP_S) +#define ICE_AQC_ELEM_GENERIC_SP_M (0x1 << ICE_AQC_ELEM_GENERIC_SP_S) #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S 0x5 #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_M \ (0x3 << ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S) @@ -1673,6 +1676,32 @@ struct ice_aqc_set_mac_lb { u8 reserved[15]; }; +/* Get sensor reading (direct 0x0632) */ +struct ice_aqc_get_sensor_reading { + u8 sensor; +#define ICE_AQC_INT_TEMP_SENSOR 0x0 + u8 format; +#define ICE_AQC_INT_TEMP_FORMAT 0x0 + u8 reserved[6]; + __le32 addr_high; + __le32 addr_low; +}; + +/* Get sensor reading response (direct 0x0632) */ +struct ice_aqc_get_sensor_reading_resp { + union { + u8 raw[8]; + /* Output data for sensor 0x00, format 0x00 */ + struct { + s8 temp; + u8 temp_warning_threshold; + u8 temp_critical_threshold; + u8 temp_fatal_threshold; + u8 reserved[4]; + } s0f0; + } data; +}; + /* DNL Get Status command (indirect 0x0680) * Structure used for the response, the command uses the generic * ice_aqc_generic struct to pass a buffer address to the FW. @@ -2476,6 +2505,19 @@ struct ice_aqc_get_set_rss_keys { u8 extended_hash_key[ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE]; }; +enum ice_lut_type { + ICE_LUT_VSI = 0, + ICE_LUT_PF = 1, + ICE_LUT_GLOBAL = 2, + ICE_LUT_TYPE_MASK = 3 +}; + +enum ice_lut_size { + ICE_LUT_VSI_SIZE = 64, + ICE_LUT_GLOBAL_SIZE = 512, + ICE_LUT_PF_SIZE = 2048, +}; + /* Get/Set RSS LUT (indirect 0x0B05/0x0B03) */ struct ice_aqc_get_set_rss_lut { #define ICE_AQC_GSET_RSS_LUT_VSI_VALID BIT(15) @@ -2484,21 +2526,13 @@ struct ice_aqc_get_set_rss_lut { __le16 vsi_id; #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S 0 #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M \ - (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) - -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_VSI 0 -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF 1 -#define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL 2 + (ICE_LUT_TYPE_MASK << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S 2 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M \ - (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) + (ICE_LUT_TYPE_MASK << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128 128 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG 0 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512 512 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG 1 -#define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K 2048 #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG 2 #define ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S 4 @@ -2686,7 +2720,7 @@ struct ice_aqc_move_rdma_qset_buffer { }; /* Download Package (indirect 0x0C40) */ -/* Also used for Update Package (indirect 0x0C42 and 0x0C41) */ +/* Also used for Update Package (indirect 0x0C41 and 0x0C42) */ struct ice_aqc_download_pkg { u8 flags; #define ICE_AQC_DOWNLOAD_PKG_LAST_BUF 0x01 @@ -2989,6 +3023,8 @@ struct ice_aq_desc { struct ice_aqc_get_phy_caps get_phy; struct ice_aqc_set_phy_cfg set_phy; struct ice_aqc_restart_an restart_an; + struct ice_aqc_get_sensor_reading get_sensor_reading; + struct ice_aqc_get_sensor_reading_resp get_sensor_reading_resp; struct ice_aqc_dnl_get_status get_status; struct ice_aqc_dnl_run_command dnl_run; struct ice_aqc_dnl_call_command dnl_call; @@ -3239,6 +3275,7 @@ enum ice_adminq_opc { ice_aqc_opc_get_link_status = 0x0607, ice_aqc_opc_set_event_mask = 0x0613, ice_aqc_opc_set_mac_lb = 0x0620, + ice_aqc_opc_get_sensor_reading = 0x0632, ice_aqc_opc_dnl_get_status = 0x0680, ice_aqc_opc_dnl_run = 0x0681, ice_aqc_opc_dnl_call = 0x0682, diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index a3f50f251533..0df73583e137 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -343,6 +343,88 @@ ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, return ICE_SUCCESS; } +/** + * ice_phy_maps_to_media + * @phy_type_low: PHY type low bits + * @phy_type_high: PHY type high bits + * @media_mask_low: media type PHY type low bitmask + * @media_mask_high: media type PHY type high bitmask + * + * Return true if PHY type [low|high] bits are only of media type PHY types + * [low|high] bitmask. + */ +static bool +ice_phy_maps_to_media(u64 phy_type_low, u64 phy_type_high, + u64 media_mask_low, u64 media_mask_high) +{ + /* check if a PHY type exist for media type */ + if (!(phy_type_low & media_mask_low || + phy_type_high & media_mask_high)) + return false; + + /* check that PHY types are only of media type */ + if (!(phy_type_low & ~media_mask_low) && + !(phy_type_high & ~media_mask_high)) + return true; + + return false; +} + +/** + * ice_set_media_type - Sets media type + * @pi: port information structure + * + * Set ice_port_info PHY media type based on PHY type. This should be called + * from Get PHY caps with media. + */ +static void ice_set_media_type(struct ice_port_info *pi) +{ + enum ice_media_type *media_type; + u64 phy_type_high, phy_type_low; + + phy_type_high = pi->phy.phy_type_high; + phy_type_low = pi->phy.phy_type_low; + media_type = &pi->phy.media_type; + + /* if no media, then media type is NONE */ + if (!(pi->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE)) + *media_type = ICE_MEDIA_NONE; + /* else if PHY types are only BASE-T, then media type is BASET */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_BASET_PHY_TYPE_LOW_M, 0)) + *media_type = ICE_MEDIA_BASET; + /* else if any PHY type is BACKPLANE, then media type is BACKPLANE */ + else if (phy_type_low & ICE_MEDIA_BP_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_BP_PHY_TYPE_HIGH_M) + *media_type = ICE_MEDIA_BACKPLANE; + /* else if PHY types are only optical, or optical and C2M, then media + * type is FIBER + */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_OPT_PHY_TYPE_LOW_M, 0) || + (phy_type_low & ICE_MEDIA_OPT_PHY_TYPE_LOW_M && + phy_type_low & ICE_MEDIA_C2M_PHY_TYPE_LOW_M)) + *media_type = ICE_MEDIA_FIBER; + /* else if PHY types are only DA, or DA and C2C, then media type DA */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_DAC_PHY_TYPE_LOW_M, 0) || + (phy_type_low & ICE_MEDIA_DAC_PHY_TYPE_LOW_M && + (phy_type_low & ICE_MEDIA_C2C_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M))) + *media_type = ICE_MEDIA_DA; + /* else if PHY types are only C2M or only C2C, then media is AUI */ + else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_C2M_PHY_TYPE_LOW_M, + ICE_MEDIA_C2M_PHY_TYPE_HIGH_M) || + ice_phy_maps_to_media(phy_type_low, phy_type_high, + ICE_MEDIA_C2C_PHY_TYPE_LOW_M, + ICE_MEDIA_C2C_PHY_TYPE_HIGH_M)) + *media_type = ICE_MEDIA_AUI; + + else + *media_type = ICE_MEDIA_UNKNOWN; +} + /** * ice_aq_get_phy_caps - returns PHY capabilities * @pi: port information structure @@ -434,6 +516,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, ice_memcpy(pi->phy.link_info.module_type, &pcaps->module_type, sizeof(pi->phy.link_info.module_type), ICE_NONDMA_TO_NONDMA); + ice_set_media_type(pi); + ice_debug(hw, ICE_DBG_LINK, "%s: media_type = 0x%x\n", prefix, + pi->phy.media_type); } return status; @@ -513,156 +598,6 @@ ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, return ICE_ERR_DOES_NOT_EXIST; } -/** - * ice_is_media_cage_present - * @pi: port information structure - * - * Returns true if media cage is present, else false. If no cage, then - * media type is backplane or BASE-T. - */ -static bool ice_is_media_cage_present(struct ice_port_info *pi) -{ - struct ice_aqc_get_link_topo *cmd; - struct ice_aq_desc desc; - - cmd = &desc.params.get_link_topo; - - ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_link_topo); - - cmd->addr.topo_params.node_type_ctx = - (ICE_AQC_LINK_TOPO_NODE_CTX_PORT << - ICE_AQC_LINK_TOPO_NODE_CTX_S); - - /* set node type */ - cmd->addr.topo_params.node_type_ctx |= - (ICE_AQC_LINK_TOPO_NODE_TYPE_M & - ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE); - - /* Node type cage can be used to determine if cage is present. If AQC - * returns error (ENOENT), then no cage present. If no cage present then - * connection type is backplane or BASE-T. - */ - return ice_aq_get_netlist_node(pi->hw, cmd, NULL, NULL); -} - -/** - * ice_get_media_type - Gets media type - * @pi: port information structure - */ -static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) -{ - struct ice_link_status *hw_link_info; - - if (!pi) - return ICE_MEDIA_UNKNOWN; - - hw_link_info = &pi->phy.link_info; - if (hw_link_info->phy_type_low && hw_link_info->phy_type_high) - /* If more than one media type is selected, report unknown */ - return ICE_MEDIA_UNKNOWN; - - if (hw_link_info->phy_type_low) { - /* 1G SGMII is a special case where some DA cable PHYs - * may show this as an option when it really shouldn't - * be since SGMII is meant to be between a MAC and a PHY - * in a backplane. Try to detect this case and handle it - */ - if (hw_link_info->phy_type_low == ICE_PHY_TYPE_LOW_1G_SGMII && - (hw_link_info->module_type[ICE_AQC_MOD_TYPE_IDENT] == - ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE || - hw_link_info->module_type[ICE_AQC_MOD_TYPE_IDENT] == - ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE)) - return ICE_MEDIA_DA; - - switch (hw_link_info->phy_type_low) { - case ICE_PHY_TYPE_LOW_1000BASE_SX: - case ICE_PHY_TYPE_LOW_1000BASE_LX: - case ICE_PHY_TYPE_LOW_10GBASE_SR: - case ICE_PHY_TYPE_LOW_10GBASE_LR: - case ICE_PHY_TYPE_LOW_25GBASE_SR: - case ICE_PHY_TYPE_LOW_25GBASE_LR: - case ICE_PHY_TYPE_LOW_40GBASE_SR4: - case ICE_PHY_TYPE_LOW_40GBASE_LR4: - case ICE_PHY_TYPE_LOW_50GBASE_SR2: - case ICE_PHY_TYPE_LOW_50GBASE_LR2: - case ICE_PHY_TYPE_LOW_50GBASE_SR: - case ICE_PHY_TYPE_LOW_50GBASE_FR: - case ICE_PHY_TYPE_LOW_50GBASE_LR: - case ICE_PHY_TYPE_LOW_100GBASE_SR4: - case ICE_PHY_TYPE_LOW_100GBASE_LR4: - case ICE_PHY_TYPE_LOW_100GBASE_SR2: - case ICE_PHY_TYPE_LOW_100GBASE_DR: - return ICE_MEDIA_FIBER; - case ICE_PHY_TYPE_LOW_10G_SFI_AOC_ACC: - case ICE_PHY_TYPE_LOW_25G_AUI_AOC_ACC: - case ICE_PHY_TYPE_LOW_40G_XLAUI_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_LAUI2_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_AUI2_AOC_ACC: - case ICE_PHY_TYPE_LOW_50G_AUI1_AOC_ACC: - case ICE_PHY_TYPE_LOW_100G_CAUI4_AOC_ACC: - case ICE_PHY_TYPE_LOW_100G_AUI4_AOC_ACC: - return ICE_MEDIA_FIBER; - case ICE_PHY_TYPE_LOW_100BASE_TX: - case ICE_PHY_TYPE_LOW_1000BASE_T: - case ICE_PHY_TYPE_LOW_2500BASE_T: - case ICE_PHY_TYPE_LOW_5GBASE_T: - case ICE_PHY_TYPE_LOW_10GBASE_T: - case ICE_PHY_TYPE_LOW_25GBASE_T: - return ICE_MEDIA_BASET; - case ICE_PHY_TYPE_LOW_10G_SFI_DA: - case ICE_PHY_TYPE_LOW_25GBASE_CR: - case ICE_PHY_TYPE_LOW_25GBASE_CR_S: - case ICE_PHY_TYPE_LOW_25GBASE_CR1: - case ICE_PHY_TYPE_LOW_40GBASE_CR4: - case ICE_PHY_TYPE_LOW_50GBASE_CR2: - case ICE_PHY_TYPE_LOW_50GBASE_CP: - case ICE_PHY_TYPE_LOW_100GBASE_CR4: - case ICE_PHY_TYPE_LOW_100GBASE_CR_PAM4: - case ICE_PHY_TYPE_LOW_100GBASE_CP2: - return ICE_MEDIA_DA; - case ICE_PHY_TYPE_LOW_25G_AUI_C2C: - case ICE_PHY_TYPE_LOW_40G_XLAUI: - case ICE_PHY_TYPE_LOW_50G_LAUI2: - case ICE_PHY_TYPE_LOW_50G_AUI2: - case ICE_PHY_TYPE_LOW_50G_AUI1: - case ICE_PHY_TYPE_LOW_100G_AUI4: - case ICE_PHY_TYPE_LOW_100G_CAUI4: - if (ice_is_media_cage_present(pi)) - return ICE_MEDIA_AUI; - /* fall-through */ - case ICE_PHY_TYPE_LOW_1000BASE_KX: - case ICE_PHY_TYPE_LOW_2500BASE_KX: - case ICE_PHY_TYPE_LOW_2500BASE_X: - case ICE_PHY_TYPE_LOW_5GBASE_KR: - case ICE_PHY_TYPE_LOW_10GBASE_KR_CR1: - case ICE_PHY_TYPE_LOW_10G_SFI_C2C: - case ICE_PHY_TYPE_LOW_25GBASE_KR: - case ICE_PHY_TYPE_LOW_25GBASE_KR1: - case ICE_PHY_TYPE_LOW_25GBASE_KR_S: - case ICE_PHY_TYPE_LOW_40GBASE_KR4: - case ICE_PHY_TYPE_LOW_50GBASE_KR_PAM4: - case ICE_PHY_TYPE_LOW_50GBASE_KR2: - case ICE_PHY_TYPE_LOW_100GBASE_KR4: - case ICE_PHY_TYPE_LOW_100GBASE_KR_PAM4: - return ICE_MEDIA_BACKPLANE; - } - } else { - switch (hw_link_info->phy_type_high) { - case ICE_PHY_TYPE_HIGH_100G_AUI2: - case ICE_PHY_TYPE_HIGH_100G_CAUI2: - if (ice_is_media_cage_present(pi)) - return ICE_MEDIA_AUI; - /* fall-through */ - case ICE_PHY_TYPE_HIGH_100GBASE_KR2_PAM4: - return ICE_MEDIA_BACKPLANE; - case ICE_PHY_TYPE_HIGH_100G_CAUI2_AOC_ACC: - case ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC: - return ICE_MEDIA_FIBER; - } - } - return ICE_MEDIA_UNKNOWN; -} - #define ice_get_link_status_datalen(hw) ICE_GET_LINK_STATUS_DATALEN_V1 /** @@ -681,7 +616,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, struct ice_aqc_get_link_status_data link_data = { 0 }; struct ice_aqc_get_link_status *resp; struct ice_link_status *li_old, *li; - enum ice_media_type *hw_media_type; struct ice_fc_info *hw_fc_info; bool tx_pause, rx_pause; struct ice_aq_desc desc; @@ -694,7 +628,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, hw = pi->hw; li_old = &pi->phy.link_info_old; - hw_media_type = &pi->phy.media_type; li = &pi->phy.link_info; hw_fc_info = &pi->fc; @@ -716,7 +649,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, li->link_speed = LE16_TO_CPU(link_data.link_speed); li->phy_type_low = LE64_TO_CPU(link_data.phy_type_low); li->phy_type_high = LE64_TO_CPU(link_data.phy_type_high); - *hw_media_type = ice_get_media_type(pi); li->link_info = link_data.link_info; li->link_cfg_err = link_data.link_cfg_err; li->an_info = link_data.an_info; @@ -747,7 +679,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, (unsigned long long)li->phy_type_low); ice_debug(hw, ICE_DBG_LINK, " phy_type_high = 0x%llx\n", (unsigned long long)li->phy_type_high); - ice_debug(hw, ICE_DBG_LINK, " media_type = 0x%x\n", *hw_media_type); ice_debug(hw, ICE_DBG_LINK, " link_info = 0x%x\n", li->link_info); ice_debug(hw, ICE_DBG_LINK, " link_cfg_err = 0x%x\n", li->link_cfg_err); ice_debug(hw, ICE_DBG_LINK, " an_info = 0x%x\n", li->an_info); @@ -1066,7 +997,8 @@ enum ice_status ice_init_hw(struct ice_hw *hw) if (status) goto err_unroll_cqinit; - hw->port_info = (struct ice_port_info *) + if (!hw->port_info) + hw->port_info = (struct ice_port_info *) ice_malloc(hw, sizeof(*hw->port_info)); if (!hw->port_info) { status = ICE_ERR_NO_MEMORY; @@ -1205,7 +1137,7 @@ void ice_deinit_hw(struct ice_hw *hw) */ enum ice_status ice_check_reset(struct ice_hw *hw) { - u32 cnt, reg = 0, grst_timeout, uld_mask; + u32 cnt, reg = 0, grst_timeout, uld_mask, reset_wait_cnt; /* Poll for Device Active state in case a recent CORER, GLOBR, * or EMPR has occurred. The grst delay value is in 100ms units. @@ -1237,8 +1169,10 @@ enum ice_status ice_check_reset(struct ice_hw *hw) uld_mask = ICE_RESET_DONE_MASK | (hw->func_caps.common_cap.iwarp ? GLNVM_ULD_PE_DONE_M : 0); + reset_wait_cnt = ICE_PF_RESET_WAIT_COUNT; + /* Device is Active; check Global Reset processes are done */ - for (cnt = 0; cnt < ICE_PF_RESET_WAIT_COUNT; cnt++) { + for (cnt = 0; cnt < reset_wait_cnt; cnt++) { reg = rd32(hw, GLNVM_ULD) & uld_mask; if (reg == uld_mask) { ice_debug(hw, ICE_DBG_INIT, "Global reset processes done. %d\n", cnt); @@ -1247,7 +1181,7 @@ enum ice_status ice_check_reset(struct ice_hw *hw) ice_msec_delay(10, true); } - if (cnt == ICE_PF_RESET_WAIT_COUNT) { + if (cnt == reset_wait_cnt) { ice_debug(hw, ICE_DBG_INIT, "Wait for Reset Done timed out. GLNVM_ULD = 0x%x\n", reg); return ICE_ERR_RESET_FAILED; @@ -1265,7 +1199,7 @@ enum ice_status ice_check_reset(struct ice_hw *hw) */ static enum ice_status ice_pf_reset(struct ice_hw *hw) { - u32 cnt, reg; + u32 cnt, reg, reset_wait_cnt, cfg_lock_timeout; /* If at function entry a global reset was already in progress, i.e. * state is not 'device active' or any of the reset done bits are not @@ -1290,8 +1224,10 @@ static enum ice_status ice_pf_reset(struct ice_hw *hw) * timeout plus the PFR timeout which will account for a possible reset * that is occurring during a download package operation. */ - for (cnt = 0; cnt < ICE_GLOBAL_CFG_LOCK_TIMEOUT + - ICE_PF_RESET_WAIT_COUNT; cnt++) { + reset_wait_cnt = ICE_PF_RESET_WAIT_COUNT; + cfg_lock_timeout = ICE_GLOBAL_CFG_LOCK_TIMEOUT; + + for (cnt = 0; cnt < cfg_lock_timeout + reset_wait_cnt; cnt++) { reg = rd32(hw, PFGEN_CTRL); if (!(reg & PFGEN_CTRL_PFSWR_M)) break; @@ -1299,7 +1235,7 @@ static enum ice_status ice_pf_reset(struct ice_hw *hw) ice_msec_delay(1, true); } - if (cnt == ICE_PF_RESET_WAIT_COUNT) { + if (cnt == cfg_lock_timeout + reset_wait_cnt) { ice_debug(hw, ICE_DBG_INIT, "PF reset polling failed to complete.\n"); return ICE_ERR_RESET_FAILED; } @@ -2452,6 +2388,11 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, true : false; ice_debug(hw, ICE_DBG_INIT, "%s: nvm_unified_update = %d\n", prefix, caps->nvm_unified_update); + caps->netlist_auth = + (number & ICE_NVM_MGMT_NETLIST_AUTH_SUPPORT) ? + true : false; + ice_debug(hw, ICE_DBG_INIT, "%s: netlist_auth = %d\n", prefix, + caps->netlist_auth); break; case ICE_AQC_CAPS_CEM: caps->mgmt_cem = (number == 1); @@ -2534,6 +2475,8 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, (phys_id & ICE_EXT_TOPO_DEV_IMG_LOAD_EN) != 0; caps->ext_topo_dev_img_prog_en[index] = (phys_id & ICE_EXT_TOPO_DEV_IMG_PROG_EN) != 0; + caps->ext_topo_dev_img_ver_schema[index] = + (phys_id & ICE_EXT_TOPO_DEV_IMG_VER_SCHEMA) != 0; ice_debug(hw, ICE_DBG_INIT, "%s: ext_topo_dev_img_ver_high[%d] = %d\n", prefix, index, @@ -2554,6 +2497,10 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, "%s: ext_topo_dev_img_prog_en[%d] = %d\n", prefix, index, caps->ext_topo_dev_img_prog_en[index]); + ice_debug(hw, ICE_DBG_INIT, + "%s: ext_topo_dev_img_ver_schema[%d] = %d\n", + prefix, index, + caps->ext_topo_dev_img_ver_schema[index]); break; } case ICE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE: @@ -2564,6 +2511,11 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, ice_debug(hw, ICE_DBG_INIT, "%s: dyn_flattening_en = %d\n", prefix, caps->dyn_flattening_en); break; + case ICE_AQC_CAPS_OROM_RECOVERY_UPDATE: + caps->orom_recovery_update = (number == 1); + ice_debug(hw, ICE_DBG_INIT, "%s: orom_recovery_update = %d\n", + prefix, caps->orom_recovery_update); + break; default: /* Not one of the recognized common capabilities */ found = false; @@ -2782,6 +2734,26 @@ ice_parse_nac_topo_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, dev_p->nac_topo.id); } +/** + * ice_parse_sensor_reading_cap - Parse ICE_AQC_CAPS_SENSOR_READING cap + * @hw: pointer to the HW struct + * @dev_p: pointer to device capabilities structure + * @cap: capability element to parse + * + * Parse ICE_AQC_CAPS_SENSOR_READING for device capability for reading + * enabled sensors. + */ +static void +ice_parse_sensor_reading_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, + struct ice_aqc_list_caps_elem *cap) +{ + dev_p->supported_sensors = LE32_TO_CPU(cap->number); + + ice_debug(hw, ICE_DBG_INIT, + "dev caps: supported sensors (bitmap) = 0x%x\n", + dev_p->supported_sensors); +} + /** * ice_parse_dev_caps - Parse device capabilities * @hw: pointer to the HW struct @@ -2827,6 +2799,9 @@ ice_parse_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, case ICE_AQC_CAPS_NAC_TOPOLOGY: ice_parse_nac_topo_dev_caps(hw, dev_p, &cap_resp[i]); break; + case ICE_AQC_CAPS_SENSOR_READING: + ice_parse_sensor_reading_cap(hw, dev_p, &cap_resp[i]); + break; default: /* Don't list common capabilities as unknown */ if (!found) @@ -3776,8 +3751,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, break; case ICE_FEC_DIS_AUTO: /* Set No FEC and auto FEC */ - if (!ice_fw_supports_fec_dis_auto(hw)) - return ICE_ERR_NOT_SUPPORTED; + if (!ice_fw_supports_fec_dis_auto(hw)) { + status = ICE_ERR_NOT_SUPPORTED; + goto out; + } cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS; /* fall-through */ case ICE_FEC_AUTO: @@ -3852,6 +3829,7 @@ enum ice_status ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, struct ice_sq_cd *cd) { + enum ice_status status = ICE_ERR_AQ_ERROR; struct ice_aqc_restart_an *cmd; struct ice_aq_desc desc; @@ -3866,7 +3844,16 @@ ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, else cmd->cmd_flags &= ~ICE_AQC_RESTART_AN_LINK_ENABLE; - return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + status = ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); + if (status) + return status; + + if (ena_link) + pi->phy.curr_user_phy_cfg.caps |= ICE_AQC_PHY_EN_LINK; + else + pi->phy.curr_user_phy_cfg.caps &= ~ICE_AQC_PHY_EN_LINK; + + return ICE_SUCCESS; } /** @@ -4062,6 +4049,51 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, return ICE_SUCCESS; } +static u16 ice_lut_type_to_size(u16 lut_type) +{ + switch (lut_type) { + case ICE_LUT_VSI: + return ICE_LUT_VSI_SIZE; + case ICE_LUT_GLOBAL: + return ICE_LUT_GLOBAL_SIZE; + case ICE_LUT_PF: + return ICE_LUT_PF_SIZE; + default: + return 0; + } +} + +static u16 ice_lut_size_to_flag(u16 lut_size) +{ + u16 f = 0; + + switch (lut_size) { + case ICE_LUT_GLOBAL_SIZE: + f = ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG; + break; + case ICE_LUT_PF_SIZE: + f = ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG; + break; + default: + break; + } + return f << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S; +} + +int ice_lut_size_to_type(int lut_size) +{ + switch (lut_size) { + case ICE_LUT_VSI_SIZE: + return ICE_LUT_VSI; + case ICE_LUT_GLOBAL_SIZE: + return ICE_LUT_GLOBAL; + case ICE_LUT_PF_SIZE: + return ICE_LUT_PF; + default: + return -1; + } +} + /** * __ice_aq_get_set_rss_lut * @hw: pointer to the hardware structure @@ -4073,7 +4105,7 @@ ice_aq_read_topo_dev_nvm(struct ice_hw *hw, static enum ice_status __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *params, bool set) { - u16 flags = 0, vsi_id, lut_type, lut_size, glob_lut_idx, vsi_handle; + u16 flags, vsi_id, lut_type, lut_size, glob_lut_idx = 0, vsi_handle; struct ice_aqc_get_set_rss_lut *cmd_resp; struct ice_aq_desc desc; enum ice_status status; @@ -4084,16 +4116,22 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params vsi_handle = params->vsi_handle; lut = params->lut; + lut_type = params->lut_type; + lut_size = ice_lut_type_to_size(lut_type); + cmd_resp = &desc.params.get_set_rss_lut; + if (lut_type == ICE_LUT_GLOBAL) + glob_lut_idx = params->global_lut_id; - if (!ice_is_vsi_valid(hw, vsi_handle) || !lut) + if (!lut || !lut_size || !ice_is_vsi_valid(hw, vsi_handle)) return ICE_ERR_PARAM; - lut_size = params->lut_size; - lut_type = params->lut_type; - glob_lut_idx = params->global_lut_id; - vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); + if (lut_size > params->lut_size) + return ICE_ERR_INVAL_SIZE; - cmd_resp = &desc.params.get_set_rss_lut; + if (set && lut_size != params->lut_size) + return ICE_ERR_PARAM; + + vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); if (set) { ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_rss_lut); @@ -4107,61 +4145,15 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params ICE_AQC_GSET_RSS_LUT_VSI_ID_M) | ICE_AQC_GSET_RSS_LUT_VSI_VALID); - switch (lut_type) { - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_VSI: - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF: - case ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL: - flags |= ((lut_type << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M); - break; - default: - status = ICE_ERR_PARAM; - goto ice_aq_get_set_rss_lut_exit; - } - - if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL) { - flags |= ((glob_lut_idx << ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S) & - ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_M); + flags = ice_lut_size_to_flag(lut_size) | + ((lut_type << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S) & + ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M) | + ((glob_lut_idx << ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S) & + ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_M); - if (!set) - goto ice_aq_get_set_rss_lut_send; - } else if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) { - if (!set) - goto ice_aq_get_set_rss_lut_send; - } else { - goto ice_aq_get_set_rss_lut_send; - } - - /* LUT size is only valid for Global and PF table types */ - switch (lut_size) { - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128: - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512: - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K: - if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) { - flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG << - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & - ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; - break; - } - /* fall-through */ - default: - status = ICE_ERR_PARAM; - goto ice_aq_get_set_rss_lut_exit; - } - -ice_aq_get_set_rss_lut_send: cmd_resp->flags = CPU_TO_LE16(flags); status = ice_aq_send_cmd(hw, &desc, lut, lut_size, NULL); - -ice_aq_get_set_rss_lut_exit: + params->lut_size = LE16_TO_CPU(desc.datalen); return status; } @@ -5155,7 +5147,7 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle, q_ctx->q_teid = LE32_TO_CPU(node.node_teid); /* add a leaf node into scheduler tree queue layer */ - status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node); + status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node, NULL); if (!status) status = ice_sched_replay_q_bw(pi, q_ctx); @@ -5390,7 +5382,7 @@ ice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc, for (i = 0; i < num_qsets; i++) { node.node_teid = buf->rdma_qsets[i].qset_teid; *** 3427 LINES SKIPPED *** From nobody Thu Sep 28 22:18:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSYk3WVZz4vggY; Thu, 28 Sep 2023 22:18: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 4RxSYk2yMgz3Mlm; Thu, 28 Sep 2023 22:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btKEhuAjL39mnkDGyJxZ/LHuKBUM/rSk6WhrU1IoH34=; b=OHq6yA8VIV3WhXHbe0we3lwB7e7L4Jlr27tA79/e5btmpu2FdL6iE4xOG5FZgjUIxpm90G C/kdNQgIajSC/+QGAQEoFWr+zLTy+2WDVpIiPiHwP97vbF/zLthPFjmVlj69IHJ0y1NrVN HG/b9T7ANFYYRebJPetS9FL0Z+5Md9S/fTv3ApBah5F0aZFJ77JkYWnkA+CrKyc5CE34Ht qBJm0/y7HHLTS/PNA1+QzHXYZBYLsgmTPFvkMx9b7vtwzcrf6sIi6NazYSeZ6ppr0WP/I+ xGZ7hkDnk0sY+Bb4L6bgR0bi/bjUfnR6btS3/Xeub76A6c8roWR5d5nnckpjVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939530; a=rsa-sha256; cv=none; b=b6svqQ0BJOc6JPi1+4dV+ljI/AMhmsFIKi1R12uGVvRXNDWtENer7OHbOdKYIA3gU6cfIy +6gW+KxPHNoBL9/e2Q2GhIgrBIXP7SPZQAVnvZjNr3KqoOHoDq9BHERGwpTQjxLTs9uqsb iGA3t0ziExbV4wXeUBg0aJGZaLhikmL9bMGt3qR8w2OEtXExeBuYkZKi0hHK894scksfWY fUKF0C7oy5M8BCr4ZUm4m5kStn7XlkLw/bXpCO+rpfcy7N4fUmJB2FY19EHsBs6xEDDROp kS44bgML3J3lt5Pot2x4pZgzvrusq2u4rEegcgSkV1Wq9+ADtSA5efIHWkVBfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btKEhuAjL39mnkDGyJxZ/LHuKBUM/rSk6WhrU1IoH34=; b=Oy2iKxZJzk84HXgEZ9qKczqy4W4wpW10PNBtqjbPHyWbO6VZaOWtugiihtaKyYaDcijSUI RKf8rpoIUufzgSrl55EalaMWIVTw2BEBA33qJ9BW6k7KBgrtnD55v/Up8JzQA9ljlCaPKz 6JoUkrYc3Y7WfVcjyozWwSXID40UPEFFKcBI2vbYZiD2adl/5M4vKCXOOsA1qeVZ/K0/TL IvviLfePhEO0D7KI9dVqDEIgSxkct+OUQaJl99FDAQCMn74s2mILPba77PBvUA+yPHUBRf 4XXd8swgdSFNS2WnIj7YX7TcUzCSx32E77rv7EvwmWqkWP6WaAZ/nhK2w4TSpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYk20zwzfDm; Thu, 28 Sep 2023 22:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIoAX056758; Thu, 28 Sep 2023 22:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIo8U056755; Thu, 28 Sep 2023 22:18:50 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:50 GMT Message-Id: <202309282218.38SMIo8U056755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: fcbeeb5ff456 - main - release/Makefile.vm: Garbage collect unused bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcbeeb5ff456b2f21d19d4fc6221774b512e30b7 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fcbeeb5ff456b2f21d19d4fc6221774b512e30b7 commit fcbeeb5ff456b2f21d19d4fc6221774b512e30b7 Author: Colin Percival AuthorDate: 2023-09-09 00:49:35 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 release/Makefile.vm: Garbage collect unused bits The cw*-package targets were introduced in February 2015 as part of adding support for building GCE images; but GCE support was reworked in June 2015 and the cw*-package targets were in fact never used. Remove them. The *_DISK variables were introduced in February 2015 as part of adding the cloudware-install target; this was removed in May 2016 as the cloudware images are published via the respective cloud systems and not published as disk images via the FreeBSD FTP site. As such, the *_DISK variables are not unused; remove them. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41789 --- release/Makefile.vm | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index ad09f3ff6602..befa9625fefb 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -26,35 +26,27 @@ CLOUDWARE?= BASIC-CI \ AZURE_FORMAT= vhdf AZURE_FSLIST= ufs zfs AZURE_DESC= Microsoft Azure platform image -AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} BASIC-CI_FORMAT= raw BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI -BASIC-CI_DISK= ${OSRELEASE}.${BASIC-CI_FORMAT} EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image -EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image -GCE_DISK= disk.${GCE_FORMAT} OCI_FORMAT= qcow2 OCI_FSLIST= ufs OCI_DESC= Oracle Cloud Infrastructure image -OCI_DISK= ${OSRELEASE}.${OCI_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} VAGRANT-VIRTUALBOX_FORMAT= vmdk VAGRANT-VIRTUALBOX_FSLIST= ufs VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VIRTUALBOX_DISK= ${OSRELEASE}.vbox.${VAGRANT_FORMAT} VAGRANT-VMWARE_FORMAT= vmdk VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare -VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) @@ -90,9 +82,7 @@ CLOUDTARGETS+= cw-${_CW:tl}-${_FS} CLEANDIRS+= cw-${_CW:tl}-${_FS} CLEANFILES+= ${_CW:tl}.${_FS}.img \ ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} \ - ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw \ - cw${_CW:tl}-package -CLOUDPACKAGE+= cw${_CW:tl}-package + ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw ${_CW:tu}${_FS:tu}IMAGE= ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} cw-${_CW:tl}-${_FS}: emulator-portinstall @@ -114,17 +104,6 @@ CLEANFILES+= ${_CW:tl}.${${_CW:tu}_FORMAT} ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} cw-${_CW:tl}: cw-${_CW:tl}-${VMFS} ln -f ${${_CW:tu}${VMFS:tu}IMAGE} ${${_CW:tu}IMAGE} - -cw${_CW:tl}-package: - @# Special target to handle packaging cloud images in the formats - @# specific to each hosting provider. -.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/tools/${_CW:tl}-package.sh \ - -D ${DESTDIR} -I ${${_CW}_DISK} -S ${WORLDDIR} -.endif - touch ${.TARGET} - . endfor .endif From nobody Thu Sep 28 22:18:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSYl4w6Qz4vgqF; Thu, 28 Sep 2023 22:18: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 4RxSYl43Mnz3NGF; Thu, 28 Sep 2023 22:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5M2TLD7ZtNFFyip88kuTivhkNK5IvkkE1Ddb9dj+Bh4=; b=ZnRByh21DI+510DZ45+YAz1wJBOcR9iX6I8NMDXVd3lXwUkDoQo+mH5wVbu4SG0sZH2ENp WbzJbnzOFsY2yjZCmDDCe9iFLLo+dhHfZ9tkioL7EGzpu/4qZwK5mnOC/E+XVUSSRbSoe/ rDYPwwvBEBylnFcKtNPO3RIBBttRwhPni8GemiV5CO+anR6vr2f7DLnDnhaZVITvDahI8D Nswr7rzQDnaeFE43ezPhG7Dgr0NVEhq6YheVOJBmkjdq4eQV/+EzJAfMs1vfOFyR8u2WXt XPT/DW+8JlNpTjl0jPZFoOP59F6ozNNqVIQYdLxY/HmmC2O8mQaCG+zYoSNZGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939531; a=rsa-sha256; cv=none; b=nymI0X56QS6oi3xr/wU8shwHGrq50fU0BE1eEG16DmtjFGrnG2/Q2SNfQgs6xZJemCsGJP jPgo1M6Lbvmj3hiJ5uJcwicgZI3GqBGa7gZyGetE8MgbL0PiV9VvZb4AqBo7HN2JZyJ8NN QzhqyKPgMjT3pqc/8FY0CBk8oiYv/5D5/UyQbz4PGau7WR7CxfdVkfEl2InZbNf4YC6u9V 2Wd1qNQFfSkAty/2R6g9rBOyR4JKI9DNtXvgan4TMXvS3IUvaf2zIOPgukrSiJF+GFzEJx FejPjyBNQlriaMC+xv0Q/wIjzJUfPFVxg5OzvOj0lW67oFjie+24kdEaVtTiKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5M2TLD7ZtNFFyip88kuTivhkNK5IvkkE1Ddb9dj+Bh4=; b=MKAOjEUO47HO7i7VbeMNlpzQzOFNsq7wZnFnXHv3VIb/6g65xBeQdblYKUt8fgCP3cIvrz MVkLxw7tt7vkW2Nh/7KmqcnytUZ82aku5fh8GN8CEUYnfHMxDrliqClymS5VzfVsMQm6UY apudoQqhw6SMIaa722QOiG9RkuXPDP5M4ypEAn1AbDS1IwedVo7pzpHqHrITj5dtUVQYpP ynNSbNZNU1r+p+ziPC1p5l69ZSGKOR6FIT8KdDF2qNBpRYlVYwE528O5kI/XseDeyZTwiC Pxcr/6SlhsoGWoiR3+g5/POVoTcDCSpOYdKNfhjHxeZPsyOPT0oO44MPaeLBkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYl305dzfwG; Thu, 28 Sep 2023 22:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIpRl056803; Thu, 28 Sep 2023 22:18:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIp8H056800; Thu, 28 Sep 2023 22:18:51 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:51 GMT Message-Id: <202309282218.38SMIp8H056800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: e6eeac9b7179 - main - release/Makefile.vm: Add support for CW flavours List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6eeac9b71795252b12a6b94e7a06633a9ff6e4e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e6eeac9b71795252b12a6b94e7a06633a9ff6e4e commit e6eeac9b71795252b12a6b94e7a06633a9ff6e4e Author: Colin Percival AuthorDate: 2023-09-09 00:51:08 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 release/Makefile.vm: Add support for CW flavours There are two "Vagrant" images right now: "Vagrant Image for VirtualBox" and "Vagrant Image for VMWare". Rather than listing these separately in a CLOUDWARE list, place "VAGRANT" into a CLOUDWARE_TYPES list and then use a VAGRANT_FLAVOURS variable to identify the two versions. Add make logic to allow defaults (in this case, image format and filesystem) to be specified once for VAGRANT and inherited by both flavours. This will make future work to add flavoured EC2 images simpler. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41790 --- release/Makefile.vm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index befa9625fefb..bb719da68ead 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -17,12 +17,11 @@ VMDK_DESC= VMWare, VirtualBox disk image QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image -CLOUDWARE?= BASIC-CI \ +CLOUDWARE_TYPES?= BASIC-CI \ EC2 \ GCE \ OCI \ - VAGRANT-VIRTUALBOX \ - VAGRANT-VMWARE + VAGRANT AZURE_FORMAT= vhdf AZURE_FSLIST= ufs zfs AZURE_DESC= Microsoft Azure platform image @@ -41,13 +40,26 @@ OCI_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -VAGRANT-VIRTUALBOX_FORMAT= vmdk -VAGRANT-VIRTUALBOX_FSLIST= ufs +VAGRANT_FORMAT= vmdk +VAGRANT_FSLIST= ufs +VAGRANT_FLAVOURS= VIRTUALBOX VMWARE VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VMWARE_FORMAT= vmdk -VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare +.for _CWT in ${CLOUDWARE_TYPES} +. if defined(${_CWT}_FLAVOURS) +. for _CWF in ${${_CWT}_FLAVOURS} +CLOUDWARE_GEN+= ${_CWT}-${_CWF} +${_CWT}-${_CWF}_FORMAT?= ${${_CWT}_FORMAT} +${_CWT}-${_CWF}_FSLIST?= ${${_CWT}_FSLIST} +${_CWT}-${_CWF}_DESC?= ${${_CWT}_DESC} +. endfor +. else +CLOUDWARE_GEN+= ${_CWT} +. endif +.endfor +CLOUDWARE?= ${CLOUDWARE_GEN} + .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} From nobody Thu Sep 28 22:18:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSYm5jhSz4vgqM; Thu, 28 Sep 2023 22:18: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 4RxSYm4ttvz3NGt; Thu, 28 Sep 2023 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWVUTamcjIuIIsixddQIyvMqOB3A716TX4BJ++7FoRE=; b=IJFSpyT9uS6Qs9rJ31JMHxb/UJQWZCkh05y2Q3U4+58BhKFveuvP+U8PfP7YZ7JtHA80dU fDUVoVsldDEMtCz0878iZW51CRTmowXC2onbxMLO3xI0ap5feW7TyRMCPDpM45NNBamvsa 1g/pNkKWbNZ9om+yYMIKadiYxV4JUPP1et4WsEOiYSzSnEh0qywSDdQC4FELcAkA2uDWZ5 Pj75G6LhZK79CdsdM4eAU38PEI5EXV76demQRpYMV18m5gGGH9jZLFmNM/ImntR9XhwfwV 3hfRQuOJG6eZ1+kCyIHhlHxmJ+6VwSHc0S4ClR0KxqYo2kv04xZgMwEwlSM0xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939532; a=rsa-sha256; cv=none; b=PXrSFlG7EdAc5HkbfMeAfYDD/KCSIPV7MT6YWhTopD657vuZAjrenRWNg2cs86xhqsZHh2 GmDz3GMnv6i7o2m1Lzviu1zf33CoAfi+11X9PFSF402ptp0XhfWaLw0mEAjnwDnevWFyyq cqETr4Oh2emMAk0qGkwX/UHWZHdTxUss1S8n50SbQJdiEEANZNn9A7zj90njtlntenrU2U YeYFCc8f7/Y7GYUtu1E+lmP2iGpUliT8gJWhEYlKRV9jz6JO9PVQxdIvH6eL+4izCBGM2j qB+eBj7BLuYdNdhEFsBuKoc8CEQhds/+hF5rAs/5Olc8DClD7rUqx1pDqi/RZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWVUTamcjIuIIsixddQIyvMqOB3A716TX4BJ++7FoRE=; b=oU5HBhU3oGylMu8Lf0CjU6bD66fru30eAPLjwZAtRjKER9zGGfZfcD5PwcnF/CNQZ5lE1/ ysFCrMBEnuIT1U3egogLvBwfaboXqlCL2RQVUUWVpu5RZM/q1DzKpZp4+NtL3I6iV9z+7c QBB+BLFEbSgpzoOYpRbeEedbGTeprC/tUtHOEf866QFHle8x7Xd9Zu5BIYjRa9AsN/Bne3 kMAaJBMcxhKleq540hJ1L+R5eaXMCPtuWeetOtE15JZAIpjgjtd5pu2R8BS1NmXg+Vwp2O tQw81OZalnpyrmfphO15iscb7EGu1tponaGQE450/8r8/RerKTMerXIfsymikg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYm40J5zfwH; Thu, 28 Sep 2023 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIqO4056848; Thu, 28 Sep 2023 22:18:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIqGH056845; Thu, 28 Sep 2023 22:18:52 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:52 GMT Message-Id: <202309282218.38SMIqGH056845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 7494fb6b7d80 - main - EC2: Flavour existing AMIs as "base" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7494fb6b7d809257d4eb9eff06ce226143f27add Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7494fb6b7d809257d4eb9eff06ce226143f27add commit 7494fb6b7d809257d4eb9eff06ce226143f27add Author: Colin Percival AuthorDate: 2023-09-09 00:51:57 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 EC2: Flavour existing AMIs as "base" Using the recently-added "cloudware flavours" mechanism, turn the existing EC2 AMIs into a new "base" flavour. The only user-visible change is that AMI names now include the word "base". releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41791 --- release/Makefile.ec2 | 16 +++++++++------- release/Makefile.vm | 1 + release/tools/{ec2.conf => ec2-base.conf} | 0 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index b3f32d0e3efb..c674c967ff57 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -51,11 +51,12 @@ cw-ec2-portinstall: @touch ${.TARGET} .for _FS in ${EC2_FSLIST} +.for _FL in ${EC2_FLAVOURS:tl} .if defined(SSMPREFIX) && !empty(SSMPREFIX) -SSMOPTS_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/${_FS}/${REVISION}/${BRANCH} +SSMOPTS_${_FL}_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/${_FL}/${_FS}/${REVISION}/${BRANCH} .endif -EC2AMILIST+= ec2ami-${_FS} -ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} +EC2AMILIST+= ec2ami-${_FL}-${_FS} +ec2ami-${_FL}-${_FS}: cw-ec2-${_FL}-${_FS} ${CW_EC2_PORTINSTALL} .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) @echo "--------------------------------------------------------------" @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" @@ -75,14 +76,15 @@ ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} @false .endif /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ - ${EC2ARCH} ${SSMOPTS_${_FS}} ${BOOTMODEOPT} --sriov --ena \ - ${.OBJDIR}/${EC2${_FS:tu}IMAGE} \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FS:tu}" \ + ${EC2ARCH} ${SSMOPTS_${_FL}_${_FS}} ${BOOTMODEOPT} --sriov --ena \ + ${.OBJDIR}/${EC2-${_FL:tu}${_FS:tu}IMAGE} \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FL} ${_FS:tu}" \ "${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} .endfor +.endfor -ec2ami: ec2ami-${VMFS} +ec2ami: ec2ami-base-${VMFS} ec2amis: ${EC2AMILIST} diff --git a/release/Makefile.vm b/release/Makefile.vm index bb719da68ead..679ac74f438c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -31,6 +31,7 @@ BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image +EC2_FLAVOURS= BASE GCE_FORMAT= raw GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2.conf b/release/tools/ec2-base.conf similarity index 100% rename from release/tools/ec2.conf rename to release/tools/ec2-base.conf From nobody Thu Sep 28 22:18:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSYp0zyzz4vgn2; Thu, 28 Sep 2023 22:18: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 4RxSYn5zmWz3N0b; Thu, 28 Sep 2023 22:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IuEQA+WDXuGyTpNIj0jvDRKfNERPphFQXYyNUZgZ7K0=; b=epU2JgV0SFjJRjMaCh8cdFXzyJTSU+4z12P3xOg1SznmKkV02K5i+uWHtGq1vGmElWD2/b m+EVh2UWvx4LN9g4kvS43ssJSiOk6X9JL8Pi5d553ntNunjmdnANzUWuTD0cE/mz09kL0d bZpVNg2i5qVTTHK5cISUETRimVWCHooUu87RreLiYWSbeTe0hfwfkgxRIY9+OAIqF8cTR4 ocG90dC9RN2qW1AZoWOx5rw799oDbsCK7l3L0PX5JaEDwEiaaXLlaVp9reXPJ7zKItjsw/ nTMBSbsqaOIPB+TgGhMFkPjnc+x/1gJMyWu3rSK8drzB9J8k/8kRC9Je55+Uzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939533; a=rsa-sha256; cv=none; b=eeLWMmihW0jUZlJ39VdIb0WKfQQVsFHYwalfUxPN5vmpnKCE35QZJkjmbDNgRqgDRxS8AX LynpUd83tEakwaq7VNo7A27BOrhoCYPRCkLmt3As1sXKSqJUa1AdbY8cAzFu4yGktZH3G7 72ZhKH6IVOuHNcJtq259/jhjjtH0nO2jlvCbwuRA10p+3n9/gQmpOYqzTOStQYEeZpVTqF r1IJoSjB0ZmI1FSzi8XBgfNmnRcjPIW7N4hhYo5GlP+lKDNfYs9zvn3txFLAezhv3nEdtg 3Dz2o3XkmVOi2WHeuwjmbzj2ZrIGwNzkg/t1pbMcFR7vpSdXZW0oJNNkKp81eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IuEQA+WDXuGyTpNIj0jvDRKfNERPphFQXYyNUZgZ7K0=; b=nE0+4wMq1xnnWd7ZGXT0Ik5zX6uccgHevDmTlxr+iTTVUmX6sD/ojHm+jK3a6mA7jDwJCD Jp81jsCPGIlM1IZCj8R/EEu4Rk5qa4TFZxE8GvLiE7i1nu5bnTvyUOWzV19QtDVcxA91y5 XQrRe1MjKPX1DZQ5E5lHV0vcJJWzCR279VeN+WrbAnXyOra+ycJXciEneuHKEgVi2eTMqb hoCyhPyL+xD/fJn4/tyDPqUbSvf2uY0Iai12fRrTcddIiroGmqW8z2xPBr34pLFhH8Ki2j scg4yrDcRzc/CHI9lPIagauSli10s7aGV+cm6rMWM700ymn0NhDQYTw2HYmSWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYn51dCzg05; Thu, 28 Sep 2023 22:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIrgd056897; Thu, 28 Sep 2023 22:18:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIr6T056894; Thu, 28 Sep 2023 22:18:53 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:53 GMT Message-Id: <202309282218.38SMIr6T056894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: fada6e2389fb - main - EC2: Split off reusable configuration bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fada6e2389fb62ff621a98fab7319e426da58b0b Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fada6e2389fb62ff621a98fab7319e426da58b0b commit fada6e2389fb62ff621a98fab7319e426da58b0b Author: Colin Percival AuthorDate: 2023-09-09 00:54:11 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 EC2: Split off reusable configuration bits Split ec2-base.conf into ec2-base.conf and a reusable ec2.conf, similar to how Vagrant flavours share a common vagrant.conf. releng/14.0 candidate. Discussed with: gjb MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41792 --- release/tools/ec2-base.conf | 161 ++++++-------------------------------------- release/tools/ec2.conf | 111 ++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 142 deletions(-) diff --git a/release/tools/ec2-base.conf b/release/tools/ec2-base.conf index d033739adc26..f4c46fe285cd 100644 --- a/release/tools/ec2-base.conf +++ b/release/tools/ec2-base.conf @@ -1,78 +1,36 @@ #!/bin/sh -# -# -# Packages to install into the image we're creating. This is a deliberately -# minimalist set, providing only the packages necessary to bootstrap further -# package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ - firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client \ - ebsnvme-id" - -# Include the amazon-ssm-agent package in amd64 images, since some users want -# to be able to use it on systems which are not connected to the Internet. -# (It is not enabled by default, however.) This package does not exist for -# aarch64, so we have to be selective about when we install it. -if [ "${TARGET_ARCH}" = "amd64" ]; then - export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent" -fi - -# Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd dev_aws_disk ec2_ephemeral_swap" +. ${WORLDDIR}/release/tools/ec2.conf -# Build with a 4.9 GB partition; the growfs rc.d script will expand -# the partition to fill the root disk after the EC2 instance is launched. -# Note that if this is set to G, we will end up with an GB disk -# image since VMSIZE is the size of the filesystem partition, not the disk -# which it resides within. -export VMSIZE=5000m +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install: +# * ec2-scripts, which provides a range of EC2ification startup scripts, +# * firstboot-freebsd-update, to install security updates at first boot, +# * firstboot-pkgs, to install packages at first boot, and +# * isc-dhcp44-client, used for IPv6 network setup. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ + firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client" -# No swap space; the ec2_ephemeralswap rc.d script will allocate swap -# space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances -# and the C4 compute-optimized instances don't have ephemeral disks. But -# it would be silly to bloat the image and increase costs for every instance -# just for those two families, especially since instances ranging in size -# from 1 GB of RAM to 60 GB of RAM would need different sizes of swap space -# anyway.) -export NOSWAP=YES +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \ + ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \ + growfs sshd" vm_extra_pre_umount() { - # The firstboot_pkgs rc.d script will download the repository - # catalogue and install or update pkg when the instance first - # launches, so these files would just be replaced anyway; removing - # them from the image allows it to boot faster. - mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg delete -f -y pkg - umount ${DESTDIR}/dev - rm ${DESTDIR}/var/db/pkg/repo-*.sqlite - - # The size of the EC2 root disk can be configured at instance launch - # time; expand our filesystem to fill the disk. - echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf - - # EC2 instances use DHCP to get their network configuration. IPv6 - # requires accept_rtadv. - echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf - - # Unless the system has been configured via EC2 user-data, the user - # will need to SSH in to do anything. - echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf - # The AWS CLI tools are generally useful, and small enough that they # will download quickly; but users will often override this setting # via EC2 user-data. echo 'firstboot_pkgs_list="devel/py-awscli"' >> ${DESTDIR}/etc/rc.conf + # EC2 instances use DHCP to get their network configuration. IPv6 + # requires accept_rtadv. + echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf + # Enable IPv6 on all interfaces, and spawn DHCPv6 via rtsold echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_enable="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_flags="-M /usr/local/libexec/rtsold-M -a"' >> ${DESTDIR}/etc/rc.conf - # Turn off IPv6 Duplicate Address Detection; the EC2 networking - # configuration makes it unnecessary. - echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf - # Provide a script which rtsold can use to launch DHCPv6 mkdir -p ${DESTDIR}/usr/local/libexec cat > ${DESTDIR}/usr/local/libexec/rtsold-M <<'EOF' @@ -82,94 +40,13 @@ vm_extra_pre_umount() { EOF chmod 755 ${DESTDIR}/usr/local/libexec/rtsold-M - # The EC2 console is output-only, so while printing a backtrace can - # be useful, there's no point dropping into a debugger or waiting - # for a keypress. - echo 'debug.trace_on_panic=1' >> ${DESTDIR}/boot/loader.conf - echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/boot/loader.conf - echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/boot/loader.conf - - # The console is not interactive, so we might as well boot quickly. - echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf - echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf - - # Tell gptboot not to wait 3 seconds for a keypress which won't - # arrive either. - printf -- "-n\n" > ${DESTDIR}/boot.config - - # The emulated keyboard attached to EC2 instances is inaccessible to - # users, and there is no mouse attached at all; disable to keyboard - # and the keyboard controller (to which the mouse would attach, if - # one existed) in order to save time in device probing. - echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - - # EC2 has two consoles: An emulated serial port ("system log"), - # which has been present since 2006; and a VGA console ("instance - # screenshot") which was introduced in 2016. - echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf - - # Some older EC2 hardware used a version of Xen with a bug in its - # emulated serial port. It is not clear if EC2 still has any such - # nodes, but apply the workaround just in case. - echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf - - # Load the kernel module for the Amazon "Elastic Network Adapter" - echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf - - # Use the "nda" driver for accessing NVMe disks rather than the - # historical "nvd" driver. - echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf - - # Disable KbdInteractiveAuthentication according to EC2 requirements. - sed -i '' -e \ - 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ - ${DESTDIR}/etc/ssh/sshd_config - - # Use FreeBSD Update mirrors hosted in AWS - sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ - ${DESTDIR}/etc/freebsd-update.conf - - # Use the NTP service provided by Amazon - sed -i '' -e 's/^pool/#pool/' \ - -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ - ${DESTDIR}/etc/ntp.conf - - # Provide a map for accessing Elastic File System mounts - cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' -#!/bin/sh - -if [ $# -eq 0 ]; then - # No way to know which EFS filesystems exist and are - # accessible to this EC2 instance. - exit 0 -fi - -# Provide instructions on how to mount the requested filesystem. -FS=$1 -REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` -echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" -EOF - chmod 755 ${DESTDIR}/etc/autofs/special_efs - - # The first time the AMI boots, the installed "first boot" scripts - # should be allowed to run: - # * ec2_configinit (download and process EC2 user-data) - # * ec2_fetchkey (arrange for SSH using the EC2-provided public key) - # * growfs (expand the filesystem to fill the provided disk) - # * firstboot_freebsd_update (install critical updates) - # * firstboot_pkgs (install packages) - touch ${DESTDIR}/firstboot - # Any EC2 ephemeral disks seen when the system first boots will # be "new" disks; there is no "previous boot" when they might have # been seen and used already. touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen - if ! [ -z "${QEMUSTATIC}" ]; then - rm -f ${DESTDIR}/${EMULATOR} - fi - rm -f ${DESTDIR}/etc/resolv.conf + # Configuration common to all EC2 AMIs + ec2_common return 0 } diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf new file mode 100644 index 000000000000..a233bf5981c1 --- /dev/null +++ b/release/tools/ec2.conf @@ -0,0 +1,111 @@ +#!/bin/sh + +# Packages which should be installed onto all EC2 AMIs: +# * ebsnvme-id, which is very minimal and provides important EBS-specific +# functionality, +# * amazon-ssm-agent (not enabled by default, but some users need to use +# it on systems not connected to the internet). +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ebsnvme-id amazon-ssm-agent" + +# Services which should be enabled by default in rc.conf(5). +export VM_RC_LIST="dev_aws_disk ntpd" + +# Build with a 4.9 GB partition; the growfs rc.d script will expand +# the partition to fill the root disk after the EC2 instance is launched. +# Note that if this is set to G, we will end up with an GB disk +# image since VMSIZE is the size of the filesystem partition, not the disk +# which it resides within. +export VMSIZE=5000m + +# No swap space; it doesn't make sense to provision any as part of the disk +# image when we could be launching onto a system with anywhere between 0.5 +# and 4096 GB of RAM. +export NOSWAP=YES + +ec2_common() { + # Delete the pkg package and the repo database; they will likely be + # long out of date before the EC2 instance is launched. + mount -t devfs devfs ${DESTDIR}/dev + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg + umount ${DESTDIR}/dev + rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + + # Turn off IPv6 Duplicate Address Detection; the EC2 networking + # configuration makes it unnecessary. + echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf + + # Booting quickly is more important than giving users a chance to + # access the boot loader via the serial port. + echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + + # Tell gptboot not to wait 3 seconds for a keypress which will + # never arrive. + printf -- "-n\n" > ${DESTDIR}/boot.config + + # The emulated keyboard attached to EC2 instances is inaccessible to + # users, and there is no mouse attached at all; disable to keyboard + # and the keyboard controller (to which the mouse would attach, if + # one existed) in order to save time in device probing. + echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + + # EC2 has two consoles: An emulated serial port ("system log"), + # which has been present since 2006; and a VGA console ("instance + # screenshot") which was introduced in 2016. + echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf + + # Some older EC2 hardware used a version of Xen with a bug in its + # emulated serial port. It is not clear if EC2 still has any such + # nodes, but apply the workaround just in case. + echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf + + # Load the kernel module for the Amazon "Elastic Network Adapter" + echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf + + # Use the "nda" driver for accessing NVMe disks rather than the + # historical "nvd" driver. + echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf + + # Disable KbdInteractiveAuthentication according to EC2 requirements. + sed -i '' -e \ + 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ + ${DESTDIR}/etc/ssh/sshd_config + + # Use FreeBSD Update mirrors hosted in AWS + sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ + ${DESTDIR}/etc/freebsd-update.conf + + # Use the NTP service provided by Amazon + sed -i '' -e 's/^pool/#pool/' \ + -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ + ${DESTDIR}/etc/ntp.conf + + # Provide a map for accessing Elastic File System mounts + cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' +#!/bin/sh + +if [ $# -eq 0 ]; then + # No way to know which EFS filesystems exist and are + # accessible to this EC2 instance. + exit 0 +fi + +# Provide instructions on how to mount the requested filesystem. +FS=$1 +REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` +echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" +EOF + chmod 755 ${DESTDIR}/etc/autofs/special_efs + + # The first time the AMI boots, run "first boot" scripts. + touch ${DESTDIR}/firstboot + + if ! [ -z "${QEMUSTATIC}" ]; then + rm -f ${DESTDIR}/${EMULATOR} + fi + rm -f ${DESTDIR}/etc/resolv.conf + + return 0 +} From nobody Thu Sep 28 22:18:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSYq2yLGz4vggp; Thu, 28 Sep 2023 22:18: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 4RxSYp6XYZz3N0x; Thu, 28 Sep 2023 22:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZkdCXcA1hbQ3rMruF3Gd/mnTz1ZdN1xYM3qK8zA3s0=; b=aj5wCyJzw6kuXwQBi6TBoDsNHNJl4bAqPpOTF89WjWCNfYXMbRWBWU1s9UNjGIzo2hxf7t aIIC7lKoR7794ZueAjRAfeMxSf1sHkFIyWb5rXxD7WDawajSJTKOONBT2SN+hoD3yFX/li ic5utSE1n887OnIm6a4cLUR/rD1BcZ+29WEFmM3Z7uqnTLpEjwkBm6bhKAxaQ8EzfftWqk EVkQ5LsIORLsk8RxpNLdDoT5X/CRXutTYv+MfR5ubv0itVml67n8UGwhv3kXsDNAbeuw+d pIr+dydS0vZXIvisfTu51YIdNU0lkouOmR2rG49s/MxFvyZtm46HAObrl8vyXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939534; a=rsa-sha256; cv=none; b=u0e35fmWztT6HW0ySPDILn3cFUw922sZJU0gYEfepQnR8MSS9kg0xBwYMn7vQX2aBzkBOb fDeJprbyVPp39AkK76CRQpoPodrZRNvbF0an5mec17y9Mtgs8qozmjAgCiyjxxgtV51AfR tkq3FVMr6D3eo6OZaKZsnuM06vwsGBMlzgt22AOUxRZtC3TFjdz6b9xF9IGqhf4YEFN8Uk RgVCKIxEyQL4rPInjoGvxrDaLtgaH1mvsdqLob4G+v8UL+dq4g3IPB7/A/cak0vqFhjX67 xNuclgvErd/xsGIUzYELlt/NFEv7+XizDCOCSOIOmBjjsQNUEDTI2RoC1kowCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZkdCXcA1hbQ3rMruF3Gd/mnTz1ZdN1xYM3qK8zA3s0=; b=UDlgZn3CnhfBILMkAUoxGOkUEDtmQId2TnC1GDaaq3r6GX1GpeFEKkixUD/IpL4h3gnCt/ hUN87TJfPH+Zy3Ho0hzcsxQXuH8Kx/Y/Sk7ITFDOA/LaTcf8PMhxr4HFje1Ydo3qQY847S b5TrGu0ld3OI0+W09D/aSHY24a9Jr+FHEI4muOFp/rmn2R2ROe4ApgzyS4Gf0oUiTaS8cq Qkvb1OOq9O+uyB3HSJH+KZeUwiJVkYq25MlIxXZq0yP6xC99QMD+6UciofA88V/2oumEPB Y0OW43a1UULb0MLZLThyT/kL39pTMtO2luDpHxo6cRuSac6XerQHfgbSzecF3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYp5dfxzfDn; Thu, 28 Sep 2023 22:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIsJD056940; Thu, 28 Sep 2023 22:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIsEO056937; Thu, 28 Sep 2023 22:18:54 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:54 GMT Message-Id: <202309282218.38SMIsEO056937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 1f4ce7a39f0f - main - EC2: Add experimental cloud-init images List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f4ce7a39f0f4b0621ff55d228014ccddb366d37 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1f4ce7a39f0f4b0621ff55d228014ccddb366d37 commit 1f4ce7a39f0f4b0621ff55d228014ccddb366d37 Author: Colin Percival AuthorDate: 2023-09-09 00:55:16 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 EC2: Add experimental cloud-init images Known issues: 1. The ec2-user user is created with a homedir of /usr/home/ec2-user instead of /home/ec2-user; this appears to be a bug in cloud-init's FreeBSD support. 2. Cloud-init configures IPv4 networking but not IPv6 networking. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Relnotes: yes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41793 --- release/Makefile.vm | 5 +++-- release/tools/ec2-cloud-init.conf | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 679ac74f438c..1a58a548b9f4 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -30,8 +30,9 @@ BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs -EC2_DESC= Amazon EC2 image -EC2_FLAVOURS= BASE +EC2_FLAVOURS= BASE CLOUD-INIT +EC2-BASE_DESC= Amazon EC2 image +EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2-cloud-init.conf b/release/tools/ec2-cloud-init.conf new file mode 100644 index 000000000000..2dd4df390fa3 --- /dev/null +++ b/release/tools/ec2-cloud-init.conf @@ -0,0 +1,31 @@ +#!/bin/sh + +. ${WORLDDIR}/release/tools/ec2.conf + +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install cloud-init. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} net/cloud-init" + +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd" + +vm_extra_pre_umount() { + # Configuration common to all EC2 AMIs + ec2_common + + # Configure cloud-init + cat <<-'EOF' > ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg + disable_root: true + system_info: + distro: freebsd + default_user: + name: ec2-user + lock_passwd: True + groups: [wheel] + shell: /bin/sh + # Currently broken, cloud-init hard-codes to /usr/home/* + homedir: /home/ec2-user + EOF + + return 0 +} From nobody Thu Sep 28 22:28:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmR6BpDz4vhW9; Thu, 28 Sep 2023 22:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSmR5g9lz3QDS; Thu, 28 Sep 2023 22:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i40I3sZMFtmJOsR482DEblvxZLBadQqk4ZRkxkd+s1w=; b=Vn/vtuSU36ODJU2n5AwPn+OduyrJZKp9Ac4hnyMXiD+fyNBswLI7Q10M+M87JC4vRZkU4q +V1I4bmnVXFfFgjfGm0E47PLjlrd/9BXyCLsNV4B8fZIzcgMbauXFlW03uqfC/sr0M390+ 3Cesoi/9vnDuvnrwNmPIj55MGsrNCPBAcAD/mInLcEuxD32R+QNrszENXtdEziBMeyQ9KM jyF6KmQmA956+XCRDmCy2ruSgzF9/YSeUsAC2/Cw/aP6o50v1d4mTLLv/yvUkRnm8IkRMM xGZP0YJjaxicrTROqkgT1m1TjXKPUp7TIXbDgOEQ80/WP0hwieI5zCJReykxrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940087; a=rsa-sha256; cv=none; b=nICBC+xTMXZqj6YoHpwWWpRhIRSEnCYzlo9yMLN+fhmU141IOWLTFxaAG3kBFc5Zb+Xmoq q9oLG+QIBgmOFU6hnVkIcIIWIBiUK3Fx99JeMEpgCw+fW3xPqrsClvSKvEqMYQ5ABDP0AM pVUuVCIDypNYK/iXkRLfVfBfhQ+5qsh7nBoxFbLP+grDZcOvO4x3WyD5oxL+3nDdoVI14a nzZjfGuTSgv75eZhCdkucHeN06Vhp4YFz6xTwgnln1ckn+3eR82JcyQxsUhuLont705bkf FvCVjL05uUmvM96jNonvX27cKWR9FYChtrzw6aw3ahQJ5bqvZcUiWCejXmth9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i40I3sZMFtmJOsR482DEblvxZLBadQqk4ZRkxkd+s1w=; b=aT7L+sKVYXEXDBvz8HD9ZevYagSK5fc3VFhLWTxQ+mCsVvsJEEYBw2rihdYpQSQ5vuAXba eTpZ3SY/8sMZQ+XKx8GmGBnOK2YpWt+50UW5azRR8bEEdCOkPgbQSzI8cUXdm559q1NW/X TSHi9+4NZX69ZstNxRyaEnNw+imhqm0s6fdWeXRMOwe8gSnV5DpAW2omVMIgwS5OYDOZ/q DYKBm6flJfvog0iYdKlwqh9zCkj/o9zz2K2PMAXsxOvCaycv9MzBQ9+BkGYa0MP5X0bvh2 ctRPhB47rAMsFPirsfsiLGYC6fFCmP+xJSdh+KWjcYEonIm2mncSjEyIKYv5Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmR4jqmzg8s; Thu, 28 Sep 2023 22:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMS7BS073611; Thu, 28 Sep 2023 22:28:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMS7KX073608; Thu, 28 Sep 2023 22:28:07 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:07 GMT Message-Id: <202309282228.38SMS7KX073608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: a040e43c1a89 - releng/14.0 - nvme: Timeout expired transactions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: a040e43c1a899945755493452bfe87c29ee64a93 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a040e43c1a899945755493452bfe87c29ee64a93 commit a040e43c1a899945755493452bfe87c29ee64a93 Author: Warner Losh AuthorDate: 2023-09-28 20:45:49 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:25:59 +0000 nvme: Timeout expired transactions When we went to having a shared timeout routine, failing the timed-out transaction code was inadvertantly dropped. Reinstate it. Fixes: 502dc84a8b670 Sponsored by: Netflix MFC After: 2 weeks Reviewed by: chuck, jhb Differential Revision: https://reviews.freebsd.org/D36921 (cherry picked from commit 2a6b7055a980f7e7543dfdbda4aa0c356133b77d) (cherry picked from commit a276199fef37b04b8b3678eab90f0c33095a6c4d) Approved-by: re (cperciva) --- sys/dev/nvme/nvme_qpair.c | 60 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 45a999c17d89..0ad0b7cbe17f 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -944,6 +944,30 @@ nvme_io_qpair_destroy(struct nvme_qpair *qpair) nvme_qpair_destroy(qpair); } +static void +nvme_abort_complete(void *arg, const struct nvme_completion *status) +{ + struct nvme_tracker *tr = arg; + + /* + * If cdw0 == 1, the controller was not able to abort the command + * we requested. We still need to check the active tracker array, + * to cover race where I/O timed out at same time controller was + * completing the I/O. + */ + if (status->cdw0 == 1 && tr->qpair->act_tr[tr->cid] != NULL) { + /* + * An I/O has timed out, and the controller was unable to + * abort it for some reason. Construct a fake completion + * status, and then complete the I/O's tracker manually. + */ + nvme_printf(tr->qpair->ctrlr, + "abort command failed, aborting command manually\n"); + nvme_qpair_manual_complete_tracker(tr, + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 0, ERROR_PRINT_ALL); + } +} + static void nvme_qpair_timeout(void *arg) { @@ -952,36 +976,44 @@ nvme_qpair_timeout(void *arg) struct nvme_tracker *tr; sbintime_t now; bool idle; + bool expired; uint32_t csts; uint8_t cfs; mtx_lock(&qpair->lock); idle = TAILQ_EMPTY(&qpair->outstanding_tr); + again: switch (qpair->recovery_state) { case RECOVERY_NONE: - if (idle) - break; + /* + * Check to see if we need to timeout any commands. If we do, then + * we also enter a recovery phase. + */ now = getsbinuptime(); - idle = true; + expired = false; TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) { if (tr->deadline == SBT_MAX) continue; idle = false; if (now > tr->deadline) { - /* - * We're now passed our earliest deadline. We - * need to do expensive things to cope, but next - * time. Flag that and close the door to any - * further processing. - */ - qpair->recovery_state = RECOVERY_START; - nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n", - (uintmax_t)now, (uintmax_t)tr->deadline); - break; + expired = true; + nvme_ctrlr_cmd_abort(ctrlr, tr->cid, qpair->id, + nvme_abort_complete, tr); } } - break; + if (!expired) + break; + + /* + * We're now passed our earliest deadline. We need to do + * expensive things to cope, but next time. Flag that + * and close the door to any further processing. + */ + qpair->recovery_state = RECOVERY_START; + nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n", + (uintmax_t)now, (uintmax_t)tr->deadline); + /* FALLTHROUGH */ case RECOVERY_START: /* * Read csts to get value of cfs - controller fatal status. From nobody Thu Sep 28 22:28:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmT01LXz4vhQv; Thu, 28 Sep 2023 22:28: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 4RxSmS6Rhdz3QH3; Thu, 28 Sep 2023 22:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UxnU67fCnfQwkMQ3npcbGylxUoFsgTdAwNQpt9MhDKk=; b=jwsOJHrl83aCjei/Ce2uJqXI9cJ4bl7wjAYBuCERa3p6FdTAUHPd2VnoitEso1LqJdNBNd dpWtVO66hXbfg9j9UYTM6zV0bflae6qFiYRJffWOdUe/tMOzN6rst6njkswFcRM8ud+84i nvc6XIPSXIzbZ+J+WI07/xC/dUOObgXXCTZBKvHiaHxQFBofkKHjXoz7QOdx70fDiT5YEu tiKtFOI4acTIBo2GU5oc4DAyMx5T35Eh1DqSvJXEuZPBT2yEjcvkkhnjj5l5mtGao0DotY QgnhcbPXvAJfGG4heTQbgVSDaSE6dzK1LVxR6sFdwXgvrhftr8EAbC+WopP/Yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940088; a=rsa-sha256; cv=none; b=To0GuCuHF2wf7ES93H89XbZrP1a3/UiimhliqWjnprdcP93QMYDwQHAYE4x8CrDTof69Rf 1yicyPRJpCDkxQfE59LIyoPqEYTu5rjnE9afU6skadU74TpqSWBTZTLFHhlPP3D0pxT3o4 diMUsgv8DqKKmZxiB4joqDS2l1euLrh9OCPmpL/BgssLdBwIo6mQnfCHv2kRjHCTlk/eAN YcLZB5ajBbm5kE4ipzjalzbnRyTqyiATQCl7gfkPKTdk9xOnAWawGSlEU3L+XiEqpwvAX6 GB2MLZN1BJLnaKEI2+jzyJuXYa0p1uRc5nzE795yW7ugPXzcHv/nj+Ra2zmBqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UxnU67fCnfQwkMQ3npcbGylxUoFsgTdAwNQpt9MhDKk=; b=lBC5INCxuS1VWGzp7EqNuayrJkPuWs9JwX3kQ9+1VxO+zBoIq1cU9TdQPflMr8iZshmIXm Gx7pSKtODtTPy3UmPxbDahlwQV7fNQbykFr9dBIg0/fX8u/WMcMKhU4ezRpkBrkDO+OS4k 4BFszoIb9SEUBsfz2Hn7dcPcZ/+50dEp8AEWFEqqUOdVZ3ZdOTdOgx8we0uc9Bb21JN00S 0RRHPUNdYB76TOEuOnooli7sLOkdjhKCtop4OqtuipLMm+1xQ7Esod4V5wA0BiUoo9R7f5 G3jDPrXUFWs9pjvNwDV9U6d38mnn8QK/v5M8+ozFFo4qc2iB2+EC/8vnH0NL0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmS5VqmzgF0; Thu, 28 Sep 2023 22:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMS8lQ073653; Thu, 28 Sep 2023 22:28:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMS8ZZ073650; Thu, 28 Sep 2023 22:28:08 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:08 GMT Message-Id: <202309282228.38SMS8ZZ073650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 1a25315863e5 - releng/14.0 - nvme: Greatly improve error recovery List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 1a25315863e5faffd447cd59fb9e54f5d2b5f6ae Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1a25315863e5faffd447cd59fb9e54f5d2b5f6ae commit 1a25315863e5faffd447cd59fb9e54f5d2b5f6ae Author: Warner Losh AuthorDate: 2023-09-28 20:45:50 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:04 +0000 nvme: Greatly improve error recovery Next phase of error recovery: Eliminate the REOVERY_START phase, since we don't need to wait to start recovery. Eliminate the RECOVERY_RESET phase since it is transient, we now transition from RECOVERY_NORMAL into RECOVERY_WAITING. In normal mode, read the status of the controller. If it is in failed state, or appears to be hot-plugged, jump directly to reset which will sort out the proper things to do. This will cause all pending I/O to complete with an abort status before the reset. When in the NORMAL state, call the interrupt handler. This will complete all pending transactions when interrupts are broken or temporarily misbehaving. We then check all the pending completions for timeouts. If we have abort enabled, then we'll send an abort. Otherwise we'll assume the controller is wedged and needs a reset. By calling the interrupt handler here, we'll avoid an issue with the current code where we transitioned to RECOVERY_START which prevented any completions from happening. Now completions happen. In addition and follow-on I/O that is scheduled in the completion routines will be submitted, rather than queued, because the recovery state is correct. This also fixes a problem where I/O would timeout, but never complete, leading to hung I/O. Resetting remains the same as before, just when we chose to reset has changed. A nice side effect of these changes is that we now do I/O when interrupts to the card are totally broken. Followon commits will improve the error reporting and logging when this happens. Performance will be aweful, but will at least be minimally functional. There is a small race when we're checking the completions if interrupts are working, but this is handled in a future commit. Sponsored by: Netflix MFC After: 2 weeks Differential Revision: https://reviews.freebsd.org/D36922 (cherry picked from commit d4959bfcd110ea471222c7dd87775ba1f4e3d1d9) (cherry picked from commit 5d627e0669c5f047580b6f71d9f042afc68307d0) Approved-by: re (cperciva) --- sys/dev/nvme/nvme_private.h | 2 - sys/dev/nvme/nvme_qpair.c | 114 +++++++++++++++++++++++++------------------- 2 files changed, 66 insertions(+), 50 deletions(-) diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index dc69012cfd71..e4b319b9d8b7 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -149,8 +149,6 @@ struct nvme_tracker { enum nvme_recovery { RECOVERY_NONE = 0, /* Normal operations */ - RECOVERY_START, /* Deadline has passed, start recovering */ - RECOVERY_RESET, /* This pass, initiate reset of controller */ RECOVERY_WAITING, /* waiting for the reset to complete */ }; struct nvme_qpair { diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 0ad0b7cbe17f..6d34c7ddba2d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -976,88 +976,106 @@ nvme_qpair_timeout(void *arg) struct nvme_tracker *tr; sbintime_t now; bool idle; - bool expired; + bool needs_reset; uint32_t csts; uint8_t cfs; + mtx_lock(&qpair->lock); idle = TAILQ_EMPTY(&qpair->outstanding_tr); -again: switch (qpair->recovery_state) { case RECOVERY_NONE: + /* + * Read csts to get value of cfs - controller fatal status. If + * we are in the hot-plug or controller failed status proceed + * directly to reset. We also bail early if the status reads all + * 1's or the control fatal status bit is now 1. The latter is + * always true when the former is true, but not vice versa. The + * intent of the code is that if the card is gone (all 1's) or + * we've failed, then try to do a reset (which someitmes + * unwedges a card reading all 1's that's not gone away, but + * usually doesn't). + */ + csts = nvme_mmio_read_4(ctrlr, csts); + cfs = (csts >> NVME_CSTS_REG_CFS_SHIFT) & NVME_CSTS_REG_CFS_MASK; + if (csts == NVME_GONE || cfs == 1) + goto do_reset; + + /* + * Next, check to see if we have any completions. If we do, + * we've likely missed an interrupt, but the card is otherwise + * fine. This will also catch all the commands that are about + * to timeout (but there's still a tiny race). Since the timeout + * is long relative to the race between here and the check below, + * this is still a win. + */ + mtx_unlock(&qpair->lock); + nvme_qpair_process_completions(qpair); + mtx_lock(&qpair->lock); + if (qpair->recovery_state != RECOVERY_NONE) { + /* + * Somebody else adjusted recovery state while unlocked, + * we should bail. Unlock the qpair and return without + * doing anything else. + */ + mtx_unlock(&qpair->lock); + return; + } + /* * Check to see if we need to timeout any commands. If we do, then * we also enter a recovery phase. */ now = getsbinuptime(); - expired = false; + needs_reset = false; TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) { if (tr->deadline == SBT_MAX) continue; - idle = false; if (now > tr->deadline) { - expired = true; - nvme_ctrlr_cmd_abort(ctrlr, tr->cid, qpair->id, - nvme_abort_complete, tr); + if (tr->req->cb_fn != nvme_abort_complete && + ctrlr->enable_aborts) { + /* + * This isn't an abort command, ask + * for a hardware abort. + */ + nvme_ctrlr_cmd_abort(ctrlr, tr->cid, + qpair->id, nvme_abort_complete, tr); + } else { + /* + * Otherwise we have a live command in + * the card (either one we couldn't + * abort, or aborts weren't enabled). + * The only safe way to proceed is to do + * a reset. + */ + needs_reset = true; + } + } else { + idle = false; } } - if (!expired) + if (!needs_reset) break; /* - * We're now passed our earliest deadline. We need to do - * expensive things to cope, but next time. Flag that - * and close the door to any further processing. - */ - qpair->recovery_state = RECOVERY_START; - nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n", - (uintmax_t)now, (uintmax_t)tr->deadline); - /* FALLTHROUGH */ - case RECOVERY_START: - /* - * Read csts to get value of cfs - controller fatal status. - * If no fatal status, try to call the completion routine, and - * if completes transactions, report a missed interrupt and - * return (this may need to be rate limited). Otherwise, if - * aborts are enabled and the controller is not reporting - * fatal status, abort the command. Otherwise, just reset the - * controller and hope for the best. - */ - csts = nvme_mmio_read_4(ctrlr, csts); - cfs = (csts >> NVME_CSTS_REG_CFS_SHIFT) & NVME_CSTS_REG_CFS_MASK; - if (cfs) { - nvme_printf(ctrlr, "Controller in fatal status, resetting\n"); - qpair->recovery_state = RECOVERY_RESET; - goto again; - } - mtx_unlock(&qpair->lock); - if (nvme_qpair_process_completions(qpair)) { - nvme_printf(ctrlr, "Completions present in output without an interrupt\n"); - qpair->recovery_state = RECOVERY_NONE; - } else { - nvme_printf(ctrlr, "timeout with nothing complete, resetting\n"); - qpair->recovery_state = RECOVERY_RESET; - mtx_lock(&qpair->lock); - goto again; - } - mtx_lock(&qpair->lock); - break; - case RECOVERY_RESET: - /* + * We've had a command timeout that we weren't able to abort + * * If we get here due to a possible surprise hot-unplug event, * then we let nvme_ctrlr_reset confirm and fail the * controller. */ + do_reset: nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n", (csts == 0xffffffff) ? " and possible hot unplug" : (cfs ? " and fatal error status" : "")); nvme_printf(ctrlr, "RECOVERY_WAITING\n"); qpair->recovery_state = RECOVERY_WAITING; nvme_ctrlr_reset(ctrlr); + idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "waiting\n"); + nvme_printf(ctrlr, "waiting for reset to complete\n"); break; } From nobody Thu Sep 28 22:28:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmV1SMpz4vhqH; Thu, 28 Sep 2023 22:28: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 4RxSmV0HNVz3QKr; Thu, 28 Sep 2023 22:28:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7s2B7OvV73+rYCQqOEA8gMZJYNg5dQ723wijcH0hSeA=; b=NOAsGWC3Ca/oBESWtylW8IbfePoTgY3ird/fUJDCLfU2EY9MBL6zCV9g3/ECsRe7VPl2nX 1TNcpJya7OMkPQgaIncZVrr/8ofIbF/J+pASu4sZ9MKZKmLZg4MNXjJgQlP8SGcEJBOv/8 euELPpkOdxqJTkKO4TrWiAD70MidP03vSR5nCNCp2lrQHmoaOuSIITZVJaoLZE+J5Q3LYb bLQL+aRM3I/sTQNOe7wV3P+XDyXNxR7rMrExHBEvQ8+y5frofONse7LEIxDwNfVHD5hjIt Zsv89/oN3TRiguzeAXfYvY/rB/2eg5Mhk9d34vf91vK/jiuYMJXHsChI+tb2yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940090; a=rsa-sha256; cv=none; b=cjedtPx766jf4ATxIurd9bTeHASuR5xcWvrkUogwz84BHP/cDJ+/LYA5vO73I4CITDchq1 hqK+50WZpG3ckLLI2g2kEZvQoLm9rV3C4grXHqX7hTT7oETWymeQNsSGrTc+S3vjDI6yLX 1UTuBmRdXS6U4yT840CnBwu1oQKqb/epo0Y0ekn0jZcYz0qFbLqCghFTQrQlwsxHjDb60m tlEFBqyS4RTFZqHLJYVwiwxh6P9lrMPT+SWOKDg1qyorNtmsMXPBoe4rG14PFzAGW0BuIb bexJaNIWEynevLPWkVPS7hqdGHEjQXjUGsBP3fEBciUf+WzaN62T8aH+4NdeOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7s2B7OvV73+rYCQqOEA8gMZJYNg5dQ723wijcH0hSeA=; b=sXqTiHAIYzbX9Bu0lKp2KnQaU3bOGDqAqfJEtYgUFzREmXKYTcFyIgb4AZsAuS0ejYxWDi MXd/aAFdJFYvs9zIg0EkEErpNR60fjl6g4Hu682aY3pL2M/PziiATtBAoVdoK6MVhTGF7T +b12EvQnlfwCJ1LrWpMjICEwdtSUvdBTGnO2srvUVgCEEZnWEo2ziGuPs1JPOimq05eOuU SeN+LOf2o/xwZ7sVeMO1vsC2nhcUnFKCYz4w3EJYHji28uILFZHflY0CphUg/o19k80/Nh IrJJ7EQ68WVFluWuVce5WS9yVTUmCEpnqvZ81j4daSZh+X/5kP5npxaCYJZ+6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmT6Jhpzg8t; Thu, 28 Sep 2023 22:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMS9Hg073695; Thu, 28 Sep 2023 22:28:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMS9I7073692; Thu, 28 Sep 2023 22:28:09 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:09 GMT Message-Id: <202309282228.38SMS9I7073692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7e715964e109 - releng/14.0 - nvme: Add exclusion for ISR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7e715964e109e74f0ea4a8f25861628fe20e60dd Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7e715964e109e74f0ea4a8f25861628fe20e60dd commit 7e715964e109e74f0ea4a8f25861628fe20e60dd Author: Warner Losh AuthorDate: 2023-09-28 20:46:00 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:10 +0000 nvme: Add exclusion for ISR Add a basically uncontended spinlock that we take out while the ISR is running. This has two effects: First, when we get a timeout, we can safely call the nvme_qpair_process_completions w/o racing any ISRs. Second, we can use it to ensure that we don't reset the card while the ISRs are active (right now we just sleep and hope for the best, which usually is fine, but not always). Sponsored by: Netflix MFC After: 2 weeks Reviewed by: chuck, gallatin Differential Revision: https://reviews.freebsd.org/D41452 (cherry picked from commit 8052b01e7e4113fa8296ce43c354116b0a1774b7) (cherry picked from commit c7cb2dcdf2abe6c382628c80fe99f11236829cfb) Approved-by: re (cperciva) --- sys/dev/nvme/nvme_ctrlr.c | 51 ++++++++++++++++---- sys/dev/nvme/nvme_private.h | 10 ++-- sys/dev/nvme/nvme_qpair.c | 115 ++++++++++++++++++++++++++++++-------------- sys/dev/nvme/nvme_sysctl.c | 24 +++++++++ 4 files changed, 148 insertions(+), 52 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 7a2ecffe81d4..c4a750901743 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -416,6 +416,34 @@ nvme_ctrlr_disable_qpairs(struct nvme_controller *ctrlr) } } +static void +nvme_pre_reset(struct nvme_controller *ctrlr) +{ + /* + * Make sure that all the ISRs are done before proceeding with the reset + * (and also keep any stray interrupts that happen during this process + * from racing this process). For startup, this is a nop, since the + * hardware is in a good state. But for recovery, where we randomly + * reset the hardware, this ensure that we're not racing the ISRs. + */ + mtx_lock(&ctrlr->adminq.recovery); + for (int i = 0; i < ctrlr->num_io_queues; i++) { + mtx_lock(&ctrlr->ioq[i].recovery); + } +} + +static void +nvme_post_reset(struct nvme_controller *ctrlr) +{ + /* + * Reset complete, unblock ISRs + */ + mtx_unlock(&ctrlr->adminq.recovery); + for (int i = 0; i < ctrlr->num_io_queues; i++) { + mtx_unlock(&ctrlr->ioq[i].recovery); + } +} + static int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { @@ -427,9 +455,11 @@ nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) err = nvme_ctrlr_disable(ctrlr); if (err != 0) - return err; + goto out; err = nvme_ctrlr_enable(ctrlr); +out: + TSEXIT(); return (err); } @@ -1157,6 +1187,11 @@ nvme_ctrlr_start_config_hook(void *arg) TSENTER(); + /* + * Don't call pre/post reset here. We've not yet created the qpairs, + * haven't setup the ISRs, so there's no need to 'drain' them or + * 'exclude' them. + */ if (nvme_ctrlr_hw_reset(ctrlr) != 0) { fail: nvme_ctrlr_fail(ctrlr); @@ -1201,16 +1236,9 @@ nvme_ctrlr_reset_task(void *arg, int pending) int status; nvme_ctrlr_devctl_log(ctrlr, "RESET", "resetting controller"); + nvme_pre_reset(ctrlr); status = nvme_ctrlr_hw_reset(ctrlr); - /* - * Use pause instead of DELAY, so that we yield to any nvme interrupt - * handlers on this CPU that were blocked on a qpair lock. We want - * all nvme interrupts completed before proceeding with restarting the - * controller. - * - * XXX - any way to guarantee the interrupt handlers have quiesced? - */ - pause("nvmereset", hz / 10); + nvme_post_reset(ctrlr); if (status == 0) nvme_ctrlr_start(ctrlr, true); else @@ -1697,6 +1725,7 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (ctrlr->is_failed) return (0); + nvme_pre_reset(ctrlr); if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; #ifdef NVME_2X_RESET @@ -1708,6 +1737,7 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; #endif + nvme_post_reset(ctrlr); /* * Now that we've reset the hardware, we can restart the controller. Any @@ -1724,6 +1754,7 @@ fail: * the controller. However, we have to return success for the resume * itself, due to questionable APIs. */ + nvme_post_reset(ctrlr); nvme_printf(ctrlr, "Failed to reset on resume, failing.\n"); nvme_ctrlr_fail(ctrlr); (void)atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index e4b319b9d8b7..a6239f30f3bf 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -162,10 +162,9 @@ struct nvme_qpair { struct resource *res; void *tag; - struct callout timer; - sbintime_t deadline; - bool timer_armed; - enum nvme_recovery recovery_state; + struct callout timer; /* recovery lock */ + bool timer_armed; /* recovery lock */ + enum nvme_recovery recovery_state; /* recovery lock */ uint32_t num_entries; uint32_t num_trackers; @@ -182,6 +181,7 @@ struct nvme_qpair { int64_t num_retries; int64_t num_failures; int64_t num_ignored; + int64_t num_recovery_nolock; struct nvme_command *cmd; struct nvme_completion *cpl; @@ -200,7 +200,7 @@ struct nvme_qpair { struct nvme_tracker **act_tr; struct mtx_padalign lock; - + struct mtx_padalign recovery; } __aligned(CACHE_LINE_SIZE); struct nvme_namespace { diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 6d34c7ddba2d..b256c4713c8d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -528,14 +528,17 @@ nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, nvme_free_request(req); } -bool -nvme_qpair_process_completions(struct nvme_qpair *qpair) +/* Locked version of completion processor */ +static bool +_nvme_qpair_process_completions(struct nvme_qpair *qpair) { struct nvme_tracker *tr; struct nvme_completion cpl; - int done = 0; + bool done = false; bool in_panic = dumping || SCHEDULER_STOPPED(); + mtx_assert(&qpair->recovery, MA_OWNED); + /* * qpair is not enabled, likely because a controller reset is in * progress. Ignore the interrupt - any I/O that was associated with @@ -629,7 +632,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair) else tr = NULL; - done++; + done = true; if (tr != NULL) { nvme_qpair_complete_tracker(tr, &cpl, ERROR_PRINT_ALL); qpair->sq_head = cpl.sqhd; @@ -666,12 +669,35 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair) } } - if (done != 0) { + if (done) { bus_space_write_4(qpair->ctrlr->bus_tag, qpair->ctrlr->bus_handle, qpair->cq_hdbl_off, qpair->cq_head); } - return (done != 0); + return (done); +} + +bool +nvme_qpair_process_completions(struct nvme_qpair *qpair) +{ + bool done; + + /* + * Interlock with reset / recovery code. This is an usually uncontended + * to make sure that we drain out of the ISRs before we reset the card + * and to prevent races with the recovery process called from a timeout + * context. + */ + if (!mtx_trylock(&qpair->recovery)) { + qpair->num_recovery_nolock++; + return (false); + } + + done = _nvme_qpair_process_completions(qpair); + + mtx_unlock(&qpair->recovery); + + return (done); } static void @@ -699,6 +725,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, qpair->ctrlr = ctrlr; mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); + mtx_init(&qpair->recovery, "nvme qpair recovery", NULL, MTX_DEF); /* Note: NVMe PRP format is restricted to 4-byte alignment. */ err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), @@ -765,7 +792,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, qpair->cpl_bus_addr = queuemem_phys + cmdsz; prpmem_phys = queuemem_phys + cmdsz + cplsz; - callout_init(&qpair->timer, 1); + callout_init_mtx(&qpair->timer, &qpair->recovery, 0); qpair->timer_armed = false; qpair->recovery_state = RECOVERY_WAITING; @@ -903,6 +930,8 @@ nvme_qpair_destroy(struct nvme_qpair *qpair) if (mtx_initialized(&qpair->lock)) mtx_destroy(&qpair->lock); + if (mtx_initialized(&qpair->recovery)) + mtx_destroy(&qpair->recovery); if (qpair->res) { bus_release_resource(qpair->ctrlr->dev, SYS_RES_IRQ, @@ -975,14 +1004,12 @@ nvme_qpair_timeout(void *arg) struct nvme_controller *ctrlr = qpair->ctrlr; struct nvme_tracker *tr; sbintime_t now; - bool idle; + bool idle = false; bool needs_reset; uint32_t csts; uint8_t cfs; - - mtx_lock(&qpair->lock); - idle = TAILQ_EMPTY(&qpair->outstanding_tr); + mtx_assert(&qpair->recovery, MA_OWNED); switch (qpair->recovery_state) { case RECOVERY_NONE: @@ -1003,25 +1030,10 @@ nvme_qpair_timeout(void *arg) goto do_reset; /* - * Next, check to see if we have any completions. If we do, - * we've likely missed an interrupt, but the card is otherwise - * fine. This will also catch all the commands that are about - * to timeout (but there's still a tiny race). Since the timeout - * is long relative to the race between here and the check below, - * this is still a win. + * Process completions. We already have the recovery lock, so + * call the locked version. */ - mtx_unlock(&qpair->lock); - nvme_qpair_process_completions(qpair); - mtx_lock(&qpair->lock); - if (qpair->recovery_state != RECOVERY_NONE) { - /* - * Somebody else adjusted recovery state while unlocked, - * we should bail. Unlock the qpair and return without - * doing anything else. - */ - mtx_unlock(&qpair->lock); - return; - } + _nvme_qpair_process_completions(qpair); /* * Check to see if we need to timeout any commands. If we do, then @@ -1029,7 +1041,13 @@ nvme_qpair_timeout(void *arg) */ now = getsbinuptime(); needs_reset = false; + idle = true; + mtx_lock(&qpair->lock); TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) { + /* + * Skip async commands, they are posted to the card for + * an indefinite amount of time and have no deadline. + */ if (tr->deadline == SBT_MAX) continue; if (now > tr->deadline) { @@ -1055,6 +1073,7 @@ nvme_qpair_timeout(void *arg) idle = false; } } + mtx_unlock(&qpair->lock); if (!needs_reset) break; @@ -1076,6 +1095,7 @@ nvme_qpair_timeout(void *arg) break; case RECOVERY_WAITING: nvme_printf(ctrlr, "waiting for reset to complete\n"); + idle = false; /* We want to keep polling */ break; } @@ -1087,7 +1107,6 @@ nvme_qpair_timeout(void *arg) } else { qpair->timer_armed = false; } - mtx_unlock(&qpair->lock); } /* @@ -1196,9 +1215,12 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) if (tr == NULL || qpair->recovery_state != RECOVERY_NONE) { /* - * No tracker is available, or the qpair is disabled due to - * an in-progress controller-level reset or controller - * failure. + * No tracker is available, or the qpair is disabled due to an + * in-progress controller-level reset or controller failure. If + * we lose the race with recovery_state, then we may add an + * extra request to the queue which will be resubmitted later. + * We only set recovery_state to NONE with qpair->lock also + * held. */ if (qpair->ctrlr->is_failed) { @@ -1260,7 +1282,10 @@ nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) static void nvme_qpair_enable(struct nvme_qpair *qpair) { - mtx_assert(&qpair->lock, MA_OWNED); + if (mtx_initialized(&qpair->recovery)) + mtx_assert(&qpair->recovery, MA_OWNED); + if (mtx_initialized(&qpair->lock)) + mtx_assert(&qpair->lock, MA_OWNED); qpair->recovery_state = RECOVERY_NONE; } @@ -1311,9 +1336,11 @@ nvme_admin_qpair_enable(struct nvme_qpair *qpair) nvme_printf(qpair->ctrlr, "done aborting outstanding admin\n"); + mtx_lock(&qpair->recovery); mtx_lock(&qpair->lock); nvme_qpair_enable(qpair); mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } void @@ -1340,8 +1367,8 @@ nvme_io_qpair_enable(struct nvme_qpair *qpair) if (report) nvme_printf(qpair->ctrlr, "done aborting outstanding i/o\n"); + mtx_lock(&qpair->recovery); mtx_lock(&qpair->lock); - nvme_qpair_enable(qpair); STAILQ_INIT(&temp); @@ -1360,6 +1387,7 @@ nvme_io_qpair_enable(struct nvme_qpair *qpair) nvme_printf(qpair->ctrlr, "done resubmitting i/o\n"); mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } static void @@ -1367,27 +1395,40 @@ nvme_qpair_disable(struct nvme_qpair *qpair) { struct nvme_tracker *tr, *tr_temp; - mtx_lock(&qpair->lock); + if (mtx_initialized(&qpair->recovery)) + mtx_assert(&qpair->recovery, MA_OWNED); + if (mtx_initialized(&qpair->lock)) + mtx_assert(&qpair->lock, MA_OWNED); + qpair->recovery_state = RECOVERY_WAITING; TAILQ_FOREACH_SAFE(tr, &qpair->outstanding_tr, tailq, tr_temp) { tr->deadline = SBT_MAX; } - mtx_unlock(&qpair->lock); } void nvme_admin_qpair_disable(struct nvme_qpair *qpair) { + mtx_lock(&qpair->recovery); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); nvme_admin_qpair_abort_aers(qpair); + + mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } void nvme_io_qpair_disable(struct nvme_qpair *qpair) { + mtx_lock(&qpair->recovery); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); + + mtx_unlock(&qpair->lock); + mtx_unlock(&qpair->recovery); } void diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index a1a8a968eebe..ac0d507e2337 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -163,6 +163,7 @@ nvme_qpair_reset_stats(struct nvme_qpair *qpair) qpair->num_retries = 0; qpair->num_failures = 0; qpair->num_ignored = 0; + qpair->num_recovery_nolock = 0; } static int @@ -240,6 +241,21 @@ nvme_sysctl_num_ignored(SYSCTL_HANDLER_ARGS) return (sysctl_handle_64(oidp, &num_ignored, 0, req)); } +static int +nvme_sysctl_num_recovery_nolock(SYSCTL_HANDLER_ARGS) +{ + struct nvme_controller *ctrlr = arg1; + int64_t num; + int i; + + num = ctrlr->adminq.num_recovery_nolock; + + for (i = 0; i < ctrlr->num_io_queues; i++) + num += ctrlr->ioq[i].num_recovery_nolock; + + return (sysctl_handle_64(oidp, &num, 0, req)); +} + static int nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS) { @@ -298,6 +314,9 @@ nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_ignored", CTLFLAG_RD, &qpair->num_ignored, "Number of interrupts posted, but were administratively ignored"); + SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_recovery_nolock", + CTLFLAG_RD, &qpair->num_recovery_nolock, + "Number of times that we failed to lock recovery in the ISR"); SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO, "dump_debug", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, @@ -366,6 +385,11 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) ctrlr, 0, nvme_sysctl_num_ignored, "IU", "Number of interrupts ignored administratively"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "num_recovery_nolock", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE, + ctrlr, 0, nvme_sysctl_num_recovery_nolock, "IU", + "Number of times that we failed to lock recovery in the ISR"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "reset_stats", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, ctrlr, 0, nvme_sysctl_reset_stats, "IU", "Reset statistics to zero"); From nobody Thu Sep 28 22:28:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmW1hZgz4vhbW; Thu, 28 Sep 2023 22:28: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 4RxSmW0r48z3QQn; Thu, 28 Sep 2023 22:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9r3gLIAh22e4khCvsZRckqU+tdFNPgRWinJ6T9MVCM=; b=r+zW7Eq+EBZ6kZyIFUI/GRGQUDOXO7yMOTOJJUiQu0MD9RznZ7v8EzUePOaXgdouYQf9kk wdemeDzI0+caFl92x0/eN8yd0y2XSIrDLSHRMX00C7PqHX0X6vwENqsQPCGDL+GD6cSxCH 7Pm/dq7Ui3hG6qE6kHDQ1Ip0TEeTcC0ZcyWk9SWC52mKWBCVQi1JnbrBtA2+xT/eCzo6Ap bYngl0e4f5nnJxIXd5kvYa3MGLBhx9gL6BkjVPprlKibT0kmriA4AMG02qartdJn/HU5NS QWTr63+m8ScYVBqGVka7zQD0tSd1FAPWtzyW24KFQKgypFszW2IGIhq2k58qTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940091; a=rsa-sha256; cv=none; b=GJVYmK6wWumnSfWA2KYahadfND14ioNqT3gKRu84HinXdjOvodEKgVW4ewN8sIPo9gyCEa cyDjLJZeqysfbNlZYG9/wZai2Scin8EW10N5HuvJaQOebHRlkceAR3vsEqBXd1FOxriusQ usswvOI2QKuNtPm62SoSHSglIxwpgj7PIg2K8uvvS6LBWrZq4qo3460N+fVeJJI7xdeuO/ srSJSqeLb3XaOgn1bGWlaJFOUyzue7+jv6edt69BVF5Ee9U5/y6CmAqRJreLMh0Nj81cRw hZKd/P5PW7gTBk5pHkZyYE+1/Nu7KQEFaa6f+nrdn0jfxmg47tgn0hGltaiSqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9r3gLIAh22e4khCvsZRckqU+tdFNPgRWinJ6T9MVCM=; b=lV9kRP70/V2za27Ksp3hG2C0rD2vLaKK0MAWZK+cnyBf0V4osnjSnUJcsGoqtz2fnngwYm klXxVvxzUjY1EAS8z61cH/ln6YW6C9qctF/2999LZuCT2pyqsPXuscFgG1rmXoj14kYVGK 2GbjU7pjxecLTZ5+T6EAU6XpR7M7VJwLAKM5p38Zv1fwQkSEtyl9sg5ahFhiu+HJ1oVpO4 H7I6SD+EfIA0lRSt8OBTwU/irJq3AmydhqunVjA9Jpj7LwnqOtXT/2BkFPtwgp1RmWRtLP suNl8XNmx6pqXihVpADdwBuAnLmyl0q3Vw0JtVMJhTxLbUs8c2UBQ1ahk5HZfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmV6xDPzgF1; Thu, 28 Sep 2023 22:28:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSAZW073747; Thu, 28 Sep 2023 22:28:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSA9h073744; Thu, 28 Sep 2023 22:28:10 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:10 GMT Message-Id: <202309282228.38SMSA9h073744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: b2bcb31fef42 - releng/14.0 - nvme: Give up when we've failed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: b2bcb31fef42448c5cd374b46ce5e40e41339c48 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b2bcb31fef42448c5cd374b46ce5e40e41339c48 commit b2bcb31fef42448c5cd374b46ce5e40e41339c48 Author: Warner Losh AuthorDate: 2023-09-28 20:46:00 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:13 +0000 nvme: Give up when we've failed Normally, we poll the device every so often to see if commands have timed out. However, we'll go into the recovery state as part of failing the drive. To account for all possibilties, if we're failed when we get into the polling function, just stop polling: Party is over. Sponsored by: Netflix (cherry picked from commit d95431624f934fe4740211738fc787808005b14e) (cherry picked from commit 5e9b7d0e0e0bd4cba29de33569ab0ca86763f635) Approved-by: re (cperciva) --- sys/dev/nvme/nvme_qpair.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index b256c4713c8d..4e37aa0e1020 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1011,6 +1011,17 @@ nvme_qpair_timeout(void *arg) mtx_assert(&qpair->recovery, MA_OWNED); + /* + * If the controller has failed, give up. We're never going to change + * state from a failed controller: no further transactions are possible. + * We go ahead and let the timeout expire in many cases for simplicity. + */ + if (qpair->ctrlr->is_failed) { + nvme_printf(ctrlr, "Controller failed, giving up\n"); + qpair->timer_armed = false; + return; + } + switch (qpair->recovery_state) { case RECOVERY_NONE: /* @@ -1094,8 +1105,8 @@ nvme_qpair_timeout(void *arg) idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "waiting for reset to complete\n"); - idle = false; /* We want to keep polling */ + nvme_printf(ctrlr, "Waiting for reset to complete\n"); + idle = false; /* We want to keep polling */ break; } From nobody Thu Sep 28 22:28:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmX2ywTz4vhnJ; Thu, 28 Sep 2023 22:28: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 4RxSmX1vprz3QM2; Thu, 28 Sep 2023 22:28:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWn12uj9s6/j3uBWy4DBozYMQlFOCKbujZ+ij4+ISJs=; b=F2/dKDZdOqFyZG68+5cCuQP6xQE1axY7SvaN+T8C53LF8JjzCPpPCPPc6J+bX/oPSbGrYv GuDm8lmEe2O0eFCl+CuDRGJrPUzOxM9Ow1EVaa/Ej3E9tigmn8uyU/V1Eje95h5kPFosoH lzDEeuypqF+NAdKN4Gn21YTIvr8ztn4BJiQ5iFnOSyfJmE3QGpZzLj6aDG3INeCx9r5auR 8+7HknjTKVU5Yi1dDu474t+BT2kBeDbEJPBlvFcdQeVbc//dAZGtmXbhz7sZWWBaTn7Zkb /qTNt6G5BaA82bJeIsJ3JYvL1Tv6CZw2JWGyA3R8o01JCyBvFa/oQPz5OUvBsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940092; a=rsa-sha256; cv=none; b=itUiQp0YYTOTHUk7exuY7cPYZ/U/rvnts6Eb3WRAxms+JdR9qD/qQv1i2fxL1K9yOKCVn4 Bm+k+YBIJPVhcZxU5/MhHrgU0Tlv3NE8Flc1u+aD6Bh5dOIR2Jg9F2I3o+2AXBRe/aqpkI pwv1ocol6mPU3OM56xp3n03Wznf0mdE1I6mfbcwITm/Hfksbdkkd9JyYgwwkTrZulEvmqS /mDNslypqtKIqWZUrUf5Il2EK3LsPnMZxnGDifVFPVe2ZjHD/bhTSO22iGpjDuXo+/fdsD BtbLojU/JGRZ0gPIwsuPwl3n0oSdRkr5+c+BgF0HH893BWnn1+RIn3mKUm4vuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWn12uj9s6/j3uBWy4DBozYMQlFOCKbujZ+ij4+ISJs=; b=rZLQc+4nQHSrOFmYjxaQUq8wUOvGjKMaoQmDt/DrO28KIgeliQLaRBnrcCI9eSwbAb3C/F vHHr4/y/DtZJ/Te/QQ+nCfFdJIbg3RdEEwpKSQ47ho+b/zdPHTorDJZ/68/gDFpuMHp+HB dr70ol4cGhVmJcvrflAihJS9++jeFTTWiSdzqK7k6HPK+3A/jAqTXhXt0noAoWATFH76mr Eeu65TrawS1DGxpOKNkb5lDDqMxNn8FKVeJ5DrDimH/cIeQMvvevhGRIZzfXduHJaIXh18 /88aEB4FHxlewIqL+xSkgclLmOIbw20xlZwT4IIOWlr/Ys2R1HHQk6lsxEuRdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmX11FXzfjr; Thu, 28 Sep 2023 22:28:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSCji073805; Thu, 28 Sep 2023 22:28:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSCwx073802; Thu, 28 Sep 2023 22:28:12 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:12 GMT Message-Id: <202309282228.38SMSCwx073802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 001c45a1229a - releng/14.0 - nvme: Fix locking protocol violation to fix suspend / resume List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 001c45a1229a5ac06bb9891c82054e829136e3a0 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=001c45a1229a5ac06bb9891c82054e829136e3a0 commit 001c45a1229a5ac06bb9891c82054e829136e3a0 Author: Warner Losh AuthorDate: 2023-09-28 20:46:01 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:15 +0000 nvme: Fix locking protocol violation to fix suspend / resume Currently, when we suspend, we need to tear down all the qpairs. We call nvme_admin_qpair_abort_aers with the admin qpair lock held, but the tracker it will call for the pending AER also locks it (recursively) hitting an assert. This routine is called without the qpair lock held when we destroy the device entirely in a number of places. Add an assert to this effect and drop the qpair lock before calling it. nvme_admin_qpair_abort_aers then locks the qpair lock to traverse the list, dropping it around calls to nvme_qpair_complete_tracker, and restarting the list scan after picking it back up. Note: If interrupts are still running, there's a tiny window for these AERs: If one fires just an instant after we manually complete it, then we'll be fine: we set the state of the queue to 'waiting' and we ignore interrupts while 'waiting'. We know we'll destroy all the queue state with these pending interrupts before looking at them again and we know all the TRs will have been completed or rescheduled. So either way we're covered. Also, tidy up the failure case as well: failing a queue is a superset of disabling it, so no need to call disable first. This solves solves some locking issues with recursion since we don't need to recurse.. Set the qpair state of failed queues to RECOVERY_FAILED and stop scheduling the watchdog. Assert we're not failed when we're enabling a qpair, since failure currently is one-way. Make failure a little less verbose. Next, kill the pre/post reset stuff. It's completely bogus since we disable the qparis, we don't need to also hold the lock through the reset: disabling will cause the ISR to return early. This keeps us from recursing on the recovery lock when resuming. We only need the recovery lock to avoid a specific race between the timer and the ISR. Finally, kill NVME_RESET_2X. It'S been a major release since we put it in and nobody has used it as far as I can tell. And it was a motivator for the pre/post uglification. These are all interrelated, so need to be done at the same time. Sponsored by: Netflix Reviewed by: jhb Tested by: jhb (made sure suspend / resume worked) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D41866 (cherry picked from commit da8324a9258f1791cd10423103c1746646e33104) (cherry picked from commit 81b118e842f16ff5e1132212f966e23cb0f8e316) Approved-by: re (cperciva) --- sys/dev/nvme/nvme_ctrlr.c | 49 +++++-------------------------------------- sys/dev/nvme/nvme_private.h | 1 + sys/dev/nvme/nvme_qpair.c | 51 ++++++++++++++++++++++++++++++++------------- 3 files changed, 42 insertions(+), 59 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index c4a750901743..30a5ee81b2a4 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -217,12 +217,15 @@ nvme_ctrlr_fail(struct nvme_controller *ctrlr) { int i; + /* + * No need to disable queues before failing them. Failing is a superet + * of disabling (though pedantically we'd abort the AERs silently with + * a different error, though when we fail, that hardly matters). + */ ctrlr->is_failed = true; - nvme_admin_qpair_disable(&ctrlr->adminq); nvme_qpair_fail(&ctrlr->adminq); if (ctrlr->ioq != NULL) { for (i = 0; i < ctrlr->num_io_queues; i++) { - nvme_io_qpair_disable(&ctrlr->ioq[i]); nvme_qpair_fail(&ctrlr->ioq[i]); } } @@ -416,34 +419,6 @@ nvme_ctrlr_disable_qpairs(struct nvme_controller *ctrlr) } } -static void -nvme_pre_reset(struct nvme_controller *ctrlr) -{ - /* - * Make sure that all the ISRs are done before proceeding with the reset - * (and also keep any stray interrupts that happen during this process - * from racing this process). For startup, this is a nop, since the - * hardware is in a good state. But for recovery, where we randomly - * reset the hardware, this ensure that we're not racing the ISRs. - */ - mtx_lock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_lock(&ctrlr->ioq[i].recovery); - } -} - -static void -nvme_post_reset(struct nvme_controller *ctrlr) -{ - /* - * Reset complete, unblock ISRs - */ - mtx_unlock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_unlock(&ctrlr->ioq[i].recovery); - } -} - static int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { @@ -1236,9 +1211,7 @@ nvme_ctrlr_reset_task(void *arg, int pending) int status; nvme_ctrlr_devctl_log(ctrlr, "RESET", "resetting controller"); - nvme_pre_reset(ctrlr); status = nvme_ctrlr_hw_reset(ctrlr); - nvme_post_reset(ctrlr); if (status == 0) nvme_ctrlr_start(ctrlr, true); else @@ -1725,19 +1698,8 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (ctrlr->is_failed) return (0); - nvme_pre_reset(ctrlr); if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; -#ifdef NVME_2X_RESET - /* - * Prior to FreeBSD 13.1, FreeBSD's nvme driver reset the hardware twice - * to get it into a known good state. However, the hardware's state is - * good and we don't need to do this for proper functioning. - */ - if (nvme_ctrlr_hw_reset(ctrlr) != 0) - goto fail; -#endif - nvme_post_reset(ctrlr); /* * Now that we've reset the hardware, we can restart the controller. Any @@ -1754,7 +1716,6 @@ fail: * the controller. However, we have to return success for the resume * itself, due to questionable APIs. */ - nvme_post_reset(ctrlr); nvme_printf(ctrlr, "Failed to reset on resume, failing.\n"); nvme_ctrlr_fail(ctrlr); (void)atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index a6239f30f3bf..496bd8229e0a 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -150,6 +150,7 @@ struct nvme_tracker { enum nvme_recovery { RECOVERY_NONE = 0, /* Normal operations */ RECOVERY_WAITING, /* waiting for the reset to complete */ + RECOVERY_FAILED, /* We have failed, no more I/O */ }; struct nvme_qpair { struct nvme_controller *ctrlr; diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 4e37aa0e1020..9806096de81d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -945,22 +945,38 @@ nvme_admin_qpair_abort_aers(struct nvme_qpair *qpair) { struct nvme_tracker *tr; + /* + * nvme_complete_tracker must be called without the qpair lock held. It + * takes the lock to adjust outstanding_tr list, so make sure we don't + * have it yet (since this is a general purpose routine). We take the + * lock to make the list traverse safe, but have to drop the lock to + * complete any AER. We restart the list scan when we do this to make + * this safe. There's interlock with the ISR so we know this tracker + * won't be completed twice. + */ + mtx_assert(&qpair->lock, MA_NOTOWNED); + + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); while (tr != NULL) { if (tr->req->cmd.opc == NVME_OPC_ASYNC_EVENT_REQUEST) { + mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0, ERROR_PRINT_NONE); + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); } else { tr = TAILQ_NEXT(tr, tailq); } } + mtx_unlock(&qpair->lock); } void nvme_admin_qpair_destroy(struct nvme_qpair *qpair) { + mtx_assert(&qpair->lock, MA_NOTOWNED); nvme_admin_qpair_abort_aers(qpair); nvme_qpair_destroy(qpair); @@ -1011,17 +1027,6 @@ nvme_qpair_timeout(void *arg) mtx_assert(&qpair->recovery, MA_OWNED); - /* - * If the controller has failed, give up. We're never going to change - * state from a failed controller: no further transactions are possible. - * We go ahead and let the timeout expire in many cases for simplicity. - */ - if (qpair->ctrlr->is_failed) { - nvme_printf(ctrlr, "Controller failed, giving up\n"); - qpair->timer_armed = false; - return; - } - switch (qpair->recovery_state) { case RECOVERY_NONE: /* @@ -1108,6 +1113,11 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; + case RECOVERY_FAILED: + KASSERT(qpair->ctrlr->is_failed, + ("Recovery state failed w/o failed controller\n")); + idle = true; /* nothing to monitor */ + break; } /* @@ -1297,6 +1307,8 @@ nvme_qpair_enable(struct nvme_qpair *qpair) mtx_assert(&qpair->recovery, MA_OWNED); if (mtx_initialized(&qpair->lock)) mtx_assert(&qpair->lock, MA_OWNED); + KASSERT(qpair->recovery_state != RECOVERY_FAILED, + ("Enabling a failed qpair\n")); qpair->recovery_state = RECOVERY_NONE; } @@ -1421,12 +1433,13 @@ void nvme_admin_qpair_disable(struct nvme_qpair *qpair) { mtx_lock(&qpair->recovery); - mtx_lock(&qpair->lock); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); + mtx_unlock(&qpair->lock); + nvme_admin_qpair_abort_aers(qpair); - mtx_unlock(&qpair->lock); mtx_unlock(&qpair->recovery); } @@ -1451,18 +1464,27 @@ nvme_qpair_fail(struct nvme_qpair *qpair) if (!mtx_initialized(&qpair->lock)) return; + mtx_lock(&qpair->recovery); + qpair->recovery_state = RECOVERY_FAILED; + mtx_unlock(&qpair->recovery); + mtx_lock(&qpair->lock); + if (!STAILQ_EMPTY(&qpair->queued_req)) { + nvme_printf(qpair->ctrlr, "failing queued i/o\n"); + } while (!STAILQ_EMPTY(&qpair->queued_req)) { req = STAILQ_FIRST(&qpair->queued_req); STAILQ_REMOVE_HEAD(&qpair->queued_req, stailq); - nvme_printf(qpair->ctrlr, "failing queued i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_request(qpair, req, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); mtx_lock(&qpair->lock); } + if (!TAILQ_EMPTY(&qpair->outstanding_tr)) { + nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); + } /* Manually abort each outstanding I/O. */ while (!TAILQ_EMPTY(&qpair->outstanding_tr)) { tr = TAILQ_FIRST(&qpair->outstanding_tr); @@ -1470,7 +1492,6 @@ nvme_qpair_fail(struct nvme_qpair *qpair) * Do not remove the tracker. The abort_tracker path will * do that for us. */ - nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); From nobody Thu Sep 28 22:28:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmY4JM1z4vhqW; Thu, 28 Sep 2023 22:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSmY30lGz3QVF; Thu, 28 Sep 2023 22:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHsg3zvPg/WP9W4crtdb9YCGnin7CFj6DF2lr3hbMNI=; b=KJJPKeXF/4E5TMeAzL9J+96reLpjM8Qfu5y3G18BqH8CVx9wOI14n0R1HgLAQxNJqXcf6U 80JjH8MqUb2gAUUb1xWP9B4HsZHre66ky6ULqsipFthEgm/YGxjQpJ9IEJ7yOgr8FnOP6V E4oEeyrf8TovN/S+jduywQgPJyYpK+WeE72y9Yq3vD9LSllYc4DYtq4Gmqxh4ZpaeaRDB0 rQJFpEvzB55ycPYNCr4RPecHTBZaxgFYWuDJlvwJ1CFneLYNpnSO1s/nuqORqAn4jj/q9z Nu+5Zi+b/kHZCz/DY99OYsib49Zlu1GkNepNUDjGkQpgMREbCiDOImeuIWw1zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940093; a=rsa-sha256; cv=none; b=MlspUfGMRzRCIvW/o9aeDjul/IGxAF2YpSUzTqfz3YZdpMLWTgK+KFrDavzRbCK/U5iXe0 Y4+GyAlkXiK/TM59lZbJQgpeGf5mK11hSLB0CVLc5QE4IflW+kQI0enU2qDIi7EYVt8Dp8 jU56bR8fnKQ89HLNmQP0sfYxTfj/n2bNNe82JezU+ml2SjTKEC5L5uwATbOY3VJupBVzrw 5SVEEOqG6uHMnfWgo4LesZkgvlpt434B27SBGmEn9A5bjzlR8p8qMTKrhxY4qvviEjsssP xdTyoCLfr8Zgy2yVaPxTj0vDsGbAkE2uR6EZKiUtFAhKHZ8dh/p5JEqEINIGvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHsg3zvPg/WP9W4crtdb9YCGnin7CFj6DF2lr3hbMNI=; b=jUI6eEGNrxEZZU3/EFCzOTjNfFBwVIq7F8yP2wE6IDz8rnDDPlRMeVeqv/k6QS6W2X1Eb1 PkRA77g/aMXO5YcN1SsyFkrQahhuTTrBkUgHNLHTeYagKUYInEmWoLOkiC+sMPOQZsOxtK oUrwUV9GYOblA8G42PFqZebSsGJIfv9QrC58i4NWUflJUIMSD52z99Oe8dm2eZBiCDd47Y sCoUO/i9XqRq+P75Gu2CxIWiDDExo1cBL/VZPaMEhOaPbaiwjNFrL7X2rufLY4xujYbm/E 7zj2bqy5YbK2Gvi2pytXq06NBfYKfFf+G/CbmZf//xE/uXd0SgCFJPkNanNsBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmY219wzgQD; Thu, 28 Sep 2023 22:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSDHl073845; Thu, 28 Sep 2023 22:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSDVa073842; Thu, 28 Sep 2023 22:28:13 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:13 GMT Message-Id: <202309282228.38SMSDVa073842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: eeac591b1289 - releng/14.0 - nvme: Supress noise messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: eeac591b12890436983c0ce4a5d3269a4b77ca3a Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=eeac591b12890436983c0ce4a5d3269a4b77ca3a commit eeac591b12890436983c0ce4a5d3269a4b77ca3a Author: Warner Losh AuthorDate: 2023-09-28 20:46:01 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:17 +0000 nvme: Supress noise messages When we're suspending, we get messages about waiting for the controller to reset. These are in error: we're not waiting for it to reset. We put the recovery state as part of suspending, so we should suppress these as a false positive. Also remove a stray debug that's left over from earlier versions of the recovery code that no longer makes sense. Sponsored by: Netflix (cherry picked from commit 1d6021cd72689f54093af4ed77066a2f8abde664) (cherry picked from commit 3cd49bc5b33fed7c305bfbf4b0c014520e65bc02) Approved-by: re (cperciva) --- sys/dev/nvme/nvme_qpair.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 9806096de81d..cd0057f444b8 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1104,13 +1104,20 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n", (csts == 0xffffffff) ? " and possible hot unplug" : (cfs ? " and fatal error status" : "")); - nvme_printf(ctrlr, "RECOVERY_WAITING\n"); qpair->recovery_state = RECOVERY_WAITING; nvme_ctrlr_reset(ctrlr); idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "Waiting for reset to complete\n"); + /* + * These messages aren't interesting while we're suspended. We + * put the queues into waiting state while + * suspending. Suspending takes a while, so we'll see these + * during that time and they aren't diagnostic. At other times, + * they indicate a problem that's worth complaining about. + */ + if (!device_is_suspended(ctrlr->dev)) + nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; case RECOVERY_FAILED: From nobody Thu Sep 28 22:28:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmZ6y7Sz4vhbf; Thu, 28 Sep 2023 22:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSmZ3y2Lz3QVT; Thu, 28 Sep 2023 22:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ikg07/ix3sfJF4zwdQTMrfnakYe0F2e71pxgds96ehk=; b=eZnWU3tYYTFRwnhoIpY6Yfu0Vvk+WY0JZN5W1NDIxLE/aPIvtO8H1QaTSd9Rjes1GQLPhR 57WBJMwVMqXplxA7fBPBArgbq9p98kTpBnrae18IRCQaYkci5Yu32lWMKrFL/F1z9KH+Im rCT9tU0BeRGPyqaL5XVz/0MoSXcc5N4GnLUYKqr6509dDU19ocJPRsiI+9bCAUHg8XcE0U OxGQBz4YoG8yIU5BKvaiMamTZg4sQLoOML8IDg7lSczB6dj55DnVcQXCF/BNH+rFXexz3F VLsFqAZe4hUOZHKLyrplWmcYje3AGSUOK8Ky7QSClb2yf9GjY6Jf/77e+J+gew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940094; a=rsa-sha256; cv=none; b=VHDHvouYBvnNkJfXDnZcdpICOjnwJgjIzdjGJcMbXOieVe1QXgfX4Uale6LPTxCuObyyNH DqaUiK0tMBII99BobQ4TN0i4hozLsT+4wzOqdCl2iudFOdZa3HLdcIhE+bittcaaxDFqvU Q2x9ZUkfsPGPJjVRbtawEiZ9k6gAZEgZBPX3IlBkCHsxN0sGWLVYUH0HasQhR8tNAQF/Lk sAmb5jfxKlAdpFjmJndT/v9ZEGO8C2pdH3xbIQOEewENw+aTxrrHsOFBvK9ku/xXk6nE6I pQk4a+XtdvKYSsLQIk86Yy6egXw0F99Xb5HEvtRAhSynd4L16sIvCDJyDsgI9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ikg07/ix3sfJF4zwdQTMrfnakYe0F2e71pxgds96ehk=; b=rRdUbvZfimHBciaSy2WHQBCc+1HnK/eToB411v5JZPZhufN9xqiiS8xJPEjNsGnTW66y5t dfVVRxdhW4tvO/CJy5v6DIZBwwKBUi4RpARVg+aV9JWVQDBzEXRV5LzplqJ/QAftZssMHE mp2CaUtFZrPmTz2GvNIkbhgg0yuVre7HHPQKVXWHWTzwiNz2a6ggdBBsyW9TwFFfH5PA37 5gRlcrCFgzUS4+7zorPzMOYGCTkXZIQrhOw7VNWbTxlEP6M5lnP0+ejHPdJKkbxQXxGICr vQvP9kvaoiPNKc41pahOvVzZjtFnnrtcP6la3wrgn3NGis78pqgSabqS4EEtVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmZ349Pzfx5; Thu, 28 Sep 2023 22:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSErq073899; Thu, 28 Sep 2023 22:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSE62073896; Thu, 28 Sep 2023 22:28:14 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:14 GMT Message-Id: <202309282228.38SMSE62073896@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: fcafa2453102 - releng/14.0 - timerfd: fix up a memory leak and missing locking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: fcafa24531021555976b4945d9c58667c0f75ca2 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fcafa24531021555976b4945d9c58667c0f75ca2 commit fcafa24531021555976b4945d9c58667c0f75ca2 Author: Mateusz Guzik AuthorDate: 2023-08-25 14:21:39 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:19 +0000 timerfd: fix up a memory leak and missing locking timerfd01 from ltp passes (and some other don't), but none of the tests crash the kernel. This is a bare minimum patch to fix up the immediate regression. Reported by: yasu (cherry picked from commit 02f534b57f84d6f4f97c337b05b383c8b3aaf18c) Approved by: re (cperciva@) (cherry picked from commit 8c496b26641e3d86b0c9db0ed2b4598093df6d5a) Approved-by: re (cperciva) --- sys/kern/sys_timerfd.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index 6948fa059b8c..2bf2a05c443c 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +60,11 @@ #endif static MALLOC_DEFINE(M_TIMERFD, "timerfd", "timerfd structures"); -static LIST_HEAD(, timerfd) timerfd_head; + +static struct sx timerfd_list_lock; +static LIST_HEAD(, timerfd) timerfd_list; +SX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock"); + static struct unrhdr64 tfdino_unr; #define TFD_NOJUMP 0 /* Realtime clock has not jumped. */ @@ -125,7 +130,8 @@ timerfd_jumped(void) struct timespec boottime, diff; timerfd_getboottime(&boottime); - LIST_FOREACH(tfd, &timerfd_head, entry) { + sx_xlock(&timerfd_list_lock); + LIST_FOREACH(tfd, &timerfd_list, entry) { mtx_lock(&tfd->tfd_lock); if (tfd->tfd_clockid != CLOCK_REALTIME || (tfd->tfd_timflags & TFD_TIMER_ABSTIME) == 0 || @@ -160,6 +166,7 @@ timerfd_jumped(void) tfd->tfd_boottim = boottime; mtx_unlock(&tfd->tfd_lock); } + sx_xunlock(&timerfd_list_lock); } static int @@ -314,11 +321,14 @@ timerfd_close(struct file *fp, struct thread *td) { struct timerfd *tfd = fp->f_data; + sx_xlock(&timerfd_list_lock); + LIST_REMOVE(tfd, entry); + sx_xunlock(&timerfd_list_lock); + callout_drain(&tfd->tfd_callout); seldrain(&tfd->tfd_sel); knlist_destroy(&tfd->tfd_sel.si_note); mtx_destroy(&tfd->tfd_lock); - LIST_REMOVE(tfd, entry); free(tfd, M_TIMERFD); fp->f_ops = &badfileops; @@ -420,9 +430,11 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) if ((flags & TFD_CLOEXEC) != 0) fflags |= O_CLOEXEC; + error = falloc(td, &fp, &fd, fflags); + if (error != 0) + return (error); + tfd = malloc(sizeof(*tfd), M_TIMERFD, M_WAITOK | M_ZERO); - if (tfd == NULL) - return (ENOMEM); tfd->tfd_clockid = (clockid_t)clockid; tfd->tfd_flags = flags; tfd->tfd_ino = alloc_unr64(&tfdino_unr); @@ -431,16 +443,15 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock); timerfd_getboottime(&tfd->tfd_boottim); getnanotime(&tfd->tfd_birthtim); - LIST_INSERT_HEAD(&timerfd_head, tfd, entry); + sx_xlock(&timerfd_list_lock); + LIST_INSERT_HEAD(&timerfd_list, tfd, entry); + sx_xunlock(&timerfd_list_lock); - error = falloc(td, &fp, &fd, fflags); - if (error != 0) - return (error); fflags = FREAD; if ((flags & TFD_NONBLOCK) != 0) fflags |= FNONBLOCK; - finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops); + fdrop(fp, td); td->td_retval[0] = fd; From nobody Thu Sep 28 22:28:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmb5X3Qz4vhYJ; Thu, 28 Sep 2023 22:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSmb55xYz3QXm; Thu, 28 Sep 2023 22:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTYQN7pRA8oAY/00N1vrMf1CIYEY+4vVY/H334YfTOE=; b=LrOAN/dcOnJJQl65qxOeWjZEMkIAuzPBObqJmiEc76DkLgKSyCw5JggqZm8kqNtBbkeh/u BapJUBuQmnpO7zDxcOcw0wvH2Th9wVoZU6lWce1KcV5KXKSR4cnwVN13ESLiU11Zqy9ddC 8kRtDlAptoOJk7JAun/4CPDFyVpIakZ3tBAjnwwt9MLsL3KrcDrHSybiI2Ds78XRxY4KAM 7xlkJETj/7en7AQH1bVQo1pWZhDr8BmsuDfZCTzczDvPdXa67VcMAc5kO7PiGiUH9oh+lz qsHCGsmpgAt3zYRUJjjN6PgaABrN1qe5WF1leuqXrCbdz7iCLxQZ4bKLzzR6yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940095; a=rsa-sha256; cv=none; b=F3HTGM1xEqaIFQNDhetPgHYoyFg10hb3wO7/u3wh0DrEGeG/dAb7a1+Z+taM4aQ/UO6BWp S574zi6p+21BxUBLDp6WS2DbrpS1SlrTwqLKE/fsS3tFQmb5h95madza9Nu0Rl8QoYAXNp xgQQSmBvS2q+reyPZlCg433fJEINzYGKUAw698LMxcs5QUWFUwIy7aH18y0RKgmvvercpN ++l0V+gyifsP/d4HtWC9dTG6pwfuUg4pogC6c5WB7qfRg7jeD0tVdntPcKg+Y4bGtuIr6f bD6EaPdBRAVQhS4Il2xC1ARIPZu1BOwlGY29p+qpFPMn2/S8DYDI2NUSWQdRPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTYQN7pRA8oAY/00N1vrMf1CIYEY+4vVY/H334YfTOE=; b=DMdnWjMaijt9AeAr2ZpMYKQqM3qkN88TR7LUfrryu0qu/YKiVpGSrop8CayQh7QvaM/6/J z7T3PP3gYdJvRpjW0enSX4/mafcDxgkjffPocUxAu92zqcWpGnuIzA3HtaCjMbVcEU+IJu grcVAsdAINRWIG6jMvI+9pC4Hma1V3Owwpo6rwSm0ICG/+bOG+MJF1yuc5hwloqM00iHDv 623mx5QCcN42iddTDQcrD+zX9ZwgU3bUG88dXPNL+Zz52Vyysyxn8aGgmjun+6mpN1SayY 8EtLlAMjJ/2Aps6nFTClWUPQfrzNvh4QVe+AaSvmI+KJAalMtmC0XPIFpSBaUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmb44RVzgB7; Thu, 28 Sep 2023 22:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSFSr073948; Thu, 28 Sep 2023 22:28:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSFpD073945; Thu, 28 Sep 2023 22:28:15 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:15 GMT Message-Id: <202309282228.38SMSFpD073945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: fa786d4da669 - releng/14.0 - timerfd: compute fflags before calling falloc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: fa786d4da669dcb02884d79565f6dd1b8e0db1c7 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fa786d4da669dcb02884d79565f6dd1b8e0db1c7 commit fa786d4da669dcb02884d79565f6dd1b8e0db1c7 Author: Mateusz Guzik AuthorDate: 2023-08-25 15:09:21 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:20 +0000 timerfd: compute fflags before calling falloc While here dodge list locking in timerfd_adjust if empty. (cherry picked from commit 5eab523053db79b4bd4f926c7d7ac04444d9c1da) Approved by: re (cperciva@) (cherry picked from commit fc0c24482f11c403480c5219810a27d8591a8fb6) Approved-by: re (cperciva) --- sys/kern/sys_timerfd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index 2bf2a05c443c..c8b45a926b02 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -129,6 +129,9 @@ timerfd_jumped(void) struct timerfd *tfd; struct timespec boottime, diff; + if (LIST_EMPTY(&timerfd_list)) + return; + timerfd_getboottime(&boottime); sx_xlock(&timerfd_list_lock); LIST_FOREACH(tfd, &timerfd_list, entry) { @@ -418,7 +421,7 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) { struct file *fp; struct timerfd *tfd; - int error, fd, fflags = 0; + int error, fd, fflags; AUDIT_ARG_VALUE(clockid); AUDIT_ARG_FFLAGS(flags); @@ -427,8 +430,12 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) return (EINVAL); if ((flags & ~(TFD_CLOEXEC | TFD_NONBLOCK)) != 0) return (EINVAL); + + fflags = FREAD; if ((flags & TFD_CLOEXEC) != 0) fflags |= O_CLOEXEC; + if ((flags & TFD_NONBLOCK) != 0) + fflags |= FNONBLOCK; error = falloc(td, &fp, &fd, fflags); if (error != 0) @@ -447,9 +454,6 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) LIST_INSERT_HEAD(&timerfd_list, tfd, entry); sx_xunlock(&timerfd_list_lock); - fflags = FREAD; - if ((flags & TFD_NONBLOCK) != 0) - fflags |= FNONBLOCK; finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops); fdrop(fp, td); From nobody Thu Sep 28 22:28:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmd0Njhz4vhbj; Thu, 28 Sep 2023 22:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSmc628Tz3Qgj; Thu, 28 Sep 2023 22:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cnt/Zt9hMDslVZ7okw1EgXqT6M8s5aoT4do6NhDu8cs=; b=gVa6kyk9gji6G9w/lq42X7SC9V6vcNWbipkjlQEyIAAfly3pnM1GsR4qyFmpgKHixC/LFa /UI2gI2OpdDEjq9JudX7Jx66fYb8c5kJv7elHkXEFOAU5AxGGBjSjzr2cioipbpMniph6A n/B3fHvkl6mOvkjaxqgGW3RwQ635bMznhIR0/noBAqcBteyYHox2Tn8R40UFPCLVJEZoC3 /bBAK4di1fLvXu++pCSVC1trKdIA+engfIIOotI23NKsC2tmZgT4v75K/uiK2elm4rj1rY /kf/TPQPhUVwgAjf5RlXCTpYzZLom1/7iOn/v6UcUGkvnaTIKZqA11qDeLqfhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940097; a=rsa-sha256; cv=none; b=XAglkmUMvCrShwEhT2pO8VX7ahwlv9dFdqQHqD3H7qGuLF28oymi50Gd/srGv2CiyZY4+N kTn0DoARNE1Atiqqfx4MEnorSWC+QUNSiitfRmBETtp6i0cmFv5A3ZJpAKlevj2/0bAH10 41c2cYaVEoRovxxPYDeIV4F9rA3S2lARY/a8wn+4tG5n2KgbUdAwX9P1aianGMWwO925kL VVFNmOe788J4kuSVz1UdCValBKMPjnxt10KYaSP9HnUfdTdXhmmpw6yOZJaVE0yLU/WzxW JDSpgDWYxz0U2UZxiXARyLwJdj9ahWr3uMF7SPVIzND4h9ct9tl2ejvNTsaixA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cnt/Zt9hMDslVZ7okw1EgXqT6M8s5aoT4do6NhDu8cs=; b=V+eVpLsqUtgJ05eErSCz1wsZbTlHdQTm9sA14HyGPHCCF8F6dBJLVUQWkbABKo+WMei22J aBvPCiiDR1IDMZdEIvP1ch0x+t/rWoHNjIL8erPQ8kJ0ox5ZhZaCXVJnqphjIspb5/EVCQ K7VGgCPfo/gWkaubQp8WxnVJjY2DjThpkhJKkuI0qIrkP1Q25bDj647jdkfDGwTcT4J7ai xi8Qh8HHdil0QBICgo4APBk/eHWfvhTSPXQ+vyT0VRm/klp2YLP6sAz8VeCnmOIaO3Q82f TWhoZYtYqBa/a218iUFc+sjVWF8A0YEs+yg9xHxx/73fU4jXRX1WIbkbWRdtQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmc55ZfzgF2; Thu, 28 Sep 2023 22:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSGof074002; Thu, 28 Sep 2023 22:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSGSc073999; Thu, 28 Sep 2023 22:28:16 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:16 GMT Message-Id: <202309282228.38SMSGSc073999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: d850e957e937 - releng/14.0 - timerfd: convert timerfd_list_lock from sx to mtx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: d850e957e9370ba068e8a05099f0fb6fa84f6b52 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d850e957e9370ba068e8a05099f0fb6fa84f6b52 commit d850e957e9370ba068e8a05099f0fb6fa84f6b52 Author: Mateusz Guzik AuthorDate: 2023-09-17 15:01:33 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:22 +0000 timerfd: convert timerfd_list_lock from sx to mtx There was no good reason to use the former. This should prevent some head-scratching by an interested and qualified reader. (cherry picked from commit f4296cfb409a48de00bfa60e76f686c2b031876f) (cherry picked from commit a87dddf39e866015341003eeac76d736d993514a) Approved-by: re (cperciva) --- sys/kern/sys_timerfd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index c8b45a926b02..e4d2f10f28ef 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -61,9 +61,9 @@ static MALLOC_DEFINE(M_TIMERFD, "timerfd", "timerfd structures"); -static struct sx timerfd_list_lock; +static struct mtx timerfd_list_lock; static LIST_HEAD(, timerfd) timerfd_list; -SX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock"); +MTX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock", MTX_DEF); static struct unrhdr64 tfdino_unr; @@ -133,7 +133,7 @@ timerfd_jumped(void) return; timerfd_getboottime(&boottime); - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_FOREACH(tfd, &timerfd_list, entry) { mtx_lock(&tfd->tfd_lock); if (tfd->tfd_clockid != CLOCK_REALTIME || @@ -169,7 +169,7 @@ timerfd_jumped(void) tfd->tfd_boottim = boottime; mtx_unlock(&tfd->tfd_lock); } - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); } static int @@ -324,9 +324,9 @@ timerfd_close(struct file *fp, struct thread *td) { struct timerfd *tfd = fp->f_data; - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_REMOVE(tfd, entry); - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); callout_drain(&tfd->tfd_callout); seldrain(&tfd->tfd_sel); @@ -450,9 +450,9 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock); timerfd_getboottime(&tfd->tfd_boottim); getnanotime(&tfd->tfd_birthtim); - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_INSERT_HEAD(&timerfd_list, tfd, entry); - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops); From nobody Thu Sep 28 22:28:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmf1k6Lz4vhWS; Thu, 28 Sep 2023 22:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSmf0Bj7z3QqZ; Thu, 28 Sep 2023 22:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r5LSzKWn6FIxcGeF280lo5o60SaxDEBzcy19BezrEpg=; b=kaQsfliLTIBIQqVNoKOdYPnsR7Ro2Pv0esFBRmpSL0+UDDS5wp4Wh1krqaOHjJdevHgNf6 RX57vtsOavVqBFVM9DDPH9GJJGxSjyUNhkJaOPGQD4aHh1gI+FqYaTyEpFOLIWV/cVs3Gn NPlkLP4nLkRoXmzPlWYijooFVc2RKL1IyT6e6EGDF8pU8F7d7oTnb4vgqOpvRe5MvUbTzZ dJJqW9D9meTWqxxZydQxyrHpmkNlk5yJwJ/On4Vcwmj91cuykJou7gCEkdo0sCbKhKks8Y 8Ygb8bMI9a9YNj8DADRNrR9Vzs46H6DYofK32h4Jx8f+FkrVF9ChpXn4Mi1VoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940098; a=rsa-sha256; cv=none; b=HkbrBC1UQPP7cCRF/fVjWLNlqyGK+ba9U8Q6/hg+rG5h847jnWyh6Z4yz1K7uvOFuMJJo8 4KB1Pi2vyQWxZWaLnvphHz+31WLm1GqbbAczjZyTQKP4Lq54vfY7wdoVo89BEcmKlmXMBB 0Ahx2mmJdIvGn4AikQ0Y2B8iLNYGyv6yMohi8Fzg2BDmTvgcVQX5KhV0MdyY3i2raZ1p4X rO40ka705lQgM1+QedyUFTviuccHvLg0dShaQYyv6B3gNAldOENPzskh16KXYJlI9u3wnj 0X24341NTtfROXgMWh5FfDUmmZykZWphZ53aFxi+mzTFivnL9K1G2/pqQ2bwuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r5LSzKWn6FIxcGeF280lo5o60SaxDEBzcy19BezrEpg=; b=lxITpE3NiGVISue5EL1n3uuqKvSg+cpnJmOp5Yb1voY2whIftDQL8XeyrsZ8MCtslqcuB/ ZNwNfHg/LgWFMmk19V12n/b8Xw9UbLpeLNEPXEU04YzrsFau9TIUz/bX9QJ2e+9X+ejREY f/L/J5SfofxVkOOkrjSpbUFSlBNhNze9Q5l5J01x5e9XMoOl/8Q3qRJmcwPVziWpWgCROX qC+OIf5I3Gw8a0xs9pV9JIiFEBr6f50YzY3QNlxbXhtcdJKUvEJ/u+xrsQSi49BDKlb5Y1 jA9JEZfpieo3Kq6euYGUNBH5TBd4dswc97byDhaburur85hxjd8thK4AF6Ua7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmd65sTzfx6; Thu, 28 Sep 2023 22:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSHFg074044; Thu, 28 Sep 2023 22:28:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSH86074041; Thu, 28 Sep 2023 22:28:17 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:17 GMT Message-Id: <202309282228.38SMSH86074041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: aebc51ee4791 - releng/14.0 - timerfd: Define a locking regime List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: aebc51ee479104bc92f5bfa97d1b970637cb24c5 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aebc51ee479104bc92f5bfa97d1b970637cb24c5 commit aebc51ee479104bc92f5bfa97d1b970637cb24c5 Author: Jake Freeland AuthorDate: 2023-09-17 15:01:46 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:23 +0000 timerfd: Define a locking regime Define a locking regime for the members of struct timerfd and document it so future code can follow the standard. The lock legend can be found in a comment above struct timerfd. Additionally, * Add assertions based on locking regime. * Fill kn_data with the expiration count when EVFILT_READ is triggered. * Report st_ctim for stat(2). * Check if file has f_type == DTYPE_TIMERFD before assigning timerfd pointer to f_data. MFC After: 3 days Reviewed by: imp, kib, markj Differential Revision: https://reviews.freebsd.org/D41600 (cherry picked from commit a1f506156c4db885d3cc177c93e9c8a28d535d30) (cherry picked from commit d00e6d87745528be7acf58f39eaa148d8cb6c7c2) Approved-by: re (cperciva) --- sys/kern/sys_timerfd.c | 61 +++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index e4d2f10f28ef..a81b5ad0fade 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -73,28 +73,36 @@ static struct unrhdr64 tfdino_unr; #define TFD_CANCELED 4 /* Jumped, CANCEL_ON_SET=true. */ #define TFD_JUMPED (TFD_ZREAD | TFD_CANCELED) +/* + * One structure allocated per timerfd descriptor. + * + * Locking semantics: + * (t) locked by tfd_lock mtx + * (l) locked by timerfd_list_lock sx + * (c) const until freeing + */ struct timerfd { /* User specified. */ - struct itimerspec tfd_time; /* tfd timer */ - clockid_t tfd_clockid; /* timing base */ - int tfd_flags; /* creation flags */ - int tfd_timflags; /* timer flags */ + struct itimerspec tfd_time; /* (t) tfd timer */ + clockid_t tfd_clockid; /* (c) timing base */ + int tfd_flags; /* (c) creation flags */ + int tfd_timflags; /* (t) timer flags */ /* Used internally. */ - timerfd_t tfd_count; /* expiration count since last read */ - bool tfd_expired; /* true upon initial expiration */ - struct mtx tfd_lock; /* mtx lock */ - struct callout tfd_callout; /* expiration notification */ - struct selinfo tfd_sel; /* I/O alerts */ - struct timespec tfd_boottim; /* cached boottime */ - int tfd_jumped; /* timer jump status */ - LIST_ENTRY(timerfd) entry; /* entry in list */ + timerfd_t tfd_count; /* (t) expiration count since read */ + bool tfd_expired; /* (t) true upon initial expiration */ + struct mtx tfd_lock; /* tfd mtx lock */ + struct callout tfd_callout; /* (t) expiration notification */ + struct selinfo tfd_sel; /* (t) I/O alerts */ + struct timespec tfd_boottim; /* (t) cached boottime */ + int tfd_jumped; /* (t) timer jump status */ + LIST_ENTRY(timerfd) entry; /* (l) entry in list */ /* For stat(2). */ - ino_t tfd_ino; /* inode number */ - struct timespec tfd_atim; /* time of last read */ - struct timespec tfd_mtim; /* time of last settime */ - struct timespec tfd_birthtim; /* creation time */ + ino_t tfd_ino; /* (c) inode number */ + struct timespec tfd_atim; /* (t) time of last read */ + struct timespec tfd_mtim; /* (t) time of last settime */ + struct timespec tfd_birthtim; /* (c) creation time */ }; static void @@ -109,6 +117,7 @@ static inline void timerfd_getboottime(struct timespec *ts) { struct timeval tv; + getboottime(&tv); TIMEVAL_TO_TIMESPEC(&tv, ts); } @@ -274,6 +283,8 @@ filt_timerfdread(struct knote *kn, long hint) { struct timerfd *tfd = kn->kn_hook; + mtx_assert(&tfd->tfd_lock, MA_OWNED); + kn->kn_data = (int64_t)tfd->tfd_count; return (tfd->tfd_count > 0); } @@ -308,13 +319,13 @@ timerfd_stat(struct file *fp, struct stat *sb, struct ucred *active_cred) sb->st_uid = fp->f_cred->cr_uid; sb->st_gid = fp->f_cred->cr_gid; sb->st_blksize = PAGE_SIZE; - mtx_lock(&tfd->tfd_lock); - sb->st_ino = tfd->tfd_ino; sb->st_atim = tfd->tfd_atim; sb->st_mtim = tfd->tfd_mtim; - sb->st_birthtim = tfd->tfd_birthtim; mtx_unlock(&tfd->tfd_lock); + sb->st_ctim = sb->st_mtim; + sb->st_ino = tfd->tfd_ino; + sb->st_birthtim = tfd->tfd_birthtim; return (0); } @@ -342,15 +353,12 @@ static int timerfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) { - struct timerfd *tfd = fp->f_data; kif->kf_type = KF_TYPE_TIMERFD; - mtx_lock(&tfd->tfd_lock); kif->kf_un.kf_timerfd.kf_timerfd_clockid = tfd->tfd_clockid; kif->kf_un.kf_timerfd.kf_timerfd_flags = tfd->tfd_flags; kif->kf_un.kf_timerfd.kf_timerfd_addr = (uintptr_t)tfd; - mtx_unlock(&tfd->tfd_lock); return (0); } @@ -376,6 +384,7 @@ timerfd_curval(struct timerfd *tfd, struct itimerspec *old_value) { struct timespec curr_value; + mtx_assert(&tfd->tfd_lock, MA_OWNED); *old_value = tfd->tfd_time; if (timespecisset(&tfd->tfd_time.it_value)) { nanouptime(&curr_value); @@ -472,11 +481,11 @@ kern_timerfd_gettime(struct thread *td, int fd, struct itimerspec *curr_value) error = fget(td, fd, &cap_write_rights, &fp); if (error != 0) return (error); - tfd = fp->f_data; - if (tfd == NULL || fp->f_type != DTYPE_TIMERFD) { + if (fp->f_type != DTYPE_TIMERFD) { fdrop(fp, td); return (EINVAL); } + tfd = fp->f_data; mtx_lock(&tfd->tfd_lock); timerfd_curval(tfd, curr_value); @@ -504,11 +513,11 @@ kern_timerfd_settime(struct thread *td, int fd, int flags, error = fget(td, fd, &cap_write_rights, &fp); if (error != 0) return (error); - tfd = fp->f_data; - if (tfd == NULL || fp->f_type != DTYPE_TIMERFD) { + if (fp->f_type != DTYPE_TIMERFD) { fdrop(fp, td); return (EINVAL); } + tfd = fp->f_data; mtx_lock(&tfd->tfd_lock); getnanotime(&tfd->tfd_mtim); From nobody Thu Sep 28 22:28:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxSmg2qn6z4vhTF; Thu, 28 Sep 2023 22:28: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 4RxSmg0vfrz3QsX; Thu, 28 Sep 2023 22:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYM68nB6Vw4eSGrlxAOF82y1BVxL0C2b3Kkj4KY25FA=; b=dKDK8LPlkixvGH5m3jH8hw92y91GB3d0ptEzW9HiqDOKA3Gs8YSvyJci6fl460J/qjm2ys QCvKoEdEMnPUqLKaUhUWXOhc6eMSvDQ4/DOtPG1vCeWn8MlhVTRzs8iq6oAIYjlyPSkIZ8 Vm2lS7lwP5GFVoJr8lhytXIiRlbUWLvTNSlvyHDtJRpBw7VfiOWAZWO9UKl9Z3aFiXLxQd zJQ5C0sT78euDCeVuHgoHSSNjB1DyttbaddK7YJKC3eOqC5H9pKMpj8XpgFIKDx0vh9GQ4 09PKrMABMjbo04zbN2UuPiLAXqIlC00aohzK6x52dThK3685nz5YiaIga7zfdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695940099; a=rsa-sha256; cv=none; b=B1OkYCOmvqsE5eiqnI8N7QkHPAI2SXGgJ3GP0sd0vJ59e/b0ty3mn7QyFlT17s5E9z7jpq 8Qv4HwCXo24p1u+YFhZLEwQqC8KwX0gvM4TzhSS1jxvODrg+coaQeVwhirxoh1m7e4743z 2T5Iihc/VnvOAXlJeEk3jI4VsRrUeehZhEYcpgaySaWo8OcXO20oTkPxCoLeCZn0IPuPNO RIn/m4BsiyHzwFpOnupPvbhiKObuAShCQ02csCvEdS3DNVlJ3yMWxsG9a1UKiEYqqAMP+m nebfGtczjTV+3okI+Wl7hMToThu31DGqCCU8bWICF02cgZyWjBaTKmMrjiEPxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695940099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYM68nB6Vw4eSGrlxAOF82y1BVxL0C2b3Kkj4KY25FA=; b=vOSjeO9NTg8EwIYwh+26YJNarT3aO1fM/d1dj+ZI5vJrujdU0P/IsngoRSEyXxVRHbgTQy AHAQsRTTb6JR1qHm19ZNMxorzUBtaaWriByuan110PEmDw/JYF59iWxJffIwWoTD67Onax zi1W1bzkYlrNx93yvaIH2Rx+OS4qqt/0ljI1PMK4ydJ2bK+0oVpYCVCYIdqfY5fA1L0lnX mdCoPaAHWGgwmDOvE0QYfaS2vRqN/CEuHotdudxn4BfHH/fTnhb9amfZ30/yoAt66gMwiB q7uDhPHCn7S5OdX1RCSdVc1BFT+7YmarmOhXVV25K0wElr+suyWVuh/sDUffPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSmg01NGzg8v; Thu, 28 Sep 2023 22:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMSIeZ074086; Thu, 28 Sep 2023 22:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMSIaA074083; Thu, 28 Sep 2023 22:28:18 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:28:18 GMT Message-Id: <202309282228.38SMSIaA074083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 40293a0995d9 - releng/14.0 - timerfd: Relocate 32-bit compat code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 40293a0995d92717dc88bd7ccbf0d841b9a9d428 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=40293a0995d92717dc88bd7ccbf0d841b9a9d428 commit 40293a0995d92717dc88bd7ccbf0d841b9a9d428 Author: Jake Freeland AuthorDate: 2023-09-17 15:01:58 +0000 Commit: Warner Losh CommitDate: 2023-09-28 22:26:25 +0000 timerfd: Relocate 32-bit compat code 32-bit compatibility code is conventionally stored in sys/compat/freebsd32. Move freebsd32_timerfd_gettime() and freebsd32_timerfd_settime() from sys/kern/sys_timerfd.c to sys/compat/freebsd32/freebsd32_misc.c. MFC After: 3 days Reviewed by: imp, markj Differential Revision; https://reviews.freebsd.org/D41640 (cherry picked from commit 918966a27479b4fb7c4c8999c4926d83c2c081e5) (cherry picked from commit 27d567847b18275012bf39fb517dceee41b1ed33) Approved-by: re (cperciva) --- sys/compat/freebsd32/freebsd32_misc.c | 55 +++++++++++++++++++++++++++++++ sys/kern/sys_timerfd.c | 61 ----------------------------------- 2 files changed, 55 insertions(+), 61 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 22ee4897083e..c26e7b97e717 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -82,6 +82,7 @@ #include #include #include +#include #include #include #include @@ -3138,6 +3139,60 @@ freebsd32_ktimer_gettime(struct thread *td, return (error); } +int +freebsd32_timerfd_gettime(struct thread *td, + struct freebsd32_timerfd_gettime_args *uap) +{ + struct itimerspec curr_value; + struct itimerspec32 curr_value32; + int error; + + error = kern_timerfd_gettime(td, uap->fd, &curr_value); + if (error == 0) { + CP(curr_value, curr_value32, it_value.tv_sec); + CP(curr_value, curr_value32, it_value.tv_nsec); + CP(curr_value, curr_value32, it_interval.tv_sec); + CP(curr_value, curr_value32, it_interval.tv_nsec); + error = copyout(&curr_value32, uap->curr_value, + sizeof(curr_value32)); + } + + return (error); +} + +int +freebsd32_timerfd_settime(struct thread *td, + struct freebsd32_timerfd_settime_args *uap) +{ + struct itimerspec new_value, old_value; + struct itimerspec32 new_value32, old_value32; + int error; + + error = copyin(uap->new_value, &new_value32, sizeof(new_value32)); + if (error != 0) + return (error); + CP(new_value32, new_value, it_value.tv_sec); + CP(new_value32, new_value, it_value.tv_nsec); + CP(new_value32, new_value, it_interval.tv_sec); + CP(new_value32, new_value, it_interval.tv_nsec); + if (uap->old_value == NULL) { + error = kern_timerfd_settime(td, uap->fd, uap->flags, + &new_value, NULL); + } else { + error = kern_timerfd_settime(td, uap->fd, uap->flags, + &new_value, &old_value); + if (error == 0) { + CP(old_value, old_value32, it_value.tv_sec); + CP(old_value, old_value32, it_value.tv_nsec); + CP(old_value, old_value32, it_interval.tv_sec); + CP(old_value, old_value32, it_interval.tv_nsec); + error = copyout(&old_value32, uap->old_value, + sizeof(old_value32)); + } + } + return (error); +} + int freebsd32_clock_getcpuclockid2(struct thread *td, struct freebsd32_clock_getcpuclockid2_args *uap) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index a81b5ad0fade..e245baed88be 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -54,11 +54,6 @@ #include -#ifdef COMPAT_FREEBSD32 -#include -#include -#endif - static MALLOC_DEFINE(M_TIMERFD, "timerfd", "timerfd structures"); static struct mtx timerfd_list_lock; @@ -598,59 +593,3 @@ sys_timerfd_settime(struct thread *td, struct timerfd_settime_args *uap) } return (error); } - -#ifdef COMPAT_FREEBSD32 -int -freebsd32_timerfd_gettime(struct thread *td, - struct freebsd32_timerfd_gettime_args *uap) -{ - struct itimerspec curr_value; - struct itimerspec32 curr_value32; - int error; - - error = kern_timerfd_gettime(td, uap->fd, &curr_value); - if (error == 0) { - CP(curr_value, curr_value32, it_value.tv_sec); - CP(curr_value, curr_value32, it_value.tv_nsec); - CP(curr_value, curr_value32, it_interval.tv_sec); - CP(curr_value, curr_value32, it_interval.tv_nsec); - error = copyout(&curr_value32, uap->curr_value, - sizeof(curr_value32)); - } - - return (error); -} - -int -freebsd32_timerfd_settime(struct thread *td, - struct freebsd32_timerfd_settime_args *uap) -{ - struct itimerspec new_value, old_value; - struct itimerspec32 new_value32, old_value32; - int error; - - error = copyin(uap->new_value, &new_value32, sizeof(new_value32)); - if (error != 0) - return (error); - CP(new_value32, new_value, it_value.tv_sec); - CP(new_value32, new_value, it_value.tv_nsec); - CP(new_value32, new_value, it_interval.tv_sec); - CP(new_value32, new_value, it_interval.tv_nsec); - if (uap->old_value == NULL) { - error = kern_timerfd_settime(td, uap->fd, uap->flags, - &new_value, NULL); - } else { - error = kern_timerfd_settime(td, uap->fd, uap->flags, - &new_value, &old_value); - if (error == 0) { - CP(old_value, old_value32, it_value.tv_sec); - CP(old_value, old_value32, it_value.tv_nsec); - CP(old_value, old_value32, it_interval.tv_sec); - CP(old_value, old_value32, it_interval.tv_nsec); - error = copyout(&old_value32, uap->old_value, - sizeof(old_value32)); - } - } - return (error); -} -#endif From nobody Fri Sep 29 00:05:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxVwQ5SmLz4vp7q; Fri, 29 Sep 2023 00:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxVwQ4bcPz3YgX; Fri, 29 Sep 2023 00:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695945910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2N1YDvM0zYahXUGt+MpM/ZvJuOjx0eAEQqDWI3C2v+E=; b=URomtB61u1MRrjwP6t7/NfKFYULt1HVaGv/v1ujl1G55Cfxc+dKUzzRcL0TOaDC7Vniwo/ s8V1f526qLugBdNcXki8C+KoaF5WY3ZInaOwqcwCm4UiUpOpFFsyH8dIWE+6lZuk8O0GXk DvAbgozS2lupqZGWsgGv8TfixNLIgsDbUe5bWh50Ru5D35ewWiepUjVtqPuJ4eb9/bUjTt WQKutCbgLti9e41Je3s7CDSf7M4FXwIpI0YzhzrCTC3gydXjwno4hb2I0DkYx5YuWjL8hV 7K/ELeQiKKcLc6EGhx1VeiDK4yfuqx3nFBE5JzOJYTt+lkf0dRjuyqQN84fN6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695945910; a=rsa-sha256; cv=none; b=OUH0wsASAaD4Xw/eu91B9zbKdoRwmaPb/c1xWEa8JCF7uREcC4JkC+McX1YSskc2AjIQsm NgM9x9bbJ+aTJLpIn5IgYGjKysZgLkLzV2MI4zlavGmq1pEtWtuegtItNd43kVxvpHh14T 5hr6otQ1W/ALozrVzkOhYW4zoQqS27OtIgNlpLBKm2i9OIfrT3NnRwaPwpqSU8AlGxawjf VfMiUR4gnxJBZaoabM2zhf3I4nmTixlPxKYXejLBvECdA03BZP1AgZLtyBnBET61vmAq3M dh//O4cynrDm7aDrecgbCwLvRh5EoAwxhLl3U2K1FkytVfbkoPC1W3O5eETj5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695945910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2N1YDvM0zYahXUGt+MpM/ZvJuOjx0eAEQqDWI3C2v+E=; b=N7dZ83/+hOP98rTdP+T/bf+1q5PON//3gsEnGfhb/Ic74cbfN0npW/w+4NHJID1IM++0WY 9La4lktceTMktk0kptd+mZ/IWBv6dmq2PJvgQtDF46Tnh+4oq4g9Vx4zru8EbP43P2BnkW fIZDZ0+3QkL3K4bkebIPefYUPixhONIQAskC0UPMytPx/Vn5lFnOFk18O6FjWDXyYSwue0 JBQTHz5xqYkSndMxBbOJ4WQ+VymvLMQCgwtu8vkr0nabpwk9LpmJ/huZWweifcFx9ho9gq GolagssUTp4bxzUdwwvvHIpT9kR4t+19VQxs85MWuY7HD8oG5NZsl1FWQoTEBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxVwQ3fBgzj2T; Fri, 29 Sep 2023 00:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38T05AuO038926; Fri, 29 Sep 2023 00:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38T05AJN038923; Fri, 29 Sep 2023 00:05:10 GMT (envelope-from git) Date: Fri, 29 Sep 2023 00:05:10 GMT Message-Id: <202309290005.38T05AJN038923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: ba883e7a5ac4 - main - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e Author: Zhenlei Huang AuthorDate: 2023-09-29 00:01:43 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-29 00:01:44 +0000 ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.inet.ipf.large_nat` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: cy (for #network) Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42005 --- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 35daad4715bf..69be4abb2485 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -134,7 +134,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); #define CDEV_MAJOR 79 #include From nobody Fri Sep 29 00:18:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxWCR2Bphz4vq1p; Fri, 29 Sep 2023 00:18: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 4RxWCR1ftGz3Zlf; Fri, 29 Sep 2023 00:18:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695946691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mN6ZtMOMGXNlANfUF521YeFb7Zj15yLxwhvE8/dYrIA=; b=IGKujYizsYnaOm7W2U/XLaery+CtHaH3EM7AvMY4jORNjQqALTocjZ3qMcVhefi6jx2JJ/ 01D7a/R66qKtV3ApmuhDVtVqkRKGqBVihCUhMydX6oDHGmBwiBGSMogI1enIncHt5vfngr g4nyoJQNVcnu393hYXSFp2hqOuJIpKJTIFFsgwEiYEM7kZ3JFgAS80yq6sms0okQLWouDX OzZa1IdYmBOsTyv1YeJed0vNqVm2dtVebc6224h3CzSGXeg6m2YEcTuHUCAImlxO5T2xPK C2+ciiGYGfGgRi9Z6TlMz86+c9wW/lBLZJprd7F/LlGJ0f5ES2gUSNTCcMKRgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695946691; a=rsa-sha256; cv=none; b=C6NWh8Jwc+kAgcJYZmjTSRSkmcf+G/e5w9UL82q+NVnRQM62BwFEXBjy20dCob6TT36nw2 8bRP84m8SpfRqa3SMV3WX9ZddB03Bfnu+Sb20qGqURcZFciXqwmSqIcEFfJmyb+4vOXqZB s/rkViskvQZuz11L16xqwlGkKQE+o5gIa2cm99netS8BX61D3sBOuZoQwyjsn8KY6evmvW dqJxJhoKDpahe/nVtkoDt4fS/vwdRLrYDhY8gQKeN3PoYT2rn8/Q73AYdjZeTx9QWBTIDV uEOqjJ8yBc2I+wcGR8hn7ES0aGeklr11tPvDsAB1uqa3Ch+sSSzNmHrrRVK7Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695946691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mN6ZtMOMGXNlANfUF521YeFb7Zj15yLxwhvE8/dYrIA=; b=GgP0Ev7lOqt3/yquXJUBLEPyerSHLfD7nN4q6v2YwQ1b302ZRqQudM+kdqmAYF/+A1te/8 BQq9yEVowal1l7BKDoHiuZvaSQSbQQ0Ew2fjz+TZOOT6vNUiJ+qA6IPq9DBZaHixae6KIG JYhgZoFoKazsv+F6r7MzeCvMMowsH8aHvJFH3c6lSodlOJv+0rIvvXI5vDrTORZIr1HHpg 0WUGU8xkl/Zg4rbY7UZGa0Xj04O6SDHA2dagWPZ9/wFEyfRjuU01AAQA+3HWsNwSvR6xTO dv+rap/GYJ/jzeDu4K2h6AeUgfOmyfSYdtV1vajTYzfF0tkmJr8EJAHgdQo6IQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxWCR0jRGzjKH; Fri, 29 Sep 2023 00:18:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38T0IBGo056311; Fri, 29 Sep 2023 00:18:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38T0IBJW056308; Fri, 29 Sep 2023 00:18:11 GMT (envelope-from git) Date: Fri, 29 Sep 2023 00:18:11 GMT Message-Id: <202309290018.38T0IBJW056308@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: ced511bd972a - releng/14.0 - release: update to BETA4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ced511bd972a29fd86515e4bd07310456808a88d Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=ced511bd972a29fd86515e4bd07310456808a88d commit ced511bd972a29fd86515e4bd07310456808a88d Author: Glen Barber AuthorDate: 2023-09-29 00:17:49 +0000 Commit: Glen Barber CommitDate: 2023-09-29 00:17:49 +0000 release: update to BETA4 Approved by: re (implicit) Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd Sponsored by: PayPal https://paypal.me/gjbbsd --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index d33d2b82f0da..58dc89079e90 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="BETA3" +BRANCH="BETA4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Sep 29 00:29:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxWSF3lXBz4vqfw; Fri, 29 Sep 2023 00:29: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 4RxWSF2vN6z3bbX; Fri, 29 Sep 2023 00:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695947357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c/0Efs0+4uLSJgiZxUPhACC83+Ku/eZa/teCW3ivgiA=; b=oI+fLMuK+Hn5v7736kMdpgVl8V/VW1z08eBbPeSovaFZhmSgpBAV6/2fUi4KYTNn5nkDh6 DKxja9CyIpq8QZW0ShRwNgEAxu/kB97AisrDYPKURWtYMpy6I5pmWPLPKqxDOsNO0B/PuT eta/JJp+/DglRZIueOustCe/PjGqX5nlDmxRoS/7WiWgrjdCeApL7iHp2Kr3Zn/vJ97kZw 07H6FoE8aexVALawNyzxKpyKwLE28YxRdHkSlOv8xdFTKEYLZtwXlgi4ivvljNWvwPNzck FaTmslhuO8b83bBtBBmveP/qzaSsaoz5yRBS3XZkGDdZxAWXb+Z8aeXh9/OCSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695947357; a=rsa-sha256; cv=none; b=NSlaUYayLQJP54/yr8rjrzAGa7cBlH+o+iiuLxv9WVG0z2GSwlvHAbhsBHIz58MbLxq2ep xqQ4aIhD1jgDjJ5Ka/zKpNhreQcBFt765gCwybrpnM5A82J36ZpWn/HubDfKlyLN/baRb2 AZN+vDFsIbgSkaehcyhqG8A42ahV7mU4V0mx9/eli0P1Lw3rkq0jG7wuNqb+x7lSYYg5Hf XlyvK58CNCa4pQ/UeUF9dzozvF9S4ziX9bdEjksBgRR067Sh2f4mNX7wNC/nhhjklLBXFg iIYLRA70APz8l+ylUPA3C9E3sKLG8xFa2TMR/e68MXbxlOzOoa5RkPR+Za17vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695947357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c/0Efs0+4uLSJgiZxUPhACC83+Ku/eZa/teCW3ivgiA=; b=e75DdUIRXBXxYShX1A9sDR5JUihKT+I76v6IiQE9Ccg5QDRtxOXM4fy6Sgfr0GwoXP3nJ8 U2bOdr5KZgBrrOBh/zKEI4wmyJeuk7CKKqFvxu8VN3Kf/XUedSw9vFqpr7P9rUBszHITsj niWCff5aTn/WqtBJtRddXwAk7RuFalGmxPIOBbbuhZ6uP0j+bdvfJV5NioBYu/kudGnH8/ Q1Fgsg/gZpMPYMomU83We5b/zHRTJ3jP1ouBj5anH+3UJuM5vA7XkxbTaldumvpSlYYGFQ QjTKAKxWjwj8IJlDBP9boD/psnQ9KKM6Y2RXln6U+ac988uq/1V7hMnoQmvt8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxWSF1wbnzjmD; Fri, 29 Sep 2023 00:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38T0THPu072804; Fri, 29 Sep 2023 00:29:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38T0THXD072801; Fri, 29 Sep 2023 00:29:17 GMT (envelope-from git) Date: Fri, 29 Sep 2023 00:29:17 GMT Message-Id: <202309290029.38T0THXD072801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 9aa0bb1e9113 - stable/14 - Assert that ifnet_detach_sxlock is held where needed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9aa0bb1e911373541ecd039fc54270c08e2cffbe Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9aa0bb1e911373541ecd039fc54270c08e2cffbe commit 9aa0bb1e911373541ecd039fc54270c08e2cffbe Author: Dag-Erling Smørgrav AuthorDate: 2023-09-08 10:06:01 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-29 00:28:18 +0000 Assert that ifnet_detach_sxlock is held where needed. Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D41770 (cherry picked from commit 9a071e4e576490370f26307405f12200218dec54) --- sys/net/if.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index fd4db49a658d..0128fb8039ee 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1128,6 +1128,8 @@ if_detach_internal(struct ifnet *ifp, bool vmove) shutdown = VNET_IS_SHUTTING_DOWN(ifp->if_vnet); #endif + sx_assert(&ifnet_detach_sxlock, SX_XLOCKED); + /* * At this point we know the interface still was on the ifnet list * and we removed it so we are in a stable state. From nobody Fri Sep 29 00:29:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxWSG4q9bz4vqPr; Fri, 29 Sep 2023 00:29: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 4RxWSG4L2Yz3bH5; Fri, 29 Sep 2023 00:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695947358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y4bfqLQouMps7zjZ5F9eI6VLp7OuL7gzVy8IePAJn5o=; b=Qkyg+t86OTTEND2BpAhPuhyDEtEPhWkmnZGqxVT0Sg0UF4k1OXkQ9wpOy4c0HYgqWXvvt+ N2JYlIlCA/MKC5I9NzAIftrNiW1C9PzIv0WlXpZ+R+fNv/mhwIYXlTpsVyMhAXqXvLmAa+ DKB8NKrXPerypn/8vkWMmYQRs3EIIJVm+0wZAAbSKIcJVQ7ZVMMmn/uC1rIANXj1WqUAW1 x64um569UpVhQbUbxfxFUmgJgE6CgsWoO9uqKOAVXwJgG5eti9ysPC9jdrWNK9YD1mdPn7 mUr/TT9TXO+hRskk3YPXaD7gUaBHuMONxdsgwxYzP4q2ISgCeS/47WA0OxyJxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695947358; a=rsa-sha256; cv=none; b=X+juYXGWzmlo31syjzf7H35G2bd8xmeMHFebek7Y5lPeMpv9czXebTEs/LNykLTzfQhjFq 0ts3tCRslE34nsCWFUZSybh/Lb0yx2iPp1g2kg9eVh4kyGT1ESnWgS7KwJN1oDxRM+ycQv eHOWzQJsm0eW8c6qbCdoRzhjQ8m32lD3CN5zRaMl+kK9Q0yn+S9Tqt//vDbsKeYIRyYjgv D/szUepDvtLZqI2/obJDeQARhsel1IXqG6iw73tz5mKu1esI6OFbPHXQYg5Tr9wuHmpOBY Fj5CjJTu8yFvrRLwj9/f3/BoTt9Amkj4fxV3kHsCNWjQM1ddIvMtnxFrleaidQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695947358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y4bfqLQouMps7zjZ5F9eI6VLp7OuL7gzVy8IePAJn5o=; b=EwEH1/eUppjeXCMMAkOb5pMaiiCqZaGM5LsSYavmB2zI0fCjhCYxibZSNYs2V6ifWhQvll lLnyVqeoc3x/iToJ9wnOw5fAFfIU1kA7xjMpmBNJiuF9xFoF2ONf2FsIr5UB1AZVIicLPA 7ORl+DUpOF9OnYf9Z2mqAF7AUVvp7oTW/A6IpSIuGkoVVsusY35IFsDOx6E1jT5/k+LCG/ wibMDIIbJ0P2/zejhwvVqD6REnvBHfuObGgFSshslCEpHMJquZgIY0JrQK/UVwGPBKW//E 4xnMyDIZQL1OjEEdhf3fKHwwh+lJMvHY3RCAXxobePylLVuJSVlKGe6BYtv5tA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxWSG39ZXzk38; Fri, 29 Sep 2023 00:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38T0TIoW072870; Fri, 29 Sep 2023 00:29:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38T0TIFQ072867; Fri, 29 Sep 2023 00:29:18 GMT (envelope-from git) Date: Fri, 29 Sep 2023 00:29:18 GMT Message-Id: <202309290029.38T0TIFQ072867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b9b207e4ecc0 - stable/14 - Remove mention of defunct mailing list from acl / mac man pages. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b9b207e4ecc07839abf6eb8e3ebc8fac79501c00 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b9b207e4ecc07839abf6eb8e3ebc8fac79501c00 commit b9b207e4ecc07839abf6eb8e3ebc8fac79501c00 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-22 07:42:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-29 00:28:18 +0000 Remove mention of defunct mailing list from acl / mac man pages. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41923 (cherry picked from commit b653faaa19c47a4a7e488e5ead738b7ae44ffe8b) Fix typos in acl_get_entry(3) manual page. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41924 (cherry picked from commit c34fce8a039935e06ed84db1395d7d2c551e5a7c) --- lib/libc/posix1e/acl.3 | 7 +------ lib/libc/posix1e/acl_get.3 | 12 ++---------- lib/libc/posix1e/acl_get_entry.3 | 6 +++--- lib/libc/posix1e/mac_free.3 | 8 +------- lib/libc/posix1e/mac_get.3 | 8 +------- lib/libc/posix1e/mac_prepare.3 | 8 +------- lib/libc/posix1e/mac_text.3 | 8 +------- 7 files changed, 10 insertions(+), 47 deletions(-) diff --git a/lib/libc/posix1e/acl.3 b/lib/libc/posix1e/acl.3 index c74b92028c6d..4c5f232a2e6a 100644 --- a/lib/libc/posix1e/acl.3 +++ b/lib/libc/posix1e/acl.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 8, 2023 +.Dd September 21, 2023 .Dt ACL 3 .Os .Sh NAME @@ -286,11 +286,6 @@ POSIX.2c describes a set of userland utilities for manipulating these labels. .Pp POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft continues on the cross-platform POSIX.1e -implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page for more information. .Sh HISTORY POSIX.1e support was introduced in .Fx 4.0 ; diff --git a/lib/libc/posix1e/acl_get.3 b/lib/libc/posix1e/acl_get.3 index 1908f0d0d97b..91a3626ada72 100644 --- a/lib/libc/posix1e/acl_get.3 +++ b/lib/libc/posix1e/acl_get.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 25, 2009 +.Dd September 21, 2023 .Dt ACL_GET 3 .Os .Sh NAME @@ -151,16 +151,8 @@ The file system does not support ACL retrieval. .Xr posix1e 3 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion -of the draft continues on the cross-platform POSIX.1e implementation -mailing list. -To join this list, see the -.Fx -POSIX.1e implementation -page for more information. .Sh HISTORY POSIX.1e support was introduced in -.Fx 4.0 , -and development continues. +.Fx 4.0 . .Sh AUTHORS .An Robert N M Watson diff --git a/lib/libc/posix1e/acl_get_entry.3 b/lib/libc/posix1e/acl_get_entry.3 index 1c6126334fa3..94a95b5412b7 100644 --- a/lib/libc/posix1e/acl_get_entry.3 +++ b/lib/libc/posix1e/acl_get_entry.3 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 13, 2001 +.Dd September 21, 2023 .Dt ACL_GET_ENTRY 3 .Os .Sh NAME @@ -42,7 +42,7 @@ The function is a POSIX.1e call that retrieves a descriptor for an ACL entry specified by the argument -.Fa entry_d +.Fa entry_id within the ACL indicated by the argument .Fa acl . .Pp @@ -100,7 +100,7 @@ will be set to indicate the error. .Sh ERRORS The .Fn acl_get_entry -fails if: +function fails if: .Bl -tag -width Er .It Bq Er EINVAL Argument diff --git a/lib/libc/posix1e/mac_free.3 b/lib/libc/posix1e/mac_free.3 index 987bd9966564..4ed68b70f3a3 100644 --- a/lib/libc/posix1e/mac_free.3 +++ b/lib/libc/posix1e/mac_free.3 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 21, 2001 +.Dd September 21, 2023 .Dt MAC_FREE 3 .Os .Sh NAME @@ -67,12 +67,6 @@ function. .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 diff --git a/lib/libc/posix1e/mac_get.3 b/lib/libc/posix1e/mac_get.3 index 45045977fb32..171f7cd91aaf 100644 --- a/lib/libc/posix1e/mac_get.3 +++ b/lib/libc/posix1e/mac_get.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 21, 2001 +.Dd September 21, 2023 .Dt MAC_GET 3 .Os .Sh NAME @@ -136,12 +136,6 @@ is not a directory. .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 diff --git a/lib/libc/posix1e/mac_prepare.3 b/lib/libc/posix1e/mac_prepare.3 index 58493e988a0b..50dfa1c28d2d 100644 --- a/lib/libc/posix1e/mac_prepare.3 +++ b/lib/libc/posix1e/mac_prepare.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 22, 2003 +.Dd September 21, 2023 .Dt MAC_PREPARE 3 .Os .Sh NAME @@ -108,12 +108,6 @@ respectively. .Xr maclabel 7 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 diff --git a/lib/libc/posix1e/mac_text.3 b/lib/libc/posix1e/mac_text.3 index 88131f0bf611..29c1aacca485 100644 --- a/lib/libc/posix1e/mac_text.3 +++ b/lib/libc/posix1e/mac_text.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 21, 2001 +.Dd September 21, 2023 .Dt MAC_TEXT 3 .Os .Sh NAME @@ -101,12 +101,6 @@ to allocate internal storage. .Xr maclabel 7 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 From nobody Fri Sep 29 00:29:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxWSy4SGPz4vqGc; Fri, 29 Sep 2023 00: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 4RxWSy3y29z3c1D; Fri, 29 Sep 2023 00: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=1695947394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmpmF6n+E/m4iw5y7dL9wn+FmFATJiGt4ukbOHc5D+E=; b=sSTK9r5a6Q6yeRYq3yhvpivOYwUMXsQdUCNKxyPlZx8J625nOcCIntFDmPozsB/RQn6Qhi nUhFCGp6QLFbKwT5Q8pQmJHYDuqzAOTlnb71J2vtDoWYWstcLx7vNDjWP4xCwI1eP1QwTs T/CD0WJtGvKPD/GS2+VjqbxsiJ0+U890fBmkLxo/fT3i9xck53kl7MRwj1VxVZDGLYwxF6 1S722jQLK4ZKPyPHgJf5rPrMun7hbJbJxWrCZ9l3/Lyd+s0jgnKhHO7YnQ3GnO36V1aF9k d7ZEbGA73e092XBgJvbwoISHihycDSBptu050ezpDyEPApDGh//DCJrXH9vEFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695947394; a=rsa-sha256; cv=none; b=Z+Hfrcthye28OId1KP+SuZHf+ROt4omyrtNsONtLXoVbF13PrQWv3PTz3raOhfwFGwK1vd sfkoVcEwJCcG4LdvHLmPwmkhkYwRZlqs+xHSWkYYolYc3d+OHY/ZMcbga6EJX91Fu3wdcx 9LZB2GWMw/nvRtowIzrZUC3bA8sXcgCbP3VFd+xE6+7l8sH+SCUpJ3Dxx6buXlO6bmWAEs zoY9NO9deudrf0UdCpfTi9hS2LdJy8PyfSZQaE8Q1WHCHr+YjM0HC97kQusbucRpRich/Q OmjixGceMaIcXSwmrREEuLOTi/2MKrx7KADifqGxK50mmVsqriqP2nIHmltAoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695947394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmpmF6n+E/m4iw5y7dL9wn+FmFATJiGt4ukbOHc5D+E=; b=oPv6ri/kqVIz4ni6Nm+bMb0OjAqVzhNOUUtEML4s9fBoioDVjiAPlNew19YjAv6vIFEqv4 Tgx8p5LfNfnwdrihSbd64QqZtdWZfcZdLDnQWsdY/r2yi9998E1PIO7KGUojNwYtUCg+KW rKAqVczG8A9u6MytkVoA8OofAzVWO9BRayWK19gkVzbR8pp83Yb5jGmbM7O9LYm+3aNaMB Nj7kmTIp8S07YtSAGhWalthM7bxsLP3g4A6Nx5pXYicXmE/uKTyDvPWNSxUfue4WB4gPXX 6ysV7lpSw5XAbdNQruh3uQghoXZoI4bfRKOsfoz5Qsm6WPJL7BL9tlyphSh7Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxWSy31Q6zk5c; Fri, 29 Sep 2023 00:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38T0TsLq073120; Fri, 29 Sep 2023 00:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38T0Ts36073117; Fri, 29 Sep 2023 00:29:54 GMT (envelope-from git) Date: Fri, 29 Sep 2023 00:29:54 GMT Message-Id: <202309290029.38T0Ts36073117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d1a34ebb939b - stable/13 - Remove mention of defunct mailing list from acl / mac man pages. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d1a34ebb939b0c56d101fd0dee5298396ac030fd Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d1a34ebb939b0c56d101fd0dee5298396ac030fd commit d1a34ebb939b0c56d101fd0dee5298396ac030fd Author: Dag-Erling Smørgrav AuthorDate: 2023-09-22 07:42:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-29 00:26:43 +0000 Remove mention of defunct mailing list from acl / mac man pages. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41923 (cherry picked from commit b653faaa19c47a4a7e488e5ead738b7ae44ffe8b) Fix typos in acl_get_entry(3) manual page. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41924 (cherry picked from commit c34fce8a039935e06ed84db1395d7d2c551e5a7c) --- lib/libc/posix1e/acl.3 | 7 +------ lib/libc/posix1e/acl_get.3 | 12 ++---------- lib/libc/posix1e/acl_get_entry.3 | 6 +++--- lib/libc/posix1e/mac_free.3 | 8 +------- lib/libc/posix1e/mac_get.3 | 8 +------- lib/libc/posix1e/mac_prepare.3 | 8 +------- lib/libc/posix1e/mac_text.3 | 8 +------- 7 files changed, 10 insertions(+), 47 deletions(-) diff --git a/lib/libc/posix1e/acl.3 b/lib/libc/posix1e/acl.3 index c74b92028c6d..4c5f232a2e6a 100644 --- a/lib/libc/posix1e/acl.3 +++ b/lib/libc/posix1e/acl.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 8, 2023 +.Dd September 21, 2023 .Dt ACL 3 .Os .Sh NAME @@ -286,11 +286,6 @@ POSIX.2c describes a set of userland utilities for manipulating these labels. .Pp POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft continues on the cross-platform POSIX.1e -implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page for more information. .Sh HISTORY POSIX.1e support was introduced in .Fx 4.0 ; diff --git a/lib/libc/posix1e/acl_get.3 b/lib/libc/posix1e/acl_get.3 index 1908f0d0d97b..91a3626ada72 100644 --- a/lib/libc/posix1e/acl_get.3 +++ b/lib/libc/posix1e/acl_get.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 25, 2009 +.Dd September 21, 2023 .Dt ACL_GET 3 .Os .Sh NAME @@ -151,16 +151,8 @@ The file system does not support ACL retrieval. .Xr posix1e 3 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion -of the draft continues on the cross-platform POSIX.1e implementation -mailing list. -To join this list, see the -.Fx -POSIX.1e implementation -page for more information. .Sh HISTORY POSIX.1e support was introduced in -.Fx 4.0 , -and development continues. +.Fx 4.0 . .Sh AUTHORS .An Robert N M Watson diff --git a/lib/libc/posix1e/acl_get_entry.3 b/lib/libc/posix1e/acl_get_entry.3 index 1c6126334fa3..94a95b5412b7 100644 --- a/lib/libc/posix1e/acl_get_entry.3 +++ b/lib/libc/posix1e/acl_get_entry.3 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 13, 2001 +.Dd September 21, 2023 .Dt ACL_GET_ENTRY 3 .Os .Sh NAME @@ -42,7 +42,7 @@ The function is a POSIX.1e call that retrieves a descriptor for an ACL entry specified by the argument -.Fa entry_d +.Fa entry_id within the ACL indicated by the argument .Fa acl . .Pp @@ -100,7 +100,7 @@ will be set to indicate the error. .Sh ERRORS The .Fn acl_get_entry -fails if: +function fails if: .Bl -tag -width Er .It Bq Er EINVAL Argument diff --git a/lib/libc/posix1e/mac_free.3 b/lib/libc/posix1e/mac_free.3 index 987bd9966564..4ed68b70f3a3 100644 --- a/lib/libc/posix1e/mac_free.3 +++ b/lib/libc/posix1e/mac_free.3 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 21, 2001 +.Dd September 21, 2023 .Dt MAC_FREE 3 .Os .Sh NAME @@ -67,12 +67,6 @@ function. .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 diff --git a/lib/libc/posix1e/mac_get.3 b/lib/libc/posix1e/mac_get.3 index 45045977fb32..171f7cd91aaf 100644 --- a/lib/libc/posix1e/mac_get.3 +++ b/lib/libc/posix1e/mac_get.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 21, 2001 +.Dd September 21, 2023 .Dt MAC_GET 3 .Os .Sh NAME @@ -136,12 +136,6 @@ is not a directory. .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 diff --git a/lib/libc/posix1e/mac_prepare.3 b/lib/libc/posix1e/mac_prepare.3 index 58493e988a0b..50dfa1c28d2d 100644 --- a/lib/libc/posix1e/mac_prepare.3 +++ b/lib/libc/posix1e/mac_prepare.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 22, 2003 +.Dd September 21, 2023 .Dt MAC_PREPARE 3 .Os .Sh NAME @@ -108,12 +108,6 @@ respectively. .Xr maclabel 7 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 diff --git a/lib/libc/posix1e/mac_text.3 b/lib/libc/posix1e/mac_text.3 index 88131f0bf611..29c1aacca485 100644 --- a/lib/libc/posix1e/mac_text.3 +++ b/lib/libc/posix1e/mac_text.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 21, 2001 +.Dd September 21, 2023 .Dt MAC_TEXT 3 .Os .Sh NAME @@ -101,12 +101,6 @@ to allocate internal storage. .Xr maclabel 7 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 From nobody Fri Sep 29 01:25:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxXj70qmwz4vtqX; Fri, 29 Sep 2023 01:25: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 4RxXj70Jn6z3gHX; Fri, 29 Sep 2023 01:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695950731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=akcnmB2f4tTu6IYtZKQyHbQ9uF2226yJrzpi7dy427k=; b=oMD1M71CcrfgZsz9ku0FdsHoMRZQAfI7WdbJQmjnO01hN0iGi8DvJDnTzR+c2xmV5zjOMs As3kjM2eA6O8Bco7hvKk7uY6AT/n+SrhP513OjM+QJBK0ZkCrMIISDH9FBFPyZ+VSBcvVE c6NgR0p+YrLXEf4nT1oojAvKOV/qdjW7uNtxbHlnz8usA/1LxwGN1qdpc81E439TI8StwG d9sXWMAKY87yUkttdIW+1BcsNzJsjDU8BN+elppWN1dCVO6TXq3HIWipir0I82PdxQERsp IaOQNH+Az7coCyEZVaqQMSE5LrL9CrYpdQ5E510LnNeZHnCQDN6f808if/tLoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695950731; a=rsa-sha256; cv=none; b=u1qwOLzOIR25k6aE+cGM0Sr+6Cl76wkcSR/HmH1b+fKlNNJn+JJL9Tv7b2N8ryI5zpBRcF IrmL2hA9dEHY8EDLWfVkL8FzVlehfioMm6K3afZVFDvnNmFdr2W8P53lPMelpLc75+jwLj 0IwZwNlD9UB1QVntacbDUBJOUvqslUhrPuR5vKvFEssxtjtHNQuLFpx5D/iy2UsiHYH3vC 6acw6gw3NQ0fh+60R83a0JzW2soYNxHIrLaem2TFJCqsSivkNwVUqJeZpryBpl7MnLRd/P gfvN1b4rsaAkXBgLTPcsq5rHajjO7PUvifyiGnYCx27K6bDrp8x0tbzg5eKEMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695950731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=akcnmB2f4tTu6IYtZKQyHbQ9uF2226yJrzpi7dy427k=; b=mb0L2RKrca2gM+fUE2E5WF3DjBD1LCbN3+WwIzQLduKRdWGICUwQhADGS//U3cYdImzbGe WrOTfdIcFJ2Wl6QktKU21ahRaCu1RQ/o6KaleH+cO8t2sHSbyXOfQUJSJkBh/xYviVu7vr RkPNcjsf3y2Z3/xs7DVT32i5m7gSRip59dZGJqD8UVpHaotQlTicSrv/6ue3OQNok6Rcw3 bduvONW5wC25nf48J75xdanUHDieNVWk3pSwMeXwgtOOtixviWHP693U2YkPM50+edq0uw qiZZyHjN/kOlkljWZmKLD8PnQfNCzCKEhwzu63q8jNOLFUIEuimaqK3fIafu8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxXj66QVVzktL; Fri, 29 Sep 2023 01:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38T1PULV071983; Fri, 29 Sep 2023 01:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38T1PU9j071980; Fri, 29 Sep 2023 01:25:30 GMT (envelope-from git) Date: Fri, 29 Sep 2023 01:25:30 GMT Message-Id: <202309290125.38T1PU9j071980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 12e9c689246e - stable/13 - ping: The -C option is also supported for IPv6. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 12e9c689246e7ac81536dbf9583478f4b8823332 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=12e9c689246e7ac81536dbf9583478f4b8823332 commit 12e9c689246e7ac81536dbf9583478f4b8823332 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-19 08:47:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-29 00:34:54 +0000 ping: The -C option is also supported for IPv6. MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: rscheff, allanjude Differential Revision: https://reviews.freebsd.org/D41881 (cherry picked from commit a2d1360142f609485c9301df08cc99140743ef2b) --- sbin/ping/main.c | 2 +- sbin/ping/ping.8 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 47d20f569008..6321178e1228 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -211,7 +211,7 @@ usage(void) "Z" #endif "] " - "[-b bufsiz] [-c count] [-e gateway]\n" + "[-b bufsiz] [-C pcp] [-c count] [-e gateway]\n" "\t [-I interface] [-i wait] [-k addrtype] [-l preload] " "[-m hoplimit]\n" "\t [-p pattern]" diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 index 40060b3f8e97..22b16fe373ed 100644 --- a/sbin/ping/ping.8 +++ b/sbin/ping/ping.8 @@ -27,7 +27,7 @@ .\" .\" @(#)ping.8 8.2 (Berkeley) 12/11/93 .\" -.Dd November 20, 2022 +.Dd September 15, 2023 .Dt PING 8 .Os .Sh NAME @@ -81,6 +81,7 @@ packets to network hosts .Op Fl 6AaDdEfHNnOoquvYyZ .Op Fl .\& Ns Ar chars .Op Fl b Ar bufsiz +.Op Fl C Ar pcp .Op Fl c Ar count .Op Fl e Ar gateway .Op Fl I Ar interface From nobody Fri Sep 29 05:52:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rxfck32xlz4w8Vm; Fri, 29 Sep 2023 05:52:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rxfck2Nk2z4Tp4; Fri, 29 Sep 2023 05:52:06 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695966726; 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=rpL2OgDM0fFY0zzwiGdJJzt26G1+xNBwgFdYqklwLpI=; b=d6CB7bAumkq7dj/PQRwCajzJ9iX0pDVJCXjIvNxeYGpn7oWB5n4WgdLN0CW8VT2xQl31RL ogSCC7XoOdrqogMMeO/pC/plznk3tIKytxaT6LZBa/sefTmjeceyerMAo7JpxRtFOhbqt9 IAK7nv4dzeVx8m6EKlYrhdCaSu90PZxhO6tAfHiSsu6m6ZRdEg+qSZh0R2vG/gySyrd329 ySP6/kwkQ9fmOWteC7Uw1f4dg6co5sjDNJSSAUavi0ah04NXcbj6zNbd9RsvCKlhjX24qC H04ZiS4M1m05B0Kki8yOPmE6Tc1KcVDEcDc8exSVnn+pYzEmyR3jqbIeyafsNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695966726; a=rsa-sha256; cv=none; b=wuStinZcMC+nPkNRdOTGL0WJbqkCtUWTt3LMJQ31atu46P6Zk9kydJL8I20fMSRJrQsiEX n6CcVCUhatu2rwEZ1F0th7BodT13yacQxPcaNvIdA4aijuC4L4wZM9dRlMPGQGn6DTJGri TvajfvDvsAA83g6mae9hdSbfKojI+OpmTWPMOfRikJoB8peLE5aH3jQ7CDtTOWLRaXg5im iaBCZfzfRcfVBMlEB/BHiHcC7Vjal6eV8scXtpHHfPYlYSPvMxlq2NBbJQ0lzF2f01r7zF kh/UA6Zm6taLWd+UWGd4upBGjUYEn+XP3C5SWJObaA9cyZVpE8ajoE3FbcmlJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695966726; 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=rpL2OgDM0fFY0zzwiGdJJzt26G1+xNBwgFdYqklwLpI=; b=l5lT9TCzEdCohp1OAt9WivaQ1rP3wx3Hk/t4un9/bxlJmSKo5vnStwlDbhRKxe1c1t/zyC 785N442fWr3f7mRxPsiDvz/FA1TuET46wYjwxOXy37BEm9FPI1VrqBzXzI4GrsBKSvkByS U4ApM4OtRD6NK/lJtPs75hzNteuGRjqkQZrQicBxXp2p3EGlVO44zK31vk6U9Qj9F1XqiI cO6yaRpuZ5o/Mby9zqoLPx7HAZpMEEDrdHz4m4c3TitfteVJykvvVpz/KIVYtxOQTuMf6R TXamyv5Pnh7kCvxHchnsGHTEVojI6ni4clodRKc8ZcH3kt9NICUT8XPCjbDwfA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 20D351DDF1; Fri, 29 Sep 2023 05:52:06 +0000 (UTC) Date: Fri, 29 Sep 2023 05:52:06 +0000 From: Alexey Dokuchaev To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7494fb6b7d80 - main - EC2: Flavour existing AMIs as "base" Message-ID: References: <202309282218.38SMIqGH056845@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202309282218.38SMIqGH056845@gitrepo.freebsd.org> On Thu, Sep 28, 2023 at 10:18:52PM +0000, Colin Percival wrote: > commit 7494fb6b7d809257d4eb9eff06ce226143f27add > > EC2: Flavour existing AMIs as "base" I think it should be "flavor" since FreeBSD prefers American spelling. > @@ -31,6 +31,7 @@ BASIC-CI_DESC= Image for CI > EC2_FORMAT= raw > EC2_FSLIST= ufs zfs > EC2_DESC= Amazon EC2 image > +EC2_FLAVOURS= BASE Since other nearby values (format, filesystems) are lowercase, perhaps it makes sense to say EC2_FLAVORS=base and :tu it when needed in the code to keep declarations consistent and tidy. > GCE_FORMAT= raw > GCE_FSLIST= ufs zfs ./danfe From nobody Fri Sep 29 12:21:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxqGK01VJz4tqqv; Fri, 29 Sep 2023 12:21: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 4RxqGJ6fPmz3SkS; Fri, 29 Sep 2023 12:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZyDWVLHxy6+xcvquJuq4vNCWenqxMxnB8jwPDNYH2Q=; b=EUKpUtM0zsY2BbDEPHChgwd/rY1fEwGj+c7GrW6gpogf/GShch2uCvg0RxS1JJueyGH1S4 kDP/dgF6Mqp8Y0spFjILP28zBeWVpBLa87UgbMIo0HPxJdJyI5Pe8ytdacjLn/We2KlG4I QHcG1n9j4G98AQryEFYL9jYFZZLEMoQB6D4DOB85/hy/iJQNbrPuk0E74an0prns2QdGF+ AO5UUg5QDKpWcvutRaL9alvNA5+Um64OjO88kmAswQ2jOvURruqw3Pt2vCVDOSbK3FJtas TPBpdb6AJC6TpOXns6HXswLm9XeY2Rktf3aLoFP0wWUQbeZd5Pq6lpBqiBtT6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695990104; a=rsa-sha256; cv=none; b=o26himC6VyPRFOiD/fWmYXJ503+PPs0gYwF8tr8YnO8muBG2W7XjasujmAJCsKabt3Lizv CcEGdy8B796juJSqAdX8Aj5gtJLzoFRKfw/pyF18JG0DBRivkjSIKAECRm6XCWvsC9QXNQ vvyvVRiG9ICaC9mxQNJg0rI4/0J/RtLhmuLLzy37NGWvOaagVpCtBWWcSHh/gNbIYuZCIk fpj6xGCnKqjQZDDGS3J66tE+pJwaNyee85YgeZAP1RH9zqYPyXABx8d41mYq2RR4SF3jhw LGdpE+7yBnDKsk/czKBTeFHG6lQ2VJrDBYGUWnNv2JWD8MeZb2uTHdgSunwNXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZyDWVLHxy6+xcvquJuq4vNCWenqxMxnB8jwPDNYH2Q=; b=S+CCDdiALhUo96AGQOkzKQu661+m1/22tKsS/anHbO38OS47VbaFIXvz8ymzZZ4uTzgMyy u4b+dEZZxafWyiSEb1Jl36bUyBx5N4iZ8+GyKfWqMZ9Yf7BAMmC0NE7rSTo+SqKMmhqeIG xNfSel9Ucw5jhEtmyTAU/QW8frCwkO3mjRbN6YiGpHqM8TUUIRTZ844sEzgI+D9o1FjrGQ gyseSBy66JR/hj20UEqaPt7HQQbs3MC+kFaNg2Po/KGodyRXtW4RopEvS0MfRic1Cz04Kt ZzSR0ZJ39UXGFm7Ks5JeEpaddGAz0IeKzX+7nKSaDeBVwnkZTuPwRMskbFgKlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxqGJ5kR6z141d; Fri, 29 Sep 2023 12:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TCLib2066277; Fri, 29 Sep 2023 12:21:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TCLi7S066274; Fri, 29 Sep 2023 12:21:44 GMT (envelope-from git) Date: Fri, 29 Sep 2023 12:21:44 GMT Message-Id: <202309291221.38TCLi7S066274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6dc3961c2aab - stable/14 - arch.7: fix final 12.x release as 12.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6dc3961c2aabc3a8a0992b36f2a8badfbee71a57 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6dc3961c2aabc3a8a0992b36f2a8badfbee71a57 commit 6dc3961c2aabc3a8a0992b36f2a8badfbee71a57 Author: Ed Maste AuthorDate: 2023-09-26 13:30:06 +0000 Commit: Ed Maste CommitDate: 2023-09-29 12:21:05 +0000 arch.7: fix final 12.x release as 12.4 arm (pre-v6/v7) and sparc64 listed 12.x as the final release. 12.4 is the final 12.x release so we can fix the version number. (cherry picked from commit d06328c37bbcf3d3d3c7601372d29237996a6f6a) --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 14c6af612087..35a7b0246389 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -101,7 +101,7 @@ Discontinued architectures are shown in the following table. .Bl -column -offset indent "Architecture" "Initial Release" "Final Release" .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release .It alpha Ta 3.2 Ta 6.4 -.It arm Ta 6.0 Ta 12.x +.It arm Ta 6.0 Ta 12.4 .It armeb Ta 8.0 Ta 11.4 .It ia64 Ta 5.0 Ta 10.4 .It mips Ta 8.0 Ta 13.x @@ -115,7 +115,7 @@ Discontinued architectures are shown in the following table. .It mips64hf Ta 12.0 Ta 13.x .It pc98 Ta 2.2 Ta 11.4 .It riscv64sf Ta 12.0 Ta 13.x -.It sparc64 Ta 5.0 Ta 12.x +.It sparc64 Ta 5.0 Ta 12.4 .El .Ss Type sizes All From nobody Fri Sep 29 12:27:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxqNN3j35z4tqdp; Fri, 29 Sep 2023 12:27: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 4RxqNN3Fhtz3T61; Fri, 29 Sep 2023 12:27:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HkhY04m05rHHZyyCY0QnP5rCQDtLt6MNsVXYihbJ9Bw=; b=aUtigUAT+CK2Iub0q4uhlb8rkIlPyHjUlr5v9I/nGHiTBbivD9XpqBZBEe3pmvzdkuY1uj RVjCP32ZX0HELJd94k2nO0XmgaXlDw7IDti+s5JWyCjDIfugTek+ovOz/ysHWszNcttlxO XzeRP45rldHViQRPzie389McLLHmCsLMrfPgOdH54YAT5SR1EOPsIteAVA0vLYaK/Ui1dS bQulPFn2WTS/JzSkiJEvUaCEMVJBVerTcTU4H9aLeOjNNO703EwkgC1wPvIwyJWFUq3SEq m+MpGN8w3qUUsBbgkXoXaQ9fM+Nw0OMTgQseeT1ik+KwDDWUJRNtmzm7c18cuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695990420; a=rsa-sha256; cv=none; b=uJqcebI//0+UA2t/Y/VDz9ihzXMfbNzWm/vv5YOsqNPYWMalm3SjmvXCaGQLo2pP+Z8uIb K2Q5BfsRMPoQMmjTQuA7pfUPFQEA2s25j3gC9x/QdANrA7XU7dkFntr3UzZjpM+ufjuwZB Tw37falPWsU3uWgqHe+cGZ66WSBGRo5Dlrg4viZN0wAcZsmwOiy7jrZlRla8I5zrMt9l+M SnD0F4WEkXCcrYCjylxKShzzrEpos/KP96KXY6uLaEaeU1TGGadw0+Tpyjh7ZAuGOzHuwC XlDxCD88x90MfsSbCDu5BnXQKmm9jiHzXhhhl69Nr2AWN5CBYtR+UEMvNfy/Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HkhY04m05rHHZyyCY0QnP5rCQDtLt6MNsVXYihbJ9Bw=; b=min2DF1EDY99BqVaVmySGvTAbH1fbd5sHNy4rZ61l4ZcFqPmLDSCxZJpgkSz93OxDzyujJ 0snUBgfAH0hw8fbBqWkAvSjSLTHDzZc+NEco/iV68SFGfkeVP2xEX8HVsJJMiK+fXLemsc +rAc4We1epuWnoJzBvql4my6M1LrkVtYB/wjv0ZUTmUjEoQYx8LCj9JicbonSXMcoptXIA 18YYSej8j+cjROWNIbzOlnKivv9NArJZFJWMWX6Mncu7QY2M+sYIhtk7c2n90SQ78cUAQB e/yM4lOTMZekx/P9ggLSGkwXvjO9191fM8kx71UJmPOzS0Dr3HudN8pBvLANNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxqNN2CqDz13w7; Fri, 29 Sep 2023 12:27:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TCR0HZ067096; Fri, 29 Sep 2023 12:27:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TCR0ow067093; Fri, 29 Sep 2023 12:27:00 GMT (envelope-from git) Date: Fri, 29 Sep 2023 12:27:00 GMT Message-Id: <202309291227.38TCR0ow067093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6d22a25725cb - stable/14 - vge: correct pause_frames sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6d22a25725cb0d6a5e3748572cc30c22098f5b01 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6d22a25725cb0d6a5e3748572cc30c22098f5b01 commit 6d22a25725cb0d6a5e3748572cc30c22098f5b01 Author: Priit Trees AuthorDate: 2023-07-28 21:41:22 +0000 Commit: Ed Maste CommitDate: 2023-09-29 12:26:00 +0000 vge: correct pause_frames sysctl description Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/806 (cherry picked from commit 0a5d2802b41fd216d9a345f749af1a6ccbe9f382) --- sys/dev/vge/if_vge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 04c1c764cdd5..fcc47598454e 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -2564,7 +2564,7 @@ vge_sysctl_node(struct vge_softc *sc) VGE_SYSCTL_STAT_ADD32(ctx, child, "crcerrs", &stats->rx_crcerrs, "CRC errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "pause_frames", - &stats->rx_pause_frames, "CRC errors"); + &stats->rx_pause_frames, "Pause frames"); VGE_SYSCTL_STAT_ADD32(ctx, child, "align_errs", &stats->rx_alignerrs, "Alignment errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "nobufs", From nobody Fri Sep 29 12:27:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxqNP4fSnz4tqds; Fri, 29 Sep 2023 12:27: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 4RxqNP3qvcz3T4D; Fri, 29 Sep 2023 12:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xNTEfStUjWgVZYtiSWXIYPGOZVcb5h5Fb3vWX8mS0Xs=; b=a/U8H+rDonzD0zatm36Ar94R38nEjiYXbuYOhtwov1LH38u6r+jQei80iXQdrJMsbpNzC/ T/brjDXE1L+KTGQ7OBgjDU6rUP+7GNeA+CoG1FW3OqBIbN+5K5RRsxCJC0jXybIxlu0sSV UVh7iL426QMuSIF/4FfG/jt/txXB56ZRUWoqcwymlJOru5GbbL4vnmqWYqJLL+Q4XckcOd WppVLdCyXYNZXRfIPw70uYOgwLHO/wHozE9cbsEjyOZoL2t6jeeu2EzqevVS7x9gejdImg ayXnmI+HDj8RRby9kWqaipZgboKbsV2ivEnj47A7zgq8Y5wxzG049snU94aB/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695990421; a=rsa-sha256; cv=none; b=gR7fXil+3bvRRBSWiuZyuWFbiZ230xaQRWLVaa6T7XP62BGZ1j5+vfJGanXP07u1YpFBZq yOOSmKVXIEcAHfCiXCaS5WDtN9W5FpUl6w/7JNNHZ4t2qqmsH2W9thd0Q8bURwzNM4cFTW iSZzNgHqTFdwfQGJG+aqMM+StA/n2NOMsZ6hW7E29ylP1C3fNhhN5NQIUhW11JL3BwU5ZG 4dJbntUNLkYUc6QlwEkDi1U28CYbYQappIxT/4XxndMUKBRMpcV9XDWrLxMg27rKrtyswg lZLacGCdRPX+vV/8Q44pl/EwwIw8cbXEZP1MWroQJ6GAmgJN/0NOcITLNFueOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xNTEfStUjWgVZYtiSWXIYPGOZVcb5h5Fb3vWX8mS0Xs=; b=qVE+KeCHQ978PQr7Guj6MxykldEMAjliY+vgOFSa1wQVyY7b1JAnTSuUtTi1Xe2PnWcUzn LMRqB9x+OONVu2y2i+x/EGqPYHw64D8fq5XATddU99mLV1/2tDwKs596ZTq8i9qNnVBokL rWNEI3bE8EjhwQrchAROSFaPCwhsjhXgdjrGOKRtZ6ryJhykSop1Z9f2uJkt8HmVbNT0tm SouJOWuvSkBMDv3CarfkGgW23Nkt7gQy7jlBfbF3d3c3p9A1UpJ3/8TC/LxkZ6yt0fLqH7 adGdnnDNZaIiOGscY8EXk+74dgcou1qxw1cHoMIEuIdCew7VHAiOiJoOvJiYJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxqNP2vf9z1426; Fri, 29 Sep 2023 12:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TCR1nM067147; Fri, 29 Sep 2023 12:27:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TCR1ue067144; Fri, 29 Sep 2023 12:27:01 GMT (envelope-from git) Date: Fri, 29 Sep 2023 12:27:01 GMT Message-Id: <202309291227.38TCR1ue067144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: dd588b3c9a5a - stable/14 - syscalls.master: Fix SAL annotation for getdirentires basep argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dd588b3c9a5a2f2b2b62836ce70fd85813434748 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dd588b3c9a5a2f2b2b62836ce70fd85813434748 commit dd588b3c9a5a2f2b2b62836ce70fd85813434748 Author: Haoyu Gu AuthorDate: 2023-09-24 22:34:43 +0000 Commit: Ed Maste CommitDate: 2023-09-29 12:26:00 +0000 syscalls.master: Fix SAL annotation for getdirentires basep argument getdirentires last argument "off_t *basep" is an optional output argument. It returns the value only when the passed-in value(pointer) is non-NULL. This is a part of the research work at RCSLab, University of Waterloo. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41969 (cherry picked from commit 5e29272bf57e24a16f3a17f037f9a5e7cf25ed90) --- sys/kern/syscalls.master | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 69a669844629..f7c235ced26c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -999,7 +999,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 157 AUE_STATFS COMPAT4 { @@ -1185,7 +1185,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 197 AUE_MMAP COMPAT6|CAPENABLED { @@ -3097,7 +3097,7 @@ int fd, _Out_writes_bytes_(count) char *buf, size_t count, - _Out_ off_t *basep + _Out_opt_ off_t *basep ); } 555 AUE_STATFS STD { From nobody Fri Sep 29 12:27:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxqNR0FDjz4tr4k; Fri, 29 Sep 2023 12:27: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 4RxqNQ4nGpz3T7G; Fri, 29 Sep 2023 12:27:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGOqecuk11s1yYBpKV103BtCh+fWYMU0UX1pxm0vrno=; b=GHIfvp9UKzPHtINQ1QLfbg7wYqfk8fl1rvRW9OWNqlyEbt7BV4eyILy9XUTbUZ78xIxt+Z q6m72gPl7zOwW2WA1o6MPMn8xlTzt38nGL0TebAV2InRB+jgBeA60Nqv2X3soDrmW5IpfA wHymOiSzxBowoWDxrvVvXkFc1nZcXUyNgjeMkgBg7hp67AbRtXLf4FZ4C6ZYNacmi+Szo4 yIzYY/1G+G4WeNyLDSE2ArJhWmr28i5QRtKEn7r63dlrOWnCf68n0k/2tbf0+o7vzkeJ8N YHXorylh8jkWF90+HoOlPo9h1Q3Cc3gwSK/CMNM7Spue2C82HZN9nPM0R2I8ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695990422; a=rsa-sha256; cv=none; b=VrEicQ0j9Hz8p8O7VZvL7Z+KsWadePAtqgcoqmTH86x4B0Ha+XiA092Ora8rW9mMX1cLfm MNnadcCAI+bhN/RkF7ZX8sdAdQM3wlPVrwb277+4HK8dBLg3eUwIDtIMWMGGXENSidsxtU sNUghoF5lytjB7b53ubkk1PW+SysDfggdHg7tEb3OX6etLhGBGbncYFhu42snsL45SnWra MTjlNs0NeyEyEEIkIbSCQ65FYUdBTPK0bPMA+5Dm4RziBQoH7H4XM67zP/BHdczvS5cS7S wlWaBBaTnIsbJGKjsnhmuYtkj0HnJE7aTukA6lcn6UVozwgB/kK9gZzN5X5p/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695990422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGOqecuk11s1yYBpKV103BtCh+fWYMU0UX1pxm0vrno=; b=T62IMLhvcOQPbopjmAWzyk21oFzM+7JsC20ksfFgXGXu2HWMB+CRl539MbS6weeofNSEC2 jE8Mn/qmYfIg+NAgt7+tmDTvfthlWh0nB3uY+bDcFFFBkytNrrLOgOqVL9lECHiGv0LJq5 F7q4IfOaP4lO0PfC/kcPuHQZ4j/N86Z/wcFkb+1/efBsxzUH3noWLL9ZMzzkIGhGll81xN gegikBkPw4JvFCNT+8NR0InhU9JqH6M2x1y3ib3qq7YAxdPRf0wcdgTphZg+8fk3DoHhJE OGK4pq5fEM2vQfizKRfAaLz0CZYQNki78LDG9doVyWZu1Hd7P1okDROLKTStEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxqNQ3t5vz14SF; Fri, 29 Sep 2023 12:27:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TCR2CI067196; Fri, 29 Sep 2023 12:27:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TCR27U067193; Fri, 29 Sep 2023 12:27:02 GMT (envelope-from git) Date: Fri, 29 Sep 2023 12:27:02 GMT Message-Id: <202309291227.38TCR27U067193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 803f088147d3 - stable/14 - kernel: remove unused HWPMC_MIPS_BACKTRACE option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 803f088147d30327bd5331511f62c815154705a8 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=803f088147d30327bd5331511f62c815154705a8 commit 803f088147d30327bd5331511f62c815154705a8 Author: Ed Maste AuthorDate: 2023-09-26 13:27:14 +0000 Commit: Ed Maste CommitDate: 2023-09-29 12:26:22 +0000 kernel: remove unused HWPMC_MIPS_BACKTRACE option MIPS was removed after FreeBSD 13. Reported by: andrew (cherry picked from commit 5b732ae8332b2bad256016569c0ead6d918bdf79) --- sys/conf/options | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/options b/sys/conf/options index 56c1a33216d5..83742af0204f 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -889,7 +889,6 @@ DCONS_FORCE_GDB opt_dcons.h # HWPMC options HWPMC_DEBUG opt_global.h HWPMC_HOOKS -HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h # 802.11 support layer IEEE80211_DEBUG opt_wlan.h From nobody Fri Sep 29 12:41:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rxqj61WPnz4trYg; Fri, 29 Sep 2023 12:41: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 4Rxqj6140lz3VNs; Fri, 29 Sep 2023 12:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695991290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=few5XZxorNGYeOY231avQ7Psq1aGDUCQI+dK6u6GJQo=; b=n/j7j5buyI80VXN+G0URYYmm2iEKDDvGJ200CLGX3wMM8Q5ue2Soj6EaJhnBGwRzTQigV5 Jun8B7TqrMBZlVAKZYkOg1cVXludwsIPTT7Ju2J+WDomsG7abUlHcnyRGbbCTK2TvumpSY xBY2hTxcjIEsAs3lrfglwPeS5WS1hZ3oM2/u+fyV57wAJca3UvIjbPgllzvnegwg5PmZcI bIoR+3B0P10k0aIRZLrF+3aVVOMk7R833QmM3kaGApR6en6Lyuo4p+mrYphalQBJee/Dfk fTSlKjnUfOHYXla6nW91se472Da6SSGCpLewR5W34F0RknrWDAEiqYk1oqsb8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695991290; a=rsa-sha256; cv=none; b=sHFWYPKQtwTPeyENrwpe895lAIRAa2BiGc17jUDIpvW89LqKAO4SjIW65K86Ldb/Ywk6/s PrYFcC7Apol2hGS0IKEc0gCSK4AQ9GhvgR8HfZHu4rnWdMmYYe8NQ4nTHIHU7PjZ8fn+Ud UE5fSfOHeER216rzyecLXPx8Bxy8qd5Cr3l3YaOo1X+G92pzLOoD+x6BBZ3hxGGgbod6L7 6VQNjIWhkSopVQPkrknfmLWArPLQ6hQrNzutPFwLVX7kYr04B40wIN1MSFcGeSVAcbfoJP 0A4IKrxA9SvnD9t0lWy12PkWKp0TzjpfgrRrwe8gNXxgfvM0VWjrzrej0pAhDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695991290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=few5XZxorNGYeOY231avQ7Psq1aGDUCQI+dK6u6GJQo=; b=gwe77ABtMu/C8cItbV8iKK1V2CYqBoZ2FNCkQ7qUgcgl2s+ZFGNrTca+OafQHOUSPsggfE 24+c69T1EFneGlsFsps/2nZfoNDb2SUnFhqy8Vh8oQ4TRXBfw3ybQGYB0KD/ZzgqmH5Ghi 4e2pYiNYLrQcKkFmxtJwpkkjvO8776+af/I+R8hDsX4rUQd6iSPlNvYrydtW6zuzGX3uSl 47vNUr47IL7ePfnv3JRuqn9r8BOKjoL4XFiiaOv+bgVOEnknS2ddYWBnldKR+dxZouxWnV gkfVX/mkBeEnwxGhf9q3JIsCvF64AoX6vo9GfvjOpFvmVvcl68pGdhz0x047Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rxqj606n0z14Hg; Fri, 29 Sep 2023 12:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TCfTYF094903; Fri, 29 Sep 2023 12:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TCfTmD094900; Fri, 29 Sep 2023 12:41:29 GMT (envelope-from git) Date: Fri, 29 Sep 2023 12:41:29 GMT Message-Id: <202309291241.38TCfTmD094900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8b4e6c3b57b0 - stable/13 - vge: correct pause_frames sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8b4e6c3b57b0577a0d33be90829002296dec6c10 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8b4e6c3b57b0577a0d33be90829002296dec6c10 commit 8b4e6c3b57b0577a0d33be90829002296dec6c10 Author: Priit Trees AuthorDate: 2023-07-28 21:41:22 +0000 Commit: Ed Maste CommitDate: 2023-09-29 12:41:07 +0000 vge: correct pause_frames sysctl description Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/806 (cherry picked from commit 0a5d2802b41fd216d9a345f749af1a6ccbe9f382) --- sys/dev/vge/if_vge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 9c62dafa4364..acb6bbf424c6 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -2567,7 +2567,7 @@ vge_sysctl_node(struct vge_softc *sc) VGE_SYSCTL_STAT_ADD32(ctx, child, "crcerrs", &stats->rx_crcerrs, "CRC errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "pause_frames", - &stats->rx_pause_frames, "CRC errors"); + &stats->rx_pause_frames, "Pause frames"); VGE_SYSCTL_STAT_ADD32(ctx, child, "align_errs", &stats->rx_alignerrs, "Alignment errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "nobufs", From nobody Fri Sep 29 12:41:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rxqj72M0pz4ts5k; Fri, 29 Sep 2023 12:41: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 4Rxqj71mMnz3VrL; Fri, 29 Sep 2023 12:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695991291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YR/j9h/TDFcEZpTuSSZua7uRw7BvFPHnZpsW6o4HBoc=; b=GPd3bwYsZif3rupZzkko7+A34pRZ+g+H4vEk2YM3EtN5nCVxZc9AWYzzBjSmt3Gut6KgxV oP+arDJa4kJ/IvpZx5DrSomMnlCJiic0Ynk72m4IyTpPdKaIOvtoQjIbsU46svS4TdoZ7j eTSEUSZ7bASPso9hHnDhjugnfI7uf6HRafWUW26MEc5ZDbCsK64EDwSZGWnmT8oOGsFjyu cV3mBONKdFUVZMOncAWqV6DsnpQufAMrJ8I7yHRhMdsk2He5+Uvi4A8+iP2PCQnx2wmXTn zLujUyLdGFX0wo8wwIBJ+/VE/MOCQLxYtt0DaKQ8m0AlSVY3lEWms9HZGlr8Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695991291; a=rsa-sha256; cv=none; b=lrPGK9Q0YHG2W4OZsha/WDTAIequGEb3hggvUawfqI4iZOaelOCZvwKQnEIiVbrrN9LXp+ eI4VoqFHiCpMwOd3dr+61uK6FFaIhYju/1BVWqZeHayWkz/f3vb8iYAEi6LFiVfIbwF2/3 bRzLBZkRPKpHQypvxn2NbrVa0xdZK8mZO7SoMNCEOWjL4dOg45OWfqXkGmwJrlaox7Mobt 2Jv6EWAInUOQdDkbvRjZGM/dZCglX0wh8sjQo9JVefSMXwGo0cn0Kqh7Z80T+5/Cf8ECxr 1q6m+i7S46yR2SK7vF9o9mKDgkOuieBgHBvJ9FdUS9JmZDUQnbzxx7hF1L4NwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695991291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YR/j9h/TDFcEZpTuSSZua7uRw7BvFPHnZpsW6o4HBoc=; b=oRomw/4MdG0yGJM+G6S+8C39banxXqgvFkKTKJyUXBqnFD+Bb3KxBZOSOgwtaGWvr+H70+ tXPa7OfJh7qfmEYEOqsWXKM4hT+FhdwfyaA9SUNLCkxtMxNVvaoNvqm2CQji3P3Evz5fv8 HflI5hQ/FJBLIB4mTJsm98Yi63pHzln0Ou1MM3nqDFx31fzEZMQNqgmdiU88ngrGwJFqmr QTWFHNX8x8+62ClFBRGH/hgs88w6jbBHqNvTk1I2EpIqi1iea0k8M/FFajZLD7gSJ1RF1T t8VzlQrOSWnLqlRce+cwzmb4AQKGEcqZQCq+sO2gLlIGZ1aJVOdg2hUHi/NpXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rxqj70fKfz14Sw; Fri, 29 Sep 2023 12:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TCfVIQ094961; Fri, 29 Sep 2023 12:41:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TCfUF7094958; Fri, 29 Sep 2023 12:41:30 GMT (envelope-from git) Date: Fri, 29 Sep 2023 12:41:30 GMT Message-Id: <202309291241.38TCfUF7094958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8a331a855ed8 - stable/13 - pf: add note about changes ported from OpenBSD after 4.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8a331a855ed8100ea5ef12ac85c23b80b37f9371 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8a331a855ed8100ea5ef12ac85c23b80b37f9371 commit 8a331a855ed8100ea5ef12ac85c23b80b37f9371 Author: Ed Maste AuthorDate: 2023-09-27 17:59:30 +0000 Commit: Ed Maste CommitDate: 2023-09-29 12:41:07 +0000 pf: add note about changes ported from OpenBSD after 4.5 The last comprehensive sync with OpenBSD's pf corresponds to OpenBSD 4.5, but many changes have been ported over since then. Reviewed by: kp, gbe, Kajetan Staszkiewicz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42002 (cherry picked from commit 3e609fd481c07802fe837ed834c3710b8c19493c) --- share/man/man4/pf.4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index 4055c66fbbce..4f0ff50d3db5 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -1219,6 +1219,9 @@ and then .Pp This implementation is derived from .Ox 4.5 . +A number of individual features, improvements, bug fixes and security fixes +have been ported from later versions of +.Ox . It has been heavily modified to be capable of running in multithreaded .Fx kernel and scale its performance on multiple CPUs. From nobody Fri Sep 29 13:27:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rxrjh6xn8z4tvM2; Fri, 29 Sep 2023 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rxrjh6Ctkz3Zh2; Fri, 29 Sep 2023 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695994024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmDiVACZ2QvK9RdbdWYRfVxV9pfocQkic1tmh+8T4h8=; b=si3PW9G6sLKvDVdGofPFqwLzN/K9PQoX59DA96czPBuETsGYWAdOTSKXqeXP6UZSv+uNPC Bndb4aZKVrQ+VKWpJ27BHe/vdtUFCKlnpVBcIiB9gohucwRTu6ohVdbFKGe0NwIDYzSDHn E4+ceIIYfO11hXguwNrHWZzf9a9P/4bDih1JnE6uMvhj+ELcc1dtQ53/8CxTvt1WRO5RmK u6ayi4HN4tgBP11/pF8pVEEH070g5wWezPcR8zMJCZmILWfusa9gOytPUw2Eovt6MsqGhe Ywx5xp07MbIZHkxbb8cLWtFWjytToZRALJhA0SWHHkzChS2f/jfconLJN0RXIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695994024; a=rsa-sha256; cv=none; b=JE4J4tAKpjEOzYRZttHRCW7WhKsIx0RCMUvinSdhDFp544RNC7R0T+w7g9Q0HgwjvKGlIm EFgbxEjTDz1RLt1qVj0Uyp2HYiOG/dYlHPDFjyFHZ+e8QbY/Lwj32COQaIMVUPljyB5nn9 aFgPGD7Kkfj6hSgkeq1LApurTcN3bsB8MB+T7Y1LmpTVxD7206pbQTxweUQDSLyp04W8UF mTBwxQmF9LdEKddX0bpTtG16eO/Gmm1USkH5+XA91h3z2O16/dRxBA6pTNdn46Vn63hMPA wob8kauJ4ZDcv2dO7VbVEMLS9jFBZkJb+XEoLxDqfwlV7e7yVtyMIm8hC9LbTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695994024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmDiVACZ2QvK9RdbdWYRfVxV9pfocQkic1tmh+8T4h8=; b=O232n0mRlgKFvoScSTIrk97TUUvgjvtmgMIwXHsj63xMDVPYgc8EeKiH+sVds66F9KAM5y M6CodiRukQ94q4Iw440eO+gTFccsH4wNMLdOCXMFuQQUPX/Op8SenLcMgJHaeHo6HbYaLx K2pp83J9n7SjMyX1Y0Yg+2NEhh2qzIjJ95Y9h5bQT/W0/fmuYoVI1Z8YkiziapEk9ULKNQ /o7/0AypOGX7MeJ8zRpjs2p9aqw3CmBfGyayFWViXZ9Vnf2S2a5DkcGTJ3rKHiW3WCT+qb Nb8J8Tq4yEw/wE+p0wV25C+awNto5npthDyvsBOygz+c4xWgKAPbAYMcibmHyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rxrjh59gtz15PK; Fri, 29 Sep 2023 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TDR4GA067180; Fri, 29 Sep 2023 13:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TDR4I3067177; Fri, 29 Sep 2023 13:27:04 GMT (envelope-from git) Date: Fri, 29 Sep 2023 13:27:04 GMT Message-Id: <202309291327.38TDR4I3067177@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: f147cf0ee2b2 - main - dtc: Ensure it is built in C++17 mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f147cf0ee2b2642c0a133a71c8a5dc018518d923 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f147cf0ee2b2642c0a133a71c8a5dc018518d923 commit f147cf0ee2b2642c0a133a71c8a5dc018518d923 Author: Jose Luis Duran AuthorDate: 2023-09-29 13:24:32 +0000 Commit: Ed Maste CommitDate: 2023-09-29 13:26:51 +0000 dtc: Ensure it is built in C++17 mode Explicitly specify the C++ standard to be used in the Makefile. This prevents macOS cross-builds from using the default gnu++98 and fail. This syncs dtc with upstream commit 39a58cfaab7d55c7975ebf905d859ba91a369fa0. Reviewed by: emaste Fixes: 29a55fd09b0a ("dtc: Sync with upstream commit 26a0fe5") Differential Revision: https://reviews.freebsd.org/D42006 --- usr.bin/dtc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile index d7661ae164c3..9b1aff13511f 100644 --- a/usr.bin/dtc/Makefile +++ b/usr.bin/dtc/Makefile @@ -6,6 +6,8 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions +CXXSTD= c++17 + NO_SHARED?=NO .include From nobody Fri Sep 29 16:23:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rxwdf03vtz4v6vj for ; Fri, 29 Sep 2023 16:23:50 +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 4Rxwdd3d8mz4VZZ for ; Fri, 29 Sep 2023 16:23:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4065dea9a33so7819885e9.3 for ; Fri, 29 Sep 2023 09:23:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696004628; x=1696609428; 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=+4Q3QiVoLSQLWEyk1uBORwL+oEY6Lr0Fvt2Ghbr0PBE=; b=KfUZRUg/X5rBLH3yRygbC7kdqgNwsedwfORCWpjXckTKNAXQ3EY0AKHP/fMzqdCRBA ur3+VhFHM7A17l5AMxxHPAcq8kQsJPtsg2RhrUSc7W73iY3HTcGWIOU6Jc1rXY/PMIUJ h1GLKxJHxicwPeKgJLPCECJ2jZmQMHYOjPtnvcu+1RFKU7l9c49MrChkZPf/6BYs96o5 ELKJ7NJIRtTHphFK8vmnwf1LReAQappcqHGABMjxQleYXts0SUkspNJM77SADTkF/bVT F5hcf/CBHmWQUv3NPoqODy8EXAVlTAMloR+/wmccuKd5F7FwNcV+VESweywCMwR13a62 nO8Q== X-Gm-Message-State: AOJu0Yx0urQCLimjNh5uuoIAQdKbbE6vX6g+v6FM9ZwiMWLyWojgg7aE WuuFmyLe4MBKCMUc8eb/aIIZiw== X-Google-Smtp-Source: AGHT+IEqRphEEEZGzM8/VmSF+kahV8bs4FZyi/hUzK7/R2ZGEk68FGrSIjsdJK/lwpMW4n8WObrxXg== X-Received: by 2002:a7b:c84d:0:b0:405:4c3a:796f with SMTP id c13-20020a7bc84d000000b004054c3a796fmr4535523wml.2.1696004626968; Fri, 29 Sep 2023 09:23:46 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id y20-20020a7bcd94000000b004030e8ff964sm1735744wmj.34.2023.09.29.09.23.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Sep 2023 09:23:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: f147cf0ee2b2 - main - dtc: Ensure it is built in C++17 mode From: Jessica Clarke In-Reply-To: <202309291327.38TDR4I3067177@gitrepo.freebsd.org> Date: Fri, 29 Sep 2023 17:23:35 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Jose Luis Duran Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309291327.38TDR4I3067177@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Rxwdd3d8mz4VZZ On 29 Sep 2023, at 14:27, Ed Maste wrote: >=20 > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df147cf0ee2b2642c0a133a71c8a5dc01= 8518d923 >=20 > commit f147cf0ee2b2642c0a133a71c8a5dc018518d923 > Author: Jose Luis Duran > AuthorDate: 2023-09-29 13:24:32 +0000 > Commit: Ed Maste > CommitDate: 2023-09-29 13:26:51 +0000 >=20 > dtc: Ensure it is built in C++17 mode >=20 > Explicitly specify the C++ standard to be used in the Makefile. > This prevents macOS cross-builds from using the default gnu++98 and > fail. This syncs dtc with upstream commit > 39a58cfaab7d55c7975ebf905d859ba91a369fa0. Thank you. Jess > Reviewed by: emaste > Fixes: 29a55fd09b0a ("dtc: Sync with upstream commit 26a0fe5") > Differential Revision: https://reviews.freebsd.org/D42006 > --- > usr.bin/dtc/Makefile | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile > index d7661ae164c3..9b1aff13511f 100644 > --- a/usr.bin/dtc/Makefile > +++ b/usr.bin/dtc/Makefile > @@ -6,6 +6,8 @@ WARNS?=3D 3 >=20 > CXXFLAGS+=3D -fno-rtti -fno-exceptions >=20 > +CXXSTD=3D c++17 > + > NO_SHARED?=3DNO >=20 > .include From nobody Fri Sep 29 18:11:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rxz1p5bBRz4vTkh for ; Fri, 29 Sep 2023 18:11: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 4Rxz1p3vL9z3BqJ; Fri, 29 Sep 2023 18:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696011086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BJ0H9zqgLdzg0zr3+LIaalQ024EzlubbWj3fDAeaMTE=; b=QASMikmTXe+c/XbtiIZ93VvXKOaroLZB6A8+4hLZRgTwDlcQ5jdQyqviTGIJFUbcNmRa2F JvvY/E4CLVOFwCiyQ3VpI9zg6aYMG1K/Qt2uaYGmJPm+pqbbEkB7lAYCTdHTXhUsCHOgGt vbtSZldjQrsh/XKc2+V4bELzDkL6ZjvmCL7PCZDjGKWF1XUkMylgF+xJz/YA57d68HOQQp jnYvFgP6QwjSOfLVKPcTiiGPHrUQS0Qgr5XD9jJ9eAXCn70ulgq6qjS5qvKWzxUir4IDlu Nuej2eYmMYw9YNZYlm1V/H0oz03OAzOqNFwQIvLnrlyxBKk+OhY2kXCTz0Kaeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696011086; a=rsa-sha256; cv=none; b=XpMxADu+dujzlgiamymapXGrvCtyTFIG3AnNpt4qUG7VcqB9Pyr62ALVSdD7hCSAeVaVdE 04X3ufWtWOIxJCExCnceYZObjMjME35v7csxP+dnQ6Uv+6wPE9NpR9YKQK4Dv7Ate+LZED 0t6QzfP1djUUrEe6qFjygy7EZcJSYTX5ptosE+oAzLC+4X8Qn7ZVC+2kFFjIJNrfdFYjH4 LiVtvP0Ce9BdNM6HdnP3cCZ0AouM8g3I1hkGBTo8T22dD9kuN2jeZSiYmlsS7O/RE/Oc15 hse4AavJT4blIp/Gt5d5ijP6DLw6K+aMumWIvsgPpY0b2Ee+iEUELWVUzV1e4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696011086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BJ0H9zqgLdzg0zr3+LIaalQ024EzlubbWj3fDAeaMTE=; b=nYZHIWyHc4nDDcKrLeZOLeCNQub3jPqQ23sBtdM69z9ZkEkhbblpudGAe0iWWNRzW8u2c1 x2SdBvfkqXfZpJYAnWKyjkNYJOkvGSlTOtyfJUexYOKQHYNYGrzQ5qsgzvNhIGN08PGbKA eLmgNECDbFgGZlulAQBuoQFwhMJ//fjNcw25hHdZqU5z2ecBUrUOy7qG5+i1Mp11XZJQhK MZjfvEW2/L9z5bkWMP08pPta9iIKamFdzIKJt7Loyc1X86qIrYfDRL43hMRxei1CUfxlDO 7VuK/MSeVevI+tKGHzLT6SvpHQoi6UUKTJ4zLrIifJJIp9sDLZ0OAVaAj7Mvuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rxz1p2djQzvj; Fri, 29 Sep 2023 18:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TIBQ9Q047920; Fri, 29 Sep 2023 18:11:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TIBQQ1047919; Fri, 29 Sep 2023 18:11:26 GMT (envelope-from git) Date: Fri, 29 Sep 2023 18:11:26 GMT Message-Id: <202309291811.38TIBQQ1047919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 8092e001bcd7..4bbf1f460eb3 - vendor/llvm-project/release-17.x - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/llvm-project/release-17.x X-Git-Reftype: branch X-Git-Commit: 4bbf1f460eb3fabdb7cf7cd731af0c227e6539c8 X-Git-Oldrev: 8092e001bcd76c0b9fec2311f3a515aa60d2ed07 X-Git-Newrev: 4bbf1f460eb3fabdb7cf7cd731af0c227e6539c8 Auto-Submitted: auto-generated The branch vendor/llvm-project/release-17.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=8092e001bcd7..4bbf1f460eb3 4bbf1f460eb3 Vendor import of llvm-project branch release/17.x llvmorg-17.0.1-25-g098e653a5bed. From nobody Fri Sep 29 18:11:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rxz1p5b8Nz4vTxh for ; Fri, 29 Sep 2023 18:11: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 4Rxz1p44QKz4gHj; Fri, 29 Sep 2023 18:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696011086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b58beDvd/daZZQE1L8G5F0Imr6liz/zcAGzcRtLzCFU=; b=u/mwKNahIWgg4PaziAsYucNsPPV/8ncOsJwBboUEQbiDKE1tiZ/nExWCjWUdrVtmPz8oD9 F2YIZFIR8wiNBE2VTonswohBJJLdAbMQ5ll8lCKGFZxXHmYlD1bmEj2dXOUFFA6Y/UAnRW sYJA7BSpXFVHtnRAWtPhMkesd5yIXRneIm2O+Fq2d08SQDNLzczO0gtMYBaYGOayGiV3Ot HEpWT2QGyWqYm6fOFvDbOnvebQs5mJPN+Up14e5VBARdwW4VUlJobIyRxD9Bz2/zlQIsSx 4Ae4vlHuyOF6EPbwBnvIzHP+nWhjZMzWpjLnt/hTYNe8EwepwjoIVHgM/xZ00w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696011086; a=rsa-sha256; cv=none; b=CbMmgkA5N57brMsH46wWLDa+T9Y10QLulBj1c6qEV6aCTLJ5ZqwzkSj3UE25XaOpygKAfC qMVniEVNuANkHbWPnRTZIEUoI6vVXmiOTkoArn74M85NcCSoC+TbSJbPkP6r9rtMSgWHCI hX1etF/uicIFf8v+GoHURLBLjoGfpTfNvHOPH/D9p2cLKa/Fdh39jJmNaL11wgNqBflkke a1DC2n0pCVPeNhM3vvg3TLMIuX4+KuiwZjQXTp0nH1jHxkd65+51LIU1ChNIHMtJYSDWlf MuWV9yVrkNLWTNuQoCV5/V+O5xZFUvuev1otqcfHdj+kdhljDyEnU6J1GGXogQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696011086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b58beDvd/daZZQE1L8G5F0Imr6liz/zcAGzcRtLzCFU=; b=yoxV+/KCMsec1ErAOxqVsJWIUG/54/W/b+10PP/ESb2Z9QMC6L4gmdhppdgf3Eui4fcnQh nYLJS/t/Q20K8vNrSO9dnVuj1nh8HbQ4dUewAX3OWHPEfmQz8R83W/zX0Mwp1qczM21odp hav4hkYanRh120RJrC4NYKuj0gabZJVjgRSGwofel4z8URRgVwPhs0Fn2nTNkb8h7gyQNT 6uBG0qsXn0GEC+sHzfkUiXBeuP9eaMmm7i0CmM5WmNm2V9/O2jGB1hmAo6L7kLfUUL7tL/ qZTxhRjIpo8u+ECn8N2EsnEQUeiuCqHZVzZM8IAbVGHHAptKtEE8PyuR6OQqFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rxz1p3979zgR; Fri, 29 Sep 2023 18:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TIBQBD047939; Fri, 29 Sep 2023 18:11:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TIBQQF047938; Fri, 29 Sep 2023 18:11:26 GMT (envelope-from git) Date: Fri, 29 Sep 2023 18:11:26 GMT Message-Id: <202309291811.38TIBQQF047938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 1f6b06963b4a - Create tag vendor/llvm-project/llvmorg-17.0.1-25-g098e653a5bed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/tags/vendor/llvm-project/llvmorg-17.0.1-25-g098e653a5bed X-Git-Reftype: annotated tag X-Git-Commit: 1f6b06963b4ac773343c2001d5e578c82beac6d1 Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-17.0.1-25-g098e653a5bed has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-17.0.1-25-g098e653a5bed tag vendor/llvm-project/llvmorg-17.0.1-25-g098e653a5bed Tagger: Dimitry Andric TaggerDate: 2023-09-29 18:11:03 +0000 Tag llvm-project branch release/17.x llvmorg-17.0.1-25-g098e653a5bed. commit 4bbf1f460eb3fabdb7cf7cd731af0c227e6539c8 Author: Dimitry Andric AuthorDate: 2023-09-29 18:10:07 +0000 Commit: Dimitry Andric CommitDate: 2023-09-29 18:10:41 +0000 Vendor import of llvm-project branch release/17.x llvmorg-17.0.1-25-g098e653a5bed. From nobody Fri Sep 29 18:43:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RxzkV3fDjz4vWPt; Fri, 29 Sep 2023 18:43: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 4RxzkV37fwz3GB7; Fri, 29 Sep 2023 18:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696012994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOohBTjKe/eoV+qm6C91KFZMiNWikhVEKySna1kFSzE=; b=pEdF7Eikx2ojzFhDU+HnzvOSe9fdOvbkeZxxhX7QwMhLLOeabKTmZAlC1Ciqq+S3SJipzS DwxqOjH47Uwc9oiU8ZNY+xwlz5IiY/z6xagdEPvZT+ilnfiJikT0rTMBi+2whhphPFDdyH lzTpEmMztzPp/Zim93ReCEqzWbGm+TU1aPW9M6E0x5h8tFfqtltQW7i4dhLg245lBullFj LqFvepUA7eG4atqe6h1i/Ww/KoT/XwbvGSVMKCIH6nZxtFZdC3g+Sh3kjHfXpChcqzec8n FLtydSonk/fVA1xLB9aF5jEl5klTyAXNAH6LfzC8DJyQyl2bBECRZxGhzIqIJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696012994; a=rsa-sha256; cv=none; b=K3XzLSLrA++ty9sTP6+wJGewT4Hn/+O/A45yg1lWoyRZqEmnFis0J40T97H6F9WWi0Dsql s7pGStLPa6taXPTT05/U9sIprqUyS6FyzoRIziRPBFDhcLYVrHtHd9XUkbwiJhnAOtnB22 m98Lfy8n/yzTvf0o2YeNox4EZc0wfBICZT+T2QJaYOXVtr/BLS0NPpIDs3pFpsVNXAEFwK SI9zD7dnIX6jfoGy5p4buhm7FGNT7dSH+c7tMc0nmwT2LUGIVYfgnBu0tlf2o9WJC6GZZb ZS90wgvR/w++v6GUt5xxFzvwna3m0qDIvNJcVRJZfGMnVdNBM+NK7DNb4kB70w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696012994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOohBTjKe/eoV+qm6C91KFZMiNWikhVEKySna1kFSzE=; b=qJN+RoSf29HeOSBZzkUji7o77LKAI6dRNPinGg4T3EnF09dEx+tX78t3HRDfEgyRZNw1n3 u1oCJVh3Af9hxES9KjSRzMWcbkYCAGUAV07Lf1v+/BQJ+0vWN4KU2ONNU+awlZOeGjQWU4 BTGN4Vusi0kcSEP8fl/hwN39rjljdZUJo+mUwk0FYx4y5AczzvgShBKjbeE5eqvElS9apV pYDmASzvNkVWz+CHDOKvTMzPBCNLn5cNr/x3W5gBljs/1o5Cf7/cFpVhJwDBgcglHTWGKp /aVXCmUzSHCAMmZk0+bwn4SKvp+nYQ0PZOev72lGx4lgolvjCyw+Pdcs8icwQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxzkV2Bz0z18N; Fri, 29 Sep 2023 18:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TIhEDc000752; Fri, 29 Sep 2023 18:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TIhE8o000749; Fri, 29 Sep 2023 18:43:14 GMT (envelope-from git) Date: Fri, 29 Sep 2023 18:43:14 GMT Message-Id: <202309291843.38TIhE8o000749@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: e2d3168d1207 - main - ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3 commit e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3 Author: Dimitry Andric AuthorDate: 2023-09-29 18:41:52 +0000 Commit: Dimitry Andric CommitDate: 2023-09-29 18:41:52 +0000 ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries PR: 273776 MFC after: 3 days --- ObsoleteFiles.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 64003b2c976f..ff7e4e497fad 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -458,8 +458,6 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a From nobody Fri Sep 29 20:22:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry1wY0Zlmz4vchg; Fri, 29 Sep 2023 20:22: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 4Ry1wY03Xsz3N7F; Fri, 29 Sep 2023 20:22:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696018925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gh7ddw706/VZ00lScUtAdQmt8yNy4kUmfD5MHAo4CT8=; b=PHx1MrFF/Rf8ritz29a0Wu6UGWtormT/1TtGw7tzsd54/Dl92Bwpe3JwqyIQwdZIh89Bst PmxUm8iy694TMYm5Ba7UkD4CU7mAjaxzAyVJPC8sn45NHE+FJQvcS0DKckjzTD/xJ2wjFF /B8UWy/9FP1tc+bKQ77nhgx2HNG2FLUWtCluUStmViqdwB99s5eelhTftnuDa8ZCbNonw5 uMIJb/LsRFmsgx4bib7SA5uXhrZ9pTSisgVHBcA5dMEfd3K+6ERkp68ZWGXs5hSfcha9qA V4oBeYPI9niwVpJMUDrkTrhljOCJyv9BMg/NeLw72n225vele5CdZDowxyOY6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696018925; a=rsa-sha256; cv=none; b=rEu2cbvpWJc8Nqv+rXOSOpt2/KKuHOR7lK7jW6TJX3BOMkCrh3TDZR06z4tt/bxGbI24q+ a0egJoLr7xGsSSgOoJ0GHjGVA8BJ2ZZ9Ab+oQB3L7SX85EkehZ8H7iQzwDiIPT2UUixELX D2xK4A4C8+z3fiL3SYTJVgRdv/luK+KexvlD3WbR9WCmxxjT2wiXEwvdqmKzhK36IYPwCA AOsw1HHU7D69oBcUY2L0pT4CaTFWRA/CJDMej0Au3FQIFKcH/CxRMFMRjuxoSaeHb5TU9q KmywWorM3tWOd55xkyHdwbNhv+e2asNBvHo/54nEfRNiKM5H4Ks6tEXNAZs+Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696018925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gh7ddw706/VZ00lScUtAdQmt8yNy4kUmfD5MHAo4CT8=; b=OE+/TOx2ovDAGaRCHdDmaTi/ypDa5YCx/IgswLplFNQ8QUcLSH2b1MBVbj+opbgWDaEbjk 90PCJrCw+/zyUgfPvQIZZxlOC3TdXj6u+pWF3YasAXJ0KloaSsVIXyL96weck4TyowTmqI 96ZXgnTCozfrhmMVLCu5KC/kgAP/t2NC+OeDv6ftSKzS5sIFR5aCibrTD4x27fMfvD78YO 75KjPv7Mv1+iVjrr145uOHE45UoT7OZbe9oRFSVbPeyN8rJavUmLOKtYkvAcCDEHaLiL2W tQISlzAT9Zhi+z4gLck2hxaWVCaF4niGy6UmFgomUbaahvLbt0RemZFVvfIS8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry1wX6G0Xz3bn; Fri, 29 Sep 2023 20:22:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TKM41V067322; Fri, 29 Sep 2023 20:22:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TKM4Ij067319; Fri, 29 Sep 2023 20:22:04 GMT (envelope-from git) Date: Fri, 29 Sep 2023 20:22:04 GMT Message-Id: <202309292022.38TKM4Ij067319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 906bcc44641d - releng/14.0 - arm64: Fix errata workarounds that depend on smccc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 906bcc44641de1aadeb692ec0c6a10ff46e18e13 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=906bcc44641de1aadeb692ec0c6a10ff46e18e13 commit 906bcc44641de1aadeb692ec0c6a10ff46e18e13 Author: Andrew Turner AuthorDate: 2023-09-18 16:34:51 +0000 Commit: Andrew Turner CommitDate: 2023-09-29 20:09:16 +0000 arm64: Fix errata workarounds that depend on smccc Some arm64 errata depend on calling into the firmware via the SMCCC interface. This needs to happen after the psci driver has attached as they share the interface. Fix this by allowing the workarounds to mark when they depend on device drivers attaching. This is only an issue on CPU 0 as the workarounds are applied later for the non-boot CPUs. Approved by: re (gjb) Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41916 (cherry picked from commit c643e82dba0b17b2716de4c9d44a3c9c547cbbd5) (cherry picked from commit 843bea18711d726cd2f0a3c3f9144b218e4de3e8) (cherry picked from commit caf7bc535622ee7baeffc3366db8bf0e896aa018) --- sys/arm64/arm64/cpu_errata.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/cpu_errata.c b/sys/arm64/arm64/cpu_errata.c index 38148ff7066c..fee22240bb0e 100644 --- a/sys/arm64/arm64/cpu_errata.c +++ b/sys/arm64/arm64/cpu_errata.c @@ -47,6 +47,9 @@ struct cpu_quirks { cpu_quirk_install *quirk_install; u_int midr_mask; u_int midr_value; +#define CPU_QUIRK_POST_DEVICE (1 << 0) /* After device attach */ + /* e.g. needs SMCCC */ + u_int flags; }; static enum { @@ -64,32 +67,38 @@ static struct cpu_quirks cpu_quirks[] = { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A57,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A72,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A73,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_ARM, CPU_PART_CORTEX_A75,0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, .midr_value = CPU_ID_RAW(CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0,0), .quirk_install = install_psci_bp_hardening, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = 0, .midr_value = 0, .quirk_install = install_ssbd_workaround, + .flags = CPU_QUIRK_POST_DEVICE, }, { .midr_mask = CPU_IMPL_MASK | CPU_PART_MASK, @@ -173,8 +182,8 @@ install_thunderx_bcast_tlbi_workaround(void) } } -void -install_cpu_errata(void) +static void +install_cpu_errata_flags(u_int mask, u_int flags) { u_int midr; size_t i; @@ -183,8 +192,43 @@ install_cpu_errata(void) for (i = 0; i < nitems(cpu_quirks); i++) { if ((midr & cpu_quirks[i].midr_mask) == - cpu_quirks[i].midr_value) { + cpu_quirks[i].midr_value && + (cpu_quirks[i].flags & mask) == flags) { cpu_quirks[i].quirk_install(); } } } + +/* + * Install any CPU errata we need. On CPU 0 we only install the errata that + * don't depend on device drivers as this is called early in the boot process. + * On other CPUs the device drivers have already attached so install all + * applicable errata. + */ +void +install_cpu_errata(void) +{ + /* + * Only install early CPU errata on CPU 0, device drivers may not + * have attached and some workarounds depend on them, e.g. to query + * SMCCC. + */ + if (PCPU_GET(cpuid) == 0) { + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, 0); + } else { + install_cpu_errata_flags(0, 0); + } +} + +/* + * Install any errata workarounds that depend on device drivers, e.g. use + * SMCCC to install a workaround. + */ +static void +install_cpu_errata_late(void *dummy __unused) +{ + MPASS(PCPU_GET(cpuid) == 0); + install_cpu_errata_flags(CPU_QUIRK_POST_DEVICE, CPU_QUIRK_POST_DEVICE); +} +SYSINIT(install_cpu_errata_late, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, + install_cpu_errata_late, NULL); From nobody Fri Sep 29 20:22:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry1wZ2S4sz4vclC; Fri, 29 Sep 2023 20:22: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 4Ry1wZ1WXXz3N7j; Fri, 29 Sep 2023 20:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696018926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IS+uFMDYwmhl4xPtm7D7ly8yu3CmlRm1E8Jc8YUzolE=; b=DH09UC/P9P5qFlQJRZDYl8+Mgf6qK4xmBAG222qIRIAAl+PuOiSY6aB0AiuE22M0yA5fD4 xBxorxsBDirbaKliEkoFxs7+cabAp8hELFMUfZme7EiudzAWJ9UK2kESUQ8x5NEvuGoofJ /7LlI+XnfuHuIMPFXskgT9eRNpUqiJio3EcdUiYK5UkKtnFuFILlAuf2G/jtqgPVZXvkuo YenHEjATJqqcKKLoIw1ES1LsX5lj03OIx1qbBov9tV2RJhXILqCZz/fsEvm58U0bZAj0fv wBD/dJcblUkRO/iwh18oQiDhYzkaLu2OZqk2tw4RKwXs5diVCLKw6lE/oS9hrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696018926; a=rsa-sha256; cv=none; b=DmGY+ked//FK0Mjm9ex4gPjMedKtNvznBM7/SLK8QjMUBw4qW0B0nVo9xWb4EiUQ6vcZxQ sK0njpVnxz9gplEXv0pL2dlFiN6vz4oTRfa1mGdRyMrxOBGg1xGpxci6vFUQeRoFCSzwRj p+yQ4SSNU/bkIShyDWro+OAqIYAzMS2MzQojwyfcyNwAE2n0+otcd2Bs8kBmt/SNQc7yZx 6+y1RtqYs5AWHPdx5ojnPNv/PmHrTa4ZsItU9kIW2n/hCutwjuzqSy6dNDWmofXUxLzhGr 2DRjYeVwZTUR6PHgp6d3S2mjaTa8uRc2bBgs8v+GYKko+Iu/5jg8m2k7LWV7XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696018926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IS+uFMDYwmhl4xPtm7D7ly8yu3CmlRm1E8Jc8YUzolE=; b=YJ/NxzMLJ2guJjj2Q/aOoEY+1x/A/1j/SpZVHQW3a9tEKIru9k7F1AtoRQ/7MyNzsc4KcN GO3LAz7u2bXOz0j6cMaAvdp5yu3V4d8cCgrfLSz1QaynwnnJMmRFvb6FVoObLgf9DBPvDe TCJ9kvV/Rw42NXvdSNg9EJBbe6mlhhhEA3wkMvbiJricQslKSB+wueHtiihljfW6pPoK0v jMHsdNf47dE9xb6/LeI9TzB6tBYk64vKuUmT7h+PBOnZv/rsBQfDHVTbLVoZGclrrJW8sg vGZAIl7Q+gjtNDShn+I1+H6gMINpEkYEHFzCuUksiomunrzaHzYvBdnuVfVTEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry1wZ06Pgz3Vr; Fri, 29 Sep 2023 20:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TKM5sO067367; Fri, 29 Sep 2023 20:22:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TKM5Lu067364; Fri, 29 Sep 2023 20:22:05 GMT (envelope-from git) Date: Fri, 29 Sep 2023 20:22:05 GMT Message-Id: <202309292022.38TKM5Lu067364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: cefd82e00fec - releng/14.0 - vtgpu: Fix the physical memory size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: cefd82e00fec12794c3cff81a17fa7fdf2f3a014 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=cefd82e00fec12794c3cff81a17fa7fdf2f3a014 commit cefd82e00fec12794c3cff81a17fa7fdf2f3a014 Author: Andrew Turner AuthorDate: 2023-09-21 10:50:29 +0000 Commit: Andrew Turner CommitDate: 2023-09-29 20:10:00 +0000 vtgpu: Fix the physical memory size Use the correct endian switching function when switching to a little endian 64-bit address. Even on a little-endian machine this will truncate the address to a 32-bit value. Approved by: re (gjb) Sponsored by: Arm Ltd (cherry picked from commit 4386935191c576fa62a52d52734e264fe8329a67) (cherry picked from commit 5df4deb384d3af12b10bc6de0788578d6a56e207) --- sys/dev/virtio/gpu/virtio_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c index 0472bc98b3ba..6209fe4beae1 100644 --- a/sys/dev/virtio/gpu/virtio_gpu.c +++ b/sys/dev/virtio/gpu/virtio_gpu.c @@ -565,7 +565,7 @@ vtgpu_attach_backing(struct vtgpu_softc *sc) s.req.backing.resource_id = htole32(VTGPU_RESOURCE_ID); s.req.backing.nr_entries = htole32(1); - s.req.mem[0].addr = htole32(sc->vtgpu_fb_info.fb_pbase); + s.req.mem[0].addr = htole64(sc->vtgpu_fb_info.fb_pbase); s.req.mem[0].length = htole32(sc->vtgpu_fb_info.fb_size); error = vtgpu_req_resp(sc, &s.req, sizeof(s.req), &s.resp, From nobody Fri Sep 29 22:10:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry4L417Vlz4tl1H; Fri, 29 Sep 2023 22:10: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 4Ry4L40gKPz3ZTd; Fri, 29 Sep 2023 22:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7M0K3UMbWXx/ZvSwnuN4fYlT87CGUxKDjnsVdZ8PQ8=; b=KX0r+kaOPU+MJ38p0QJvIYZ2do1iA2rt1hxPec7hb7dcxIOgu/+/ibyBUs2bHki0rPXY1I 16kDg04Tp7RiQa0iz8AiJLG0EcOVeHelyf7lBKkSEinwrnT4H88HFJXSXUqqj9rBBVqj5t uvRECM8aoL1p9qBhKnBliM5i+eyCw1gy7AhyQjH30JnUy/3QF278LNtftGB89Z03gAubfm w/EOOA32JjZFgydu6Qp0ChelPkP5WNVrVeBAKxxflnuWehLIbxjNGW9opi9hTZw1wJBS+8 n8Gt+FmIPWno9jE+102RNGuRL76nLlFE0QVfMkbAEwvCNqlgjo9cPxTVWKdWTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696025452; a=rsa-sha256; cv=none; b=cOSCjHkpEQeZ919xYj3Sq3CIu9OYAvCGk9+tZDxfGDE3fkuT+FLZduOE98myc13C6KK1os FmZFM+k5j8Z56XN7/K26axt6ksMVMsJhXgcNgCP5XVFQEZU3zzmTsXYCkx+ehTDTHPMQze zDN3PGr/sn7YA3ezLaY9TzFmeBSaMuiUOMpUgxtijRKff34QEEEY0/YEkSp8rZj9kdNpQP p2MN3zI/NaVsbjt25oUsIBM/3ERv8Czw/eZsu/971s8Yu12G4i7vlB3he56FSR8anVN8Y0 DFFJhygB29fXysSWPd5QQicAw2kPXFjtlDW0dXBKwrs94pwm+8/2n0wyu/K4wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7M0K3UMbWXx/ZvSwnuN4fYlT87CGUxKDjnsVdZ8PQ8=; b=L5mjJa5b8OCahWCbuswymbwNDjt5X0+VawNvTaDg+0eK2Wm/rdWuKgggu3SUItl7AoZDpr PAZ+1IkAo9shGOesu3u9QSVnqDH9fWtelohku8/9XwZOJBztrXrQVU1ORIvTFNXC6adkNo EDNmnxHCm+aViQVjC0RQHTuFt8pCKeYI0bFyYY12xQHU9vEfxmHw5x6dDx6WRjHg2LJOYx kYa99lR997PABaDsFZeT24NpBgHDEhmxcyBd7npaHaBVSjdMpntqa3bIAeA2ouWDJZ0ZQe lsQT2AkJpVokZVsC5ApaeKmAO6w1E7sh+cySUwoV6fzS7QRgvoYHNrRuMEGUrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry4L36rfsz6bF; Fri, 29 Sep 2023 22:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TMApsg044876; Fri, 29 Sep 2023 22:10:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TMApnC044873; Fri, 29 Sep 2023 22:10:51 GMT (envelope-from git) Date: Fri, 29 Sep 2023 22:10:51 GMT Message-Id: <202309292210.38TMApnC044873@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: aefda9c92da6 - main - pf: ensure 'off' is always set before use List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: aefda9c92da6571d405e1b27c5c68333ad8bbc57 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=aefda9c92da6571d405e1b27c5c68333ad8bbc57 commit aefda9c92da6571d405e1b27c5c68333ad8bbc57 Author: Kristof Provost AuthorDate: 2023-09-28 07:04:32 +0000 Commit: Kristof Provost CommitDate: 2023-09-29 22:10:32 +0000 pf: ensure 'off' is always set before use If we bail out early from pf_test(6)() we still need to clean up/finish SCTP multihome work, which requires the 'off' value to be set. Set it early enough. MFC after: 3 days Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index df4bd47c35d5..baa34b16f487 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7698,6 +7698,9 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, pd.af = AF_INET; pd.act.rtableid = -1; + h = mtod(m, struct ip *); + off = h->ip_hl << 2; + if (__predict_false(ip_divert_ptr != NULL) && ((ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL)) != NULL)) { struct ipfw_rule_ref *rr = (struct ipfw_rule_ref *)(ipfwtag+1); @@ -8249,6 +8252,9 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.af = AF_INET6; pd.act.rtableid = -1; + h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); + /* We do IP header normalization and packet reassembly here */ if (pf_normalize_ip6(m0, kif, &reason, &pd) != PF_PASS) { action = PF_DROP; @@ -8256,6 +8262,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } m = *m0; /* pf_normalize messes with m0 */ h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); /* * we do not support jumbogram. if we keep going, zero ip6_plen @@ -8272,7 +8279,6 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.tos = IPV6_DSCP(h); pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); - off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); pd.proto = h->ip6_nxt; do { switch (pd.proto) { From nobody Fri Sep 29 22:10:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry4L539Kkz4tlNL; Fri, 29 Sep 2023 22:10: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 4Ry4L52Tnsz3Zwg; Fri, 29 Sep 2023 22:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4TXnFXnhDfMKD2rts8Tt3GuXBukVL6NlReyCnRIBb0=; b=swnfoaFoDUvnBVvEH9HgqhGqaK4HEQAtaVVnUpQ2qd/uMH8v2TuJFVor1tPY7IkxphNz0i BQZad/velnhXgiy1PmiR+5EZqsICiu2+CR1/pjnapNq6PBrWBkGvF3tFJQlC4RKKrEqgXm Sv+U2jLpLuRAj1tBAwSfLDAQQbWucU1ytbcVOCH+hP5mLNnYeCl2vpdk+NnyuGhsXefnZE GGZ+DDMK26b59uGix2u3qorfk8+xHlWupkpYoFreOO1BnnfAXXmDURstmI5AJUTRSsEHJP LpTCTpDQoeyBqbwY4d3OSoJdfQvivGEnCk73LPMmMfnwh3eP1oDRU1STA5w7lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696025453; a=rsa-sha256; cv=none; b=pbJQybTA/9/I3JYnbLPze1CHE8/QPW5IybXviX8SjvqTxC2zlY5nCa5kIO0nRyMT3dRbnK ofA1NPrR0eI833+iVWPmFy0m/LJudHv0pnSI6+YPMC3HlU4Z3cZYpmkvWej3Xd21yBydsZ A5Yj0Iou8jogiKJZuMTg07885vpMZUkBgHxfT8jWMpDRaDeXUhPXTxiA1ELcnTPOdpQzb4 OmrzV471v15spgrmvmy6pdWQCJFXQaS5TPBGp5GMVy6aEyAE2BEUnFCleWhveaTzwBX7Hx QZ/UfExwQR0XZ+/iIDa/NEAkpxZ7/nHhqM/4g2qjJXvC4yG8Ox76Px7IFIbBtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4TXnFXnhDfMKD2rts8Tt3GuXBukVL6NlReyCnRIBb0=; b=yhxpJJUPfonmBvcaxXiwUz5UpPa8QHgPGdaL2d23grhfOQbqyriUHanW/MSbOF+0f0asvi OBmE/gISh1gkzeA/UTeMAm9Dvp4kL6Mkekt3Uzb53eeno6bfeM4TxATwnMjvjufoUDGNc6 DpHd/77U3J9f1gfK8Zizt4klx1bpvnzHnX7Ver5gVY5KEuZKmjoiGdd7crF8dCrJNYxbdZ /IGdul4kSuwlanqhWQZ4vIZjFgxQv/qbNU80u7EaV6pyrVh+tLscJdlUc5j1ZnPbxJNLyw OiOHRFqJcCX0UyB7nfQ7bCx7q0/C/sghjrbtGnSLqacXGLBVFCwY6JlqR8wOWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry4L50vcbz6Pd; Fri, 29 Sep 2023 22:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TMArWc044945; Fri, 29 Sep 2023 22:10:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TMArqS044940; Fri, 29 Sep 2023 22:10:53 GMT (envelope-from git) Date: Fri, 29 Sep 2023 22:10:53 GMT Message-Id: <202309292210.38TMArqS044940@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: 480f62ccd8d9 - main - pf: only create sctp multihome states if we pass the packet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 480f62ccd8d998e4db9dc13c354a60f8f5e32a33 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=480f62ccd8d998e4db9dc13c354a60f8f5e32a33 commit 480f62ccd8d998e4db9dc13c354a60f8f5e32a33 Author: Kristof Provost AuthorDate: 2023-09-29 07:23:43 +0000 Commit: Kristof Provost CommitDate: 2023-09-29 22:10:32 +0000 pf: only create sctp multihome states if we pass the packet If we've decided to drop the packet we shouldn't create additional states based off it. MFC after: 3 days Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index baa34b16f487..3e1c8d32add9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -310,7 +310,7 @@ static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); static void pf_sctp_multihome_delayed(struct pf_pdesc *, int, - struct pfi_kkif *, struct pf_kstate *); + struct pfi_kkif *, struct pf_kstate *, int); static int pf_test_state_sctp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -5921,10 +5921,10 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, static void pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, - struct pf_kstate *s) + struct pf_kstate *s, int action) { struct pf_sctp_multihome_job *j, *tmp; - int action __unused; + int ret __unused;; struct pf_kstate *sm = NULL; struct pf_krule *ra = NULL; struct pf_krule *r = &V_pf_default_rule; @@ -5933,11 +5933,14 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, PF_RULES_RLOCK_TRACKER; TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { + if (s == NULL || action != PF_PASS) + goto free; + switch (j->op) { case SCTP_ADD_IP_ADDRESS: { j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; PF_RULES_RLOCK(); - action = pf_test_rule(&r, &sm, kif, + ret = pf_test_rule(&r, &sm, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); @@ -5986,6 +5989,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, } } +free: free(j, M_PFTEMP); } } @@ -8154,7 +8158,7 @@ done: PF_STATE_UNLOCK(s); out: - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } @@ -8711,7 +8715,7 @@ done: out: SDT_PROBE4(pf, ip, test6, done, action, reason, r, s); - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } From nobody Fri Sep 29 23:20:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry5t43dKgz4tqWB; Fri, 29 Sep 2023 23:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ry5t42JG5z4DZ6; Fri, 29 Sep 2023 23:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696029612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ARER+lUIoSkkRIGJgVkqljvH+2ItIhFaesAnRvxCpL0=; b=kfqHQ1yrK74B9dpdhmDbMGUMl3NteDEZgVOBl7YPngMxz/+0uVeQb0/FGeBbG5xEqijq4S xlXBB3sz2yJ7K4TUq6Wv61xGcP4QV87AWZBj5zVYIUr5dZFVUOnG6EenQSZSM+WaaR7LG6 v/s0xvm93496GGIuPcM9GPi9r5xG0/B1vxZwWncEnQtbwk8/HIUW3ngZEyNkg0wGR1Lrps hSDrGJ36bRlLVWrYm5PIDtpDqORtxwf7BUDABSn0zms0R+hcTbmR5zwhv22+Ad7jImAU7p wZ10a8emATOjG8MlzvV+/lul+SI0eUvFSNWnTQ5K8vsXjoc2yQGuNv6MEC/2BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696029612; a=rsa-sha256; cv=none; b=sghCrkBs6rM05KXf7c2qJeEHL8/9VNuqVJcwMWEGqtbc+kqJk8T4IpSCB2h1P88Nh6WrR6 nwe94G0KSBlIfklGR5NEvH2prwSztjeewYRlv8TDfNe01RGHM3gAAz0rrq+OmPZB6va3q7 IlUOSp8TB7UQrgzMnYll7n6BHOL0SNzzNbtGJxHhlBZFNO50ayUhJA/sppaejHsH85nAOK SUyoiyRFYIRzTb2ZiLaQ+g8vPsMt7H3Tt0/1BsF+QujFL9Jaim4qWXioJNbKt2zK6rSQmQ oDbgfO8EmglIdz8ij1lOHdPF4Cby3HcTGjxKRFuS4/5ls/0Y1T6XJLeZ5ACR3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696029612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ARER+lUIoSkkRIGJgVkqljvH+2ItIhFaesAnRvxCpL0=; b=Veo4AjzxIpVRbAhf/iElXMxY3dcMgYmFV+UOmNpKTPhNyQglPO8WQ9fiW+IGx0KKIPWPLi QM4vrZ1SOXyrnFrl+VQYvqpbd8KDGDrVDWr00uIstdQv8wdZ5HDPCq9LQ7Bq6zKQ8dxjX9 j6AlCYFMA8DashDUzfgfR5ko7pVXnpYjfqwiKpUEk+kRyXZfOTGCod1Ee05ENQ+V1uv3no 70kvf9uTqiiPopUsrhbtF4rq6gnShbp4BfQw+TbyT0RxI3lMrWa6TRklbXVHUDkme+Htsl ES1Q422tL42q4DRQLuGRYrfB4+Y2YPwuL5yEbRWrABADjZXx68WSLJOr5vMlFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry5t41FpVz7yt; Fri, 29 Sep 2023 23:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TNKC22056840; Fri, 29 Sep 2023 23:20:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TNKCoS056835; Fri, 29 Sep 2023 23:20:12 GMT (envelope-from git) Date: Fri, 29 Sep 2023 23:20:12 GMT Message-Id: <202309292320.38TNKCoS056835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: e47381c9fc72 - main - Allow for CSTD to be set kernel module Makefiles before inclusion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e47381c9fc72c16e063da71fb32191e402948a50 Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=e47381c9fc72c16e063da71fb32191e402948a50 commit e47381c9fc72c16e063da71fb32191e402948a50 Author: Stephen J. Kiernan AuthorDate: 2023-09-29 15:04:45 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-09-29 23:19:58 +0000 Allow for CSTD to be set kernel module Makefiles before inclusion Use ?= when setting the default value for CSTD so it can be set by Makefiles before inclusion and not be overridden by the .mk file. Reviewed by: imp, sjg Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D42019 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index e00e025ab91b..b508bc81b5f0 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -271,7 +271,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ .PHONY: ${PHONY_NOTMAIN} .NOTMAIN: ${PHONY_NOTMAIN} -CSTD= gnu99 +CSTD?= gnu99 .if ${CSTD} == "k&r" CFLAGS+= -traditional From nobody Fri Sep 29 23:42:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry6Mx5F3mz4ts7h for ; Fri, 29 Sep 2023 23:42: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 4Ry6Mx3MHMz4GQP; Fri, 29 Sep 2023 23:42:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696030957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LUzXy+zILHWkwv5uuGzzwOH9phtVYgJlyFZfWJTn80=; b=TJ/JQWYApUwWEZisC6OCZmuGODIg4yH75pjJmALv1rAMZz41w7HvqqFM8ALy52Tnmt6KFX /EvbgMYqtJ+OUZ3WkTALY3rxwNAUrZ6ti774ECBCzqt/aUYJi1h1e03ddQJlT8Bq6lUrSL +8YQTlAZBCZKcHQckHp/2uyN7qtMdiQN2d9sFK9rU0ZFEQ2po92cwFHjDe0C/FEbx2VnvW kbSby4Or1FjsWZoDldq7Nh4UEVUReYv5whCAEBXA4lfWdzBBN0EirAsAahm71THA34/lPK UpDiHW7ShAJdxyL0i3voyMNv3ydEm6SjmbJdkRXNx3egyoTwCXiqp0j7yVgWxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696030957; a=rsa-sha256; cv=none; b=RvWQfrRClxI8v1XE3qjSCMEyxfDeF8oAAxo4H3VTBPmFF6qTDoZ7NsIEaMBeBasKbeYcIN zVOSsVgxnYmKGE0xOhtkvHQeoSOAsZdx9X5BofErzzsr5cm4qfcXpCLjwEAWD0JqaASlbZ Xj3GI47HrsqO6ejjCCreQbn4C85NDhSAPpHEf4jAJJhjBWBatqKPlntTvY5emMrad/of8H 51xDG8IrorsIrAAzICXYi4SQoijEVM4nBhRn9D2Y/aVXosf6GIj9y2T3pFayD3Ma60i330 YJf75W9mZwY1vWqg6ZCC27J7K0NzeI/0Rj0wcOuZ0NSWpNfNGbp2raMYJ0lw9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696030957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LUzXy+zILHWkwv5uuGzzwOH9phtVYgJlyFZfWJTn80=; b=Owxyhtavoo2CBDOzUq5tz1OCfhCwKIjNkDq/7QvnJ5UU//AALsg8RSkaNDlaici3qu2jcI iEPhgw5QHafZBMDiNCGIil3MJBweydJ1/U89AZ8NDgCk+NTHP8xddukFOQvqwvcCLpA6gz Ne+Jc++K+WqlSQoTEKGoMcji7P9QkuqlpF7Q//ziMio4aCRyXzw53ecJE2u/BxsVi6nsYp pfK1Hl1tT4VXVsX2oce3h+SUjLAUXF7dEqzFT8rYMRFWEnJPxwydY57El82xgIQ8mQkh/G oJ9Teqy4ruUATEHpwKadtCF+iXxTXD7y1SRTLJrmR/v8DXc96adsMxr/hMw38A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry6Mx2SYQz8Sv; Fri, 29 Sep 2023 23:42:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TNgbue000797; Fri, 29 Sep 2023 23:42:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TNgbCE000796; Fri, 29 Sep 2023 23:42:37 GMT (envelope-from git) Date: Fri, 29 Sep 2023 23:42:37 GMT Message-Id: <202309292342.38TNgbCE000796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 2e2a46e0a597..e13538856479 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: e13538856479ff79ca6642e53dddf8a593deb2c9 X-Git-Oldrev: 2e2a46e0a597b3ee606ea7dc5bc527459077322f X-Git-Newrev: e13538856479ff79ca6642e53dddf8a593deb2c9 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=2e2a46e0a597..e13538856479 8a9ba769ee50 Set timeout before creating pool in test 87725534dba1 ZTS: Add additional exceptions a59e294e210d ZTS: Fix introduced test bug in block_cloning_copyfilerange ec994486b1ef Reduce trim min size even lower for tests to reduce flakiness 5551dcd762d1 Don't allocate from new metaslabs ba769ea3515f Fix ENOSPC for extended quota f9c39dc86276 Tweak rebuild in-flight hard limit e13538856479 Restrict short block cloning requests From nobody Fri Sep 29 23:43:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry6P61dqLz4ts9M; Fri, 29 Sep 2023 23:43: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 4Ry6P61Hy4z4H54; Fri, 29 Sep 2023 23:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696031018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=peoS3cLpzpfCpxG1NRcTjX2xKSzKl0/rL5dAQls895Y=; b=bw8aLIyMAMUdaO00jBAz0CqweTRndT48AtgSiukROj4rI1EjVMQ5NGOZyLdPP85OEreURR O/AvNvT/TZySTyPz/znc76bizYYn+QdHFLPEYWy/7gUrAHne6o8rnO8XHYA9lA2o3Gq0Ff Y4+sJ3GjO4HcEoBgbyqeTSR3vFLrGh+DD1oyFrlFl1X9hjY479wgT/msSl+QIbFnlEmUT2 ychDJnJItDjAOMByr5ME1zFu2FSEuQ4wj6BVmqIe9eO1jK9jrY6EZcl9g7ndV/xhmlVLcX BaGUrIMYyJF7xgC15nVi5VPJtlrY+a99iEDlF1wMBWyoxNTt5xbRneT5qFDhNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696031018; a=rsa-sha256; cv=none; b=NDtLPa7NS/rc0Bg3C+o+SPw1Tho6YVW1e6LwhWILEXHDL3QI5pkjLCOAkQnk7XGcBKQeWa 0z7v/OrhiHTsv7Ai1SG8m+a2fbh599tK4ihIYKDZLerULF3lJy7DHCi3AjavVx7/s7dp94 7Gv8zl1HgbbIkDswZe8Pstff4Br4iEr7EdrH6iJlg11yEhb4LBO4G6JCedlcaYUjnlAs9V IhQxlrZGYmop7jxdmnoEJgldhfo9sPowH25DJPgRq4EygNEI5klpF8ARsF7YpGSK9PV1UY UC6wfMziwLdvExyEItytiwaeOTsoO9oC3LQsx4XdQCknHCoyLTFf5g6zptpewQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696031018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=peoS3cLpzpfCpxG1NRcTjX2xKSzKl0/rL5dAQls895Y=; b=JpLFfhW4itXLwRfU9h7XVkuhmTCOCpANf0YKYUndfFbv8hshe0xmXWbwoLekXkYNylTlDQ fHMOx9Oo5Z2nx1Zn8H91l6VpqpzgHrIWWeQ6d3cNxh3qAd0Zc3pLNxYmV13WrjRDLgINVb ysYxOU0ke2jAnHG+VDSmMKM3cgXIELBfxvP+xx8/UrboMTB52/Bh/jI1nXdENlB26eN9i2 +BuFM4ml+LreIqiGWzyiCODPHVGaivHzJlakP+NGXL4m6MddqdBhSx2EQGbKugwQepCpYh Q71J0K98IkBT+Zq5p0cqtDJgNF3KqEtd3v03gdyGdQa2NzyiuqTI4HrlU4N+VA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry6P60LLVz94q; Fri, 29 Sep 2023 23:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TNhcg5001089; Fri, 29 Sep 2023 23:43:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TNhWFT001077; Fri, 29 Sep 2023 23:43:32 GMT (envelope-from git) Date: Fri, 29 Sep 2023 23:43:32 GMT Message-Id: <202309292343.38TNhWFT001077@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: f7a5903de272 - main - zfs: merge openzfs/zfs@e13538856 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f7a5903de272db58b2b9164c1219fc2d5b757654 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f7a5903de272db58b2b9164c1219fc2d5b757654 commit f7a5903de272db58b2b9164c1219fc2d5b757654 Merge: e47381c9fc72 e13538856479 Author: Martin Matuska AuthorDate: 2023-09-29 23:21:44 +0000 Commit: Martin Matuska CommitDate: 2023-09-29 23:41:51 +0000 zfs: merge openzfs/zfs@e13538856 Notable upstream pull request merges: #15308 5551dcd76 Don't allocate from new metaslabs #15312 ba769ea35 Fix ENOSPC for extended quota #15321 e13538856 Restrict short block cloning requests #15324 f9c39dc86 Tweak rebuild in-flight hard limit Obtained from: OpenZFS OpenZFS commit: e13538856479ff79ca6642e53dddf8a593deb2c9 sys/contrib/openzfs/module/zfs/dsl_dir.c | 22 ++++++++-------------- sys/contrib/openzfs/module/zfs/metaslab.c | 9 +++++++++ sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 4 ++-- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 13 +++++++++++++ .../openzfs/tests/test-runner/bin/zts-report.py.in | 4 ++-- ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 5 ++--- .../cli_root/zpool_trim/zpool_trim_partial.ksh | 2 +- .../zpool_trim/zpool_trim_verify_trimmed.ksh | 2 +- .../tests/functional/no_space/enospc_rm.ksh | 12 +++++++++++- .../tests/functional/trim/autotrim_config.ksh | 2 +- .../tests/functional/trim/autotrim_integrity.ksh | 2 +- .../functional/trim/autotrim_trim_integrity.ksh | 2 +- .../tests/functional/trim/trim_config.ksh | 2 +- .../tests/functional/trim/trim_integrity.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 ++-- sys/modules/zfs/zfs_gitrev.h | 2 +- 16 files changed, 57 insertions(+), 32 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index 1accbe621d17,000000000000..b77a32e4754c mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1149 -1,0 +1,1149 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ +/* #undef HAVE_VFS_FILE_OPERATIONS_EXTEND */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + *** 218 LINES SKIPPED *** From nobody Fri Sep 29 23:45:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ry6R14QBvz4ts24 for ; Fri, 29 Sep 2023 23:45: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 4Ry6R13rRsz4H6n; Fri, 29 Sep 2023 23:45:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696031117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7RQtXrIChvrDmfM2PQKpruUJF4HJfBFP3RVym2S00k=; b=eSJE8oU2KhpBOHONLou5S9cNRFfqbSbmh6SfE6f6sn/HaYsOF12zTiOPu1BK9up4PLs+Xr Esz+NZwMw1oqMSZs/2lJPcqOHWRXQALtAqfKs+h/F7IzGlmCYXu7am6VSltMbaei7IEOqt fCBhw9/rM+vhJbWrtLuVjcLzTNKQqiWYVpXh9uAAJ5dTS4UhIPBAajp6sFKJmfrmZxZpGo 1dGT9LTwCBqvcV9zpPNC6UcwvPh0hdUAJeQHRUraNryd7Hag0qqll0TkJfaFL6iLoHc1+i IPiofG9c717eVtBkmytimCb8ydHXP30XUJB6yopY9WUtZ9whoSt9QzbsKUeDVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696031117; a=rsa-sha256; cv=none; b=VcGrwSNgEACNouR30tDliOk+KyUUReqCkcnvlnIz6YlwauVQnCrjVwbB58lWJGowR3a7+r mfXWAr24d4s2bApG6srWTgaFt2ycKYioZt43/ChpHgDSM+x5Rd7SWOm1U+LaCEit7hMjvs skpmbX22VJlpXvT8t0JD3b1AW46S/hWigt8Tevm+NiwXzgSVYBz16jSZ1+QO+0e2KSIqsu HEONzOReSj+iqqqRpKOgVbCgQdlxCAHeMyUx+pmzfvywILgjEwgAUWqw6tTQHB+QK/kN8h Yk3zzSEYISOOWHAM6TosguwCa9lLaEkbu6QEkEba+LkUqvAu9c6UbrQnN5EDBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696031117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7RQtXrIChvrDmfM2PQKpruUJF4HJfBFP3RVym2S00k=; b=Nl4RSMKZR1VLKMavzUOhUPInHoBmWM807IRQx7csN92TbLMgEev45f+53TgFw5Xd7EQcMa IBBy9OozvlfpGksEAsEfzwRAEX+xDkm7OIohxX5w6Uo70rG5THSzEhox+ouyWe+LNAAUtX 6x3nZhVPXQA3JxGsE54d5RGHg+4MtjKF7PRxzyBQNEb3fjt7x22hqwFK81I367SMSyjx53 pLWX40pxcXffpbDWqiwlw29sjTIe0qEPSNLFGhtjgZK34OvZxpMsRTZyJ/+zqWhzmrbzvt g7NyOKsqAX7AAgQdGlKks5JYmWO9Nu5XfBVR7rKeH97vokpr3TGPaXRQSdUMbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry6R12vtpz94v; Fri, 29 Sep 2023 23:45:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TNjHks001610; Fri, 29 Sep 2023 23:45:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TNjHHS001609; Fri, 29 Sep 2023 23:45:17 GMT (envelope-from git) Date: Fri, 29 Sep 2023 23:45:17 GMT Message-Id: <202309292345.38TNjHHS001609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 86783d7d92cf..eb62221ff0f9 - vendor/openzfs/zfs-2.1-release - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/openzfs/zfs-2.1-release X-Git-Reftype: branch X-Git-Commit: eb62221ff0f9efbc2ab826ec6f1388c5f05fb664 X-Git-Oldrev: 86783d7d92cf7a859464719a917fdff845b9a9e1 X-Git-Newrev: eb62221ff0f9efbc2ab826ec6f1388c5f05fb664 Auto-Submitted: auto-generated The branch vendor/openzfs/zfs-2.1-release has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=86783d7d92cf..eb62221ff0f9 c5bbd80cb9bf zfs-dkms rpm: simplify scriptlets, fix uninstall 6af79c92dd38 tests: zts-report: issue numbers are numbers f9a2d94c957d contrib/bash_completion.d: fix error spew from __zfs_match_snapshot() cb549c742599 Fix memory leak in zil_parse(). d91778e31fec Remove duplicate code in l2arc_evict() 425f7895dd9a Fix the L2ARC write size calculating logic c12b5829e1e2 Fix the L2ARC write size calculating logic (2) f28cd347c4e1 Store the L2ARC device ashift in the vdev label ef2156c66ed3 Shorten arcstat_quiescence sleep time 6e79bcd3569a Fix remount when setting multiple properties. e01e3a4e123c Fix raw receive with different indirect block size. 846a4cc08986 zed: Fix zed ASSERT on slot power cycle 1abf68b7aea2 zed: Reduce log noise for large JBODs 245850b66c1e Linux 6.4 compat: META 692f78045ef5 Workaround issue cleaning up automounted snapshots on Linux 426d07d64c00 quick fix for lingering snapdir unmount problems 837e426c1f30 Linux: Never sleep in kmem_cache_alloc(..., KM_NOSLEEP) (#14926) f52d9b6f4278 Linux 6.5 compat: BLK_STS_NEXUS renamed to BLK_STS_RESV_CONFLICT e45ca514e842 Linux 6.5 compat: disk_check_media_change() was added 211868b5d01b Linux 6.5 compat: register_sysctl_table removed 3ff9e4f8ac23 Linux 6.5 compat: use disk_check_media_change when it exists 7c0618bdb731 Linux 6.5 compat: blkdev changes feb0fa6b38a2 Linux 6.4 compat: iter_iov() function now used to get old iov member 5ee79af41fbe Linux 4.20 compat: wrapper function for iov_iter type access 0ee7a0862719 Revert "Linux 6.5 compat: register_sysctl_table removed" cb115edfc6b9 Linux 6.5 compat: register_sysctl_table removed 9b7f7f02e972 Linux 6.5 compat: replace generic_file_splice_read with filemap_splice_read c74a17a498df Linux 6.5 compat: Use copy_splice_read instead of filemap_splice_read cb28c0b7701e Linux 6.5 compat: safe cleanup in spl_proc_fini() adf428cbef2b Linux 6.5 compat: spl: properly unregister sysctl entries 92fc218205b2 intptr_t definition is canonically signed a4f82db53d6d zed: Add zedlet to power off slot when drive is faulted a449d8bab0b0 zed: update zed.d/statechange-slot_off.sh c8a3c74556fa checkstyle: fix action failures ae0d644269ad Linux 6.5 compat: META (#15265) a93c30a2f247 Cleanup: Replace oldstyle struct hack with C99 flexible array members a3169da8775f check-zstd-symbols: also ignore __pfx_ symbols eb62221ff0f9 Tag zfs-2.1.13 From nobody Sat Sep 30 02:52:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyBZg56SMz4v8ks; Sat, 30 Sep 2023 02:52: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 4RyBZg4RRhz4XFP; Sat, 30 Sep 2023 02:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696042331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z06gshf9JWJSiaP18FWJYCimqEt3scNhsKa2UwGOqO4=; b=qVdhmC8m2Pro0V6FpeRLE/TKTObEuvoDGV0nTBjssirbVqRAXZcsoZHd13dWujY1fqi2li nDeL5JJj2cMu/WG9HT7gUehRtrU6JNVoPBJJXdRheREjWlnkRV+m8iVf37oUYDmBRc92dq SbQ2YguOqIjKIEmPQ3qOMPO3ug/mLj3Az/Q9/0EB8nGt0Yty7bz72ybQgqkChSKF+MO59x g4arQwY/RgFuCjzE3PQYMCPXASqCMztGkyCmQqxFGf0MdaZx42x2XL5zRwYHeqZT+BYTFR tSRU14jfb7/hvPUSHLs/H6fBbvepqCPxRxBhMAnZjlj7ovFRPthaCWC81KNEog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696042331; a=rsa-sha256; cv=none; b=gFqsOuBi6R8ZfCN8XKO4chYbd9hJwcWCP+cmsZr+RJfaUmV8nfJVsJU3qv4AAfhSMfUuBT opOnQZIlfbfLyM3WhVcdwX8cyvuOuF4N0lRyCupW90dbf1h5upLGDIbmoZQ4gl8ouhPr17 Ib7KB1Tc6ctA5wzWoIuqL7vHLb/FcAvp4kFpxlwQujO8d6nptH1XG9Lyh58/YOgfdcqYud xrYpFXnjykSSThIHPTdTxzNjL3jnXAheULC8dIWTSxpHxUR3Ga2k8GSYaD2h+XblQIGrIx FzpFHZze94gmoKGD4NujpVvhpsXSb5GFE48dR8mMez2BHslR0yqVzMqGq6iZ4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696042331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z06gshf9JWJSiaP18FWJYCimqEt3scNhsKa2UwGOqO4=; b=g4rGn6gza6n2lTAYv/y7PVu9CJVt3Q7dDaCVRtVZoIztdFRxaNn4raCQSMXDHPu/8ijj+A RTQGGudUEX9pmPRst+zajkfOzFTe4TZ7f+G90ASobwZIT4JkC4PznSo4mJFsXjSytFxYk4 19vXJDktr+Oy8pgC0b7KNCUvadqyZOuQWh98aPnObRhmVhvF8cBKnW3S0KVDqbo9Vdje3u mBReSuPrvY3A2bYcyPOI54IDw+eXmFcVroJryaWpn/2vaJN4ZXaYZRjFX6BHuHR79K+4q0 inxHm7m+5JqEP3uuuKdraFYI07nihNaQBZwa529ISI7mPibsp35ZQhD/QH4FfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyBZg3W29zWPP; Sat, 30 Sep 2023 02:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U2qBvU044234; Sat, 30 Sep 2023 02:52:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U2qBEV044231; Sat, 30 Sep 2023 02:52:11 GMT (envelope-from git) Date: Sat, 30 Sep 2023 02:52:11 GMT Message-Id: <202309300252.38U2qBEV044231@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 25307d6c9279 - stable/12 - regcomp: use unsigned char when testing for escapes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/12 X-Git-Reftype: branch X-Git-Commit: 25307d6c927934dd44628e06cbc7047415fb6931 Auto-Submitted: auto-generated The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=25307d6c927934dd44628e06cbc7047415fb6931 commit 25307d6c927934dd44628e06cbc7047415fb6931 Author: Christos Zoulas AuthorDate: 2023-08-30 20:37:24 +0000 Commit: Kyle Evans CommitDate: 2023-09-30 01:41:57 +0000 regcomp: use unsigned char when testing for escapes - cast GETNEXT to unsigned where it is being promoted to int to prevent sign-extension (really it would have been better for PEEK*() and GETNEXT() to return unsigned char; this would have removed a ton of (uch) casts, but it is too intrusive for now). - fix an isalpha that should have been iswalpha PR: 264275, 274032 Reviewed by: kevans, eugen (previous version) Obtained from: NetBSD (cherry picked from commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0) --- lib/libc/regex/regcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index fc66ea32046a..e93ea02f5873 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -814,10 +814,10 @@ p_simp_re(struct parse *p, struct branchc *bc) handled = false; assert(MORE()); /* caller should have ensured this */ - c = GETNEXT(); + c = (uch)GETNEXT(); if (c == '\\') { (void)REQUIRE(MORE(), REG_EESCAPE); - cc = GETNEXT(); + cc = (uch)GETNEXT(); c = BACKSL | cc; #ifdef LIBREGEX if (p->gnuext) { @@ -978,7 +978,7 @@ p_count(struct parse *p) int ndigits = 0; while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) { - count = count*10 + (GETNEXT() - '0'); + count = count*10 + ((uch)GETNEXT() - '0'); ndigits++; } @@ -1288,7 +1288,7 @@ may_escape(struct parse *p, const wint_t ch) if ((p->pflags & PFLAG_LEGACY_ESC) != 0) return (true); - if (isalpha(ch) || ch == '\'' || ch == '`') + if (iswalpha(ch) || ch == '\'' || ch == '`') return (false); return (true); #ifdef NOTYET From nobody Sat Sep 30 02:52:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyBZl63gsz4v94m; Sat, 30 Sep 2023 02:52: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 4RyBZl3jL9z4XT3; Sat, 30 Sep 2023 02:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696042335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Po9DONmHAe8MSLs5xnlSKareB4phi7gksX7nqlKf/OA=; b=oX/HNaS/Cw4aR4gvdotvA64imlyjPpBvzwNirDGd6V5wjhw162NKIhQrNFEuRi5odqpFII owwAE2f27S5aIBhn4KlOm2tS3eyTAMPzraMYYY+lTYCjIhmpXl/VcI2SxBLjt19t3WXhUA g1DZrj7qk6fQ0dsBFBQkXx2BlTMj5y/D72eS/Sok4hxg9ZvB6mJuJ4deUQIXUy6Yn2QP/0 3sTI9S2u9Qf6awLvGjij9G9ffsTonM9eg5SG09WJ08i5LgUR+R/poX6rSNOPrE43UtOe4q 474VIKFLI5xBtOac72oaAZUtcfMe2llGXBF9CSiTk8yosHcOWLybeLvGOd+5jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696042335; a=rsa-sha256; cv=none; b=vFu+7RSeFsPzkQ4NzyaeIzfgR8uouoiJRfIR2luxJadrbs0aWbGrxes+Bl2/1Z6NK940Jb YmEf2o8i69UqJXDylAW8Q7eaJ4oQSEVNx71tk2F8svZauTW3G3CklNZQavrEdAv/kULffG UT6SfHVV49ipyxbfPeecV0NP1VYAU85LL0waaLOoa8MmCl+jHLr8ygJKwcTrjgHFdOah9f 5GsX1lo55+2poKxNFnzanISqLuJidL1pbvFzTfPLg6K5/4GZ1MkdODDehIvu6gGOaySTpU NRBuBhRwAa93p3hkjtvZdSffStiUnDv3oDhWjm0+ybwBpiZG9ZM9sas8aI6/6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696042335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Po9DONmHAe8MSLs5xnlSKareB4phi7gksX7nqlKf/OA=; b=aB8D3YalQYkF7rz5Owd8JOB61tW+hdVktCArIQ+oVVuU2xlWD1zswOkinnUNMyAJNmx4eP tWZ02vL795oFR6hhc3Sg7GcDlbEgVSCIvI3klRwkvASlxfbrfaHxTCkMTFgvaB3iVKwIEk 2Atw3JdzyxVijwfticZGlgzn8G6RiVO+7JM8qbq99RJN4ISjKGJB36jbiXrpPkDE4dW5T8 2kya3omIacyzWBAS/ZU/v9AmkMz7uEosiY4kyqPm3zoqXcuvawKeRetfiwPKfZze6ccmMi HG/mkHNsSaO3Ubo/a7ZBWqUFvrm7m0NpU5/J6OLkxdBlKJUQA9zezGFYCXfQ6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyBZl2pgMzWJm; Sat, 30 Sep 2023 02:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U2qFOO044399; Sat, 30 Sep 2023 02:52:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U2qFZm044396; Sat, 30 Sep 2023 02:52:15 GMT (envelope-from git) Date: Sat, 30 Sep 2023 02:52:15 GMT Message-Id: <202309300252.38U2qFZm044396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: ac695744e2cf - stable/13 - regcomp: use unsigned char when testing for escapes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: ac695744e2cfb461a64018276fb94999fb0cad9c Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ac695744e2cfb461a64018276fb94999fb0cad9c commit ac695744e2cfb461a64018276fb94999fb0cad9c Author: Christos Zoulas AuthorDate: 2023-08-30 20:37:24 +0000 Commit: Kyle Evans CommitDate: 2023-09-30 01:41:23 +0000 regcomp: use unsigned char when testing for escapes - cast GETNEXT to unsigned where it is being promoted to int to prevent sign-extension (really it would have been better for PEEK*() and GETNEXT() to return unsigned char; this would have removed a ton of (uch) casts, but it is too intrusive for now). - fix an isalpha that should have been iswalpha PR: 264275, 274032 Reviewed by: kevans, eugen (previous version) Obtained from: NetBSD (cherry picked from commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0) --- lib/libc/regex/regcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 791755ceb14d..42fa1b99e58e 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -828,10 +828,10 @@ p_simp_re(struct parse *p, struct branchc *bc) handled = false; assert(MORE()); /* caller should have ensured this */ - c = GETNEXT(); + c = (uch)GETNEXT(); if (c == '\\') { (void)REQUIRE(MORE(), REG_EESCAPE); - cc = GETNEXT(); + cc = (uch)GETNEXT(); c = BACKSL | cc; #ifdef LIBREGEX if (p->gnuext) { @@ -992,7 +992,7 @@ p_count(struct parse *p) int ndigits = 0; while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) { - count = count*10 + (GETNEXT() - '0'); + count = count*10 + ((uch)GETNEXT() - '0'); ndigits++; } @@ -1302,7 +1302,7 @@ may_escape(struct parse *p, const wint_t ch) if ((p->pflags & PFLAG_LEGACY_ESC) != 0) return (true); - if (isalpha(ch) || ch == '\'' || ch == '`') + if (iswalpha(ch) || ch == '\'' || ch == '`') return (false); return (true); #ifdef NOTYET From nobody Sat Sep 30 02:52:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyBZr3Grzz4v94s; Sat, 30 Sep 2023 02:52: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 4RyBZq5YYCz4Xmk; Sat, 30 Sep 2023 02:52:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696042339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdf5xnHoVLSLfJIDySijl8YmtDmHr3x7viAsQdqFFFI=; b=vqC22vTAHDuj8j1Hd7fFT9wJviVBG+35B5JEbJ5XTMYBVTIWqbwaEHpbVUxb+ql7na4Jve 3kltR7Oz4UMYN7kln2W7WkR0BeHDPjygBVS2ychyIb6R4nc5OGh/QNYKL/BKahNzZfh7OV XHLIeGXribMlvPfqscOaae5E5sVnb9QL6fqOMaUwHBAGdfga9TkUYaFAgxpmqzORrY+H9X ILPpVGWMKMfN//gOiMs1tMJf/AL3oi24zX2itUFOBCkaOzCOORpQLJqntlrp9UCKccKQ5Z tfZRB3jCnhlZtFmEd32d+4QjxbV+uHCu7jgvLoj4kYtDX6ho9EwAqFhfsjjWag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696042339; a=rsa-sha256; cv=none; b=kFRyI7r9en+FWVhxppPxe6pQpbDZLBcEWGVhNyjPzNkSvCyZt1Lywt0MzhXXmkpzPTR4Qv doGhmoZZ/T6h0Xh9kUOpqBxjJl3jIkrCy4Im5AQh6l/OOrZkiIMI3Xz/L9Zzf+u9rNI84I v+WOW8F1yQEZwb4dkkL2kg/aRIcxV3qQLx5x5gg7HS7cHhf63drXQsvXud8BeEd7R9USKb eUP7h3+GIcK7GswGeoSD76PYaYswscMMFk8d+Ygxh4HdbKfqmLdxzsGGZRsczLpwiddI2q jk+tHissRARUcfx4F19mMpWDnv3jpa1fHTfPOTsKCnT5b82oRbjTVVFYjQI39A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696042339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdf5xnHoVLSLfJIDySijl8YmtDmHr3x7viAsQdqFFFI=; b=DNScrleLPcp5aoV9zMT/kUjwFts1fIgl80sJilhWt5BHuqVvsSC8AWmTfXp1OCKe7QHFn0 1pBs+jFVixJFq3QId6bqDVdv1UjYn/hOCcCTmA1QwDFSZ5j+bvsCgvzQt6HzP3jQSb7pCQ Sx/mnRCT8qvSzBCygzCHs/2lEgkuPw7q5UhjhuVNHepqzdywtndFRPFjuxl7xGLctA+VLD DSMeKqzuG7Vk+242d0C7Pt81uL3lKt6n6lRDMZn+IIe6d+4tqdqRf70o2kO9l+7niHAzeM GcFLrz8eFrhJXnyaYqJSxDc4GJpb7CYoAgLNkT5beiT/Wcr1j/15d10TB/9NvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyBZq4bkDzVl2; Sat, 30 Sep 2023 02:52:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U2qJdB044563; Sat, 30 Sep 2023 02:52:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U2qJ78044560; Sat, 30 Sep 2023 02:52:19 GMT (envelope-from git) Date: Sat, 30 Sep 2023 02:52:19 GMT Message-Id: <202309300252.38U2qJ78044560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 56b09feb23d9 - stable/14 - regcomp: use unsigned char when testing for escapes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 56b09feb23d98fcd0c4aed8d4f907a5a2f6b5ea9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=56b09feb23d98fcd0c4aed8d4f907a5a2f6b5ea9 commit 56b09feb23d98fcd0c4aed8d4f907a5a2f6b5ea9 Author: Christos Zoulas AuthorDate: 2023-08-30 20:37:24 +0000 Commit: Kyle Evans CommitDate: 2023-09-30 01:40:59 +0000 regcomp: use unsigned char when testing for escapes - cast GETNEXT to unsigned where it is being promoted to int to prevent sign-extension (really it would have been better for PEEK*() and GETNEXT() to return unsigned char; this would have removed a ton of (uch) casts, but it is too intrusive for now). - fix an isalpha that should have been iswalpha PR: 264275, 274032 Reviewed by: kevans, eugen (previous version) Obtained from: NetBSD (cherry picked from commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0) --- lib/libc/regex/regcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 791755ceb14d..42fa1b99e58e 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -828,10 +828,10 @@ p_simp_re(struct parse *p, struct branchc *bc) handled = false; assert(MORE()); /* caller should have ensured this */ - c = GETNEXT(); + c = (uch)GETNEXT(); if (c == '\\') { (void)REQUIRE(MORE(), REG_EESCAPE); - cc = GETNEXT(); + cc = (uch)GETNEXT(); c = BACKSL | cc; #ifdef LIBREGEX if (p->gnuext) { @@ -992,7 +992,7 @@ p_count(struct parse *p) int ndigits = 0; while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) { - count = count*10 + (GETNEXT() - '0'); + count = count*10 + ((uch)GETNEXT() - '0'); ndigits++; } @@ -1302,7 +1302,7 @@ may_escape(struct parse *p, const wint_t ch) if ((p->pflags & PFLAG_LEGACY_ESC) != 0) return (true); - if (isalpha(ch) || ch == '\'' || ch == '`') + if (iswalpha(ch) || ch == '\'' || ch == '`') return (false); return (true); #ifdef NOTYET From nobody Sat Sep 30 04:38:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyDxl59dmz4vXRr; Sat, 30 Sep 2023 04:38: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 4RyDxl4Nqyz4k46; Sat, 30 Sep 2023 04:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696048731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2mOetfhiGrGtaXZ3SLSdcPfpGQJ2BLHzL6YEtSUIylI=; b=Kxf0WbFbFItQJ/dsSEIKgAmyXMLUjBHnSNWS7Gn/WlWd7GG8jneMJLMYbPyz9FMlMrHy2X WrhRnmYiwvN/LyRs1XGRvWLus0CzfVxbe4dy2KLnki8wGGMAR0DQgpk4dxLn3ztfCAe5Im R550hw4GQ0VmVN3dAe06YAwsBIzbewP3HZJiI5eQcohGXipAhGK8WtCwLdHHpXwSMLWpLD +vu+m+E3VpX9g/HeM/vdN9mZh5E63LYG0r10ifwsXEJ3sXF/fYY0sqBm1N1H0nRBR2PP/u 9oFgyZ49L1JVyFw/DLlZyS0IV2It0WPwt+xMnOchkMxLlFsBZW0bYVpZNyIRmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696048731; a=rsa-sha256; cv=none; b=j7AhaaMvSe+UpqOb1BCWN8O7oazaqy/A+zg+0LHYqyP6+hTAWbKmY394hE+fvN3R6Nhtxe JDBjy74C4WOmFoLd8n1KiIFDKoaZBJqA9AGECNh5GCt6SzgKeXAdG/txjuJj2VpIrgZ4FK ey7jAhpt8TRIqPt45BFyRvA+++hoLYcrnoqOhP4pruk+G4tedKxujsDhtbBFX/+fU6j6GP ZuZ2K5mKP7svhIuGBUWf5sl3rsqEmQ33tko8s9vpsgNaaViQUCIEWxyPBBrLIz0HPQWyUX 2yjM60x9g9XWs0JF8voVrTITUO1c1IYhlQJPck5MnIdrMd8gzaGG0jiDYhOu7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696048731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2mOetfhiGrGtaXZ3SLSdcPfpGQJ2BLHzL6YEtSUIylI=; b=wK6tborhi2bat6UonyxG5Erx9sBd9YnCWKKfgVwHn5u8QnySUpvYJ0yCK+QDAcZ0V6a/u4 klUXPpFoI5b3OLvD4Oy78k8qCgUvK+HuRnKO1cOAFIHDMASFd7mCBcx5Pa4iCqV4yD69xP RYKvCz59zWQLIYGQPackOPC0IWd9ZT6UL6HbQh8L+x/QDWMn/U83xD8D4ThEFDtbmgYTGf vgyenv26RkXEfi8bI00UN4iVfVxJHG/P44yI70qHWhJNUwHTrN8xKlQJGf2pc7Qp4+vfyV yj+mi9Vyh5IOW7JELrRpVJrliKwOAprSfRCSsKZszHsD75IoVZrc4DDHNmg6Sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyDxl3SFWzZ26; Sat, 30 Sep 2023 04:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U4cpgu015257; Sat, 30 Sep 2023 04:38:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U4cph3015254; Sat, 30 Sep 2023 04:38:51 GMT (envelope-from git) Date: Sat, 30 Sep 2023 04:38:51 GMT Message-Id: <202309300438.38U4cph3015254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: fc424de7e192 - stable/14 - vfs cache: Drop known argument of internal cache_recalc_neg_min() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: fc424de7e192bb33793ba1f7ed0c75b961809bf4 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fc424de7e192bb33793ba1f7ed0c75b961809bf4 commit fc424de7e192bb33793ba1f7ed0c75b961809bf4 Author: Olivier Certner AuthorDate: 2023-09-22 21:25:41 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-30 04:37:14 +0000 vfs cache: Drop known argument of internal cache_recalc_neg_min() 'ncnegminpct' is to be passed always, so just drop the unneeded parameter. Sponsored by: The FreeBSD Foundation Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D41763 (cherry picked from commit 02ef039c284b8a7b1ea40f5f9a851a3cb6af5b31) --- sys/kern/vfs_cache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 0f4d7526ebb5..fdfa4fde2c07 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -990,10 +990,10 @@ SYSCTL_PROC(_vfs_cache, OID_AUTO, nchstats, CTLTYPE_OPAQUE | CTLFLAG_RD | "VFS cache effectiveness statistics"); static void -cache_recalc_neg_min(u_int val) +cache_recalc_neg_min(void) { - neg_min = (ncsize * val) / 100; + neg_min = (ncsize * ncnegminpct) / 100; } static int @@ -1012,7 +1012,7 @@ sysctl_negminpct(SYSCTL_HANDLER_ARGS) if (val < 0 || val > 99) return (EINVAL); ncnegminpct = val; - cache_recalc_neg_min(val); + cache_recalc_neg_min(); return (0); } @@ -2652,7 +2652,7 @@ nchinit(void *dummy __unused) VFS_SMR_ZONE_SET(cache_zone_large_ts); ncsize = desiredvnodes * ncsizefactor; - cache_recalc_neg_min(ncnegminpct); + cache_recalc_neg_min(); nchashtbl = nchinittbl(desiredvnodes * 2, &nchash); ncbuckethash = cache_roundup_2(mp_ncpus * mp_ncpus) - 1; if (ncbuckethash < 7) /* arbitrarily chosen to avoid having one lock */ @@ -2796,7 +2796,7 @@ cache_changesize(u_long newmaxvnodes) } } ncsize = newncsize; - cache_recalc_neg_min(ncnegminpct); + cache_recalc_neg_min(); cache_changesize_set_new(new_nchashtbl, new_nchash); cache_unlock_all_buckets(); cache_unlock_all_vnodes(); From nobody Sat Sep 30 04:38:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyDxm6WS6z4vXPS; Sat, 30 Sep 2023 04:38: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 4RyDxm5MVkz4jlY; Sat, 30 Sep 2023 04:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696048732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hE3JxeOg7Iy9XNvcRSANTh888FN6zwJhREUiVXSr+Bg=; b=Fe9fx94Np6cwrfUs54PHc9IZY8E3rbGJfhP8IEan2e1cC/ZLbmqIdVQUG/rcolzNL8+jqO vaRPc8kMVl7HkyR/PGUyUjlkVsNKRrDGuGv6bDtAuE2R1nbHp+/Aoxau+tDwH5h1j6vXyn n6k0dZREhsdcSfG4c9t8hEh0SFO19E9zNfsGd7MP3U1yPZKgn0CffpShSVecqwq1cOJCbs F5FU/GHUhG0lUlxdEOu1Vemi5b2LNBSUqr9CoyhvSlYVV3bnoiIFrfZKlsjcBCx+5D3Rxp xoQP1S/CQsOH5wVlAVZ0ua4EUN4OECJHe7dQkYZxDly4/wfzSiIdn3Zp633/EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696048732; a=rsa-sha256; cv=none; b=Hi6zFxusJXZtD0nJI6N58x+S7kfbX/qqbLl8KdFte0EaLBX3PTxZKH5VyIvDHBShcPhAxE DQONuFdjPk1fq/K01rtYTTqVn8v++ti6H5ySCvTgEB070AxK+xV4R2YkX6ElXJd6DrpEmT qxSAwAtCWlvoHESQjd9BQKjR+4OW+WuI/z9TWxkwq/efuQx3wiiw9M5q2+OdOPg67o+LKI 4TG1ju2dflnzMDLXdzc+Pskrr1S0ovTwukjJryxx/OCD6qQejqM/nmJN+4yS9yG2bE+EPC ENaeV0RqJ8+wAAGJpd8LBXaqPeK6JdNoT2Z7mFhcUCvDWnZC6Omdsn0ePy3XSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696048732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hE3JxeOg7Iy9XNvcRSANTh888FN6zwJhREUiVXSr+Bg=; b=MIcxx8DYCarPp0LsGGFiAi7j0uJbrF6oXq4NwumRVXzZcE5f9D+8kpTMusQX0FBZsJNjGb SYKxCrjhGeHMPSM9ngVdCOyTLqm1NOJq/7xQ0IWMEi3PeKU0j0QlT2kIWgcNXe9u+pdXOU psgTdqfDDmKn4e8UQeoPukejsYa4WdS4/MuXw02LbrJ4B6LBZPb8FvzJSk/BkJ18n7XxhL zdMwej9mo8mQYr73FpYY3NkhWXpwuDtYWMZVT5USVOwjvvrM/9iVpRCHAvKgaOrTQ5/c5a aY1dsnhB03MIhAF7D44/8iWf7TnFJO/WhcEbold+FBnYA6lb4Qd/nsZopBmvmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyDxm4CSzzYRZ; Sat, 30 Sep 2023 04:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U4cqUl015303; Sat, 30 Sep 2023 04:38:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U4cq68015300; Sat, 30 Sep 2023 04:38:52 GMT (envelope-from git) Date: Sat, 30 Sep 2023 04:38:52 GMT Message-Id: <202309300438.38U4cq68015300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 3f4e6aa2ae7c - stable/14 - vfs cache: mark vfs.cache.param.size as read-only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f4e6aa2ae7c5d7b086f76e7ec445ec71a60a627 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3f4e6aa2ae7c5d7b086f76e7ec445ec71a60a627 commit 3f4e6aa2ae7c5d7b086f76e7ec445ec71a60a627 Author: Mateusz Guzik AuthorDate: 2023-09-22 21:32:23 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-30 04:37:14 +0000 vfs cache: mark vfs.cache.param.size as read-only It was not meant to be writable and writes don't work correctly as they fail to resize the hash. (cherry picked from commit 33fdf1afaea931eaa5dd14e6c097d7ffafe2fb1a) --- sys/kern/vfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index fdfa4fde2c07..1edd8fad0e89 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -405,7 +405,7 @@ static SYSCTL_NODE(_vfs_cache, OID_AUTO, param, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Name cache parameters"); static u_int __read_mostly ncsize; /* the size as computed on creation or resizing */ -SYSCTL_UINT(_vfs_cache_param, OID_AUTO, size, CTLFLAG_RW, &ncsize, 0, +SYSCTL_UINT(_vfs_cache_param, OID_AUTO, size, CTLFLAG_RD, &ncsize, 0, "Total namecache capacity"); u_int ncsizefactor = 2; From nobody Sat Sep 30 04:38:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyDxp03spz4vXX8; Sat, 30 Sep 2023 04:38: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 4RyDxn6PR0z4kGJ; Sat, 30 Sep 2023 04:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696048733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IiqUmVgwbgomFeWe3dpR5dc5qXeYKoVItEIM41GiA+I=; b=POYodALVaowhocQ3mvFCq2CVqF4cASjYCgguSeBTZnrR+Zwc2CIx+vJ+X1EFYIjDci9ZS7 kGvL6k4xULqUbKW0NjEWbrtSTv2efflAH5IAWE/0zWOT3rDUFlvm0N7Bb2HMcgG+itWwkD ysFCPAi/0q07Yhofk6qPXKAzvvb+PbPXkXoFghXJpzptvabBE3mrB+KhFd7Kd8EjQot2Xv CzqdeGJH5usj6HIPOvMEIYJ3AThwlF+zpVnBX/5rPdG1y535DUkeX99bt7xsUe+IkT0W/z VxGy0vilmrce9UShMz8ns/JBu7M/gppH8cVGOlMtoQflNEM1b7HD7CEoKr6Azg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696048733; a=rsa-sha256; cv=none; b=MZiUoHHVZI0OmqOlgSgdzTnmL5U9RugwL2cnjdS5TwbD0BEy3e8MPvnnWUcSsQpE5YN76C EZF2blGYVFibNIDcmp7xXB4bPBophbZVczJTSeEhN5TVkE/y9WX8ACcYsr4zM1dRI4swkY TnScI+evRT8+RfvTEc/VjKHIh9BjSXIk0xnCJj06ZpKlQJmpGHQM5klWmjV1AAUqOWys7G HlByx/ZSdSV/b4XMVSRNBstBQMpVvkzA4eMS0hrDIk13rzw1X1eqQHEvSJudkJeM0skS+h 0YLBV9clnQlfIyySE7W3BmGfpUVA9IDuquGYki2jX/qUBytYjCS+WNNrtV/Swg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696048733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IiqUmVgwbgomFeWe3dpR5dc5qXeYKoVItEIM41GiA+I=; b=eqHEV8tYY1dSQgcaaiG3S25sp45l7+ueblCXQOIKzNH1F2WMLjXlDebp+cCDM87PgxNloN t6WYyDNCShHpkshnwUHqChxVDyC1K9gTj3d5mFm4ju0avVUG8EDAmIQfh46pZDvH+7UPvF FYX0XTid5H9dmQwKmXhTVtYep94xrLHekMvOt4OmvPj/Sg8NE1aY/rocZtYG4WPDbajTba F9QnznRuL8tHxP9jR+pAB8benNnpNJZuVtbf5mua5YLFxq8ptaAuPhsia0l8YFwxLREBOC zkkl2NyuRC04zc2ACm+A76QR44RG4Sr/4u/1kARi72xp5Wv+QUtHrh5343AyKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyDxn5VdXzYwK; Sat, 30 Sep 2023 04:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U4crOE015351; Sat, 30 Sep 2023 04:38:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U4crM8015348; Sat, 30 Sep 2023 04:38:53 GMT (envelope-from git) Date: Sat, 30 Sep 2023 04:38:53 GMT Message-Id: <202309300438.38U4crM8015348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 0cf6ebad7364 - stable/14 - vfs cache: retire dothits and dotdothits counters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0cf6ebad73640a20fe99adacba635e2630be5d08 Auto-Submitted: auto-generated The branch stable/14 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0cf6ebad73640a20fe99adacba635e2630be5d08 commit 0cf6ebad73640a20fe99adacba635e2630be5d08 Author: Mateusz Guzik AuthorDate: 2023-09-23 00:08:49 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-30 04:37:14 +0000 vfs cache: retire dothits and dotdothits counters They demonstrate nothing, and in case of dotdot they are not even hits. This is just a count of lookups with "..", which are not worth mentioniong. (cherry picked from commit bb124a0f611a1288c8496e3b33494f23ba929ca1) --- sys/kern/vfs_cache.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 1edd8fad0e89..12b9f2d74641 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -530,8 +530,6 @@ STATNODE_ULONG(neg, numneg, "Number of negative cache entries"); STATNODE_ULONG(count, numcache, "Number of cache entries"); STATNODE_COUNTER(heldvnodes, numcachehv, "Number of namecache entries with vnodes held"); STATNODE_COUNTER(drops, numdrops, "Number of dropped entries due to reaching the limit"); -STATNODE_COUNTER(dothits, dothits, "Number of '.' hits"); -STATNODE_COUNTER(dotdothits, dotdothits, "Number of '..' hits"); STATNODE_COUNTER(miss, nummiss, "Number of cache misses"); STATNODE_COUNTER(misszap, nummisszap, "Number of cache misses we do not want to cache"); STATNODE_COUNTER(poszaps, numposzaps, @@ -1782,7 +1780,6 @@ cache_lookup_dot(struct vnode *dvp, struct vnode **vpp, struct componentname *cn int ltype; *vpp = dvp; - counter_u64_add(dothits, 1); SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp); if (tsp != NULL) timespecclear(tsp); @@ -1827,7 +1824,6 @@ cache_lookup_dotdot(struct vnode *dvp, struct vnode **vpp, struct componentname return (0); } - counter_u64_add(dotdothits, 1); retry: dvlp = VP2VNODELOCK(dvp); mtx_lock(dvlp); @@ -5131,7 +5127,6 @@ cache_fplookup_dot(struct cache_fpl *fpl) fpl->tvp = fpl->dvp; fpl->tvp_seqc = fpl->dvp_seqc; - counter_u64_add(dothits, 1); SDT_PROBE3(vfs, namecache, lookup, hit, fpl->dvp, ".", fpl->dvp); error = 0; @@ -5220,7 +5215,6 @@ cache_fplookup_dotdot(struct cache_fpl *fpl) return (cache_fpl_aborted(fpl)); } - counter_u64_add(dotdothits, 1); return (0); } From nobody Sat Sep 30 06:54:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyHy175KCz4vhJb; Sat, 30 Sep 2023 06:54: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 4RyHy16kVkz4sZJ; Sat, 30 Sep 2023 06:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696056857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vbMCANWs+yJHsAIPm14xX+eYZIoQnydsRBnTYDGrL/4=; b=EIM7z890VWsKHNBnnr+Ez7t2k/HJjYtdHW0o6MPnrj51J0H2YW9yXAS/V5p7fBUduv49E0 IMJlasTm2i4K+TjrJhcEm0iLTgCkH1SuaqhC8Ja48gc03zcNwKPK86hkXkYYgdlTYCu0Mq f0VqvkaY4Ze5l72qFi5iLfxXDpp5SH9Amd81yuye9E10UpQ9aMBMbUDFa7dADeWtvIrYJS Ur3uLUSWYiCQWkfE1bymO9ZyRBktRedVbbRfJmUzR73fFNIts8aE5IT0cgpG5OI/giEIO7 aDbZP3SJHAkFP4iCiwyw1bEC517s1wvPD1UBspI06XPr3LE3QdE80m8MYlyoLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696056857; a=rsa-sha256; cv=none; b=h3Qil9CwVwia46fLw3vTUWIUuoPSGBndbcP2zq1sRqU0d7jGa5qT96xvUyQR5iNk2eeZzu tp0pLIN8GymlFuCr3jnCG+yepjoCqZqSq11OiN668A3SenPdBtLn1kXUZ7FYCmep9oKE8C mfTFdZDzosBQerPVFyAlx1rDPCA0AX/xlSXORIlArDzuseD4k0CnSHbZKvxOmG02GBnwVJ f+9sSueKGrao9VRSSc5ZUwTPKlx9sFp0eVkrKbpRjKxGkV5xrrlNalLhOqrDRwjIRpUIvB NJX6CgR1m+idGuDE7+fkJJGqc/vzHOvxddYinajQQwNZ8CCssVTJFJtoEgYtyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696056857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vbMCANWs+yJHsAIPm14xX+eYZIoQnydsRBnTYDGrL/4=; b=mcMHeNcdG+HfIP0AZFWH5eWLfTfUvzEEFWFpFt1KPQhsplxTTRFrlXXiKZqntkMa6Np0gs OxjzFZ2ve82+RKElWU4uoy0z/ImjxEG2u8eLHazgxX+pZMKS4TBvICUq4kcarch7oeDS94 M9VRtzRhaND7f4Zd7IFSzCXx8NbDIF/XF7il8/kSX7JE42FbQf7FrhTV9shg3DXErM3Ah1 1Wb9AuE7hmIGxE7Qd7PFm5zrHlgz68bji4AXpxEwiOK5VzU2aQmkbauuNgOI+Kg7Do3dcI kdQVx79z4RqtpP4ycyXFfbUh/wWCY9lmfmJ+aOEQQIaGgAaA7XN7EYwvyKFY1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyHy15ks9zcqc; Sat, 30 Sep 2023 06:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U6sHuK046433; Sat, 30 Sep 2023 06:54:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U6sCAU046417; Sat, 30 Sep 2023 06:54:12 GMT (envelope-from git) Date: Sat, 30 Sep 2023 06:54:12 GMT Message-Id: <202309300654.38U6sCAU046417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: d9a61490b098 - stable/13 - zfs: merge openzfs/zfs@eb62221ff (zfs-2.1-release) into stable/13 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d9a61490b0988b1187ea169e538762f70dfaeb12 Auto-Submitted: auto-generated The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=d9a61490b0988b1187ea169e538762f70dfaeb12 commit d9a61490b0988b1187ea169e538762f70dfaeb12 Merge: ac695744e2cf eb62221ff0f9 Author: Martin Matuska AuthorDate: 2023-09-30 06:52:40 +0000 Commit: Martin Matuska CommitDate: 2023-09-30 06:53:32 +0000 zfs: merge openzfs/zfs@eb62221ff (zfs-2.1-release) into stable/13 OpenZFS release 2.1.13 Notable upstream pull request merges: #14828 d91778e31 Remove duplicate code in l2arc_evict() #14939 425f7895d Fix the L2ARC write size calculating logic #14954 c12b5829e Fix the L2ARC write size calculating logic (2) #14963 f28cd347c Store the L2ARC device ashift in the vdev label #14981 ef2156c66 Shorten arcstat_quiescence sleep time #14987 cb549c742 Fix memory leak in zil_parse() #15000 6e79bcd35 Fix remount when setting multiple properties #15039 e01e3a4e1 Fix raw receive with different indirect block size #15084 846a4cc08 zed: Fix zed ASSERT on slot power cycle #15094 1abf68b7a zed: Reduce log noise for large JBODs Obtained from: OpenZFS OpenZFS tag: zfs-2.1.13 OpenZFS commit: eb62221ff0f9efbc2ab826ec6f1388c5f05fb664 Relnotes: yes sys/contrib/openzfs/META | 4 +- sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 2 - sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 5 + sys/contrib/openzfs/cmd/zed/zed.d/Makefile.am | 2 + .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 64 ++++++++++ sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 5 + sys/contrib/openzfs/config/kernel-blkdev.m4 | 138 ++++++++++++++++++++- .../config/kernel-block-device-operations.m4 | 35 +++++- .../openzfs/config/kernel-filemap-splice-read.m4 | 25 ++++ .../openzfs/config/kernel-register_sysctl_table.m4 | 27 ++++ sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 +++- sys/contrib/openzfs/config/kernel.m4 | 4 + .../openzfs/contrib/bash_completion.d/zfs.in | 2 +- .../include/os/linux/kernel/linux/blkdev_compat.h | 17 +++ .../openzfs/include/os/linux/spl/sys/types.h | 2 +- sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 ++ sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 7 +- sys/contrib/openzfs/module/lua/lfunc.h | 4 +- sys/contrib/openzfs/module/lua/lobject.h | 4 +- .../openzfs/module/os/freebsd/zfs/zfs_debug.c | 4 +- .../openzfs/module/os/linux/spl/spl-kmem-cache.c | 12 +- sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 77 ++++++++---- .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 ++++++++-- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 36 +++++- .../openzfs/module/os/linux/zfs/zfs_debug.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 2 +- .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 15 ++- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 ++++- sys/contrib/openzfs/module/zfs/arc.c | 73 ++++++----- sys/contrib/openzfs/module/zfs/dmu_recv.c | 22 ++-- sys/contrib/openzfs/module/zfs/dnode.c | 31 ++--- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 3 + sys/contrib/openzfs/module/zfs/zil.c | 8 +- sys/contrib/openzfs/module/zstd/Makefile.in | 2 +- sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 45 +------ .../openzfs/tests/test-runner/bin/zts-report.py.in | 64 +++++----- .../openzfs/tests/zfs-tests/include/libtest.shlib | 2 +- .../functional/l2arc/persist_l2arc_001_pos.ksh | 19 ++- .../zfs-tests/tests/functional/trim/trim_l2arc.ksh | 2 +- sys/modules/zfs/zfs_config.h | 35 +++++- sys/modules/zfs/zfs_gitrev.h | 2 +- 43 files changed, 721 insertions(+), 219 deletions(-) diff --cc sys/contrib/openzfs/cmd/zed/zed.d/statechange-slot_off.sh index 000000000000,150012abe71a..150012abe71a mode 000000,100755..100755 --- a/sys/contrib/openzfs/cmd/zed/zed.d/statechange-slot_off.sh +++ b/sys/contrib/openzfs/cmd/zed/zed.d/statechange-slot_off.sh diff --cc sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 index 000000000000,4c83b31d738a..4c83b31d738a mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 +++ b/sys/contrib/openzfs/config/kernel-filemap-splice-read.m4 diff --cc sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 index 000000000000,a5e934f56d29..a5e934f56d29 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 +++ b/sys/contrib/openzfs/config/kernel-register_sysctl_table.m4 diff --cc sys/modules/zfs/zfs_config.h index 53d6e0d6e52e,000000000000..95886fc74c39 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1055 -1,0 +1,1082 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + ++/* blkdev_get_by_path() exists and takes 4 args */ ++/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ ++ +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + ++/* blkdev_put() accepts void* as arg 2 */ ++/* #undef HAVE_BLKDEV_PUT_HOLDER */ ++ +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + ++/* blk_mode_t is defined */ ++/* #undef HAVE_BLK_MODE_T */ ++ +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + ++/* BLK_STS_RESV_CONFLICT is defined */ ++/* #undef HAVE_BLK_STS_RESV_CONFLICT */ ++ ++/* Define if release() in block_device_operations takes 1 arg */ ++/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ ++ +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + ++/* copy_splice_read exists */ ++/* #undef HAVE_COPY_SPLICE_READ */ ++ +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + ++/* disk_check_media_change() exists */ ++/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ ++ +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #define HAVE_IMPLICIT_FALLTHROUGH 1 */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + ++/* iter_iov() is available */ ++/* #undef HAVE_ITER_IOV */ ++ +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* kernel has asm/fpu/xcr.h */ +/* #undef HAVE_KERNEL_FPU_XCR_HEADER */ + +/* kernel fpu and XSAVE internal */ +/* #undef HAVE_KERNEL_FPU_XSAVE_INTERNAL */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + ++/* register_sysctl_table exists */ ++/* #undef HAVE_REGISTER_SYSCTL_TABLE */ ++ +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->read/write_iter() are available */ +/* #undef HAVE_VFS_RW_ITERATE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* yes */ *** 206 LINES SKIPPED *** From nobody Sat Sep 30 08:22:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyKwM08RLz4vmyV; Sat, 30 Sep 2023 08:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RyKwL5FKyz3HGh; Sat, 30 Sep 2023 08:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696062178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqREi3NgrgEMgVqebzuvilEFipwAe1J09DQAQm1oeYA=; b=ymvR/cSYI9xgMDDwSGfirnJBvlLyYsZoKMxWb3M7sYF1xyiVPeHj+n2WloT3GKD3zKZXlT v3KmvBDUqRySBsDehquU796zplGCZjUOn1/95D7j7M2H/s5NQFE/lNmpO1Rfue5uwmfO85 Kp/x+oEhwqNUp5agp5lQo1RadCgfjTEVDDqw3EI6wW8sZdH8Es08MzWY0tnjjvChiMRqR1 Ve6FtZghBXgWmu1xGByNDBoXawpQtqO73AUAUTM7KawgiVNOiIFegtOc4S3YiGycHPu2Vu Qb/p03eVF5mBLMWOFIl6q/dcNxzc0RUnnEsmRloxzTxfISN7G/MslDCZjc6z8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696062178; a=rsa-sha256; cv=none; b=lb3sjwrX+ZSRKZALQ9dB0zw4RAqxcxtakyhUsOVpJX28VEGHza7QwL0tlnuObKXQzYuXUL fid8GQXVIBjnBb570zuY+3g1axihXoBksbnb1koWh7shq1l0vvTVJk/yZPOiNLLuZKprWC j7MmgHRnATnlrrfa+++l+ghE6HsN9vPwcWbtrkOerxli05zJBDViS1TraNT4wL82NfGpGH fle0N4HsjSOl5DBslW79ENIHULlz3vdO8OVlrxESqI0PbxG8ZJgt/Ge3tUtbCOzoEgO9Xd bJk/ja56Q/IIPbnzk3kZnMCG48IrbQKfY0PXVQWjlHEDM/SWftfZ6lHREnYbfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696062178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqREi3NgrgEMgVqebzuvilEFipwAe1J09DQAQm1oeYA=; b=g7eA6eAqYc8C9wDOSO1/xo7jVhKVyVGcBd4LpgC1mN8nDA9dclfnlnZpeSsyBvM96sSo9X QV04WYPbGrb80UDhCf2tbRC9YcZG/DfN+dP6Tuf9AqEiLx60ddYcfm2CsHHYqx7oGG7ddH +4oTVYs6wYkk+101LWpYCkQ+wh6bFpjFD/yuCjdXjhsQbqdHE3Y63fRZbn4l1+h+/Z/c1u ArkDcMAZne01nbgG2OrXjUQdD2hlGIr5kIdcWvMJC8iaC44qy2EZW8P3LPFxGl1qaUTyZ+ b6zYpQkyw4dHWKW4ybYRd7mTR0wdvBqJu3BNmgHcVTe+2jhQIovteI9IF14Gmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyKwL44tzzgM8; Sat, 30 Sep 2023 08:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U8MwDV097212; Sat, 30 Sep 2023 08:22:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U8Mw77097210; Sat, 30 Sep 2023 08:22:58 GMT (envelope-from git) Date: Sat, 30 Sep 2023 08:22:58 GMT Message-Id: <202309300822.38U8Mw77097210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 16e688b2a403 - main - LinuxKPI: 802.11: fix problem removing sta List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16e688b2a403a3dbc05de3b9f8a3132838613790 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=16e688b2a403a3dbc05de3b9f8a3132838613790 commit 16e688b2a403a3dbc05de3b9f8a3132838613790 Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 07:59:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-30 08:19:19 +0000 LinuxKPI: 802.11: fix problem removing sta Move the call to lkpi_disassoc() before the state change to IEEE80211_STA_NOTEXIST which will remove the sta (from firmware). Based on a comment it seems that originally we had to do it the other way round. iwlwifi(4) has a check and will silently not remove the sta from the firmware when vif->cfg.assoc is still set (see iwl_mvm_sta_del()). This leads to the LinuxKPI 802.11 code thinking the sta is gone as downward state changes by the mac80211 op (*sta_state)() may not fail. Once we try to assoc with a newly added station later, iwlwifi firmware will run into an assert having two ap_sta set on the same vif. We can observe that problem in iwlwifi(4) having __le32 sta_id = 1 instead of sta_id = 0 in iwl_mvm_sta_cfg_cmd{} on the HCMD. This should fix one of the most seen problems with iwlwifi(4), e.g., when running service netif restart wlan0 or service wpa_supplicant restart wlan0. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 37 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 41b13fc9269f..229c73732ee4 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1426,6 +1426,15 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + */ + lkpi_disassoc(sta, vif, lhw); + /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " @@ -1435,15 +1444,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i IMPROVE("do we need to undo the chan ctx?"); goto out; } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* We need to do this now, can only do after sta is IEEE80211_STA_NOTEXIST. */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); bss_changed = 0; @@ -1887,6 +1889,13 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* + * One would expect this to happen when going off AUTHORIZED. + * See comment there; removes the sta from fw. + */ + lkpi_disassoc(sta, vif, lhw); + /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " @@ -1896,18 +1905,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int IMPROVE("do we need to undo the chan ctx?"); goto out; } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); bss_changed = 0; From nobody Sat Sep 30 15:28:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RyWMZ0fWrz4vTQL; Sat, 30 Sep 2023 15:28: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 4RyWMZ06RMz4Q9L; Sat, 30 Sep 2023 15:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696087722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8N6x86FrkbJfuLJjXo4U4pV2groWwzy7+cClV97PmAo=; b=eyOST6QXJUd424bXgXTodyudXqyJkxpM7KhUIJl2EKIweNLWweV6/1jmaGlgDwHlNRs8AG eGQJ8ZaifN4PfzC94m0f9ngDQD38Omr05VS/NZWPf4I9h3aDNjrJQtr8I0mTX2nUFJbc/M cmSlhtwHVlNxyy0/5LtkNvzJnBeNgiRdjvXI5EptB5VcMSGRPF4oop3N0NugDfJ5pk41Nj w2Sqnv1t4C2bdNuoKT9900mZwvRFjxmcHRds5PFQQpBHzCbGr/xANqPvlh/xFJBpGk5ypH DFgZUraXVb7lpQWPmHo+DS1Ta+TVT2vFfzyf76VvTYJqYQJzWFH+K9DUfaxCmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696087722; a=rsa-sha256; cv=none; b=IByu5/IjLjry9V9PesR5kE7Jk1M7gLie/ggxHzfgTR/v8YLF4Ek+z9SD78JH/B4iUnvqKG a8xgdv8u7nZVE502dhculFpGcvF1m5ruS9Qyn8WpSN97fCmaLGWUpeDMKlBSLQngSWkbOO xYbQEromtADXyDNi6dS5le2ywTNnle6Ekd41TGu7toKD1GPfZ4gvSsUtlhOmIpUxqJPapN oEseGAtOBg/56J/cfcT3A/cxs7WeNWaqhCIJLRiJymJyDsf4nuDTRN864MuUA5y7IMqC8h pUhDLUlKal2SaqRGqD/P6blOJ4FvLdoHKyjRkrUf2qYGgXFmeRdz8Ir2RVbwJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696087722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8N6x86FrkbJfuLJjXo4U4pV2groWwzy7+cClV97PmAo=; b=jb4iNBTuwza9ISGCz3MqR4oMxg7nDrmiEyn0tWWZDJaA2Tw0IkmaczESHItsj3LKUOMj6W 3eu71YyjRsueZTT9DiHxKV+TKk7r2DoCGitlY5qPauK93NnMARrSJdbreS+MQmB7yoxDI4 1ar7yCdsh7vOGIxvuRujedp4Fcg1mrt/kGDEsqstULQnWMqvixd4PcRXJYcHyoFi+GA/WD QP/+4W8wHeur5/TXIchbsCQQ3xT3aIeom6FbCKaq0+cfsUQ4KrlF2VCOqhObLbesdMhhGr O5FHHaBknxj9xmKhm7oZGW70VztrBGTKObA+CLMKJCnCV+ptoHsMJMSM60VsjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyWMY6GP0zsl6; Sat, 30 Sep 2023 15:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38UFSfRJ095045; Sat, 30 Sep 2023 15:28:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38UFSfLw095042; Sat, 30 Sep 2023 15:28:41 GMT (envelope-from git) Date: Sat, 30 Sep 2023 15:28:41 GMT Message-Id: <202309301528.38UFSfLw095042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: dbf7691999ab - main - LinuxKPI: 802.11: improve lkpi_ic_vap_delete() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbf7691999abe501e0ebc0fe4d8d9e97718d3890 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dbf7691999abe501e0ebc0fe4d8d9e97718d3890 commit dbf7691999abe501e0ebc0fe4d8d9e97718d3890 Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 15:20:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-30 15:27:05 +0000 LinuxKPI: 802.11: improve lkpi_ic_vap_delete() Changing the order of cleanup in lkpi_ic_vap_delete() will avoid firmware crashes or a direct panic as observed as ieee80211_vap_detach() will do most cleanup for us and get us into the correct state. The solution is not fully developed yet and one may not be able to create a new vap (lkpi_ic_vap_create may fail with error 17) afterwards. It is supposed to be a step towards more stability for now. Sponsored by: The FreeBSD Foundation MFC after: 3 days PR: 269842 --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 229c73732ee4..7565f491606b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2473,10 +2473,14 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) LKPI_80211_LHW_LVIF_LOCK(lhw); TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry); LKPI_80211_LHW_LVIF_UNLOCK(lhw); - lkpi_80211_mo_remove_interface(hw, vif); ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); + + IMPROVE("clear up other bits in this state"); + + lkpi_80211_mo_remove_interface(hw, vif); + mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); } From nobody Sat Sep 30 18:31:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RybQR00SCz4vgZg; Sat, 30 Sep 2023 18:31: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 4RybQQ6bkdz4fkT; Sat, 30 Sep 2023 18:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696098686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzKxeCB9LNSXj4+Ber+w70hNN6p9GjQTUL295xS3I7c=; b=Jh9CPm4raSwjEabFuZSTNLpFgQpt5aaYlNvfgxmCaxCnqN+B0Nq+Cc6pOTPhBNhRbOQHtp 3NFmfpHtsQVR1skCtUSRXqv0Cavp0i6VitgF6C8RVQcG+UmeQvZVeur4fEjujh6af5vp5M qfuPV+LQzzzHvHPSzNwG7TznyMNjWExoiLrUE5lmNf/p7nXohywSHUTEZLt05fFWYXuxVy xnFCSiU6N58j7NH67kgwGPthPBxmpeGToQORwJfZAGUu1R6avH/oGzpmA64fdx6z36q4hu yvbFz//I5J6qoTTc9BQdYYvU78AdSqW+AlkqD13njMtgGzUAPkmbFSygMPBL0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696098686; a=rsa-sha256; cv=none; b=WtuykOX1AEk1La75VUSRM9ErWuGnl7ggGLIiI1m4vh58BhpvZGZzZQQGeHkshUhsP5clpj sIL0GJ4ntAx29m3qG+ZQEmkj1/P4w0BUUm336DG/RtlyNVtxkG+gRG2iivCTLblQVesJvK fkunJ+8Aphr9vyiJgXpe4Woh7bp20c6f4IWXqWVDm3PnV0fZrtM6ergjHpXlFqBcxWFrDy 7KzADgcbBmrEdkIv09cLw/K++8u0vvgYU7mV6igczPp6mVt8cHQX+RhbYH8gSYzI0KzqZL irUftpg66AM9ffZwIDojdrNOgifcQ5GuBSEB8VXK0TL1wA+PVX+ZSC1DhUesTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696098686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzKxeCB9LNSXj4+Ber+w70hNN6p9GjQTUL295xS3I7c=; b=kcKLQ9VyzWazlO+uFg0NSbRqxX1dLOuMzjCblROvEmgc+FcZUPEE3tAqFLNPBi/0/w6ILs lWTSb0+9vnVwglPenyS7ejQWwD3augVyUK5bHi4e1rxPIIj6ckpzvY+rDVpBkSqfAxcAkH ssUbC33eQPZUiAnVtmFvEkVOFe32p8ZXMiq88QLpvM5iuQYsqwmSMxWuWJhdJMCZrKaazS Z8YfgRdrnur8n9OsjgdxHRMabwkKYElb8ktnff6mD1Vb1t3nve03IaPqqMYYyoxhgJvMuY Dp93edl7oUnaxVDLgFT3g5BNX749BN2q3Vjj15JEp60FrCY6DmfpkW9W8zh8SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RybQQ5M7kzy5D; Sat, 30 Sep 2023 18:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38UIVQu1007242; Sat, 30 Sep 2023 18:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38UIVQrc007239; Sat, 30 Sep 2023 18:31:26 GMT (envelope-from git) Date: Sat, 30 Sep 2023 18:31:26 GMT Message-Id: <202309301831.38UIVQrc007239@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: 8a77bc5e1be1 - main - makefs/zfs: fix build with gcc 12 after b5a2bf512dbe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8a77bc5e1be1a999f2f8d9df0c01fe01fb5a0787 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8a77bc5e1be1a999f2f8d9df0c01fe01fb5a0787 commit 8a77bc5e1be1a999f2f8d9df0c01fe01fb5a0787 Author: Dimitry Andric AuthorDate: 2023-09-30 18:27:20 +0000 Commit: Dimitry Andric CommitDate: 2023-09-30 18:27:20 +0000 makefs/zfs: fix build with gcc 12 after b5a2bf512dbe Due to integer promotion rules, dn_nlevels (uint8_t) gets promoted to a plain int, resulting in -Werror warnings with gcc 12: In file included from /workspace/src/usr.sbin/makefs/zfs.c:35: /workspace/src/usr.sbin/makefs/zfs.c: In function '_dnode_cursor_flush': /workspace/src/usr.sbin/makefs/zfs.c:684:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare] 684 | assert(levels <= c->dnode->dn_nlevels - 1); | ^~ /workspace/src/usr.sbin/makefs/zfs.c:691:27: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare] 691 | if (level == c->dnode->dn_nlevels - 1) { | ^~ /workspace/src/usr.sbin/makefs/zfs.c: In function 'dnode_cursor_next': /workspace/src/usr.sbin/makefs/zfs.c:739:41: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare] 739 | for (levels = 0; levels < c->dnode->dn_nlevels - 1; levels++) { | ^ Fix it by subtracting 1U instead of 1. Fixes: b5a2bf512dbe MFC after: 3 days --- usr.sbin/makefs/zfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index db302fe1e760..b16a48564f04 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -681,14 +681,14 @@ _dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, unsigned int levels) off_t blkid, blksz, loc; assert(levels > 0); - assert(levels <= c->dnode->dn_nlevels - 1); + assert(levels <= c->dnode->dn_nlevels - 1U); blksz = MAXBLOCKSIZE; blkid = (c->dataoff / c->datablksz) / BLKPTR_PER_INDIR; for (unsigned int level = 1; level <= levels; level++) { buf = c->inddir[level - 1]; - if (level == c->dnode->dn_nlevels - 1) { + if (level == c->dnode->dn_nlevels - 1U) { pbp = &c->dnode->dn_blkptr[0]; } else { uint64_t iblkid; @@ -736,7 +736,7 @@ dnode_cursor_next(zfs_opt_t *zfs, struct dnode_cursor *c, off_t off) /* Do we need to flush any full indirect blocks? */ if (off > 0) { blkid = off / c->datablksz; - for (levels = 0; levels < c->dnode->dn_nlevels - 1; levels++) { + for (levels = 0; levels < c->dnode->dn_nlevels - 1U; levels++) { if (blkid % BLKPTR_PER_INDIR != 0) break; blkid /= BLKPTR_PER_INDIR;