From nobody Mon Jun 24 01:30:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W6r5D10Q8z5PQgt; Mon, 24 Jun 2024 01:30:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W6r5D05mxz4vm9; Mon, 24 Jun 2024 01:30:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719192656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ExxnRTehhsVo7PzHTfOAmKsX7GWlzc1q6k+ztXSWl+U=; b=mMTQt+5LqtglFyyo6pnJxUMcPAqgAVQnmY7GOT+yQgaSY2mqxltrSUHhk1FbVoTob+FvaW wXTVc2HkT7jT1k0dn840A7S9oCUrT5cyhmOlE1MnU95AvWyPqvY+yNDlNf/aBySHDVwcrW IjM2XInor5AvOHMLz30SG4NRV/G5d2Mao9g/bbHO7aT83r3fJ4gbfYGsu77A9OUj+GxI+P NCJ3Hx5q6daKe9nIJIhomD5KGOuG/LiFsIpkNblLVUh/BOpJwiebl5kBUUEKm0IwaZGoT+ 67Lx/NILfdJ134iReuJG7l/UxwFX4xxEcTgV7CskfTc884nQM06GNnlSVL0Bow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719192656; a=rsa-sha256; cv=none; b=Arv2lwqesB+Wy0xFYza6z3Jc3sb5XD5SFwwYHSy7MBgiieGxr2xuTcz7UWqGZq7dPAwoYx tVCUF9iYQ0YCZIcceuhoWhJQYecVTWPTB00ZG3OcHT+O4Lj5Z35uHB78v96RlGQ7jY5UXO iRlygVU6urLk9MvjvQ3P3cATTzVFpy0fxtoBr/z9wI6JifzcEkju54iU4/ZS1U4luOMbw0 fVAD9Rdv+Wmk0Rr7wxLyCHWkVIMU4fvIxtouZMKL8aE4aOZ9/RN2V7Jb1PfjtZI7STCOtY 5mKUvKDZcBWePZpeW8TT0KvBz52uAqW6vahZd/OTvNqmjzr8i6VjS2fkRhbe5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719192656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ExxnRTehhsVo7PzHTfOAmKsX7GWlzc1q6k+ztXSWl+U=; b=I9Am/lWkQ/0TCL406k5kr062pcfccuAkWXP5C8pjau1t3Aen60QrnZKfbR6uiqf71X2rg+ jtR77tcTGugXrbdFX/nZBhB0SjBFhZum4bCr303ME23NHH86zyKq+Hp91whxE+XwPZDQl9 nr5Wx5YWLMj3jxKRBwsqTR5IWzq7XnsHulzNYHOV4tUredk0Jv1t4B2PDSOBxshs0z9EY7 jztzlMjoje18mqxAaU6em3N80fUVy/pm1m5HG7eK89P7mj7HJPqnAZmM+daq7JVWh3QOTD n4aV9ICMu+I/EULNdG3mMZPv/TAo61l+/0gP2Bsy7t0z6jOwqTcEvFaaR35Zfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W6r5C6mPNzyCb; Mon, 24 Jun 2024 01:30:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45O1UtUQ049943; Mon, 24 Jun 2024 01:30:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O1Utat049940; Mon, 24 Jun 2024 01:30:55 GMT (envelope-from git) Date: Mon, 24 Jun 2024 01:30:55 GMT Message-Id: <202406240130.45O1Utat049940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 88478cc02a20 - main - i386 kernel __storeload_barrier: quiet gcc -Warray-bounds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88478cc02a20b04094183b805c3b6357f198c64e Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=88478cc02a20b04094183b805c3b6357f198c64e commit 88478cc02a20b04094183b805c3b6357f198c64e Author: Ryan Libby AuthorDate: 2024-06-24 01:20:47 +0000 Commit: Ryan Libby CommitDate: 2024-06-24 01:20:47 +0000 i386 kernel __storeload_barrier: quiet gcc -Warray-bounds Use a constant input operand instead of an output operand to tell the compiler about __OFFSETOF_MONITORBUF. If we tell it we are writing to *(u_int *)__OFFSETOF_MONITORBUF, it rightly complains, but we aren't. The memory clobber already covers the necessary semantics for the compiler. Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45695 --- sys/i386/include/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index 5aca9fb15181..144b8f1d114c 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -49,8 +49,8 @@ static __inline void __mbk(void) { - __asm __volatile("lock; addl $0,%%fs:%0" - : "+m" (*(u_int *)__OFFSETOF_MONITORBUF) : : "memory", "cc"); + __asm __volatile("lock; addl $0,%%fs:%c0" + : : "i" (__OFFSETOF_MONITORBUF) : "memory", "cc"); } static __inline void From nobody Mon Jun 24 07:27:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W70132PKYz5NWtb; Mon, 24 Jun 2024 07:27: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 4W70131vLMz4TZC; Mon, 24 Jun 2024 07:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bCCOWoI7jzXPyXEjBOo2lIS6+ADyqx/jZjPIhQIzts=; b=lRrK/yqhFJRv66FjsvFXI3SyUcHbNTL004PWHIV0LhJ5ujCzXTcKuCjdT7O0xfa/ZVEful MFQV5Z/aQlRTwGb8hr3iq4SLMPhMlXxexvC3qYX3C0YVhU0Ai8UhtoCjJpewNbx6sR1Z0s VSXek1OMwQrorxoVs4cWcqIlBn2ZfgtX5F5XbFo5hO8cwNufuUGG88zFBmXFEP2FaD0p0l coo6jjTkngrVNynA5car178RrpdGTkKIGbdpxPesZFAgjbooihM+ub3ci3NAaQBnNYrWfM dYmZKZQjEzXkamfewVQiKxQMevplmPFOrhcllJcoCW9o+4jV838/q/9g1CGGJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214071; a=rsa-sha256; cv=none; b=VrXgYZs509l+sePyE9BPSfb2hV2qUWDr5ZUoxug/eWFKfCZNLeihINu5M30G4wpab7ADTU qV3X9voMdQKZFaTPoicKlm7hdJllPSvKQMTFUtlyZn9M6VUh5eQsrrgJV0/QBuvk+LkFNI bPdQA9RGOFrk95f/QHd/8H6W+JPjjnQMW9HaPS8WqMUwiDevOJLH2sa2V2SU1Fbzr7PnaS dWPVoSdTAwxIkH82EiCXsAF3KjO85X2rnjRdnKPMzei4YTEmj1vihiwcYReSFyBg3cA4rn wCbs/O7UdXXYEm5WytkjikBcx/cEeSU++24+5hz+yO32+vvJFNy2qfeXrhIpCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bCCOWoI7jzXPyXEjBOo2lIS6+ADyqx/jZjPIhQIzts=; b=ZutlcwNGsbsa/tuhJcVL0wRe6bpUnjBgkI//3Yg5KyLuODRPiuSaEjKmf7wzPj2JLpJxIT TMAGjPenwFHj+mKIeoBCKYTHOJKf8POUB5ICXmG/APu+UadtV2T/17oEj5QXtVyHEJw1PG BCIUEmr4HQMhasrsQYJfEKkjLAUphTUyXicAZvc/kSc2HgPhQ76nQ9eQa0bFatz+KGTY6C MdPdGYV5xAQx7XnkYDUSIi0rwhZpF1Pg9LGhc/bPVOQeAq1X0BXfgkP/MgCx2QeF6GGKe8 4FDfTtpXIDiHFmk18CoBZG9lAiPuWH9yJMIozGHH8h2qDMJgcGbyFPIET0UDcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W70131NvQz189q; Mon, 24 Jun 2024 07:27: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 45O7RplT044291; Mon, 24 Jun 2024 07:27:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7RppS044289; Mon, 24 Jun 2024 07:27:51 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:51 GMT Message-Id: <202406240727.45O7RppS044289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: a94ed493b507 - main - dev/mana: replace power2 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a94ed493b50752cee09245fc312c63b00331f217 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a94ed493b50752cee09245fc312c63b00331f217 commit a94ed493b50752cee09245fc312c63b00331f217 Author: Doug Moore AuthorDate: 2024-06-24 06:55:01 +0000 Commit: Doug Moore CommitDate: 2024-06-24 06:55:01 +0000 dev/mana: replace power2 function Replace is_power_of_2(length) with power2(length). When length != 0, as in this case, they produce the same result. This will allow an implementation of is_power_of_two to be dropped. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/mana/gdma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index 6be3e148d0da..6f3e182ba1eb 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -942,7 +942,7 @@ mana_gd_create_dma_region(struct gdma_dev *gd, int err; int i; - if (length < PAGE_SIZE || !is_power_of_2(length)) { + if (length < PAGE_SIZE || !powerof2(length)) { mana_err(NULL, "gmi size incorrect: %u\n", length); return EINVAL; } From nobody Mon Jun 24 07:27:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W70145RVPz5NWyx; Mon, 24 Jun 2024 07:27: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 4W70143300z4TjL; Mon, 24 Jun 2024 07:27:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgtgGQ7Jtl9ZplG3NDL0uy0jRcd6AG5g2RGSygmSFn8=; b=DiSrgt9RtxY6Cn+H/o0FuehPZStgLZeSFeLeRW5lBXdyR9gwPD8N1MT1E33a3pFkSuYHUM 7e6jyXuAgYEMCAn3xvy52bTowIKJepUDkzT2fomKmctOzenebbPgMhih62GeCF4luxJFQQ /K8xe89X9iOhJpCHA0Dj3rwjjM3CDEBvVKhO1fCtrr8PiWWpT3yhn0Xn2V5m3UxIjJILzI aOSqL0aMFxoHNedXmleX5s0OmSljdKkTtxRrTkX3SAT1pxnyTEP7gSqabYQql6vlaeE7kO IVAscymjjGTD+iw3DeLn/RMWNu6l6029TdTT++okasaM3AutEf8yihZoK+yO5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214072; a=rsa-sha256; cv=none; b=smtiJzoiPk5tsaFkJzE9FOWqFqF7Nd6b86W6IGAckGXnwEWcKl72Y2Xq6Pqo1YrPIEbplS ELhAcDnzyKLMh1lCtL8EUdwQm+L12ZoQ7W9mFl/+YgzcQPEYx5rzxx0ySoDz4u7MnKK2PX vsMxRvjsrRoQYsOtLiOx3LSZwkNoepXjKmCygL1/SzYThzEXkdc88npI3oODoprc6dslLm K6aV4Poz7imvBH96neDl9uA0nzxL8hRqz2zyfJ2lUwbfZqJxK7aHPl8Xe2n88Jpc99ShDS Q3m5RyTqoNu+Btz2nmYR+jDbwEzg5CYUJoGkWjAAKXmoBMkErgHnPCyMU+leug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgtgGQ7Jtl9ZplG3NDL0uy0jRcd6AG5g2RGSygmSFn8=; b=CARz0stJp7QdsG2jHcWp2nONVzGUWQjrcYx/+uVZzptyHgGm6y3gHdVHcbD1xpMhgMHlJ4 RCqcVH1iwAupfjwW1W57SNhIlIT/6x21uiIpO8HXhQRguqi6oq+LdvJom+YOsfEycvK19I ma71ktQvW8gaqf4atjzcGOGXQrLJzFcLv3u0pSJ6cbpBhIdpLGaPNd2IruyvD89yLtg4Cm nrc/HLcH8zM8yH94lvs3BZjGi5tpiHEGvYJKLH+19AmcjMG7z2D2WoIVCJTI50aZDzNSjh vaQxhLPmCzqhTBKyP6SJ11h7UcsTpE1e+c+EGJ0YWQm93gNP6YEAgRt/05Sk0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W70142Pjhz18Rh; Mon, 24 Jun 2024 07:27: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 45O7RqTo044343; Mon, 24 Jun 2024 07:27:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7Rqvx044340; Mon, 24 Jun 2024 07:27:52 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:52 GMT Message-Id: <202406240727.45O7Rqvx044340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: c8b0c33b03ac - main - log2: move log2 functions from linuxkpi to libkern List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8b0c33b03ac072413b27bed2bdae2ae27426f3a Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=c8b0c33b03ac072413b27bed2bdae2ae27426f3a commit c8b0c33b03ac072413b27bed2bdae2ae27426f3a Author: Doug Moore AuthorDate: 2024-06-24 07:00:31 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:00:31 +0000 log2: move log2 functions from linuxkpi to libkern Linux has a header file that defines an ilog2 function and some simple functions/macros that use it: roundup_pow_of_two, is_power_of_2, rounddown_pow_of_two, and order_base_2. This change moves three of those simple functions (all but is_power_of_2) from linuxkpi to libkern. It also deletes a few implementations of these functions that have previously been copied into code for various device drivers, so that they can use the libkern version. The is_power_of_2 macro was not moved because powerof2 in param.h provides almost the same service already (except that they disagree about whether 0 is a power of two). Since the linux definitions of these functions were copied into FreeBSD 11 years ago, linux has improved them, and this change provides those improvements. In particular, a giant table of log values for evaluating ilog2 for constant values is no longer necessary. Reviewed by: alc, markj (previous version) Differential Revision: https://reviews.freebsd.org/D45536 --- sys/compat/linuxkpi/common/include/linux/log2.h | 23 ++----- sys/dev/drm2/drm_os_freebsd.h | 7 --- sys/dev/mana/gdma_util.h | 12 ---- sys/dev/qlnx/qlnxe/bcm_osal.h | 18 ------ sys/sys/libkern.h | 82 ++++--------------------- 5 files changed, 15 insertions(+), 127 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/log2.h b/sys/compat/linuxkpi/common/include/linux/log2.h index 2d54c75c7c23..660e9adb6fa9 100644 --- a/sys/compat/linuxkpi/common/include/linux/log2.h +++ b/sys/compat/linuxkpi/common/include/linux/log2.h @@ -33,24 +33,9 @@ #include -static inline unsigned long -roundup_pow_of_two(unsigned long x) -{ - return (1UL << flsl(x - 1)); -} - -static inline int -is_power_of_2(unsigned long n) -{ - return (n == roundup_pow_of_two(n)); -} - -static inline unsigned long -rounddown_pow_of_two(unsigned long x) -{ - return (1UL << (flsl(x) - 1)); -} - -#define order_base_2(x) ilog2(roundup_pow_of_two(x)) +#define is_power_of_2(n) ({ \ + __typeof(n) _n = (n); \ + _n != 0 && (_n & (_n - 1)) == 0; \ +}) #endif /* _LINUXKPI_LINUX_LOG2_H_ */ diff --git a/sys/dev/drm2/drm_os_freebsd.h b/sys/dev/drm2/drm_os_freebsd.h index 58523a33da2a..b2a2e82b748b 100644 --- a/sys/dev/drm2/drm_os_freebsd.h +++ b/sys/dev/drm2/drm_os_freebsd.h @@ -234,13 +234,6 @@ typedef void irqreturn_t; #define div_u64(n, d) ((n) / (d)) #define hweight32(i) bitcount32(i) -static inline unsigned long -roundup_pow_of_two(unsigned long x) -{ - - return (1UL << flsl(x - 1)); -} - /** * ror32 - rotate a 32-bit value right * @word: value to rotate diff --git a/sys/dev/mana/gdma_util.h b/sys/dev/mana/gdma_util.h index 37c2653d5ec9..1efa315bbcfe 100644 --- a/sys/dev/mana/gdma_util.h +++ b/sys/dev/mana/gdma_util.h @@ -170,18 +170,6 @@ find_first_zero_bit(const unsigned long *p, unsigned long max) return (max); } -static inline unsigned long -roundup_pow_of_two(unsigned long x) -{ - return (1UL << flsl(x - 1)); -} - -static inline int -is_power_of_2(unsigned long n) -{ - return (n == roundup_pow_of_two(n)); -} - struct completion { unsigned int done; struct mtx lock; diff --git a/sys/dev/qlnx/qlnxe/bcm_osal.h b/sys/dev/qlnx/qlnxe/bcm_osal.h index c820532c9e0a..7148fd3f6215 100644 --- a/sys/dev/qlnx/qlnxe/bcm_osal.h +++ b/sys/dev/qlnx/qlnxe/bcm_osal.h @@ -102,24 +102,6 @@ extern void qlnx_vf_flr_update(void *p_hwfn); #ifndef QLNX_RDMA -static __inline unsigned long -roundup_pow_of_two(unsigned long x) -{ - return (1UL << flsl(x - 1)); -} - -static __inline int -is_power_of_2(unsigned long n) -{ - return (n == roundup_pow_of_two(n)); -} - -static __inline unsigned long -rounddown_pow_of_two(unsigned long x) -{ - return (1UL << (flsl(x) - 1)); -} - #define max_t(type, val1, val2) \ ((type)(val1) > (type)(val2) ? (type)(val1) : (val2)) #define min_t(type, val1, val2) \ diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 6dc4bc87c3fe..7d2e24f1263b 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -221,77 +221,17 @@ ilog2_long_long(long long n) unsigned long long: ilog2_long_long \ )(n) -#define ilog2(n) \ -( \ - __builtin_constant_p(n) ? ( \ - (n) < 1 ? -1 : \ - (n) & (1ULL << 63) ? 63 : \ - (n) & (1ULL << 62) ? 62 : \ - (n) & (1ULL << 61) ? 61 : \ - (n) & (1ULL << 60) ? 60 : \ - (n) & (1ULL << 59) ? 59 : \ - (n) & (1ULL << 58) ? 58 : \ - (n) & (1ULL << 57) ? 57 : \ - (n) & (1ULL << 56) ? 56 : \ - (n) & (1ULL << 55) ? 55 : \ - (n) & (1ULL << 54) ? 54 : \ - (n) & (1ULL << 53) ? 53 : \ - (n) & (1ULL << 52) ? 52 : \ - (n) & (1ULL << 51) ? 51 : \ - (n) & (1ULL << 50) ? 50 : \ - (n) & (1ULL << 49) ? 49 : \ - (n) & (1ULL << 48) ? 48 : \ - (n) & (1ULL << 47) ? 47 : \ - (n) & (1ULL << 46) ? 46 : \ - (n) & (1ULL << 45) ? 45 : \ - (n) & (1ULL << 44) ? 44 : \ - (n) & (1ULL << 43) ? 43 : \ - (n) & (1ULL << 42) ? 42 : \ - (n) & (1ULL << 41) ? 41 : \ - (n) & (1ULL << 40) ? 40 : \ - (n) & (1ULL << 39) ? 39 : \ - (n) & (1ULL << 38) ? 38 : \ - (n) & (1ULL << 37) ? 37 : \ - (n) & (1ULL << 36) ? 36 : \ - (n) & (1ULL << 35) ? 35 : \ - (n) & (1ULL << 34) ? 34 : \ - (n) & (1ULL << 33) ? 33 : \ - (n) & (1ULL << 32) ? 32 : \ - (n) & (1ULL << 31) ? 31 : \ - (n) & (1ULL << 30) ? 30 : \ - (n) & (1ULL << 29) ? 29 : \ - (n) & (1ULL << 28) ? 28 : \ - (n) & (1ULL << 27) ? 27 : \ - (n) & (1ULL << 26) ? 26 : \ - (n) & (1ULL << 25) ? 25 : \ - (n) & (1ULL << 24) ? 24 : \ - (n) & (1ULL << 23) ? 23 : \ - (n) & (1ULL << 22) ? 22 : \ - (n) & (1ULL << 21) ? 21 : \ - (n) & (1ULL << 20) ? 20 : \ - (n) & (1ULL << 19) ? 19 : \ - (n) & (1ULL << 18) ? 18 : \ - (n) & (1ULL << 17) ? 17 : \ - (n) & (1ULL << 16) ? 16 : \ - (n) & (1ULL << 15) ? 15 : \ - (n) & (1ULL << 14) ? 14 : \ - (n) & (1ULL << 13) ? 13 : \ - (n) & (1ULL << 12) ? 12 : \ - (n) & (1ULL << 11) ? 11 : \ - (n) & (1ULL << 10) ? 10 : \ - (n) & (1ULL << 9) ? 9 : \ - (n) & (1ULL << 8) ? 8 : \ - (n) & (1ULL << 7) ? 7 : \ - (n) & (1ULL << 6) ? 6 : \ - (n) & (1ULL << 5) ? 5 : \ - (n) & (1ULL << 4) ? 4 : \ - (n) & (1ULL << 3) ? 3 : \ - (n) & (1ULL << 2) ? 2 : \ - (n) & (1ULL << 1) ? 1 : \ - (n) & (1ULL << 0) ? 0 : \ - -1) : \ - ilog2_var(n) \ -) +#define ilog2_const(n) \ + (8 * (int)sizeof(unsigned long long) - 1 - \ + __builtin_clzll(n)) + +#define ilog2(n) (__builtin_constant_p(n) ? ilog2_const(n) : ilog2_var(n)) +#define rounddown_pow_of_two(n) ((__typeof(n))1 << ilog2(n)) +#define order_base_2(n) ({ \ + __typeof(n) _n = (n); \ + _n == 1 ? 0 : 1 + ilog2(_n - 1); \ +}) +#define roundup_pow_of_two(n) ((__typeof(n))1 << order_base_2(n)) #define bitcount64(x) __bitcount64((uint64_t)(x)) #define bitcount32(x) __bitcount32((uint32_t)(x)) From nobody Mon Jun 24 07:27:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W70156G74z5NX99; Mon, 24 Jun 2024 07:27: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 4W70153xpgz4Tfd; Mon, 24 Jun 2024 07:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UxR4oIeBaNAHqkYeHRHVHzsAb9mn4mVECbKAmJVPlsM=; b=EEide3oxwGcF7UTwmrsu+fc6nkvM5a2en2oznCtq13fvfU4JPjwCtqFO+fsFyBSv4WOzrP QpkK6VVYXhpaAIr7gRjg4oh9laDCTWzSoMsDR9ObrXTzXzWoJ39au8J0kc3kE11jB2D2NF ZbDvNemq4639L7za9iVk3DN9T3viBNu1S+SUqPp6E+4zb5W44Q6gKleDmU86cxqtYeRbz/ Umb+JKeP+79YNfVtUvAnpGHB9KfiVWXq8kSrGGIqT5xgOCh0sJTGxZ1gkR9Is1yhtA/CCH p6ulO76wPJvwaHKyVNcXf55Nf2lK6a5sSflSeLkMrVdsw8AX4oKmGV+dFbKjyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214073; a=rsa-sha256; cv=none; b=L9nvoHCsZUxRPaZQUIQJDGjF83R710umHR4/qTF452zKlaNAUerS/rwLk04BsJD4GAtz+L tqoWK0lyZ4QiMqzM6tNeqhQlTlovAZ9wgDBov0FSsRoH0sj6lxX43DYQ01O4gP7pHAal2F G3kBDKIZ2LqzXtAIEoIT6oxCAgplr0zyX6Vuci7t467Bt9G7w61gOlUFCMGbatvQtTSqQd lq78gY4IFsLdm5ngAs66lG2DtIWEMF4xBH0WSUq2W6oVy+T+Cy3/Q0H7k5fF3zFmi4P7jC eBZH9JkSXzjWv6VFAg83X22O5JdOPF9qTHADQ2BXH6R5o2pvCEFMj/sGkozYyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UxR4oIeBaNAHqkYeHRHVHzsAb9mn4mVECbKAmJVPlsM=; b=PaMPDtgssTJ3XrImQIUBbplA8X5T5jSiC+FjRhF/nLh4Pr1DykYC4KjuvZ72WxYJZTBz0V +R2VRpiJWIpIG2I35HoT+mG4cYDpZ9edxB8BcLsfDxF+BJzMDAAtGaqvMAlWwuoc84TvIH Pgp+CUnyVHBm3ZR8ilw3P2SOoLuuCYba/4GzFI/R9TAn+i5+GTGz9dw5rvtHtci+a4KNRb exgbblyafhQxJ2ohZXbo7fYjFXE89V51ROdHzfSo47TbtaQt5JVklYgJ/izhM5LnK45BkF k46+07/1sXuq6cj4GV6fSo2ZBd8Q0eAuaFHOT72bvEbTvBbGn9iOdXaG583w4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W70153QZDz17k7; Mon, 24 Jun 2024 07:27: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 45O7Rrvb044379; Mon, 24 Jun 2024 07:27:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7RreX044376; Mon, 24 Jun 2024 07:27:53 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:53 GMT Message-Id: <202406240727.45O7RreX044376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 4bbdabc2bd76 - main - aic7xxx: use rounddown_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4bbdabc2bd765dc3ea009c955c2679fb42a2b6c6 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=4bbdabc2bd765dc3ea009c955c2679fb42a2b6c6 commit 4bbdabc2bd765dc3ea009c955c2679fb42a2b6c6 Author: Doug Moore AuthorDate: 2024-06-24 07:14:55 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:14:55 +0000 aic7xxx: use rounddown_pow_of_two Use the roundown_pow_of_two macro in place of an expression. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/aic7xxx/aic79xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index ab68c3d8b088..2b5015b20e41 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -8593,7 +8593,7 @@ ahd_loadseq(struct ahd_softc *ahd) if (sg_prefetch_align == 0) sg_prefetch_align = 8; /* Round down to the nearest power of 2. */ - sg_prefetch_align = 1 << ilog2(sg_prefetch_align); + sg_prefetch_align = rounddown_pow_of_two(sg_prefetch_align); cacheline_mask = sg_prefetch_align - 1; From nobody Mon Jun 24 07:27:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W70166mnBz5NX00; Mon, 24 Jun 2024 07:27: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 4W70164nxtz4TNk; Mon, 24 Jun 2024 07:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFsOHBqEp9q5Py/kJfmaPBhjdbLPi2lLFxSs0/P/FBU=; b=C1DQ4zT8oXs1l4KrJAJ2r4w+Z2PbiBbYopWGGs4Kzc5fx62zKReNriQWBL6LxH9iHwCARt jILkKZfTZwDXd+hirU3pYncu4D8WkQKXf85M3az3cPsxi3MS5B14qS1f65ce/j/MF5mUXS /qGkdr3+zrDOC75xeaY07wdIF403C2co5ZqRu1lU9Pe8Tv7hXhOkdTUGbsY7InVDapW1f5 5rK8dJyHJKFzSmzEVxdHyxJF2cjtaRHJBmaeQkbqGVkimqcVKgNrLHODDEmuO+4iZUuYlk QNb4M4J7PiyoIYB9nIHsATyw2eThEi0htN5QcpeD4rFZgDo2QwrR5N7xL/+Q1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214074; a=rsa-sha256; cv=none; b=Iw95oUpD9WEiTGAvngCb25dyXLYkYuZWSNBz5W4MmYEFseRvvkim4b+Z0N6/kg83Ir2a0v cWv16JK+BPaGtKl9GrN+5uNlsl9aKvzNaQaX/BRFpivIME22LRVhLIoli1fgecCeUwTdOr TEhPj0NUZDVV5jClfO7DpWQ334fI16lAeXDFvbYPV2IsT53/SxRgt3DQfkQnSt54Qk+I5v gCog+ohCo9+CJ8fVzS0ZJ4AuBoCFquj2hYZuKu+huQznCtjc9PrhdCXV2+Ykqs688lx1Ym oIBIsoKuYohTJujYLs4Iha+vrWDdGLnyBUtOe4sEfCaLJ2vYODszgrk7hyHpHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFsOHBqEp9q5Py/kJfmaPBhjdbLPi2lLFxSs0/P/FBU=; b=qT55BBCntVnAxPP7cOin0rcDPsRuwFyg9nBjVlkO1/vquibsWXiKnZQMW0oGBU7AToVfka I5L84WAel5CrHuydDulKFkXAl7ldwzVKJHU5mNpqqUwgkhJl5R3t6kRqb+iG6QMHQXlJ7i MSifi2ORp/iQn4HFetum6faS2EQ16BkUJpHZGgvCNgA+tuA6nQUeW/i6ygtA/uhpRGY/RO zlHoZd7nQ/dV8CJ1RjwSRaNUuND0gRwzM78bZNqQww23M/OaWKmVboKFq4MzTIaC0cnh9k TvIZ4DsUV5GtV1EhqrLG8qwsRLk2I3Ys3I+isp4ODWbUge2B2pcjuObl9HRtig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W70164NHkz18Rj; Mon, 24 Jun 2024 07:27: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 45O7Rsrx044415; Mon, 24 Jun 2024 07:27:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7Rsq6044412; Mon, 24 Jun 2024 07:27:54 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:54 GMT Message-Id: <202406240727.45O7Rsq6044412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 7bb73f731538 - main - cxgb: use rounddown_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bb73f7315380f7315505176d3855884c11ae490 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=7bb73f7315380f7315505176d3855884c11ae490 commit 7bb73f7315380f7315505176d3855884c11ae490 Author: Doug Moore AuthorDate: 2024-06-24 07:17:02 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:17:02 +0000 cxgb: use rounddown_pow_of_two In two places, use the rounddown_pow_of_two macro in place of expressions. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/cxgb/cxgb_sge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 0c5be9dd6614..a2b3918032bb 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -553,7 +553,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) nqsets *= adap->params.nports; fl_q_size = min(nmbclusters/(3*nqsets), FL_Q_SIZE); - fl_q_size = 1 << ilog2(fl_q_size); + fl_q_size = rounddown_pow_of_two(fl_q_size); use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : is_offload(adap); @@ -565,7 +565,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM9BYTES; } - jumbo_q_size = 1 << ilog2(jumbo_q_size); + jumbo_q_size = rounddown_pow_of_two(jumbo_q_size); if (fl_q_size < (FL_Q_SIZE / 4) || jumbo_q_size < (JUMBO_Q_SIZE / 2)) device_printf(adap->dev, From nobody Mon Jun 24 07:27:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7018152Kz5NX7D; Mon, 24 Jun 2024 07:27: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 4W7017683Wz4Tg3; Mon, 24 Jun 2024 07:27:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTW6jPA//HNYbJo11vNjX0LoHV48++qKCny9csSAObg=; b=XVZiNUnU0I82NrdYDOBIWOeFznZcKm22vHFBTAN+ddKdf8Mxqk3itN+c3o5TchS0o65s2L dUX0fjpKQEzQEVxYbJWesTIPHsNk5SE5BANIPXt0MB0U9r4aSLBFp9PyKEBO7sAavP3PUX hxbGDpsigYfhciX26XlYjtmDyLQA6pdot2zPdvp1+beZYzvHFsFFTq7zkT71/EFK/OlgSF voX/u0jD1Dz21uAVLjjurYK5hCkOMpj8MaDtDf7NpphrV4g/9yr5Sq47uW9SXhnysvGPkk k/9IVdMCcAtO3rVpfUBHjQ9c8FYlPIwes8qImO5PfpikZs09L75bEdfVsMJqCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214075; a=rsa-sha256; cv=none; b=RheZUFZVR9t0m+i91sHjiD/fbqYdocc0iJPQwZL6UIqpsJG/R0IVKIUB3B16ffIlPyWDl5 6q2za9D0P0JNL8MFBsM/FO7fiSnZLsoGUhLdDExvMSxKFpWm7w7whtXoPFUgeBi1c+8kNF r1l/OkY+qJ3/e95Al+fB3mUpI4uLbUw8e2Xs1qUAiyA3TJCa/U2nTJmxEHNVSl9ei7jeui 4cAc4IDVGuohwf8Kc1fzXvcpA+3n1Yju1O95lfi7c11Qj4JW04/Xik1dHwZQaDnPorl0Vr NFr2M+n4P1cdAooUqT12hpHG4wLeUSwC1YNoKA/RwNp0ATLniLZmLl63mK99yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTW6jPA//HNYbJo11vNjX0LoHV48++qKCny9csSAObg=; b=WY+8Q50HmMc96RE74c0iVrx53wmhrP1Y1cQP5gVorLL2ERjSBpzTv7SrZyjRXlu37HpCTQ ZGxayniCAoet1PS7UPYxyLBXD8C+zxt1oaRJSbHdUoI5iMOvXQZnZElt7Xs55V6VnE5SUS i40rpI2xGoI9HZDvbZvLpBAhigYQ+xtZtxnafbeX1oykt/DqKC7Ingca0gJG/eCcty07i9 T32tCLjxmU9Gpre+XSJZWLc78WugsU6WIp/WoxkFco8HAaJssIGdEzJKsSG0ZzvnLWAL9c WLtT8Zk95vO0BpizNcF1ZnxgyXwZD0kQ+xUVnXbBYvTnlwu2hF4BHOieIqOb5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W70175NGvz17qF; Mon, 24 Jun 2024 07:27: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 45O7RttP044451; Mon, 24 Jun 2024 07:27:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7Rtik044448; Mon, 24 Jun 2024 07:27:55 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:55 GMT Message-Id: <202406240727.45O7Rtik044448@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 5fc42387d704 - main - cxgbe: use order_base_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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fc42387d704295745a9bc05bde07bdf05ed2526 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=5fc42387d704295745a9bc05bde07bdf05ed2526 commit 5fc42387d704295745a9bc05bde07bdf05ed2526 Author: Doug Moore AuthorDate: 2024-06-24 07:18:42 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:18:42 +0000 cxgbe: use order_base_2 Use order_base_2 in place of an expression. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/cxgbe/t4_sge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 350d385ac490..b4eb0701821a 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -4228,7 +4228,7 @@ qsize_to_fthresh(int qsize) { u_int fthresh; - fthresh = qsize == 0 ? 0 : fls(qsize - 1); + fthresh = qsize == 0 ? 0 : order_base_2(qsize); if (fthresh > X_CIDXFLUSHTHRESH_128) fthresh = X_CIDXFLUSHTHRESH_128; From nobody Mon Jun 24 07:27:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W70190WN3z5NX7J; Mon, 24 Jun 2024 07:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W70186XJKz4TPH; Mon, 24 Jun 2024 07:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCBkjXzN1i7kN3cnDZnGQCMnuJtN6h8mgVr/lrM0DEY=; b=BGVpysu6issCU2vYt/WYD5PPr9rDvFK3PxzfKC0cg2z/+1BddmBVa2nYj8VRuPJjNh9KYt YeM89wPJzSgjuCRdWDR3JvONKvItjFCA/3qSrpRHro1S5mR3Plcj8t1j0Z8O2AEjUbubfU xOnGBuqGZzwE7i3g82We6/QS7Q7tLFR1GWcnYwOScEZdBWllDrIMxVp3XQAuE+56vGSya6 i1K45+Iz7IiZTdrGXvpoLlF5UQhzGkFnxh0Qc+DJ1FTcI8g+PyQniIRdHLzWErXbWga2nb jSjibAJu86NaMbBYQMuMqBmDfZvYBI4hEklI9/dYnAsCBSSbVHAxZJyY1+VBYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214076; a=rsa-sha256; cv=none; b=DRebW15Hon3/TtwMgan1x1KAuwTBwz/lswEr124QHj6NeYACNFVZXsYfMm2Z38TZb5C67q 7cq8tm6+8Rfbe9RrBm3NRtnyuocDPG78+jNGk0/OAoiy115fKp+mxf/8w2azWNCPJp9dh9 edwHAt85p7BZs7vMXYO3Wwp1+7XntXBS2VT7UJL5OB1GHIdiK1mP8s1ZGpaG5iYmTXPHiF Gr7NC+xcn/qCR4Va9RsQ3NoyOFj/z1eMO/HRBqPiNSdbxMf27cvD1NnnBS/balZkKWuuEx jtZgxIP4xKjtzyeFF/eboF/3fTkCdHU0UkHINUC54xU97KgT3FIqvDfS4+VjVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCBkjXzN1i7kN3cnDZnGQCMnuJtN6h8mgVr/lrM0DEY=; b=M5nHGzJw2jK5IDvY/Fnlw4Z6I6NLrxkVIl5CK8hz4830S4maNL+q6QoRXjMtm86sdPYGng qzx39RWIQ137V5vedrI4Y6I6VWZS4jSRiWPmXhD3GeTAMvAQNT46+mkHh4tujGRJjidfqb IjZLBu2bVrWoTJhOUwpT+Eqw+HrSuvNXUofCXlTSeoLwXTixH89wZR9tE5+xWBCCWvDylN o2SaCoh1b6vZ+Tndeb0+2vA0+ffOMffNfyPWxMIJTc9EI42JMMvO3E91FOBGj1f96Y023W YZVEjClHU8ghWwVENhtShhcs5iGSFx8muDzTg3I9SXvNKCVdlGRI8DngSBnLlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W70185yFLz189r; Mon, 24 Jun 2024 07:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45O7RudD044491; Mon, 24 Jun 2024 07:27:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7RuUa044487; Mon, 24 Jun 2024 07:27:56 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:56 GMT Message-Id: <202406240727.45O7RuUa044487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 87177ce3aa98 - main - irdma: Use round{up,down}_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87177ce3aa981ab2af40fd26c68481430d0867a4 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=87177ce3aa981ab2af40fd26c68481430d0867a4 commit 87177ce3aa981ab2af40fd26c68481430d0867a4 Author: Doug Moore AuthorDate: 2024-06-24 07:20:49 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:20:49 +0000 irdma: Use round{up,down}_pow_of_two Use roundup_pow_of_two and rounddown_pow_of_two in place of expressions. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/irdma/irdma_ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/irdma/irdma_ctrl.c b/sys/dev/irdma/irdma_ctrl.c index 6078ac43815e..79ed14a60670 100644 --- a/sys/dev/irdma/irdma_ctrl.c +++ b/sys/dev/irdma/irdma_ctrl.c @@ -4939,7 +4939,7 @@ irdma_cfg_fpm_val(struct irdma_sc_dev *dev, u32 qp_count) qpwanted = min(qp_count, hmc_info->hmc_obj[IRDMA_HMC_IW_QP].max_cnt); if (qpwanted != 0) - qpwanted = 1 << ilog2(qpwanted); + qpwanted = rounddown_pow_of_two(qpwanted); mrwanted = hmc_info->hmc_obj[IRDMA_HMC_IW_MR].max_cnt; pblewanted = hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].max_cnt; @@ -4982,7 +4982,7 @@ irdma_cfg_fpm_val(struct irdma_sc_dev *dev, u32 qp_count) hmc_info->hmc_obj[IRDMA_HMC_IW_MR].cnt = mrwanted; hte = round_up(qpwanted + hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].cnt, 512); - hte = hte == 0 ? 1 : 1 << fls(hte - 1); + hte = roundup_pow_of_two(hte); hmc_info->hmc_obj[IRDMA_HMC_IW_HTE].cnt = hte * hmc_fpm_misc->ht_multiplier; if (dev->hw_attrs.uk_attrs.hw_rev == IRDMA_GEN_1) From nobody Mon Jun 24 07:27:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W701B2RJvz5NX08; Mon, 24 Jun 2024 07:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W701B0b2Mz4TZp; Mon, 24 Jun 2024 07:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mGP1ya+4ozqfcZ6Sv6f9YXdz78e/7VzD1aTd4vww6rw=; b=igocibPnruO/f7uzS764eWdHPI4xjJuiZ23nmUgHUnzq4s10OLRHpcOdUyQFtoyABbtsZ4 ln4MzBSNgjL/tTVCfS+4MHFXtydAcGfP+AlIFh5nOo8B3iibmc8DSj+EIQ+NmUvNAg7B2T jaVjvPlvKVPjEyE61IRW6/oqP4EwM4AbM5qu0tkyHlR6kasNh43qCad1EXhY602Y20MHWB cSjKxhfF696x3IkSTm01UNl0MOq7LaIBQzABLPYbtmtzZc0CCDCxsM2eX9ZB2ZdKtSKHTd bnMD58BiNsswbNZ8JUhy96PXqsXWAjq/HlVKiD1rgfLnAumINVih2aKAUPaSlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214078; a=rsa-sha256; cv=none; b=eoj5TR0mQdFtGf82c09D2w4UTIfaH0xrU60Z7buuuSEJF0G5S+JMGrejyC2SG565ttgCzh xlNM9rvBQOhtOx2PCnTXpL4vXUuWtH6koYNJ39JPcBM1KlEYkHUnwO9GaMBZtiLzZmHoDp D6ULIHuPRaGbB4p0uLRSdwRGeGuQ8rBL6dYbvOPfSbozzKazYFZAeFuI8P+Dwn1jeRoETJ M6HNsa7h9Yz3KCDD1jT2n2f5ufzcJNJcuMIVcFxm/2Zw4IH+KnEMTIuVasdQmdUvwQy0Ue IMWxX8wIwtlZjrzc/BpaPOwlNGD++GLZg0hC+ziWqaPGaEUhB/FFAk+9GMY7Cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mGP1ya+4ozqfcZ6Sv6f9YXdz78e/7VzD1aTd4vww6rw=; b=Gd8PiqRuJh26OwCKbM/mthT1BAxCoCvZfIJnyagvfw4Ks5hVD3teJZ9ssT++4qDivsokci 7VOqFrC/yMrpEPn34TwBQa2yNmAgrwH6hkNcP05ZJmgu2w/KHRAU4YT9LbD8jbCXVZdL5L C458baitq4asLt9sT74d/zPbe8KrcK8H7bLSk4KJLXeiyfIikcnxGNY6ecTf0fNUbgs9FX wrgBhoMIgiWSHTDFikaRoHznwVgZ9hp/INckxOwSSqNWcgX29DkVjGxpkVfpybs65EyPCM v+iSrwYePbNuSdZMEqxDYiICl48rgE1Hi4s7I7ICDkkjWuo95nDQWH4jH2JZFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W701B08Gtz18F2; Mon, 24 Jun 2024 07:27: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 45O7RvRq044529; Mon, 24 Jun 2024 07:27:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7RvjR044526; Mon, 24 Jun 2024 07:27:57 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:57 GMT Message-Id: <202406240727.45O7RvjR044526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: dc048255b37e - main - mlx5: use roundup_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc048255b37e1e36090bb42e5297f97dbcd31c5c Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=dc048255b37e1e36090bb42e5297f97dbcd31c5c commit dc048255b37e1e36090bb42e5297f97dbcd31c5c Author: Doug Moore AuthorDate: 2024-06-24 07:22:52 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:22:52 +0000 mlx5: use roundup_pow_of_two Use roundup_pow_of_two in place of an expression. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 4d9d1048448b..602a94345e50 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2331,7 +2331,7 @@ mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs) * Stride size is 16 * (n + 1), as the first segment is * control. */ - n = (1 << fls(howmany(r, MLX5E_MAX_RX_BYTES))) - 1; + n = roundup_pow_of_two(1 + howmany(r, MLX5E_MAX_RX_BYTES)) - 1; if (n > MLX5E_MAX_BUSDMA_RX_SEGS) return (-ENOMEM); From nobody Mon Jun 24 07:27:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W701C4q2Nz5NX7S; Mon, 24 Jun 2024 07:27: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 4W701C1z7Kz4Tb2; Mon, 24 Jun 2024 07:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QPuGOCOyRZ4wqEqGsdgPCrjduOnAfBfvZ0fiPGe3W3w=; b=Z8L/PNZLK1Lv8LxU4SbKe57r140J5HiLi4eh7QleveuYj7j3tBE/NvhYAjO36WT8z837se jDwTHQ2jgHa8uuF6SBsbKkYC1N2fatByG1GocgQ6WoD0SKgRDT4TlG40DsljaRfxVphDCc slfkWfg5onIIy6vv26zJT2FF7suOjXkhBO4OORvizrLWkRZ3JEhIfbjNgcGKBcrce1qM2d V2GC7CopQDpBp7dFkYyWZaYr9Wli1d5dNF8FK/cv2d4u4+RstQ7DnVvUkVwM9MKysMBZtj q3CP8O855eJ5hQ4QyR/AP7gc9hru5yrSFp0M492zvQTm5Zh6Plu7xcfq/6qJfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214079; a=rsa-sha256; cv=none; b=uVb1J8Pou2/c9TzJt7aQFrWOkdCKO9yASMX5R4RwENCTZHyWo3+LUGayZbqW98xFK8mMHK KLvmPKcNEOGWUN/r6PFI2wSQE2mOyxlmtHdRnfQbBHhRe6gpOuR0GEfhoFVzJzJNXjIG9w 2hLla/+o7QUIGTXh02ytbryw5cY7BxwMEFzfBxkzdHYwlChpNGTNGjBn/m8JZQF8hiBD9s 6OxeqV7zbSCRRG2ezKwC2iIhq0Z3M2JPg5X7b97fPDS2tXVRB1lNAdZ9CYb5Rozw68bKC7 YSzXmVwHwIMQhojM4hlvqlMBiNzVJnZL0wD1VtEgiysvz8WU4r/+qYIdLmQqIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QPuGOCOyRZ4wqEqGsdgPCrjduOnAfBfvZ0fiPGe3W3w=; b=lqBpQ34MdDZf7XAcucWKu8NUWqJ6BWpa4ZR9RG9hTWO9737XpXRAq+qiF77FAqcb+1bQ23 IROJ8d7QzrLumgxWqln8ZqdruOZKrDh19JsBmddKltzW6maETkfkF9OvEQ+QbeH9Gj2KYk yAoC3vp5BFgfePTQeapUek/vMp22trs3mYjd3aXC1YCqX8TDEFa93LFNI2LJtjQzLqbja3 Oerk/128CZYQ7T2mvrK88PtXD2JxzDcWdoAv9U3f2EAFBsb5GqwYu4BQg88hK2LYv4XHxf ji5ZtyhJQMpw3f4vCEaHpYT7lMvbSBoXi6MDg+xhtZqvYm74Mda+UyGClh8M1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W701C14Vsz18F3; Mon, 24 Jun 2024 07:27: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 45O7RxNA044565; Mon, 24 Jun 2024 07:27:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7Rx4q044563; Mon, 24 Jun 2024 07:27:59 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:59 GMT Message-Id: <202406240727.45O7Rx4q044563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 0839258c5690 - main - ipfw: Use roundup_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0839258c5690cd7cd0dcd10a089fc20ce73225c1 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=0839258c5690cd7cd0dcd10a089fc20ce73225c1 commit 0839258c5690cd7cd0dcd10a089fc20ce73225c1 Author: Doug Moore AuthorDate: 2024-06-24 07:24:24 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:24:24 +0000 ipfw: Use roundup_pow_of_two Use roundup_pow_of_two in place of a local function that does the same thing. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/netpfil/ipfw/ip_fw_table.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c index 5cf948ce39a2..92bb7a63fd5a 100644 --- a/sys/netpfil/ipfw/ip_fw_table.c +++ b/sys/netpfil/ipfw/ip_fw_table.c @@ -1512,13 +1512,6 @@ destroy_table(struct ip_fw_chain *ch, struct tid_info *ti) return (0); } -static uint32_t -roundup2p(uint32_t v) -{ - - return (1 << fls(v - 1)); -} - /* * Grow tables index. * @@ -1540,7 +1533,7 @@ ipfw_resize_tables(struct ip_fw_chain *ch, unsigned int ntables) if (ntables > IPFW_TABLES_MAX) ntables = IPFW_TABLES_MAX; /* Alight to nearest power of 2 */ - ntables = (unsigned int)roundup2p(ntables); + ntables = roundup_pow_of_two(ntables); /* Allocate new pointers */ tablestate = malloc(ntables * sizeof(struct table_info), From nobody Mon Jun 24 07:28:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W701D57fGz5NWts; Mon, 24 Jun 2024 07:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W701D2Yc9z4Th4; Mon, 24 Jun 2024 07:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GIVhpgIPDKATWzGf+S+nUonw5aHYNkuA85/eOK7sYdo=; b=WAnqv3LOTTl5SiF1JXAiHfqjS6XD7Oq5dpsmjOKMmSHk9GVT02jd1hHRNt2+eCx57ClPu2 K2iuHzoLejUgmzvQ5yPFBeFZQPJdt7jSDLrVZlLVTbcceAMZrA0oKMStBe0qCSi/cEEQh0 vo0MHbEdCsh30KqYWWKuy2JVPRwUhSMXrfxiTJlqxqMYKLNj/3hDOqk1OiTVwIF7Te1tQQ FbVkvLhJyH+v0asdvZYVoR2vbocWbKmtfwJJG0D0kKDmUBiW7HytYlTh93kkDBusrKQVU3 iDg2EVru3X672w8Z9ertDrzfjvyKyxQJUGYStiWsGVsKpeRRbgLRjoogW2g4xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214080; a=rsa-sha256; cv=none; b=sbPSrAjzIGEnCbUG+G5Lj6jwIPtb8hcTPgKciQfCE0LFO8plfeK1YQH1EayDwiRZTyDlXN 9Kir/lv5I3NOR7TGQoUnDbnWXpTKYo4zYIRo6wXB5lSpktXbIAEfnOf4847aOmhQ5uZPzD od7xz4O4ERhP2k7KF+XAjq1mLCHY512MrqajTwnuFmKfsi7WOsJADbtc5MTIM4GNsacPXX d2fOycOhuuH4d2ywyN1mXTHrtDnbn9Fj8KL1DeFzxhxtKimihmaAIaly/7kgcu/J1y0JWr 5ekCNLkkYffvIfrGUdl3NKQx3Z3gfSe+oVe09rXvRF28cngQ4QWpwhYRuXb1kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GIVhpgIPDKATWzGf+S+nUonw5aHYNkuA85/eOK7sYdo=; b=toBobY23ruOMTw2sOFYtywsOv6+yp90vV2GDlBTWKnY+RGBbDE0RHlP3oGhIC4Xm7IggBA 31kqh6u11VaRx764DQrAX0SSEBHVu6FyW9Dfqr3xEaPJ+7MO4+5sNBjHaKTDoFkmf6L50a gM/BCZhJNEO5Dz6ANL/ZYs11ETGuVPR6ZEqd2fSYdMETgnLUYA0Br8Zlqizce8x07KhfEK CLovsP6F5qdp6hXtaBaiqvQkEpNnctG4w7Pdh/QX6M0+FNnyd+ur/OgkCH7KJk5wNBgM0C AZM9Fy3jbs5aQBVrbpFpahRlY3rkOYxZA/NWQN62o7zmJdoS/heNxdXbMI9s7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W701D23jWz17qG; Mon, 24 Jun 2024 07:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45O7S0AO044608; Mon, 24 Jun 2024 07:28:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7S0fT044605; Mon, 24 Jun 2024 07:28:00 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:28:00 GMT Message-Id: <202406240728.45O7S0fT044605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 5dbf886104b4 - main - x86: use order_base_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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5dbf886104b45fea255987ee2ae4828b8d002ffe Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=5dbf886104b45fea255987ee2ae4828b8d002ffe commit 5dbf886104b45fea255987ee2ae4828b8d002ffe Author: Doug Moore AuthorDate: 2024-06-24 07:26:23 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:26:23 +0000 x86: use order_base_2 Use order_base_2 in place of expressions involving fls. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/amd64/vmm/x86.c | 2 +- sys/x86/x86/mp_x86.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index aa8f87c98fe8..1167652d88ea 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -67,7 +67,7 @@ static __inline int log2(u_int x) { - return (x == 0 ? -1 : fls(x - 1)); + return (x == 0 ? -1 : order_base_2(x)); } int diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 3c08f7fa987d..0a683b3e841a 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -189,7 +189,7 @@ static __inline int mask_width(u_int x) { - return (x == 0 ? -1 : fls(x - 1)); + return (x == 0 ? -1 : order_base_2(x)); } /* From nobody Mon Jun 24 09:59:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W73N75NL7z5Nnfy; Mon, 24 Jun 2024 09:59: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 4W73N74lylz4scw; Mon, 24 Jun 2024 09:59:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719223175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6a+rRkzPL1r6f+LVw+plCDtqmID3841Z4+IJdBY6Ik=; b=qMYPFLlWUrs0tYoMtyYf5AUDTJuCQs0sNYZqGNL8E/LB917qRmzeT+4AoV+31EY5G+JZeB 7WU31tx44pF2exRlt/L0HrTSlsS6on1B2T0gg1XD43aFIn4kmALhewCZoypnaGhjlhxIsg IswrPFeiK2/0Pf5nO8SWXTxkjVg/7zq13hZjtaG2W/+migHrs0sZtdqAvaz+MHSymZoYYd jU/UaaqBahin+g0ZAKQLeEt6ECJ4WkduA4W7yXqyJk2psQxNn4VlpJCDiEU+773HJx2ApL EaiZnwsdkH6HIHaOYAShtqopvxmfaVhgIK3BEPtEmACymSbOB4gB0GUA69q11w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719223175; a=rsa-sha256; cv=none; b=ksPyjJ0BHiUOcOHqstgPq0/2miL8AfPWh6QRIHs+GpJdf8L7Y0p3DrB7M2oxCnJIkak6mn BR2vkkPU7zdKdUcz+yyGaBU6OZk0FvFqmUDDgH+SxW/WcWYJvV7UWqErHwjgW9O8+vAb3i wPB8WWCnxxDtNLlziNhnszwJ4n0FenzXwNhc+3QFLWyoXZaA/GQOvPW7KkPAK5ZEnzNB1y X27gbkZJJDd1HqfJhO/2jwNAHrauwqf6XOpWXWfPS7gKEOPmkznB+1CPNzOy5xyXeXi0iy juXk1MIWIBE4FoWKx2nma+CDEx8eQpeTZOWlOgitd+qtXTPnuwS9PlHBgzIOXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719223175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+6a+rRkzPL1r6f+LVw+plCDtqmID3841Z4+IJdBY6Ik=; b=q4MVtldLVMWTRvc3ln9aAWiBL9VEkhAcPqZDiVjtaeo1hMgGiOlibW6PMdmiXKOKq+wMTA PoXLzGY7JLNHyx6vqDQy+AczqOI0n9bJDT3zxmpp3LO85/8K6V/7+COPRjt1l4qPPNYZar aUTJ//7BhjoadyhRlwccvLE3EtjB5YQX8/tKLIo8mEm+0O2s0MZoWX/PfQwpKDEorzX6zY r0IBiBfQg8ZNvLKZB3I43Eo4c/6ZgOcpBcKlee5R4t5E3Hejet0mCPkugVIn16PZp8Bwvg IAmnhZ3dsUf3eM1/3eNTiQFUOWvICV7XhTuTdFecgQXRTH28w2lAaBKAgLxS9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W73N74LwqzDq9; Mon, 24 Jun 2024 09:59: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 45O9xZlx097750; Mon, 24 Jun 2024 09:59:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O9xZi7097747; Mon, 24 Jun 2024 09:59:35 GMT (envelope-from git) Date: Mon, 24 Jun 2024 09:59:35 GMT Message-Id: <202406240959.45O9xZi7097747@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: 08a98731ddf4 - main - ip_mroute: Use NET_EPOCH_WAIT() macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 08a98731ddf4459bcee25074bdbc21d6fa5ce4ca Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=08a98731ddf4459bcee25074bdbc21d6fa5ce4ca commit 08a98731ddf4459bcee25074bdbc21d6fa5ce4ca Author: Zhenlei Huang AuthorDate: 2024-06-24 09:57:14 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-24 09:57:14 +0000 ip_mroute: Use NET_EPOCH_WAIT() macro This makes it easier to grep the usage. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45715 --- sys/netinet/ip_mroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index b864a4db5abc..afa199ce0691 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -768,7 +768,7 @@ X_ip_mrouter_done(void) * Wait for all epoch sections to complete to ensure * V_ip_mrouter = NULL is visible to others. */ - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); /* Stop and drain task queue */ taskqueue_block(V_task_queue); From nobody Mon Jun 24 09:59:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W73N86C1hz5NnX8; Mon, 24 Jun 2024 09:59: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 4W73N85hrFz4sNV; Mon, 24 Jun 2024 09:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719223176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MjBcuayw7acYFqEPhKW4L88U23Q7bY8kAnpO+ALY9n8=; b=Qii2lVqfZNpOkJGFxhdPpjurD08O/MXR8bvcckFlRLcFL9VCRXxRbAldevcoglM8lEtF++ lIDwIl/1d8npukpKWgntRQd51nLWtl+35PSZJ1eAJO8yv+ASgm3ehaV4123jgOPJPun1WK Mfa/K1HjSDia4dWZDXtVs2yn6UZLfNtlpn4vOgxmkC7zCd049LlDL5Q3dTDX/2od89Fw0u COWxbpTMCi/eEjYC0xGL6AQlaBrW5sNcb66q7CBE1+C19/zjT6rVevWboNfI2ONjxImdgz J3r+M5NmRr5i9tNExNFegKPYFNNeDhxwxMHvVMTCOOH9UkslVZt21wwpb11btA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719223176; a=rsa-sha256; cv=none; b=SYYJDqEeVySDV7jaYkt5UrOqwOoWP6V+giCaZUwAH5KYuKyOpFNEqOW0cnRDnNj9e0QaV9 7SBpSHVNN0fixoKXGe3KAc2/Mlz/d5G5BVjXWzHkW1ec6XY2EBWWz25uc6CVTK3Jby/KZb XSBkGW4shOO+wsai/7KE7CO8tzlmNCKmrl6WFM2VDK3aTOkGU6afDk/rZ9meOugTFizBF3 3q+WdGxcDdxnKDzP3b0mx5Opcz9BNLR4XZId7sV2XTd/icdN+FgBhC0Rsy3R2z/62Cp6sS kR++BjY1XEhsOsbDJm6yFf72be81XLfU44+iuPHxAGpXq9XOmel0i93WLNzSVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719223176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MjBcuayw7acYFqEPhKW4L88U23Q7bY8kAnpO+ALY9n8=; b=kyL1/WzczO3pH3tnJzJrHN8+Pftj8ItdAwqMvG515eN9RqbQqoCg1bZs7IGNIIPFqVSYiG WKvMbrrXfz/uN5gMlRjloEFSVopmC4zfAlfld1nnkQamTtnZ6B74pqb7LzFyokmjc1kgQA xl9U99W0uKeuCy4IAc7hqJJBrNLaXKx303ZsCOGIJbnUuJDrPG9fBoDoxYRxYIfQqlkJ3V 1kGhSItdUpSaP5NNhBEiiH5x0WRWGlgiX9Zrfh11Y29wY+PKvIOVrxFtoOh4NSRvj+5N1O uylyZvLM687DCcaU62MILh5lE1kbFcMuBo3YGtKRTjzM3PuAu0iDyyD7C7H4EA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W73N85KFhzDqB; Mon, 24 Jun 2024 09:59: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 45O9xaHw097792; Mon, 24 Jun 2024 09:59:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O9xauN097789; Mon, 24 Jun 2024 09:59:36 GMT (envelope-from git) Date: Mon, 24 Jun 2024 09:59:36 GMT Message-Id: <202406240959.45O9xauN097789@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: 71f8fbf9bda4 - main - ifnet: Use NET_EPOCH_WAIT() macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352 commit 71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352 Author: Zhenlei Huang AuthorDate: 2024-06-24 09:57:14 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-24 09:57:14 +0000 ifnet: Use NET_EPOCH_WAIT() macro This makes it easier to grep the usage. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45715 --- sys/net/if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index c3c27fbf678f..df405f088133 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -594,7 +594,7 @@ if_alloc_domain(u_char type, int numa_domain) old = ifindex_table; ck_pr_store_ptr(&ifindex_table, new); if_indexlim = newlim; - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); free(old, M_IFNET); } if (idx > if_index) @@ -1132,7 +1132,7 @@ if_detach_internal(struct ifnet *ifp, bool vmove) * At this point we know the interface still was on the ifnet list * and we removed it so we are in a stable state. */ - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); /* * Ensure all pending EPOCH(9) callbacks have been executed. This @@ -1544,7 +1544,7 @@ _if_delgroup_locked(struct ifnet *ifp, struct ifg_list *ifgl, } IFNET_WUNLOCK(); - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); EVENTHANDLER_INVOKE(group_change_event, groupname); if (freeifgl) { EVENTHANDLER_INVOKE(group_detach_event, ifgl->ifgl_group); From nobody Mon Jun 24 13:22:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W77tP685wz5P7Sl; Mon, 24 Jun 2024 13:22: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 4W77tP3Crmz40cX; Mon, 24 Jun 2024 13:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719235357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BX2ONq/joEkcQTflUiLGGzTGmYBtCpjQ06YW1iupeg=; b=GWc1IwIFqSFso7ONIv7kavyT7fhWBMK2aqlPcDRbnK73GKQ/4GQq/Jb7X+GsF3JiAjYX0C k1h2Sf6TgiXuTu6SdQjVIEilr5I6Yk9Vs2Ron5zoa2MRnQ8r0G2f1wLqY8dNFPS6+Vk3NA hXKKGy9y+A6byptPukMuTtyVrapO+t72gmWreMD9/Rj1yUUzTbXKFRS4bGF6A0pQ/Mo7Of /6yJ1wBUeKbIrCIkhMK5LKegh8JIQGkXuI560C6/3oKmlHYebJ3vGdsHHi9C6oJ7vY1tB4 uY+tvEXfUGMCEpj47OchdP7d/UGbZ936r48IdtZR4QZ9qoivXpdD8DLMx6ix2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719235357; a=rsa-sha256; cv=none; b=T47YCZ/NKH5+GagGKSSCCaDC/xt92ofNyBSWfLsnHaIDvyiSLNyoImhmng6Q4t3nEmXyyN RFTh+8qLJO5oUStSyNOb5N+H1G+srkqHprQCGbVifoQu7zMDYUwqqOBghtqyDB0ZVmJ9g5 EjJq78dNJzKN3jRL9zHYsUe0oMfsRpWviZ/OZbcm0ngpBBtv6HNN3PdhH2ZAEli9USRiAQ 8CHhSs6tFS5H9ZuIO7QszLSijHdFFkEfZYLfOYNuzExV0MBqRlhENU3d7vjaARufy/0Uzy DNsntMfIFmzf1erO33Jr/BczWftk+4TMGuhPAdwFPFq9o30TNcgLXv6J82L7Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719235357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BX2ONq/joEkcQTflUiLGGzTGmYBtCpjQ06YW1iupeg=; b=mtjh3prU/mksb+jIMjIXAnNMJHHa0iUkJvpmkhoUmvEXBv8M8AKeNPao2r5HKbLMwjK2D2 Wf2g4U/gRsMK5pQbIizizN4vEAq9NVE1l/LAplbhkJaOsawdGFnklj7wzEaOv2PwWVM+sm wHlaZ5d2FX1YQHyBc6arN4lizXOhW/Z4bSXwHmY9XT4/DtUqJgslbKX/HrDNAFNWAIiZf4 Z3dXHc2JRKE9plcEdwLf1+Xln3jr3VwJCZ+PslPyR7VlqZ20CJYzMtg0HAe0kWhRd/PyBO fi9gRCJ1Z883ovdbK4jBCAC5XsPiEHqij9TDLGN6VGKeYY8BMiPhr86+Q7KPKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W77tP2qQpzKdJ; Mon, 24 Jun 2024 13:22: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 45ODMbMl051942; Mon, 24 Jun 2024 13:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45ODMbUr051939; Mon, 24 Jun 2024 13:22:37 GMT (envelope-from git) Date: Mon, 24 Jun 2024 13:22:37 GMT Message-Id: <202406241322.45ODMbUr051939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: 332f00cdbafa - main - ti/am335x: Fix the device_set_descf() call in am335x_dmtimer_probe() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 332f00cdbafa944472a5c2d9d1701466ab762f90 Auto-Submitted: auto-generated The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=332f00cdbafa944472a5c2d9d1701466ab762f90 commit 332f00cdbafa944472a5c2d9d1701466ab762f90 Author: Oskar Holmlund AuthorDate: 2024-06-24 11:57:25 +0000 Commit: Oskar Holmlund CommitDate: 2024-06-24 11:57:25 +0000 ti/am335x: Fix the device_set_descf() call in am335x_dmtimer_probe() Fixes: 459dc61c8b05 ("arm: Convert drivers to use device_set_desc(f)()") Reviewed by: markj, imp, manu Approved by: markj, imp, manu (mentor) Differential Revision: https://reviews.freebsd.org/D45699 --- sys/arm/ti/am335x/am335x_dmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/ti/am335x/am335x_dmtimer.c b/sys/arm/ti/am335x/am335x_dmtimer.c index fde5f04875cc..7b97e0f611f9 100644 --- a/sys/arm/ti/am335x/am335x_dmtimer.c +++ b/sys/arm/ti/am335x/am335x_dmtimer.c @@ -275,7 +275,7 @@ am335x_dmtimer_probe(device_t dev) return (ENXIO); } - device_set_descf("AM335x DMTimer%d", tmr_num); + device_set_descf(dev, "AM335x DMTimer%d", tmr_num); return(BUS_PROBE_DEFAULT); } From nobody Mon Jun 24 13:40:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W78HX6qqHz5NvSM; Mon, 24 Jun 2024 13:40: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 4W78HX68dkz42LB; Mon, 24 Jun 2024 13:40:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719236456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LelMRpKdBwgdU5eGsbmhv+XXN/UAv+wuYgsR7e47GvQ=; b=w9FV+6ZJqvWAispmOlhcd/zTOBPNtE1TDdzqSOy2r1cDH09AHYbn2aojSy/GbOLvXZOeTR DxKS6hLrm48wVVJxuk5K08bBQ8KFHmdV0n+qZp4aebzEmQsjq70WU6cVVMbQmgTQOnM/3B 9Hp/xcmaFnZ1riURUS8CfiT/V+qUOVMuPqxoGeiBXrgUmdWLvN11vw2NK509HDmcXyq9P8 4ZFIag7DYBVp6WLmUm+qtkWQmjGl7cvMfs0W0R8aQeu5UuUH9z6ZT3p7CvtptgW4LRLFkO /OB6kD7tve2QR3IHfu8K7HRgJnEdxme0FUPjIx9qryl2Mme94Y6CBO6sor3xIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719236456; a=rsa-sha256; cv=none; b=MrSBYmFJl17hzOPn54/QQV9Cgd5KBJIy/LcdFHQTz/HHZte+8bnDU+QrqWFdBIO158oDms D4rdmuky9DcR1iIXcFwdI7w5l2I+hg+PJY/xsbuehYs/poa2Umx/WiOnNb+BbvGgoX+dVj Ex90Wb/sia2EjJmGDsrHR0rcckXoulJcPOgn42lSq29o4T4lFdYcHkdpQI5M1FH7upWceU IDOiPaECW6IQ59+e5nI3Zdbp5o4vaTrwleCz8W6f0l2PMD0HCPwxg4hvc+YZuBbSf3mC4x Z/tbIoSJlv5mPXg62mC/4MzpTp+WhuirLT42LbwIt8tm7LT77k2fK8AghZCV2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719236456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LelMRpKdBwgdU5eGsbmhv+XXN/UAv+wuYgsR7e47GvQ=; b=dY2uleovNQBBgRSRLtBWz5Nmm2UYn8TA+3p6akNUd23CK+NhPZzUjaXe2PdUV7BROzMuQl 0NBEHx2lpIzm6xzSg8pCkxGByAiIYVWAgXjEvAenZEdyF1oN+NYTL6FfktNwI1YafOEFCx s0UOvpNpZi1YhpQpHLrLYMB2bTSP9U9z3jl8QauGQ9YAtxAGuvuzwstmZCvjqkoVz2ozXp wZ/7IVMR53fETFmLUj78E1IrB17mcZfVNtDB8h4FF+3MQLgfekbUyApxpwGVL+ij4kAitZ tqC8zCla/APVOjf8hw6TZqmoPQVJxdQCND5LC9FmbCmwYk8ryvG3wzbhVnyTMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W78HX5lw1zKb9; Mon, 24 Jun 2024 13:40: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 45ODeuiT081422; Mon, 24 Jun 2024 13:40:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45ODeuX3081419; Mon, 24 Jun 2024 13:40:56 GMT (envelope-from git) Date: Mon, 24 Jun 2024 13:40:56 GMT Message-Id: <202406241340.45ODeuX3081419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: 56e4622588ed - main - p9fs: fix lookup of "." for lib9p-based 9P servers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56e4622588ed2eec0197ac47c3059d3db439f5c0 Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=56e4622588ed2eec0197ac47c3059d3db439f5c0 commit 56e4622588ed2eec0197ac47c3059d3db439f5c0 Author: Doug Rabson AuthorDate: 2024-06-24 11:22:57 +0000 Commit: Doug Rabson CommitDate: 2024-06-24 13:40:06 +0000 p9fs: fix lookup of "." for lib9p-based 9P servers The lib9p implementation takes a strict interpretation of the Twalk RPC call and returns an error for attempts to lookup ".". The workaround is to fake the lookup locally. Reviewed by: Val Packett MFC after: 3 months --- sys/fs/p9fs/p9fs_vnops.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c index d17d7624aef1..77162c0a4aff 100644 --- a/sys/fs/p9fs/p9fs_vnops.c +++ b/sys/fs/p9fs/p9fs_vnops.c @@ -243,6 +243,12 @@ p9fs_lookup(struct vop_lookup_args *ap) if (dnp == NULL) return (ENOENT); + if (cnp->cn_nameptr[0] == '.' && strlen(cnp->cn_nameptr) == 1) { + vref(dvp); + *vpp = dvp; + return (0); + } + vses = dnp->p9fs_ses; mp = vses->p9fs_mount; From nobody Mon Jun 24 14:53:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W79vf3nQ6z5P2cw; Mon, 24 Jun 2024 14:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W79vf33DFz48Sm; Mon, 24 Jun 2024 14:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719240830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4c/2ZjrIxOtC2+8UgcxLMqRCOoQTyyGvnN1LYPprR1M=; b=sUzsW8pzBj7rwPUM3DvSXN9dLqCC47b2sUaIJsmAfc3ELD/XJIK+Hp+yS90mP0+OsD+H9t maaTUzVpRgK8anzH/ic/rg2choHRBpnFhCOh1TbPy7VnolVdMRjI/7Smx9uxgPgulDqU2t qlLpnkjBFGah0HoCU84Vi6GfYHEEElB26eMLBHRg71Qb0lo5DxnwCG2+yeKx5Minx/L9ro IwqYfYnaqrWE2SrjNIZgK3l+o4XtLc5AhBZUrRMpO76SST8+MPqO34TVvwE0Rab2/7UhnD Teq8uSJq54KIKwnyt8Bi7ERoB5n/ZG/fEo1COTwv/XjpagkFEZnnIFui1IwLwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719240830; a=rsa-sha256; cv=none; b=IZeD/Dkc3xv/hwYjrE/2GGwmgyT4KjPmlOI7m2BebHO+vNOBVZJ2ZAUVAr2Xr/MPe/mKYT ws0dH0Of/1Y0dqysXI1FZ3ppcGWgBvcYdz8okePIpI/YktFnmyDOdyXgfqIrBiPz63uOV/ 4ZdFSHsQRL+CbXn9mQ/Z7IapNMnAJUXtIcdhWURqp9nhg3eskprnmJWT0bGAWfBv2HQMFV 6ES/Kru9PqURj3hBMrbcxexc+HQQX60UaVnWEu8vHl//eKqaomxl0BTFeuyOR3JwIVkJss UoFQSeJy/22/uKEsOWlBmAMdipzl9+XjKY/CKK8PlAYUMLdbScvAkj4VnxDkTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719240830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4c/2ZjrIxOtC2+8UgcxLMqRCOoQTyyGvnN1LYPprR1M=; b=tfQ6lKypqxLFbJiTejGE3Bj9EOgZPRXGDz4niqsGK4VWRM9EOhSNtPhaq6oZXHi/5us5I+ c8XO8Hm1JI3EgqH3F4QLdjYfRIatT/KN8G3gUrWbuaF7PEkjr40IcH2EPaRtx3ezKu9z7d fhwSdwDq2Wf+BvH0OUgl0WueReqcOSSOakqUOEPJb6VqzlzbJeG/Q4IByE6ctcUTCFLI8n cX4DpLis3dWBFN6+9SjPKm4rvpq5vbjcoCU/4D0+JclXTNPBY4yPmbC4qRnr4l2ZwSyj9V M1X7HJU/1KIp89qj9zNfXBvtGkXB3zEgBctbb1E33LPlsOtpLJypgOUsnDjvPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W79vf2fPtzMSp; Mon, 24 Jun 2024 14:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45OEroAH004609; Mon, 24 Jun 2024 14:53:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OEroJT004606; Mon, 24 Jun 2024 14:53:50 GMT (envelope-from git) Date: Mon, 24 Jun 2024 14:53:50 GMT Message-Id: <202406241453.45OEroJT004606@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: b75d14d6005b - main - procfs.4: Fix the description of credential info in the "status" file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b75d14d6005b36fe8ea90cadc027272eb06d1bc5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b75d14d6005b36fe8ea90cadc027272eb06d1bc5 commit b75d14d6005b36fe8ea90cadc027272eb06d1bc5 Author: Mark Johnston AuthorDate: 2024-06-24 14:46:36 +0000 Commit: Mark Johnston CommitDate: 2024-06-24 14:46:36 +0000 procfs.4: Fix the description of credential info in the "status" file The 11th and 12th columns are the effective and real UIDs, respectively. The 13th column is a group list whose first member is the effective GID. Reviewed by: arrowd MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45700 --- share/man/man4/procfs.4 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/share/man/man4/procfs.4 b/share/man/man4/procfs.4 index 64dd3100e6bc..5a588004e37e 100644 --- a/share/man/man4/procfs.4 +++ b/share/man/man4/procfs.4 @@ -1,7 +1,7 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.Dd April 10, 2023 +.Dd June 23, 2024 .Dt PROCFS 4 .Os .Sh NAME @@ -229,11 +229,11 @@ comma separated. .It the wait channel message .It -the process credentials consisting of -the effective user id -and the list of groups (whose first member -is the effective group id) -all comma separated. +the process effective UID +.It +the process real UID +.It +group list, starting with the effective GID, comma-separated .It the hostname of the jail in which the process runs, or .Ql - From nobody Mon Jun 24 14:53:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W79vg5MgKz5P2rX; Mon, 24 Jun 2024 14:53: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 4W79vg48F4z48Ss; Mon, 24 Jun 2024 14:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719240831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8sS+BsFpg7OxcAMXod7goKQAEtLLJQulePXdmfIydvA=; b=ZyFfsOslXwO5eWPPUr/ddo/FzLxPGWdlOxKZ1dzeNNQLExzsApwHABTVRCGRbIpyYLUR0v 6gCbQPPglqCWdbdfhhaDLY4DM4Yi1+Xog4CwCLhfiWXuu1NBHdA2x5joDtaAb6spZWcKpu eWG6DDjTTVepnYfiDY04SLecqakl6RveZjffJGPPGcs2NPUvlbMYxIvHv97HHG1qZ9YZ+t MEX6cpyNKvQiPYlWBKFxOYvhPF+U/EqgLhV11MHsp0NoqSVsUjFe/APzFXInAtjAuiIFMC nOqS8JxtxyqObP33aWQS4YCxc2ZRVJPqS21UjLwLp3giIlQVA1w2P/B5SUVjZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719240831; a=rsa-sha256; cv=none; b=waOi0WtcJej8+R3PyU1ZvSEOvusBV9E/4wPjgleLfnQfFI6GEiaZMibeP/y5CbcYS4Qigl wkxlApikjPB1DCDIiZXiqgDHQolUpElPSpNs539SLnIcvORbcGBlkLUT4YnPsbBEavqxl1 +gLd+1bBOMIAnHLrvYOcQdWU3QXpAh5Vcm6ani/mHkkdz/AhyjbGDQutbuHhKux3RkpE9g YoRYh+foU8PZKavriVBFveV5IHGWpM0mLyyjAUp70abSK4GQgOwOmLAHi/3FN9Ul+Aa2sa IGbAA/Z/hSLpfcmq6bX2YqrBNuaEY3zIZKJiiQn/OF5GT5MlRqa24wiRNkcQmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719240831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8sS+BsFpg7OxcAMXod7goKQAEtLLJQulePXdmfIydvA=; b=SC9xm4WEQEzheJABPSz2WTzQ82ZOnYGRH0NEPB5O7v3PI23f0pA6Np/4mrJklrA7S5aA74 2VbecYaz5XlJw1UcJQJGMReVJkgUoGLNezogGAk0jrHkTYkAAUdokWEtnSFpVdeDlGGr84 /aJRcclVlb+hDnimnfCPSXuvUjbu3SrkUNzedkwkm/Z+HkrN2s8dZ20qCUlYPA1aO8rd3b 1ZkDgvUXoxcvItbHktdWy+h844tnWsOEFa+CCprEdWIDDnfxV86yYg1V7Rr26hSPLNpuUm ORDArmvW23L0waJJxw1UwKR+DCJheIqaTLM0HwQhYfPL/dpjbrA6C+lUGywLnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W79vg3mdvzNDH; Mon, 24 Jun 2024 14:53: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 45OErpPf004660; Mon, 24 Jun 2024 14:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OErpXk004657; Mon, 24 Jun 2024 14:53:51 GMT (envelope-from git) Date: Mon, 24 Jun 2024 14:53:51 GMT Message-Id: <202406241453.45OErpXk004657@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: 66b8cac8d837 - main - pf: Sprinkle const qualifiers in state lookup routines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 66b8cac8d837c0ca3fd38d0a66259ca932a1c430 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66b8cac8d837c0ca3fd38d0a66259ca932a1c430 commit 66b8cac8d837c0ca3fd38d0a66259ca932a1c430 Author: Mark Johnston AuthorDate: 2024-06-24 14:46:55 +0000 Commit: Mark Johnston CommitDate: 2024-06-24 14:46:55 +0000 pf: Sprinkle const qualifiers in state lookup routines State keys are trivially const in lookup routines, so annotate them as such. No functional change intended. Reviewed by: kp MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D45671 --- sys/net/pfvar.h | 8 +++++--- sys/netpfil/pf/pf.c | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 62c367fe6a29..0b90600a69ae 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2273,9 +2273,11 @@ pf_get_time(void) } extern struct pf_kstate *pf_find_state_byid(uint64_t, uint32_t); -extern struct pf_kstate *pf_find_state_all(struct pf_state_key_cmp *, +extern struct pf_kstate *pf_find_state_all( + const struct pf_state_key_cmp *, u_int, int *); -extern bool pf_find_state_all_exists(struct pf_state_key_cmp *, +extern bool pf_find_state_all_exists( + const struct pf_state_key_cmp *, u_int); extern struct pf_ksrc_node *pf_find_src_node(struct pf_addr *, struct pf_krule *, sa_family_t, @@ -2569,7 +2571,7 @@ struct pf_krule *pf_get_translation(struct pf_pdesc *, struct mbuf *, struct pf_state_key *pf_state_key_setup(struct pf_pdesc *, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t); -struct pf_state_key *pf_state_key_clone(struct pf_state_key *); +struct pf_state_key *pf_state_key_clone(const struct pf_state_key *); void pf_rule_to_actions(struct pf_krule *, struct pf_rule_actions *); int pf_normalize_mss(struct mbuf *m, int off, diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index edb95d7ef0ec..1e3f09783e40 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -363,7 +363,7 @@ static void pf_print_state_parts(struct pf_kstate *, static void pf_patch_8(struct mbuf *, u_int16_t *, u_int8_t *, u_int8_t, bool, u_int8_t); static struct pf_kstate *pf_find_state(struct pfi_kkif *, - struct pf_state_key_cmp *, u_int); + const struct pf_state_key_cmp *, u_int); static int pf_src_connlimit(struct pf_kstate **); static void pf_overload_task(void *v, int pending); static u_short pf_insert_src_node(struct pf_ksrc_node **, @@ -654,11 +654,11 @@ pf_packet_rework_nat(struct mbuf *m, struct pf_pdesc *pd, int off, } static __inline uint32_t -pf_hashkey(struct pf_state_key *sk) +pf_hashkey(const struct pf_state_key *sk) { uint32_t h; - h = murmur3_32_hash32((uint32_t *)sk, + h = murmur3_32_hash32((const uint32_t *)sk, sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), V_pf_hashseed); @@ -1506,7 +1506,7 @@ pf_state_key_setup(struct pf_pdesc *pd, struct pf_addr *saddr, } struct pf_state_key * -pf_state_key_clone(struct pf_state_key *orig) +pf_state_key_clone(const struct pf_state_key *orig) { struct pf_state_key *sk; @@ -1607,7 +1607,8 @@ pf_find_state_byid(uint64_t id, uint32_t creatorid) * Returns with ID hash slot locked on success. */ static struct pf_kstate * -pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) +pf_find_state(struct pfi_kkif *kif, const struct pf_state_key_cmp *key, + u_int dir) { struct pf_keyhash *kh; struct pf_state_key *sk; @@ -1616,7 +1617,7 @@ pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); - kh = &V_pf_keyhash[pf_hashkey((struct pf_state_key *)key)]; + kh = &V_pf_keyhash[pf_hashkey((const struct pf_state_key *)key)]; PF_HASHROW_LOCK(kh); LIST_FOREACH(sk, &kh->keys, entry) @@ -1654,7 +1655,7 @@ pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) * Returns with ID hash slot locked on success. */ struct pf_kstate * -pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) +pf_find_state_all(const struct pf_state_key_cmp *key, u_int dir, int *more) { struct pf_keyhash *kh; struct pf_state_key *sk; @@ -1663,7 +1664,7 @@ pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); - kh = &V_pf_keyhash[pf_hashkey((struct pf_state_key *)key)]; + kh = &V_pf_keyhash[pf_hashkey((const struct pf_state_key *)key)]; PF_HASHROW_LOCK(kh); LIST_FOREACH(sk, &kh->keys, entry) @@ -1720,7 +1721,7 @@ second_run: * removing it. */ bool -pf_find_state_all_exists(struct pf_state_key_cmp *key, u_int dir) +pf_find_state_all_exists(const struct pf_state_key_cmp *key, u_int dir) { struct pf_kstate *s; From nobody Mon Jun 24 14:53:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W79vj32Jtz5P2rY; Mon, 24 Jun 2024 14: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 4W79vh612Tz48cD; Mon, 24 Jun 2024 14:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719240832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDU7sxxYaCd+27HwntGSHtc10EHVUHxG64pozCj/CNU=; b=yxfMaBghIN6URZbtFYSsDJp+ASesBopj1sivKVyfkrcRuFrgC0iwepi7MGgfwBQK39WvWi tSZ80ULdxYv4wzTt01AnBj3iLAkraO51TKaqdo6pf5mBeoqOydT/SwXiBg7E5GNmEHqHms +GC1AR/+5Fi44g9qv63MgspboVhj4U36HctFkHvFLP9y1s6TrToI0ModiBYQuCJHHPxwrW sxbXh/D9LizgHO0aTprVSNSsIzSyRNvfp7FODEq2oFZYGuR9SPUsTyO7jyk9ngX7h//KkN HcoqrMn5zCSequSIofVm7MTj3Dltipyq++HI9EfLsuLaYwz5Rw9xg7sCiKciYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719240832; a=rsa-sha256; cv=none; b=gN6/yZ6BBLnIjmh0wODP29lJcWEyXQ622bgYx/6YbuNJ9kpiJBR2+KOdgfUDSrxHm0RkXW chm80V0Ce2YGvAIk1AhFXQTRF5Su+CiN64whkhJEPhG2bNWICh6w7qBhT0xXbanIqwfiaZ 7SRDEQRP7SusterLjZZWqfqFnMct0EjywzfQefVD0wyaNA8Dz1jgyamniekJ7D6dCbW1RM aHchG4UbJ7d/I7fsSgJKQ5aeB+G9gO3bzP05rP5r7TpzGXA7LhHBRIzLHAQxZZrXkKyyyP XXTEoIDBw8blW35ig8sxOAmQGamxXZD36dmSalY1Kte9LCpTUts7azSfF8pUdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719240832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDU7sxxYaCd+27HwntGSHtc10EHVUHxG64pozCj/CNU=; b=E/oTC2Ip5KCZ5ldByQrqPYEYyZgRg9Y7nWhRov5Jj78O+WaIxDStuJYc/DfnIUwDhsBhdr ZrVWBaildZRRLtief7XvjGy1g8e/mXyFqUaJfZWfjNb14Yd6o52e6pBKIet0YbEPvo7iA6 ng4tM96FxnoP6LH2zzSbBFNnyCDRrbyV/+meqkFNb/ai4OkadkgsKbjkbR5ITi1j3R2KbI 7oYTE5EhBGBWxInM1yVnySVJMEEnhih2frl77Y9S9vamUsjU3ie7DVa9vriBbXc1VzMbSd GEXLEAQCAFvPNzLTHkMpqtNN/I4pKSZ/plSoZannvbxVjMVUb0eNQJSSroV6+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 4W79vh4kYCzN4T; Mon, 24 Jun 2024 14:53: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 45OErq81004703; Mon, 24 Jun 2024 14:53:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OErqHO004700; Mon, 24 Jun 2024 14:53:52 GMT (envelope-from git) Date: Mon, 24 Jun 2024 14:53:52 GMT Message-Id: <202406241453.45OErqHO004700@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: 02cbf9ebf110 - main - lagg: Fix a teardown race List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 02cbf9ebf110c94ec9e60f0801716ff0a75e55e5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=02cbf9ebf110c94ec9e60f0801716ff0a75e55e5 commit 02cbf9ebf110c94ec9e60f0801716ff0a75e55e5 Author: Mark Johnston AuthorDate: 2024-06-24 14:47:29 +0000 Commit: Mark Johnston CommitDate: 2024-06-24 14:47:29 +0000 lagg: Fix a teardown race When a lagg interface is destroyed, it destroys all of the lagg ports, which triggers an asynchronous link state change handler. This in turn may generate a netlink message, a portion of which requires netlink to invoke the SIOCGIFMEDIA ioctl of the lagg interface, which involves scanning the list of interface media. This list is not internally locked, it requires the interface driver to provide some kind of synchronization. Shortly after the link state notification has been raised, the lagg interface detaches itself from the network stack. As a part of this, it blocks in order to wait for link state handlers to drain, but before that it destroys the interface media list. Reverse this order of operations so that the link state change handlers drain first, avoiding a use-after-free that is very occasionally triggered by lagg stress tests. This matches other ethernet drivers in the tree. MFC after: 2 weeks --- sys/net/if_lagg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index bb882ac819ad..e323bb01b977 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -643,8 +643,8 @@ lagg_clone_destroy(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags) switch (ifp->if_type) { case IFT_ETHER: - ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); + ifmedia_removeall(&sc->sc_media); break; case IFT_INFINIBAND: infiniband_ifdetach(ifp); From nobody Mon Jun 24 15:17:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7BR551glz5P4m2; Mon, 24 Jun 2024 15:17: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 4W7BR54JCnz4Ftp; Mon, 24 Jun 2024 15:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719242257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KZG3oUNEw7usNWJTtrYFXRMyVBBFZNVl9zqJY8+YxjI=; b=dnOp7wXpgt5h9W+0xWNuBmch6D0U2CD7pqXH4MkKN8sFANhsz5yzt/cOFaDQK1KyQN2l+3 1QiY/dkljkP6D3Rd9oZAemPoGLMLFmiBJsdibcQAj+ZhCfJGo45vp7GetT3h18B6GCU6SM gKXN9I5JHLyuMJzCpqutrQsb12Jb17hPyLHoZVfQmir8VCVvN3ljIAKJmkOnNxHNHcnFMB qBPsRWhnN+5MyWQn7E9xlzp5ab4I0UP15Ize96idjp88r1xElxhvk+002RTf2xP/l8Beg5 CU3oreT70PRAeY8RXdyiZsCIWlQtlUzYcd0FFLOfmL9KVwLiXCS0ohjclskZnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719242257; a=rsa-sha256; cv=none; b=tiMsg1IcqsVPMa0zGuEU5fQNdyoOvHXityXJIV4BodBgjNTTGUcWTyxsIhxkF7WOgGkZdM xlrxxHAeKMdLNYBYINxgFra35lwoFFFViI5X0h4YSEK4deuDdbPLjqWeakeZj61kX3BuJJ gWo5pvg9Do6WA9XB99PJ+lnn2mGXkxGfuA31P1dS49PZFSfqkjr+qmHrkIoHn/mn7s2rIJ A+Iu9UDA014sJLfRyZSpKjp6aj+4CQclqEmudcyINZMelIO2UOI9yXqofFTgm4GrDQ+3i9 r+Ey6tZ8m6LmcrRQiEFbpSOw3c3GVuF98p36igEi23dzvOUx56LY7U+rdAjVug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719242257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KZG3oUNEw7usNWJTtrYFXRMyVBBFZNVl9zqJY8+YxjI=; b=xT/Bv2O1+UyttaJwfiNzGCan1dx8jf/fIKmjZbv0wFsDAn6TftcLmDG5lLGil9qvsKd5yj 78kCfQ3DwwYOoXsKbxi5BWK9ue4QmhzS6GF/cz8Uu4PRoEJyd4+KK7JLHsEYn3n8Z7pSw+ KlLino+ohu1aRa1AMt2xja3AzlgYK4D5Talof4+m0ZZcbNBvAun60OqUVHTxlJdbXe7QNc /PkDsWI5rvgMhhLeqjs1uqZ3k7hAfcNbTgbCLP7BZe97I7ZnsP8iGto/nRIIMiuiw4tcGC +92FMlUz/JMoX4+M3/JFu4jwIDuIpRcilhSyLAxGT3LhOQUTNuKkPIorxuOIaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7BR53n88zNSw; Mon, 24 Jun 2024 15:17: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 45OFHb3q038973; Mon, 24 Jun 2024 15:17:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OFHbNP038970; Mon, 24 Jun 2024 15:17:37 GMT (envelope-from git) Date: Mon, 24 Jun 2024 15:17:37 GMT Message-Id: <202406241517.45OFHbNP038970@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: a1608e8854da - main - ctladm: add a copyright header to the port test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a1608e8854da7f3b5734c2fcb85dd740733a08e6 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=a1608e8854da7f3b5734c2fcb85dd740733a08e6 commit a1608e8854da7f3b5734c2fcb85dd740733a08e6 Author: Alan Somers AuthorDate: 2024-06-24 15:15:07 +0000 Commit: Alan Somers CommitDate: 2024-06-24 15:17:27 +0000 ctladm: add a copyright header to the port test [skip ci] MFC with: 9747d11d91642cb9b81602d88e8aebeb388543c7 Reported by: markj Sponsored by: Axcient --- usr.sbin/ctladm/tests/port.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index 139e1a7d29a0..633dec2fd273 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -1,3 +1,28 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Axcient +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS DOCUMENTATION 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. + # Things that aren't tested due to lack of kernel support: # * Creating camsim ports # * Creating tpc ports From nobody Mon Jun 24 15:24:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Bc35f5Gz5P609 for ; Mon, 24 Jun 2024 15:25:23 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from sonic309-20.consmr.mail.ne1.yahoo.com (sonic309-20.consmr.mail.ne1.yahoo.com [66.163.184.146]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7Bc33gtjz4GnT for ; Mon, 24 Jun 2024 15:25:23 +0000 (UTC) (envelope-from pfg@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1719242721; bh=3x0UdVOzsqmMZF059NTnNnK3vQAXbKF/SXP+U5YUDsI=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=TcFAGALy41TREBcp4/pdKFdJQeuPb5t77/eASHMCcKJGVR5B7U/5/bIPmRdA61Frk9bfxM1tKx/DvG9/dOgtzw2ZBeki2pY+yf0WgDI8zbOSQYlRxtYEckZyoXwATPRIfMepMiiePafSk17dtAXfpmzHO8cGIR0AVM4uSz0V+Mvj37V32pbqbkWfv6TyRIkrMbG+MRCH3etA60eUMLBJYRX9y7LbEfaFIvFl6IyD8sJkhJ420Oy3bcnDC8d9PKVUnV2BpfGDx40CmDah+PIzHif32Huf9rHrPRJlg23L6MOZb0ewEHZqqaLmY5dJaPN7wA9q2+jVkcLctX1JneHZ7Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1719242721; bh=youIW00OXP2L/jFn3ar/fT6Woud4u6jfYk8lRAFe45m=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=Jeux7qU54IKmGFBFnv0csgSGxOfp/XdRHR8fiCRs86tk5noVt8509wENUvRb/pEUejMtooyoAduQT/usrKHYSDZepkqYYit/b5KnSq51wm9yV4FAN4oh89F9w5NGfTVQwGKQsyY5RgUAy4kU4eEJTQKOYHVk30GyqEMPWmPkR3ldqxz0bX1iBYcxDKTRlAZdbpMdULwFZXaH2meDPUsJl+l1J4QNGESIkgsZAxN6pUgMlltICfVyNVsvD3wS/SQ5J9uw73OkajZRMdtLFSKesr90PCPqyRwEp74CF12udWPO9iEkSBNGE5EKnWjKHHHIprJ4VIy3eQhOCTGQoULChA== X-YMail-OSG: yn0vNq0VM1npeVoHW0wTmj.cZPrjD2eb00satW34u2xMAVslRmgTeXcOHOE_7zg lw9O9PbMuEmuU1UeYdMwDva0c75H_6ZEmuiMOi8f1qklpWZp0ajj.Epq10UaFOAkGwO0GyOfEvpl Ww_jfo5NPakICwVXD0yLQ1t5qi1tkybYgH60nGOLEJCFZVpDbGZne5KguOh_S1Ym8DZW1yaYWwgL e4sdihC5INuXcql7bzw5KM7bI5oUMvUdsIWPr2K64LdYCMF68ANiJ6_.0_g317dKnui6lS9ghnNR Z4FKhMdHyB0jbCluAjyyDXrvCHOaGNRoZDxeLEs5lzkXko6oz8OMlifOoCelRfrZvFyNppZhrhyC kAHP6pI4UWIiwSUv9A3eiyn207nWhgNVBijS37oSdegXXViWFaXXiBYh.N8DKEut4KLzQvdEVkmI m8kC1i.CJ7kAxOKT32cWPcPykc.GkxCEMNPaWwzyCyaEkXXkouqLhqqheRqxi.nKES2FdkzYqtw2 V_DizWXflUP135ZlI4YXPNez3V1EfTRCYM4qOM4iFyhZ4SMn4tc9f.k5EeyCp2_KrT3JqFkd8mcs wSE9q9d5I_9aE.4AaVVIQk9nluARXrKpGo5X1ixE1.tESJ6Z5y7xqm1mLTwsysIZ5jeJT8bPx2NC Q6I0Effq_cK08jj3qOwtBhy1wSYd4K4tR598cfb8EAi7dXj194ixPgXmJo1UfUfhaxG.871EL5hX 4Zc08pCkyrpWfqhwSHB6BLEIM5ZJ2aGsJjLPoAbZ7NJBjF8S1aYpB78VufvBmNxRQoRGEqhZ_jLf Iibx.mdxNozT8CPCIKXFXhCT166XgnH8OPgwiVoCcgNPS.L0gBSYB1roCCpbXkoOsvs09PrmjY87 B18aIHUTsPmUVmx7s0JIVhmARP7WdOXsf8huD8ZK68ZZ2CLPEhIQyB15R4YDMiuDN.oFycfNCNGR nIr7T5G6OF2DOeSduuSey8ngwufyTngVP4OGFna1L8A_DO7NHtd7NPLQ07t_32AJG._8jLkqVbpX HfXiDYhzqt2uP.NnwV9CS3zNn3fS31IHgtT46m3koZZxGPV3Bm5iXZ_W.CgvAJSKJCXIAs0oId9h SWZO4qtH_z_TkYrp7Z_DP7f8m0kTKC85dP7rcSvGPUYVTHeyXW2_GA2SGb6QKaoYkN3H0Lbd.4bY hbwcEkTanZkoZQy46cuJPuUMyppuCRua6JaLyWpoiMzkQ3BiwXzUgEQJvJ1DAcg4YttK.jQA6VPD 7ioJVK96iEuRqpjtGb9McT2.F49L9a3OqTjbDClHnIWHs4ECmpQUVjc9kd6xBlmBZxNTOR3a0q_Z bB8ttRWVHO2EM0VhYYv80Z10TYn8boaWSRGcJedMV1_cipUVTYd28nnbDeVujgEvaXD4ly8u7VUl vraWTwQfa_R595hgWZCITZfGPt_QHsyKIuAxePBleG4FtlhTiwB031v5AIR2I3MiNAMTG1DubFtG fT4.3j81FM17VZoeNTCJkl_gBesyRrDioluIM70LqE7tehSt.ywkmMUuJ0ri8Dlgw15u8DzuCxBS odlYj_T0zrlstNc7vmj4WiXVN0eYgTBfFyP9ciZnbX3VsX.ffu.1eizEBzoJLDWTgVacYgtZR_IU sCOtfrvSrocXb0nW.4DG7wjNCVGpQpXuCtA3E_l0VwQzaUnN8rlYz3Ba.kPgj6CAcMuE5NvlZkE8 yQ69p8nb9cIEhEC34gko6rZ8v5F.RZsLq0rzJ547bvbd.5kSRHQn0feFvZylIggdkEktop8VPwUt FjeT2FOyuAgB4xbQvLCud0A2M5uS_.LxbMScPcdgEzOJsLeca_Cv4N8ocV4XfYLLXZymUaiIs_EB BYTcgxtazILxntIpwkyB0PASy70FzeFlwBPhnBP6T5rp16mIE.M2q77IRvAKKLJuVrcwx5WBgOIg VtQp0IfHILpKRPorTa90YyM8PwlqMOAiahpzDufB0MzDilpBU0lfAS96rcq71JIbaVOGL3OYs2d8 f9QTW_bE9ePXZcow.Veu6xK1Qk6G_ASG5uZGVrJYRmfoPyuTftOacmQHu7rfFwPOMjGi0FGCRi1i xGhEVLexz9oZn1w_Nsx5iX3y5lBQ57vLwsuGqRxuQxLdtiJro7PIqB.j1rY0VowHzfZNyZhghQTG Zw5Mp5BFWSLDGocdY9.D5g_15bRuLLpYkLxlDd1YJCLE18_8jgRY6TpUCZMnbiEG9P97N X-Sonic-MF: X-Sonic-ID: 708e87f9-24e6-46bb-98d1-f77cc9052597 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Mon, 24 Jun 2024 15:25:21 +0000 Date: Mon, 24 Jun 2024 15:24:05 +0000 (UTC) From: Pedro Giffuni To: Warner Losh Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Warner Losh Message-ID: <62379069.705510.1719242645494@mail.yahoo.com> In-Reply-To: References: <202406210241.45L2fQZA057110@gitrepo.freebsd.org> <111875645.165697.1719082066518@mail.yahoo.com> Subject: Re: git: d5c01e1124ff - main - cdefs.h: Remove pre gcc 5.0 support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_705509_2096953705.1719242645490" X-Mailer: WebService/1.1.22407 YMailNorrin 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:36646, ipnet:66.163.184.0/21, country:US] X-Rspamd-Queue-Id: 4W7Bc33gtjz4GnT ------=_Part_705509_2096953705.1719242645490 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I do welcome the cleanup, of course, just I would have defined GCC 4.2 as = the breaking point instead of 5.0. Due basically to the licensing issues, GCC 4.2 became a natural reference f= or GCC versions.=C2=A0 At some point there were vendors actually shipping F= reeBSD with GCC 4.2, and it was not a huge cost to keep GCC versions above = 4.2 properly discriminated. But then you are right that it doesn't really matter that much. At least th= e alloc_size attributes are only defined for the FORTIFY_SOURCE in some lin= ux libc implementation that I looked at. We define them unconditionally but= I don't recall them being useful. Just my $0.02. Pedro. On Sunday, June 23, 2024 at 06:45:42 PM GMT-5, Warner Losh wrote: =20 =20 Indeed. But none of the ones that I removed are affected by this quirk sin= ce they are true for clang all versions. Warner On Sat, Jun 22, 2024 at 12:47=E2=80=AFPM Pedro Giffuni wr= ote: It was long ago when I last touched this but FWIW ... clang used to report itself as GCC 4.2 and kept it's GCC extension support = level consistent with that version so these version numbers were relevant. Pedro. On Thursday, June 20, 2024 at 09:41:34 PM GMT-5, Warner Losh wrote: =20 =20 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd5c01e1124ffa4adb2513e7e8d70= 8d7072dbfc75 commit d5c01e1124ffa4adb2513e7e8d708d7072dbfc75 Author:=C2=A0 =C2=A0 Warner Losh AuthorDate: 2024-06-20 23:03:15 +0000 Commit:=C2=A0 =C2=A0 Warner Losh CommitDate: 2024-06-21 02:41:09 +0000 =C2=A0 =C2=A0 cdefs.h: Remove pre gcc 5.0 support =C2=A0 =C2=A0=20 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 brooks =C2=A0 =C2=A0 Differential Revision:=C2=A0 https://reviews.freebsd.org/D456= 56 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Netflix --- sys/sys/cdefs.h | 54 -----------------------------------------------------= - 1 file changed, 54 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index a6ecdca5d8b9..43d179b82020 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -164,18 +164,9 @@ #define=C2=A0=C2=A0=C2=A0 __aligned(x)=C2=A0=C2=A0=C2=A0 __attribute__((__= aligned__(x))) #define=C2=A0=C2=A0=C2=A0 __section(x)=C2=A0=C2=A0=C2=A0 __attribute__((__= section__(x))) #define=C2=A0=C2=A0=C2=A0 __writeonly=C2=A0=C2=A0=C2=A0 __unused -#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) #define=C2=A0=C2=A0=C2=A0 __alloc_size(x)=C2=A0=C2=A0=C2=A0 __attribute__(= (__alloc_size__(x))) #define=C2=A0=C2=A0=C2=A0 __alloc_size2(n, x)=C2=A0=C2=A0=C2=A0 __attribut= e__((__alloc_size__(n, x))) -#else -#define=C2=A0=C2=A0=C2=A0 __alloc_size(x) -#define=C2=A0=C2=A0=C2=A0 __alloc_size2(n, x) -#endif -#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) #define=C2=A0=C2=A0=C2=A0 __alloc_align(x)=C2=A0=C2=A0=C2=A0 __attribute__= ((__alloc_align__(x))) -#else -#define=C2=A0=C2=A0=C2=A0 __alloc_align(x) -#endif =20 /* =C2=A0 * Keywords added in C11. @@ -199,15 +190,6 @@ #define=C2=A0=C2=A0=C2=A0 _Alignof(x)=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0= __alignof(x) #endif =20 -#if !defined(__cplusplus) && !__has_extension(c_atomic) && \ -=C2=A0=C2=A0=C2=A0 !__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7) -/* - * No native support for _Atomic(). Place object in structure to prevent - * most forms of direct non-atomic access. - */ -#define=C2=A0=C2=A0=C2=A0 _Atomic(T)=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 = struct { T volatile __val; } -#endif - #if defined(__cplusplus) && __cplusplus >=3D 201103L #define=C2=A0=C2=A0=C2=A0 _Noreturn=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 [= [noreturn]] #else @@ -218,15 +200,6 @@ #if (defined(__cplusplus) && __cplusplus >=3D 201103L) || \ =C2=A0 =C2=A0 __has_extension(cxx_static_assert) #define=C2=A0=C2=A0=C2=A0 _Static_assert(x, y)=C2=A0=C2=A0=C2=A0 static_as= sert(x, y) -#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) -/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ -#elif defined(__COUNTER__) -#define=C2=A0=C2=A0=C2=A0 _Static_assert(x, y)=C2=A0=C2=A0=C2=A0 __Static_= assert(x, __COUNTER__) -#define=C2=A0=C2=A0=C2=A0 __Static_assert(x, y)=C2=A0=C2=A0=C2=A0 ___Stati= c_assert(x, y) -#define=C2=A0=C2=A0=C2=A0 ___Static_assert(x, y)=C2=A0=C2=A0=C2=A0 typedef= char __assert_ ## y[(x) ? 1 : -1] \ -=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2= =A0 __unused -#else -#define=C2=A0=C2=A0=C2=A0 _Static_assert(x, y)=C2=A0=C2=A0=C2=A0 struct __= hack #endif #endif =20 @@ -276,7 +249,6 @@ =C2=A0 * void bar(int myArray[__min_size(10)]); =C2=A0 */ #if !defined(__cplusplus) && \ -=C2=A0 =C2=A0 (defined(__clang__) || __GNUC_PREREQ__(4, 6)) && \ =C2=A0 =C2=A0 (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >=3D 199901)= ) #define __min_size(x)=C2=A0=C2=A0=C2=A0 static (x) #else @@ -302,17 +274,9 @@ #define=C2=A0=C2=A0=C2=A0 __result_use_or_ignore_check #endif /* !__clang__ */ =20 -#if __GNUC_PREREQ__(4, 1) #define=C2=A0=C2=A0=C2=A0 __returns_twice=C2=A0=C2=A0=C2=A0 __attribute__(= (__returns_twice__)) -#else -#define=C2=A0=C2=A0=C2=A0 __returns_twice -#endif =20 -#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) #define=C2=A0=C2=A0=C2=A0 __unreachable()=C2=A0=C2=A0=C2=A0 __builtin_unre= achable() -#else -#define=C2=A0=C2=A0=C2=A0 __unreachable()=C2=A0=C2=A0=C2=A0 ((void)0) -#endif =20 #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >=3D 199901 #define=C2=A0=C2=A0=C2=A0 __LONG_LONG_SUPPORTED @@ -353,33 +317,15 @@ #define=C2=A0=C2=A0=C2=A0 __predict_true(exp)=C2=A0 =C2=A0 __builtin_expec= t((exp), 1) #define=C2=A0=C2=A0=C2=A0 __predict_false(exp)=C2=A0 =C2=A0 __builtin_expe= ct((exp), 0) =20 -#if __GNUC_PREREQ__(4, 0) #define=C2=A0=C2=A0=C2=A0 __null_sentinel=C2=A0=C2=A0=C2=A0 __attribute__(= (__sentinel__)) #define=C2=A0=C2=A0=C2=A0 __exported=C2=A0=C2=A0=C2=A0 __attribute__((__vi= sibility__("default"))) #define=C2=A0=C2=A0=C2=A0 __hidden=C2=A0=C2=A0=C2=A0 __attribute__((__visi= bility__("hidden"))) -#else -#define=C2=A0=C2=A0=C2=A0 __null_sentinel -#define=C2=A0=C2=A0=C2=A0 __exported -#define=C2=A0=C2=A0=C2=A0 __hidden -#endif =20 /* =C2=A0 * We define this here since , , and =C2=A0 * require it. =C2=A0 */ -#if __GNUC_PREREQ__(4, 1) #define=C2=A0=C2=A0=C2=A0 __offsetof(type, field)=C2=A0=C2=A0=C2=A0 __buil= tin_offsetof(type, field) -#else -#ifndef __cplusplus -#define=C2=A0=C2=A0=C2=A0 __offsetof(type, field) \ -=C2=A0=C2=A0=C2=A0 ((__size_t)(__uintptr_t)((const volatile void *)&((type= *)0)->field)) -#else -#define=C2=A0=C2=A0=C2=A0 __offsetof(type, field)=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \ -=C2=A0 (__offsetof__ (reinterpret_cast <__size_t>=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \ -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (&reinterpret_cast= =C2=A0=C2=A0=C2=A0 \ -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (static_cas= t (0)->field)))) -#endif -#endif #define=C2=A0=C2=A0=C2=A0 __rangeof(type, start, end) \ =C2=A0=C2=A0=C2=A0 (__offsetof(type, end) - __offsetof(type, start)) =20 =20 =20 ------=_Part_705509_2096953705.1719242645490 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
<= span style=3D"outline: none !important;">I do welcome the cleanup, of cours= e, just I would have defined GCC 4.2 as the breaking point instead of 5.0.<= /span>

Due basically to the licensing issues, GCC 4.2 became a natural referenc= e for GCC versions.  At some point there were vendors actually shippin= g FreeBSD with GCC 4.2, and it = was not a huge cost to keep GCC versions above 4.2 properly discriminated.<= /span>

But then you are= right that it doesn't really matter that much. At least the alloc_size att= ributes are only defined for the FORTIFY_SOURCE in some linux libc implemen= tation that I looked at. We define them unconditionally but I don't recall = them being useful.

Jus= t my $0.02.

Pedro.

=20
=20
On Sunday, June 23, 2024 at 06:45:42 PM GMT-5, Warn= er Losh <imp@bsdimp.com> wrote:


=20 =20
Indeed. But none of the ones that I removed are affected by this quirk= since they are true for clang all versions.

<= div>Warner

On Sat, Jun 22, 2024 at 12:47=E2=80=AFPM Pedro Giffun= i <pfg@freebsd.org> wrote:
It was long ago when I last touched this but FWIW = ...

clang used to report itself as GCC 4.2 and kept it's GCC extens= ion support level consistent with that version so these version numbers wer= e relevant.

Pedro.

=20
=20
On Thursday, June 20, 2024 at 09:41:34 PM GMT-5, Wa= rner Losh <imp@freebsd.org> wrote:


=20 =20
The branch main has been updated by i= mp:


commit d5c01e1124ffa4adb2513e7e8d708d7072d= bfc75
Author:    Warner= Losh <imp@FreeBSD.org>
AuthorDate: 2024-06-20 23:03:15 +0000
Commit:    Warner Losh <imp@FreeBSD.= org>
CommitDate: 2024-06-21= 02:41:09 +0000

    cdefs.h: Remove pre gcc 5.0 support
   
    Reviewed by:        =     brooks
   = Differential Revision:  https://reviews.freebsd= .org/D45656
    Spon= sored by:          Netflix
---
sys/sys/cd= efs.h | 54 ------------------------------------------------------
1 file changed, 54 deletions(-)

= diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index a6ecdca5d8b9..43d179b82020 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ = -164,18 +164,9 @@
#define &n= bsp;  __aligned(x)    __attribute__((__aligned__(x)))
#define    __sectio= n(x)    __attribute__((__section__(x)))
#define    __writeonly  &nbs= p; __unused
-#if __GNUC_PREREQ__(4= , 3) || __has_attribute(__alloc_size__)
#define    __alloc_size(x)    __attrib= ute__((__alloc_size__(x)))
#defin= e    __alloc_size2(n, x)    __attribute__((__= alloc_size__(n, x)))
-#else
-#define    __alloc_size(= x)
-#define    __al= loc_size2(n, x)
-#endif
-#if __GNUC_PREREQ__(4, 9) || __has_attrib= ute(__alloc_align__)
#define = ;   __alloc_align(x)    __attribute__((__alloc_ali= gn__(x)))
-#else
-#define    __alloc_align(x)
-#endif

/*
<= /div>
  * Keywords added in C11.
@@ -199,15 +190,6 @@
#define    _Alignof(x)     &nb= sp;  __alignof(x)
#endif

-#if !defined(__cplusplus) && !__has_extension(c_atomic) &= ;& \
-    !__ha= s_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7)
-/*
- * No= native support for _Atomic(). Place object in structure to prevent
- * most forms of direct non-atomic acces= s.
- */
-#define    _Atomic(T)    &nbs= p;   struct { T volatile __val; }
-#endif
-
#if defined(__cplusplus) && __cplusplus= >=3D 201103L
#define &nb= sp;  _Noreturn        [[noreturn]]
#else
@@ -218,15 +200,6 @@
#if= (defined(__cplusplus) && __cplusplus >=3D 201103L) || \
    __has_extension(cxx_static= _assert)
#define   = ; _Static_assert(x, y)    static_assert(x, y)
-#elif __GNUC_PREREQ__(4,6) && !defined(= __cplusplus)
-/* Nothing, gcc 4.6 = and higher has _Static_assert built-in */
-#elif defined(__COUNTER__)
-#define    _Static_assert(x, y)    __Stat= ic_assert(x, __COUNTER__)
-#define=     __Static_assert(x, y)    ___Static_assert= (x, y)
-#define    = ___Static_assert(x, y)    typedef char __assert_ ## y[(x) ? = 1 : -1] \
-    &nbs= p;           __unused
-#else
-#define    _Static_assert(x, y)    struct _= _hack
#endif
#endif

@@ -276,7 +249,6 @@
  * void bar(int myArray[__min_size(10)]);
  */
#if !defined(__cplusplus) && \
-    (defined(__clang__) || __GNUC_PREREQ__(4= , 6)) && \
    = (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >=3D 199901))
#define __min_size(x)    s= tatic (x)
#else
@@ -302,17 +274,9 @@
#define    __result_use_or_ignore_check
#endif /* !__clang__ */

-#if __G= NUC_PREREQ__(4, 1)
#define &= nbsp;  __returns_twice    __attribute__((__returns_twic= e__))
-#else
-#define    __returns_twice
-#endif

-#if __GNUC_PREREQ__(4, 6) ||= __has_builtin(__builtin_unreachable)
#define    __unreachable()    __builtin_= unreachable()
-#else
-#define    __unreachable() = ;   ((void)0)
-#endif

#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >=3D 199901<= br clear=3D"none">
#define    __LONG_= LONG_SUPPORTED
@@ -353,33 +317,15 = @@
#define    __pr= edict_true(exp)    __builtin_expect((exp), 1)
=
#define    __predict_false(exp) = ;   __builtin_expect((exp), 0)

-#if __GNUC_PREREQ__(4, 0)
#define    __null_sen= tinel    __attribute__((__sentinel__))
#define    __exported   = __attribute__((__visibility__("default")))
#define    __hidden    __attribute= __((__visibility__("hidden")))
-#e= lse
-#define    __n= ull_sentinel
-#define  &= nbsp; __exported
-#define &nb= sp;  __hidden
-#endif

/*
  * We define this here= since <stddef.h>, <sys/queue.h>, and <sys/types.h>
  * require it.
=
  */
-= #if __GNUC_PREREQ__(4, 1)
#define=     __offsetof(type, field)    __builtin_off= setof(type, field)
-#else
-#ifndef __cplusplus
-#define    __offsetof(type, field) \
-    ((__size_t)(__ui= ntptr_t)((const volatile void *)&((type *)0)->field))
-#else
= -#define    __offsetof(type, field)     =                \
-  (__offsetof__ (reinterpret_ca= st <__size_t>           = \
-        &n= bsp;       (&reinterpret_cast <const volatile char &= amp;>    \
-&nbs= p;                 (static_cast<= type *> (0)->field))))
-#end= if
-#endif
#define    __rangeof(type, start, end) \<= br clear=3D"none">
    (__offsetof(ty= pe, end) - __offsetof(type, start))

------=_Part_705509_2096953705.1719242645490-- From nobody Mon Jun 24 15:36:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Bsd6mrQz5P76y; Mon, 24 Jun 2024 15:37:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7Bsd0cLtz4J0V; Mon, 24 Jun 2024 15:37:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=farF46Ye; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 2a00:1450:4864:20::22f as permitted sender) smtp.mailfrom=rlibby@gmail.com Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2ebe3fb5d4dso39634631fa.0; Mon, 24 Jun 2024 08:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719243427; x=1719848227; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LO84Qm2XHC0FZLKTo/NpNnri1kYAi2qpJXBG2yTVzSM=; b=farF46Yep9K2GnEx7sx1aQfYb/MkdvGgtbDx0oWljCgm3dobVXeGjkx7U5YdspYN/f cbzXybymEiXXdJWm7Ul1mQZBb8qNze/rhRZ7qFEnVYWmDvfvLwbn5uJr5c1aU1t+udx8 Bmms6XRusNo6gVBRJdQ25yBkWxwSJLGnhz8s8fgBqc+1O0AyjZsS5FWH0f6SoMU4nEhz WzlXth7HaiwIxLOP6elOrETAaifiI2DOvO6yVSq2eP/ffr9dGDYAa1RoeMy0/1GXeLTl L/ij5/3g8RxyzAIIUXMD9bAsBpQ+voriLsPzBUln5JE8b9wZWpT91bPpXIhYrFMlEBvT Xl4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719243427; x=1719848227; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LO84Qm2XHC0FZLKTo/NpNnri1kYAi2qpJXBG2yTVzSM=; b=D9ylmpET6jeeVGBZhurkSsT9J4+ez2nDMw33LTs12z2FInr/LOppcnYQiYK6OxYGAY hHNy9F5+/pSQl004x2zlUm9ZMoH0a7d/PC2R57SHgkHCeRSD6U8BheD8wPElMli58bME gKSlTa231ir7itYmrvtumovnX34xK9cZel4D6dNLyS6hv2YHf7tVcTf2Mm5IyUaw/h0j LA4Abmh6VNIa3Hvjfeaq++iz4JQG83viapBkOk25+FzmmScguum6fKImE6YvQfAfvi4R FYCvrBgyMgpg5F0i6l9w1gMBsP19alFzoHP80uNlFmlHsJI48Doot3Gw08fn3VCYLw/r 8Wlw== X-Forwarded-Encrypted: i=1; AJvYcCU4A2qzKubvseoGHB8/8oVXO9OVHiA/mrU1q8eSGfEBrysGYcQ3JHAVxLky4fBW/G2sbrq8YIvaJbVI/YArFohnax9K1Vd3KfDCUvrWKqCzUj5rhjKQEMgwq8URT7hTukzCXv7RKf+zqsWf3UfB38QDXg== X-Gm-Message-State: AOJu0Yz9M/FHZ71E2MStYaDDgMhPGIuv979Rcb5bNr37UY6mM++Zz808 T3uuyyg8jnwfcyotBqJk+Rbo8ExerA1KZrjuDXbuLRUozKERuW87GsZi6pYmchEt8qKkOVMSL7G JJJtAJ4LXVssLGycEjNj156eeXPJGD4cZ X-Google-Smtp-Source: AGHT+IF7ltTi+SRf0VX7jBKPsYoXPKhlQLpCIzGh5aT9wYW9RmtT6v0iKWGkBjv91xKuNUXap/c/4n5XvsGhODQNDAQ= X-Received: by 2002:a2e:94d6:0:b0:2eb:e8a5:edae with SMTP id 38308e7fff4ca-2ec56bc6483mr19660141fa.20.1719243426604; Mon, 24 Jun 2024 08:37:06 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406192058.45JKwB77036327@gitrepo.freebsd.org> In-Reply-To: <202406192058.45JKwB77036327@gitrepo.freebsd.org> From: Ryan Libby Date: Mon, 24 Jun 2024 08:36:55 -0700 Message-ID: Subject: Re: git: ddf0ed09bd8f - main - sdt: Implement SDT probes using hot-patching To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22f:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEFALL_USER(0.00)[rlibby]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4W7Bsd0cLtz4J0V On Wed, Jun 19, 2024 at 1:58=E2=80=AFPM Mark Johnston w= rote: > > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dddf0ed09bd8f83677407db3682= 8aca2c10f419c9 > > commit ddf0ed09bd8f83677407db36828aca2c10f419c9 > Author: Mark Johnston > AuthorDate: 2024-06-19 20:57:09 +0000 > Commit: Mark Johnston > CommitDate: 2024-06-19 20:57:41 +0000 > > sdt: Implement SDT probes using hot-patching > > The idea here is to avoid a memory access and conditional branch per > probe site. Instead, the probe is represented by an "unreachable" > unconditional function call. asm goto is used to store the address o= f > the probe site (represented by a no-op sled) and the address of the > function call into a tracepoint record. Each SDT probe carries a lis= t > of tracepoints. Questions out of curiosity and maybe ignorance: How does this work with relocations? Something must be adjusting these addresses? > +/* > + * Work around an apparent clang bug or limitation which prevents the us= e of the > + * "i" (immediate) constraint with the probe structure. > + */ > +#define _SDT_ASM_PROBE_CONSTRAINT "Ws" > +#define _SDT_ASM_PROBE_OPERAND "p" Is it because i386 kmods are built with -fPIC? By the way, it seems gcc13 (latest in ports) doesn't support the "Ws" constraint. It seems to have been added to gcc 14. I know i386 is tier 2 these days, and gcc is a second consideration anyway. Trying to test out a patch for i386 gcc, I found that it doesn't build currently and this is one of a few reasons. Ryan From nobody Mon Jun 24 15:41:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7ByQ5g4qz5P7gb for ; Mon, 24 Jun 2024 15:41:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7ByP6yCwz4JWX for ; Mon, 24 Jun 2024 15:41:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-6c4926bf9baso3688956a12.2 for ; Mon, 24 Jun 2024 08:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1719243675; x=1719848475; 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=3SWFBNJJ+tANQ4vRbNHngitEDQcfZz8Cwo7TuUdn85c=; b=J3zWKRM3muCXwtd4LSeelvtGfSI6yAa+cMrciyatwBf7WXELXhU99ugUiJ06e97KWU tYRV+Xu6MMpi4xDX6JdYgJNJFF1LlX6UvscM/rtPFvyU/qkKIbs5wqJC8mFVetgmttbh kbNOJ/JKM7AvVOAD2nj/EDMiQqgGtPj01NEPYRWMM6iKJyajKiM0DLDeTKzJQbNbGNLf PdzRxOEFJg4PDBBHq2XIClBcXdqP4HvujkEpEZteDdRoLCERc9mYSzjjRxXm0BPzCcCO Zi4ZCPOZWkCs/ZoDDVB4FHPWhsPVxP6nABuhWIhwNKk8+ksfHI546PcgNEvcuOcE2Ac3 8KDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719243675; x=1719848475; 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=3SWFBNJJ+tANQ4vRbNHngitEDQcfZz8Cwo7TuUdn85c=; b=VTzRJdRxbkjAe4akNVdivEV+zNuO1aPoImX0op7/b5R9+Z2peECKCAx7cw20JLEy0X ME49IvYMp4znZAhcbt7fr29+KAs6xjJJ37p7mgMysoscmb9iRyJpTGhteJeJMTKQflX/ m521m6cYuZ6Ftsd/EyVlX1wpFWkGPbP5lx6SPJeFE4QjG6ZHPfVVrckZcywLmWvVhmu8 E7Mh+9l8gU+PwSsfo2042115U+yd8+HSTwgnsYAGY4/67alhDZwfzjamaW/zjAFOA93M FP94gVv454ETl/5IsKZ4uNbZkF4K+Ig731nvp6G/DqCgvjubETKBstJYwPLxX2CRtGm/ a0dw== X-Forwarded-Encrypted: i=1; AJvYcCWHiEjqnqYBJiQnlMbXmODxiwDuTEcLDcy8K9/nf/bUW8s3ah1uKKcp0+nRmc/QZUNc2rrKpTZIri21d0hx5qmR/CvjB8pnOytId68JT3Rb X-Gm-Message-State: AOJu0YyOT+BStA3IQkMqUZ4XdYbzOGJSMq5ybsjH5Ep7OHQG/zZeMxJ4 vfdmKVjQjhyj0rztOAbUjKPlClKh5L0ihlml4fsWXYhUrkQOlr7utwnCjYDdJdVzXomjf1AKshm tlAurlC9YLHyIHsDHA7Tm6++uiERLC5T4+G9gOA== X-Google-Smtp-Source: AGHT+IHY7UJFFGbkWg2iKVp9mMKlAwrxGWQBqSgBckL/7XOtQbIMlXyGY9KM+HAhijkIOgDyaK9p6G30MfS4GbZ3sM0= X-Received: by 2002:a17:90b:20c:b0:2c8:5cb3:42b6 with SMTP id 98e67ed59e1d1-2c85cb343f8mr4493590a91.8.1719243675559; Mon, 24 Jun 2024 08:41: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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406210241.45L2fQZA057110@gitrepo.freebsd.org> <111875645.165697.1719082066518@mail.yahoo.com> <62379069.705510.1719242645494@mail.yahoo.com> In-Reply-To: <62379069.705510.1719242645494@mail.yahoo.com> From: Warner Losh Date: Mon, 24 Jun 2024 09:41:04 -0600 Message-ID: Subject: Re: git: d5c01e1124ff - main - cdefs.h: Remove pre gcc 5.0 support To: Pedro Giffuni Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Warner Losh Content-Type: multipart/alternative; boundary="00000000000090863b061ba49c5f" 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: 4W7ByP6yCwz4JWX --00000000000090863b061ba49c5f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 24, 2024 at 9:25=E2=80=AFAM Pedro Giffuni wro= te: > I do welcome the cleanup, of course, just I would have defined GCC 4.2 as > the breaking point instead of 5.0. > The breaking point is headed to gcc9 and clang11. There's no compelling FreeBSD project use case where people need to compile FreeBSD programs with compilers older than that. Though the difference matters mostly to compiling FreeBSD itself (which doesn't work with gcc older than 12 or 13 or clang older than a couple of releases. The delta for the system headers is approximately 0 for all these changes, though, since most of the #defines are for FreeBSD itself, not our headers. > Due basically to the licensing issues, GCC 4.2 became a natural reference > for GCC versions. At some point there were vendors actually shipping > FreeBSD with GCC 4.2, and it was not a huge cost to keep GCC versions > above 4.2 properly discriminated. > True... But that's ancient history at this point... > But then you are right that it doesn't really matter that much. At least > the alloc_size attributes are only defined for the FORTIFY_SOURCE in some > linux libc implementation that I looked at. We define them unconditionall= y > but I don't recall them being useful. > We use them in a few dozen places in the tree, but the only visible ones to system headers are for malloc, calloc and realloc. Keeping the fringe definitions wasn't too useful, but if they turn out to be less than fringe, I'll cope. Most of the odd edge cases we had, though, were poorly documented and/or had the versions wrong because of transient bugs in gcc. :(. It's time to start over. Of course, sys/cdefs.h could also benefit from some reorg, and a man page, but one thing at a time. Warner Indeed. But none of the ones that I removed are affected by this quirk > since they are true for clang all versions. > > Warner > > On Sat, Jun 22, 2024 at 12:47=E2=80=AFPM Pedro Giffuni = wrote: > > It was long ago when I last touched this but FWIW ... > > clang used to report itself as GCC 4.2 and kept it's GCC extension suppor= t > level consistent with that version so these version numbers were relevant= . > > Pedro. > > On Thursday, June 20, 2024 at 09:41:34 PM GMT-5, Warner Losh < > imp@freebsd.org> wrote: > > > The branch main has been updated by imp: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dd5c01e1124ffa4adb2513e7e8d708d7= 072dbfc75 > > commit d5c01e1124ffa4adb2513e7e8d708d7072dbfc75 > Author: Warner Losh > AuthorDate: 2024-06-20 23:03:15 +0000 > Commit: Warner Losh > CommitDate: 2024-06-21 02:41:09 +0000 > > cdefs.h: Remove pre gcc 5.0 support > > Reviewed by: brooks > Differential Revision: https://reviews.freebsd.org/D45656 > Sponsored by: Netflix > --- > sys/sys/cdefs.h | 54 ----------------------------------------------------= -- > 1 file changed, 54 deletions(-) > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index a6ecdca5d8b9..43d179b82020 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -164,18 +164,9 @@ > #define __aligned(x) __attribute__((__aligned__(x))) > #define __section(x) __attribute__((__section__(x))) > #define __writeonly __unused > -#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) > #define __alloc_size(x) __attribute__((__alloc_size__(x))) > #define __alloc_size2(n, x) __attribute__((__alloc_size__(n, x))) > -#else > -#define __alloc_size(x) > -#define __alloc_size2(n, x) > -#endif > -#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) > #define __alloc_align(x) __attribute__((__alloc_align__(x))) > -#else > -#define __alloc_align(x) > -#endif > > /* > * Keywords added in C11. > @@ -199,15 +190,6 @@ > #define _Alignof(x) __alignof(x) > #endif > > -#if !defined(__cplusplus) && !__has_extension(c_atomic) && \ > - !__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7) > -/* > - * No native support for _Atomic(). Place object in structure to prevent > - * most forms of direct non-atomic access. > - */ > -#define _Atomic(T) struct { T volatile __val; } > -#endif > - > #if defined(__cplusplus) && __cplusplus >=3D 201103L > #define _Noreturn [[noreturn]] > #else > @@ -218,15 +200,6 @@ > #if (defined(__cplusplus) && __cplusplus >=3D 201103L) || \ > __has_extension(cxx_static_assert) > #define _Static_assert(x, y) static_assert(x, y) > -#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) > -/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ > -#elif defined(__COUNTER__) > -#define _Static_assert(x, y) __Static_assert(x, __COUNTER__) > -#define __Static_assert(x, y) ___Static_assert(x, y) > -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 > : -1] \ > - __unused > -#else > -#define _Static_assert(x, y) struct __hack > #endif > #endif > > @@ -276,7 +249,6 @@ > * void bar(int myArray[__min_size(10)]); > */ > #if !defined(__cplusplus) && \ > - (defined(__clang__) || __GNUC_PREREQ__(4, 6)) && \ > (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >=3D 199901)) > #define __min_size(x) static (x) > #else > @@ -302,17 +274,9 @@ > #define __result_use_or_ignore_check > #endif /* !__clang__ */ > > -#if __GNUC_PREREQ__(4, 1) > #define __returns_twice __attribute__((__returns_twice__)) > -#else > -#define __returns_twice > -#endif > > -#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) > #define __unreachable() __builtin_unreachable() > -#else > -#define __unreachable() ((void)0) > -#endif > > #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >=3D 199901 > #define __LONG_LONG_SUPPORTED > @@ -353,33 +317,15 @@ > #define __predict_true(exp) __builtin_expect((exp), 1) > #define __predict_false(exp) __builtin_expect((exp), 0) > > -#if __GNUC_PREREQ__(4, 0) > #define __null_sentinel __attribute__((__sentinel__)) > #define __exported __attribute__((__visibility__("default"))) > #define __hidden __attribute__((__visibility__("hidden"))) > -#else > -#define __null_sentinel > -#define __exported > -#define __hidden > -#endif > > /* > * We define this here since , , and > * require it. > */ > -#if __GNUC_PREREQ__(4, 1) > #define __offsetof(type, field) __builtin_offsetof(type, field) > -#else > -#ifndef __cplusplus > -#define __offsetof(type, field) \ > - ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)= ) > -#else > -#define __offsetof(type, field) \ > - (__offsetof__ (reinterpret_cast <__size_t> \ > - (&reinterpret_cast \ > - (static_cast (0)->field)))) > -#endif > -#endif > #define __rangeof(type, start, end) \ > (__offsetof(type, end) - __offsetof(type, start)) > > --00000000000090863b061ba49c5f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jun 24, 2024 at 9:25=E2=80=AF= AM Pedro Giffuni <pfg@freebsd.org= > wrote:
I do welcome the cleanup, of= course, just I would have defined GCC 4.2 as the breaking point instead of= 5.0.

= The breaking point is headed to gcc9 and clang11. There's no compelling= FreeBSD project use case where people need to compile FreeBSD programs wit= h compilers older than that. Though the difference matters mostly to compil= ing FreeBSD itself (which doesn't work with gcc older than 12 or 13 or = clang older than a couple of releases. The delta for the system headers is = approximately 0 for all these changes, though, since most of the #defines a= re for FreeBSD itself, not our headers.
=C2=A0
Due basically to the licensing issues, GCC 4.2 became a natural refere= nce for GCC versions.=C2=A0 At some point there were vendors actually shipp= ing FreeBSD with GCC 4.2, and it was not a huge cost to keep GCC versions above 4.2 properly discriminate= d.

True... = But that's ancient history at this point...
=C2=A0
But then you are = right that it doesn't really matter that much. At least the alloc_size = attributes are only defined for the FORTIFY_SOURCE in some linux libc imple= mentation that I looked at. We define them unconditionally but I don't = recall them being useful.
=
We use them in a few dozen places in the tree, but the only = visible ones to system headers are for malloc, calloc and realloc. Keeping = the fringe definitions wasn't too useful, but if they turn out to be le= ss than fringe, I'll cope. Most of the odd edge cases we had, though, w= ere poorly documented and/or had the versions wrong because of transient bu= gs in gcc. :(. It's time to start over.

Of cou= rse, sys/cdefs.h could also benefit from some reorg, and a man page, but on= e thing at a time.

Warner

Indeed. But none of the ones that I removed are affected by this qu= irk since they are true for clang all versions.

Warner

On Sat, Jun 22,= 2024 at 12:47=E2=80=AFPM Pedro Giffuni <pfg@freebsd.org&g= t; wrote:
It was long ago when I last touched this but FWIW = ...

clang used to report itself as GCC 4.2 and kept it's GCC ex= tension support level consistent with that version so these version numbers= were relevant.

Pedro.

=20
=20
On Thursday, June 20, 2024 at 09:41:34 PM GMT-5, Wa= rner Losh <imp@freebsd.org> wrote:


=20 =20
The branch main has been updated by i= mp:


commit d5c01e1124ffa4adb2513e7e8d708d7072d= bfc75
Author:=C2=A0 =C2=A0 Warner= Losh <imp@FreeBSD.org>
AuthorDate: 2024-06-20 23:03:15 +0000
Commit:=C2=A0 =C2=A0 Warner Losh <imp@FreeBSD.= org>
CommitDate: 2024-06-21= 02:41:09 +0000

=C2=A0 =C2=A0 cdefs.h: Remove pre gcc 5.0 support
=C2=A0 =C2=A0
=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 brooks
=C2=A0 =C2=A0= Differential Revision:=C2=A0 https://reviews.freebsd= .org/D45656
=C2=A0 =C2=A0 Spon= sored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Netflix
---
sys/sys/cd= efs.h | 54 ------------------------------------------------------
1 file changed, 54 deletions(-)

= diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index a6ecdca5d8b9..43d179b82020 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ = -164,18 +164,9 @@
#define=C2=A0= =C2=A0=C2=A0 __aligned(x)=C2=A0=C2=A0=C2=A0 __attribute__((__aligned__(x)))=
#define=C2=A0=C2=A0=C2=A0 __sect= ion(x)=C2=A0=C2=A0=C2=A0 __attribute__((__section__(x)))
=
#define=C2=A0=C2=A0=C2=A0 __writeonly=C2=A0=C2=A0= =C2=A0 __unused
-#if __GNUC_PREREQ= __(4, 3) || __has_attribute(__alloc_size__)
#define=C2=A0=C2=A0=C2=A0 __alloc_size(x)=C2=A0=C2=A0=C2=A0 __at= tribute__((__alloc_size__(x)))
#d= efine=C2=A0=C2=A0=C2=A0 __alloc_size2(n, x)=C2=A0=C2=A0=C2=A0 __attribute__= ((__alloc_size__(n, x)))
-#else
-#define=C2=A0=C2=A0=C2=A0 __alloc_s= ize(x)
-#define=C2=A0=C2=A0=C2=A0 = __alloc_size2(n, x)
-#endif
-#if __GNUC_PREREQ__(4, 9) || __has_attr= ibute(__alloc_align__)
#define=C2= =A0=C2=A0=C2=A0 __alloc_align(x)=C2=A0=C2=A0=C2=A0 __attribute__((__alloc_a= lign__(x)))
-#else
-#define=C2=A0=C2=A0=C2=A0 __alloc_align(x)
-#endif

/*
=
=C2=A0 * Keywords added in C11.
@@ -199,15 +190,6 @@
#define=C2=A0=C2=A0=C2=A0 _Alignof(x)=C2=A0=C2=A0=C2=A0 =C2=A0=C2= =A0=C2=A0 __alignof(x)
#endif

-#if !defined(__cplusplus) && !__has_extension(c_atomic) &= ;& \
-=C2=A0=C2=A0=C2=A0 !__ha= s_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7)
-/*
- * No= native support for _Atomic(). Place object in structure to prevent
- * most forms of direct non-atomic acces= s.
- */
-#define=C2=A0=C2=A0=C2=A0 _Atomic(T)=C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 struct { T volatile __val; }
-#endif
-
#if defined(__cplusplus) && __cplusplu= s >=3D 201103L
#define=C2=A0= =C2=A0=C2=A0 _Noreturn=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 [[noreturn]]
#else
@@ -218,15 +200,6 @@
= #if (defined(__cplusplus) && __cplusplus >=3D 201103L) || \
=C2=A0 =C2=A0 __has_extension(cxx_sta= tic_assert)
#define=C2=A0=C2=A0= =C2=A0 _Static_assert(x, y)=C2=A0=C2=A0=C2=A0 static_assert(x, y)
-#elif __GNUC_PREREQ__(4,6) && !de= fined(__cplusplus)
-/* Nothing, gc= c 4.6 and higher has _Static_assert built-in */
-#elif defined(__COUNTER__)
-#define=C2=A0=C2=A0=C2=A0 _Static_assert(x, y)=C2=A0=C2=A0=C2=A0 = __Static_assert(x, __COUNTER__)
-#= define=C2=A0=C2=A0=C2=A0 __Static_assert(x, y)=C2=A0=C2=A0=C2=A0 ___Static_= assert(x, y)
-#define=C2=A0=C2=A0= =C2=A0 ___Static_assert(x, y)=C2=A0=C2=A0=C2=A0 typedef char __assert_ ## y= [(x) ? 1 : -1] \
-=C2=A0=C2=A0=C2= =A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 __unused
-#else
-#define=C2=A0=C2=A0=C2=A0 _Static_assert(x, y)=C2=A0=C2=A0=C2=A0 = struct __hack
#endif
#endif

@@ -276,7 +249,6 @@
=C2=A0 * void bar(int myArray[__min_size(1= 0)]);
=C2=A0 */
=
#if !defined(__cplusplus) && \
-=C2=A0 =C2=A0 (defined(__clang__) || __GNUC_P= REREQ__(4, 6)) && \
=C2=A0= =C2=A0 (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >=3D 199901))<= br clear=3D"none">
#define __min_size(x)=C2=A0=C2=A0= =C2=A0 static (x)
#else
@@ -302,17 +274,9 @@
#define=C2=A0=C2=A0=C2=A0 __result_use_or_ignore_check=
#endif /* !__clang__ */

-#if __GNUC_PREREQ__(4, 1)
#defi= ne=C2=A0=C2=A0=C2=A0 __returns_twice=C2=A0=C2=A0=C2=A0 __attribute__((__ret= urns_twice__))
-#else
-#define=C2=A0=C2=A0=C2=A0 __returns_twice
-#endif

-#if __GNUC_PREREQ__= (4, 6) || __has_builtin(__builtin_unreachable)
#define=C2=A0=C2=A0=C2=A0 __unreachable()=C2=A0=C2=A0=C2=A0 _= _builtin_unreachable()
-#else
-#define=C2=A0=C2=A0=C2=A0 __unreachab= le()=C2=A0=C2=A0=C2=A0 ((void)0)
-= #endif

<= div dir=3D"ltr"> #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >=3D = 199901
#define=C2=A0=C2=A0=C2=A0 = __LONG_LONG_SUPPORTED
@@ -353,33 += 317,15 @@
#define=C2=A0=C2=A0=C2= =A0 __predict_true(exp)=C2=A0 =C2=A0 __builtin_expect((exp), 1)
#define=C2=A0=C2=A0=C2=A0 __predict_false= (exp)=C2=A0 =C2=A0 __builtin_expect((exp), 0)

-#if __GNUC_PREREQ__= (4, 0)
#define=C2=A0=C2=A0=C2=A0 = __null_sentinel=C2=A0=C2=A0=C2=A0 __attribute__((__sentinel__))
#define=C2=A0=C2=A0=C2=A0 __exported=C2=A0= =C2=A0=C2=A0 __attribute__((__visibility__("default")))
#define=C2=A0=C2=A0=C2=A0 __hidden=C2=A0= =C2=A0=C2=A0 __attribute__((__visibility__("hidden")))
-#else
-#define=C2=A0=C2=A0=C2=A0 __null_sentinel
-#define=C2=A0=C2=A0=C2=A0 __exported
-#define=C2=A0=C2=A0=C2=A0 __hidden
-#endif

/*
=C2=A0 * We define this here since <stddef.h>, <sys/queue= .h>, and <sys/types.h>
= =C2=A0 * require it.
=C2=A0 */
-#if __GNUC_PREREQ__(4, 1)
#define=C2=A0=C2=A0=C2=A0 __offsetof(type= , field)=C2=A0=C2=A0=C2=A0 __builtin_offsetof(type, field)
-#else
-= #ifndef __cplusplus
-#define=C2=A0= =C2=A0=C2=A0 __offsetof(type, field) \
-=C2=A0=C2=A0=C2=A0 ((__size_t)(__uintptr_t)((const volatile void *)&a= mp;((type *)0)->field))
-#else<= br clear=3D"none">
-#define=C2=A0=C2=A0=C2=A0 __offse= tof(type, field)=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \
-=C2=A0 (__offsetof__ (reinterpret_cast <__size_t>=C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (&am= p;reinterpret_cast <const volatile char &>=C2=A0=C2=A0=C2=A0 \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (static_cast<type *> (0)->field))))
-#endif
-#endif
#define=C2= =A0=C2=A0=C2=A0 __rangeof(type, start, end) \
=C2=A0=C2=A0=C2=A0 (__offsetof(type, end) - __offsetof(type, s= tart))

<= /div>
--00000000000090863b061ba49c5f-- From nobody Mon Jun 24 16:06:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7CWP0vLcz5P9hj; Mon, 24 Jun 2024 16:06:25 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7CWN6CbYz4L1V; Mon, 24 Jun 2024 16:06:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-7960454db4fso322923585a.2; Mon, 24 Jun 2024 09:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719245183; x=1719849983; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=pnbOVZkjnhseY7yDpNrkyFNd5YOJpR0SnMbw8mNPZOY=; b=B3v5/yBZ9Y9KHI3Ok6U4SGbGNeX0/97JxBGQYYTDZWdAZ6HWWg405jPu/yuG2pcQ69 mMh3EgQEeUmDZL8jojl9bZTu6ld2VhRSLyj2AT+pNVAMx/aqMJDQl1sCQiiCrDNolzav qu173bGGVjbB5Pd/GV6MrPhdwqmis5F+tmJxLg9unIaDFam/qV//4LKQxr0rv4An9TTC 3aRykxnKHsVoyw8NCyx7F54bd8NM+cnewGlLNlF9KhlB59EQe2uybV/mejyi7sFxM5ei EGkJ1xImajuahAAYeI6gE44/AhxVNnnWdrnGIw05r1XwuYSAid90lntk6TjYTc2wKiXJ lXzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719245183; x=1719849983; h=in-reply-to:content-transfer-encoding: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=pnbOVZkjnhseY7yDpNrkyFNd5YOJpR0SnMbw8mNPZOY=; b=hXAfCLg40MitBYSJFwP5cdZLJ24GgG2TX/3v3oT1apIuX5NQt3dDpiSyQQLgtU0vdn 5+riyNxmeVhvzRZFJHXGGJQUJaetOu64GUzkj7xzWTKbjS5C9Kk31oyL4j0iEGAStRFx 87dEgcP475VIdXCuM0rvtS+KIkbI8BBkL57MQFah3Zor4lcHtYuKTPpX4M/Z6l76H0VK OcXXruHmGSijEpDITy09Jl3G/P4my8if52nFEswZ023CvvwZVqN5ijZ0rErBreo5FNsV LuVGlSe0wHzqJTW1IzMUfQtkuCOMkOvTcy01/IB96iHRv1SVRaRixlX1ufe6hhUqrydX O4lA== X-Forwarded-Encrypted: i=1; AJvYcCVt0ZWXcfHYH0HN0ZHNRN2bqqRTwsRtJe3VAYKzJNRb1wr9xgOuXq4FP9Ut7nyqXrQotpxp/hrLqqmMLx8i3jGSf7kip0Kltnt0wAeCUaC+gPNM1AcFJ64UniZXwsyJWGmHrgeFxMZILxaiseYAI4JJOQ== X-Gm-Message-State: AOJu0YyQ0u3y3xcUi6Vj7etmnpfySPiKd0qcW7OKSN4QhFlKfP96vl6s HleQ8/yqjdzJ8iqgBRCtISHK/s8bSJ6T33ATiUsO57jpgYuDitjMEHFHSOZT X-Google-Smtp-Source: AGHT+IHnaM51t1AiHZ56FSWNqiOc0kEPf7QKMdHQKjrqwNCetpguRgV2p0AiCQLfm0uv8SoAiH9ZFg== X-Received: by 2002:a05:620a:462c:b0:795:5bdf:aaab with SMTP id af79cd13be357-79be0d7b626mr772950885a.55.1719245183304; Mon, 24 Jun 2024 09:06:23 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79bce8b18fbsm327750285a.39.2024.06.24.09.06.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 09:06:22 -0700 (PDT) Date: Mon, 24 Jun 2024 12:06:20 -0400 From: Mark Johnston To: Ryan Libby Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ddf0ed09bd8f - main - sdt: Implement SDT probes using hot-patching Message-ID: References: <202406192058.45JKwB77036327@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: 4W7CWN6CbYz4L1V On Mon, Jun 24, 2024 at 08:36:55AM -0700, Ryan Libby wrote: > On Wed, Jun 19, 2024 at 1:58 PM Mark Johnston wrote: > > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=ddf0ed09bd8f83677407db36828aca2c10f419c9 > > > > commit ddf0ed09bd8f83677407db36828aca2c10f419c9 > > Author: Mark Johnston > > AuthorDate: 2024-06-19 20:57:09 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-06-19 20:57:41 +0000 > > > > sdt: Implement SDT probes using hot-patching > > > > The idea here is to avoid a memory access and conditional branch per > > probe site. Instead, the probe is represented by an "unreachable" > > unconditional function call. asm goto is used to store the address of > > the probe site (represented by a no-op sled) and the address of the > > function call into a tracepoint record. Each SDT probe carries a list > > of tracepoints. > > Questions out of curiosity and maybe ignorance: > > How does this work with relocations? Something must be adjusting these > addresses? The compiler handles this as part of the implementation of asm goto: the inline assembly can reference jump targets with "%l" and they're specified as operands to the asm goto statement. In the kernel these references are resolved statically, and kernel modules will contain relocations for the sdt_tracepoint_set section. > > +/* > > + * Work around an apparent clang bug or limitation which prevents the use of the > > + * "i" (immediate) constraint with the probe structure. > > + */ > > +#define _SDT_ASM_PROBE_CONSTRAINT "Ws" > > +#define _SDT_ASM_PROBE_OPERAND "p" > > Is it because i386 kmods are built with -fPIC? I suspect that that's related, yeah. The compiler might be assuming that some indirection is needed to compute the target address, but in this case it's an address in the same function and presumably can safely be assumed to be an immediate. > By the way, it seems gcc13 (latest in ports) doesn't support the "Ws" > constraint. It seems to have been added to gcc 14. I know i386 is tier > 2 these days, and gcc is a second consideration anyway. Trying to test > out a patch for i386 gcc, I found that it doesn't build currently and > this is one of a few reasons. What happens if "i" is used with gcc? IIRC I had tried gcc+i386 when testing the patch but the kernel failed to build for other reasons at the time. From nobody Mon Jun 24 16:07:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7CXV47ymz5P9Z2; Mon, 24 Jun 2024 16:07: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 4W7CXV3Nwvz4LjX; Mon, 24 Jun 2024 16:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719245242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JyExPfnVYa/jPHBFr9Ow7ZqjRrv0/vjruad24nFfNsc=; b=hwQTHJp6uHBuefdXZ7hgZTIE24+da3ykgXdiDKC8op0xl0WoB/RAYvlWRBFdgrSzUW5x2E y/k65yNHbz4PZaY1sLjUqt/N7sGPK2DTgKQJbc1pqIMGdSbkeslaebfy1QxkCgKwUflXXe 8CvEqEuA+nce/ZX2hgv4fWeSlXY+/zofkjaGjlDKBfgTQu+f0KBbUveA1H4tI4gw2x6bOr oT8RIr5pxa1Sp+zT3PVDPOIUbAjl8QTyf9XAl4Epgt61w2GDsG+3r7IQ7ql1JS0AZKnmtP rDZE+6f87J3Hj0idTVQra71/FnpojMPXZtMpbxJiBTQNvZkVF52V93Lnz95gTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719245242; a=rsa-sha256; cv=none; b=ZyDawvwqioLSESxMQKNZBWHx3FEv/fDZPxLgEQd91laBBRtlQvpRbVnQBAiu5B5We+O2n4 H2ohohOzbFcItgVe9gqGbECHEMqwQMBUhmzmDyz/XRoagXb0IB3NG7X5//vkguAaYzp5WT +GaTibJJ0JjCIY5rHxJ9HDvzCSUvEeI1WGLoS34JTD/0KQuP9+AyeWkLUgdTrA6jw+zaaG LWzJhCanO0XibvSg2Hs9RY6MGVCJjGwdJ1hMhL4kBIBu+GnijJwvYCFDq494CrvAtbTQAb OFMp4bH2Xu2bVVYY8ZI6fdNF5V+8Iz90wAtl/3Rxgl9g2X5BMKlk34fjG8k5yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719245242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JyExPfnVYa/jPHBFr9Ow7ZqjRrv0/vjruad24nFfNsc=; b=SA6fzZhpo3ylBhG0CfHuCcuatJLKnOCSbkOHhDuvu5sxeNqnSx3LmgM7Pjrnp2vJXTWGBF nUXnSXZfuXkJPkCPoCGWBE1v0B6dSOSSC+AxarVnCe6BLwJxE7QW2M3A9QlLas8liwoUYS u+SfrCmieItK8DUc0aLztgnsF0bX0eUIab7tKZrZWLN0at+PIsp8ncgG4oH05Vpk4Pw1Tz 21UpsZM4OVmuZiX+7CFdWe/lwcCPDDsPGk/wxlEq4SYEZhmJhhwsllIiJt+qIUAIlPVTlJ V3z44hQv04nJZRh4hVWr0gPAl0jyDee34I0fIi/ji5kIp6k4KDI71ZKOEF0OsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7CXV307jzQ3s; Mon, 24 Jun 2024 16:07: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 45OG7M2D024835; Mon, 24 Jun 2024 16:07:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OG7MV7024832; Mon, 24 Jun 2024 16:07:22 GMT (envelope-from git) Date: Mon, 24 Jun 2024 16:07:22 GMT Message-Id: <202406241607.45OG7MV7024832@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: 6efba04df3f8 - main - fusefs: fix two bugs regarding _PC_MIN_HOLE_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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 6efba04df3f8c77b9b12f1df3e5124a7249b82fc Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=6efba04df3f8c77b9b12f1df3e5124a7249b82fc commit 6efba04df3f8c77b9b12f1df3e5124a7249b82fc Author: Alan Somers AuthorDate: 2024-04-03 19:57:44 +0000 Commit: Alan Somers CommitDate: 2024-06-24 16:02:02 +0000 fusefs: fix two bugs regarding _PC_MIN_HOLE_SIZE Background: If a user does pathconf(_, _PC_MIN_HOLE_SIZE) on a fusefs file system, the kernel must actually issue a FUSE_LSEEK operation in order to determine whether the server supports it. We cache that result, so we only have to send FUSE_LSEEK the first time that _PC_MIN_HOLE_SIZE is requested on any given mountpoint. Problem 1: Unlike fpathconf, pathconf operates on files that may not be open. But FUSE_LSEEK requires the file to be open. As described in PR 278135, FUSE_LSEEK cannot be sent for unopened files, causing _PC_MIN_HOLE_size to wrongly report EINVAL. We never noticed that before because the fusefs test suite only uses fpathconf, not pathconf. Fix this bug by opening the file if necessary. Problem 2: On a completely sparse file, with no data blocks at all, FUSE_LSEEK with SEEK_DATA would fail to ENXIO. That's correct behavior, but fuse_vnop_pathconf wrongly interpreted that as "FUSE_LSEEK not supported". Fix the interpretation. PR: 278135 MFC after: 1 week Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D44618 --- sys/fs/fuse/fuse_vnops.c | 48 ++++++++++++---- tests/sys/fs/fusefs/lseek.cc | 129 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+), 10 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index eb07861c04ba..bf272ab706da 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -395,6 +395,9 @@ fuse_vnop_do_lseek(struct vnode *vp, struct thread *td, struct ucred *cred, err = fdisp_wait_answ(&fdi); if (err == ENOSYS) { fsess_set_notimpl(mp, FUSE_LSEEK); + } else if (err == ENXIO) { + /* Note: ENXIO means "no more hole/data regions until EOF" */ + fsess_set_impl(mp, FUSE_LSEEK); } else if (err == 0) { fsess_set_impl(mp, FUSE_LSEEK); flso = fdi.answ; @@ -1754,6 +1757,9 @@ fuse_vnop_pathconf(struct vop_pathconf_args *ap) { struct vnode *vp = ap->a_vp; struct mount *mp; + struct fuse_filehandle *fufh; + int err; + bool closefufh = false; switch (ap->a_name) { case _PC_FILESIZEBITS: @@ -1783,22 +1789,44 @@ fuse_vnop_pathconf(struct vop_pathconf_args *ap) !fsess_not_impl(mp, FUSE_LSEEK)) { off_t offset = 0; - /* Issue a FUSE_LSEEK to find out if it's implemented */ - fuse_vnop_do_lseek(vp, curthread, curthread->td_ucred, - curthread->td_proc->p_pid, &offset, SEEK_DATA); + /* + * Issue a FUSE_LSEEK to find out if it's supported. + * Use SEEK_DATA instead of SEEK_HOLE, because the + * latter generally requires sequential scans of file + * metadata, which can be slow. + */ + err = fuse_vnop_do_lseek(vp, curthread, + curthread->td_ucred, curthread->td_proc->p_pid, + &offset, SEEK_DATA); + if (err == EBADF) { + /* + * pathconf() doesn't necessarily open the + * file. So we may need to do it here. + */ + err = fuse_filehandle_open(vp, FREAD, &fufh, + curthread, curthread->td_ucred); + if (err == 0) { + closefufh = true; + err = fuse_vnop_do_lseek(vp, curthread, + curthread->td_ucred, + curthread->td_proc->p_pid, &offset, + SEEK_DATA); + } + if (closefufh) + fuse_filehandle_close(vp, fufh, + curthread, curthread->td_ucred); + } + } if (fsess_is_impl(mp, FUSE_LSEEK)) { *ap->a_retval = 1; return (0); - } else { - /* - * Probably FUSE_LSEEK is not implemented. It might - * be, if the FUSE_LSEEK above returned an error like - * EACCES, but in that case we can't tell, so it's - * safest to report EINVAL anyway. - */ + } else if (fsess_not_impl(mp, FUSE_LSEEK)) { + /* FUSE_LSEEK is not implemented */ return (EINVAL); + } else { + return (err); } default: return (vop_stdpathconf(ap)); diff --git a/tests/sys/fs/fusefs/lseek.cc b/tests/sys/fs/fusefs/lseek.cc index 5ffeb4b33cbd..2a1cb198bcce 100644 --- a/tests/sys/fs/fusefs/lseek.cc +++ b/tests/sys/fs/fusefs/lseek.cc @@ -112,6 +112,75 @@ TEST_F(LseekPathconf, already_seeked) leak(fd); } +/* + * Use pathconf on a file not already opened. The server returns EACCES when + * the kernel tries to open it. The kernel should return EACCES, and make no + * judgement about whether the server does or does not support FUSE_LSEEK. + */ +TEST_F(LseekPathconf, eacces) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + + EXPECT_LOOKUP(FUSE_ROOT_ID, RELPATH) + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.entry_valid = UINT64_MAX; + out.body.entry.attr.mode = S_IFREG | 0644; + out.body.entry.nodeid = ino; + out.body.entry.attr.size = fsize; + }))); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_OPEN && + in.header.nodeid == ino); + }, Eq(true)), + _) + ).Times(2) + .WillRepeatedly(Invoke(ReturnErrno(EACCES))); + + EXPECT_EQ(-1, pathconf(FULLPATH, _PC_MIN_HOLE_SIZE)); + EXPECT_EQ(EACCES, errno); + /* Check again, to ensure that the kernel didn't record the response */ + EXPECT_EQ(-1, pathconf(FULLPATH, _PC_MIN_HOLE_SIZE)); + EXPECT_EQ(EACCES, errno); +} + +/* + * If the server returns some weird error when we try FUSE_LSEEK, send that to + * the caller but don't record the answer. + */ +TEST_F(LseekPathconf, eio) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK); + }, Eq(true)), + _) + ).Times(2) + .WillRepeatedly(Invoke(ReturnErrno(EIO))); + + fd = open(FULLPATH, O_RDONLY); + + EXPECT_EQ(-1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + EXPECT_EQ(EIO, errno); + /* Check again, to ensure that the kernel didn't record the response */ + EXPECT_EQ(-1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + EXPECT_EQ(EIO, errno); + + leak(fd); +} + /* * If no FUSE_LSEEK operation has been attempted since mount, try once as soon * as a pathconf request comes in. @@ -141,6 +210,34 @@ TEST_F(LseekPathconf, enosys_now) leak(fd); } +/* + * Use pathconf, rather than fpathconf, on a file not already opened. + * Regression test for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278135 + */ +TEST_F(LseekPathconf, pathconf) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 1 << 30; /* 1 GiB */ + off_t offset_out = 1 << 29; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { + SET_OUT_HEADER_LEN(out, lseek); + out.body.lseek.offset = offset_out; + }))); + expect_release(ino, FuseTest::FH); + + EXPECT_EQ(1, pathconf(FULLPATH, _PC_MIN_HOLE_SIZE)) << strerror(errno); +} + /* * If no FUSE_LSEEK operation has been attempted since mount, try one as soon * as a pathconf request comes in. This is the typical pattern of bsdtar. It @@ -177,6 +274,38 @@ TEST_F(LseekPathconf, seek_now) leak(fd); } +/* + * If the user calls pathconf(_, _PC_MIN_HOLE_SIZE) on a fully sparse or + * zero-length file, then SEEK_DATA will return ENXIO. That should be + * interpreted as success. + */ +TEST_F(LseekPathconf, zerolength) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const uint64_t ino = 42; + off_t fsize = 0; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK && + in.header.nodeid == ino && + in.body.lseek.whence == SEEK_DATA); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(ENXIO))); + + fd = open(FULLPATH, O_RDONLY); + EXPECT_EQ(1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + /* Check again, to ensure that the kernel recorded the response */ + EXPECT_EQ(1, fpathconf(fd, _PC_MIN_HOLE_SIZE)); + + leak(fd); +} + /* * For servers using older protocol versions, no FUSE_LSEEK should be attempted */ From nobody Mon Jun 24 16:12:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Cfk1N7Gz5P9sv; Mon, 24 Jun 2024 16:12: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 4W7Cfj6d7Nz4M5l; Mon, 24 Jun 2024 16:12:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719245565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eY4L00bnbZHs+h4xAcOYbtJqSNzMLqBMIQra2Eu2QAI=; b=p9nHjjgCd10kKtcGql9EIBgP+1Tx56URnilYRM7LmF3tVdMk1ftTmC6IY4/nEEaR/P0FFP DotYSwElzzZcbjJvuuVVPM+X8vI5lVZ8kNPXo8m9RVeCoMVMaz81zdl7AkVaSxGyqi8Rgj FAgU2g9/SEjIcscdwL884FDoXTAbOXFmn2JCGpnJ0lgUQgCkpJKVvJI0/HMFg5Gj1HYKwY EE6sMpP0uzjv64f3r0j+tj/wF69R3+B+wWjPoxdsX5kJYjq0EF2BLR8CJEJlcjYZ/RpXDC iz2YdPChEFG+/n2EJlUQWU6/4bMOLBWb+sXeSCsW1fnlgwV7grm4Y5Elwa/yxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719245565; a=rsa-sha256; cv=none; b=ilTdiHYrArtsqWkwg0TlogZi35RwFtgEg60uOuesE0plKsMw8eCJuNylNlVKIO+qMuW/3G N39tKNK/r7WTxQKjwXg8v3yC5C+I9t7Q57CEfOxa2i1o9AmkZpi2fQzG1cvCKamHAsEC0C 5F+9g8rw6cvU67eF4+zvnvELNj8IELD8a4eySNE9Fe/taeGpMlLAdz/dUaqrmKUeTpKMC5 mXgM8c/QCVO13NwTs8hsydBxQyKFy60CjkK5L0Ka8I/L/WpNF7x8Mo9M9Is8Hi2MMaRNfj IsvByd0jfAQHmoK1uvoLcfvWWqE/UlHB+w6v4zNa96p2q1PASSksf4n3vZ8ThA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719245565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eY4L00bnbZHs+h4xAcOYbtJqSNzMLqBMIQra2Eu2QAI=; b=ryRxGyGtExFps572xMfIynQp0l59iSMEfOUWVwlV8KeC6/BntNTIL5nDH3WDS682XXUKbR Q1Q/uCgv/rQGFcS3+w+pveK2i1MIkJfa8Ty3xJRq8pRNt8nX9cAwuRAQiwQLz5n1UrXFDE 37sDXFLysHFavfiEnseb1oDdJCqccELpQECJXrBry4A5o2c+oVe4S1RMkeu9WQpoe0n3Gz BFVc/cKGt9tulR7DDhIkYYjtK4L1mcu0MRry5nTFZIC7btP93oI7Leo0Lwnl5pw9gw2/OC m5XiuD+ZT/I4XZz4Kg78QSj+MTeL6d5vdDdMhm8dPGJ5Z2PPdpf/LqACMtwnwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7Cfj4tmQzQGc; Mon, 24 Jun 2024 16:12: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 45OGCjdB040865; Mon, 24 Jun 2024 16:12:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OGCjTK040862; Mon, 24 Jun 2024 16:12:45 GMT (envelope-from git) Date: Mon, 24 Jun 2024 16:12:45 GMT Message-Id: <202406241612.45OGCjTK040862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: daa2c99c89f2 - main - p9fs: implement working putpages (fix mmap write) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: daa2c99c89f224200911aa6c8cdee07bc354947a Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=daa2c99c89f224200911aa6c8cdee07bc354947a commit daa2c99c89f224200911aa6c8cdee07bc354947a Author: Val Packett AuthorDate: 2024-06-24 13:37:58 +0000 Commit: Doug Rabson CommitDate: 2024-06-24 16:11:47 +0000 p9fs: implement working putpages (fix mmap write) Mostly copied from smbfs. This driver in its current state has the exact same issue that prevents the generic putpages implementation from working. Sponsored by: https://www.patreon.com/valpackett Reviewed by: dfr Differential Revision: https://reviews.freebsd.org/D45639 MFC after: 3 months --- sys/fs/p9fs/p9fs_vfsops.c | 6 ++++ sys/fs/p9fs/p9fs_vnops.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c index 6cc65aca35d3..f674c866ce9d 100644 --- a/sys/fs/p9fs/p9fs_vfsops.c +++ b/sys/fs/p9fs/p9fs_vfsops.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -53,6 +54,7 @@ static uma_zone_t p9fs_node_zone; uma_zone_t p9fs_io_buffer_zone; uma_zone_t p9fs_getattr_zone; uma_zone_t p9fs_setattr_zone; +uma_zone_t p9fs_pbuf_zone; extern struct vop_vector p9fs_vnops; /* option parsing */ @@ -106,6 +108,9 @@ p9fs_init(struct vfsconf *vfsp) p9fs_setattr_zone = uma_zcreate("p9fs setattr zone", sizeof(struct p9_iattr_dotl), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + /* Create the putpages zone */ + p9fs_pbuf_zone = pbuf_zsecond_create("p9fs pbuf zone", nswbuf / 2); + /* * Create the io_buffer zone pool to keep things simpler in case of * multiple threads. Each thread works with its own so there is no @@ -126,6 +131,7 @@ p9fs_uninit(struct vfsconf *vfsp) uma_zdestroy(p9fs_io_buffer_zone); uma_zdestroy(p9fs_getattr_zone); uma_zdestroy(p9fs_setattr_zone); + uma_zdestroy(p9fs_pbuf_zone); return (0); } diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c index 77162c0a4aff..5556e60f4bae 100644 --- a/sys/fs/p9fs/p9fs_vnops.c +++ b/sys/fs/p9fs/p9fs_vnops.c @@ -39,10 +39,14 @@ #include #include #include +#include +#include #include #include #include +#include +#include #include #include @@ -62,6 +66,7 @@ static MALLOC_DEFINE(M_P9UIOV, "uio", "UIOV structures for strategy in p9fs"); extern uma_zone_t p9fs_io_buffer_zone; extern uma_zone_t p9fs_getattr_zone; extern uma_zone_t p9fs_setattr_zone; +extern uma_zone_t p9fs_pbuf_zone; /* For the root vnode's vnops. */ struct vop_vector p9fs_vnops; @@ -2126,6 +2131,79 @@ out: return (error); } +/* + * Put VM pages, synchronously. + * XXX: like smbfs, cannot use vop_stdputpages due to mapping requirement + */ +static int +p9fs_putpages(struct vop_putpages_args *ap) +{ + struct uio uio; + struct iovec iov; + int i, error, npages, count; + off_t offset; + int *rtvals; + struct vnode *vp; + struct thread *td; + struct ucred *cred; + struct p9fs_node *np; + vm_page_t *pages; + vm_offset_t kva; + struct buf *bp; + + vp = ap->a_vp; + np = P9FS_VTON(vp); + td = curthread; + cred = curthread->td_ucred; + pages = ap->a_m; + count = ap->a_count; + rtvals = ap->a_rtvals; + npages = btoc(count); + offset = IDX_TO_OFF(pages[0]->pindex); + + /* + * When putting pages, do not extend file past EOF. + */ + if (offset + count > np->inode.i_size) { + count = np->inode.i_size - offset; + if (count < 0) + count = 0; + } + + for (i = 0; i < npages; i++) + rtvals[i] = VM_PAGER_ERROR; + + bp = uma_zalloc(p9fs_pbuf_zone, M_WAITOK); + kva = (vm_offset_t) bp->b_data; + pmap_qenter(kva, pages, npages); + + VM_CNT_INC(v_vnodeout); + VM_CNT_ADD(v_vnodepgsout, count); + + iov.iov_base = (caddr_t) kva; + iov.iov_len = count; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_offset = offset; + uio.uio_resid = count; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_WRITE; + uio.uio_td = td; + + P9_DEBUG(VOPS, "of=%jd,resid=%zd\n", (intmax_t)uio.uio_offset, uio.uio_resid); + + error = VOP_WRITE(vp, &uio, vnode_pager_putpages_ioflags(ap->a_sync), + cred); + + pmap_qremove(kva, npages); + uma_zfree(p9fs_pbuf_zone, bp); + + if (error == 0) + vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid, + np->inode.i_size - offset, npages * PAGE_SIZE); + + return (rtvals[0]); +} struct vop_vector p9fs_vnops = { .vop_default = &default_vnodeops, @@ -2150,5 +2228,6 @@ struct vop_vector p9fs_vnops = { .vop_rename = p9fs_rename, .vop_link = p9fs_link, .vop_readlink = p9fs_readlink, + .vop_putpages = p9fs_putpages, }; VFS_VOP_VECTOR_REGISTER(p9fs_vnops); From nobody Mon Jun 24 16:27:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7D0V0nhJz5PBsj; Mon, 24 Jun 2024 16:28:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7D0T4MtSz4Ndm; Mon, 24 Jun 2024 16:28:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-52ce09b76e0so1540503e87.0; Mon, 24 Jun 2024 09:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719246487; x=1719851287; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=84ez4MPoL/Y4YYwzwyncej0NEKXZ/e2g5zXrQ9+DkYA=; b=jQw7tG8KznXy/8UxUo4WnCuky8NCcchgBr5ZqWuMp9yVJRXPSj0XvUsJRSTmmmX9As ntFWGWHKWXRuK55cx+LNOihsVrJFBFKnoQp/heKDqrUpZNdDOuYIT+0YKUTKFQcR0JLO ATh2v2MJo/6FnmKFeSFixglRQGMzA+6Ddrr3NX7JWX7U5oZIMcp6ZSzORKjosQf18NJB MkRVlofNNF+pxD6UimEC5pGHw/4svFKtfg6tvI2kP6ZlaGYOxslUF6Ub/H5bahzov8wK ae0HRLOyQb/UDWe5LdCLgKHP6CNwcCmYOGP7Ho5HPHi6kxKH9nCOP2QSnfAWChaVLDb6 0pBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719246487; x=1719851287; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=84ez4MPoL/Y4YYwzwyncej0NEKXZ/e2g5zXrQ9+DkYA=; b=sXs3NffFnmYzkcytmFSV/66mdJfbPNnQ9wFCI2PdszIxxngHdgMwUrnmorH7FycApG yp7CvLg0BlgyPNEy2ilMOXz6TaOrh5P1eMi9d6v8KDlCVgJWQQR/Nnyd4VLnguDwCcwo cqnhvaJncTcpkIUdu0BE4BxQ3RGRZ+ho/f8GD/ECiKNcmbPRroIa9tAusdaW1EL2XLK7 pawqT0wlQvQWj8/ondn1jDn4DBrSZ4L047KvXFef2AT2Qu5pF/GpHyQ9NzoHRG9mDABV ERupqqRs3WcCmclRvVnHcLKaptn5q73I4RjgnD39YdPabyj8bxqSRWcmEmKlXFsHJWE9 jakg== X-Forwarded-Encrypted: i=1; AJvYcCUp2LZrJ8y6hPyvpEN0zHYnT/cMonKuE9rFU4ZYZEOorQv4l4fVDYOHB0W1LFMORuogBPGQTK82/Z7VRnwdVU/QFs0v/9+I7cwVGqpnOTZLzgPb+rXEoye6DbG3dJEc2XkC+Q0JqrXv74+iHqNjur19lg== X-Gm-Message-State: AOJu0Yzn6Dt5GLmFUODatLF3FEewfDgiQGfKuF7uiquK2zlXnxjMz2QH x1YVTWI2pXA8JMu7jLxGwmC5QLrL692ja4mr4bYIpiTacfetFeD2A5eQHaBhY9Abu6y5pFKCKNB Lkj9mBOrn3hObbX3HU8QavLQLf45rwvQm X-Google-Smtp-Source: AGHT+IEs2qWKCrhZimIlDFczz0O93nYoGJXesr5OcWM+5c37B9ecfE0+Epxm/Q0OkI+FhXX6Ij3p3WbEEDA54YWWAAo= X-Received: by 2002:a05:6512:33cc:b0:52c:ebf6:9a7f with SMTP id 2adb3069b0e04-52cebf69b22mr414134e87.11.1719246486572; Mon, 24 Jun 2024 09:28:06 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406192058.45JKwB77036327@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Mon, 24 Jun 2024 09:27:55 -0700 Message-ID: Subject: Re: git: ddf0ed09bd8f - main - sdt: Implement SDT probes using hot-patching To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-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: 4W7D0T4MtSz4Ndm On Mon, Jun 24, 2024 at 9:06=E2=80=AFAM Mark Johnston w= rote: > > On Mon, Jun 24, 2024 at 08:36:55AM -0700, Ryan Libby wrote: > > On Wed, Jun 19, 2024 at 1:58=E2=80=AFPM Mark Johnston wrote: > > > > > > The branch main has been updated by markj: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dddf0ed09bd8f83677407db= 36828aca2c10f419c9 > > > > > > commit ddf0ed09bd8f83677407db36828aca2c10f419c9 > > > Author: Mark Johnston > > > AuthorDate: 2024-06-19 20:57:09 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2024-06-19 20:57:41 +0000 > > > > > > sdt: Implement SDT probes using hot-patching > > > > > > The idea here is to avoid a memory access and conditional branch = per > > > probe site. Instead, the probe is represented by an "unreachable= " > > > unconditional function call. asm goto is used to store the addre= ss of > > > the probe site (represented by a no-op sled) and the address of t= he > > > function call into a tracepoint record. Each SDT probe carries a= list > > > of tracepoints. > > > > Questions out of curiosity and maybe ignorance: > > > > How does this work with relocations? Something must be adjusting these > > addresses? > > The compiler handles this as part of the implementation of asm goto: > the inline assembly can reference jump targets with "%l" and > they're specified as operands to the asm goto statement. In the kernel > these references are resolved statically, and kernel modules will > contain relocations for the sdt_tracepoint_set section. > > > > +/* > > > + * Work around an apparent clang bug or limitation which prevents th= e use of the > > > + * "i" (immediate) constraint with the probe structure. > > > + */ > > > +#define _SDT_ASM_PROBE_CONSTRAINT "Ws" > > > +#define _SDT_ASM_PROBE_OPERAND "p" > > > > Is it because i386 kmods are built with -fPIC? > > I suspect that that's related, yeah. The compiler might be assuming > that some indirection is needed to compute the target address, but in > this case it's an address in the same function and presumably can safely > be assumed to be an immediate. > That makes sense for the "%l1", does it also apply to the "%c0"? Or does use of "%c" for the probe pointer require non-PIC? As in, don't the _probes_ get relocated, and don't we need to patch the pointers to the probes? > > By the way, it seems gcc13 (latest in ports) doesn't support the "Ws" > > constraint. It seems to have been added to gcc 14. I know i386 is tie= r > > 2 these days, and gcc is a second consideration anyway. Trying to test > > out a patch for i386 gcc, I found that it doesn't build currently and > > this is one of a few reasons. > > What happens if "i" is used with gcc? IIRC I had tried gcc+i386 when > testing the patch but the kernel failed to build for other reasons at > the time. It also errors out with constraint "%i" and modifier "%c". /usr/src/freebsd/sys/sys/sdt.h:216:9: error: 'asm' operand 0 probably does not match constraints [-Werror] ... /usr/src/freebsd/sys/sys/sdt.h:216:9: error: impossible constraint in 'asm' It works if I remove -fPIC, but I assume we're doing that for a reason... Ryan From nobody Mon Jun 24 16:28:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7D0v1PSTz5PCNV; Mon, 24 Jun 2024 16:28:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7D0t59WJz4Nk3; Mon, 24 Jun 2024 16:28:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 45OGSNZi076680; Mon, 24 Jun 2024 19:28:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 45OGSNZi076680 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 45OGSN3j076679; Mon, 24 Jun 2024 19:28:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 24 Jun 2024 19:28:23 +0300 From: Konstantin Belousov To: Doug Rabson Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: daa2c99c89f2 - main - p9fs: implement working putpages (fix mmap write) Message-ID: References: <202406241612.45OGCjTK040862@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202406241612.45OGCjTK040862@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4W7D0t59WJz4Nk3 On Mon, Jun 24, 2024 at 04:12:45PM +0000, Doug Rabson wrote: > The branch main has been updated by dfr: > > URL: https://cgit.FreeBSD.org/src/commit/?id=daa2c99c89f224200911aa6c8cdee07bc354947a > > commit daa2c99c89f224200911aa6c8cdee07bc354947a > Author: Val Packett > AuthorDate: 2024-06-24 13:37:58 +0000 > Commit: Doug Rabson > CommitDate: 2024-06-24 16:11:47 +0000 > > p9fs: implement working putpages (fix mmap write) It is not. The problem is still there: the writes syscalls ignore page cache. From nobody Mon Jun 24 16:35:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7D962LFjz5PD4n; Mon, 24 Jun 2024 16:35:38 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7D953xpbz4Plt; Mon, 24 Jun 2024 16:35:37 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2ec61eeed8eso13168281fa.0; Mon, 24 Jun 2024 09:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719246935; x=1719851735; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ml2rAe07X/yASHx6Y8A4NnUroo81B9vXHCMbxZrK+Dk=; b=Egh3aT4FgNmfEZUEPig7xbWv6VQuAjr8UxqsWk/oPIwRNy3+LYfAGLIgKh+TenJz7L nr2v3Kc7rS+iIYED6Af97xgtkp/yNO/7om3lBINLH1mx8+De/w3FBviM1UskK4NdbIGE /MQydsDH0StuXgXVqN2G4CjAtoiAHFIqybCTqsO2uOWfa8lZnp5/sgmOltxSUdmetEHK W/sahHVYwaZWSP75t7q5v8JdPR0zDPZ+ChFVWTa1rwTdt8V/eN76XUzhCRTRL2u6+2hI e8C8mCT8rnEQWswjxgClTloo0KZ4z7loPiqIhKYp7Yqebh2cPPw8hAf4l7N61SXgdfT0 AhTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719246935; x=1719851735; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ml2rAe07X/yASHx6Y8A4NnUroo81B9vXHCMbxZrK+Dk=; b=BdHamPbtIj1fSNTOB1WeIvEijq8H6NBrBhK96rQe1tdIQu/jB+ihDzR+JsSEe61Lqe Zi8hKeWs9oSiMbT+FxYHkWRvR46qbnYPHMRu1033e4TeJByhHpRvfHrTU0Th3t5cwLO8 1bcs/+HulBzT699OtQOJbJdaocWfot3C4rn+aetng98FAFc/rMJhuxv8WLcm4qzFUMKP 2LrAU3/KF/GCn1KJXIHOuvBKenhoJ43B94WMD6GMB5ff6Wq0h7cxTswW9EIN3yiF/PKU S5R29y+TXs0ovkXHNN2W9gIP1MSqEYqpStN/KAdeyzkKwST478z7WlRq6VYTIWZN8Hg1 Yg3A== X-Forwarded-Encrypted: i=1; AJvYcCVHlBebKDmae1k4tY67/GnbuGKuFXF6tUM95MZ5Z9ZR/i0z7i3MqYlnBoHxHhurn8WBJRNrOvfYFL1U/3DAbBrw2t6v9B4Fsp8ruNwOEt85koY7ShJOFAdsNE1IFcNVepZmZV7DMH/dYdT2W1X2Lqf4ag== X-Gm-Message-State: AOJu0Yy3KDr/jCsuEJcxoRttZ9iwQY+/PERPXKyE5Gt9UQH6cezcyD4Y QeCGhsE3DK+94IIhRUz8ZuhEypPccm2rcpv3gGmxx0hfk0buAN3gI2GVvikQlsi+shtIBYeVUp8 vk1bfxe4zqcwGaz5J2cSxcTvn5TDZv5ao X-Google-Smtp-Source: AGHT+IGwqtBo9ipE0BWzex60pNSJExZLUAinzYushWXDpoTd02td7Q8NABEz8TjANJR00hh1lT6H4w/J9Gy2I+MGQrs= X-Received: by 2002:a05:6512:ba1:b0:52c:88d7:ae31 with SMTP id 2adb3069b0e04-52ce185f67emr3428846e87.48.1719246935212; Mon, 24 Jun 2024 09:35:35 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406192058.45JKwB77036327@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Mon, 24 Jun 2024 09:35:23 -0700 Message-ID: Subject: Re: git: ddf0ed09bd8f - main - sdt: Implement SDT probes using hot-patching To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-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: 4W7D953xpbz4Plt On Mon, Jun 24, 2024 at 9:06=E2=80=AFAM Mark Johnston w= rote: > > On Mon, Jun 24, 2024 at 08:36:55AM -0700, Ryan Libby wrote: > > By the way, it seems gcc13 (latest in ports) doesn't support the "Ws" > > constraint. It seems to have been added to gcc 14. I know i386 is tie= r > > 2 these days, and gcc is a second consideration anyway. Trying to test > > out a patch for i386 gcc, I found that it doesn't build currently and > > this is one of a few reasons. > > What happens if "i" is used with gcc? IIRC I had tried gcc+i386 when > testing the patch but the kernel failed to build for other reasons at > the time. Sorry, just realized, I didn't mean to imply this was blocking me. I was able to get far enough through the build to verify my patch and I pushed it already: 88478cc02a20 i386 kernel __storeload_barrier: quiet gcc -Warray-bounds From nobody Mon Jun 24 17:07:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Dsn679sz5PGxp; Mon, 24 Jun 2024 17:07: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 4W7Dsn5flKz4S8B; Mon, 24 Jun 2024 17:07:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719248845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pa+m3MhNdXLuiwlgQOrFHUezQIk1Co0SllztgDK0Zb4=; b=tiniVtgvrreDuPULJ6yR63VG3iqW3sguid5pbs4I+gcQZPUNFDyS615BkAW9V9cAz5Soix 1pJBXS3+ohFGn1sQWPzQR2poPROMpyuPYkbia5pINROK26xKlNsOSWYREuBphJemZNEtJ3 2DFR5AsTLBe6DJOJB26kajt7wMLQxUGIpxHeo444J31EspK7z14ijaxwh8WkD7vL4pUXqG Ph6dYpPS/zOu05QyV61nh7bjxCIJWWuIU+hARlpQnHrrwg9ChrxLqEYJsHWDK4AlHPMYzf rIU/LFLZxFsPsWHOyV8kCtDjiZR7t8DehqW2EF30yCdM6GljxEVuoKuU89ObJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719248845; a=rsa-sha256; cv=none; b=jNqPq/w8ng5p+bdT5DsPzcN3YvZSnpgMmt9xjOXtkK3N79q1Ggj1DLLXX49OLdHksXTIub NiLrCe3LMZdbQJTJpD65OJDfiaBN57H4U+m/XUNup2Ud3/paceeryvtD7qU4Uk6LBy1G3X bXk5RmYO5FqvqdjMymA2YhTpLs1OJxjN4iiY+C08kzoKlN5XnZSpR/4DEI2hM8eov2VEkJ E8Y47BLhDQMiFph8YBwfPEhGNYHoud+vAzPNkpEoAeJc5GefAg1J2EzS3LXT1f97Wzr6qI joIQVcYugzprtK+SwCRDBiyJzWUTAQ7AXjQkX6BcQ4iOEtUHszfFAbLBMgk0HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719248845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pa+m3MhNdXLuiwlgQOrFHUezQIk1Co0SllztgDK0Zb4=; b=AZtS82J0b21wJE4nN8OY6/iNs0BEF+dzvnAiItb8yt5oqehJ9lMPgtmWqTjKBeEFmLTxKG CnuJ/cKcTMiMHOpc4U8EI+Ap7O4ezZ4D4fYgj6GN7xEjgweBdFhiZgvqtHeoXHd+CeFeFC LXC5VWfmrv/RpK59e+V7KnuRVw25R0tGXdNbkwKa4keGknjgC4j3xBN/DseikkLHXUrLE/ COMW08YKODED65vLIDFl/3Mn8JXo+ovFQ3wrHqKaZd9i29iN6ZEukME+CNZwLmnG/HhNl8 zqx6qJ91NxLVLVd7koHHzVMkKPk+qcOj1nJq63L1xNuBjI2KYlTDNrJciGAkPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7Dsn5GMHzR2w; Mon, 24 Jun 2024 17:07: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 45OH7PbW026428; Mon, 24 Jun 2024 17:07:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OH7PQY026426; Mon, 24 Jun 2024 17:07:25 GMT (envelope-from git) Date: Mon, 24 Jun 2024 17:07:25 GMT Message-Id: <202406241707.45OH7PQY026426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 3c84b4b35f28 - main - kern: move __always_inline to canonical position List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c84b4b35f28ab2d0c3798dd567de05ed020cdca Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=3c84b4b35f28ab2d0c3798dd567de05ed020cdca commit 3c84b4b35f28ab2d0c3798dd567de05ed020cdca Author: Ryan Libby AuthorDate: 2024-06-24 17:05:58 +0000 Commit: Ryan Libby CommitDate: 2024-06-24 17:05:58 +0000 kern: move __always_inline to canonical position Ahead of including inline in __always_inline, move __always_inline to where inline goes. Reviewed by: kib, olce Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45708 --- sys/kern/kern_lock.c | 11 ++++++----- sys/kern/kern_rwlock.c | 6 +++--- sys/kern/kern_sx.c | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 1b4d21f064a7..4700ee0f8f98 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -115,7 +115,7 @@ CTASSERT(LK_UNLOCKED == (LK_UNLOCKED & } \ } while (0) -static bool __always_inline +static __always_inline bool LK_CAN_SHARE(uintptr_t x, int flags, bool fp) { @@ -180,9 +180,10 @@ struct lockmgr_wait { int itimo; }; -static bool __always_inline lockmgr_slock_try(struct lock *lk, uintptr_t *xp, +static __always_inline bool lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int flags, bool fp); -static bool __always_inline lockmgr_sunlock_try(struct lock *lk, uintptr_t *xp); +static __always_inline bool lockmgr_sunlock_try(struct lock *lk, + uintptr_t *xp); static void lockmgr_exit(u_int flags, struct lock_object *ilk, int wakeup_swapper) @@ -511,7 +512,7 @@ lockdestroy(struct lock *lk) lock_destroy(&lk->lock_object); } -static bool __always_inline +static __always_inline bool lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int flags, bool fp) { @@ -531,7 +532,7 @@ lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int flags, bool fp) return (false); } -static bool __always_inline +static __always_inline bool lockmgr_sunlock_try(struct lock *lk, uintptr_t *xp) { diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index 29767f09b304..f53c69b5e6ec 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -384,7 +384,7 @@ _rw_wunlock_cookie(volatile uintptr_t *c, const char *file, int line) * is unlocked and has no writer waiters or spinners. Failing otherwise * prioritizes writers before readers. */ -static bool __always_inline +static __always_inline bool __rw_can_read(struct thread *td, uintptr_t v, bool fp) { @@ -396,7 +396,7 @@ __rw_can_read(struct thread *td, uintptr_t v, bool fp) return (false); } -static bool __always_inline +static __always_inline bool __rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp, bool fp LOCK_FILE_LINE_ARG_DEF) { @@ -742,7 +742,7 @@ __rw_try_rlock(volatile uintptr_t *c, const char *file, int line) return (__rw_try_rlock_int(rw LOCK_FILE_LINE_ARG)); } -static bool __always_inline +static __always_inline bool __rw_runlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp) { diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c index d302fa45161e..18e6ba232c4a 100644 --- a/sys/kern/kern_sx.c +++ b/sys/kern/kern_sx.c @@ -984,7 +984,7 @@ _sx_xunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_LINE_ARG_DEF) kick_proc0(); } -static bool __always_inline +static __always_inline bool __sx_can_read(struct thread *td, uintptr_t x, bool fp) { @@ -996,7 +996,7 @@ __sx_can_read(struct thread *td, uintptr_t x, bool fp) return (false); } -static bool __always_inline +static __always_inline bool __sx_slock_try(struct sx *sx, struct thread *td, uintptr_t *xp, bool fp LOCK_FILE_LINE_ARG_DEF) { @@ -1306,7 +1306,7 @@ _sx_slock(struct sx *sx, int opts, const char *file, int line) return (_sx_slock_int(sx, opts LOCK_FILE_LINE_ARG)); } -static bool __always_inline +static __always_inline bool _sx_sunlock_try(struct sx *sx, struct thread *td, uintptr_t *xp) { From nobody Mon Jun 24 17:07:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Dsp6spYz5PGsJ; Mon, 24 Jun 2024 17:07: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 4W7Dsp6Mgfz4S42; Mon, 24 Jun 2024 17:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719248846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LaLz3chS3XZJ2d24PSWqYSgj0tY+AsmlWMVUlDwLDaU=; b=gwO2Zo+IR/N9xcfjkKnUoiYD5fsebAe8KZOT4/51YnBqmopa7LHZ487Msg1Ofr98xv10Ao 4HKpdZAnoQI1D/K6VTMDe41lD8I98ykEfBgRNB6x60V2fakbveQl4jRQxPo1ftGOf5HV6D ymn94ppdL5cuE/PwrzmW1/cjb17ybAZBiq7EAZdeQd/JAp7C8c0rfP5yMa/4DhrnMqZw5V 21+W0yuREq6ugeFwAuFplm7w/9EVbvR5tPbVD65DZG5Q4WdV3I+6bMFvi6ppK+XfZAKdy1 vwlPAnMh3QANMbcin4QWsg1i6xmamZha4DLRcDQY6U+vjXkF56lR1vzAiwkh2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719248846; a=rsa-sha256; cv=none; b=akS2OD50uRIpmog6iOKezDtuw1yCF5s+CCcUlHoZg4DWQhKF8NNq+K2jlLE8+M+jwWwAHY ZEFQXHQWxMbW7lj5FCr7urCcUtDA4xUKF4DlPrk8jckP5mvn2YStFkuXKO30Vl4ynTJk4f SGLZh4R4Bq5UbbpBrg4R+hit0DYOPfSYeRM1P3oCC/js/dw7wYbXybv2LU12RFYFaPeAsb cu/iSSSykTL5ibVMuI6cXrS0fkLYQ6mVbalsLoW3ZymdLVGbWte3u5DayWuOcpukbena/L GunTrnnoyuH2bmwIYf3T/oR2NnF+x0Ta45I+6dYRhZhY3yAdebpZg2SWe2r2Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719248846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LaLz3chS3XZJ2d24PSWqYSgj0tY+AsmlWMVUlDwLDaU=; b=OHXebK3w4I9s3whHRWz+KNlmLnvQ/w9dl88+W6iz8/jkIk6Wnn9AN51N9vYm4V7T8M5yeL imVFZpXO3IMH6zK+dIfAKl2Cu9F0XvwNbmp/GQjjjQxyH4np1zDz+FlxJVQezdYq1XYG2o LABRfkaLIB6I2Io5yBnN//BbW8UtIJvewSnHsY+W3IbMUyKhYCD5RpskG5s3ME8z33SPIa AfQym8H/KzevSpJz9Tq/aLWXN+8kq6Uwpg9QqE4Jrfer0dAlk47FYgvoTY1Wyd07HjKjRN GfMEKVZ9rqS9xL+rPOXfxw0LEEt8Crhu8+CcCUbMKQbb/Kt/mK3PgpGbTA4U0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7Dsp5zsszR2x; Mon, 24 Jun 2024 17:07: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 45OH7QVh026473; Mon, 24 Jun 2024 17:07:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OH7Qe4026470; Mon, 24 Jun 2024 17:07:26 GMT (envelope-from git) Date: Mon, 24 Jun 2024 17:07:26 GMT Message-Id: <202406241707.45OH7Qe4026470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: eae1767d8fa4 - main - vfs: move __always_inline to canonical position List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eae1767d8fa424262e4ef095e5fc12968dbfe054 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=eae1767d8fa424262e4ef095e5fc12968dbfe054 commit eae1767d8fa424262e4ef095e5fc12968dbfe054 Author: Ryan Libby AuthorDate: 2024-06-24 17:05:58 +0000 Commit: Ryan Libby CommitDate: 2024-06-24 17:05:58 +0000 vfs: move __always_inline to canonical position Ahead of including inline in __always_inline, move __always_inline to where inline goes. Reviewed by: kib, olce Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45709 --- sys/kern/vfs_default.c | 2 +- sys/kern/vfs_subr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 67c7ace5f72f..1393f2fce9f3 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1240,7 +1240,7 @@ vop_stdunset_text(struct vop_unset_text_args *ap) __assert_unreachable(); } -static int __always_inline +static __always_inline int vop_stdadd_writecount_impl(struct vop_add_writecount_args *ap, bool handle_msync) { struct vnode *vp; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f8f4c2a868f3..52712b99abac 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3980,7 +3980,7 @@ vdrop(struct vnode *vp) vdropl(vp); } -static void __always_inline +static __always_inline void vdropl_impl(struct vnode *vp, bool enqueue) { From nobody Mon Jun 24 17:07:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Dsr352Sz5PGxq; Mon, 24 Jun 2024 17:07: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 4W7Dsr0XF4z4S4G; Mon, 24 Jun 2024 17:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719248848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XZIB8nSgWa8qN+n771jpNiLcjEMG++FiKo3dScRqEM=; b=ya1p9TgRDyhR6NIzpuQnAfghIn0H1DgJqXWq2YTI8dEod6nhQ99JIvZzS2YCyCIG8f18rn VBKKk1oVlBsJMpCROLRTs/hIXg5DB+oswG8rNOjxsB9WcGeK971m/mGFVlggezXYAe3A1j rZLC0MIc50QK0Or3OyFBtpTK1K+83j/cf3dJ1ild5rhvdlAVKgUjZcMqYcy6Qt6i5tp+xH nyqdotwle0m6SY9Te2bvhZSprt9l4O+ca7zECsiXh8kCI/ipVLsBxorGZsaiAI/7cIxCWV KNFaejprAR9CaNPV8VVZb1QEv6OETPy562nzuBhq4VGgpk3fmUfXT5u1XwL1gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719248848; a=rsa-sha256; cv=none; b=D7ukh94WpREaiphgaR/63g+LmRGPikpguDMBD4dh2NS7cP7+sUfcoRfKLM3TuPdI0cSWFd Im6ceuP9PGOetMlJDOTyZvETFUFkvNY4UCN+wAwCCiXPyYye2Elav0MFupJ9h+a58AVE4R YTV2t8p5vp394oo5rgbRVc1ICEcktOrGkou3kcz02rBYSUON0+OApJqOZg6zOu1CgwRF40 rE/kwO6ePrZeEyK+pHtck/uBvhcK6IEMS8tUUrbhnscCq+tTEZWxHe2XZ/+i8S45tgQXxs tCLIiUcEE/v3NuOBR3UnIK9Dtpf6hXGMQ9PosSycXtaIvRnrvPjeASvA53fr2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719248848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XZIB8nSgWa8qN+n771jpNiLcjEMG++FiKo3dScRqEM=; b=Ye/At4neDVttIc5o/Jp1egI/vhaJNlHEsJ5MZfZ/0lCuAM/PLdGVnJ2GhxaMlUT3IWiI7H iwPyyK7oXVTy+StnIcxCa+lkv1Ve4+I+qP/vSWsdcu3VbNpLGYM9b4vRNeNxH9DSzp+dLr XEKiE6hUaNFSFHjbGN1/hPqyf5IGPnm4fyZBmMhE6s5I9MZptW+3RbwKnaC9gHfRBHFB5S 5K3yGK76y6ZXIQtbn82F2VN6p8T387MMpIA7QEuhTX/lzPK27+34f8V0yI8y89gRqO0F7N QGLG86ILtWXGnX4dq/zOuAag6r7u4d2I6A76v1li2XrDB9891PtWqNR/MJG42A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7Dsr08QyzR81; Mon, 24 Jun 2024 17:07: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 45OH7RDN026518; Mon, 24 Jun 2024 17:07:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OH7RFc026515; Mon, 24 Jun 2024 17:07:27 GMT (envelope-from git) Date: Mon, 24 Jun 2024 17:07:27 GMT Message-Id: <202406241707.45OH7RFc026515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 012e32c66529 - main - libthr: move __always_inline to canonical position List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 012e32c66529ba74a80b7a02da6c983d5a2c2f70 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=012e32c66529ba74a80b7a02da6c983d5a2c2f70 commit 012e32c66529ba74a80b7a02da6c983d5a2c2f70 Author: Ryan Libby AuthorDate: 2024-06-24 17:05:58 +0000 Commit: Ryan Libby CommitDate: 2024-06-24 17:05:58 +0000 libthr: move __always_inline to canonical position Ahead of including inline in __always_inline, move __always_inline to where inline goes. Reviewed by: imp, kib, olce Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45710 --- lib/libthr/thread/thr_rwlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libthr/thread/thr_rwlock.c b/lib/libthr/thread/thr_rwlock.c index b482dc8b732a..084181ba922a 100644 --- a/lib/libthr/thread/thr_rwlock.c +++ b/lib/libthr/thread/thr_rwlock.c @@ -59,7 +59,7 @@ __weak_reference(_pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock); static int init_static(struct pthread *thread, pthread_rwlock_t *rwlock); static int init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out); -static int __always_inline +static __always_inline int check_and_init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out) { if (__predict_false(*rwlock == THR_PSHARED_PTR || From nobody Mon Jun 24 18:51:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7H9y5N3xz5PRxy; Mon, 24 Jun 2024 18:51:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7H9y1jkQz4nPc; Mon, 24 Jun 2024 18:51:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-44051a577easo23010121cf.2; Mon, 24 Jun 2024 11:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719255093; x=1719859893; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=Gx1G0L6fI0VGVAdMK4872aQ0XtK7yI52MgoGcGZwPwI=; b=LEUA03Il8E/3v9L0kgYV4ry59MU71tTnQrnCIaPHUM18/uX7EeAj5hn1pc6Cm8V3O9 CG9eB17EiFbpCqZt8JH9uNZmgK061qvp7JMem6VWl/ojBh3z/WiND1XPeftQOl3j8f2E P3uBYcZHS1Cvoe4XwuKZsYl1FunN0n4sWWMZXNjOMWA8lssLhtlEsA+Qe+HPwte1Huo8 jz40xLCZ9sR+qiO5IlpJrwtphs4HgYMFenmGKNDVZEvsO87Ba0Kt1QBADNsMzICBGtCO 1kTp1OifRX+/NonmWHc2SyDOS/dcx4nchZilG3hH8muBVc93uya5MOqubCrJyx3aJqWz wILw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719255093; x=1719859893; h=in-reply-to:content-transfer-encoding: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=Gx1G0L6fI0VGVAdMK4872aQ0XtK7yI52MgoGcGZwPwI=; b=Lxn2tu/Oj2vst6jpQmdhuYSBAGOjNU3u3OjdZJXr9L6mjqE2/wFHncHfqEkbA3Z/0J kebbd7grpZ6dN0Jwbe1au4HT9KvKkZ8Sk7O44nvaKlCwcE77vsRtL+hQiZt5cgMJ87tF eOc3ECiLu6PluKdmvWNryszmakiiSItdMh1m/m2Dk++imQkT6x5TQtGRS4hxJrBmM1sq xq3UF7s6gVrf5mDKoIP5T8N5w5X7TKX+F6ODXPkGm+zqYLcaO0yeqcA0jzoUUlCphqOc xbYjtDAitl6QvqWOQ4hMNnL3IezrV2vjjYsIrrNoYkBivSLg+tqrCFTXKTLQoBozkBas lVMw== X-Forwarded-Encrypted: i=1; AJvYcCUyOFI4dD9eA/ZcuGeFDKlsuWxkiKmvo9wDCbCWYFA41tFbc5T+J5gZxdO0ZoQix+NiaDum/vlHohaxVvCtgf6Bkt3XZgxch7ae+PV3MzZy2v5o6x03DT690jq/pesK8Mt3BXyb4ekSnqY0WAspSSz1pw== X-Gm-Message-State: AOJu0Yw3E1oe5F66c4fmMF6/Z8iZrjbenVSSpWd9USKf3/l2NJnMGMnb Dyx3ruRJcJKfi4jvl+l3RVHmMIW//hPL72T/Z7qXpebeBkvV6m3gPG9mTBFY X-Google-Smtp-Source: AGHT+IHOC06/TO5wHERInAZnlyBY7BqjUQrpL4v5siXQlDVRGeoxoIwvEPAJiAfCIHFBx7DSAUKsPw== X-Received: by 2002:a05:622a:5cc:b0:441:3395:ece0 with SMTP id d75a77b69052e-444d9220932mr54964021cf.37.1719255093304; Mon, 24 Jun 2024 11:51:33 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b51ef30a1esm36443556d6.90.2024.06.24.11.51.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 11:51:32 -0700 (PDT) Date: Mon, 24 Jun 2024 14:51:27 -0400 From: Mark Johnston To: Ryan Libby Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ddf0ed09bd8f - main - sdt: Implement SDT probes using hot-patching Message-ID: References: <202406192058.45JKwB77036327@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: 4W7H9y1jkQz4nPc On Mon, Jun 24, 2024 at 09:27:55AM -0700, Ryan Libby wrote: > On Mon, Jun 24, 2024 at 9:06 AM Mark Johnston wrote: > > > > On Mon, Jun 24, 2024 at 08:36:55AM -0700, Ryan Libby wrote: > > > On Wed, Jun 19, 2024 at 1:58 PM Mark Johnston wrote: > > > > > > > > The branch main has been updated by markj: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=ddf0ed09bd8f83677407db36828aca2c10f419c9 > > > > > > > > commit ddf0ed09bd8f83677407db36828aca2c10f419c9 > > > > Author: Mark Johnston > > > > AuthorDate: 2024-06-19 20:57:09 +0000 > > > > Commit: Mark Johnston > > > > CommitDate: 2024-06-19 20:57:41 +0000 > > > > > > > > sdt: Implement SDT probes using hot-patching > > > > > > > > The idea here is to avoid a memory access and conditional branch per > > > > probe site. Instead, the probe is represented by an "unreachable" > > > > unconditional function call. asm goto is used to store the address of > > > > the probe site (represented by a no-op sled) and the address of the > > > > function call into a tracepoint record. Each SDT probe carries a list > > > > of tracepoints. > > > > > > Questions out of curiosity and maybe ignorance: > > > > > > How does this work with relocations? Something must be adjusting these > > > addresses? > > > > The compiler handles this as part of the implementation of asm goto: > > the inline assembly can reference jump targets with "%l" and > > they're specified as operands to the asm goto statement. In the kernel > > these references are resolved statically, and kernel modules will > > contain relocations for the sdt_tracepoint_set section. > > > > > > +/* > > > > + * Work around an apparent clang bug or limitation which prevents the use of the > > > > + * "i" (immediate) constraint with the probe structure. > > > > + */ > > > > +#define _SDT_ASM_PROBE_CONSTRAINT "Ws" > > > > +#define _SDT_ASM_PROBE_OPERAND "p" > > > > > > Is it because i386 kmods are built with -fPIC? > > > > I suspect that that's related, yeah. The compiler might be assuming > > that some indirection is needed to compute the target address, but in > > this case it's an address in the same function and presumably can safely > > be assumed to be an immediate. > > > > That makes sense for the "%l1", does it also apply to the "%c0"? Or > does use of "%c" for the probe pointer require non-PIC? As in, don't > the _probes_ get relocated, and don't we need to patch the pointers to > the probes? When I use '%c0' to refer to the input operand, the intent is to insert the symbol name, not the address of the probe structure as computed by the compiler. In an earlier iteration, there was no input operand and I just had something like __asm( ... ".quad " __STRING(_SDT_PROBE_NAME(...)) "\n" ...); But this doesn't work when the probe symbol is local but has global linkage (i.e., it was defined with "static"), since we don't know what the symbol name is at compile time. Hence the indirection, and I needed "c" to get clang to do what I want. The assembler encounters SDT probe symbol names and emits relocations accordingly. Maybe there's a better way to do what I want? It seems that this doesn't work at all with gcc when -fPIC is defined. > > > By the way, it seems gcc13 (latest in ports) doesn't support the "Ws" > > > constraint. It seems to have been added to gcc 14. I know i386 is tier > > > 2 these days, and gcc is a second consideration anyway. Trying to test > > > out a patch for i386 gcc, I found that it doesn't build currently and > > > this is one of a few reasons. > > > > What happens if "i" is used with gcc? IIRC I had tried gcc+i386 when > > testing the patch but the kernel failed to build for other reasons at > > the time. > > It also errors out with constraint "%i" and modifier "%c". > /usr/src/freebsd/sys/sys/sdt.h:216:9: error: 'asm' operand 0 probably > does not match constraints [-Werror] > ... > /usr/src/freebsd/sys/sys/sdt.h:216:9: error: impossible constraint in 'asm' > > It works if I remove -fPIC, but I assume we're doing that for a reason... From nobody Mon Jun 24 19:37:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7JBp4Xkxz5PWXf; Mon, 24 Jun 2024 19:37: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 4W7JBp43LLz4rqG; Mon, 24 Jun 2024 19:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719257842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUNN3z1tfRv3rjrLXccRierg/u7BwrwYGajLv3svJy4=; b=oIAZ7CYc+OIwFI7qABqzy6js14xZAQH9xq78FbZzuU6l3RFRjmM83WhyDe7hZisprHLdLF LYADmqSgkS4+J3rUE6tX8VmQaiLNlKVRWufBefn/6RnxVC9DwVPurQg8FOCOBvGD4/ZDo6 y2ztO3VXlgndczsMDh+vSYGTJxDkSfFl71SXXwBfLGNl9yFTZ7JsSjta6yAvisjkeFhVrX 1eYtHItakncGJLrqwJvGhY/ouf5Rd0V1nf8hvc3L2kok8ll+HY6lk80fn5yt2CVjFYncKf pNSnM6qTq5YDA2g+bGIe5xcjA2ohlO3kZpr2ijNQanF6aFdQ4ct3v6V30Bfi4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719257842; a=rsa-sha256; cv=none; b=ewcSThivekhjWpEiZ7IJksv7irCvAq9I1aUiWPPdnlraOY5nlGmbpNyfmKh5mvgTZ6L2+Q H7zt0yPYv7P/tpYVUv88rwzOPHrSvtA0LjfgE1MT5Fo/CXLViRQaDD6+Oa4qNeTsrsQgYK 66EGHXRLf4lSpvI9Z1QLFwooslE9kPyuFR1JHGH5wlA3Ot2g3LYozDrPHTZzN5TWy1lQZD llY1AsVzwbUmRjQYnx/iQ6ia84a4dp/q6J/4QM0upQalGdrLXT6Ueji8x9wkH3fTeb00vS Nr7PdLjK58r4iilJWKf7pNycvGrlwNI4btUWnTpoPeZyG9xfdweiLEonntmPbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719257842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUNN3z1tfRv3rjrLXccRierg/u7BwrwYGajLv3svJy4=; b=Wb+fO8K9bAgaQhlJMEnFhJbJQt+Njw+yaF6y086E2aIy9iRS4J93kx/FPf6h441ijREHkh MJ+WyOCZs0mFpXqS6Hmi0nqZn7HPY/VxOyrtXzEUcRuP9swjZp06Sw1XguJJb8FY/tO6Hr JGgJ4p6cwUW6UhYCwaoSNtiWCiS3AdZq/p35PEOEfNmwZaTHmKMckza6ipWTj9OWGFYfkL CNmcoMbC+XQVEQLbrt7aH0VQOmJAag7C2yEt++XZKGdybsq0w/qppMstmzOgDrXTnyhr+3 dqRsC4/OaDrp7ufxdO0Z33mavkgw4cjH6r9NU05SxnJkT3QF+cxA3SMINzudag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7JBp3fJxzWTG; Mon, 24 Jun 2024 19:37: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 45OJbMsc081505; Mon, 24 Jun 2024 19:37:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OJbMup081502; Mon, 24 Jun 2024 19:37:22 GMT (envelope-from git) Date: Mon, 24 Jun 2024 19:37:22 GMT Message-Id: <202406241937.45OJbMup081502@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: 1efd69f933b6 - main - p9fs: move NULL check immediately after allocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 1efd69f933b6ad4177ecda78cf4891aa9a1e8f6b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1efd69f933b6ad4177ecda78cf4891aa9a1e8f6b commit 1efd69f933b6ad4177ecda78cf4891aa9a1e8f6b Author: Ed Maste AuthorDate: 2024-06-24 16:21:19 +0000 Commit: Ed Maste CommitDate: 2024-06-24 19:36:11 +0000 p9fs: move NULL check immediately after allocation Reported by: Shawn Webb (HardenedBSD) Reviewed by: dfr Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45719 --- sys/dev/virtio/p9fs/virtio_p9fs.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index 48430b4f6b67..811faff6cd93 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -332,6 +332,11 @@ vt9p_attach(device_t dev) cv_init(&chan->submit_cv, "Conditional variable for submit queue" ); chan->max_nsegs = MAX_SUPPORTED_SGS; chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_NOWAIT); + if (chan->vt9p_sglist == NULL) { + error = ENOMEM; + P9_DEBUG(ERROR, "%s: Cannot allocate sglist\n", __func__); + goto out; + } /* Negotiate the features from the host */ virtio_set_feature_desc(dev, virtio_9p_feature_desc); @@ -367,12 +372,6 @@ vt9p_attach(device_t dev) SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "p9fs_mount_tag", CTLFLAG_RD, chan->mount_tag, 0, "Mount tag"); - if (chan->vt9p_sglist == NULL) { - error = ENOMEM; - P9_DEBUG(ERROR, "%s: Cannot allocate sglist\n", __func__); - goto out; - } - /* We expect one virtqueue, for requests. */ error = vt9p_alloc_virtqueue(chan); From nobody Mon Jun 24 19:41:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7JJ907ssz5PWyB; Mon, 24 Jun 2024 19:42:01 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7JJ8728Kz4sMw; Mon, 24 Jun 2024 19:42:00 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719258121; 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=hXWZP1umQe9W3fXEZnkEhq3N0zpXZm12VHeHuxry7ww=; b=Eb8ibpB+ma0ghPIX0iF6kboa06/ON9lCwK5STIqL0uio7uDes+jyMWtnKYh+ypoavH+Edp 5RptIS+m42LtNo0r/7HXDFWHU8XTBoJYWhqi6vqs2+r7L5VoP9h0xnzkAdg9w32EPcHRFU 6RU8JVhELLxa/VKmCHF1d9/GbN/UngMQwOqhz7CXG9Rnzb6CgLXrPjA+PZRgZoYPid2UXu JDTZ7ArpgGpEgCa3mt2nGQJzuIiMGPCoQkK9eLVc5yX8RZ6+TgB2s8OjZn/vFIC1l0Mkzs bykqFAoM+KjJjtnrAY7oJN2zioCqSwip5R+DCT3mBOpd5oKo4cyup7OQCJaclA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719258120; a=rsa-sha256; cv=none; b=M1j7mbmRbIveb9x8MVgKsYElzwJgiuXg407HvTYhWZjkyj+VOegumuL19BYw3QLiTJFAjb GVj3X7Su0mUc+ybe5tz6ymQHzlDuDF9uebYQeH5C/OicDctNJIgUP8JBGsKojkLTo4Vh/W s+UHr8vnaiSeAttHL4FTnKQAOHLAb6ZYf0RDaVBkaGTHRuEREB13SHdg5DuWHF3+eE4W/u r6dOiLNFFxT7/c7tMdPYShO7Zskc/QJ9BMCmG72mCwk8l+f6S9/t8jK8Db/yMlyGWV5QoW EeeW/KllSxELxS2Om5t04LoyByYjOxdfh1J8PvnYnBqmt/VjR3dCggIRhpdWDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719258120; 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=hXWZP1umQe9W3fXEZnkEhq3N0zpXZm12VHeHuxry7ww=; b=BageEMX5nZHxaV8Ry9zfZxlsB+M0emUBLVZK7qqw6XdyP5jg/36v7Z6Om1iMj6RoeSXf18 GUe97D1SXc9y4BdxMm03xUtN5Wox8kb8BBMnNGxz5RKV+mO8Yb/O8HIWgA+nVyiaz1CWuT LhO41zp/ljbQJkHFfkHUqJ3U2om1b62QwbqF8ZQvsuEpraIu6L44MMviBMkG4bCIfSOH8D LCyEOzRCr62zhjLwVOS6oPW6ILKnqMuojqzTbp57lKMXh5mf4mx9xGkLKid0+muSBUqNoN KM0thRA717qoyKj2VchWlLNZ6iREC1SuFC/uWjJpZ91uvXJqV+j+aC5L1UeFRA== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W7JJ75t01z1GM9; Mon, 24 Jun 2024 19:41:59 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 24 Jun 2024 12:41:57 -0700 From: Gleb Smirnoff To: Justin Hibbits Cc: imp@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c2e9c5bbf022 - main - tpm: Refactor TIS and add a SPI attachment Message-ID: References: <202405032032.443KWhf0045034@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202405032032.443KWhf0045034@gitrepo.freebsd.org> Hi Justin, sorry for late notice, but we just discovered that after this commit tpm(4) on ACPI no longer attaches. From what I see ther probe method isn't even called. On Fri, May 03, 2024 at 08:32:43PM +0000, Justin Hibbits wrote: J> The branch main has been updated by jhibbits: J> J> URL: https://cgit.FreeBSD.org/src/commit/?id=c2e9c5bbf02294376988f3e7eba82b8e078cdf30 J> J> commit c2e9c5bbf02294376988f3e7eba82b8e078cdf30 J> Author: Justin Hibbits J> AuthorDate: 2023-11-13 16:33:44 +0000 J> Commit: Justin Hibbits J> CommitDate: 2024-05-03 20:26:11 +0000 J> J> tpm: Refactor TIS and add a SPI attachment J> J> Summary: J> Though mostly used in x86 devices, TPM can be used on others, with a J> direct SPI attachment. Refactor the TPM 2.0 driver set to use an J> attachment interface, and implement a SPI bus interface. J> J> Test Plan: J> Tested on a Raspberry Pi 4, with a GeeekPi TPM2.0 module (SLB9670 J> TPM) using security/tpm2-tools tpm2_getcaps for very light testing against the J> spibus attachment. J> J> Reviewed by: kd J> Obtained from: Juniper Networks, Inc. J> Differential Revision: https://reviews.freebsd.org/D45069 J> --- J> sys/conf/files | 7 ++ J> sys/conf/files.amd64 | 2 - J> sys/dev/tpm/tpm20.c | 6 +- J> sys/dev/tpm/tpm20.h | 53 ++++------ J> sys/dev/tpm/tpm_bus.c | 99 ++++++++++++++++++ J> sys/dev/tpm/tpm_crb.c | 66 ++++++------ J> sys/dev/tpm/tpm_if.m | 76 ++++++++++++++ J> sys/dev/tpm/tpm_spibus.c | 166 ++++++++++++++++++++++++++++++ J> sys/dev/tpm/tpm_tis_acpi.c | 86 ++++++++++++++++ J> sys/dev/tpm/{tpm_tis.c => tpm_tis_core.c} | 118 ++++++++------------- J> sys/dev/tpm/tpm_tis_spibus.c | 91 ++++++++++++++++ J> sys/modules/Makefile | 3 +- J> sys/modules/tpm/Makefile | 21 +++- J> 13 files changed, 640 insertions(+), 154 deletions(-) J> J> diff --git a/sys/conf/files b/sys/conf/files J> index f68567aa9023..4d7f28ceaaf1 100644 J> --- a/sys/conf/files J> +++ b/sys/conf/files J> @@ -3194,6 +3194,13 @@ dev/syscons/warp/warp_saver.c optional warp_saver J> dev/tcp_log/tcp_log_dev.c optional tcp_blackbox inet | tcp_blackbox inet6 J> dev/tdfx/tdfx_pci.c optional tdfx pci J> dev/ti/if_ti.c optional ti pci J> +dev/tpm/tpm20.c optional tpm J> +dev/tpm/tpm_bus.c optional tpm acpi J> +dev/tpm/tpm_if.m optional tpm J> +dev/tpm/tpm_spibus.c optional tpm spibus fdt J> +dev/tpm/tpm_tis_acpi.c optional tpm acpi J> +dev/tpm/tpm_tis_core.c optional tpm J> +dev/tpm/tpm_tis_spibus.c optional tpm spibus fdt J> dev/tws/tws.c optional tws J> dev/tws/tws_cam.c optional tws J> dev/tws/tws_hdm.c optional tws J> diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 J> index 6322837c887b..18dec5ed47b0 100644 J> --- a/sys/conf/files.amd64 J> +++ b/sys/conf/files.amd64 J> @@ -372,9 +372,7 @@ dev/smartpqi/smartpqi_sis.c optional smartpqi J> dev/smartpqi/smartpqi_tag.c optional smartpqi J> dev/sume/if_sume.c optional sume J> dev/syscons/apm/apm_saver.c optional apm_saver apm J> -dev/tpm/tpm20.c optional tpm J> dev/tpm/tpm_crb.c optional tpm acpi J> -dev/tpm/tpm_tis.c optional tpm acpi J> dev/tpm/tpm_acpi.c optional tpm acpi J> dev/tpm/tpm_isa.c optional tpm isa J> dev/p2sb/p2sb.c optional p2sb pci J> diff --git a/sys/dev/tpm/tpm20.c b/sys/dev/tpm/tpm20.c J> index da090bc068c9..3399e17f53aa 100644 J> --- a/sys/dev/tpm/tpm20.c J> +++ b/sys/dev/tpm/tpm20.c J> @@ -127,7 +127,7 @@ tpm20_write(struct cdev *dev, struct uio *uio, int flags) J> return (result); J> } J> J> - result = sc->transmit(sc, byte_count); J> + result = TPM_TRANSMIT(sc->dev, byte_count); J> J> if (result == 0) { J> callout_reset(&sc->discard_buffer_callout, J> @@ -267,7 +267,7 @@ tpm20_harvest(void *arg, int unused) J> cv_wait(&sc->buf_cv, &sc->dev_lock); J> J> memcpy(sc->buf, cmd, sizeof(cmd)); J> - result = sc->transmit(sc, sizeof(cmd)); J> + result = TPM_TRANSMIT(sc->dev, sizeof(cmd)); J> if (result != 0) { J> sx_xunlock(&sc->dev_lock); J> return; J> @@ -319,7 +319,7 @@ tpm20_save_state(device_t dev, bool suspend) J> sx_xlock(&sc->dev_lock); J> J> memcpy(sc->buf, save_cmd, sizeof(save_cmd)); J> - sc->transmit(sc, sizeof(save_cmd)); J> + TPM_TRANSMIT(sc->dev, sizeof(save_cmd)); J> J> sx_xunlock(&sc->dev_lock); J> J> diff --git a/sys/dev/tpm/tpm20.h b/sys/dev/tpm/tpm20.h J> index 14f89de3e84e..683cd7549bd4 100644 J> --- a/sys/dev/tpm/tpm20.h J> +++ b/sys/dev/tpm/tpm20.h J> @@ -28,6 +28,7 @@ J> #ifndef _TPM20_H_ J> #define _TPM20_H_ J> J> +#include "opt_acpi.h" J> #include J> #include J> #include J> @@ -39,6 +40,7 @@ J> #include J> #include J> #include J> +#include J> #include J> #include J> #include J> @@ -49,12 +51,14 @@ J> #include J> #include J> J> +#ifdef DEV_ACPI J> #include J> #include J> #include J> -#include "opt_acpi.h" J> +#endif J> J> #include "opt_tpm.h" J> +#include "tpm_if.h" J> J> #define BIT(x) (1 << (x)) J> J> @@ -136,55 +140,36 @@ int32_t tpm20_get_timeout(uint32_t command); J> int tpm20_init(struct tpm_sc *sc); J> void tpm20_release(struct tpm_sc *sc); J> J> -/* Small helper routines for io ops */ J> -static inline uint8_t J> -RD1(struct tpm_sc *sc, bus_size_t off) J> -{ J> - J> - return (bus_read_1(sc->mem_res, off)); J> -} J> -static inline uint32_t J> -RD4(struct tpm_sc *sc, bus_size_t off) J> -{ J> - J> - return (bus_read_4(sc->mem_res, off)); J> -} J> -#ifdef __amd64__ J> -static inline uint64_t J> -RD8(struct tpm_sc *sc, bus_size_t off) J> -{ J> +/* Mode driver types */ J> +DECLARE_CLASS(tpmtis_driver); J> +int tpmtis_attach(device_t dev); J> J> - return (bus_read_8(sc->mem_res, off)); J> -} J> -#endif J> -static inline void J> -WR1(struct tpm_sc *sc, bus_size_t off, uint8_t val) J> -{ J> +DECLARE_CLASS(tpmcrb_driver); J> J> - bus_write_1(sc->mem_res, off, val); J> -} J> -static inline void J> -WR4(struct tpm_sc *sc, bus_size_t off, uint32_t val) J> -{ J> +/* Bus driver types */ J> +DECLARE_CLASS(tpm_bus_driver); J> +DECLARE_CLASS(tpm_spi_driver); J> J> - bus_write_4(sc->mem_res, off, val); J> -} J> +/* Small helper routines for io ops */ J> static inline void J> AND4(struct tpm_sc *sc, bus_size_t off, uint32_t val) J> { J> + uint32_t v = TPM_READ_4(sc->dev, off); J> J> - WR4(sc, off, RD4(sc, off) & val); J> + TPM_WRITE_4(sc->dev, off, v & val); J> } J> static inline void J> OR1(struct tpm_sc *sc, bus_size_t off, uint8_t val) J> { J> + uint8_t v = TPM_READ_1(sc->dev, off); J> J> - WR1(sc, off, RD1(sc, off) | val); J> + TPM_WRITE_1(sc->dev, off, v | val); J> } J> static inline void J> OR4(struct tpm_sc *sc, bus_size_t off, uint32_t val) J> { J> + uint32_t v = TPM_READ_1(sc->dev, off); J> J> - WR4(sc, off, RD4(sc, off) | val); J> + TPM_WRITE_4(sc->dev, off, v | val); J> } J> #endif /* _TPM20_H_ */ J> diff --git a/sys/dev/tpm/tpm_bus.c b/sys/dev/tpm/tpm_bus.c J> new file mode 100644 J> index 000000000000..f0d3c26c33f1 J> --- /dev/null J> +++ b/sys/dev/tpm/tpm_bus.c J> @@ -0,0 +1,99 @@ J> +/*- J> + * Copyright (c) 2023 Juniper Networks, Inc. J> + * All rights reserved. J> + * J> + * Redistribution and use in source and binary forms, with or without J> + * modification, are permitted provided that the following conditions J> + * are met: J> + * 1. Redistributions of source code must retain the above copyright J> + * notice, this list of conditions and the following disclaimer. J> + * 2. Redistributions in binary form must reproduce the above copyright J> + * notice, this list of conditions and the following disclaimer in the J> + * documentation and/or other materials provided with the distribution. J> + * J> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR J> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED J> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE J> + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, J> + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES J> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR J> + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) J> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, J> + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN J> + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE J> + * POSSIBILITY OF SUCH DAMAGE. J> + */ J> + J> +#include J> +#include J> +#include J> +#include "tpm_if.h" J> +#include "tpm20.h" J> + J> +/* Override accessors */ J> +static uint8_t J> +tpm_read_1(device_t dev, bus_size_t off) J> +{ J> + struct tpm_sc *sc = device_get_softc(dev); J> + J> + return (bus_read_1(sc->mem_res, off)); J> +} J> + J> +static uint32_t J> +tpm_read_4(device_t dev, bus_size_t off) J> +{ J> + struct tpm_sc *sc = device_get_softc(dev); J> + J> + return (bus_read_4(sc->mem_res, off)); J> +} J> + J> +/* J> + * Only i386 is missing bus_space_read_8. J> + */ J> +#ifndef __i386__ J> +static uint64_t J> +tpm_read_8(device_t dev, bus_size_t off) J> +{ J> + struct tpm_sc *sc = device_get_softc(dev); J> + J> + return (bus_read_8(sc->mem_res, off)); J> +} J> +#endif J> + J> +static void J> +tpm_write_1(device_t dev, bus_size_t off, uint8_t val) J> +{ J> + struct tpm_sc *sc = device_get_softc(dev); J> + J> + bus_write_1(sc->mem_res, off, val); J> +} J> + J> +static void J> +tpm_write_4(device_t dev, bus_size_t off, uint32_t val) J> +{ J> + struct tpm_sc *sc = device_get_softc(dev); J> + J> + bus_write_4(sc->mem_res, off, val); J> +} J> + J> +static void J> +tpm_write_barrier(device_t dev, bus_addr_t off, bus_size_t length) J> +{ J> + struct tpm_sc *sc = device_get_softc(dev); J> + J> + bus_barrier(sc->mem_res, off, length, BUS_SPACE_BARRIER_WRITE); J> +} J> + J> +static device_method_t tpm_bus_methods[] = { J> + DEVMETHOD(tpm_read_1, tpm_read_1), J> + DEVMETHOD(tpm_read_4, tpm_read_4), J> +#ifndef __i386__ J> + DEVMETHOD(tpm_read_8, tpm_read_8), J> +#endif J> + DEVMETHOD(tpm_write_1, tpm_write_1), J> + DEVMETHOD(tpm_write_4, tpm_write_4), J> + DEVMETHOD(tpm_write_barrier, tpm_write_barrier), J> + DEVMETHOD_END J> +}; J> + J> +DEFINE_CLASS_0(tpm_lbc, tpm_bus_driver, tpm_bus_methods, sizeof(struct tpm_sc)); J> diff --git a/sys/dev/tpm/tpm_crb.c b/sys/dev/tpm/tpm_crb.c J> index bb4df82e613b..b9ddcf0dd3e1 100644 J> --- a/sys/dev/tpm/tpm_crb.c J> +++ b/sys/dev/tpm/tpm_crb.c J> @@ -83,7 +83,7 @@ struct tpmcrb_sc { J> size_t rsp_buf_size; J> }; J> J> -int tpmcrb_transmit(struct tpm_sc *sc, size_t size); J> +int tpmcrb_transmit(device_t dev, size_t size); J> J> static int tpmcrb_acpi_probe(device_t dev); J> static int tpmcrb_attach(device_t dev); J> @@ -185,15 +185,15 @@ tpmcrb_attach(device_t dev) J> * stored in a single 8 byte one. J> */ J> #ifdef __amd64__ J> - crb_sc->rsp_off = RD8(sc, TPM_CRB_CTRL_RSP_ADDR); J> + crb_sc->rsp_off = TPM_READ_8(sc->dev, TPM_CRB_CTRL_RSP_ADDR); J> #else J> - crb_sc->rsp_off = RD4(sc, TPM_CRB_CTRL_RSP_ADDR); J> - crb_sc->rsp_off |= ((uint64_t) RD4(sc, TPM_CRB_CTRL_RSP_HADDR) << 32); J> + crb_sc->rsp_off = TPM_READ_4(sc->dev, TPM_CRB_CTRL_RSP_ADDR); J> + crb_sc->rsp_off |= ((uint64_t) TPM_READ_4(sc->dev, TPM_CRB_CTRL_RSP_HADDR) << 32); J> #endif J> - crb_sc->cmd_off = RD4(sc, TPM_CRB_CTRL_CMD_LADDR); J> - crb_sc->cmd_off |= ((uint64_t) RD4(sc, TPM_CRB_CTRL_CMD_HADDR) << 32); J> - crb_sc->cmd_buf_size = RD4(sc, TPM_CRB_CTRL_CMD_SIZE); J> - crb_sc->rsp_buf_size = RD4(sc, TPM_CRB_CTRL_RSP_SIZE); J> + crb_sc->cmd_off = TPM_READ_4(sc->dev, TPM_CRB_CTRL_CMD_LADDR); J> + crb_sc->cmd_off |= ((uint64_t) TPM_READ_4(sc->dev, TPM_CRB_CTRL_CMD_HADDR) << 32); J> + crb_sc->cmd_buf_size = TPM_READ_4(sc->dev, TPM_CRB_CTRL_CMD_SIZE); J> + crb_sc->rsp_buf_size = TPM_READ_4(sc->dev, TPM_CRB_CTRL_RSP_SIZE); J> J> tpmcrb_relinquish_locality(sc); J> J> @@ -218,8 +218,6 @@ tpmcrb_attach(device_t dev) J> } J> } J> J> - sc->transmit = tpmcrb_transmit; J> - J> result = tpm20_init(sc); J> if (result != 0) J> tpmcrb_detach(dev); J> @@ -248,11 +246,11 @@ tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val, J> { J> J> /* Check for condition */ J> - if ((RD4(sc, off) & mask) == val) J> + if ((TPM_READ_4(sc->dev, off) & mask) == val) J> return (true); J> J> while (timeout > 0) { J> - if ((RD4(sc, off) & mask) == val) J> + if ((TPM_READ_4(sc->dev, off) & mask) == val) J> return (true); J> J> pause("TPM in polling mode", 1); J> @@ -291,7 +289,7 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc) J> { J> uint32_t mask = ~0; J> J> - WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CMD); J> + TPM_WRITE_4(sc->dev, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CMD); J> if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_START, J> mask, ~mask, TPM_TIMEOUT_B)) { J> device_printf(sc->dev, J> @@ -299,48 +297,50 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc) J> return (false); J> } J> J> - WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR); J> + TPM_WRITE_4(sc->dev, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR); J> return (true); J> } J> J> int J> -tpmcrb_transmit(struct tpm_sc *sc, size_t length) J> +tpmcrb_transmit(device_t dev, size_t length) J> { J> struct tpmcrb_sc *crb_sc; J> + struct tpm_sc *sc; J> uint32_t mask, curr_cmd; J> int timeout, bytes_available; J> J> - crb_sc = (struct tpmcrb_sc *)sc; J> + crb_sc = device_get_softc(dev); J> + sc = &crb_sc->base; J> J> sx_assert(&sc->dev_lock, SA_XLOCKED); J> J> if (length > crb_sc->cmd_buf_size) { J> - device_printf(sc->dev, J> + device_printf(dev, J> "Requested transfer is bigger than buffer size\n"); J> return (E2BIG); J> } J> J> - if (RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_ERR_BIT) { J> - device_printf(sc->dev, J> + if (TPM_READ_4(dev, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_ERR_BIT) { J> + device_printf(dev, J> "Device has Error bit set\n"); J> return (EIO); J> } J> if (!tpmcrb_request_locality(sc, 0)) { J> - device_printf(sc->dev, J> + device_printf(dev, J> "Failed to obtain locality\n"); J> return (EIO); J> } J> /* Clear cancellation bit */ J> - WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR); J> + TPM_WRITE_4(dev, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR); J> J> /* Switch device to idle state if necessary */ J> - if (!(RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) { J> + if (!(TPM_READ_4(dev, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) { J> OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_IDLE); J> J> mask = TPM_CRB_CTRL_STS_IDLE_BIT; J> if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, J> mask, mask, TPM_TIMEOUT_C)) { J> - device_printf(sc->dev, J> + device_printf(dev, J> "Failed to transition to idle state\n"); J> return (EIO); J> } J> @@ -351,7 +351,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length) J> mask = TPM_CRB_CTRL_REQ_GO_READY; J> if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, J> mask, !mask, TPM_TIMEOUT_C)) { J> - device_printf(sc->dev, J> + device_printf(dev, J> "Failed to transition to ready state\n"); J> return (EIO); J> } J> @@ -366,16 +366,14 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length) J> /* Send command and tell device to process it. */ J> bus_write_region_stream_1(sc->mem_res, crb_sc->cmd_off, J> sc->buf, length); J> - bus_barrier(sc->mem_res, crb_sc->cmd_off, J> - length, BUS_SPACE_BARRIER_WRITE); J> + TPM_WRITE_BARRIER(dev, crb_sc->cmd_off, length); J> J> - WR4(sc, TPM_CRB_CTRL_START, TPM_CRB_CTRL_START_CMD); J> - bus_barrier(sc->mem_res, TPM_CRB_CTRL_START, J> - 4, BUS_SPACE_BARRIER_WRITE); J> + TPM_WRITE_4(dev, TPM_CRB_CTRL_START, TPM_CRB_CTRL_START_CMD); J> + TPM_WRITE_BARRIER(dev, TPM_CRB_CTRL_START, 4); J> J> mask = ~0; J> if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_START, mask, ~mask, timeout)) { J> - device_printf(sc->dev, J> + device_printf(dev, J> "Timeout while waiting for device to process cmd\n"); J> if (!tpmcrb_cancel_cmd(sc)) J> return (EIO); J> @@ -387,7 +385,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length) J> bytes_available = be32toh(*(uint32_t *) (&sc->buf[2])); J> J> if (bytes_available > TPM_BUFSIZE || bytes_available < TPM_HEADER_SIZE) { J> - device_printf(sc->dev, J> + device_printf(dev, J> "Incorrect response size: %d\n", J> bytes_available); J> return (EIO); J> @@ -411,11 +409,11 @@ static device_method_t tpmcrb_methods[] = { J> DEVMETHOD(device_detach, tpmcrb_detach), J> DEVMETHOD(device_shutdown, tpm20_shutdown), J> DEVMETHOD(device_suspend, tpm20_suspend), J> + DEVMETHOD(tpm_transmit, tpmcrb_transmit), J> {0, 0} J> }; J> J> -static driver_t tpmcrb_driver = { J> - "tpmcrb", tpmcrb_methods, sizeof(struct tpmcrb_sc), J> -}; J> +DEFINE_CLASS_1(tpmcrb, tpmcrb_driver, tpmcrb_methods, sizeof(struct tpmcrb_sc), J> + tpm_bus_driver); J> J> DRIVER_MODULE(tpmcrb, acpi, tpmcrb_driver, 0, 0); J> diff --git a/sys/dev/tpm/tpm_if.m b/sys/dev/tpm/tpm_if.m J> new file mode 100644 J> index 000000000000..2b6afe22f3e8 J> --- /dev/null J> +++ b/sys/dev/tpm/tpm_if.m J> @@ -0,0 +1,76 @@ J> +#- J> +# Copyright (c) 2023 Juniper Networks, Inc. J> +# All Rights Reserved J> +# J> +# Redistribution and use in source and binary forms, with or without J> +# modification, are permitted provided that the following conditions J> +# are met: J> +# 1. Redistributions of source code must retain the above copyright J> +# notice, this list of conditions and the following disclaimer. J> +# 2. Redistributions in binary form must reproduce the above copyright J> +# notice, this list of conditions and the following disclaimer in the J> +# documentation and/or other materials provided with the distribution. J> +# J> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND J> +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE J> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE J> +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE J> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL J> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS J> +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) J> +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT J> +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY J> +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF J> +# SUCH DAMAGE. J> +# J> +# J> + J> +#include J> +#include J> + J> +INTERFACE tpm; J> + J> +# J> +# Transfer data to the TPM data buffer J> +# J> +METHOD int transmit { J> + device_t dev; J> + size_t length; J> +}; J> + J> + J> +METHOD uint64_t read_8 { J> + device_t dev; J> + bus_addr_t addr; J> +} J> + J> +# J> +# Read 4 bytes (host endian) from a TPM register J> +# J> +METHOD uint32_t read_4 { J> + device_t dev; J> + bus_addr_t addr; J> +}; J> + J> +METHOD uint8_t read_1 { J> + device_t dev; J> + bus_addr_t addr; J> +}; J> + J> +METHOD void write_4 { J> + device_t dev; J> + bus_addr_t addr; J> + uint32_t value; J> +}; J> + J> +METHOD void write_1 { J> + device_t dev; J> + bus_addr_t addr; J> + uint8_t value; J> +}; J> + J> +METHOD void write_barrier { J> + device_t dev; J> + bus_addr_t off; J> + bus_size_t length; J> +} J> diff --git a/sys/dev/tpm/tpm_spibus.c b/sys/dev/tpm/tpm_spibus.c J> new file mode 100644 J> index 000000000000..f83ff42d77b1 J> --- /dev/null J> +++ b/sys/dev/tpm/tpm_spibus.c J> @@ -0,0 +1,166 @@ J> +/*- J> + * Copyright (c) 2023 Juniper Networks, Inc. J> + * All rights reserved. J> + * J> + * Redistribution and use in source and binary forms, with or without J> + * modification, are permitted provided that the following conditions J> + * are met: J> + * 1. Redistributions of source code must retain the above copyright J> + * notice, this list of conditions and the following disclaimer. J> + * 2. Redistributions in binary form must reproduce the above copyright J> + * notice, this list of conditions and the following disclaimer in the J> + * documentation and/or other materials provided with the distribution. J> + * J> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR J> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED J> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE J> + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, J> + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES J> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR J> + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) J> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, J> + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN J> + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE J> + * POSSIBILITY OF SUCH DAMAGE. J> + */ J> + J> +#include J> +#include J> +#include J> + J> +#include J> +#include "spibus_if.h" J> +#include "tpm_if.h" J> +#include "tpm20.h" J> + J> +#define TPM_BASE_ADDR 0xD40000 J> +#define TPM_SPI_HEADER_SIZE 4 J> +#define TPM_WAIT_STATES 50 J> + J> +static void J> +tpm_insert_wait(device_t dev) J> +{ J> + device_t parent = device_get_parent(dev); J> + int wait = TPM_WAIT_STATES; J> + struct spi_command spic = SPI_COMMAND_INITIALIZER; J> + J> + uint8_t txb = 0; J> + uint8_t rxb = 0; J> + J> + spic.tx_cmd = &txb; J> + spic.rx_cmd = &rxb; J> + spic.tx_cmd_sz = 1; J> + spic.rx_cmd_sz = 1; J> + spic.flags = SPI_FLAG_KEEP_CS; J> + do { J> + SPIBUS_TRANSFER(parent, dev, &spic); J> + } while (--wait > 0 && (rxb & 0x1) == 0); J> +} J> + J> +static inline int J> +tpm_spi_read_n(device_t dev, bus_size_t off, void *buf, size_t size) J> +{ J> + struct spi_command spic = SPI_COMMAND_INITIALIZER; J> + uint8_t tx[4] = {0}; J> + uint8_t rx[4] = {0}; J> + int err; J> + J> + if (size > sizeof(rx)) J> + return (EINVAL); J> + off += TPM_BASE_ADDR; J> + tx[0] = 0x80 | (size - 1); /* Write (size) bytes */ J> + tx[1] = (off >> 16) & 0xff; J> + tx[2] = (off >> 8) & 0xff; J> + tx[3] = off & 0xff; J> + J> + spic.tx_cmd = tx; J> + spic.tx_cmd_sz = sizeof(tx); J> + spic.rx_cmd = rx; J> + spic.rx_cmd_sz = sizeof(tx); J> + spic.flags = SPI_FLAG_KEEP_CS; J> + J> + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic); J> + J> + if (!(rx[3] & 0x1)) { J> + tpm_insert_wait(dev); J> + } J> + memset(tx, 0, sizeof(tx)); J> + spic.tx_cmd_sz = spic.rx_cmd_sz = size; J> + spic.flags = 0; J> + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic); J> + memcpy(buf, &rx[0], size); J> + J> + return (err); J> +} J> + J> +static inline int J> +tpm_spi_write_n(device_t dev, bus_size_t off, void *buf, size_t size) J> +{ J> + struct spi_command spic = SPI_COMMAND_INITIALIZER; J> + uint8_t tx[8] = {0}; J> + uint8_t rx[8] = {0}; J> + int err; J> + J> + off += TPM_BASE_ADDR; J> + tx[0] = 0x00 | (size - 1); /* Write (size) bytes */ J> + tx[1] = (off >> 16) & 0xff; J> + tx[2] = (off >> 8) & 0xff; J> + tx[3] = off & 0xff; J> + J> + memcpy(&tx[4], buf, size); J> + J> + spic.tx_cmd = tx; J> + spic.tx_cmd_sz = size + TPM_SPI_HEADER_SIZE; J> + spic.rx_cmd = rx; J> + spic.rx_cmd_sz = size + TPM_SPI_HEADER_SIZE; J> + J> + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic); J> + J> + return (err); J> +} J> + J> +/* Override accessors */ J> +static inline uint8_t J> +spi_read_1(device_t dev, bus_size_t off) J> +{ J> + uint8_t rx_byte; J> + J> + tpm_spi_read_n(dev, off, &rx_byte, 1); J> + J> + return (rx_byte); J> +} J> + J> +static inline uint32_t J> +spi_read_4(device_t dev, bus_size_t off) J> +{ J> + uint32_t rx_word = 0; J> + J> + tpm_spi_read_n(dev, off, &rx_word, 4); J> + rx_word = le32toh(rx_word); J> + J> + return (rx_word); J> +} J> + J> +static inline void J> +spi_write_1(device_t dev, bus_size_t off, uint8_t val) J> +{ J> + tpm_spi_write_n(dev, off, &val, 1); J> +} J> + J> +static inline void J> +spi_write_4(device_t dev, bus_size_t off, uint32_t val) J> +{ J> + uint32_t tmp = htole32(val); J> + tpm_spi_write_n(dev, off, &tmp, 4); J> +} J> + J> +static device_method_t tpm_spibus_methods[] = { J> + DEVMETHOD(tpm_read_4, spi_read_4), J> + DEVMETHOD(tpm_read_1, spi_read_1), J> + DEVMETHOD(tpm_write_4, spi_write_4), J> + DEVMETHOD(tpm_write_1, spi_write_1), J> + DEVMETHOD_END J> +}; J> + J> +DEFINE_CLASS_0(tpm_spi, tpm_spi_driver, tpm_spibus_methods, J> + sizeof(struct tpm_sc)); J> diff --git a/sys/dev/tpm/tpm_tis_acpi.c b/sys/dev/tpm/tpm_tis_acpi.c J> new file mode 100644 J> index 000000000000..32c73e5f2483 J> --- /dev/null J> +++ b/sys/dev/tpm/tpm_tis_acpi.c J> @@ -0,0 +1,86 @@ J> +/*- J> + * Copyright (c) 2018 Stormshield. J> + * Copyright (c) 2018 Semihalf. J> + * Copyright (c) 2023 Juniper Networks, Inc. J> + * All rights reserved. J> + * J> + * Redistribution and use in source and binary forms, with or without J> + * modification, are permitted provided that the following conditions J> + * are met: J> + * 1. Redistributions of source code must retain the above copyright J> + * notice, this list of conditions and the following disclaimer. J> + * 2. Redistributions in binary form must reproduce the above copyright J> + * notice, this list of conditions and the following disclaimer in the J> + * documentation and/or other materials provided with the distribution. J> + * J> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR J> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED J> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE J> + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, J> + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES J> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR J> + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) J> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, J> + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN J> + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE J> + * POSSIBILITY OF SUCH DAMAGE. J> + */ J> + J> +#include J> +#include "tpm20.h" J> +#include "tpm_if.h" J> + J> +static int tpmtis_acpi_probe(device_t dev); J> + J> +char *tpmtis_ids[] = {"MSFT0101", NULL}; J> + J> +static int J> +tpmtis_acpi_probe(device_t dev) J> +{ J> + int err; J> + ACPI_TABLE_TPM23 *tbl; J> + ACPI_STATUS status; J> + J> + err = ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids, NULL); J> + if (err > 0) J> + return (err); J> + /*Find TPM2 Header*/ J> + status = AcpiGetTable(ACPI_SIG_TPM2, 1, (ACPI_TABLE_HEADER **) &tbl); J> + if(ACPI_FAILURE(status) || J> + tbl->StartMethod != TPM2_START_METHOD_TIS) J> + err = ENXIO; J> + J> + device_set_desc(dev, "Trusted Platform Module 2.0, FIFO mode"); J> + return (err); J> +} J> + J> +static int J> +tpmtis_acpi_attach(device_t dev) J> +{ J> + struct tpm_sc *sc = device_get_softc(dev); J> + J> + sc->mem_rid = 0; J> + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, J> + RF_ACTIVE); J> + if (sc->mem_res == NULL) { J> + return (ENXIO); J> + } J> + J> + /* J> + * If tpmtis_attach() fails, tpmtis_detach() will automatically free J> + * sc->mem_res (not-NULL). J> + */ J> + return (tpmtis_attach(dev)); J> +} J> + J> +/* ACPI Driver */ J> +static device_method_t tpmtis_methods[] = { J> + DEVMETHOD(device_attach, tpmtis_acpi_attach), J> + DEVMETHOD(device_probe, tpmtis_acpi_probe), J> + DEVMETHOD_END J> +}; J> + J> +DEFINE_CLASS_2(tpmtis, tpmtis_acpi_driver, tpmtis_methods, J> + sizeof(struct tpm_sc), tpmtis_driver, tpm_bus_driver); J> + J> +DRIVER_MODULE(tpmtis, acpi, tpmtis_driver, 0, 0); J> diff --git a/sys/dev/tpm/tpm_tis.c b/sys/dev/tpm/tpm_tis_core.c J> similarity index 82% J> rename from sys/dev/tpm/tpm_tis.c J> rename to sys/dev/tpm/tpm_tis_core.c J> index b97d7ab3f8e8..230eb12d2acd 100644 J> --- a/sys/dev/tpm/tpm_tis.c J> +++ b/sys/dev/tpm/tpm_tis_core.c J> @@ -27,6 +27,7 @@ J> J> #include J> #include "tpm20.h" J> +#include "tpm_if.h" J> J> /* J> * TIS register space as defined in J> @@ -72,10 +73,8 @@ J> #define TPM_STS_BURST_MASK 0xFFFF00 J> #define TPM_STS_BURST_OFFSET 0x8 J> J> -static int tpmtis_transmit(struct tpm_sc *sc, size_t length); J> +static int tpmtis_transmit(device_t dev, size_t length); J> J> -static int tpmtis_acpi_probe(device_t dev); J> -static int tpmtis_attach(device_t dev); J> static int tpmtis_detach(device_t dev); J> J> static void tpmtis_intr_handler(void *arg); J> @@ -93,29 +92,7 @@ static bool tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, J> J> static uint16_t tpmtis_wait_for_burst(struct tpm_sc *sc); J> J> -char *tpmtis_ids[] = {"MSFT0101", NULL}; J> - J> -static int J> -tpmtis_acpi_probe(device_t dev) J> -{ J> - int err; J> - ACPI_TABLE_TPM23 *tbl; J> - ACPI_STATUS status; J> - J> - err = ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids, NULL); J> - if (err > 0) J> - return (err); J> - /*Find TPM2 Header*/ J> - status = AcpiGetTable(ACPI_SIG_TPM2, 1, (ACPI_TABLE_HEADER **) &tbl); J> - if(ACPI_FAILURE(status) || J> - tbl->StartMethod != TPM2_START_METHOD_TIS) J> - err = ENXIO; J> - J> - device_set_desc(dev, "Trusted Platform Module 2.0, FIFO mode"); J> - return (err); J> -} J> - J> -static int J> +int J> tpmtis_attach(device_t dev) J> { J> struct tpm_sc *sc; J> @@ -123,20 +100,11 @@ tpmtis_attach(device_t dev) J> J> sc = device_get_softc(dev); J> sc->dev = dev; J> - sc->transmit = tpmtis_transmit; J> sc->intr_type = -1; J> J> sx_init(&sc->dev_lock, "TPM driver lock"); J> sc->buf = malloc(TPM_BUFSIZE, M_TPM20, M_WAITOK); J> J> - sc->mem_rid = 0; J> - sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, J> - RF_ACTIVE); J> - if (sc->mem_res == NULL) { J> - tpmtis_detach(dev); J> - return (ENXIO); J> - } J> - J> sc->irq_rid = 0; J> sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, J> RF_ACTIVE | RF_SHAREABLE); J> @@ -198,7 +166,7 @@ tpmtis_test_intr(struct tpm_sc *sc) J> J> sx_xlock(&sc->dev_lock); J> memcpy(sc->buf, cmd, sizeof(cmd)); J> - tpmtis_transmit(sc, sizeof(cmd)); J> + tpmtis_transmit(sc->dev, sizeof(cmd)); J> sc->pending_data_length = 0; J> sx_xunlock(&sc->dev_lock); J> } J> @@ -222,19 +190,19 @@ tpmtis_setup_intr(struct tpm_sc *sc) J> if(!tpmtis_request_locality(sc, 0)) J> sc->interrupts = false; J> J> - WR1(sc, TPM_INT_VECTOR, irq); J> + TPM_WRITE_1(sc->dev, TPM_INT_VECTOR, irq); J> J> /* Clear all pending interrupts. */ J> - reg = RD4(sc, TPM_INT_STS); J> - WR4(sc, TPM_INT_STS, reg); J> + reg = TPM_READ_4(sc->dev, TPM_INT_STS); J> + TPM_WRITE_4(sc->dev, TPM_INT_STS, reg); J> J> - reg = RD4(sc, TPM_INT_ENABLE); J> + reg = TPM_READ_4(sc->dev, TPM_INT_ENABLE); J> reg |= TPM_INT_ENABLE_GLOBAL_ENABLE | J> TPM_INT_ENABLE_DATA_AVAIL | J> TPM_INT_ENABLE_LOC_CHANGE | J> TPM_INT_ENABLE_CMD_RDY | J> TPM_INT_ENABLE_STS_VALID; J> - WR4(sc, TPM_INT_ENABLE, reg); J> + TPM_WRITE_4(sc->dev, TPM_INT_ENABLE, reg); J> J> tpmtis_relinquish_locality(sc); J> tpmtis_test_intr(sc); J> @@ -247,9 +215,9 @@ tpmtis_intr_handler(void *arg) J> uint32_t status; J> J> sc = (struct tpm_sc *)arg; J> - status = RD4(sc, TPM_INT_STS); J> + status = TPM_READ_4(sc->dev, TPM_INT_STS); J> J> - WR4(sc, TPM_INT_STS, status); J> + TPM_WRITE_4(sc->dev, TPM_INT_STS, status); J> J> /* Check for stray interrupts. */ J> if (sc->intr_type == -1 || (sc->intr_type & status) == 0) J> @@ -265,7 +233,7 @@ tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val, J> { J> J> /* Check for condition */ J> - if ((RD4(sc, off) & mask) == val) J> + if ((TPM_READ_4(sc->dev, off) & mask) == val) J> return (true); J> J> /* If interrupts are enabled sleep for timeout duration */ J> @@ -273,12 +241,12 @@ tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val, J> tsleep(sc, PWAIT, "TPM WITH INTERRUPTS", timeout / tick); J> J> sc->intr_type = -1; J> - return ((RD4(sc, off) & mask) == val); J> + return ((TPM_READ_4(sc->dev, off) & mask) == val); J> } J> J> *** 335 LINES SKIPPED *** -- Gleb Smirnoff From nobody Mon Jun 24 20:02:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Jls2pDmz5PYsB; Mon, 24 Jun 2024 20:02: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 4W7Jls29lhz4vVR; Mon, 24 Jun 2024 20:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmk8gaY3ZgkN9TyM7fWvV7Feu4bew6EwJSdqj+/XcQ8=; b=J0rJlP2/OnFWX7tx9yBlLHAB8W+Qnqc4koIo0EtxDUGUlkvoAuA2jLcxltEy4dUWRPV3EC QYJ4QShR3zBLm+ciPGvMcmio5HsIZnXUanWM0m8XLkyvvU8ThT+Tcv6WxEjCUsfRaiCfUn 0LCQEQzL6meioNcVcVmHoaP7VnPpeN6e+up9NaMWXJJ2FhKmf6bdVyGsg9dSaQQduvGlKV uyF01wPPp2kWzVZ2G5nTirjIFPjevS4I9kuUQPIlxTbP5uwDcxiZL37iHmIOHRcJdBKWu1 HQ/H9AS7D5TsBCbjRNUMyZo2bPRKgc6oXPraZpELBju7JnQ2zajlzd4bz4BDLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719259353; a=rsa-sha256; cv=none; b=JHPM3DMUZ3WhNwZ7BWeTsJziFq4NQSkoyxsoTYwKvRmyFbIO8UIyYmR4M0YkM5i0Dz9UwC jQrL5X28YwnC1+jHaAHHATmGOqY0gtDPSsoxAwbD2PlIIN2eexc1lQWZ7HbddL4CMAe7Sd s6TonAtMNJhQR09AfgxxV+lI9Lx96Wf40HhaNHJ0XqKIoWgp0EmohVJbufHUlKZmpM5qEO EUyYlWNAYF/xZ364QCCd/RFAnPZrZ/FH+peweRVDdm5uS952Hij5sid/DMr4TaV39OgEak 7mI2OnyNuZHYN8hA8cF2jrynhY3plLz0nTikon1V7JcqHLVkfQXNw8Vb60tiHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmk8gaY3ZgkN9TyM7fWvV7Feu4bew6EwJSdqj+/XcQ8=; b=Iv/GWqGFyWq6WsapdLY1S95pPaLvjSrYmFoo1XSemnXbjRf8CKBwGuSV5l6dbuKTQ9kRrG hDpNLaem0viv1AG6jOpXYBdJRF2rxqLVMT3r/N+1E4SxtjcLbEn6FAHoT3GhlAazTsl4Un gCrokF0nS7ryND029ksYG2HF79T+xBcg+TgfU+ptOq0W/g8lblLT+SYPwWTABEP9sSIE1i yE51FaPIGW9a+z+3fH65W8uzwib0+FhSVNTuE+n5YMdEvK0W5EFtWlkUtbwuKeKMqERAeb Wv+ShqtpAAermAU2f4G1f/ixHAB67xPkD+Ybd5j3GVNKyGIuifu4GW40t/BzYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7Jls1mcgzXt4; Mon, 24 Jun 2024 20:02: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 45OK2X7K032628; Mon, 24 Jun 2024 20:02:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OK2XtC032625; Mon, 24 Jun 2024 20:02:33 GMT (envelope-from git) Date: Mon, 24 Jun 2024 20:02:33 GMT Message-Id: <202406242002.45OK2XtC032625@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: 9cbf1de7e34a - main - Mark the zfs.mount_snapshot jail parameter as boolean. PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9cbf1de7e34a6fced041388fad5d9180cb7705fe Auto-Submitted: auto-generated The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=9cbf1de7e34a6fced041388fad5d9180cb7705fe commit 9cbf1de7e34a6fced041388fad5d9180cb7705fe Author: Jamie Gritton AuthorDate: 2024-06-24 20:00:49 +0000 Commit: Jamie Gritton CommitDate: 2024-06-24 20:00:49 +0000 Mark the zfs.mount_snapshot jail parameter as boolean. PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a972c720dfdb..9b56d15f1095 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -100,7 +100,7 @@ static struct zfs_jailparam zfs_jailparam0 = { static int zfs_jailparam_slot; SYSCTL_JAIL_PARAM_SYS_NODE(zfs, CTLFLAG_RW, "Jail ZFS parameters"); -SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "I", +SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "B", "Allow mounting snapshots in the .zfs directory for unjailed datasets"); SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions"); From nobody Mon Jun 24 20:04:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7JpM5Yn1z5PZ6h; Mon, 24 Jun 2024 20:04: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 4W7JpM542Zz3wtR; Mon, 24 Jun 2024 20:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QX3+YXZXs2LB0PagyyJDuYEfrBSsd/AiSM9jJqpVuTU=; b=DNoIPBDgj70kE9ECPf+7Jb4KUxh7hqB6IKS2VzLtFgf58fEi7E5zLSQRwOrX0UiHvw2IEq zxbQeQcOc4PfUr0j8JfVPJ+lLdWIoLoNXvlthJQr6PFNaSO0UILMGiHpYG/eVQSJ0rJ9wZ 6GPdD7zJcP6QZKWPGLzt1j6m9mVyVjNwg1AM+hnPs8M3Q/+K0fSgU0oCFWj9t/iHP3YR9b 3DHmhTAl+rIls9GJN/TWHh5NTffRe48Zmmvgauqlt3F6eXOJjMiyxGRZ131T/Vukna5Uym AvS0mgk4rbnQwu+0Zgbs7aFO82K6+EDE01Kbn1Eysp8fQgfCZvLiJ4F6y8n+oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719259483; a=rsa-sha256; cv=none; b=Mhg5t/lcA5GpOaLi2PBUyrKmYVdWnTpnCouT+76O5ycjTvtgWpwxyQ6aMKc522rntxb3+W tWlz9fqFutjERA3N1/Cbd5ZWHO9OMArA1AC/TSEm4Y26LzIQM7v6h39ETTxYnUQsY1pCq5 M5nnqFYX2XAS6f461Qwu7ix+S+/nFDirzMieLk/q/5MxJp6JbS+nm1ligrFKEQSsbRMNic 145fn090dGgseuoIbSBbid4Q7FZOxQVHSww8MIa8WQLm3TpjIjpOdILHHsYizJBGispDOR tCf8sSNiGoJNhD1ttupGOaualaVQFsw/dyfMtesF+czF50S6NkqSjqrCRUJARg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QX3+YXZXs2LB0PagyyJDuYEfrBSsd/AiSM9jJqpVuTU=; b=lpBLyHkWpeM5IvjOIojuq/pbaxE9n3dMG4m23NazfaE3NNBpLMbHX37q9gfUUZMDNu5wXi AQf0ewPlo6t0OUCRZfGMsU3wLF2g/9n9bdjwwLTbZgqdOtG2PRQhgcAfxfGvICL6uHyqd8 0Esln52Hg/BgBpSFkY29eS6HD4cCvGfnZIFswr5CHIFs3Qbj0pZHFRYIZGaKFooTL4IGaY +AkLRsZ7P5CmG6tX7AQ66HrKlKNMqQGEyTzBFsZo8U/8Wlxx9XZw/k7BgYnxnIcG4D0dYx 8QHW2ycwNgRYT78jPIOYcveQbKkICfZWMviCHl4yDNRWKNGaaKuQLpea2yOKmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7JpM4gD1zY7h; Mon, 24 Jun 2024 20:04: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 45OK4hm6033047; Mon, 24 Jun 2024 20:04:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OK4hch033044; Mon, 24 Jun 2024 20:04:43 GMT (envelope-from git) Date: Mon, 24 Jun 2024 20:04:43 GMT Message-Id: <202406242004.45OK4hch033044@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: 63875db56bd5 - main - Document the zfs.mount_snapshot parameter in jail(8). PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 63875db56bd545896e019c922378f96ad5adc892 Auto-Submitted: auto-generated The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=63875db56bd545896e019c922378f96ad5adc892 commit 63875db56bd545896e019c922378f96ad5adc892 Author: Jamie Gritton AuthorDate: 2024-06-24 20:03:45 +0000 Commit: Jamie Gritton CommitDate: 2024-06-24 20:03:45 +0000 Document the zfs.mount_snapshot parameter in jail(8). PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 --- usr.sbin/jail/jail.8 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 407b26df818b..ca7b3f95fdbc 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 16, 2024 +.Dd June 24, 2024 .Dt JAIL 8 .Os .Sh NAME @@ -776,6 +776,14 @@ the jail cannot perform any sysvmsg-related system calls. Allow access to SYSV IPC semaphore and shared memory primitives, in the same manner as .Va sysvmsg . +.It Va zfs.mount_snapshot +Allow jailed users to access the contents of ZFS snapshots under the +filesystem's +.Pa .zfs +directory. +If +.Va allow.mount.zfs +is set, the snapshots may also be mounted. .El .Pp There are pseudo-parameters that are not passed to the kernel, but are From nobody Mon Jun 24 20:04:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Jpl4FyKz5PYrt; Mon, 24 Jun 2024 20:05:03 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7Jpl3CqTz3xKG; Mon, 24 Jun 2024 20:05:03 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259503; 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=74uttWd+GtlQ8KNSBofIt8Dv99wgjZYtGZbyhNUl2u4=; b=EsB9VnlTZ8L1oxO89xHDsTfcS6I5DV+ecmSY9JLfcz1K/RdjJBurPK5Tv3aIeb1zRlixkp 51bPneP70FVsPhR9qKW2tGhiA4KatTyD5jHU7OrkRNoOxXmO5ucjnXwyWDUw3bbvg+Txlk PmoBGPCZMQ/SpTwh6MJv0tgT+KKHtcYpThOPnSDeI2VnkRTd5yG+I2mGkdh40FahZ0bK4E 0mGIVbTYtd+A0Wy+bRGhWX7HZ/cAR+bZh/700BKPKmas12UTFNMymb4yneJTY0vZsHeKfI 5TnNjb/66BY/QVwefqls8sMSBLViH0YYpJVCGFX7LyPy8LXnWRxcLX8ZXbKvNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719259503; a=rsa-sha256; cv=none; b=MsuZkgTShTevMJyz8V6rhZqw9GhXkUVxmZml8JRusl9TASXJwXhBmEj51vHQcwo40lGxkL C39DemcglJt+XwfK15eg3tj3Hx0jKDhVL1yafQgRKvzNQC6nDkASboiSeerA4eDP342ljB EUXsx4HJHT0leuwoytlNQrtS4hsQs/bmCBYf2S2i25/OgtA4I8kfDwZPS/WDCnw/wmYIK3 Y79GHunFAqQQb84lwZjn5JHsidPzKTYgAZUfej7XIuA68lID9Uan/2QpSbh4AKGepMiEKr 8S7s9+3EuJOXdIktlHG9ourdzoRuxQ504FeXROei/AKWrtCiOWT+XvNYZZsf8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259503; 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=74uttWd+GtlQ8KNSBofIt8Dv99wgjZYtGZbyhNUl2u4=; b=OEzXX6OxkEvikT6O+4CNpfASYUiSRQ/PoBR6lzZmY3JrHwJekYUqgv/NYe46dA5oun4LH4 lmg1yq/uB3hShVNoMJq1roypq6OBrGbklsDFo+rj/uOPvk9nN6NY8J1X57wGQ3BnM3stGU lLRTOwDhks4dNZgXlMm7txwPX2FqdwBG2UKAX9ojRdt8HeWe6IteuIuSj4cb6sPxZyNj8c PeXRWDThI0MX1DmUULwIsKDolho4GB5vARHzvTjAVptHjCWwKaatfcHtBH8QcSq/M2/+3i lscGH1INVcvKRa04idP0Qb9cysH6NlETA9me1hrCVkz19WpWos6fwkDo5+8cxA== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W7Jpj3b3rz1G4c; Mon, 24 Jun 2024 20:05:01 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 24 Jun 2024 13:04:59 -0700 From: Gleb Smirnoff To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ac52fa1f1b97 - main - sendfile tests: Fix an error check in tcp_socketpair() Message-ID: References: <202406211821.45LILvWH052581@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202406211821.45LILvWH052581@gitrepo.freebsd.org> Mark, On Fri, Jun 21, 2024 at 06:21:57PM +0000, Mark Johnston wrote: M> commit ac52fa1f1b9768d281b9deed6d1158f43a8564ca M> Author: Mark Johnston M> AuthorDate: 2024-06-21 18:18:22 +0000 M> Commit: Mark Johnston M> CommitDate: 2024-06-21 18:18:22 +0000 M> M> sendfile tests: Fix an error check in tcp_socketpair() M> M> Fixes: c368d3f20fc0 ("tests/sendfile: factor out tcp_socketpair()") M> Differential Revision: https://reviews.freebsd.org/D45598 M> --- M> tests/sys/kern/sendfile_helper.c | 2 +- M> 1 file changed, 1 insertion(+), 1 deletion(-) M> M> diff --git a/tests/sys/kern/sendfile_helper.c b/tests/sys/kern/sendfile_helper.c M> index 703b04fdea6c..6365531e312c 100644 M> --- a/tests/sys/kern/sendfile_helper.c M> +++ b/tests/sys/kern/sendfile_helper.c M> @@ -84,7 +84,7 @@ tcp_socketpair(int *sv) M> if (fcntl(sv[0], F_SETFL, flags) == -1) M> err(1, "fcntl +O_NONBLOCK"); M> M> - if (connect(sv[0], (void *)&sin, sizeof(sin)) != -1 || M> + if (connect(sv[0], (void *)&sin, sizeof(sin)) == -1 && M> errno != EINPROGRESS) M> err(1, "connect cs"); Sorry for not reviewing in a timely manner. Did you actually observe connect(2) on a non-blocking TCP socket to immediately return success? -- Gleb Smirnoff From nobody Mon Jun 24 20:11:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7JyB2VsZz5PZ8Z; Mon, 24 Jun 2024 20:11:30 +0000 (UTC) (envelope-from jhibbits@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 4W7JyB0nG2z3yhw; Mon, 24 Jun 2024 20:11:30 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259890; 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=mV7CF2vsAK9mumwzB5y0EtradwQ8PIRMbZ71elp1ld4=; b=yWFhzvg4aOB+trOW8ReuUmvvHbU+SI9qJXYKR5clB1JSHCGxk5uhK56UO+tHBk7chdEwe6 40k21kEguYPKHHZksW4JWzY30ttgCF3c04i+lTQW7f0IM/i4GbIp3crlcm6d7ef6mZoAhz bJYZV+7KXbi9Otqt/62e468YuDt8DTNKNSn4Z2zpTYvnNNK2hLNBHXO3eXsoY/sGdkCxoF ZPCfAfdaLsrqkx34rUctgpcWbzx0Dhke8MxDkdeew3pJSU+D+FxzdC3+yxKBmvCvTEKpPj S7nAsnJncCiPftm9bXYIBZeC/I05UIASwkya2eUvdSu3cXYy1t9J5O3dRZYHCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719259890; a=rsa-sha256; cv=none; b=FqjgYrkP63N8SeVNwEqSGp++3nI1lBNsSKFOqKb+qBtM72PpYluZkbRkkUM9k6RwmCzzAS NA5yk6aXFI7RnItx5vFeGH2/5vUy8Pru06yh9Qa5/Hn7utZ9VgQlKKm88NDkT11IXshjfp wIEsSn1OgJcjr4d1A60FRSlTpYjsTFvx2Zg77MvaV2VAapild8f1kX5GaaNpXUv3hdrsqp n8vbzL3RDXnUDDZvB4N1Wb0b9h5Bd+7/YXn0GVOR6X39hEVNDbqcY/z3p+Ee96gdl3yeHn bMJyQfDsiF2mffI883cWwFPxaFmms4jTkYt2tX+y6ps7Wv1XYdryESI3RsHPuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719259890; 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=mV7CF2vsAK9mumwzB5y0EtradwQ8PIRMbZ71elp1ld4=; b=X7lG5nk6iw5oLXQr7m5FuERy1KyJOjmD+JS1YnAu+ELEz41c184iZZqAsPbGYzK6LAaIdz PEAeFYiwLbB3pfW3qXrrTuQfJg3G+MPP9v/Hs89b3W4jsdfzcCO7BdgygIcVWK8ESRnRI1 5faU+z9FpA9+aELudmXvOejuNNqdKLW8k4ZHTJ08c9eG+mu2upY7AIZ0UBdaTDyBdxfyYz 3wDMVEW5PWll47lj6jyxn84y+WxytNMd/aHagYB9Y0d2Ct2ZIapgugfwOj9w7wn92d7xvZ +oTF/oxFr+s3R9GXEfktQxmKDUeQReJPTnt8QV6hqdeZy79WXzMvm+oNgBtNJw== Received: from ralga.knownspace (ip-163-182-7-56.dynamic.fuse.net [163.182.7.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W7Jy95pLJz1Gv0; Mon, 24 Jun 2024 20:11:29 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Mon, 24 Jun 2024 16:11:28 -0400 From: Justin Hibbits To: Gleb Smirnoff Cc: imp@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c2e9c5bbf022 - main - tpm: Refactor TIS and add a SPI attachment Message-ID: <20240624161128.33c0f518@ralga.knownspace> In-Reply-To: References: <202405032032.443KWhf0045034@gitrepo.freebsd.org> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; powerpc64le-unknown-linux-gnu) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 24 Jun 2024 12:41:57 -0700 Gleb Smirnoff wrote: > Hi Justin, > > sorry for late notice, but we just discovered that after this commit > tpm(4) on ACPI no longer attaches. From what I see ther probe method > isn't even called. Hi Gleb, That's very odd. The probe method hasn't changed, nor has the tpm_acpi attachment (still acpi), so I'm really confused why it wouldn't be called now. Is there any debugging you can do to further narrow it down? I haven't seen any issues reported internally at Juniper on x86 hardware. I just verified everything should get built properly. - Justin > > On Fri, May 03, 2024 at 08:32:43PM +0000, Justin Hibbits wrote: > J> The branch main has been updated by jhibbits: > J> > J> URL: > J> https://cgit.FreeBSD.org/src/commit/?id=c2e9c5bbf02294376988f3e7eba82b8e078cdf30 > J> > J> commit c2e9c5bbf02294376988f3e7eba82b8e078cdf30 > J> Author: Justin Hibbits > J> AuthorDate: 2023-11-13 16:33:44 +0000 > J> Commit: Justin Hibbits > J> CommitDate: 2024-05-03 20:26:11 +0000 > J> > J> tpm: Refactor TIS and add a SPI attachment > J> > J> Summary: > J> Though mostly used in x86 devices, TPM can be used on others, > J> with a direct SPI attachment. Refactor the TPM 2.0 driver set to > J> use an attachment interface, and implement a SPI bus interface. > J> > J> Test Plan: > J> Tested on a Raspberry Pi 4, with a GeeekPi TPM2.0 module > J> (SLB9670 TPM) using security/tpm2-tools tpm2_getcaps for very > J> light testing against the spibus attachment. > J> > J> Reviewed by: kd > J> Obtained from: Juniper Networks, Inc. > J> Differential Revision: https://reviews.freebsd.org/D45069 > J> --- > J> sys/conf/files | 7 ++ > J> sys/conf/files.amd64 | 2 - > J> sys/dev/tpm/tpm20.c | 6 +- > J> sys/dev/tpm/tpm20.h | 53 ++++------ > J> sys/dev/tpm/tpm_bus.c | 99 ++++++++++++++++++ > J> sys/dev/tpm/tpm_crb.c | 66 ++++++------ > J> sys/dev/tpm/tpm_if.m | 76 ++++++++++++++ > J> sys/dev/tpm/tpm_spibus.c | 166 > J> ++++++++++++++++++++++++++++++ sys/dev/tpm/tpm_tis_acpi.c > J> | 86 ++++++++++++++++ sys/dev/tpm/{tpm_tis.c => > J> tpm_tis_core.c} | 118 ++++++++------------- > J> sys/dev/tpm/tpm_tis_spibus.c | 91 ++++++++++++++++ > J> sys/modules/Makefile | 3 +- > J> sys/modules/tpm/Makefile | 21 +++- 13 files > J> changed, 640 insertions(+), 154 deletions(-) > J> > J> diff --git a/sys/conf/files b/sys/conf/files > J> index f68567aa9023..4d7f28ceaaf1 100644 > J> --- a/sys/conf/files > J> +++ b/sys/conf/files > J> @@ -3194,6 +3194,13 @@ dev/syscons/warp/warp_saver.c > J> optional warp_saver dev/tcp_log/tcp_log_dev.c optional > J> tcp_blackbox inet | tcp_blackbox inet6 dev/tdfx/tdfx_pci.c > J> optional tdfx pci dev/ti/if_ti.c > J> optional ti pci +dev/tpm/tpm20.c > J> optional tpm +dev/tpm/tpm_bus.c optional tpm > J> acpi +dev/tpm/tpm_if.m optional tpm > J> +dev/tpm/tpm_spibus.c optional tpm spibus fdt > J> +dev/tpm/tpm_tis_acpi.c optional tpm acpi > J> +dev/tpm/tpm_tis_core.c optional tpm > J> +dev/tpm/tpm_tis_spibus.c optional tpm spibus fdt > J> dev/tws/tws.c optional tws > J> dev/tws/tws_cam.c optional tws > J> dev/tws/tws_hdm.c optional tws > J> diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 > J> index 6322837c887b..18dec5ed47b0 100644 > J> --- a/sys/conf/files.amd64 > J> +++ b/sys/conf/files.amd64 > J> @@ -372,9 +372,7 @@ dev/smartpqi/smartpqi_sis.c optional > J> smartpqi dev/smartpqi/smartpqi_tag.c optional > J> smartpqi dev/sume/if_sume.c optional sume > J> dev/syscons/apm/apm_saver.c optional apm_saver apm > J> -dev/tpm/tpm20.c optional tpm > J> dev/tpm/tpm_crb.c optional tpm acpi > J> -dev/tpm/tpm_tis.c optional tpm acpi > J> dev/tpm/tpm_acpi.c optional tpm acpi > J> dev/tpm/tpm_isa.c optional tpm isa > J> dev/p2sb/p2sb.c optional p2sb pci > J> diff --git a/sys/dev/tpm/tpm20.c b/sys/dev/tpm/tpm20.c > J> index da090bc068c9..3399e17f53aa 100644 > J> --- a/sys/dev/tpm/tpm20.c > J> +++ b/sys/dev/tpm/tpm20.c > J> @@ -127,7 +127,7 @@ tpm20_write(struct cdev *dev, struct uio *uio, > J> int flags) return (result); > J> } > J> > J> - result = sc->transmit(sc, byte_count); > J> + result = TPM_TRANSMIT(sc->dev, byte_count); > J> > J> if (result == 0) { > J> callout_reset(&sc->discard_buffer_callout, > J> @@ -267,7 +267,7 @@ tpm20_harvest(void *arg, int unused) > J> cv_wait(&sc->buf_cv, &sc->dev_lock); > J> > J> memcpy(sc->buf, cmd, sizeof(cmd)); > J> - result = sc->transmit(sc, sizeof(cmd)); > J> + result = TPM_TRANSMIT(sc->dev, sizeof(cmd)); > J> if (result != 0) { > J> sx_xunlock(&sc->dev_lock); > J> return; > J> @@ -319,7 +319,7 @@ tpm20_save_state(device_t dev, bool suspend) > J> sx_xlock(&sc->dev_lock); > J> > J> memcpy(sc->buf, save_cmd, sizeof(save_cmd)); > J> - sc->transmit(sc, sizeof(save_cmd)); > J> + TPM_TRANSMIT(sc->dev, sizeof(save_cmd)); > J> > J> sx_xunlock(&sc->dev_lock); > J> > J> diff --git a/sys/dev/tpm/tpm20.h b/sys/dev/tpm/tpm20.h > J> index 14f89de3e84e..683cd7549bd4 100644 > J> --- a/sys/dev/tpm/tpm20.h > J> +++ b/sys/dev/tpm/tpm20.h > J> @@ -28,6 +28,7 @@ > J> #ifndef _TPM20_H_ > J> #define _TPM20_H_ > J> > J> +#include "opt_acpi.h" > J> #include > J> #include > J> #include > J> @@ -39,6 +40,7 @@ > J> #include > J> #include > J> #include > J> +#include > J> #include > J> #include > J> #include > J> @@ -49,12 +51,14 @@ > J> #include > J> #include > J> > J> +#ifdef DEV_ACPI > J> #include > J> #include > J> #include > J> -#include "opt_acpi.h" > J> +#endif > J> > J> #include "opt_tpm.h" > J> +#include "tpm_if.h" > J> > J> #define BIT(x) (1 << (x)) > J> > J> @@ -136,55 +140,36 @@ int32_t tpm20_get_timeout(uint32_t command); > J> int tpm20_init(struct tpm_sc *sc); > J> void tpm20_release(struct tpm_sc *sc); > J> > J> -/* Small helper routines for io ops */ > J> -static inline uint8_t > J> -RD1(struct tpm_sc *sc, bus_size_t off) > J> -{ > J> - > J> - return (bus_read_1(sc->mem_res, off)); > J> -} > J> -static inline uint32_t > J> -RD4(struct tpm_sc *sc, bus_size_t off) > J> -{ > J> - > J> - return (bus_read_4(sc->mem_res, off)); > J> -} > J> -#ifdef __amd64__ > J> -static inline uint64_t > J> -RD8(struct tpm_sc *sc, bus_size_t off) > J> -{ > J> +/* Mode driver types */ > J> +DECLARE_CLASS(tpmtis_driver); > J> +int tpmtis_attach(device_t dev); > J> > J> - return (bus_read_8(sc->mem_res, off)); > J> -} > J> -#endif > J> -static inline void > J> -WR1(struct tpm_sc *sc, bus_size_t off, uint8_t val) > J> -{ > J> +DECLARE_CLASS(tpmcrb_driver); > J> > J> - bus_write_1(sc->mem_res, off, val); > J> -} > J> -static inline void > J> -WR4(struct tpm_sc *sc, bus_size_t off, uint32_t val) > J> -{ > J> +/* Bus driver types */ > J> +DECLARE_CLASS(tpm_bus_driver); > J> +DECLARE_CLASS(tpm_spi_driver); > J> > J> - bus_write_4(sc->mem_res, off, val); > J> -} > J> +/* Small helper routines for io ops */ > J> static inline void > J> AND4(struct tpm_sc *sc, bus_size_t off, uint32_t val) > J> { > J> + uint32_t v = TPM_READ_4(sc->dev, off); > J> > J> - WR4(sc, off, RD4(sc, off) & val); > J> + TPM_WRITE_4(sc->dev, off, v & val); > J> } > J> static inline void > J> OR1(struct tpm_sc *sc, bus_size_t off, uint8_t val) > J> { > J> + uint8_t v = TPM_READ_1(sc->dev, off); > J> > J> - WR1(sc, off, RD1(sc, off) | val); > J> + TPM_WRITE_1(sc->dev, off, v | val); > J> } > J> static inline void > J> OR4(struct tpm_sc *sc, bus_size_t off, uint32_t val) > J> { > J> + uint32_t v = TPM_READ_1(sc->dev, off); > J> > J> - WR4(sc, off, RD4(sc, off) | val); > J> + TPM_WRITE_4(sc->dev, off, v | val); > J> } > J> #endif /* _TPM20_H_ */ > J> diff --git a/sys/dev/tpm/tpm_bus.c b/sys/dev/tpm/tpm_bus.c > J> new file mode 100644 > J> index 000000000000..f0d3c26c33f1 > J> --- /dev/null > J> +++ b/sys/dev/tpm/tpm_bus.c > J> @@ -0,0 +1,99 @@ > J> +/*- > J> + * Copyright (c) 2023 Juniper Networks, Inc. > J> + * All rights reserved. > J> + * > J> + * Redistribution and use in source and binary forms, with or > J> without > J> + * modification, are permitted provided that the following > J> conditions > J> + * are met: > J> + * 1. Redistributions of source code must retain the above > J> copyright > J> + * notice, this list of conditions and the following > J> disclaimer. > J> + * 2. Redistributions in binary form must reproduce the above > J> copyright > J> + * notice, this list of conditions and the following > J> disclaimer in the > J> + * documentation and/or other materials provided with the > J> distribution. > J> + * > J> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY > J> EXPRESS OR > J> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED > J> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > J> PURPOSE ARE > J> + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY > J> DIRECT, > J> + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > J> DAMAGES > J> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > J> GOODS OR > J> + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > J> INTERRUPTION) > J> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > J> CONTRACT, > J> + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > J> ARISING IN > J> + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > J> + * POSSIBILITY OF SUCH DAMAGE. > J> + */ > J> + > J> +#include > J> +#include > J> +#include > J> +#include "tpm_if.h" > J> +#include "tpm20.h" > J> + > J> +/* Override accessors */ > J> +static uint8_t > J> +tpm_read_1(device_t dev, bus_size_t off) > J> +{ > J> + struct tpm_sc *sc = device_get_softc(dev); > J> + > J> + return (bus_read_1(sc->mem_res, off)); > J> +} > J> + > J> +static uint32_t > J> +tpm_read_4(device_t dev, bus_size_t off) > J> +{ > J> + struct tpm_sc *sc = device_get_softc(dev); > J> + > J> + return (bus_read_4(sc->mem_res, off)); > J> +} > J> + > J> +/* > J> + * Only i386 is missing bus_space_read_8. > J> + */ > J> +#ifndef __i386__ > J> +static uint64_t > J> +tpm_read_8(device_t dev, bus_size_t off) > J> +{ > J> + struct tpm_sc *sc = device_get_softc(dev); > J> + > J> + return (bus_read_8(sc->mem_res, off)); > J> +} > J> +#endif > J> + > J> +static void > J> +tpm_write_1(device_t dev, bus_size_t off, uint8_t val) > J> +{ > J> + struct tpm_sc *sc = device_get_softc(dev); > J> + > J> + bus_write_1(sc->mem_res, off, val); > J> +} > J> + > J> +static void > J> +tpm_write_4(device_t dev, bus_size_t off, uint32_t val) > J> +{ > J> + struct tpm_sc *sc = device_get_softc(dev); > J> + > J> + bus_write_4(sc->mem_res, off, val); > J> +} > J> + > J> +static void > J> +tpm_write_barrier(device_t dev, bus_addr_t off, bus_size_t length) > J> +{ > J> + struct tpm_sc *sc = device_get_softc(dev); > J> + > J> + bus_barrier(sc->mem_res, off, length, > J> BUS_SPACE_BARRIER_WRITE); +} > J> + > J> +static device_method_t tpm_bus_methods[] = { > J> + DEVMETHOD(tpm_read_1, tpm_read_1), > J> + DEVMETHOD(tpm_read_4, tpm_read_4), > J> +#ifndef __i386__ > J> + DEVMETHOD(tpm_read_8, tpm_read_8), > J> +#endif > J> + DEVMETHOD(tpm_write_1, tpm_write_1), > J> + DEVMETHOD(tpm_write_4, tpm_write_4), > J> + DEVMETHOD(tpm_write_barrier, tpm_write_barrier), > J> + DEVMETHOD_END > J> +}; > J> + > J> +DEFINE_CLASS_0(tpm_lbc, tpm_bus_driver, tpm_bus_methods, > J> sizeof(struct tpm_sc)); diff --git a/sys/dev/tpm/tpm_crb.c > J> b/sys/dev/tpm/tpm_crb.c index bb4df82e613b..b9ddcf0dd3e1 100644 > J> --- a/sys/dev/tpm/tpm_crb.c > J> +++ b/sys/dev/tpm/tpm_crb.c > J> @@ -83,7 +83,7 @@ struct tpmcrb_sc { > J> size_t rsp_buf_size; > J> }; > J> > J> -int tpmcrb_transmit(struct tpm_sc *sc, size_t size); > J> +int tpmcrb_transmit(device_t dev, size_t size); > J> > J> static int tpmcrb_acpi_probe(device_t dev); > J> static int tpmcrb_attach(device_t dev); > J> @@ -185,15 +185,15 @@ tpmcrb_attach(device_t dev) > J> * stored in a single 8 byte one. > J> */ > J> #ifdef __amd64__ > J> - crb_sc->rsp_off = RD8(sc, TPM_CRB_CTRL_RSP_ADDR); > J> + crb_sc->rsp_off = TPM_READ_8(sc->dev, > J> TPM_CRB_CTRL_RSP_ADDR); #else > J> - crb_sc->rsp_off = RD4(sc, TPM_CRB_CTRL_RSP_ADDR); > J> - crb_sc->rsp_off |= ((uint64_t) RD4(sc, > J> TPM_CRB_CTRL_RSP_HADDR) << 32); > J> + crb_sc->rsp_off = TPM_READ_4(sc->dev, > J> TPM_CRB_CTRL_RSP_ADDR); > J> + crb_sc->rsp_off |= ((uint64_t) TPM_READ_4(sc->dev, > J> TPM_CRB_CTRL_RSP_HADDR) << 32); #endif > J> - crb_sc->cmd_off = RD4(sc, TPM_CRB_CTRL_CMD_LADDR); > J> - crb_sc->cmd_off |= ((uint64_t) RD4(sc, > J> TPM_CRB_CTRL_CMD_HADDR) << 32); > J> - crb_sc->cmd_buf_size = RD4(sc, TPM_CRB_CTRL_CMD_SIZE); > J> - crb_sc->rsp_buf_size = RD4(sc, TPM_CRB_CTRL_RSP_SIZE); > J> + crb_sc->cmd_off = TPM_READ_4(sc->dev, > J> TPM_CRB_CTRL_CMD_LADDR); > J> + crb_sc->cmd_off |= ((uint64_t) TPM_READ_4(sc->dev, > J> TPM_CRB_CTRL_CMD_HADDR) << 32); > J> + crb_sc->cmd_buf_size = TPM_READ_4(sc->dev, > J> TPM_CRB_CTRL_CMD_SIZE); > J> + crb_sc->rsp_buf_size = TPM_READ_4(sc->dev, > J> TPM_CRB_CTRL_RSP_SIZE); > J> tpmcrb_relinquish_locality(sc); > J> > J> @@ -218,8 +218,6 @@ tpmcrb_attach(device_t dev) > J> } > J> } > J> > J> - sc->transmit = tpmcrb_transmit; > J> - > J> result = tpm20_init(sc); > J> if (result != 0) > J> tpmcrb_detach(dev); > J> @@ -248,11 +246,11 @@ tpm_wait_for_u32(struct tpm_sc *sc, > J> bus_size_t off, uint32_t mask, uint32_t val, { > J> > J> /* Check for condition */ > J> - if ((RD4(sc, off) & mask) == val) > J> + if ((TPM_READ_4(sc->dev, off) & mask) == val) > J> return (true); > J> > J> while (timeout > 0) { > J> - if ((RD4(sc, off) & mask) == val) > J> + if ((TPM_READ_4(sc->dev, off) & mask) == val) > J> return (true); > J> > J> pause("TPM in polling mode", 1); > J> @@ -291,7 +289,7 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc) > J> { > J> uint32_t mask = ~0; > J> > J> - WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CMD); > J> + TPM_WRITE_4(sc->dev, TPM_CRB_CTRL_CANCEL, > J> TPM_CRB_CTRL_CANCEL_CMD); if (!tpm_wait_for_u32(sc, > J> TPM_CRB_CTRL_START, mask, ~mask, TPM_TIMEOUT_B)) { > J> device_printf(sc->dev, > J> @@ -299,48 +297,50 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc) > J> return (false); > J> } > J> > J> - WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR); > J> + TPM_WRITE_4(sc->dev, TPM_CRB_CTRL_CANCEL, > J> TPM_CRB_CTRL_CANCEL_CLEAR); return (true); > J> } > J> > J> int > J> -tpmcrb_transmit(struct tpm_sc *sc, size_t length) > J> +tpmcrb_transmit(device_t dev, size_t length) > J> { > J> struct tpmcrb_sc *crb_sc; > J> + struct tpm_sc *sc; > J> uint32_t mask, curr_cmd; > J> int timeout, bytes_available; > J> > J> - crb_sc = (struct tpmcrb_sc *)sc; > J> + crb_sc = device_get_softc(dev); > J> + sc = &crb_sc->base; > J> > J> sx_assert(&sc->dev_lock, SA_XLOCKED); > J> > J> if (length > crb_sc->cmd_buf_size) { > J> - device_printf(sc->dev, > J> + device_printf(dev, > J> "Requested transfer is bigger than buffer > J> size\n"); return (E2BIG); > J> } > J> > J> - if (RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_ERR_BIT) > J> { > J> - device_printf(sc->dev, > J> + if (TPM_READ_4(dev, TPM_CRB_CTRL_STS) & > J> TPM_CRB_CTRL_STS_ERR_BIT) { > J> + device_printf(dev, > J> "Device has Error bit set\n"); > J> return (EIO); > J> } > J> if (!tpmcrb_request_locality(sc, 0)) { > J> - device_printf(sc->dev, > J> + device_printf(dev, > J> "Failed to obtain locality\n"); > J> return (EIO); > J> } > J> /* Clear cancellation bit */ > J> - WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR); > J> + TPM_WRITE_4(dev, TPM_CRB_CTRL_CANCEL, > J> TPM_CRB_CTRL_CANCEL_CLEAR); > J> /* Switch device to idle state if necessary */ > J> - if (!(RD4(sc, TPM_CRB_CTRL_STS) & > J> TPM_CRB_CTRL_STS_IDLE_BIT)) { > J> + if (!(TPM_READ_4(dev, TPM_CRB_CTRL_STS) & > J> TPM_CRB_CTRL_STS_IDLE_BIT)) { OR4(sc, TPM_CRB_CTRL_REQ, > J> TPM_CRB_CTRL_REQ_GO_IDLE); > J> mask = TPM_CRB_CTRL_STS_IDLE_BIT; > J> if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, > J> mask, mask, TPM_TIMEOUT_C)) { > J> - device_printf(sc->dev, > J> + device_printf(dev, > J> "Failed to transition to idle > J> state\n"); return (EIO); > J> } > J> @@ -351,7 +351,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t > J> length) mask = TPM_CRB_CTRL_REQ_GO_READY; > J> if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS, > J> mask, !mask, TPM_TIMEOUT_C)) { > J> - device_printf(sc->dev, > J> + device_printf(dev, > J> "Failed to transition to ready state\n"); > J> return (EIO); > J> } > J> @@ -366,16 +366,14 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t > J> length) /* Send command and tell device to process it. */ > J> bus_write_region_stream_1(sc->mem_res, crb_sc->cmd_off, > J> sc->buf, length); > J> - bus_barrier(sc->mem_res, crb_sc->cmd_off, > J> - length, BUS_SPACE_BARRIER_WRITE); > J> + TPM_WRITE_BARRIER(dev, crb_sc->cmd_off, length); > J> > J> - WR4(sc, TPM_CRB_CTRL_START, TPM_CRB_CTRL_START_CMD); > J> - bus_barrier(sc->mem_res, TPM_CRB_CTRL_START, > J> - 4, BUS_SPACE_BARRIER_WRITE); > J> + TPM_WRITE_4(dev, TPM_CRB_CTRL_START, > J> TPM_CRB_CTRL_START_CMD); > J> + TPM_WRITE_BARRIER(dev, TPM_CRB_CTRL_START, 4); > J> > J> mask = ~0; > J> if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_START, mask, > J> ~mask, timeout)) { > J> - device_printf(sc->dev, > J> + device_printf(dev, > J> "Timeout while waiting for device to process > J> cmd\n"); if (!tpmcrb_cancel_cmd(sc)) > J> return (EIO); > J> @@ -387,7 +385,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t > J> length) bytes_available = be32toh(*(uint32_t *) (&sc->buf[2])); > J> > J> if (bytes_available > TPM_BUFSIZE || bytes_available < > J> TPM_HEADER_SIZE) { > J> - device_printf(sc->dev, > J> + device_printf(dev, > J> "Incorrect response size: %d\n", > J> bytes_available); > J> return (EIO); > J> @@ -411,11 +409,11 @@ static device_method_t > J> tpmcrb_methods[] = { DEVMETHOD(device_detach, > J> tpmcrb_detach), DEVMETHOD(device_shutdown, tpm20_shutdown), > J> DEVMETHOD(device_suspend, tpm20_suspend), > J> + DEVMETHOD(tpm_transmit, tpmcrb_transmit), > J> {0, 0} > J> }; > J> > J> -static driver_t tpmcrb_driver = { > J> - "tpmcrb", tpmcrb_methods, sizeof(struct tpmcrb_sc), > J> -}; > J> +DEFINE_CLASS_1(tpmcrb, tpmcrb_driver, tpmcrb_methods, > J> sizeof(struct tpmcrb_sc), > J> + tpm_bus_driver); > J> > J> DRIVER_MODULE(tpmcrb, acpi, tpmcrb_driver, 0, 0); > J> diff --git a/sys/dev/tpm/tpm_if.m b/sys/dev/tpm/tpm_if.m > J> new file mode 100644 > J> index 000000000000..2b6afe22f3e8 > J> --- /dev/null > J> +++ b/sys/dev/tpm/tpm_if.m > J> @@ -0,0 +1,76 @@ > J> +#- > J> +# Copyright (c) 2023 Juniper Networks, Inc. > J> +# All Rights Reserved > J> +# > J> +# Redistribution and use in source and binary forms, with or > J> without +# modification, are permitted provided that the following > J> conditions +# are met: > J> +# 1. Redistributions of source code must retain the above > J> copyright +# notice, this list of conditions and the following > J> disclaimer. +# 2. Redistributions in binary form must reproduce > J> the above copyright +# notice, this list of conditions and the > J> following disclaimer in the +# documentation and/or other > J> materials provided with the distribution. +# > J> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS > J> IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > J> LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND > J> FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT > J> SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, > J> INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# > J> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > J> GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > J> INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > J> WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING > J> NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF > J> THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH > J> DAMAGE. +# +# > J> + > J> +#include > J> +#include > J> + > J> +INTERFACE tpm; > J> + > J> +# > J> +# Transfer data to the TPM data buffer > J> +# > J> +METHOD int transmit { > J> + device_t dev; > J> + size_t length; > J> +}; > J> + > J> + > J> +METHOD uint64_t read_8 { > J> + device_t dev; > J> + bus_addr_t addr; > J> +} > J> + > J> +# > J> +# Read 4 bytes (host endian) from a TPM register > J> +# > J> +METHOD uint32_t read_4 { > J> + device_t dev; > J> + bus_addr_t addr; > J> +}; > J> + > J> +METHOD uint8_t read_1 { > J> + device_t dev; > J> + bus_addr_t addr; > J> +}; > J> + > J> +METHOD void write_4 { > J> + device_t dev; > J> + bus_addr_t addr; > J> + uint32_t value; > J> +}; > J> + > J> +METHOD void write_1 { > J> + device_t dev; > J> + bus_addr_t addr; > J> + uint8_t value; > J> +}; > J> + > J> +METHOD void write_barrier { > J> + device_t dev; > J> + bus_addr_t off; > J> + bus_size_t length; > J> +} > J> diff --git a/sys/dev/tpm/tpm_spibus.c b/sys/dev/tpm/tpm_spibus.c > J> new file mode 100644 > J> index 000000000000..f83ff42d77b1 > J> --- /dev/null > J> +++ b/sys/dev/tpm/tpm_spibus.c > J> @@ -0,0 +1,166 @@ > J> +/*- > J> + * Copyright (c) 2023 Juniper Networks, Inc. > J> + * All rights reserved. > J> + * > J> + * Redistribution and use in source and binary forms, with or > J> without > J> + * modification, are permitted provided that the following > J> conditions > J> + * are met: > J> + * 1. Redistributions of source code must retain the above > J> copyright > J> + * notice, this list of conditions and the following > J> disclaimer. > J> + * 2. Redistributions in binary form must reproduce the above > J> copyright > J> + * notice, this list of conditions and the following > J> disclaimer in the > J> + * documentation and/or other materials provided with the > J> distribution. > J> + * > J> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY > J> EXPRESS OR > J> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED > J> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > J> PURPOSE ARE > J> + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY > J> DIRECT, > J> + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > J> DAMAGES > J> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > J> GOODS OR > J> + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > J> INTERRUPTION) > J> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > J> CONTRACT, > J> + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > J> ARISING IN > J> + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > J> + * POSSIBILITY OF SUCH DAMAGE. > J> + */ > J> + > J> +#include > J> +#include > J> +#include > J> + > J> +#include > J> +#include "spibus_if.h" > J> +#include "tpm_if.h" > J> +#include "tpm20.h" > J> + > J> +#define TPM_BASE_ADDR 0xD40000 > J> +#define TPM_SPI_HEADER_SIZE 4 > J> +#define TPM_WAIT_STATES 50 > J> + > J> +static void > J> +tpm_insert_wait(device_t dev) > J> +{ > J> + device_t parent = device_get_parent(dev); > J> + int wait = TPM_WAIT_STATES; > J> + struct spi_command spic = SPI_COMMAND_INITIALIZER; > J> + > J> + uint8_t txb = 0; > J> + uint8_t rxb = 0; > J> + > J> + spic.tx_cmd = &txb; > J> + spic.rx_cmd = &rxb; > J> + spic.tx_cmd_sz = 1; > J> + spic.rx_cmd_sz = 1; > J> + spic.flags = SPI_FLAG_KEEP_CS; > J> + do { > J> + SPIBUS_TRANSFER(parent, dev, &spic); > J> + } while (--wait > 0 && (rxb & 0x1) == 0); > J> +} > J> + > J> +static inline int > J> +tpm_spi_read_n(device_t dev, bus_size_t off, void *buf, size_t > J> size) +{ > J> + struct spi_command spic = SPI_COMMAND_INITIALIZER; > J> + uint8_t tx[4] = {0}; > J> + uint8_t rx[4] = {0}; > J> + int err; > J> + > J> + if (size > sizeof(rx)) > J> + return (EINVAL); > J> + off += TPM_BASE_ADDR; > J> + tx[0] = 0x80 | (size - 1); /* Write (size) bytes */ > J> + tx[1] = (off >> 16) & 0xff; > J> + tx[2] = (off >> 8) & 0xff; > J> + tx[3] = off & 0xff; > J> + > J> + spic.tx_cmd = tx; > J> + spic.tx_cmd_sz = sizeof(tx); > J> + spic.rx_cmd = rx; > J> + spic.rx_cmd_sz = sizeof(tx); > J> + spic.flags = SPI_FLAG_KEEP_CS; > J> + > J> + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic); > J> + > J> + if (!(rx[3] & 0x1)) { > J> + tpm_insert_wait(dev); > J> + } > J> + memset(tx, 0, sizeof(tx)); > J> + spic.tx_cmd_sz = spic.rx_cmd_sz = size; > J> + spic.flags = 0; > J> + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic); > J> + memcpy(buf, &rx[0], size); > J> + > J> + return (err); > J> +} > J> + > J> +static inline int > J> +tpm_spi_write_n(device_t dev, bus_size_t off, void *buf, size_t > J> size) +{ > J> + struct spi_command spic = SPI_COMMAND_INITIALIZER; > J> + uint8_t tx[8] = {0}; > J> + uint8_t rx[8] = {0}; > J> + int err; > J> + > J> + off += TPM_BASE_ADDR; > J> + tx[0] = 0x00 | (size - 1); /* Write (size) bytes */ > J> + tx[1] = (off >> 16) & 0xff; > J> + tx[2] = (off >> 8) & 0xff; > J> + tx[3] = off & 0xff; > J> + > J> + memcpy(&tx[4], buf, size); > J> + > J> + spic.tx_cmd = tx; > J> + spic.tx_cmd_sz = size + TPM_SPI_HEADER_SIZE; > J> + spic.rx_cmd = rx; > J> + spic.rx_cmd_sz = size + TPM_SPI_HEADER_SIZE; > J> + > J> + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic); > J> + > J> + return (err); > J> +} > J> + > J> +/* Override accessors */ > J> +static inline uint8_t > J> +spi_read_1(device_t dev, bus_size_t off) > J> +{ > J> + uint8_t rx_byte; > J> + > J> + tpm_spi_read_n(dev, off, &rx_byte, 1); > J> + > J> + return (rx_byte); > J> +} > J> + > J> +static inline uint32_t > J> +spi_read_4(device_t dev, bus_size_t off) > J> +{ > J> + uint32_t rx_word = 0; > J> + > J> + tpm_spi_read_n(dev, off, &rx_word, 4); > J> + rx_word = le32toh(rx_word); > J> + > J> + return (rx_word); > J> +} > J> + > J> +static inline void > J> +spi_write_1(device_t dev, bus_size_t off, uint8_t val) > J> +{ > J> + tpm_spi_write_n(dev, off, &val, 1); > J> +} > J> + > J> +static inline void > J> +spi_write_4(device_t dev, bus_size_t off, uint32_t val) > J> +{ > J> + uint32_t tmp = htole32(val); > J> + tpm_spi_write_n(dev, off, &tmp, 4); > J> +} > J> + > J> +static device_method_t tpm_spibus_methods[] = { > J> + DEVMETHOD(tpm_read_4, spi_read_4), > J> + DEVMETHOD(tpm_read_1, spi_read_1), > J> + DEVMETHOD(tpm_write_4, spi_write_4), > J> + DEVMETHOD(tpm_write_1, spi_write_1), > J> + DEVMETHOD_END > J> +}; > J> + > J> +DEFINE_CLASS_0(tpm_spi, tpm_spi_driver, tpm_spibus_methods, > J> + sizeof(struct tpm_sc)); > J> diff --git a/sys/dev/tpm/tpm_tis_acpi.c > J> b/sys/dev/tpm/tpm_tis_acpi.c new file mode 100644 > J> index 000000000000..32c73e5f2483 > J> --- /dev/null > J> +++ b/sys/dev/tpm/tpm_tis_acpi.c > J> @@ -0,0 +1,86 @@ > J> +/*- > J> + * Copyright (c) 2018 Stormshield. > J> + * Copyright (c) 2018 Semihalf. > J> + * Copyright (c) 2023 Juniper Networks, Inc. > J> + * All rights reserved. > J> + * > J> + * Redistribution and use in source and binary forms, with or > J> without > J> + * modification, are permitted provided that the following > J> conditions > J> + * are met: > J> + * 1. Redistributions of source code must retain the above > J> copyright > J> + * notice, this list of conditions and the following > J> disclaimer. > J> + * 2. Redistributions in binary form must reproduce the above > J> copyright > J> + * notice, this list of conditions and the following > J> disclaimer in the > J> + * documentation and/or other materials provided with the > J> distribution. > J> + * > J> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY > J> EXPRESS OR > J> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED > J> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > J> PURPOSE ARE > J> + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY > J> DIRECT, > J> + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > J> DAMAGES > J> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > J> GOODS OR > J> + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > J> INTERRUPTION) > J> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > J> CONTRACT, > J> + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > J> ARISING IN > J> + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > J> + * POSSIBILITY OF SUCH DAMAGE. > J> + */ > J> + > J> +#include > J> +#include "tpm20.h" > J> +#include "tpm_if.h" > J> + > J> +static int tpmtis_acpi_probe(device_t dev); > J> + > J> +char *tpmtis_ids[] = {"MSFT0101", NULL}; > J> + > J> +static int > J> +tpmtis_acpi_probe(device_t dev) > J> +{ > J> + int err; > J> + ACPI_TABLE_TPM23 *tbl; > J> + ACPI_STATUS status; > J> + > J> + err = ACPI_ID_PROBE(device_get_parent(dev), dev, > J> tpmtis_ids, NULL); > J> + if (err > 0) > J> + return (err); > J> + /*Find TPM2 Header*/ > J> + status = AcpiGetTable(ACPI_SIG_TPM2, 1, > J> (ACPI_TABLE_HEADER **) &tbl); > J> + if(ACPI_FAILURE(status) || > J> + tbl->StartMethod != TPM2_START_METHOD_TIS) > J> + err = ENXIO; > J> + > J> + device_set_desc(dev, "Trusted Platform Module 2.0, FIFO > J> mode"); > J> + return (err); > J> +} > J> + > J> +static int > J> +tpmtis_acpi_attach(device_t dev) > J> +{ > J> + struct tpm_sc *sc = device_get_softc(dev); > J> + > J> + sc->mem_rid = 0; > J> + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, > J> &sc->mem_rid, > J> + RF_ACTIVE); > J> + if (sc->mem_res == NULL) { > J> + return (ENXIO); > J> + } > J> + > J> + /* > J> + * If tpmtis_attach() fails, tpmtis_detach() will > J> automatically free > J> + * sc->mem_res (not-NULL). > J> + */ > J> + return (tpmtis_attach(dev)); > J> +} > J> + > J> +/* ACPI Driver */ > J> +static device_method_t tpmtis_methods[] = { > J> + DEVMETHOD(device_attach, tpmtis_acpi_attach), > J> + DEVMETHOD(device_probe, tpmtis_acpi_probe), > J> + DEVMETHOD_END > J> +}; > J> + > J> +DEFINE_CLASS_2(tpmtis, tpmtis_acpi_driver, tpmtis_methods, > J> + sizeof(struct tpm_sc), tpmtis_driver, tpm_bus_driver); > J> + > J> +DRIVER_MODULE(tpmtis, acpi, tpmtis_driver, 0, 0); > J> diff --git a/sys/dev/tpm/tpm_tis.c b/sys/dev/tpm/tpm_tis_core.c > J> similarity index 82% > J> rename from sys/dev/tpm/tpm_tis.c > J> rename to sys/dev/tpm/tpm_tis_core.c > J> index b97d7ab3f8e8..230eb12d2acd 100644 > J> --- a/sys/dev/tpm/tpm_tis.c > J> +++ b/sys/dev/tpm/tpm_tis_core.c > J> @@ -27,6 +27,7 @@ > J> > J> #include > J> #include "tpm20.h" > J> +#include "tpm_if.h" > J> > J> /* > J> * TIS register space as defined in > J> @@ -72,10 +73,8 @@ > J> #define TPM_STS_BURST_MASK 0xFFFF00 > J> #define TPM_STS_BURST_OFFSET 0x8 > J> > J> -static int tpmtis_transmit(struct tpm_sc *sc, size_t length); > J> +static int tpmtis_transmit(device_t dev, size_t length); > J> > J> -static int tpmtis_acpi_probe(device_t dev); > J> -static int tpmtis_attach(device_t dev); > J> static int tpmtis_detach(device_t dev); > J> > J> static void tpmtis_intr_handler(void *arg); > J> @@ -93,29 +92,7 @@ static bool tpm_wait_for_u32(struct tpm_sc *sc, > J> bus_size_t off, > J> static uint16_t tpmtis_wait_for_burst(struct tpm_sc *sc); > J> > J> -char *tpmtis_ids[] = {"MSFT0101", NULL}; > J> - > J> -static int > J> -tpmtis_acpi_probe(device_t dev) > J> -{ > J> - int err; > J> - ACPI_TABLE_TPM23 *tbl; > J> - ACPI_STATUS status; > J> - > J> - err = ACPI_ID_PROBE(device_get_parent(dev), dev, > J> tpmtis_ids, NULL); > J> - if (err > 0) > J> - return (err); > J> - /*Find TPM2 Header*/ > J> - status = AcpiGetTable(ACPI_SIG_TPM2, 1, > J> (ACPI_TABLE_HEADER **) &tbl); > J> - if(ACPI_FAILURE(status) || > J> - tbl->StartMethod != TPM2_START_METHOD_TIS) > J> - err = ENXIO; > J> - > J> - device_set_desc(dev, "Trusted Platform Module 2.0, FIFO > J> mode"); > J> - return (err); > J> -} > J> - > J> -static int > J> +int > J> tpmtis_attach(device_t dev) > J> { > J> struct tpm_sc *sc; > J> @@ -123,20 +100,11 @@ tpmtis_attach(device_t dev) > J> > J> sc = device_get_softc(dev); > J> sc->dev = dev; > J> - sc->transmit = tpmtis_transmit; > J> sc->intr_type = -1; > J> > J> sx_init(&sc->dev_lock, "TPM driver lock"); > J> sc->buf = malloc(TPM_BUFSIZE, M_TPM20, M_WAITOK); > J> > J> - sc->mem_rid = 0; > J> - sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, > J> &sc->mem_rid, > J> - RF_ACTIVE); > J> - if (sc->mem_res == NULL) { > J> - tpmtis_detach(dev); > J> - return (ENXIO); > J> - } > J> - > J> sc->irq_rid = 0; > J> sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, > J> &sc->irq_rid, RF_ACTIVE | RF_SHAREABLE); > J> @@ -198,7 +166,7 @@ tpmtis_test_intr(struct tpm_sc *sc) > J> > J> sx_xlock(&sc->dev_lock); > J> memcpy(sc->buf, cmd, sizeof(cmd)); > J> - tpmtis_transmit(sc, sizeof(cmd)); > J> + tpmtis_transmit(sc->dev, sizeof(cmd)); > J> sc->pending_data_length = 0; > J> sx_xunlock(&sc->dev_lock); > J> } > J> @@ -222,19 +190,19 @@ tpmtis_setup_intr(struct tpm_sc *sc) > J> if(!tpmtis_request_locality(sc, 0)) > J> sc->interrupts = false; > J> > J> - WR1(sc, TPM_INT_VECTOR, irq); > J> + TPM_WRITE_1(sc->dev, TPM_INT_VECTOR, irq); > J> > J> /* Clear all pending interrupts. */ > J> - reg = RD4(sc, TPM_INT_STS); > J> - WR4(sc, TPM_INT_STS, reg); > J> + reg = TPM_READ_4(sc->dev, TPM_INT_STS); > J> + TPM_WRITE_4(sc->dev, TPM_INT_STS, reg); > J> > J> - reg = RD4(sc, TPM_INT_ENABLE); > J> + reg = TPM_READ_4(sc->dev, TPM_INT_ENABLE); > J> reg |= TPM_INT_ENABLE_GLOBAL_ENABLE | > J> TPM_INT_ENABLE_DATA_AVAIL | > J> TPM_INT_ENABLE_LOC_CHANGE | > J> TPM_INT_ENABLE_CMD_RDY | > J> TPM_INT_ENABLE_STS_VALID; > J> - WR4(sc, TPM_INT_ENABLE, reg); > J> + TPM_WRITE_4(sc->dev, TPM_INT_ENABLE, reg); > J> > J> tpmtis_relinquish_locality(sc); > J> tpmtis_test_intr(sc); > J> @@ -247,9 +215,9 @@ tpmtis_intr_handler(void *arg) > J> uint32_t status; > J> > J> sc = (struct tpm_sc *)arg; > J> - status = RD4(sc, TPM_INT_STS); > J> + status = TPM_READ_4(sc->dev, TPM_INT_STS); > J> > J> - WR4(sc, TPM_INT_STS, status); > J> + TPM_WRITE_4(sc->dev, TPM_INT_STS, status); > J> > J> /* Check for stray interrupts. */ > J> if (sc->intr_type == -1 || (sc->intr_type & status) == 0) > J> @@ -265,7 +233,7 @@ tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t > J> off, uint32_t mask, uint32_t val, { > J> > J> /* Check for condition */ > J> - if ((RD4(sc, off) & mask) == val) > J> + if ((TPM_READ_4(sc->dev, off) & mask) == val) > J> return (true); > J> > J> /* If interrupts are enabled sleep for timeout duration */ > J> @@ -273,12 +241,12 @@ tpm_wait_for_u32(struct tpm_sc *sc, > J> bus_size_t off, uint32_t mask, uint32_t val, tsleep(sc, PWAIT, > J> "TPM WITH INTERRUPTS", timeout / tick); > J> sc->intr_type = -1; > J> - return ((RD4(sc, off) & mask) == val); > J> + return ((TPM_READ_4(sc->dev, off) & mask) == val); > J> } > J> > J> *** 335 LINES SKIPPED *** > From nobody Mon Jun 24 20:21:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7K9K44tkz5PbPM; Mon, 24 Jun 2024 20:21:09 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7K9K2Mthz41BZ; Mon, 24 Jun 2024 20:21:09 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-dfab5f7e749so4078037276.0; Mon, 24 Jun 2024 13:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719260467; x=1719865267; 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=II+9sywttLHy31XQlaMHM79nfBERLWFVPw+SFdKb6Xc=; b=G7K4b4EFs6IFousB0lqEZ5kGtZt//D9duBCmZVTeNthSyawha4/5rucbl8uJrx5QhU d60ML7rib2hJ6eNZHR12hcTIsrfnSjBzKhn/70hqVDgmZ5WRVRfQ0VtAUV44T9VKLjpn nwG3rb+U5LUXUNWsWmToWrEy35H/RJQYkhyHGcKatgmz2UpvYI3Ltd3lS19zw5NjsIPm wRggFUYaQdhfDSnxZZ6w6O3tGbNEOzdmIb84DXXJSk/pPjrzZM2eTSCUiHww4v8Bm4cA vyP7XxEoMor40YEJWUydpsQvLLZzjaYH05pFS/J8ysd2SHcRnjF07M87aitNM6/CsN9K CAjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719260467; x=1719865267; 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=II+9sywttLHy31XQlaMHM79nfBERLWFVPw+SFdKb6Xc=; b=T9PbqvPnVwYprZfZm8SYy+m+HdGuc74rPzyILY/L84/XJ2OjbGjzhUbCvSH/i2DNIm HzYGz/Z5f+8XNOWYH+r0T78P3vhDCHZNgC5gVe7if5lEffJ9sqxdquYcZtB57JDHFL0v 6kxOSTcrQol3v69M6yI2GvIbVwcOMrWYhlYvosg0wa74c1gVmA9iFr7tNYId202TrMsy M5YPRUwvpUbTv5MvcahNhNscwW/48mbw6HOhenh3IpDOUnlT3ktTgYhrvxni0YP9Z3f3 3FqiuIqd54buKSHD7BXpn2Zi+TCScPRbe/Na6zgBHLMdXHX+mBnwL4ZpGjivpZJ5k5p+ Du7A== X-Forwarded-Encrypted: i=1; AJvYcCUXh9CXKfo3IyfRTBo+dx/RteB2ff3ujtP5XS84PFL2QPCe4gP2mydLbMVhJhkbAffxDLw4lD9m99+3H+jkOE/s7aqgZjYO6Pc8rPA3/nho9+SeAxnKUq6xLEgkFY4XnFQhoHGqV5RIaM8hnNj1D3YMfA== X-Gm-Message-State: AOJu0YzRf3VUWipudKlp/wOXw1niE62k/lI9Wx7siGR5xGpZeLvJmXsp vCMdBB1/yYSRS2A+S09QAOM3XjARM6pqFPAiF6zye0B251hkilwa5YtVdb4+ X-Google-Smtp-Source: AGHT+IHp7Nnb7o3TTpEMRegX4Nh+A0wBwmr0uOPNF40U50aGcDT1HlX3FhQVpCJkNcCCoG1MVsnHkQ== X-Received: by 2002:a25:ab50:0:b0:dfd:c6a0:ea21 with SMTP id 3f1490d57ef6-e0300f408cdmr6256048276.16.1719260467441; Mon, 24 Jun 2024 13:21:07 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-444c2c97136sm46223961cf.95.2024.06.24.13.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 13:21:06 -0700 (PDT) Date: Mon, 24 Jun 2024 16:21:04 -0400 From: Mark Johnston To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ac52fa1f1b97 - main - sendfile tests: Fix an error check in tcp_socketpair() Message-ID: References: <202406211821.45LILvWH052581@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4W7K9K2Mthz41BZ On Mon, Jun 24, 2024 at 01:04:59PM -0700, Gleb Smirnoff wrote: > Mark, > > On Fri, Jun 21, 2024 at 06:21:57PM +0000, Mark Johnston wrote: > M> commit ac52fa1f1b9768d281b9deed6d1158f43a8564ca > M> Author: Mark Johnston > M> AuthorDate: 2024-06-21 18:18:22 +0000 > M> Commit: Mark Johnston > M> CommitDate: 2024-06-21 18:18:22 +0000 > M> > M> sendfile tests: Fix an error check in tcp_socketpair() > M> > M> Fixes: c368d3f20fc0 ("tests/sendfile: factor out tcp_socketpair()") > M> Differential Revision: https://reviews.freebsd.org/D45598 > M> --- > M> tests/sys/kern/sendfile_helper.c | 2 +- > M> 1 file changed, 1 insertion(+), 1 deletion(-) > M> > M> diff --git a/tests/sys/kern/sendfile_helper.c b/tests/sys/kern/sendfile_helper.c > M> index 703b04fdea6c..6365531e312c 100644 > M> --- a/tests/sys/kern/sendfile_helper.c > M> +++ b/tests/sys/kern/sendfile_helper.c > M> @@ -84,7 +84,7 @@ tcp_socketpair(int *sv) > M> if (fcntl(sv[0], F_SETFL, flags) == -1) > M> err(1, "fcntl +O_NONBLOCK"); > M> > M> - if (connect(sv[0], (void *)&sin, sizeof(sin)) != -1 || > M> + if (connect(sv[0], (void *)&sin, sizeof(sin)) == -1 && > M> errno != EINPROGRESS) > M> err(1, "connect cs"); > > Sorry for not reviewing in a timely manner. Did you actually observe connect(2) > on a non-blocking TCP socket to immediately return success? Yes, I was seeing occasional failures from my test runner where the helper exited with "connect cs: ". It's easy to reproduce this by running the tests on a system with some background CPU load. From nobody Mon Jun 24 20:43:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7KgT62zYz5Pckl; Mon, 24 Jun 2024 20:43:49 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mx-out-01.fh-muenster.de (mx-out-01.fh-muenster.de [185.149.214.63]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mx.fh-muenster.de", Issuer "GEANT OV RSA CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7KgT3V9jz42qs; Mon, 24 Jun 2024 20:43:49 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Authentication-Results: mx1.freebsd.org; none Received: from mail-director-01.fh-muenster.de (mail-director-01.fh-muenster.de [185.149.215.227]) by mx-out-01.fh-muenster.de (Postfix) with ESMTPS id D6FBD207A8; Mon, 24 Jun 2024 22:43:46 +0200 (CEST) Received: from smtpclient.apple (ip4d15f54e.dynamic.kabel-deutschland.de [77.21.245.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: tuexen) by mail-director-01.fh-muenster.de (Postfix) with ESMTPSA id 48CBB1A004D; Mon, 24 Jun 2024 22:43:46 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_94F319B6-5BDA-4D8B-AC42-C34779BAA7DC"; protocol="application/pkcs7-signature"; micalg=sha-256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: git: ac52fa1f1b97 - main - sendfile tests: Fix an error check in tcp_socketpair() From: tuexen@fh-muenster.de In-Reply-To: Date: Mon, 24 Jun 2024 22:43:45 +0200 Cc: Mark Johnston , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7054D728-6F4F-4265-ACBB-5DEB94525114@fh-muenster.de> References: <202406211821.45LILvWH052581@gitrepo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3774.600.62) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:185.149.212.0/22, country:DE] X-Rspamd-Queue-Id: 4W7KgT3V9jz42qs --Apple-Mail=_94F319B6-5BDA-4D8B-AC42-C34779BAA7DC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 24. Jun 2024, at 22:04, Gleb Smirnoff wrote: >=20 > Mark, >=20 > On Fri, Jun 21, 2024 at 06:21:57PM +0000, Mark Johnston wrote: > M> commit ac52fa1f1b9768d281b9deed6d1158f43a8564ca > M> Author: Mark Johnston > M> AuthorDate: 2024-06-21 18:18:22 +0000 > M> Commit: Mark Johnston > M> CommitDate: 2024-06-21 18:18:22 +0000 > M>=20 > M> sendfile tests: Fix an error check in tcp_socketpair() > M> =20 > M> Fixes: c368d3f20fc0 ("tests/sendfile: factor out = tcp_socketpair()") > M> Differential Revision: https://reviews.freebsd.org/D45598 > M> --- > M> tests/sys/kern/sendfile_helper.c | 2 +- > M> 1 file changed, 1 insertion(+), 1 deletion(-) > M>=20 > M> diff --git a/tests/sys/kern/sendfile_helper.c = b/tests/sys/kern/sendfile_helper.c > M> index 703b04fdea6c..6365531e312c 100644 > M> --- a/tests/sys/kern/sendfile_helper.c > M> +++ b/tests/sys/kern/sendfile_helper.c > M> @@ -84,7 +84,7 @@ tcp_socketpair(int *sv) > M> if (fcntl(sv[0], F_SETFL, flags) =3D=3D -1) > M> err(1, "fcntl +O_NONBLOCK"); > M> =20 > M> - if (connect(sv[0], (void *)&sin, sizeof(sin)) !=3D -1 || > M> + if (connect(sv[0], (void *)&sin, sizeof(sin)) =3D=3D -1 && > M> errno !=3D EINPROGRESS) > M> err(1, "connect cs"); >=20 > Sorry for not reviewing in a timely manner. Did you actually observe = connect(2) > on a non-blocking TCP socket to immediately return success? As far as I know, this can happen. Best regards Michael >=20 > --=20 > Gleb Smirnoff --Apple-Mail=_94F319B6-5BDA-4D8B-AC42-C34779BAA7DC Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCEfMw ggUSMIID+qADAgECAgkA4wvV+K8l2YEwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAkRFMSsw KQYDVQQKDCJULVN5c3RlbXMgRW50ZXJwcmlzZSBTZXJ2aWNlcyBHbWJIMR8wHQYDVQQLDBZULVN5 c3RlbXMgVHJ1c3QgQ2VudGVyMSUwIwYDVQQDDBxULVRlbGVTZWMgR2xvYmFsUm9vdCBDbGFzcyAy MB4XDTE2MDIyMjEzMzgyMloXDTMxMDIyMjIzNTk1OVowgZUxCzAJBgNVBAYTAkRFMUUwQwYDVQQK EzxWZXJlaW4genVyIEZvZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMg ZS4gVi4xEDAOBgNVBAsTB0RGTi1QS0kxLTArBgNVBAMTJERGTi1WZXJlaW4gQ2VydGlmaWNhdGlv biBBdXRob3JpdHkgMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMtg1/9moUHN0vqH l4pzq5lN6mc5WqFggEcVToyVsuXPztNXS43O+FZsFVV2B+pG/cgDRWM+cNSrVICxI5y+NyipCf8F XRgPxJiZN7Mg9mZ4F4fCnQ7MSjLnFp2uDo0peQcAIFTcFV9Kltd4tjTTwXS1nem/wHdN6r1ZB+Ba L2w8pQDcNb1lDY9/Mm3yWmpLYgHurDg0WUU2SQXaeMpqbVvAgWsRzNI8qIv4cRrKO+KA3Ra0Z3qL NupOkSk9s1FcragMvp0049ENF4N1xDkesJQLEvHVaY4l9Lg9K7/AjsMeO6W/VRCrKq4Xl14zzsjz 9AkH4wKGMUZrAcUQDBHHWekCAwEAAaOCAXQwggFwMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU k+PYMiba1fFKpZFK4OpL4qIMz+EwHwYDVR0jBBgwFoAUv1kgNgB5oKAia4zV8mHSuCzLgkowEgYD VR0TAQH/BAgwBgEB/wIBAjAzBgNVHSAELDAqMA8GDSsGAQQBga0hgiwBAQQwDQYLKwYBBAGBrSGC LB4wCAYGZ4EMAQICMEwGA1UdHwRFMEMwQaA/oD2GO2h0dHA6Ly9wa2kwMzM2LnRlbGVzZWMuZGUv cmwvVGVsZVNlY19HbG9iYWxSb290X0NsYXNzXzIuY3JsMIGGBggrBgEFBQcBAQR6MHgwLAYIKwYB BQUHMAGGIGh0dHA6Ly9vY3NwMDMzNi50ZWxlc2VjLmRlL29jc3ByMEgGCCsGAQUFBzAChjxodHRw Oi8vcGtpMDMzNi50ZWxlc2VjLmRlL2NydC9UZWxlU2VjX0dsb2JhbFJvb3RfQ2xhc3NfMi5jZXIw DQYJKoZIhvcNAQELBQADggEBAIcL/z4Cm2XIVi3WO5qYi3FP2ropqiH5Ri71sqQPrhE4eTizDnS6 dl2e6BiClmLbTDPo3flq3zK9LExHYFV/53RrtCyD2HlrtrdNUAtmB7Xts5et6u5/MOaZ/SLick0+ hFvu+c+Z6n/XUjkurJgARH5pO7917tALOxrN5fcPImxHhPalR6D90Bo0fa3SPXez7vTXTf/D6OWS T1k+kEcQSrCFWMBvf/iu7QhCnh7U3xQuTY+8npTD5+32GPg8SecmqKc22CzeIs2LgtjZeOJVEqM7 h0S2EQvVDFKvaYwPBt/QolOLV5h7z/0HJPT8vcP9SpIClxvyt7bPZYoaorVyGTkwggWsMIIElKAD AgECAgcbY7rQHiw9MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYDVQQGEwJERTFFMEMGA1UEChM8VmVy ZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYu MRAwDgYDVQQLEwdERk4tUEtJMS0wKwYDVQQDEyRERk4tVmVyZWluIENlcnRpZmljYXRpb24gQXV0 aG9yaXR5IDIwHhcNMTYwNTI0MTEzODQwWhcNMzEwMjIyMjM1OTU5WjCBjTELMAkGA1UEBhMCREUx RTBDBgNVBAoMPFZlcmVpbiB6dXIgRm9lcmRlcnVuZyBlaW5lcyBEZXV0c2NoZW4gRm9yc2NodW5n c25ldHplcyBlLiBWLjEQMA4GA1UECwwHREZOLVBLSTElMCMGA1UEAwwcREZOLVZlcmVpbiBHbG9i YWwgSXNzdWluZyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ07eRxH3h+Gy8Zp 1xCeOdfZojDbchwFfylfS2jxrRnWTOFrG7ELf6Gr4HuLi9gtzm6IOhDuV+UefwRRNuu6cG1joL6W LkDh0YNMZj0cZGnlm6Stcq5oOVGHecwX064vXWNxSzl660Knl5BpBb+Q/6RAcL0D57+eGIgfn5mI TQ5HjUhfZZkQ0tkqSe3BuS0dnxLLFdM/fx5ULzquk1enfnjK1UriGuXtQX1TX8izKvWKMKztFwUk P7agCwf9TRqaA1KgNpzeJIdl5Of6x5ZzJBTN0OgbaJ4YWa52fvfRCng8h0uwN89Tyjo4EPPLR22M ZD08WkVKusqAfLjz56dMTM0CAwEAAaOCAgUwggIBMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYDVR0P AQH/BAQDAgEGMCkGA1UdIAQiMCAwDQYLKwYBBAGBrSGCLB4wDwYNKwYBBAGBrSGCLAEBBDAdBgNV HQ4EFgQUazqYi/nyU4na4K2yMh4JH+iqO3QwHwYDVR0jBBgwFoAUk+PYMiba1fFKpZFK4OpL4qIM z+EwgY8GA1UdHwSBhzCBhDBAoD6gPIY6aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9v dC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDBAoD6gPIY6aHR0cDovL2NkcDIucGNhLmRmbi5kZS9n bG9iYWwtcm9vdC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDCB3QYIKwYBBQUHAQEEgdAwgc0wMwYI KwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2ZXIvT0NTUDBKBggrBgEF BQcwAoY+aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1nMi1jYS9wdWIvY2FjZXJ0 L2NhY2VydC5jcnQwSgYIKwYBBQUHMAKGPmh0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZ2xvYmFsLXJv b3QtZzItY2EvcHViL2NhY2VydC9jYWNlcnQuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQCBeEWkTqR/ DlXwCbFqPnjMaDWpHPOVnj/z+N9rOHeJLI21rT7H8pTNoAauusyosa0zCLYkhmI2THhuUPDVbmCN T1IxQ5dGdfBi5G5mUcFCMWdQ5UnnOR7Ln8qGSN4IFP8VSytmm6A4nwDO/afr0X9XLchMX9wQEZc+ lgQCXISoKTlslPwQkgZ7nu7YRrQbtQMMONncsKk/cQYLsgMHM8KNSGMlJTx6e1du94oFOO+4oK4v 9NsH1VuEGMGpuEvObJAaguS5Pfp38dIfMwK/U+d2+dwmJUFvL6Yb+qQTkPp8ftkLYF3sv8pBoGH7 EUkp2KgtdRXYShjqFu9VNCIaE40GMIIHKTCCBhGgAwIBAgIMJrRClNKRzetB0jc/MA0GCSqGSIb3 DQEBCwUAMIGNMQswCQYDVQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVp bmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUw IwYDVQQDDBxERk4tVmVyZWluIEdsb2JhbCBJc3N1aW5nIENBMB4XDTIyMDUzMDEzMjIxNVoXDTI1 MDUyOTEzMjIxNVowgcQxCzAJBgNVBAYTAkRFMRwwGgYDVQQIDBNOb3JkcmhlaW4tV2VzdGZhbGVu MREwDwYDVQQHDAhNdWVuc3RlcjEUMBIGA1UECgwLRkggTXVlbnN0ZXIxMjAwBgNVBAsMKUZhY2hi ZXJlaWNoIEVsZWt0cm90ZWNobmlrIHVuZCBJbmZvcm1hdGlrMQ8wDQYDVQQEDAZUdWV4ZW4xEDAO BgNVBCoMB01pY2hhZWwxFzAVBgNVBAMMDk1pY2hhZWwgVHVleGVuMIICIjANBgkqhkiG9w0BAQEF AAOCAg8AMIICCgKCAgEA2QZ7Uheto325SEnX2BTxBvYnz7u/BVmzxKlogaR4K0MA8ZcfNIdQkiJU efjL6imq21BSFsr/tXcODFZmPrvx9aIxjntCxmEFr7qFaw3e3mUIxJyj5n6BxjzZ/hyJte8LBDbj zj+e8WPUzXmYbSxtrh9kgw8NMx3+bo3Hslic+PkKEGx9JJp2I2TEs88xD0rHC2Ljwcfk6bS9jC+/ BAuY/TsbJoq+8d64DYSLGiIYbvMMuxM2C8BlpHLIOLx2FaH+uMqdH2dLVvCacZJ9YzHvvZY8O2nQ OBFCG1UMpX5YLHN8g/t02a+IBt+oe97JMdJ/kZsPjolI98dcRdzz0hTXZql2xvp6zlocm9iGTRcv dCSxy+0x4CIZD1EkVX9zCPGpzdTXnrU+zvnz14Uq3Wbfl3GiVgK0Avr1enfZepruAxAy7KGIm2zi /qY3XSkN8fvWJmYnomOjCRjaPtqS/azmnyeodsxlVhqQKbES65u/PbOXjOlhiYAvemS0IbK4iR76 3iSmkpwSNpJt6BCtFJN+w3Y8tztCP66KPPC1Fri1oj27KPaf04J66MkSjlQdpI7POS6lDyN7X2Hw tgZKRVA94h/JvZp4ld7mTzXTEW2tdO5azPILsL9xOYjSS5VIyUFF4MoxSbfZtXWaZFsMC1fXDNNL uRDrISotdwADuU75Fe0CAwEAAaOCAk4wggJKMD4GA1UdIAQ3MDUwDwYNKwYBBAGBrSGCLAEBBDAQ Bg4rBgEEAYGtIYIsAQEECjAQBg4rBgEEAYGtIYIsAgEECjAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE AwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwHQYDVR0OBBYEFFDbROYIxDr3fvlX tkXqx7T8lihxMB8GA1UdIwQYMBaAFGs6mIv58lOJ2uCtsjIeCR/oqjt0MCAGA1UdEQQZMBeBFXR1 ZXhlbkBmaC1tdWVuc3Rlci5kZTCBjQYDVR0fBIGFMIGCMD+gPaA7hjlodHRwOi8vY2RwMS5wY2Eu ZGZuLmRlL2Rmbi1jYS1nbG9iYWwtZzIvcHViL2NybC9jYWNybC5jcmwwP6A9oDuGOWh0dHA6Ly9j ZHAyLnBjYS5kZm4uZGUvZGZuLWNhLWdsb2JhbC1nMi9wdWIvY3JsL2NhY3JsLmNybDCB2wYIKwYB BQUHAQEEgc4wgcswMwYIKwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2 ZXIvT0NTUDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDEucGNhLmRmbi5kZS9kZm4tY2EtZ2xvYmFs LWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDIucGNhLmRm bi5kZS9kZm4tY2EtZ2xvYmFsLWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDANBgkqhkiG9w0BAQsF AAOCAQEALubmL854icQMxKxOxQK+deXTjC6CLYnUDwB8MvnDC+BSeh3tUHT37fSgsK1ShNUSNJX0 YF0VYLfZ6+lPyaFYLArVrAIHqvDiVURaulB9NA+3gck/VSuRz4ILYBy61XbcGQQ8Wx+g6TcqsjsF oOhqEBycj5QuITj+EFmX8nvfo0dJtVa2OPDk1N9beLfQBcLhspJ/nv0pKhpNWv5YETG26YqYfsC7 FA/ZNGvRcoOPkjkDhBTtG+qq9DDD75XtGEBZhYXbnG15tn4/UV07B+UyK4/cqQSA+My5FML3YsQw EYrV9klVD/mLMOdZV5+95xt7O8IdYeHrBapVlhANH5bFazGCBJ0wggSZAgEBMIGeMIGNMQswCQYD VQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBG b3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUwIwYDVQQDDBxERk4tVmVy ZWluIEdsb2JhbCBJc3N1aW5nIENBAgwmtEKU0pHN60HSNz8wDQYJYIZIAWUDBAIBBQCgggHPMBgG CSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTI0MDYyNDIwNDM0NVowLwYJ KoZIhvcNAQkEMSIEIAZiNdjR4TD/2a5pkyajFPIfQiEOqo0V2q6eLxyHH2LiMIGvBgkrBgEEAYI3 EAQxgaEwgZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZvZXJkZXJ1bmcg ZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsMB0RGTi1QS0kx JTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3rQdI3PzCBsQYL KoZIhvcNAQkQAgsxgaGggZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZv ZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsM B0RGTi1QS0kxJTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3r QdI3PzANBgkqhkiG9w0BAQsFAASCAgCG1ULKEINghtDMqMdA12jgpLwhrBGU2eZzZIQ2SWinXKPi x4IcRPW2Xv9XPgEuJtJOhx1Ufx+fnHl8AWjwJ0EweHmyXSD/+CXeXJukiLegWLG+eOHMm9pFx86K 8JoHqwx4NV/K/8x0lFCOdIZwx7xytq6HZ0GSDUEiKgy88mRXb9VWEYnf/261wk4hCva2vqgiOQYP QCzgUb+dcblDgkyG7Fcdav7HD7p6/xt66Yf/Z7pv5vfRmDGTxb9OsFbSCNU4p846qOASI+CPx3Du /DjSGnvIAsdgOzROvndo5DphXIWOhoX+sTOkbkI7XPy4kLS7bHqIXtgtGLpaIUOBcsLJbBO7xBRY Xh8/c5gR+FZYlaef74i10t0zRbju9bd2vROu0Bp/gDck6Q/5/5JP7W5R7HkXhtSd2PSm52FOaj1t mK52K7DlTY9OlZLtYTLjgqQ2ojYhXVO+gwcIQ+eYyJd9u1QQTrd74KLr/ikcxvbYIUQkPbrjIbZQ F+X5dnyedN81BMIPyZnbM5iKPDQAElGwCbOHs9q2hwiC5YT9RqAlI0gY7JPpvlIR6z4CzzLooR9r H0aZk68ZMHxRrMo2HV1R/U13JuGqjLqN9YMIwIYTsGIu20yk1wHlCCSvDZ3cdWLLnWI1Vi9Ztfv3 48DcdGMnH79o6kBUJK126JND4WoGewAAAAAAAA== --Apple-Mail=_94F319B6-5BDA-4D8B-AC42-C34779BAA7DC-- From nobody Mon Jun 24 20:49:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7KpN22FFz5PdX5; Mon, 24 Jun 2024 20:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7KpM6n95z43Yt; Mon, 24 Jun 2024 20:49:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719262188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJP4zORm+IxXaE0JPwvehBLelpLlQfCCDt8WgDpb4jk=; b=RCskFxCvwRZET9pSVUTqKjyLWZwq4wfIN+G1oxICeFAhqvhaTiO2VJZ5crYBEM/JuR/49z YHqlu8fN+TxRYxM1PcIM/9alffiWrGaRwf4KkSfz9DSWn6owFCHsTD66aDIX0bLji6Vjei O62/wRw7irogyOrcVdbiUED/Yhy9wFpzMZlQPaimnuBtB6pSn2KxM3sFl9EaQ5f57c5qHG nYggSH1JSf0EA9G/Qru88HUu7n2VsvMBXbOIE+jPng7INr+C/fstyTVL4n5/iEAiVhx0/A vEjFcmpOd2JUHjTjcpj+eaZD8PsIwjR+nY+ltfaocA+BaFFUJzzuXZYjABSVMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719262187; a=rsa-sha256; cv=none; b=M05xs9BvuBUZJ2c/1jki4IvxxOWOuCFp1+dOMiBlyfUIZD0mNyUreeajrZBh0OKgAGP93P 5lDfpcKsjBnAjzxyVy1YVg4j9UjP45MqcCxJapm8sijuF3dII4EaiaAYfaKMPIliIwohHF 2fMM7SX7DInmy7NmTEwdG6DliLt/CYpOi8BvZj3xZ9xkXsrXbrUhCn6//vrrH0UWYKM0tI +iI0c22sT+ETqbX7XKF/BHclD0s/s2mjqiEZCMPEH/O+ZjKTfVTBly+9gA/3mGeMVJlWhE C2Nmsbga/iis/ue74AjiRCnsN5XvEqUz1zW/c0vrlEWa7tm3bbfSCHnF0GByCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719262187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJP4zORm+IxXaE0JPwvehBLelpLlQfCCDt8WgDpb4jk=; b=UJAFEz+eWBq2VzrzH2YEPynvMTP8rM9p2/s3yXmkS4cV1R07CwT2Ys5k7HVFZ6cHkAbpIv P0gxBvEn6E7Y4loCkD3JV4NeysAjxp7vw6Ga8TvCoy+fvmlVm4g5KqRmt/cIo0QaWD0b7Y IxeNFwhX9JoF/7NEEsiWCaFYvn6iEBrayfMMFHrKd7nyZ8Lu6ev6Cnjk6KzqMNiRO6ztPf Uxt8o844ZWuFk3Y88J1oPe084/dPEKpryD7Yf0R8mj1EAOGi0nxXh6jBx8NPCKSqoudcBt Q0i6n/thrZSyXkPM/0DIXDvZtrzf8D93r7ylzuQCu04vQF0YlMJLBgy+HufJ3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7KpM6PK8zZ3q; Mon, 24 Jun 2024 20:49: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 45OKnlUo001449; Mon, 24 Jun 2024 20:49:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OKnl6w001446; Mon, 24 Jun 2024 20:49:47 GMT (envelope-from git) Date: Mon, 24 Jun 2024 20:49:47 GMT Message-Id: <202406242049.45OKnl6w001446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 31354813f3c6 - main - Add an isp(4) tunable to default to ispfw(4) firmware. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31354813f3c6e87532189be77c2f10a017c55472 Auto-Submitted: auto-generated The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=31354813f3c6e87532189be77c2f10a017c55472 commit 31354813f3c6e87532189be77c2f10a017c55472 Author: Kenneth D. Merry AuthorDate: 2024-06-24 19:42:41 +0000 Commit: Kenneth D. Merry CommitDate: 2024-06-24 20:47:55 +0000 Add an isp(4) tunable to default to ispfw(4) firmware. ispfw(4) recently gained firmware for Qlogic 27XX and 28XX FC controllers, and isp(4) now selects the newer of firmware in flash or in ispfw(4) to load for those controllers. This differs from the previous behavior (which remains for older controllers), which was to always load the ispfw(4) firmware if it is available. This adds a loader tunable, hint.isp.N.fwload_force to default to loading the ispfw(4) firmware, whether or not it is newer than the firmware in flash. This allows the user to always use the known firmware version included with the kernel. Note that there is an existing fwload_disable tunable that tells the driver to always load the firmware from flash and ignore ispfw(4). If fwload_disable is set, fwload_force will be ignored. So users with existing fwload_disable tunables will have the same behavior. If a user specifies both fwload_force and fwload_disable for the same controller, the isp(4) driver prints a warning message, and fwload_disable will be honored. The user can see which firmware is active through the dev.isp.N.fw_version* sysctl variables. share/man/man4/isp.4: Document the new loader tunable. sys/dev/isp/isp.c: In isp_load_risc_flash(), changet the decision logic to also consider ISP_CFG_FWLOAD_ONLY. Load the flash firmware and get the version, so the user knows what it is, but if the user set fwload_force, honor that. If the user didn't set fwload_force, the behavior remains to select the newer firmware version. sys/dev/isp/isp_pci.c: Add a new fwload_force tunable. Print out a warning if the user sets both fwload_disable and fwload_force. sys/dev/isp/ispvar.h: Add a new ISP_CFG_FWLOAD_FORCE configuration bit. Reviewed by: mav MFC after: 1 week Sponsored by: Spectra Logic Differential Revision: --- share/man/man4/isp.4 | 17 ++++++++++++++++- sys/dev/isp/isp.c | 18 +++++++++++++++++- sys/dev/isp/isp_pci.c | 9 +++++++++ sys/dev/isp/ispvar.h | 1 + 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 index 350a0ea59a64..dc6a6dbd5d2b 100644 --- a/share/man/man4/isp.4 +++ b/share/man/man4/isp.4 @@ -24,7 +24,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 October 27, 2023 +.Dd June 24, 2024 .Dt ISP 4 .Os .Sh NAME @@ -141,6 +141,21 @@ Limit on number of Extended Message Signaled Interrupts (MSI-X) to be used. .It Va hint.isp. Ns Ar N Ns Va .fwload_disable A hint value to disable loading of firmware provided by .Xr ispfw 4 . +.It Va hint.isp. Ns Ar N Ns Va .fwload_force +A hint value to prefer firmware provided by +.Xr ispfw 4 , +even if it is older than the firmware in flash on the board. +If fwload_disable is also specified, fwload_force will be ignored. +.Pp +By default, with 27XX and newer controllers, the +.Xr isp 4 +driver will use the newer +firmware. +For older controllers, the +.Xr isp 4 +driver will use the firmware provided by +.Xr ispfw 4 +if it is available, and otherwise use the firmware in flash on the board. .It Va hint.isp. Ns Ar N Ns Va .ignore_nvram A hint value to ignore board NVRAM settings for. Otherwise use NVRAM settings. diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 2ed56c5e40bb..b064f86fda89 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -457,7 +457,10 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) if (IS_27XX(isp)) { switch (isp_load_risc(isp, 0)) { case ISP_ABORTED: - /* download ispfw(4) as it's newer than flash */ + /* + * download ispfw(4) as it's newer than flash, or + * the user requested it. + */ dodnld = 1; break; case ISP_SUCCESS: @@ -5222,7 +5225,20 @@ isp_load_risc_flash(ispsoftc_t *isp, uint32_t *srisc_addr, uint32_t faddr) /* If ispfw(4) is loaded compare versions and use the newest */ if (isp->isp_osinfo.ispfw != NULL) { + int ispfw_newer = 0; + if (ISP_FW_NEWER_THANX(fcp->fw_ispfwrev, fcp->fw_flashrev)) { + ispfw_newer = 1; + } + + if (isp->isp_confopts & ISP_CFG_FWLOAD_FORCE) { + isp_prt(isp, ISP_LOGCONFIG, + "Loading RISC with %s ispfw(4) firmware %s", + (ispfw_newer == 0) ? "older" : "newer", + "because fwload_force is set"); + return (ISP_ABORTED); + } + if (ispfw_newer != 0) { isp_prt(isp, ISP_LOGCONFIG, "Loading RISC with newer ispfw(4) firmware"); return (ISP_ABORTED); diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index e7f9d4b77e38..e8fd7b3cf571 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -291,6 +291,15 @@ isp_get_generic_options(device_t dev, ispsoftc_t *isp) isp->isp_confopts |= ISP_CFG_NORELOAD; } tval = 0; + if (resource_int_value(device_get_name(dev), device_get_unit(dev), "fwload_force", &tval) == 0 && tval != 0) { + isp->isp_confopts |= ISP_CFG_FWLOAD_FORCE; + } + if ((isp->isp_confopts & (ISP_CFG_NORELOAD|ISP_CFG_FWLOAD_FORCE)) == + (ISP_CFG_NORELOAD|ISP_CFG_FWLOAD_FORCE)) { + device_printf(dev, "WARNING: both fwload_disable and " + "fwload_force set, ispfw(4) loading disabled\n"); + } + tval = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "ignore_nvram", &tval) == 0 && tval != 0) { isp->isp_confopts |= ISP_CFG_NONVRAM; } diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 6c3430246b29..abb712a395c1 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -612,6 +612,7 @@ struct ispsoftc { #define ISP_CFG_16GB 0x8000 /* force 16Gb connection (26XX only) */ #define ISP_CFG_32GB 0x10000 /* force 32Gb connection (27XX only) */ #define ISP_CFG_64GB 0x20000 /* force 64Gb connection (28XX only) */ +#define ISP_CFG_FWLOAD_FORCE 0x40000 /* Prefer ispfw(4) even if older */ /* * For each channel, the outer layers should know what role that channel From nobody Mon Jun 24 20:49:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7KpM0rhcz5PdcW; Mon, 24 Jun 2024 20:49:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7KpL5lrMz43fk; Mon, 24 Jun 2024 20:49:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719262186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bTwcNVCPoy4Tc1BryogoxUVg2evk2qLgltOiAgnvPHI=; b=GlaL5BASjlT+xKOVeqygZ3EbLN2QSdd/wc8n90By74p2ki37//d/GgoTIQyDx0Qj5qpfJ2 0chjByMm0SrUizfuFocDGGd5O7a0XPHNV6aQ0xRK0D+9kvMITjmJ2/8rcOiKbhbPylzTuK gG/0009MzA66Hvw++aPzkvrRxv7q7w5x6mpCkwI2tUlmOcLnmfCdc8S14aDTqSK4Sdr0Uk C20xmvAOskRJEmkT8Ty8MjhsjmRuOB64l0uBbRDCJ/wNklNhrWQYoSJsq3g98e2rPcaZKb xUzXBTI+q2V3+itVC3O6yHmSZBefhTiOL3jwv3scKFqV/lyiDJjNejcX9c10yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719262186; a=rsa-sha256; cv=none; b=JIY4HmFtBfO2AnHkhL0BCDWqxuLy3OR2f+EU4rwjhTtK4ZfLCwnzpoO0DvWUD8lsuR6qPy NuzDRrZZ6GZTC34XljO5eTv8L15clG9m72mnzY5+FnsjBlRzP9IjuPA+PyjZ1gsuzM0FWc mLznPoqpKM/rzf295YMvaffuaGNvEVp8lBeFCurZ9GKHgGZ6nKjU67X5qYlxqCWmtYteUF rvqzduslU2OFjxToql/fvsBixTgHcEyUBndvU1IIxKCrD7btRA4+ViFumYjUI5jfDgxOCa oQzWbTl1eiLSB7lbJr0zJNIEaK7+SeUox+PVcByP/toOVj6lPiSqmJXqESDimQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719262186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bTwcNVCPoy4Tc1BryogoxUVg2evk2qLgltOiAgnvPHI=; b=C5U2km1TWNyH8gGGF2MBP9YxOrdBhuY6FRB7d2GdhCDUut6l1FlQiFvtDOTy4GTTHvcY/w ulUhJmUvvBTV8vR1wQ/neUdoWrdbBYpMZupLnlpxJd713mRFWnz9RUrDIrfCbrfDPaZs6z kv20MIBd8KMAxFOzGtGcmzxGcLhANrmd0MaF/EgiTNbrxJXqoLWlpd2RjUUtWlqoTIjDA9 60SpcHNiFydJxEU42lZ5FtyeiKG7FDi6KVmf6zE6QO8Fg7hzE1RnbqYZxOmh+qoU2ENAnl ftBKMY5cRnLko+PKguNZqYFO1440c/Ui/mw+QIXoUv5m4NP0LWGXX6g0uW7CCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7KpL5JgpzYhX; Mon, 24 Jun 2024 20:49: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 45OKnkQf001391; Mon, 24 Jun 2024 20:49:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OKnkMn001388; Mon, 24 Jun 2024 20:49:46 GMT (envelope-from git) Date: Mon, 24 Jun 2024 20:49:46 GMT Message-Id: <202406242049.45OKnkMn001388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 137b004e2b7a - main - Fix the isp(4) driver with 9.x firmware. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 137b004e2b7ab504abf98c4aad9d52607df47b9a Auto-Submitted: auto-generated The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=137b004e2b7ab504abf98c4aad9d52607df47b9a commit 137b004e2b7ab504abf98c4aad9d52607df47b9a Author: Kenneth D. Merry AuthorDate: 2024-06-21 19:30:59 +0000 Commit: Kenneth D. Merry CommitDate: 2024-06-24 20:47:55 +0000 Fix the isp(4) driver with 9.x firmware. The isp(4) driver (and ispfw(4) firmware) previously only included firmware for Qlogic controllers up to 8Gb. It recently gained firmware for the 27XX and 28XX series controllers along with improved firmware loading capabilities. The 9.x firmware available for the 27XX and 28XX controllers in ispfw(4) adds login state for NVMe devices in the top nibble of the login state in the port database (isp_pdb_24xx_t in ispmbox.h). This breaks the check at the end of isp_getpdb() to make sure the device is in the right login state. As a result, it breaks device discovery for many (perhaps all?) FC devices. In my testing with IBM LTO-6 drives attached to a quad port 16Gb Qlogic 2714, they don't show up when they are directly connected (and in loop mode) or connected via a switch (and in fabric mode). So, mask off the top bits of of the login state before checking it. This shouldn't break anything, because all of the existing login states defined in ispmbox.h are in the low nibble. sys/dev/isp/ispmbox.h: Add a FCP login state mask define, and a NVMe login state shift. sys/dev/isp/isp.c: In isp_getpdb(), make sure we're only looking at the FCP login state bits when we try to determine whether a device is in the right login state. MFC after: 1 week Sponsored by: Spectra Logic Reviewed by: mav Differential Revision: --- sys/dev/isp/isp.c | 10 +++++++++- sys/dev/isp/ispmbox.h | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index b53171add5f5..2ed56c5e40bb 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -1539,7 +1539,15 @@ isp_getpdb(ispsoftc_t *isp, int chan, uint16_t id, isp_pdb_t *pdb) chan, id, pdb->portid, un.bill.pdb_flags, un.bill.pdb_curstate, un.bill.pdb_laststate); - if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) { + /* + * XXX KDM this is broken for NVMe. Need to determine whether this + * is an NVMe target, and if so, check the NVMe status bits. We are + * probably missing more bits for proper NVMe support, though. + */ + if (((un.bill.pdb_curstate & PDB2400_STATE_FCP_MASK) < + PDB2400_STATE_PLOGI_DONE) + || ((un.bill.pdb_curstate & PDB2400_STATE_FCP_MASK) > + PDB2400_STATE_LOGGED_IN)) { mbs.param[0] = MBOX_NOT_LOGGED_IN; return (mbs.param[0]); } diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index c6ac9d9ce971..978ed4dc1638 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -890,6 +890,10 @@ typedef struct { #define PDB2400_CLASS2 0x0010 #define PDB2400_ADDR_VALID 0x0002 +/* + * For NVMe, the state is the high nibble. For FCP, the state is the low + * nibble. This appears to have changed with the 9.x firmware. + */ #define PDB2400_STATE_PLOGI_PEND 0x03 #define PDB2400_STATE_PLOGI_DONE 0x04 #define PDB2400_STATE_PRLI_PEND 0x05 @@ -897,6 +901,8 @@ typedef struct { #define PDB2400_STATE_PORT_UNAVAIL 0x07 #define PDB2400_STATE_PRLO_PEND 0x09 #define PDB2400_STATE_LOGO_PEND 0x0B +#define PDB2400_STATE_FCP_MASK 0x0f +#define PDB2400_STATE_NVME_SHIFT 4 /* * Common elements from the above two structures that are actually useful to us. From nobody Mon Jun 24 21:10:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7LGl5vPKz5PfvL; Mon, 24 Jun 2024 21:10: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 4W7LGl5S76z45J9; Mon, 24 Jun 2024 21:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719263455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2wcRPbQCyII53fHlwYgLPv7VlIWIgkA88knx6WeUh4=; b=IAIx0ChVrsDKZ5DbonM/r/3clg+KMCX4E1BY2G5an0NeNF/PZF1F6pJleqGKjhweQ5bYqn dbsotvJvaU7nsFk4p+fVt/8YDQswYQ2asNUO/T+ScSqkXmuBpqM8hetR+wB6T2Ktw9er8G UdNJIJ8+v+fCa6xqU+Bvzx2nMOqL7uPA5NWopJ6M8iNXYhDF3eJHvXMGhcexAlZWMT/dKe VleYvqvBhXXh8nP5kMgBGMWBuT/C/0d8hlV6ThN+zWiZMWYMNcEnsUqsoQgGrXmWoXV6fn v11KIykgTPKT2CH1w0MvQs3bktj135rxPmeaMaVPsf+IkoqTrTxlEs37DUFLmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719263455; a=rsa-sha256; cv=none; b=qMAd50DkkOmzfYD07WoIHI1F56cLA6tdvqiMTsYm8GaaR7XJ3SzdVUrQZ6xk4R72dEYGRw KbwEhEyrti76W9fOo3vBkOvkjSddBXZtwBaD4XZD15uSYUz9uqGGNFXw89RqwKy+Gpz0jN 6MwhiWqHnROiizMaKm+kJ+TZEfUS4nmzH5O0DBZuCQcHE5j0H4+ep/c9vOhK828C89LINS 5K4UDDUBKWyjY3pZiwHeIqizeuFb5ZiJo8wDWnwnsoBSHX+rKeFPRnFIlVpfPZ8KaJc7BA tfN7owEK6AN0qpo4YyjBH8K0IsJ06zsBUo41aIuN/AhCdgI5lSf0MCvtqr8pJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719263455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2wcRPbQCyII53fHlwYgLPv7VlIWIgkA88knx6WeUh4=; b=GkZqYgjjPWjhdjXIjKeQwmXdXkWpssyvB+stto2RuV/mWXoaRcxozPFBIaGy3mG0KdFu0b cXHCAH1eaoHykvbp8/BnwpNSn3VVPzDa5am0doNJFsCeKRjDtvUrMp58BFGwn1gkQ0pRV4 fUsw9DqgiahtLYtUd6kgs7PjUymk59xpctl0S+G2iXvwauwheZDfZ+0S7y2XniU+zOlofv Vzhu13TAW52T4gR+5O7bHwEmNNPgLxfJoE6sM5/kpoNOQ5dc4cKcer5rN+Zs+LgmHdkjtU du5JvVIRsMzsN2JLTGS6JZt3mR3ikvcShqbBIQh5OO5BZdZ6aCI4pJKRo9qwMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7LGl53cGzZSZ; Mon, 24 Jun 2024 21: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 45OLAt7K045376; Mon, 24 Jun 2024 21: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 45OLAtk3045373; Mon, 24 Jun 2024 21:10:55 GMT (envelope-from git) Date: Mon, 24 Jun 2024 21:10:55 GMT Message-Id: <202406242110.45OLAtk3045373@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: 65522b64ad7e - main - sys/cdefs.h: Remove old arm acle-compat.h workaround List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 65522b64ad7e1a761e50a2304ce3d9fa1d222f2a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=65522b64ad7e1a761e50a2304ce3d9fa1d222f2a commit 65522b64ad7e1a761e50a2304ce3d9fa1d222f2a Author: Warner Losh AuthorDate: 2024-06-24 19:05:07 +0000 Commit: Warner Losh CommitDate: 2024-06-24 21:11:05 +0000 sys/cdefs.h: Remove old arm acle-compat.h workaround The ACLE defines the modern ARM compiler symbols. ARM published acle-compat.h to ease the transition to the new standard. This standard is in all modern versions of gcc and clang, only gcc prior to 4.4 lacked them (though our 4.2.1 back-ported them, IIRC). Since this is no longer needed, remove the global inclusion in sys/ctypes.h. We should likely remove arm/include/acle-compat.h as well (it's unused now in the tree), but I'll make sure this change is the NOP I think it is before moving ahead there. I also recall at one time some out of tree code needing this file, though the need for it to make things right has long since past. Sponsored by: Netflix --- sys/sys/cdefs.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 6592bd2020ae..32050ef81848 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -617,14 +617,6 @@ #endif #endif /* __STDC_WANT_LIB_EXT1__ */ -/* - * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h - * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. - */ -#if defined(__arm__) && !defined(__ARM_ARCH) -#include -#endif - /* * Nullability qualifiers: currently only supported by Clang. */ From nobody Mon Jun 24 21:10:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7LGn0ZWQz5Pfsd; Mon, 24 Jun 2024 21: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 4W7LGm68F0z45Lg; Mon, 24 Jun 2024 21: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=1719263456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T5+LQ8JS9OoJ+esL3a7uyi+Z2eFnAGm4ly8wYccG9to=; b=Av31feCs8v2iad6t45uBFjP10eLXfMSgpbMEMmvVeBW/W6h3OcPFsFXH1n/pCW2d0Npayy aO/+bj9lw9ncDI3Fo37xrKRTetEAJSrot+gnNswVfMc2SBFrz5kMAZqukoMVl0Tu1lf3zv IzvbOEROpxsuvwt1xNlA6j6MFwzTm9IEMe4MBMC7s0Jkn+OJ3AjhUdFIRd8k8M+NPeacPX HQY+qc3jcFofmzKR977mJyswgd3LCjJgVjQ3snyGeV2M25bqSLETRTgDiuFZK23YdBMfQ3 ceArlA5lHw9KU1ZA8Mk2sl+1uhFAVfnKLUfb/irlJ/ch7Q99JM0aCjIqmh/L3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719263456; a=rsa-sha256; cv=none; b=NsYdndiTyIE0pIDivi4789bXXvMVA4tdhfJdKy0sjfEu/TTMLlzidLdBuXgAS+XCh3Erd4 MNdRCqOoZxQV18jTJ+XWq+GCIIbtDDKQVz/sBR0rFuWgKK96UGqCvY+eOuvcWvi6FFkTok ODs+bHjHub0NhbcZErwik/Vkhfqo29gJA4RfZd3zYuoOtyI0coQxFZun4nKH5j0mAOa2dC Fwd7dqSEmtWh88dC9y0x/S5S+hUeAeyaFJm/gdQwkiyrjFItZghp/wgqgDw0Ui/hJiflrf cfxgpYGcixdV0tEPUl/VV9Qs2+/zOkwrfpK5rKnxQ8vp168eq0R9ZFljfa3b0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719263456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T5+LQ8JS9OoJ+esL3a7uyi+Z2eFnAGm4ly8wYccG9to=; b=EkRItiEgxs1oBJSr874ma8Xg8t04rcic51ZFq/9QtRB99EAXd21pzjH7Ca/8dRCMQ1eX+2 SSpHj5DT4/Ncz2hBaONKbAcoRrNsumeqbg7kJgg0dfT9N2+7DA4qTrgmF7mUQxk3Ir2l9I 17i18KNXmuPJmPEbhhYc7hVQ0Ph2AL031k4/atxWU0Eolli2avV5Dc0UQCOj8gBKmf3oaN fnPDIW8zlQV8TdFEgMef7UP1x2jxKVmWU+Lu5CFtLIopL+4g6z+L1IcSh1cdoTyT6hbrtR PIhajnSMv7jJc37pKor6miOxB9VO1nVg9UcUQ5aOPoYS1psDXdE3AlRzBXCVAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7LGm5ldpzZbG; Mon, 24 Jun 2024 21:10: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 45OLAusf045424; Mon, 24 Jun 2024 21:10:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45OLAuAR045421; Mon, 24 Jun 2024 21:10:56 GMT (envelope-from git) Date: Mon, 24 Jun 2024 21:10:56 GMT Message-Id: <202406242110.45OLAuAR045421@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: 677b28750a86 - main - sys/cdefs.h: Note gcc supports many __has_* 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 677b28750a86a63d2e94d1187166fe5ccf0e1813 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=677b28750a86a63d2e94d1187166fe5ccf0e1813 commit 677b28750a86a63d2e94d1187166fe5ccf0e1813 Author: Warner Losh AuthorDate: 2024-06-24 19:20:57 +0000 Commit: Warner Losh CommitDate: 2024-06-24 21:11:05 +0000 sys/cdefs.h: Note gcc supports many __has_* macros The __has_* macros are no longer clang-speicifc. gcc 5 introduced __has_include, gcc 9 introduce __has_attribute, gcc 10 introduced __has_builtin. So all of these are supported by all the versrions of gcc we support as a project (we have gcc 10 and newer ports, but no older ones), so just refer to them as supported by gcc. The exact version doesn't matter so much these days (we provide a fallback for older compilers still, should anybody still be using them), so don't mention them in the comments (but here in the commit message they are discoverable). gcc 14 adds __has_feature and __has_extension, so note that since it will be relevant for many years. Sponsored by: Netflix --- sys/sys/cdefs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 32050ef81848..58146ddc721c 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -40,7 +40,10 @@ #endif /* - * Testing against Clang-specific extensions. + * Provide clang-compatible testing macros. All supported versions of gcc (10+) + * provide all of these except has_feature and has_extension which are new in + * gcc 14. Keep the older ifndefs, though, for non-gcc compilers that may lack + * them like tcc and pcc. */ #ifndef __has_attribute #define __has_attribute(x) 0 From nobody Mon Jun 24 21:10:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7LGp0xqqz5Pg3Z; Mon, 24 Jun 2024 21: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 4W7LGp0R09z45PC; Mon, 24 Jun 2024 21: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=1719263458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hy48+0h6Ab6pLPfx/DaGelr22V3E0gh8QttPVFnp+Uo=; b=oqae5B1YRP2U25ocMs2ICxA7cVToiVGtsAC5nob6ldkvd2dk512Zz/uz6+QN756Q/NA2xq dpElPgMBp9nIvvIvKxov2LYx7kKriWU0R9SJuBqOMg5aShlhtDYhA+5ZKOtKNYP0oRSGV3 FKQTZ9+FMqS4OAPqrFK5LtJT5sJmA76EnHTf/ugRgUsEbWQCaVYBwJIcpPwHYE4mvMTcTR wQwfjwsNAeoX4Qlkj7jn79xm3xb1EqrmPQ4mJDMUSTRCJ+Us9gkzJVTjpdVoVg3tTS66Nx MLlpBd1p/2x25SKC2l1//6bIzT0v8/RZGFHkY7lc74dA+FMvlirM1zUtWWvbIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719263458; a=rsa-sha256; cv=none; b=Eo0PF7hRJUXUWTPxlD6brQZgUcjk0CKXNWv/Ambtk0nnwxvaCLMTiywl9345L+xQDT1zxX Y/VkDeFB4h760nKeADQxX5DcaODYY6h1hGnPlJLaCxzviaXjyax07rwiRpkUZ+jNNNTAKT 0ut2quQrwaB7Fr5b59fxdlScJxa08f/iMmAapwhtRFmNC52djpkpcxq2tI3FFrelzQIFio uE3cDRtr39fdIWyhzXxwda1DLMwIiPvOgEUyNNm3ZRLFAMRqsbORElVkb9Yj/2nOR9osDT tQXYoxErRq3uSeiXNvS6AZFw+2huQoUi59dES89AgXfVhfuG3iW/89m5J44GMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719263458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hy48+0h6Ab6pLPfx/DaGelr22V3E0gh8QttPVFnp+Uo=; b=xJ+dwnmaoe/gIYo5Scr6S96tBv6Db8E6/2/74MBbZvY8JMDkw0mlLTuGSELqPu5OsglHFa bo5oyxRFm5PyePMuV8ERbRY3jAa8EacGV+5mOu9ykhfOjjibgQIKmODzPWgVsWs9KinsLk udkzQdd452c+ddiXetTPC3fZnlFB4GmCuNUZaMK6JesFBnQs4vYzkfRxlJoT60CMPAQXsv fGN0MlTMQ1bZzqWgcGu8VvyKme82AZsFtLyBTHxZegN2AQJ478saWEGZg+L1zYKhYlSR/6 YMqqGYGX+r0LxDvy1GUgoRjdI1SxlQbktv7t7qwY4RzOW2aa0acxtMWyfl/4uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7LGn6y06zZWl; Mon, 24 Jun 2024 21: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 45OLAv8l045464; Mon, 24 Jun 2024 21: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 45OLAvRR045461; Mon, 24 Jun 2024 21:10:57 GMT (envelope-from git) Date: Mon, 24 Jun 2024 21:10:57 GMT Message-Id: <202406242110.45OLAvRR045461@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: 617688369784 - main - sys.netinet6.divert.ipdivert_ip6_output_remote_success 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 6176883697840cc7714fa1b4cacfb1219e1562bd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6176883697840cc7714fa1b4cacfb1219e1562bd commit 6176883697840cc7714fa1b4cacfb1219e1562bd Author: Warner Losh AuthorDate: 2024-06-24 21:09:32 +0000 Commit: Warner Losh CommitDate: 2024-06-24 21:11:05 +0000 sys.netinet6.divert.ipdivert_ip6_output_remote_success fails Disable it. It's been failing with the useful 1 != 0 (1 != 0) for weeks if not months now. PR: 279975 Sponsored by: Netflix --- tests/sys/netinet6/divert.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sys/netinet6/divert.sh b/tests/sys/netinet6/divert.sh index 2cf57c5966b0..3517c0f1777f 100755 --- a/tests/sys/netinet6/divert.sh +++ b/tests/sys/netinet6/divert.sh @@ -46,6 +46,10 @@ ipdivert_ip6_output_remote_success_head() { ipdivert_ip6_output_remote_success_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/279975" + fi + ids=65530 id=`printf "%x" ${ids}` if [ $$ -gt 65535 ]; then From nobody Mon Jun 24 21:16:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7LNv3TbKz5PgV6; Mon, 24 Jun 2024 21:16:15 +0000 (UTC) (envelope-from glebius@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 4W7LNv2cKqz46V9; Mon, 24 Jun 2024 21:16:15 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719263775; 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=9SHoNvz6qe7Xk4GZNJx4Ur/qrWVKCjW9DeNzGIoSkHQ=; b=lZ2g+11y2Vt3AK66HOanFR7Xrl+tNvxT7kEpvYe/Vf+Hw01wYOaY8Ns2YNNv4b5tOkPqSN dJBvyIqinanATCTo2d3VX9BtMSgP3H8dZi5+6dIWPA4STFsoCTuNDT4cf6HjxOj7N+cjkU zmK+NYfg95vjiDgQRe9VQrMSnlQElHQ0zluiQ+QCnJOAVWIMq3t9YB/CXO/UPmmniS+Nlb 80Jby4mrYtZP+FMdMqDSi9r2Q8dTw4eylAgpCslaiFLc8uIaBK31AUT5JqqF3zpI3SRkcg e6eEtX64Lqdvp74Oppn/UB1Qydah1IRDr7i4xW1wbvOWg0J7Cqze4eCKm4zMdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719263775; a=rsa-sha256; cv=none; b=YjAKWr7slIQ+D48mbMl9bJOY+1uJz2gheWofbCWjfJ5fKUgnUPAFqiVGf52/+73csyVCIb qiSnIWaHXtlOyGmkxGsfGIijF//VDHVEUZk4tjAh6k7lYY8iV/OpQgC8fBLVpypb4rau+M WbZuR+dwVymb7vFMP0tDcDsuq31wkCp7ln4r0TO3Ge++78sJFXn1R/bN7BNgzBkPVvXENb kW+fllCXTG0Vj96lKBC8O3pPa2n3+a5T1AG3ZfXrZHkn0PHDp4rgmeQAYbdUcv6Rm/5hi7 7/uZmFlg80anTe5KzECZEJErcj/w9LWhKJIGwngKk/1XNPi0iK5KGfpMuaJNhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719263775; 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=9SHoNvz6qe7Xk4GZNJx4Ur/qrWVKCjW9DeNzGIoSkHQ=; b=cvQiiz+G2+PjuCik0pSJHDcSaAvlcS0aTHfdsrRHJvowFiAnVz4xlvYVSeTKTTyg4gXxt1 0Ks/gFhR2mDgYvds/t6lQpCHEzdog+Xz5n1cv+ylRc/Wm5bTjWFDRRSu/2rA8Y6A080gV7 JlmauQzn8HmWkbxFC9pj6YhnfPbeJbgyGWFniu9Gyomc1y6E03hHGcaiUGCbkHWUqSd5+j 3nrusdUyjkz798Q1skGQXmvRYV/R2q2kyFHXnJ9UNz073h9fYzmIFxvv2kz51Pbr9oZLxw xSltuTNVsJtz5jHVpbTiwnHwplrNaZgEeSlPDCLzcFylBB9RdlpM6/iFUjlFVA== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W7LNt53h2z1GNF; Mon, 24 Jun 2024 21:16:14 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 24 Jun 2024 14:16:12 -0700 From: Gleb Smirnoff To: Justin Hibbits Cc: imp@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c2e9c5bbf022 - main - tpm: Refactor TIS and add a SPI attachment Message-ID: References: <202405032032.443KWhf0045034@gitrepo.freebsd.org> <20240624161128.33c0f518@ralga.knownspace> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240624161128.33c0f518@ralga.knownspace> On Mon, Jun 24, 2024 at 04:11:28PM -0400, Justin Hibbits wrote: J> > sorry for late notice, but we just discovered that after this commit J> > tpm(4) on ACPI no longer attaches. From what I see ther probe method J> > isn't even called. J> J> Hi Gleb, J> J> That's very odd. The probe method hasn't changed, nor has the tpm_acpi J> attachment (still acpi), so I'm really confused why it wouldn't be J> called now. Is there any debugging you can do to further narrow it J> down? I haven't seen any issues reported internally at Juniper on x86 J> hardware. I just verified everything should get built properly. I started adding printfs to the probe method and as said - it is not even called. So I puzzled on where to start the debugging. I can test patches/ideas if you have any. Warner is also looking into this problem. -- Gleb Smirnoff From nobody Mon Jun 24 22:07:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7MXr3wFgz5Pmd3 for ; Mon, 24 Jun 2024 22:08:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7MXq6XJ4z4Cp8 for ; Mon, 24 Jun 2024 22:08:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-63bd10df78dso45346237b3.2 for ; Mon, 24 Jun 2024 15:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1719266890; x=1719871690; 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=2rtIzvvHIHByEHkdwOssBkUBmPFzbM/rgfNbRmtfQmw=; b=b/8CrT1y4/QYZJa6Ln9Wk/xpCaH0pC3gJjoGRH1mcWYhr0Iqh7Mpr4e15TTgVGlkp1 e+7ulJG9t+AsueoQWtd/NHO2CzHuA8REvnrPvs5mdMQsxcT0TyUNVxPtccCM72wBhjt9 O0scofkAagWtFXGjg6b+m0XgnyK8la5hGvGweWL1loMS1tADDSrflTYPZcpi6dyF2mu/ cymngKnxwrEcCyXp+UQAQy25b9s9JHN6aiBxXuR3PcdcTr3TTtV9OfOTmxAAitDQQIvQ vBMWO18gw9SKd2j7YgQ9C+rJU7lgBP9/zC8DXGirXKatNsYm5ie6toacSucpljA2JLn/ ICXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719266890; x=1719871690; 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=2rtIzvvHIHByEHkdwOssBkUBmPFzbM/rgfNbRmtfQmw=; b=WrX6l5NwlRi2DJL9xmcckpFXtAvV3OBNAlqj8/CZpddJM2GoXdZwYnP+HY8gJqRDcD WuRcyMD2LFk18YyEO59LzLHugsndZbhwWn6UbbKSq7SGr/ehAqphLsp/AtZKruUAu9Vt T/KZVzLM5MLJstVMh8wFEhVDHELGH0pkoSS84+R+WpWLYZiffLTUIgnfATfoDnXs1oH7 2hndfRdqXiiJCnvZeD/g0V9d0QXD3/XD6IA9/Kyh2KuZCXhODXNE9NUJzgJ9QvRgnpZG TziMLGl6WVCSTS0yj9YfNWFq84kfQ/sdwGuS2uM8U8O7R7vMl48YiF9/iyNYb5b9HpUJ 7iJw== X-Forwarded-Encrypted: i=1; AJvYcCU8Lbouk8iZ1WlVVc3tnYBPgd4JLZa5x593j3WjwHJOOQl9KwG/VPo8lP7iYsOJHtbh/9c6W0QvdWXFLp1yNCV/qGpB84VHD0ICta8seHIx X-Gm-Message-State: AOJu0YyxWkfEntXpoIU0gg3CWN83SiB19HnjGNONqz/ADmsrHudfZlmA 1JRpZ68g7qfrMm1CUAH3V3Bzujc/Ggno7p/5u16ILAvXMEM9L2zOTVqsti5IGrYzUHHoEIm0U4Y Dmys7AVLD19s80Uzm1f7miGysTC1zIO9Rjt+5n8NEONTuDFHC X-Google-Smtp-Source: AGHT+IGmMwKbFNaN2LD8opf/YxPWkfN4CEjLFo7twUxcWlsnxD1B3d+FHC31fjnYCNY46C8SRJ0gWACU3Ij6q39OyjY= X-Received: by 2002:a0d:e447:0:b0:644:2639:8645 with SMTP id 00721157ae682-6442639865fmr41663837b3.26.1719266890662; Mon, 24 Jun 2024 15:08:10 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202405032032.443KWhf0045034@gitrepo.freebsd.org> <20240624161128.33c0f518@ralga.knownspace> In-Reply-To: From: Warner Losh Date: Mon, 24 Jun 2024 16:07:56 -0600 Message-ID: Subject: Re: git: c2e9c5bbf022 - main - tpm: Refactor TIS and add a SPI attachment To: Gleb Smirnoff Cc: Justin Hibbits , Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000004ae26a061baa041a" 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: 4W7MXq6XJ4z4Cp8 --0000000000004ae26a061baa041a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 24, 2024, 3:16=E2=80=AFPM Gleb Smirnoff w= rote: > On Mon, Jun 24, 2024 at 04:11:28PM -0400, Justin Hibbits wrote: > J> > sorry for late notice, but we just discovered that after this commit > J> > tpm(4) on ACPI no longer attaches. From what I see ther probe metho= d > J> > isn't even called. > J> > J> Hi Gleb, > J> > J> That's very odd. The probe method hasn't changed, nor has the tpm_acp= i > J> attachment (still acpi), so I'm really confused why it wouldn't be > J> called now. Is there any debugging you can do to further narrow it > J> down? I haven't seen any issues reported internally at Juniper on x86 > J> hardware. I just verified everything should get built properly. > > I started adding printfs to the probe method and as said - it is not > even called. So I puzzled on where to start the debugging. I can test > patches/ideas if you have any. > > Warner is also looking into this problem. > I'm looking at name mismatched and/or moved parents to see if that's in play. I thought I'd found something like this earlier, but it was a false alarm I think. Warner > --0000000000004ae26a061baa041a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jun 24, 2024, 3:16=E2=80=AFPM Gleb Smirnoff &l= t;glebius@freebsd.org> wrote:=
On Mon, Jun 24, 2024 at 04:11:28PM= -0400, Justin Hibbits wrote:
J> > sorry for late notice, but we just discovered that after this co= mmit
J> > tpm(4) on ACPI no longer attaches.=C2=A0 From what I see ther pr= obe method
J> > isn't even called.
J>
J> Hi Gleb,
J>
J> That's very odd.=C2=A0 The probe method hasn't changed, nor h= as the tpm_acpi
J> attachment (still acpi), so I'm really confused why it wouldn'= ;t be
J> called now.=C2=A0 Is there any debugging you can do to further narrow= it
J> down?=C2=A0 I haven't seen any issues reported internally at Juni= per on x86
J> hardware.=C2=A0 I just verified everything should get built properly.=

I started adding printfs to the probe method and as said - it is not
even called. So I puzzled on where to start the debugging. I can test
patches/ideas if you have any.

Warner is also looking into this problem.

I'm looking at name mismatched= and/or moved parents to see if that's in play. I thought I'd found= something like this earlier, but it was a false alarm I think.

Warner
--0000000000004ae26a061baa041a-- From nobody Tue Jun 25 02:02:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7SlP4ywKz5Q7T1; Tue, 25 Jun 2024 02:02: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 4W7SlP4SG6z4Y3d; Tue, 25 Jun 2024 02:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719280961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6V5HIRYzeeDyIIhXTF3g9SQMtjE5jA3Fc96/8A5gWfk=; b=LJCkGKbmw6CQcyOTAobJ4+itkjQAUlERfrVcz6AcypS39ctjsu9KCN17FgFBNjFLLFaokq YfgtPTQhp+aiVg9OdEfryg1MlT/OF304DwBuwHrRrWA+WgbVsWFmD5gak2clqxJ/q2uEmF cDojR/mYebeEqyTy5JZFkUhDlx4CkomlVz9a4+z3VTjD65nsdWaRzRFe8zvJ4ZzbTa0uFJ 6fswO/a8ksVLz1jiYshyJV/Itki0tDa/ENrWjAprXqn9ccWBtzjTsCb4TIpg3tq1ZAEv/K zVSXoLr4070VqjEmZGELTgk4ody1NU+5MygG8/l2AlwNlXGsLvpJiQSuXK1Lzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719280961; a=rsa-sha256; cv=none; b=Dj8d5HT5J5cMCKepsyGN5Y4BpXxp9+4zmhlHSL8EWJ1AUQeDHbT4yvFgXGIMGD/V4GGegs Xil80WudanZnq4S3aHFKXWJZG6KdWf8u6sCn8baBJyy1G0fMkvLDXpSLAx9WLpmBX0S3QR 5xj7xEK3uaTznsp2ZtnkTJKskzeIzMRioQKL8XvA1qsXX8eGsr5zuwadO4TuDgjnTLnKT4 Xub2yFNRlQYrWG6rHOCbUb7vBG02rIgFPQRSk1QILQ82Z46gUaZT1aolwSjpYTJJSO9gal 27NANNT9ju2Nl9G3AO5TOYimyKzRm9thZ3nujrU3C7L18/wMBCJ+EOujObqapg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719280961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6V5HIRYzeeDyIIhXTF3g9SQMtjE5jA3Fc96/8A5gWfk=; b=eC8SNJXAO0wwW7PSBgXIG5z9jA/LY6sIEplh8zS49VmD23Y8rGvH/Cir0NXU+ACh3fqoPv Q+B7uMKh8tejKaedfvY0sJshd3KJ0QddrcOfHzRTjE40z2/kpyyvxx2wPnLTy6RUuO5+t1 OhwOPXLkkEfYWbjSmGqunvfUPUwTOPw4+NNuoVgacdhySsqR0viPMM7ZX54HZp7v4JKaNN h9HQQ3lm5yIJwuxQQvskYteouQA1O2lGfrvu/YzfbX4s1rsOX50A1eybUp2CrpbYQOdPwX OEtUHJDFHofdht6TNboYFgfqE/QGjbyhIckSunT1aert2o9+aAIcaNY7uMyVnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7SlP43jZzjbb; Tue, 25 Jun 2024 02:02: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 45P22fEC046733; Tue, 25 Jun 2024 02:02:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P22fw3046730; Tue, 25 Jun 2024 02:02:41 GMT (envelope-from git) Date: Tue, 25 Jun 2024 02:02:41 GMT Message-Id: <202406250202.45P22fw3046730@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: e6b88237c6c3 - main - p9fs: use M_WAITOK where appropriate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e6b88237c6c33fe2f66cad9836858b877900871a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e6b88237c6c33fe2f66cad9836858b877900871a commit e6b88237c6c33fe2f66cad9836858b877900871a Author: Ed Maste AuthorDate: 2024-06-24 20:10:00 +0000 Commit: Ed Maste CommitDate: 2024-06-25 02:02:13 +0000 p9fs: use M_WAITOK where appropriate device_attach routines are allowed to sleep, and this routine already has other M_WAITOK allocations. Reported by: markj Reviewed by: markj Fixes: 1efd69f933b6 ("p9fs: move NULL check immediately after alloc...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45721 --- sys/dev/virtio/p9fs/virtio_p9fs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index 811faff6cd93..aa174d3bd5ba 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -331,12 +331,7 @@ vt9p_attach(device_t dev) /* Initialize the condition variable */ cv_init(&chan->submit_cv, "Conditional variable for submit queue" ); chan->max_nsegs = MAX_SUPPORTED_SGS; - chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_NOWAIT); - if (chan->vt9p_sglist == NULL) { - error = ENOMEM; - P9_DEBUG(ERROR, "%s: Cannot allocate sglist\n", __func__); - goto out; - } + chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_WAITOK); /* Negotiate the features from the host */ virtio_set_feature_desc(dev, virtio_9p_feature_desc); From nobody Tue Jun 25 04:26:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Wx25CRRz5MPms; Tue, 25 Jun 2024 04:26: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 4W7Wx24TTnz4lC9; Tue, 25 Jun 2024 04:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719289574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EznUYjNOk2OGuuTpTTVcO/hK0qz03lxWaPxehfchz+4=; b=MXokjaFZZwfWw2agyWHnB4IgfJ3CwwojWK0zTn6zlwjyQrOvU1lErvtjTEAx9vu67RO+ew 8URRV/0WecuhpMFeh3h5H81pG5XkjJqYR0oHj7MHpjxMoJBtMlWoCzPikQHLRwOluejqSC Po1Mmja/5AliAzd4s8OOr3kZNN8mJbqPiaa6UtDSYwydZ8uxPoA25ATp6gJvl0hgAGyw// bgooSMzNhdDYkiBwkBhA6mdYLr7ljyktUWr/iXmsVYF/fYuBbMsSLvohzFyrM+mtd8TfX4 xX9w7BvRoPh/4v8PDvsZkBHi+PJvsMwYU94KC7atmmekJos1lip9YJnIzMVoWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719289574; a=rsa-sha256; cv=none; b=jDXuFiZy+409KNfBgU7A9cpnpaAvRAUDZXwIbw7h6+lWDFZJbNyrtrKadpOUPX7Ko3oRbI pMOae27xmEmyOONCwTnZvIAgcIggqc3u71SDtxbk6YorrL9AmJizolBvM7+IsXSMY/cXwL iuNCRJwwVcuBXYySHn1uOGNfPpNYzHX+oZjWi7MTqeMi1+2DlUPFIt8Mqrp3T2WMfvyZIe YAusRSGfXEEb4CrS5Jw3LkgimKx+QsnrUsKNoDFYR9Dngs3Qm8ToQ1seqe2/ijRYgqpSUj RiVFinlU2SQx7cQRkOaFMgWXg7Bap3OwTgtEbqxaSIdYZSyPZ+mMWnTV95ArkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719289574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EznUYjNOk2OGuuTpTTVcO/hK0qz03lxWaPxehfchz+4=; b=W63Z5yVEY3pgnj8/lGDIrsudPTuKgkG5Nny/c63A+H69lK1Nj28VFn/QBU+daWH2/jBOCN ehrWNkIAyfd807ObeRQOPvZ59AbwSBNFFIUu5znhmYFaUCSQt6uhAovt6jbXVybx52dHeE 31cdXFHhRp200+7DkpxTrH9XSZ8cejk2zKQoB2CbzigykZZoxYyhya0raL35Vr2PHthXSR hXCS79WZLo6bv99/s8ChQuXCdS6wtSZOipECJeM5ja0PWi731A8sxjOkDORhb9WhgZnOm4 Zeex5U9kp1PKw/m0pQ5bCWNHJXGyY0FhIONf8pl9vK9Nwiz/F7g6DhyKVdjPTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7Wx244y3znTn; Tue, 25 Jun 2024 04:26: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 45P4QEoR087496; Tue, 25 Jun 2024 04:26:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P4QECU087493; Tue, 25 Jun 2024 04:26:14 GMT (envelope-from git) Date: Tue, 25 Jun 2024 04:26:14 GMT Message-Id: <202406250426.45P4QECU087493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ae979c76443b - stable/14 - net80211: Correct 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: ae979c76443bd7c33ed9f22182b4421d2c64b619 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ae979c76443bd7c33ed9f22182b4421d2c64b619 commit ae979c76443bd7c33ed9f22182b4421d2c64b619 Author: Zhenlei Huang AuthorDate: 2024-06-20 04:27:43 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-25 04:25:31 +0000 net80211: Correct a comment MFC after: 3 days (cherry picked from commit 34c98f40f549b3e5692aa5095448ff9135030f99) --- sys/net80211/ieee80211_radiotap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_radiotap.c b/sys/net80211/ieee80211_radiotap.c index 34e27b323fc1..79e00106a780 100644 --- a/sys/net80211/ieee80211_radiotap.c +++ b/sys/net80211/ieee80211_radiotap.c @@ -125,7 +125,7 @@ ieee80211_radiotap_vattach(struct ieee80211vap *vap) void ieee80211_radiotap_vdetach(struct ieee80211vap *vap) { - /* NB: bpfattach is called by ether_ifdetach and claims all taps */ + /* NB: bpfdetach is called by ether_ifdetach and claims all taps */ } static void From nobody Tue Jun 25 04:27:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7WyX5MFmz5MQ2J; Tue, 25 Jun 2024 04:27: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 4W7WyX4cqpz4lQr; Tue, 25 Jun 2024 04:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719289652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JBd7Hk1mmWvFdWlLR7UWLXNBslG+D7OQ9S4KZTWPdrw=; b=ZOseEGJvjrDbhwdqh2Hm1RkU6CjtXLZzAqnZbRk5pW2h0RF1pSlq4tysd0L89ukAXM0U1P Fex97MUB/FXUtSNlVS34lWiA+++VuFWiK/tH4r32kq/jtO6qaCcymwsD3lZw4xYFxTG4pc kNm9ycAtdrygvG7Zss1HVGRSoUFb5wrieYYqtdMUqvFkI4TtAbyiNyaZ4gyYPqgik43od0 7NJgMPiX+L0w6jETkown44WWreAfLxK4SbHVa7RDbgAOmqIKncI6/eV2E+fM/LUYgT212C wzwTXHrXT2/hwa/lpCiDTEXt4JobXHt7/wa3WswkqgboTssedbn1Zeb0hskTxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719289652; a=rsa-sha256; cv=none; b=I3LoYR94HS2NYde4DzTbVSPF8aX6P7ZIZAUcgyw2EsIjv03h+TZF3HcjWjDRjhBzVAABCA f30acuuAyEtMDY9YGWC9ktQP8Vqx07bMpHhDXzmXuGrWgGaMD69AJ5+y5TvmOBufs1ueO1 qdpgViVFSPhHgao3jaNoFaQPPtMmWkFZctMSHtDSDJUQIni/zdLXOJY1kkrKGuNEn/Unnx meHKs8dcffaMB/dDakBPbRmpdfMR+ao3xXLVbBj0MZURml7zP8E2SvVHbF6nkVqcaf0/Ac TxdaADly+mKR1TrxnLhjywUXLW0gqTlWqp8L4yuDRw/MbJbLmmHuNVXAsYtNOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719289652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JBd7Hk1mmWvFdWlLR7UWLXNBslG+D7OQ9S4KZTWPdrw=; b=V/n+Z1PBDIsXmYwdB1UYps4FqjHx23ET4iyXUOlOotXucZsMWWbMcptQk1YAId3+qpuFOr yCvpAGIQxd7LVUB+Wt5vlS4OZtfoC9UEc7opG8deV33SP0LJQSxh/0o0KHNsFswNBjqTz7 EwVii5x7r3GZ7lIQwEtOZ5rfVFyuFng0iwysO/nIkJAXYi50o1FeaBkgWmKNHDgEFFn6yY kQ6R7/kTLTU/enL/maXtnJHn/LXK0cA2K2ssLGLGUENXb4OxAvbEzdjYBsUONe/Wjycuw3 4SMir4uBOZKpwqIVOZod3R2yc4gWPxwuCId8GlBk7Wxe3a6aNCnqa36iA6eX0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7WyX4Cq5zmm4; Tue, 25 Jun 2024 04:27: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 45P4RWhp087885; Tue, 25 Jun 2024 04:27:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P4RWAh087882; Tue, 25 Jun 2024 04:27:32 GMT (envelope-from git) Date: Tue, 25 Jun 2024 04:27:32 GMT Message-Id: <202406250427.45P4RWAh087882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 803bc0f91f28 - stable/13 - net80211: Correct 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 803bc0f91f285dab7fa4557af76cf92db33cd196 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=803bc0f91f285dab7fa4557af76cf92db33cd196 commit 803bc0f91f285dab7fa4557af76cf92db33cd196 Author: Zhenlei Huang AuthorDate: 2024-06-20 04:27:43 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-25 04:27:06 +0000 net80211: Correct a comment MFC after: 3 days (cherry picked from commit 34c98f40f549b3e5692aa5095448ff9135030f99) (cherry picked from commit ae979c76443bd7c33ed9f22182b4421d2c64b619) --- sys/net80211/ieee80211_radiotap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_radiotap.c b/sys/net80211/ieee80211_radiotap.c index 34e27b323fc1..79e00106a780 100644 --- a/sys/net80211/ieee80211_radiotap.c +++ b/sys/net80211/ieee80211_radiotap.c @@ -125,7 +125,7 @@ ieee80211_radiotap_vattach(struct ieee80211vap *vap) void ieee80211_radiotap_vdetach(struct ieee80211vap *vap) { - /* NB: bpfattach is called by ether_ifdetach and claims all taps */ + /* NB: bpfdetach is called by ether_ifdetach and claims all taps */ } static void From nobody Tue Jun 25 05:36:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7YVM434Jz5NmLk; Tue, 25 Jun 2024 05:36: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 4W7YVM2JcHz3wrk; Tue, 25 Jun 2024 05:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719293803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+k/sb9/j+pxVs4oAtlFpUo7BpD56NHQYThEACg6uIjE=; b=JN6NYj70USe94blBoLewvUEMf30TetT8XgDZVveSZR038zC8je119PdMOGXwr2PNwjw/C/ oNpaEwqZsVIfw8njSfBQmmP1M1BDxYOLlXnsDU5bsPm25jTQYwphbRQYP0kDPZteUaIXiI C4dRNq2C7njYommvCppQ6TO9zhk8G8UtfLfR/G6ZWdePbZhDZtiIq+2yCeTgJthRw0rzBL gLdfqcrkX2ixrCH3KfVWp25JUNTVKBO+cdgB3gsxsQegnFfDv3EaLObqGk0+Y/R9THacZ4 JraFb1pDYRj+kjxn4xOD2FEzpSgeeRjYr5M2DYNGmCxiLyZ057houYB/goW3Vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719293803; a=rsa-sha256; cv=none; b=WvtlkWVhvZ03lPp89w5+vOfG5R8zUGSa0SoNZYE4He6H7Xh+VCe7v0xnM1INYr8uD3kgWq +t1+yEy9qLMD5EYvFhw50Y6T03Fqx9L30OPor/rImiQKdE+pMrdqbVC+Ej+4DqPFmE7t+z U0+7sJGioDHm+NkfcirqtMY2SR3kzeXeYxWNkexcP1ftJ3yTm6PEmOqlG5uhcsRbCbIj5T VgYma7wTesK2IC+YWh2FtG/4RWODLbj04tKF8EGCWlqtEc+Kz9ArYW5vAcjSt/xV3T7DAp 9K2QteR1tf0hdq/03OlenR2TAwjySqg4zIr9NCAJ/yL/8T1dc2cl9ZZK4F8+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=1719293803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+k/sb9/j+pxVs4oAtlFpUo7BpD56NHQYThEACg6uIjE=; b=delAJFJdyMwCIol8FgXLJOFTE6MP1iE0qtHuvE5inpclKFhm8W8SFA5RpW0n0IN5zv6KAs nTRDLPBvINjgnL/pxV4EOomGftNSErNtcacLKoTWdXxBmMQckSdDexcC8PBspDGjr2qzRG nKVXpfLcq672yzsPnMjKms/0zgs//QV1UA47ryxeZohCqu5ToqIcgXG35RjBnBjZjuK5hH BPqf/CS+lcjQI7JRBjlnFUW8tp895vQJZNHrICNSp+se86P9+JeNa31Os6KnFCI6k4E3ja 0COw81dA1tTtusHy6sRU20d14K/CFefRIMQTt1xXn9/01MGrb5GNMgGxAg/mmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7YVM1pX1zqBb; Tue, 25 Jun 2024 05:36: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 45P5ahKI006406; Tue, 25 Jun 2024 05:36:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P5ahlr006403; Tue, 25 Jun 2024 05:36:43 GMT (envelope-from git) Date: Tue, 25 Jun 2024 05:36:43 GMT Message-Id: <202406250536.45P5ahlr006403@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: 6a467c783d66 - main - tpm: Fix standalone build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 6a467c783d669854fdfd3fb817f8c9824c4f6fe6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6a467c783d669854fdfd3fb817f8c9824c4f6fe6 commit 6a467c783d669854fdfd3fb817f8c9824c4f6fe6 Author: Warner Losh AuthorDate: 2024-06-25 04:59:10 +0000 Commit: Warner Losh CommitDate: 2024-06-25 05:34:59 +0000 tpm: Fix standalone build We're building ACPI, so we need -DDEV_ACPI on CFLAGS. Nomally, the kernel config brings this in, but there's no kernel directory for the standalone build. Sponsored by: Netflix --- sys/modules/tpm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/modules/tpm/Makefile b/sys/modules/tpm/Makefile index c859e010b2d9..372c2dcad86b 100644 --- a/sys/modules/tpm/Makefile +++ b/sys/modules/tpm/Makefile @@ -23,6 +23,7 @@ SRCS+= acpi_if.h SRCS+= tpm_tis_acpi.c SRCS+= tpm_crb.c SRCS+= tpm_bus.c +CFLAGS+=-DDEV_ACPI .endif .include From nobody Tue Jun 25 05:36:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7YVN3kSSz5NmFZ; Tue, 25 Jun 2024 05:36: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 4W7YVN2n0sz3wk5; Tue, 25 Jun 2024 05:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719293804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SozgpupWF4SaeU4dfgGF5JKpunFhXzZFMeBYDsUu6p0=; b=CUiBdIUk6CDnuYelSgNiIIljM0g0v90N/bG3pOrCgTA5qQspUTddcxGHuXcEQxqwXSEqxi oKrrE8fjKJc+jZ7Bbft5sv/LPKF7vRJcM2hkSy11q6zkTw3xAcFis67BjmiTa3ejL7wf1p k99x6EjTzQFBSjK7Bgf+2KIEjwQQCq2zkw5ceoUmYWAViM3DNXXkCuZANtngp+T7xevUT/ hXvFeyepLKOcTK8DlcfFcphduJUzQCM7jSbXYMurPze2EdmF1orrvwmBbe4nN1a7JS1g/P kmX5ErJhLWUHq7Vj7xOfHHDFJohOADkd1Vc8rsvuoZ8DIHCfKRzqr5cVvf6oiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719293804; a=rsa-sha256; cv=none; b=G3EGrwErE8CY6GW/6wB1AswSAkOjNdYTzzJPqIb9r/b8ntQ4YU+RM2P1aRbFXA43PHYdRZ Mx6ELWNTranO4Zl2UESF6y6JCCLGwYsvgQ6gXUfdiKZEDfC6KXBpLMN+4cwViycPm4TJop AXTE5gpvv8s4i0/AC8BKnWrWYQtPyyAyMsdUDI4Yj/tcYWTq7mT/dxowERK0clshv+Fwwx L1OiR8qsnHoUlgTVnrGTmE31iLH8zq0SjRVIxCTABnbovL9hxc7RpUdBmURmv0VacTiJyk DBhIjVnMHaJ464+Ct17UGPWewp+ApL87wUd9FceABR9tug7lMe67KjyYfLp7og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719293804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SozgpupWF4SaeU4dfgGF5JKpunFhXzZFMeBYDsUu6p0=; b=FsYslOlG297vMkPJc9pUfMWpnMiRiDXDMyaleVIQUhl4vcfq6raN3RWUg40Qq0tiUmleBc 10JgHISNGikEtCk80YvKDbLg6WDE2VnTQgMeF9l2gzlKV7mQbJJsDzj2ifalYw0jsKxQMf tnusAR8Y+B1VSRXvCo3B3x0oTdi5T/MJwoCrICEjs4P4kk1hOpFL09orxHkJJwJSsagBnj 18vC9n8HwTF/UVtSXRA6cd1FzVwf9NIeuoCar+ybu1n8jL3TXATaf1X/5lRypgCyxtHzY3 6uL9F9UH21h30jizjBe+h6eBWnicSwa38RcRyZII7+zmOyAUmfhvPaiImRTgOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7YVN2LS1zqBc; Tue, 25 Jun 2024 05:36: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 45P5airT006445; Tue, 25 Jun 2024 05:36:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P5aiRv006442; Tue, 25 Jun 2024 05:36:44 GMT (envelope-from git) Date: Tue, 25 Jun 2024 05:36:44 GMT Message-Id: <202406250536.45P5aiRv006442@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: bbecd3148abf - main - tpm: Fix acpi attachment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: bbecd3148abf68918b1aa5fc7750dd8ec17fea72 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bbecd3148abf68918b1aa5fc7750dd8ec17fea72 commit bbecd3148abf68918b1aa5fc7750dd8ec17fea72 Author: Warner Losh AuthorDate: 2024-06-25 05:35:30 +0000 Commit: Warner Losh CommitDate: 2024-06-25 05:35:30 +0000 tpm: Fix acpi attachment The third arg of the DRIVER_MODULE arg is the driver to use. We want to use the acpi bus version rather than the generic one. Otherwise, the ACPI specific probe and attach functions aren't used and we don't see the device. Sponsored by: Netflix --- sys/dev/tpm/tpm_tis_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/tpm/tpm_tis_acpi.c b/sys/dev/tpm/tpm_tis_acpi.c index 32c73e5f2483..1d76d4f73266 100644 --- a/sys/dev/tpm/tpm_tis_acpi.c +++ b/sys/dev/tpm/tpm_tis_acpi.c @@ -83,4 +83,4 @@ static device_method_t tpmtis_methods[] = { DEFINE_CLASS_2(tpmtis, tpmtis_acpi_driver, tpmtis_methods, sizeof(struct tpm_sc), tpmtis_driver, tpm_bus_driver); -DRIVER_MODULE(tpmtis, acpi, tpmtis_driver, 0, 0); +DRIVER_MODULE(tpmtis, acpi, tpmtis_acpi_driver, 0, 0); From nobody Tue Jun 25 09:31:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7fjD1D9rz5P9xr; Tue, 25 Jun 2024 09:31: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 4W7fjC6qHPz4Kwl; Tue, 25 Jun 2024 09:31:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooqJAe6H4TJnQmwCffzboHl/iZCZoz2JVqhDHceNAAE=; b=qWxVs+La5/brNVsaG8iNJ+zN8eGAW5Nt42gvUoggQkgTaTy/cQptEU7C6kes8v4Va06lyI mLZrWREfJA570qC4rR/YWo+DhxvKVTAUXaBXVFkyejsM1b9VqYGXCcZJpKhjbHSzBTA1Ve NxX+ioQLqVdT5ccFkv40RlvHkFck6FEyytpEW6eAS64NeDeJf0ifsgyO+1we6HmiSqzmsg 2B9fnkbog7KWGgvITELTYPhMYCyoVjVmBQZFD8kpqV0f5uB1/Na4uVusr8ksn1gXlibRVD osg65t49Zb4h/eAQ/OslJSJqpbbsPnKkjZrcyrubxXeBBvjeG0s6b7A5XshqiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719307888; a=rsa-sha256; cv=none; b=hhmEDyBZDUgu+UmjGj6Ro/FrQO+MaVmUMeGlMLw5SEJq1GtfoGSIzp+1WZZaD+pImV6n54 hhjxVA2u0OMlNx9A1zxLPiIikLY3Akoar1XfXk5ysiaYa8wS1PQSbtdp4BEy+jLouhso1W AeMA2zKby75MOHNHoieJ+2xp7HgQ7kxgBy2p1kRBvbDsG+9BOiWTTkNJ5hOyOW9nMI0ZDR 0JA56ceJpjHXlxFDuCVwujOqpiHIMCvniZV/DDdN81ny7oESc3KHykkmXD/aQ0LnO17tEK PkpVTtNpCCpiBK3JGmB71QKLunnB+JC93bT84jJncmgRFi5KStxQngfny2H/Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ooqJAe6H4TJnQmwCffzboHl/iZCZoz2JVqhDHceNAAE=; b=CCWgh4epiFIdKWoaASeiyhmgAH66o92WM8rxg0LMtvJL0opRxNgewZPRL+RPGyJ+C9cyfB 6hwxNiN9+V5ydpd3D+aywHPSxAxnPXCDS1EjyNN5/bv5nHWgRiqWsSFRVXoP7U/A90qox6 vkAMDN5fPVOPgcPmwCtqWNMm4y/zNTdCME51d0/5J5+J/Cshxbr3b+NlfaEhFBvrtc8cxf MUUQS5NqCIxRyBk9Mv6I1ZBvAFF7J0U9Idfyb1fj5fJYyJw1r8BhnsshNs/MCpFfvLwckJ kfq4QqW9buOEnhnOq7Gv1aNw1RG9YZRnBK2FzsaUSMWL32WNeZt++rjDYaUFPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7fjC6QmQzvrf; Tue, 25 Jun 2024 09:31: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 45P9VRtW006911; Tue, 25 Jun 2024 09:31:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9VRii006908; Tue, 25 Jun 2024 09:31:27 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:31:27 GMT Message-Id: <202406250931.45P9VRii006908@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: 915161b3d35e - main - hwpmc/arm64: fix the type for pm_arm64_evsel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 915161b3d35ed5a742e3a8d90d215a2d930dd199 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=915161b3d35ed5a742e3a8d90d215a2d930dd199 commit 915161b3d35ed5a742e3a8d90d215a2d930dd199 Author: Andrew Turner AuthorDate: 2024-06-25 08:41:37 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:07:19 +0000 hwpmc/arm64: fix the type for pm_arm64_evsel It holds a 64-bit register, use a uint64_t. Reviewed by: mhorne Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45526 --- sys/dev/hwpmc/hwpmc_arm64.c | 7 ++++--- sys/dev/hwpmc/hwpmc_arm64.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index af8d25b098c4..4b2fd5cc746f 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -163,7 +163,7 @@ static int arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { - uint32_t config; + uint64_t config; enum pmc_event pe; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -201,7 +201,8 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, } pm->pm_md.pm_arm64.pm_arm64_evsel = config; - PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%lx", ri, + config); return (0); } @@ -299,7 +300,7 @@ arm64_config_pmc(int cpu, int ri, struct pmc *pm) static int arm64_start_pmc(int cpu, int ri, struct pmc *pm) { - uint32_t config; + uint64_t config; config = pm->pm_md.pm_arm64.pm_arm64_evsel; diff --git a/sys/dev/hwpmc/hwpmc_arm64.h b/sys/dev/hwpmc/hwpmc_arm64.h index e1f605a0371b..97909d8e7c92 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.h +++ b/sys/dev/hwpmc/hwpmc_arm64.h @@ -42,7 +42,7 @@ #ifdef _KERNEL /* MD extension for 'struct pmc' */ struct pmc_md_arm64_pmc { - uint32_t pm_arm64_evsel; + uint64_t pm_arm64_evsel; }; #endif /* _KERNEL */ #endif /* _DEV_HWPMC_ARMV8_H_ */ From nobody Tue Jun 25 09:31:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7fjF3F16z5P9gb; Tue, 25 Jun 2024 09:31: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 4W7fjF0hmsz4KvB; Tue, 25 Jun 2024 09:31:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XNz0Am3oN7sMznN8dakPKx+NS60Ed/yf9UCH3P65dFY=; b=cAhp6WGu/IE9ZxCwyhugDQnqRRyqGawjJRrxemCE9bdzPhCiBzKdRYYxQx8xX1XEJL8EWC VMTwStD+CiBfrahyF7b6vEo6YpuHnbUchhUcg6JxlGAQM2BLSKP9E3wBH8RFwa4HGido6X fJNfgkeFjfvRLzofqYcKp4tY8ljWMxqJV/mA1wd5CVG82hK9ylJcT3J3Lw3/2eyf0E2KEf qhhFfXJXJtdDbOLh2BwaoyBA5z3a1y43actPVFqp3P/JRT22gbLuM9kZsaaYHvnx8hmM/2 8wbIl3D/mJ+id80cvrXRT1jK7JDPoeGqC4Ws/HQY36EU+6a9h+m9Mt1UVXVlqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719307889; a=rsa-sha256; cv=none; b=lmKw5arB+vYiewezZqJcwft0RSScrzFMvc4Cb333zxYvLZwH08sbPR3PwFCRMX9VyjbmZb Z/jVYUU7ydpsG/aQwfb9zTmFF2aTsA40niX/GNdRUOb0B9/r54gIJVeSrC4VUQ3EalpWri 3IPTtkm838WjnrhKyyGzC2vI8HW8Erwr4A0touWO23QgHqVkTN2maOxBidwZyDlbD4+ZUa RdXPBgJmtINA664NBG3SMpH9hdzo3QZJ+yyQ7fbIc4eaKzqbuFghd5P8dNzMh8PI31fVkp Jr7scXy3IZhEsPhA2EoeX4aIZCPFg+P13iClBaDmE3FOAi91mPT077Fb9/Om1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XNz0Am3oN7sMznN8dakPKx+NS60Ed/yf9UCH3P65dFY=; b=wX8Pn91jbV0GCaONkD1t/m/iKQyBrz1mUIbiV57XT/p4D8F3sRxF2tSRJYlIn3EtPc4EsS A5mgok4T0wnGKYkEyX+vK3KPtVFj7trw7K2UvClRahBt46Vkc2U5tcEaurTm6odo0ZqXmJ s33dUJ1ItAN4oZlf5ixsrs+vsBF/zUB4Z6keWs9lCDiKigLm5MnqoXtMsAYDfK224F6tCv gnfbOqgBc/Mwb1Xw+9W+mTu+JWY6Z54I1x7QKA30k8Y/f2ho9eEqR+cSAAxhqon1iQ2BrV 9MKmgvh659J2LKqZh5Qavt2VmcFrpWEqFfjuSjBM/qR6wY4q1/rKxe8GH2ML4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7fjF0KChzwsB; Tue, 25 Jun 2024 09:31: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 45P9VSne006960; Tue, 25 Jun 2024 09:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9VSge006957; Tue, 25 Jun 2024 09:31:28 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:31:28 GMT Message-Id: <202406250931.45P9VSge006957@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: c36fa8d5022d - main - hwpmc/arm64: Support the kernel booting to VHE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c36fa8d5022db8b4cca01b391d9d82f26c632234 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c36fa8d5022db8b4cca01b391d9d82f26c632234 commit c36fa8d5022db8b4cca01b391d9d82f26c632234 Author: Andrew Turner AuthorDate: 2024-06-25 08:41:50 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:07:19 +0000 hwpmc/arm64: Support the kernel booting to VHE When booting to VHE we need to handle using the PMU at either EL1 or EL2. WE already support EL1 so add support for EL2. Reviewed by: mhorne Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45527 --- sys/dev/hwpmc/hwpmc_arm64.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 4b2fd5cc746f..5d221c738c2f 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -34,6 +34,7 @@ #include #include +#include #include "opt_acpi.h" @@ -186,10 +187,18 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, switch (a->pm_caps & (PMC_CAP_SYSTEM | PMC_CAP_USER)) { case PMC_CAP_SYSTEM: + /* Exclude EL0 */ config |= PMEVTYPER_U; + if (in_vhe()) { + /* If in VHE we need to include EL2 and exclude EL1 */ + config |= PMEVTYPER_NSH | PMEVTYPER_P; + } break; case PMC_CAP_USER: + /* Exclude EL1 */ config |= PMEVTYPER_P; + /* Exclude EL2 */ + config &= ~PMEVTYPER_NSH; break; default: /* @@ -197,6 +206,10 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, * (default setting) or if both flags are specified * (user explicitly requested both qualifiers). */ + if (in_vhe()) { + /* If in VHE we need to include EL2 */ + config |= PMEVTYPER_NSH; + } break; } From nobody Tue Jun 25 09:31:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7fjG5611z5P9y0; Tue, 25 Jun 2024 09:31: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 4W7fjG1h8Yz4KvW; Tue, 25 Jun 2024 09:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/Uqi29phBSWMz9HytfK0mBENEY7qPL9wODqN0KZk9c=; b=oU4WNLWCoXrTBvLEfEr5rYSZRo6jvQZYD2JGZi5syWeBF44KYuHCFSQPXBeICfppljX4DP 94UkSyVdqH18ywWN4D07xLmK3SXnNzDLN7pvnU/92UM7dlSgK2uPWqp3Yv+jMAsdf+B8LM sJ/G+Wh80FoxQ23GVBIv6E6eKBkjtaAqLADUN/DAf+naj+DPMrkcSSP+oilSlnxcoW4TYB 7aDfkyWLbUIQuhsM7tAM1mLluI5RDeEnJYrfqn9pXOhUxQZ8o2ah79b3EvXju6MugnPWOz u2HgxNctIedztqPOGLUbeg6qzNLQGProxIM5ITlKe4tBFi45afrNSipLdBX/1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719307890; a=rsa-sha256; cv=none; b=khe/Q3QQWGqK/8WSo8b4jA3kESu9Ijulw0857SRItQFghg6vI/lLeXCZALFYAhTZx0gGHN NUmtgNc9lmn5AA1VsyPMIK3EA2Bn8YVaE+phiNqZr5NFxfH9ZKsdpZSH6EMRc5sceK+/Q+ OwXVcniSTKyCwUkLRIshIqu+SDlV//SJSQRj++wElG3YWjnTMmeNRWvgsOo774R6kdqWvU 7wkf4zBlnD67AtItJaGM+Ozw4GbSb5/LnZveP3/NHScqstgn3iF9UIiZrRzwzUKj+Sz4Po O7oVTvJbWqcDzepD+lktnkXQf0OJNasJFiMXQvK+Lr/4EqMQYTjuG1Mo+KJCSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/Uqi29phBSWMz9HytfK0mBENEY7qPL9wODqN0KZk9c=; b=ilNfIKtj/sjauuRtwvZ215Mv9/ZfonbQDFglgSZOX9sq9ub+M0RuLbtHmtIalicSJ/WWMu NRgwt2mxLgQbtfiMb2kyLuBxOZkBMEbEI1OudI/CaAr3NKlxmin2iFVqmSZ5xy4YiNFdSd aralUnrQdCxvKR14u2vIpyGiXPiP8qcUk5wH6souFoJd4S87SwKH7hK9KMofxu8sAH/kdO YXCKvs/pMBFDph9HS8G/BbZGhkVmFoW6rlNYdryBZAjijxVclJM3jKj7lNMLeTADIsz49j 5fPPJ8GVarCdc3E/Kt8p3Z0yB1GB7i+TPUejAkEAb/69UtVZJkd0tSMKDa1yaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7fjG1HhpzwsC; Tue, 25 Jun 2024 09:31: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 45P9VUbE007010; Tue, 25 Jun 2024 09:31:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9VUgE007007; Tue, 25 Jun 2024 09:31:30 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:31:30 GMT Message-Id: <202406250931.45P9VUgE007007@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: 0cdd0032a769 - main - arm64/vmm: Fix the SPAN check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0cdd0032a769a727b0e41298e388853ff59007e8 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0cdd0032a769a727b0e41298e388853ff59007e8 commit 0cdd0032a769a727b0e41298e388853ff59007e8 Author: Andrew Turner AuthorDate: 2024-06-25 08:41:57 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:07:19 +0000 arm64/vmm: Fix the SPAN check When raising an exception we may need to set the SPSR_EL1.PAN field. The check for this was incorrect meaning it would be set when it shouldn't be. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45717 --- sys/arm64/vmm/vmm_arm64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 1b61871014a7..e5eee47b405b 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -1108,7 +1108,7 @@ vmmops_run(void *vcpui, register_t pc, pmap_t pmap, struct vm_eventinfo *evinfo) * Update fields that may change on exeption entry * based on how sctlr_el1 is configured. */ - if ((hypctx->sctlr_el1 & SCTLR_SPAN) != 0) + if ((hypctx->sctlr_el1 & SCTLR_SPAN) == 0) hypctx->tf.tf_spsr |= PSR_PAN; if ((hypctx->sctlr_el1 & SCTLR_DSSBS) == 0) hypctx->tf.tf_spsr &= ~PSR_SSBS; From nobody Tue Jun 25 09:31:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7fjH6fXpz5PB5S; Tue, 25 Jun 2024 09:31: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 4W7fjH34xFz4L4m; Tue, 25 Jun 2024 09:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9uY/mV0gARTqQ1yO196wj+paQ1CObAq/In0IIweNtaw=; b=IO6/Aymjt0T/trVa0h7I44VD+PfBxO/rWfiJwWyif06C6ULdJfv3p9PgNMDjdtS2kcec2B EY0XXFVZSTYsD93HCHyjmkZav8MyFGoW0CIivCPT5KXaM/0UGu3yp+Ek4Oq5ALGqWA/Wol 0TVVzOkYOcSzA4XRHwblQH08BZ7TnwpNSbOy4Lbvm5DDtdJnveHdCfthD8bw4f8akmZWgo ENPUJZIJanSTyikA2OA9af+LxLIfSVvBKnvYvd4hiH2466cF+8Fcblra+nx1Q0RQaiKBRp 4s0L40an6Ca65qVJ49WGTPpAmMl69TohLKWdMj0Xo87n7IzBZCKSUWJ5TAmdGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719307891; a=rsa-sha256; cv=none; b=Ln11Vn7llA9RM0FFIaTuRHleFbOxsFomXizd1v3HJwofJKQzSgiULOtxyq4WIUGXmDCfjU VmfWemmRmVHgIz33EgT3y1RiI/W/8I/uM2md3MKqMKDlfHziGYTNBb3L3nM5mt6f26oOOo 9rzruKMX/3lGyg8o//vGr5AJHj3rX7o5d++wJB9HqH4Munm0gLmNddxr5BJPV/wAZrapJf iVxHq0J8Ln99mHizI+9c+wugBh2LQ8jcRegcurT3BvG9eFI+cBt1Q3hHkTwgZN6Uky7emh wVUeYnnAmzUxgNJMJKHVgCZmWrw/P/ilDDyoJawA7g8XeOVk8ZZbZeGr2TYH1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9uY/mV0gARTqQ1yO196wj+paQ1CObAq/In0IIweNtaw=; b=yqv9yK1VdJO1AKSbzCYgAT9noMDw1u3sR9HwrfNDQr0oOb0ei+vUJRN5YI6gGH3ItZyOhj ho1ZAndp1u8jmP6TF/bBBNanvXcWYsj/xgXr26trDWniSLaBXpoAHe0PwLY1CI/wpPwDiV dLTHpwH+WrzCSpBK4U2bdg4El/G3VjP8WNUvAOOCWC4Izihv0T5R/JMzEVca0UeYa+VzUz UXjn2siM13Uv9s1/r3/0grnkgTDzzGi/uhbe955t3BBm/w589Pu5gqPyd+Rj0sqbAJIfwI DsgafnPXD/Z0M8b/XwNT1/QfHnFCXYHTMsJ9D6vIb4OpOuGRGUnLPdlcTySfiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7fjH2Jttzx3j; Tue, 25 Jun 2024 09:31: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 45P9VVU4007058; Tue, 25 Jun 2024 09:31:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9VVIL007055; Tue, 25 Jun 2024 09:31:31 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:31:31 GMT Message-Id: <202406250931.45P9VVIL007055@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: 940cf92c0786 - main - WIP: Switch to compiler-rt sync on armv7 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 940cf92c07867bcfb1cd5648cffc5df25fd0b92a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=940cf92c07867bcfb1cd5648cffc5df25fd0b92a commit 940cf92c07867bcfb1cd5648cffc5df25fd0b92a Author: Andrew Turner AuthorDate: 2024-06-24 08:11:27 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:07:19 +0000 WIP: Switch to compiler-rt sync on armv7 --- lib/libcompiler_rt/Makefile.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index bdb6b93e6fda..7b4de36f87e2 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -270,6 +270,13 @@ SRCF+= truncsfbf2 SRCF+= stdatomic CFLAGS+= -DEMIT_SYNC_ATOMICS + +#.for op in add and max min nand or sub umax umin xor +#. for size in 4 8 +#SRCF+= sync_fetch_and_${op}_${size} +#. endfor +#.endfor + .endif .for file in ${SRCF} From nobody Tue Jun 25 09:31:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7fjK0XWBz5PB1Z; Tue, 25 Jun 2024 09:31: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 4W7fjJ3v6Wz4L0Y; Tue, 25 Jun 2024 09:31:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+MLA6U3Og8aZLWsyf5TewfrF9AeRndQHs13umxXHxs=; b=woLS8fykPQNuidP3yXRJXrueYbwkTmISgQ1S8h9T4vcknW5PSt/wHZNyZEDFv/DeP+mz6x u3NwBPv/hqdR/+7irdGhgrFCMrg/34tH5fbZAoaV5CkI/CH2hs0EiF911jX0Mf/zj5iIMQ j92Ssl5jAinUIYp/3/bychrzrvfrNZbVA5QVgDRrCOBFjcc8w3CnVGTYNcI4empdNerNc5 /XiVCZDk6EKQVFoiCdTPKMhW2XX9Q7XATxMc4wCyx8JWtDVASHKVSPFECCHejyj+1XZQa2 fJRI1dugSFvH7qlSTbb4SwveAp1bUPCVyZNfsIG4nOP2kEZRmweTutVuHMFFTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719307892; a=rsa-sha256; cv=none; b=I3Th//B/VDDgPxPpykgKyqs80yyFY37dArYU4XTTZ9bi4Yd3vUxuNcqUssz9kMEmZg80/x d/Fi9OMEKp2vakYeoLpb/LKUaua12vYOVdQouAoY1pQhQlqtPsEwvHcU892CDDEumpDWxZ JGEu86X1wTGhMkf/J24UNZaD6DdXb4KRs85HhUIlyqUfdjIqBlD2P1cIGf3dqKjsoy7//G Oqd+bAVZmyJCMzEf80P0KT6Npid8283XuJJzHU8PTI2e/XoTkWa5HCgE7ebF48xiDbOO6O SsaUl54/Aba6QsRqj30Yn/UQojXtcSY7BwVmnlzAmja7i/5k30SQ/1vx+Dmrwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+MLA6U3Og8aZLWsyf5TewfrF9AeRndQHs13umxXHxs=; b=nPGTCWxXYR3rtF7leXxZ1odouuKuaKSKMqw9oU1sqWcEwDk/JJ0+TWs3R8B63TnigvLf8b B2Xfmsog1RXxI4PoRjLgs7ar4f3x4CNPvdtgvHISwqkhlKtc4Ea70a+OWDCBCY+IoCYWwh zzOx/JXvsOiwWf0Xt+KtLfO78WjVNb9o5T9EmXvyBsQdXyK7C9YmKOfqZT37Bd8sxDUXP2 Ovbl8FNuq4PpJV8QiJsl1sn4UxHcEubyRRtsmW5idGIEzdgsnlIG7CjDCL7TT3LaG6tIcG qF4xk7bCkOKjju20DN177cU9yH1EBii2dLUIZuRbr5bwj5hVj7D4DQ3Qgoa7IQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7fjJ3KgHzx3k; Tue, 25 Jun 2024 09:31: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 45P9VWCd007115; Tue, 25 Jun 2024 09:31:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9VW7R007112; Tue, 25 Jun 2024 09:31:32 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:31:32 GMT Message-Id: <202406250931.45P9VW7R007112@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: 3d02fe6c59dc - main - arm: Start to remove the now unneeded acle-compat.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3d02fe6c59dc87b265f268233cd574f7f04edb5d Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3d02fe6c59dc87b265f268233cd574f7f04edb5d commit 3d02fe6c59dc87b265f268233cd574f7f04edb5d Author: Andrew Turner AuthorDate: 2024-06-25 08:59:42 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:07:19 +0000 arm: Start to remove the now unneeded acle-compat.h All supported compilers provide the acle macros so we don't need the backup versions. Sponsored by: Arm Ltd --- sys/arm/include/acle-compat.h | 158 +----------------------------------------- 1 file changed, 3 insertions(+), 155 deletions(-) diff --git a/sys/arm/include/acle-compat.h b/sys/arm/include/acle-compat.h index 0d5726b7846c..75e7e3774491 100644 --- a/sys/arm/include/acle-compat.h +++ b/sys/arm/include/acle-compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 ARM Ltd + * Copyright (c) 2024 Arm Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,157 +27,5 @@ */ #ifndef __ARM_ARCH - -/* ACLE standardises a set of pre-defines that describe the ARM architecture. - These were mostly implemented in GCC around GCC-4.8; older versions - have no, or only partial support. To provide a level of backwards - compatibility we try to work out what the definitions should be, given - the older pre-defines that GCC did produce. This isn't complete, but - it should be enough for use by routines that depend on this header. */ - -/* No need to handle ARMv8, GCC had ACLE support before that. */ - -#define __ARM_ACLE 101 - -# ifdef __ARM_ARCH_7__ -/* The common subset of ARMv7 in all profiles. */ -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_LDREX 7 -# define __ARM_FEATURE_UNALIGNED -# endif - -# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_ARCH_ISA_ARM -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 15 -# define __ARM_FEATURE_UNALIGNED -# ifdef __ARM_ARCH_7A__ -# define __ARM_ARCH_PROFILE 'A' -# else -# define __ARM_ARCH_PROFILE 'R' -# endif -# endif - -# ifdef __ARM_ARCH_7EM__ -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 7 -# define __ARM_FEATURE_UNALIGNED -# define __ARM_ARCH_PROFILE 'M' -# endif - -# ifdef __ARM_ARCH_7M__ -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 7 -# define __ARM_FEATURE_UNALIGNED -# define __ARM_ARCH_PROFILE 'M' -# endif - -# ifdef __ARM_ARCH_6T2__ -# define __ARM_ARCH 6 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_ARCH_ISA_ARM -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 4 -# define __ARM_FEATURE_UNALIGNED -# endif - -# ifdef __ARM_ARCH_6M__ -# define __ARM_ARCH 6 -# define __ARM_ARCH_ISA_THUMB 1 -# define __ARM_ARCH_PROFILE 'M' -# endif - -# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \ - || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \ - || defined (__ARM_ARCH_6ZK__) -# define __ARM_ARCH 6 -# define __ARM_ARCH_ISA_THUMB 1 -# define __ARM_ARCH_ISA_ARM -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_UNALIGNED -# ifndef __thumb__ -# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) -# define __ARM_FEATURE_LDREX 15 -# else -# define __ARM_FEATURE_LDREX 4 -# endif -# endif -# endif - -# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__) -# define __ARM_ARCH 5 -# define __ARM_ARCH_ISA_ARM -# ifdef __ARM_ARCH_5TE__ -# define __ARM_ARCH_ISA_THUMB 1 -# endif -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_DSP -# endif - -# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__) -# define __ARM_ARCH 5 -# define __ARM_ARCH_ISA_ARM -# ifdef __ARM_ARCH_5TE__ -# define __ARM_ARCH_ISA_THUMB 1 -# endif -# define __ARM_FEATURE_CLZ -# endif - -# ifdef __ARM_ARCH_4T__ -# define __ARM_ARCH 4 -# define __ARM_ARCH_ISA_ARM -# define __ARM_ARCH_ISA_THUMB 1 -# endif - -# ifdef __ARM_ARCH_4__ -# define __ARM_ARCH 4 -# define __ARM_ARCH_ISA_ARM -# endif - -# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__) -# define __ARM_ARCH 3 -# define __ARM_ARCH_ISA_ARM -# endif - -# ifdef __ARM_ARCH_2__ -# define __ARM_ARCH 2 -# define __ARM_ARCH_ISA_ARM -# endif - -# ifdef __ARMEB__ -# define __ARM_BIG_ENDIAN -# endif - -/* If we still don't know what the target architecture is, then we're - probably not using GCC. */ -# ifndef __ARM_ARCH -# error Unable to determine architecture version. -# endif - -#endif /* __ARM_ARCH */ +#error You compiler is too old +#endif From nobody Tue Jun 25 09:37:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7frh02fTz5PBdp; Tue, 25 Jun 2024 09:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7frg6b2Hz4N6Q; Tue, 25 Jun 2024 09:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719308275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzw4YyWl+Yn2d4cl9FBmyZSM03ChMwOOhXP5LqQ4mC8=; b=uWbNytTFsjPxxlh4HhwzBhtSG2AgviIvCti+QgmbCpSyFeY4RQ+xhDeoN//y82LFDTU8yV alu84Wj4LzTzK1ede8mh0c8xDlJXxSN/VTFbfwq10hmQy1g2ROzMe7IZ5mCGLQAQKTydTi Tu5qEZKGfT3zNQAAZcFtgow1GsXU6v48VWpz0X1Iy4U49/WLQyc1MFJt+uKzRsBSPI/Ssj rUbixvyESVtPID1gUL55KaZa3MqMK984EpxQ5X7toOD03khafkuZ2bqIV18S3KXozMVuRB sySPg9t1m5aqkhlQ/G9k3J73RAr5H1QsN0Jy7q1xZVg371dF8xX88MHf4Vp+Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719308275; a=rsa-sha256; cv=none; b=CaV2LgW0+2p555fsx50K1tXYQ6aNRUFmCHijRK3l+6/J/56IB775JDZBnX97FL2DPSlOyP 4dblr6to1LtOPQQ6+aMhBKkof6gOgyyvnm+EI7UnFs0Pkzcg0/Di38ZmBL/LO/Nok5bU0E mb3wOpauKnKDx/G0jMZQWvkqcuMTTqaiy5x6FAKDt4WDH1eHLjQPJ/bUzOJxR1SAkpCXUb M3hTFNkrVdNTo17xyalSomRblBEpV+KNDxbS0Q8H38tFvbymMUTOAjIxy3/jvqMADGdmZ2 UCpzK9cS4EaFh4WqlWK+ckB4gBTjmcQbaRrp7hzCMFsoPiHVJb6S5MCRFly6Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719308275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzw4YyWl+Yn2d4cl9FBmyZSM03ChMwOOhXP5LqQ4mC8=; b=ghHTatbDySvoJK0156P4UbV/f22OaJbbcuQPI4K3vMmH2ax36wz7emexQXYPt02mt6qyyn Wajcn6y1SCmjbUDI/Lx9BHwJw6r7UGw0kgvIr1kdsJAta6TDp6hZ/Xfh4ytQwZkTCozfod pu3Lqh8kX7c4ouPYZOjSWPh3utdlU2Xcry/8BOq+4sIynbp3FVqGVEZ916PZsDcmmn4hxY ah82LcQpomWEL0vPym/f9U/v+llT+QZEPNwBwfetPZRjoSJJyfDyznrjLCAqX7ldxVcDAs TT9Zgv0EErCikZX7g0kc1HV0KQo1//NHSOtjppXm+C3CAdirvsxMRQOIG9+Vkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7frg6BfGzwsV; Tue, 25 Jun 2024 09:37: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 45P9btRp012802; Tue, 25 Jun 2024 09:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9btW3012799; Tue, 25 Jun 2024 09:37:55 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:37:55 GMT Message-Id: <202406250937.45P9btW3012799@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: 36e0db4916c5 - main - Revert "arm: Start to remove the now unneeded acle-compat.h" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 36e0db4916c5957dbea4e8451b15bd7b846ed272 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=36e0db4916c5957dbea4e8451b15bd7b846ed272 commit 36e0db4916c5957dbea4e8451b15bd7b846ed272 Author: Andrew Turner AuthorDate: 2024-06-25 09:37:14 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:37:14 +0000 Revert "arm: Start to remove the now unneeded acle-compat.h" This reverts commit 3d02fe6c59dc87b265f268233cd574f7f04edb5d. This wasn't ready to be committed --- sys/arm/include/acle-compat.h | 158 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 155 insertions(+), 3 deletions(-) diff --git a/sys/arm/include/acle-compat.h b/sys/arm/include/acle-compat.h index 75e7e3774491..0d5726b7846c 100644 --- a/sys/arm/include/acle-compat.h +++ b/sys/arm/include/acle-compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Arm Ltd + * Copyright (c) 2014 ARM Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,5 +27,157 @@ */ #ifndef __ARM_ARCH -#error You compiler is too old -#endif + +/* ACLE standardises a set of pre-defines that describe the ARM architecture. + These were mostly implemented in GCC around GCC-4.8; older versions + have no, or only partial support. To provide a level of backwards + compatibility we try to work out what the definitions should be, given + the older pre-defines that GCC did produce. This isn't complete, but + it should be enough for use by routines that depend on this header. */ + +/* No need to handle ARMv8, GCC had ACLE support before that. */ + +#define __ARM_ACLE 101 + +# ifdef __ARM_ARCH_7__ +/* The common subset of ARMv7 in all profiles. */ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# endif + +# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 15 +# define __ARM_FEATURE_UNALIGNED +# ifdef __ARM_ARCH_7A__ +# define __ARM_ARCH_PROFILE 'A' +# else +# define __ARM_ARCH_PROFILE 'R' +# endif +# endif + +# ifdef __ARM_ARCH_7EM__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_7M__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_6T2__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 4 +# define __ARM_FEATURE_UNALIGNED +# endif + +# ifdef __ARM_ARCH_6M__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_PROFILE 'M' +# endif + +# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \ + || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \ + || defined (__ARM_ARCH_6ZK__) +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_UNALIGNED +# ifndef __thumb__ +# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) +# define __ARM_FEATURE_LDREX 15 +# else +# define __ARM_FEATURE_LDREX 4 +# endif +# endif +# endif + +# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_DSP +# endif + +# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# endif + +# ifdef __ARM_ARCH_4T__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# define __ARM_ARCH_ISA_THUMB 1 +# endif + +# ifdef __ARM_ARCH_4__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# endif + +# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__) +# define __ARM_ARCH 3 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARM_ARCH_2__ +# define __ARM_ARCH 2 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARMEB__ +# define __ARM_BIG_ENDIAN +# endif + +/* If we still don't know what the target architecture is, then we're + probably not using GCC. */ +# ifndef __ARM_ARCH +# error Unable to determine architecture version. +# endif + +#endif /* __ARM_ARCH */ From nobody Tue Jun 25 09:37:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7frj1szdz5PBdq; Tue, 25 Jun 2024 09:37: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 4W7frj0M3Sz4N41; Tue, 25 Jun 2024 09:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719308277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUaPvVqiX8AwQp6/44zpcCs6hiXaZMDbUl7vtQq7oBk=; b=oijx4qMhmOovugtX5olCCoHUFH8yJZtjoc81f/5ggX3kDuhvUbLgkRZDZczOY1998PDSYi v8DViga0v4hWvQ8JdbXDYYhMRJYNW+a8G2YVPNM/q/gwGZol8gWeP1dq4Q8G6YIJxxVYxd tfExuUVHdzYIr3i1Ysb8a6j1MI2U5Bnst0mIGgjpmSjuNeLy58UkwswQY/Zd9nUrI912aP dYbILQArtUGs2lArVNlHcyt37bZHs5p/NQaP0SU8XK18cLcmUZNjH7xe5XWH95YXL3jg0V MRVf2pOn1ABBe/BTtXR0kFyrVEKtvryPMF9F6hpEi039KKUxmzo1lG4svv559w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719308277; a=rsa-sha256; cv=none; b=GI8W0+uo+aj5xCpLr/goPBDrRuNhpZeMD19j0xb00wxIvv9V7rHzxwb/tqgSPMq09db7uE siAjZWJ6GCD1Q+6qg6t2a1dIBJDStt8QqHzICFzt+Jacgs5nIQ9CjKfuRCp/S586mT3n1Z oSXAWeK29CbsPJOlVC+0Lnt3fVsx/qEuQcQAEM4LbsyazMeQrzo0Zk03ZxUXauWbAI6+BN Pbwuei5Aqh4+d50G3M9Nm9GdG3h51GwlqPO831PHU55fm+8LZz4rfbr5SI52/8ksbR+eoZ FnHcTmU0q5CG6HbZ4upYvyWFbub1D2ZTqQ6yu15kS/hvT1lckMvzGPWPcBe+PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719308277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUaPvVqiX8AwQp6/44zpcCs6hiXaZMDbUl7vtQq7oBk=; b=ZIJYvMY0LOvxhG/ep9ukwGAKMRRl3cP4LK7LwtTKPW86WtJT3q8BpMr7UGw8MGnDaJwfMN 9B8sRK7iEMr+lB6lHYdfk1UIxxdjgfM+byR2hbamRXdGzcDwPZrn3+GZng3vmkYzK+uJx/ AjcRRUK67Yu+Oxrc+rRPRHEZBSRNEAfJ3wFnZYBD/yx7Zy2clZHP1eKsF923v+hz7lVfQb EDF1BkYi49XcqYilxfU977dAaWGA0x3tSxQefMV9+uzLN7Mw5AM2hq/VicMdtxQVdvgt1p z+mzo+0lhqVwIWyOSZjfNmVoLiIE3utLsTqGq6WbrcQdllIRGQdA3b1JU0PDvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7frh74LYzwTX; Tue, 25 Jun 2024 09:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45P9bupb012859; Tue, 25 Jun 2024 09:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9bumh012856; Tue, 25 Jun 2024 09:37:56 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:37:56 GMT Message-Id: <202406250937.45P9bumh012856@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: 8521ea135f5b - main - Revert "WIP: Switch to compiler-rt sync on armv7" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 8521ea135f5b1a24c2ce631777d4e497d43d0278 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8521ea135f5b1a24c2ce631777d4e497d43d0278 commit 8521ea135f5b1a24c2ce631777d4e497d43d0278 Author: Andrew Turner AuthorDate: 2024-06-25 09:37:38 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:37:38 +0000 Revert "WIP: Switch to compiler-rt sync on armv7" This reverts commit 940cf92c07867bcfb1cd5648cffc5df25fd0b92a. This wasn't ready to be committed --- lib/libcompiler_rt/Makefile.inc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 7b4de36f87e2..bdb6b93e6fda 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -270,13 +270,6 @@ SRCF+= truncsfbf2 SRCF+= stdatomic CFLAGS+= -DEMIT_SYNC_ATOMICS - -#.for op in add and max min nand or sub umax umin xor -#. for size in 4 8 -#SRCF+= sync_fetch_and_${op}_${size} -#. endfor -#.endfor - .endif .for file in ${SRCF} From nobody Tue Jun 25 11:32:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7jNd1zPlz5PNJ2; Tue, 25 Jun 2024 11:32: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 4W7jNd1J9Yz4XcG; Tue, 25 Jun 2024 11:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719315137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g9bUiz/B66qHuWb+/kbbUh5VwvOcoCpcqyaUbTq88ew=; b=W+z0f2zlv1tqn6cxqXK62l+m+pDsj4wVp/zITX8A57cpBHge6YXX1TYrxElVjJbfXirh6W 74bRAo/zfxom2FMPimf4JrxAjlkKtGF9s3OjPByXdubwQXYnoeRdlKHHAc903rHspeSl5q ilc8qfFosPQ0iDCpCMN5h0pK9i1RSq9IILa6NMn6zadOvsT1ofaANxXQKbgU6MG7mx1C2m 38nbp/QiO+8uLXNBMr2yILkpdLO9HY7JDSoe7nOiBTwDtomF+xMAFQyg1lx/96UN5c/cht QlSJv/jIWNLCmddNnlvX2EpDjWt3eVQH1KSn2G8JdamDQQmjZ+sLxGfyApCFEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719315137; a=rsa-sha256; cv=none; b=w4aDgp9h3qOxAIMlw/c2ViH5QH9qoWM8+eICdBMkwyAksGV9wgZVi9hX7q3fpSFtU0frLP x36lSxPEbDsDIhsQGtalZQPZDZqoLPFK7CX+wNLDwfxuTTXauVzaz3MFqLFJdBRtxlJrp5 gXBFZdEGgDcWFhhyeOdinyRmA3hPyxR5t4F4ec37TIK72Sy97BpO9RJALxpAGBB9FykB3y 1JoB0On26lRVb8gNLa1KGvJgFtGRpV7uMav6vHV2IikQlWTiwWmCwnQ0vMQeMyAPAkbZGb Tc7sLyh9JrB+q9t+mjMK6qcbw9obGORyz2D9IF58nofrn7XKasHrlqHzbzgsjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719315137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g9bUiz/B66qHuWb+/kbbUh5VwvOcoCpcqyaUbTq88ew=; b=R+fN40rpN40i0CBKxEX1S9D50atjgJfd3P8v8xiPIRpLhM6z9oL2EILRbJwMTaRmcx+imT VJsao8bQDH2l4pO/Y9Z+OhfVieRi4t8Q6/Jo+ykzw3smylOzSAPIr7eiukDN0Dymy1HKye u9vgQKp2AHhjKx7K5aOJW4/PCe+30BSC8SXsKFLN4COOI9YrhxAcNmHJzqNn+QzbOjQUCe qBChbKpxKQ8BATNFK4JwjdKzEQsKFhx6a3jdIz6Rly69M4bHMhmdojd00q6Q4kKflP1B3P rOA9gA6AhBUhCy3PLdAj23/nfd6HIT/lxGUetU+c+Ucd3q5r9cqW8HApO5aqCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7jNd0vPxz111w; Tue, 25 Jun 2024 11:32: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 45PBWHxh013145; Tue, 25 Jun 2024 11:32:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PBWHea013143; Tue, 25 Jun 2024 11:32:17 GMT (envelope-from git) Date: Tue, 25 Jun 2024 11:32:17 GMT Message-Id: <202406251132.45PBWHea013143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: d5963606f0c6 - main - riscv: add SBI implementation IDs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5963606f0c6c084955c6ed41c92c4cca8edeb36 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=d5963606f0c6c084955c6ed41c92c4cca8edeb36 commit d5963606f0c6c084955c6ed41c92c4cca8edeb36 Author: Ruslan Bukin AuthorDate: 2024-06-25 11:25:26 +0000 Commit: Ruslan Bukin CommitDate: 2024-06-25 11:25:26 +0000 riscv: add SBI implementation IDs. Add new SBI implementation IDs including recently allocated one for bhyve. Reviewed by: mhorne Sponsored by: UKRI Differential Revision: https://reviews.freebsd.org/D45696 --- sys/riscv/include/sbi.h | 6 ++++++ sys/riscv/riscv/sbi.c | 27 +++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/sys/riscv/include/sbi.h b/sys/riscv/include/sbi.h index bd3991e0a89f..c8093238e268 100644 --- a/sys/riscv/include/sbi.h +++ b/sys/riscv/include/sbi.h @@ -49,6 +49,12 @@ #define SBI_IMPL_ID_KVM 3 #define SBI_IMPL_ID_RUSTSBI 4 #define SBI_IMPL_ID_DIOSIX 5 +#define SBI_IMPL_ID_COFFER 6 +#define SBI_IMPL_ID_XEN_PROJECT 7 +#define SBI_IMPL_ID_POLARFIRE_HSS 8 +#define SBI_IMPL_ID_COREBOOT 9 +#define SBI_IMPL_ID_OREBOOT 10 +#define SBI_IMPL_ID_BHYVE 11 /* SBI Error Codes */ #define SBI_SUCCESS 0 diff --git a/sys/riscv/riscv/sbi.c b/sys/riscv/riscv/sbi.c index 53eadbe54bc6..b0a05bd88ef1 100644 --- a/sys/riscv/riscv/sbi.c +++ b/sys/riscv/riscv/sbi.c @@ -132,6 +132,11 @@ sbi_print_version(void) case (SBI_IMPL_ID_BBL): printf("SBI: Berkely Boot Loader %lu\n", sbi_impl_version); break; + case (SBI_IMPL_ID_OPENSBI): + major = sbi_impl_version >> OPENSBI_VERSION_MAJOR_OFFSET; + minor = sbi_impl_version & OPENSBI_VERSION_MINOR_MASK; + printf("SBI: OpenSBI v%u.%u\n", major, minor); + break; case (SBI_IMPL_ID_XVISOR): printf("SBI: eXtensible Versatile hypervISOR %lu\n", sbi_impl_version); @@ -146,10 +151,24 @@ sbi_print_version(void) case (SBI_IMPL_ID_DIOSIX): printf("SBI: Diosix %lu\n", sbi_impl_version); break; - case (SBI_IMPL_ID_OPENSBI): - major = sbi_impl_version >> OPENSBI_VERSION_MAJOR_OFFSET; - minor = sbi_impl_version & OPENSBI_VERSION_MINOR_MASK; - printf("SBI: OpenSBI v%u.%u\n", major, minor); + case (SBI_IMPL_ID_COFFER): + printf("SBI: Coffer %lu\n", sbi_impl_version); + break; + case (SBI_IMPL_ID_XEN_PROJECT): + printf("SBI: Xen Project %lu\n", sbi_impl_version); + break; + case (SBI_IMPL_ID_POLARFIRE_HSS): + printf("SBI: PolarFire Hart Software Services %lu\n", + sbi_impl_version); + break; + case (SBI_IMPL_ID_COREBOOT): + printf("SBI: coreboot %lu\n", sbi_impl_version); + break; + case (SBI_IMPL_ID_OREBOOT): + printf("SBI: oreboot %lu\n", sbi_impl_version); + break; + case (SBI_IMPL_ID_BHYVE): + printf("SBI: bhyve %lu\n", sbi_impl_version); break; default: printf("SBI: Unrecognized Implementation: %lu\n", sbi_impl_id); From nobody Tue Jun 25 11:45:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7jhJ5gNSz5PPVr; Tue, 25 Jun 2024 11:45: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 4W7jhJ4dCQz4Y5X; Tue, 25 Jun 2024 11:45:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719315952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBya6iuZvHHu0dFxMZrszBGqzG+mFjP425MqrDa0umg=; b=ulXpVf4Pi4uO+3kVGpM2BGX6PSe82qwAAHpob29rvPjtYg+jqZJMZGMtbm5KH9sJevPiI+ pZW2t3D618zOAWtbrFlBSOzKGOOYnYZAdEjibKhB/zAYsWUotl5rFwtMytGSWZRNTAa/ob vbR+yLMj78PCNvcxEqGup0x7OgqBmGxK0YmqqYbvH3dvtdunjvL5wiLvkZS42t1mwk66IT u3P04v+pJMe/sGCzfhORhvx6Cb1UT9tgomvqYAJqdzP/35S8VC1S8t1g1/GutVVCxKfrxM Q8fwIwySvpv/WegcELe/HRs/VxMbdMq7khr7IBqJ5zeDDR1fZT8w4mJs1ozBRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719315952; a=rsa-sha256; cv=none; b=K0HCKrhotdLYKt5W9qq+XVeaXf1aZqbBLcmJI83aLDs03RN2xjXn+ptvy+g9OnAkr5hEVo qD2pMV6LceQv0uz3MAuQOKG6cIrYZ+lC9oFxdUTPYfpkUyc9fnd6+kcyHVTq9BCSHcewAn GELafw6hoayH57cYMmIyDRV7NpIoGiKB9BSFvr0mJe6f99uo6mOaHJ5K4a0tu11z8b+cjl a716eAvBeTvJn504zqPXwbx01H7CF8X1ZEK9El1fUCpaCUVIo1aTqNyW+tDlS1AKpoCcft dTB4zR/IEjEWFTsQ+8RqKFlMXe0DE6kOQEppX+3nMrM2v6dJM3SDprs/qZxshQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719315952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBya6iuZvHHu0dFxMZrszBGqzG+mFjP425MqrDa0umg=; b=YwTM/+Is8J75xb2GF/ezdCOQ9VIqkphCtZ77NkIojPMBC0dp5INKJWWkGjrU9G7G53mOxP 7vVYLjLx9halyB7mQLaG7/zZfEfbUptiZevv+ciDcBHyLryPdTXTJxeUvpwgX8weVGU24J LZyLhnC4Tl3hrQrjQbJ+ErVa22LpacRue609Hx6aEhfQ2muW22ukaOhJN3wzeFfkIC7wQi xPZCfuhrvVVJEI6+DgYZ9ghE27RuKFLsXKbvzNe3XpCATmBGn1qDXPROTLAacfLQM/JwSo mZaSMuz5IFyc3uHvhU2LlOirjffaEMNaGnv3iCo8HQzlkrC1+x24BN8zXvnYDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7jhJ46Qvz1149; Tue, 25 Jun 2024 11:45: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 45PBjqVr031191; Tue, 25 Jun 2024 11:45:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PBjqXT031188; Tue, 25 Jun 2024 11:45:52 GMT (envelope-from git) Date: Tue, 25 Jun 2024 11:45:52 GMT Message-Id: <202406251145.45PBjqXT031188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 44d4ee7f3dad - main - riscv: add FPE 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44d4ee7f3dadb9efa7a8ea599f7276074dd41a91 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=44d4ee7f3dadb9efa7a8ea599f7276074dd41a91 commit 44d4ee7f3dadb9efa7a8ea599f7276074dd41a91 Author: Ruslan Bukin AuthorDate: 2024-06-25 11:35:35 +0000 Commit: Ruslan Bukin CommitDate: 2024-06-25 11:35:35 +0000 riscv: add FPE code. Add floating point extension (FPE) code needed for bhyve and world switch. Reviewed by: mhorne Sponsored by: UKRI Differential Revision: https://reviews.freebsd.org/D45697 --- sys/riscv/include/fpe.h | 12 ++- sys/riscv/riscv/fpe.c | 190 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+), 1 deletion(-) diff --git a/sys/riscv/include/fpe.h b/sys/riscv/include/fpe.h index ae1414dde717..2cf0d3382776 100644 --- a/sys/riscv/include/fpe.h +++ b/sys/riscv/include/fpe.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Ruslan Bukin + * Copyright (c) 2016-2024 Ruslan Bukin * All rights reserved. * * This software was developed by SRI International and the University of @@ -34,4 +34,14 @@ void fpe_state_save(struct thread *td); void fpe_state_clear(void); +struct fpreg *fpu_save_area_alloc(void); +void fpu_save_area_free(struct fpreg *fsa); +void fpu_save_area_reset(struct fpreg *fsa); + +void fpe_enable(void); +void fpe_disable(void); + +void fpe_store(struct fpreg *state); +void fpe_restore(struct fpreg *state); + #endif /* !_MACHINE_FPE_H_ */ diff --git a/sys/riscv/riscv/fpe.c b/sys/riscv/riscv/fpe.c new file mode 100644 index 000000000000..b6c66e5e4f09 --- /dev/null +++ b/sys/riscv/riscv/fpe.c @@ -0,0 +1,190 @@ +/*- + * Copyright (c) 2024 Ruslan Bukin + * + * This software was developed by the University of Cambridge Computer + * Laboratory (Department of Computer Science and Technology) under Innovate + * UK project 105694, "Digital Security by Design (DSbD) Technology Platform + * Prototype". + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#include + +#include +#include + +static uma_zone_t fpu_save_area_zone; +static struct fpreg *fpu_initialstate; + +void +fpe_enable(void) +{ + uint64_t reg; + + reg = SSTATUS_FS_INITIAL; + + csr_set(sstatus, reg); +} + +void +fpe_disable(void) +{ + uint64_t mask; + + mask = SSTATUS_FS_MASK; + + csr_clear(sstatus, mask); +} + +void +fpe_store(struct fpreg *regs) +{ + uint64_t fcsr, (*fp_x)[32][2]; + + fp_x = ®s->fp_x; + + __asm __volatile( + "frcsr %0 \n" + "fsd f0, (16 * 0)(%1)\n" + "fsd f1, (16 * 1)(%1)\n" + "fsd f2, (16 * 2)(%1)\n" + "fsd f3, (16 * 3)(%1)\n" + "fsd f4, (16 * 4)(%1)\n" + "fsd f5, (16 * 5)(%1)\n" + "fsd f6, (16 * 6)(%1)\n" + "fsd f7, (16 * 7)(%1)\n" + "fsd f8, (16 * 8)(%1)\n" + "fsd f9, (16 * 9)(%1)\n" + "fsd f10, (16 * 10)(%1)\n" + "fsd f11, (16 * 11)(%1)\n" + "fsd f12, (16 * 12)(%1)\n" + "fsd f13, (16 * 13)(%1)\n" + "fsd f14, (16 * 14)(%1)\n" + "fsd f15, (16 * 15)(%1)\n" + "fsd f16, (16 * 16)(%1)\n" + "fsd f17, (16 * 17)(%1)\n" + "fsd f18, (16 * 18)(%1)\n" + "fsd f19, (16 * 19)(%1)\n" + "fsd f20, (16 * 20)(%1)\n" + "fsd f21, (16 * 21)(%1)\n" + "fsd f22, (16 * 22)(%1)\n" + "fsd f23, (16 * 23)(%1)\n" + "fsd f24, (16 * 24)(%1)\n" + "fsd f25, (16 * 25)(%1)\n" + "fsd f26, (16 * 26)(%1)\n" + "fsd f27, (16 * 27)(%1)\n" + "fsd f28, (16 * 28)(%1)\n" + "fsd f29, (16 * 29)(%1)\n" + "fsd f30, (16 * 30)(%1)\n" + "fsd f31, (16 * 31)(%1)\n" + : "=&r"(fcsr), "=r"(fp_x), "=m"(*fp_x)); + + regs->fp_fcsr = fcsr; +} + +void +fpe_restore(struct fpreg *regs) +{ + uint64_t fcsr, (*fp_x)[32][2]; + + fp_x = ®s->fp_x; + fcsr = regs->fp_fcsr; + + __asm __volatile( + "fscsr %0 \n" + "fld f0, (16 * 0)(%1)\n" + "fld f1, (16 * 1)(%1)\n" + "fld f2, (16 * 2)(%1)\n" + "fld f3, (16 * 3)(%1)\n" + "fld f4, (16 * 4)(%1)\n" + "fld f5, (16 * 5)(%1)\n" + "fld f6, (16 * 6)(%1)\n" + "fld f7, (16 * 7)(%1)\n" + "fld f8, (16 * 8)(%1)\n" + "fld f9, (16 * 9)(%1)\n" + "fld f10, (16 * 10)(%1)\n" + "fld f11, (16 * 11)(%1)\n" + "fld f12, (16 * 12)(%1)\n" + "fld f13, (16 * 13)(%1)\n" + "fld f14, (16 * 14)(%1)\n" + "fld f15, (16 * 15)(%1)\n" + "fld f16, (16 * 16)(%1)\n" + "fld f17, (16 * 17)(%1)\n" + "fld f18, (16 * 18)(%1)\n" + "fld f19, (16 * 19)(%1)\n" + "fld f20, (16 * 20)(%1)\n" + "fld f21, (16 * 21)(%1)\n" + "fld f22, (16 * 22)(%1)\n" + "fld f23, (16 * 23)(%1)\n" + "fld f24, (16 * 24)(%1)\n" + "fld f25, (16 * 25)(%1)\n" + "fld f26, (16 * 26)(%1)\n" + "fld f27, (16 * 27)(%1)\n" + "fld f28, (16 * 28)(%1)\n" + "fld f29, (16 * 29)(%1)\n" + "fld f30, (16 * 30)(%1)\n" + "fld f31, (16 * 31)(%1)\n" + :: "r"(fcsr), "r"(fp_x), "m"(*fp_x)); +} + +struct fpreg * +fpu_save_area_alloc(void) +{ + + return (uma_zalloc(fpu_save_area_zone, M_WAITOK)); +} + +void +fpu_save_area_free(struct fpreg *fsa) +{ + + uma_zfree(fpu_save_area_zone, fsa); +} + +void +fpu_save_area_reset(struct fpreg *fsa) +{ + + memcpy(fsa, fpu_initialstate, sizeof(*fsa)); +} + +static void +fpe_init(const void *dummy __unused) +{ + + fpu_save_area_zone = uma_zcreate("FPE save area", sizeof(struct fpreg), + NULL, NULL, NULL, NULL, _Alignof(struct fpreg) - 1, 0); + fpu_initialstate = uma_zalloc(fpu_save_area_zone, M_WAITOK | M_ZERO); + + fpe_enable(); + fpe_store(fpu_initialstate); + fpe_disable(); + + bzero(fpu_initialstate->fp_x, sizeof(fpu_initialstate->fp_x)); +} + +SYSINIT(fpe, SI_SUB_CPU, SI_ORDER_ANY, fpe_init, NULL); From nobody Tue Jun 25 12:47:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7l3V5VJfz5PV7N; Tue, 25 Jun 2024 12:47: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 4W7l3V4YYXz4dP3; Tue, 25 Jun 2024 12:47:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719319654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrjitpHnuO+foPMIE09SpnwzuxCm0AKUjoI47MivW+g=; b=QBYViGYayDZjxFxM1cBP6vWuuOMmRqsOyanhpx9Ae4zDR6muwlhMSJSwrBZAQ8d0u9zlH3 RQa5H6h2/HihjolwIPSu3DhwWvmoAVt4M8nlsmLoilckGiQnb6R2I9V8O855hfN2gKENRw lTHojpiS5AaXeJyqab9vQK/OIGlT9bIZqeRFrDCnDQ45/Z4LyETun0VibmCjQXzJjZSsSC 9rM1LrpzzEvFpD4DhCzaYk11KB7B/tNPWE+k+gXLB6jjj+KQG9BOY/zJG+9Z4uPYVr/hzs fR2UTjGvg2/5iD+T0RpYIx5mTOIYl7BKjpsAXqw8N8Hg5Qp6YpWGbMicjXLxZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719319654; a=rsa-sha256; cv=none; b=ObbMhjlPutxGO+A4O5dnN5wWqyrDQOY1q7QJuN0mDOvOunBsTe4iARypBeTpcp4D4cIOJU 0PU5wI0idRMFPz7f1nR1f+MgJXGc4/LLzAC96RQ3v+FfisbfudK7JOC8LyPd6ZnELzYQVJ 9iiGi8tluRNNPSLU+8yOrKEWH2YwURKZ3sjJ59EoDBbNy+XTY5vOzKoX7xSC1Whz0u7jX3 UOmeUqY+mP1MTTXR6xDhW23oFSvMFrc+gzO/ileN61GRqO12iTfqwlbA+VgNDjCSBUnxIY RDeFSmWHIlknVP6xppHqkuCKA15tfo5GT4B/eKnmG18WrHUfAS4huxJQ9EFucw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719319654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrjitpHnuO+foPMIE09SpnwzuxCm0AKUjoI47MivW+g=; b=WpirVoTIvYwco+1JWPQsvJJOwZrE43BDmqsv56N3eNn5+fZ6M1nVndyodKjv0lq+jduTuR 6gUhn4u6879UhUDOwuBkNQHU3UzErX1KrINp/Q5dfag6vcvPwkdemFwMP/M7u9+GOAh338 UrzL+rQgeurdlBY+tdjIsvC4P1QOY643aPyc148+vvrCAe+jTLnS0kOP3PA1v2EIjLBz2H rnV22ZrE21Q6Fr3QZcJOIxeAjKSbc51wQKVJtt2HBld9K0AXrT+o5RxIaGwZm32PzBmMap RyaJc1YKuQsm7bOa7aK9yuK0dY5Vdt5oGd9iDnnb5cNwic0gn5of7ywAFnKmOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7l3V48Drz12Zg; Tue, 25 Jun 2024 12:47: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 45PClYW3032506; Tue, 25 Jun 2024 12:47:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PClYWw032503; Tue, 25 Jun 2024 12:47:34 GMT (envelope-from git) Date: Tue, 25 Jun 2024 12:47:34 GMT Message-Id: <202406251247.45PClYWw032503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: df7001bad094 - stable/14 - netlink/route: provide pre-2.6.19 Linux compat shim List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: df7001bad09474da00885ed853bc6708019fb292 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=df7001bad09474da00885ed853bc6708019fb292 commit df7001bad09474da00885ed853bc6708019fb292 Author: Gleb Smirnoff AuthorDate: 2024-06-20 23:10:39 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-25 12:47:24 +0000 netlink/route: provide pre-2.6.19 Linux compat shim The old Linux used 8-bit rtm_table field of the RTM_NEWROUTE message to specify routing table id. Modern netlink uses RTA_TABLE 32-bit attribute. Unfortunately, there is modern software (namely bird) that would prefer the old API as long as the routing table id fits into 8-bit. PR: 279662 (cherry picked from commit f34aca55adef1e28cd68b2e6705a0cac03f0238e) --- sys/netlink/route/rt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index ed09748995dc..7379d49b96a9 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -475,6 +475,7 @@ struct nl_parsed_route { uint32_t rta_nh_id; uint32_t rta_weight; uint32_t rtax_mtu; + uint8_t rtm_table; uint8_t rtm_family; uint8_t rtm_dst_len; uint8_t rtm_protocol; @@ -507,6 +508,7 @@ static const struct nlfield_parser nlf_p_rtmsg[] = { { .off_in = _IN(rtm_dst_len), .off_out = _OUT(rtm_dst_len), .cb = nlf_get_u8 }, { .off_in = _IN(rtm_protocol), .off_out = _OUT(rtm_protocol), .cb = nlf_get_u8 }, { .off_in = _IN(rtm_type), .off_out = _OUT(rtm_type), .cb = nlf_get_u8 }, + { .off_in = _IN(rtm_table), .off_out = _OUT(rtm_table), .cb = nlf_get_u8 }, { .off_in = _IN(rtm_flags), .off_out = _OUT(rtm_flags), .cb = nlf_get_u32 }, }; #undef _IN @@ -939,7 +941,10 @@ rtnl_handle_newroute(struct nlmsghdr *hdr, struct nlpcb *nlp, return (EINVAL); } - if (attrs.rta_table >= V_rt_numfibs) { + if (attrs.rtm_table > 0 && attrs.rta_table == 0) { + /* pre-2.6.19 Linux API compatibility */ + attrs.rta_table = attrs.rtm_table; + } else if (attrs.rta_table >= V_rt_numfibs) { NLMSG_REPORT_ERR_MSG(npt, "invalid fib"); return (EINVAL); } From nobody Tue Jun 25 13:15:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7lhK6bfSz5PXY9; Tue, 25 Jun 2024 13:16:01 +0000 (UTC) (envelope-from jhibbits@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 4W7lhK6632z4gh3; Tue, 25 Jun 2024 13:16:01 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719321361; 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=zo+w4lXP8NfRFoAu94Ffv7zlqiXGHzYpgtI2vGVHRQQ=; b=gVEgZS4CzwxtO/6m586zUc9cgJPlr5ctMiEvLNywd4/+06+L7xOkuMdvs7Gn6aJrGKVXC6 W0uSnXvYm33rzT4FHeA1Mphv6eHF+BXLAUcxv/mRh+sAX7yO+fiXclFVxSo6F623VxppM8 i8gmenWmrIs8/to3D8o4RmBkAwVtgZ+V0BZRGp7vACDD/tLEViDIRBm/B33LWaqExUms+k DD73L/XzJBggyiF6Gc4NmJdvzIQsD/xBZF83aCF6dTVIcrJmh5pOnRyljzUlxMIMel3AVY Ox4aHR35HS+L2WQz93K5j4HpSt4pofewsi92FYC034r5tJUPDf1SlQrTtnum5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719321361; a=rsa-sha256; cv=none; b=yRdcTIEPsE3TWrpNkkA+qa91CDvxJ+VAbu4igQf0iJYvYwpcbt0nX9gW4xM1djej7knTly sLw+DzKuQ0vY9vc92IyGXcL3TzA7egOQ9A/ujLazxfqnudlNW3fd0Nt7QMQFMRJw04pOAN CQFMOUcTWJhWOhwKKUWQ/MUumkk3C9u2Z7czWbTL49g9AX2r/X+0D/si7nUGT5lAdiXYrX PrDVaeoNxpTybN5ZTuV68FQoFbs8kS/29jkxoDR4YMlqOUJ0szX6BxToH8U9dRBZoEKuH1 35660Njcc5urn9otJtAfJRhm9jglt9ds3K2fLFirNWe3enPbK7uu3OLVaLmCmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719321361; 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=zo+w4lXP8NfRFoAu94Ffv7zlqiXGHzYpgtI2vGVHRQQ=; b=kAbxPEQNMf/+vHjmtQ6QqyOoKyj4g/FMZ2ITnMAghKgRfN34kZA02K+PNRzhw/4fo5Cpmy Dy4DiwDOm7QeQcm9TdfWVnxxIi/ZpQWP6HmrYqAOY6meoVhYBIPZQc/U7oBWj5XQD3VxvH wiSvoHraJ0RP5yXRQumtFsWfIEGGkSCmgt8UUQurGYxVksTZzsj8wP+kWV5uTRwFIfXFVc Ldsr/aldMEwkfpVsWeDUyAh+1jVly8E8SUDOyFC0P0u38lTx37T6vwuy7QswCGdgR4hQyL vCxN4OpEnYfSZyaj3cntw5r1qvRrykUoqsllRpdxrtJsO1iALJW2S6GTB2MrzQ== Received: from ralga.knownspace (ip-163-182-7-56.dynamic.fuse.net [163.182.7.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W7lhK3hVyzN9v; Tue, 25 Jun 2024 13:16:01 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Tue, 25 Jun 2024 09:15:59 -0400 From: Justin Hibbits To: Warner Losh Cc: Gleb Smirnoff , Warner Losh , src-committers , "" , "" Subject: Re: git: c2e9c5bbf022 - main - tpm: Refactor TIS and add a SPI attachment Message-ID: <20240625091559.2f258d3b@ralga.knownspace> In-Reply-To: References: <202405032032.443KWhf0045034@gitrepo.freebsd.org> <20240624161128.33c0f518@ralga.knownspace> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; powerpc64le-unknown-linux-gnu) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 24 Jun 2024 16:07:56 -0600 Warner Losh wrote: > On Mon, Jun 24, 2024, 3:16=E2=80=AFPM Gleb Smirnoff > wrote: >=20 > > On Mon, Jun 24, 2024 at 04:11:28PM -0400, Justin Hibbits wrote: =20 > > J> > sorry for late notice, but we just discovered that after this > > J> > commit tpm(4) on ACPI no longer attaches. From what I see > > J> > ther probe method isn't even called. =20 > > J> > > J> Hi Gleb, > > J> > > J> That's very odd. The probe method hasn't changed, nor has the > > J> tpm_acpi attachment (still acpi), so I'm really confused why it > > J> wouldn't be called now. Is there any debugging you can do to > > J> further narrow it down? I haven't seen any issues reported > > J> internally at Juniper on x86 hardware. I just verified > > J> everything should get built properly. =20 > > > > I started adding printfs to the probe method and as said - it is not > > even called. So I puzzled on where to start the debugging. I can > > test patches/ideas if you have any. > > > > Warner is also looking into this problem. > > =20 >=20 > I'm looking at name mismatched and/or moved parents to see if that's > in play. I thought I'd found something like this earlier, but it was > a false alarm I think. >=20 > Warner >=20 > > =20 I just saw bbecd3148abf. Sorry for the breakage, thanks for fixing it! - Justin From nobody Tue Jun 25 14:56:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7nvh5q5Jz5PS99; Tue, 25 Jun 2024 14:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7nvh5JkGz4qr0; Tue, 25 Jun 2024 14:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719327360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaxxWJLKGSP0dkCMuMChz2LONJV3bX7zYbAiMuFTsE=; b=LxtYGnw2VmXeWgfO0W/SFBFkrgQJ3t3JeBZeSRLX8ufVIqj3s1dXLqIKqCOe9dGpK4kXs8 1ERKHzzWZIz577AlhDeUB8j3TTw4NtU2IRVyI7oZjddVXMpSD2BhK+uhlUCduqLOPamo8Y qgOnkncA0WnuW9prkD7ex5/2UAry7pANC0Zx2OXyp+y1SGe7xNKC4EwvGMUpJiDgIfieMM 6fkgaz+MfMzIbPIXOMBUMlj02vtt2NEN/MDD0CyIG32Yaxy5hQahFXEI4PRDnHQ9DwSVEK pZPy7sSrwxsG09OBRfMob2Di2I6myXq/kM0RXs3PH+0xuuW/kJllaGcs+4txcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719327360; a=rsa-sha256; cv=none; b=l1mXBV7fITXmOgKyZIQs+Sx6W/d04tV/m+zu5wzdEb5oZdSE28nLlN2Diw2kJtSJTbYuKh h47tBB9es8/uh9ZaK/ND0wdtBOaEklbLOMZiWcnz7rFKjJPgDfB94jEPOPSmiNSU6bnGgm Ql38NHG7nlGQ03kg2Irer6S3Ok0DqCXA/sglQpwUjGtDCnkAN/BE8IimIo3gfnLEb2P41O J/l6/EdCQhoR90atKsEigpP8QObtZ+1bGF3QI8nV9m6jrU+7Ck6ve3i1ngMalUlcXHO/Aw LI5EULwrpiyAubnL8dGK0uqQyHj31GjCE5c9j9DjABuK7U72bdl5XU2bgqKZRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719327360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaxxWJLKGSP0dkCMuMChz2LONJV3bX7zYbAiMuFTsE=; b=utWQznH3GiJr2jw17F3ECznW6s+pu7uIPJrEQk7XdVGo5+7VNIMl82pZOGilk07N31niPp bcb5JqTKR7fpbFjwVU+ZdnB/feBzFO0Ab4ebZ48wXY0GwIiM9HktBmCWnKJXvnXYYC4BMe 7zPgBGynt5Xos5VcOOAKptqAMyH/NYud7q3KQLSSkKVy1536cNuViM8Rn3pUBqmX0u9MWI mUzNJPBqeY8iz1pzmbtNQcF8yQczNTn5NSoTs+yAeTpL4NdiRoYD9CEWn3mhX3yZjz4Plv 9PEkOTnen+ZDic6IWlFI79or9ySBfE9DWNJkC3kkXUkC/8ENRth8rw1iP7IDPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7nvh4w8hz15qH; Tue, 25 Jun 2024 14:56: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 45PEu0x1051191; Tue, 25 Jun 2024 14:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PEu0mQ051188; Tue, 25 Jun 2024 14:56:00 GMT (envelope-from git) Date: Tue, 25 Jun 2024 14:56:00 GMT Message-Id: <202406251456.45PEu0mQ051188@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: 8aa9192ce98a - main - isp: fix ISPCTL_ABORT_CMD switch case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 8aa9192ce98aec07b24f8279c709237dd2c4421b Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=8aa9192ce98aec07b24f8279c709237dd2c4421b commit 8aa9192ce98aec07b24f8279c709237dd2c4421b Author: Mariusz Zaborski AuthorDate: 2024-06-25 14:50:28 +0000 Commit: Mariusz Zaborski CommitDate: 2024-06-25 14:56:12 +0000 isp: fix ISPCTL_ABORT_CMD switch case Prevent kernel panic by not running ISPCTL_FCLINK_TEST after a failed ISPCTL_ABORT_CMD. Reviewed by: mav Tested by: Arne Steinkamm MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45718 --- sys/dev/isp/isp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index b064f86fda89..14d8147c3562 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -3099,6 +3099,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ctl, ...) if (ab->abrt_nphdl == ISP24XX_ABRT_OKAY) return (0); isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d abort returned 0x%x", chan, tgt, ab->abrt_nphdl); + break; } case ISPCTL_FCLINK_TEST: { From nobody Tue Jun 25 17:42:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7sby2ZvCz5PjSD; Tue, 25 Jun 2024 17:42: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 4W7sby1lgfz499j; Tue, 25 Jun 2024 17:42:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iyzm3L1jEM8qoPb3EYINAhgyD7n7o9Bw9JYE8k1mneU=; b=AASTC31XToGuLNllkuHpNVIO8l/IAVvZIKgGDDhmSrv8jXr5j7GJpv+idhOFF7XzfKsgI6 u/XN2GS53xR9ZiZJWvgyKySylEMBG/Ni9vSH4Vt7uBhLwZv5WOWqDZpEVkWb1XN0KlpWMU E767rbYYLEAgoviacZfSAs9+SIZTu+6CIusacGXDOKLk90BkGh4INQqCYPD9mekxCbieMK pPxlemIn0cUOTsAYzUfCb/I9GUD/ZDZ9tCB5EpUkfG2l2r869AsGKQFRhFAjexiKA9qgqz qIW+6o9jkuupd0kL66cYDVy7Qc4iILJlewEzFwiHKPgLK9G3xebWoiwu/I8EIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719337358; a=rsa-sha256; cv=none; b=LGM8Myjj6JVhqmBdl3+YXp9xijyoCO9mpBzYihJ9DB8S8pcAl59QUlm0USdVuHk04TThhy +vCukbFo+pVKZXewUBspmV2GadW3I76x8VhpEQM5jVwh+xR+g1r3t6DnTgL12GgDZMCGRE pm0OhNJIh1t9Yl3qogrKJNQH5jMthahv6HRakSxGctar4woeV8sz9WQSZLbPdn4kP29f0Q jTLayh5wuK/9lHeZXfi+3YXT8fSeCkVwxQxKO1AX0/1UQrpRNugIMnRvUt4WkNL4cBsOQj +U05idsSgonPdReDgbFE42SVFSo0bYkjAdjDoMeXwgIqvNj/3vj8711Gfo7IRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iyzm3L1jEM8qoPb3EYINAhgyD7n7o9Bw9JYE8k1mneU=; b=xCbfrlkgliwhTwpwRaPT6hHxToV8JmLaAhZRQTVXbmfOfFaGKjglv99kRV9nuPplySGOhA yDYoxSzpYcY22DeagWeidlOVGJ1oghCGMb1Tr2I60lQNXnHbm/BamrGchONNzJVrly0agz MX1f7MVZgDCycYEeBn/kDRKU4ANm/8FWB/AMXRWxHGeH1xreH3QDwkDaV4rurreZpWto5n 9SRKzWL5XHGB7riJUqiVUxJZ9r8a8lKy6z0mRkEwbz5QSr43655WHiVsxZTdOzuJeQyte1 BEHK7o1Zb8otNN63DzsZZIQN7mvzzI1QP7AsmrJYh3twiWv+HPCgI1GZeOAHgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7sby1M72z191n; Tue, 25 Jun 2024 17:42: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 45PHgcIW040213; Tue, 25 Jun 2024 17:42:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PHgcSs040210; Tue, 25 Jun 2024 17:42:38 GMT (envelope-from git) Date: Tue, 25 Jun 2024 17:42:38 GMT Message-Id: <202406251742.45PHgcSs040210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: d25f0bdceb3a - main - cdefs.h: add __inline to __always_inline List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d25f0bdceb3abb798342821791d7ececb4ba3411 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=d25f0bdceb3abb798342821791d7ececb4ba3411 commit d25f0bdceb3abb798342821791d7ececb4ba3411 Author: Ryan Libby AuthorDate: 2024-06-25 17:39:13 +0000 Commit: Ryan Libby CommitDate: 2024-06-25 17:39:13 +0000 cdefs.h: add __inline to __always_inline Add __inline to the __always_inline macro to quiet dozens of gcc warnings of the form: warning: 'always_inline' function might not be inlinable [-Wattributes] It's clearly the intention of the __always_inline macro applied to a function to inline the function. However, gcc seems to be picky with the -Wattributes. It appears that __attribute__((__always_inline__)) was intended to apply to inline functions, as in, function declarations with the attribute should also be declared as inline. Both clang and gcc sources themselves use the two in combination: inline __attribute__((__always_inline__)) FreeBSD sources mostly only use __always_inline, without the inline keyword. Only a few files in libmsun used both. Reviewed by: imp, kib, olce Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45711 --- sys/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 58146ddc721c..53ac1b1c3f92 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -265,7 +265,7 @@ #define __malloc_like __attribute__((__malloc__)) #define __pure __attribute__((__pure__)) -#define __always_inline __attribute__((__always_inline__)) +#define __always_inline __inline __attribute__((__always_inline__)) #define __noinline __attribute__ ((__noinline__)) #define __fastcall __attribute__((__fastcall__)) #define __result_use_check __attribute__((__warn_unused_result__)) From nobody Tue Jun 25 17:42:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7sbz2cbKz5PjL8; Tue, 25 Jun 2024 17:42: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 4W7sbz25YQz494F; Tue, 25 Jun 2024 17:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337359; h=from:from:reply-to:subject:subject: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/vf1XVUN6WKUQsRo6mentADxZcS8yhQiWNGixy24MI=; b=rGjBsovjXCUPgENWRtu/beXbrhHZDATrtulipYcRQh5BiBTn4VBfXiwaxTJ/vmOC8Uqcx7 ZC++TWFGIZjK9Mp6HoeMJbnZZ+1wwU95pWZyo29H76Pr6++WQEo9kbk7YCezW+QL3Q/cna eMROxuAQ8+mxN/oLVWKJwiqRfNH689WmTxmwT8OgSxfP79Z/cq9irJSpyQv5c9CDfcM74u N2ZeMnjrrOXc0PUayFn/h/K+qpUOnlZexKPSQBpHl20st/gDm98zf0LTwEs2p/IdrWh8Fq M0SxEXf3Va54h3AXb+boGUJHwU3I/JhhTeN08n4H+gpRCVRiKK8tVnrW7r8VcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719337359; a=rsa-sha256; cv=none; b=S/tM2xgXhEFVei4aWGK0RCseYtnmg9f5+3VaWjM/nf2NBcF5qEYrt7pH/gtX72D+Z9dA56 oeGUOsx6h09wLxydYa0FbkqkARGZ49BAKU3+qnVtJx3Ooiu4e6Avf/2cbMivMBhHOBZkd2 TAW/wrz5DSk2lyrwKcMS2Gv3mE5STKaGCmFmSzXP99A1bd9QVVpZ5TlFsj94WT3VJJ+PPM pKRXrTSMxP0kO0PXBrJDNWL9kuX7rDjfACQZayjSrZRSTVrz5M2I8cTiiScEWvCqKMzaBi DpUUQ3Ia6AuK/vIqpz0RAL5Wj7BSnSX3yke/5OhG3NZFVJI+n/vzbFVvTaXC1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337359; h=from:from:reply-to:subject:subject: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/vf1XVUN6WKUQsRo6mentADxZcS8yhQiWNGixy24MI=; b=L4y7PEUusoCkI24dB9QADBgYlSz68KRbjmzc9s+Hrp66wXc13TUiIiURvfSzBhrBdGAKxe 4lPgyCAwD9jfOyZ2t4qwWT9I+4MQuKWoWNDysMM9Vhh6VEeM+Gmm5UVb0rBJi/Ks3cMSAl mdfcHoSOhjJniivPt/NIRuOZXC05dN3eRMmTt8ljwBNYhWeD66p5jzgFtl7UOQRcMlLAPb px/OG2YzzScrNEshIyimw4tEUDVgwTAvW8zo++zKXxu3F470nkWl7uFrHEVvfIxX3AKcm0 0I5fxkI4CiF9dhfEXiF51A989DD1nmE46VNCmNQ9MtV5oM0cSl5l8YC25JRJAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7sbz1hgWz1B20; Tue, 25 Jun 2024 17:42: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 45PHgdhQ040268; Tue, 25 Jun 2024 17:42:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PHgdiW040265; Tue, 25 Jun 2024 17:42:39 GMT (envelope-from git) Date: Tue, 25 Jun 2024 17:42:39 GMT Message-Id: <202406251742.45PHgdiW040265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 07cc7ea7386c - main - libmsun: remove duplicates after cdefs.h added inline to __always_inline List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07cc7ea7386c5428cef9e8f06d4ebd8144dec311 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=07cc7ea7386c5428cef9e8f06d4ebd8144dec311 commit 07cc7ea7386c5428cef9e8f06d4ebd8144dec311 Author: Ryan Libby AuthorDate: 2024-06-25 17:40:14 +0000 Commit: Ryan Libby CommitDate: 2024-06-25 17:40:14 +0000 libmsun: remove duplicates after cdefs.h added inline to __always_inline Reviewed by: kib, olce Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45712 --- lib/msun/ld128/e_rem_pio2l.h | 2 +- lib/msun/ld128/s_logl.c | 2 +- lib/msun/ld80/e_rem_pio2l.h | 2 +- lib/msun/ld80/s_logl.c | 2 +- lib/msun/src/e_rem_pio2.c | 2 +- lib/msun/src/e_rem_pio2f.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/msun/ld128/e_rem_pio2l.h b/lib/msun/ld128/e_rem_pio2l.h index 44ec6eb10bfd..0ea1a706f3aa 100644 --- a/lib/msun/ld128/e_rem_pio2l.h +++ b/lib/msun/ld128/e_rem_pio2l.h @@ -54,7 +54,7 @@ pio2_2t = 2.0670321098263988236496903051604844e-43L, /* 0x127044533e63a0105df5 pio2_3 = 2.0670321098263988236499468110329591e-43L, /* 0x127044533e63a0105e00000000000.0p-254 */ pio2_3t = -2.5650587247459238361625433492959285e-65L; /* -0x159c4ec64ddaeb5f78671cbfb2210.0p-327 */ -static inline __always_inline int +static __always_inline int __ieee754_rem_pio2l(long double x, long double *y) { union IEEEl2bits u,u1; diff --git a/lib/msun/ld128/s_logl.c b/lib/msun/ld128/s_logl.c index 4d32462e5653..e9133ec66fd2 100644 --- a/lib/msun/ld128/s_logl.c +++ b/lib/msun/ld128/s_logl.c @@ -444,7 +444,7 @@ struct ld { #endif #ifdef STRUCT_RETURN -static inline __always_inline void +static __always_inline void k_logl(long double x, struct ld *rp) #else long double diff --git a/lib/msun/ld80/e_rem_pio2l.h b/lib/msun/ld80/e_rem_pio2l.h index d0a4710bc4e2..b39e63b72afc 100644 --- a/lib/msun/ld80/e_rem_pio2l.h +++ b/lib/msun/ld80/e_rem_pio2l.h @@ -66,7 +66,7 @@ pio2_2t = 6.36831716351095013979e-25L, /* 0xc51701b839a25205.0p-144 */ pio2_3t = -2.75299651904407171810e-37L; /* -0xbb5bf6c7ddd660ce.0p-185 */ #endif -static inline __always_inline int +static __always_inline int __ieee754_rem_pio2l(long double x, long double *y) { union IEEEl2bits u,u1; diff --git a/lib/msun/ld80/s_logl.c b/lib/msun/ld80/s_logl.c index 2c5d1e2dd08f..7141abe086d5 100644 --- a/lib/msun/ld80/s_logl.c +++ b/lib/msun/ld80/s_logl.c @@ -444,7 +444,7 @@ struct ld { #endif #ifdef STRUCT_RETURN -static inline __always_inline void +static __always_inline void k_logl(long double x, struct ld *rp) #else long double diff --git a/lib/msun/src/e_rem_pio2.c b/lib/msun/src/e_rem_pio2.c index 8a4006498a17..16a57a018c59 100644 --- a/lib/msun/src/e_rem_pio2.c +++ b/lib/msun/src/e_rem_pio2.c @@ -45,7 +45,7 @@ pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ #ifdef INLINE_REM_PIO2 -static __inline __always_inline +static __always_inline #endif int __ieee754_rem_pio2(double x, double *y) diff --git a/lib/msun/src/e_rem_pio2f.c b/lib/msun/src/e_rem_pio2f.c index d9a3e2e34c46..84cd9bf43d90 100644 --- a/lib/msun/src/e_rem_pio2f.c +++ b/lib/msun/src/e_rem_pio2f.c @@ -38,7 +38,7 @@ pio2_1 = 1.57079631090164184570e+00, /* 0x3FF921FB, 0x50000000 */ pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */ #ifdef INLINE_REM_PIO2F -static __inline __always_inline +static __always_inline #endif int __ieee754_rem_pio2f(float x, double *y) From nobody Tue Jun 25 17:42:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7sc05zQfz5PjY7; Tue, 25 Jun 2024 17:42: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 4W7sc03HWlz49Q2; Tue, 25 Jun 2024 17:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ziexze2Zw/8IPPwTHxosjHs7mGdWmeqo4aswEx0hKuQ=; b=unEPTKULFd0yFg0UtNyCn+XNdqSYYURmsAntijy2NRI3BfOYuV9fiHeIf+Bm7hMIb/H/wz 67svGtvaiUSXTrxzUGFlCba99r1f3Gx2XJ0X+5n5Kvorx04IWhkegZ5K5MBLcOQhN9THDm NNPunjGoHhLfkZ6DPdCKmW0AaNwyib2HSG5T+deIkiNCuYcT2/BjqmgbwjqA+/bySrsyWx ns/wUsr04I7dd7Xyc+wi/qt30BDI7+09K6A3tph1ZvuUgcQJ+8fcCH2SkGciA4zwtlZ8Yy JXKbX6qZP5jZerr/OSzl4iwFsSTFKGNfa9zJEXYbNu4jkc3TSdqro8URbMFSqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719337360; a=rsa-sha256; cv=none; b=XhFlgbXo0nLN9AcAH+4vy7W3XVPssNdEvY6/Jb+DljegKmg75n839B11obW/HdYbYyAkLg M02WNCt1+f6lbGfEG6rmTZtyVym2qUez6ApN1JYh65ZPEPmR+AgabCI969ZBSuQi9pkxG7 dsxtffhwzjBx4NIOyjbby0GGRrtZTyXOqUAy1KbPPETUuh/rgVyYqqS8AXmKxRWIcumKJl k899N/LzY7IhSz1wkr4VSZjvGTH7Z5aAyS4aNh1urQc8kU+t/O2t6Kpus60q/sKUNP1gQS U06UpyKbWoP85yom1+lDwlGD8FsBQMf6PGNErXujeg5c4EKDLLFF7lj9lulzEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719337360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ziexze2Zw/8IPPwTHxosjHs7mGdWmeqo4aswEx0hKuQ=; b=W18Kwxfeu7lcQN0VszX/LhURuaW0ZJNbfcVgf0M8CR7J1/LMLmhXfJCxo80IDdD1Hq6+JO QUPqGu0wZHz3kVLOZb7Y30EoUKIZ/Dr+XSVVCHjDAOSvX9GKYGXeGO9Lx/8QLH+zDx2/ke GYBeLZ2wKiUjCgDjIKniQaFAtcR5Je+qr9GUxZ5GWB/9XsaThYw+JxepgMV3hw+tbzavm0 2I6ucMdUBAV1I33kF/MdziZDhQN3rw+iFTty7xOTCQCE19BIsioEmewTGg9vsHAjbK/dTo g9inzXWzYBWhM1MOybd5iH0BB9ySkE+XU3wXMSxRxtl4ZyT42oFqUsxZG5U7bA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7sc02vcVz19bf; Tue, 25 Jun 2024 17:42: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 45PHgeTs040314; Tue, 25 Jun 2024 17:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PHgeFN040311; Tue, 25 Jun 2024 17:42:40 GMT (envelope-from git) Date: Tue, 25 Jun 2024 17:42:40 GMT Message-Id: <202406251742.45PHgeFN040311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: f29bdea04776 - main - ext4_ext_tree_init: correct memset initialization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f29bdea0477625cb3b9de2971e92b67e5bb71178 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=f29bdea0477625cb3b9de2971e92b67e5bb71178 commit f29bdea0477625cb3b9de2971e92b67e5bb71178 Author: Ryan Libby AuthorDate: 2024-06-25 17:41:11 +0000 Commit: Ryan Libby CommitDate: 2024-06-25 17:41:11 +0000 ext4_ext_tree_init: correct memset initialization gcc -Wmemset-elt-size diagnosed this. The code was only initializing 1/4 of the array. However, it was actually harmless, as the only caller had done an M_ZERO allocation anyway. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45701 --- sys/fs/ext2fs/ext2_extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 3ae1da4fe6b7..146aa48f6743 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -711,7 +711,7 @@ ext4_ext_tree_init(struct inode *ip) ip->i_flag |= IN_E4EXTENTS; - memset(ip->i_data, 0, EXT2_NDADDR + EXT2_NIADDR); + memset(ip->i_data, 0, sizeof(ip->i_data)); ehp = (struct ext4_extent_header *)ip->i_data; ehp->eh_magic = htole16(EXT4_EXT_MAGIC); ehp->eh_max = htole16(ext4_ext_space_root(ip)); From nobody Tue Jun 25 19:29:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7vzP0dtTz5PsJT; Tue, 25 Jun 2024 19:29: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 4W7vzP08nJz4MWg; Tue, 25 Jun 2024 19:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719343777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6glgx722v1Ow4SPBVm8KBBNHCqbW1WNJapF2tkEFck8=; b=hH3N65rtAwCG419+mtqVO7Yfk4gzVPaeszLYKje4Bt4YwxXL3QhIggP35QyICiC+SnU+LB FoNpv8yz7hf/5/7L+4VxEqDhgeH18SC4wwx5QVbQM6n9QnX8GoQYYcbKqxfDPAVNwIxp+t FWTerERh2HyMO3PjthcrYznbbYyeQSlCvb8TTpmF1YM39/Yuqn4O3HoGJSpup+1W0xCr27 96HaXB91lz6b1OdZpQeRszvMxVEKIZ3AUqIu5xsigxQDHHwmU329T8NN1nK169khWo9myk q2mlxDrh0eSTP5RQjxW0H9TNOld7kyqlcJfEQqnqrmpc3pY1k0UmJ1guWs+OWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719343777; a=rsa-sha256; cv=none; b=KoqRs72Zt7fsYfVEDMA4mSCCwp98nbxrsbOcgEdL4Dq0qDQOJ3iqQ3T1kxWW7NRyEqlq6+ Tk3s0da1kmWAKwTr8XdXbW63xm+Qo1P4NzZpNvh4q/dQy8j/p2wtOhb8eWk+uszcuQiQVE Cs8rExkQ6qPrUHcdrG/lsayZnZ3P6S0nWSrFl5Ccmwm+pnFSoAYCWurKl206AIQ4XlBdHp ej8zbFw116kTHDe9D6bSMalYY/EzEtiePDI9ykjJCZCbRaWpoWmgZPpjhA0qWbEJq5aUka 2rCAFyY3xXmN7gQxonPF9OXZ4cjCln5RdQG1JKFRXR8l0zJIcd5BBiKVgqlziw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719343777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6glgx722v1Ow4SPBVm8KBBNHCqbW1WNJapF2tkEFck8=; b=aSMpeguAbXaTiOLTMFnWGCBUfS5Xwd9uUfIu1EpH9CAxz8QQU+r8vUIqlhlHGNXcV2J/XU KxiGNnPbYmZ7xu1taDplHh6XXa3kGlwpYNjxMOTGnRzQgO0bv+5VcxCEqHKH4OkXIPCeRr tdAgB33I5NF6zfK69yN892vLg56UDBq7HWw9LGoTJ5v5AlzXVr1fqZSmt+MhHBs33tRna/ RO1Q9sDhNoQXAY3hwnmJxkJuITCbVcjsLeRA8ige+DlfflFBmGdf5eMRRxbn3vTlhLcDBq xSAXai1+vRzOKk3cTSgzAaNe0mz4NySkdXaGyOmlBcPtKLYmPBPrDm22r5vW0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7vzN6sXzzF3H; Tue, 25 Jun 2024 19:29: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 45PJTaoZ009595; Tue, 25 Jun 2024 19:29:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PJTaeg009592; Tue, 25 Jun 2024 19:29:36 GMT (envelope-from git) Date: Tue, 25 Jun 2024 19:29:36 GMT Message-Id: <202406251929.45PJTaeg009592@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: 7d6932d20aed - main - ctladm: Fix a race when loading ctl.ko List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 7d6932d20aedbbb220cd78e90ab4e82d1abaad31 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7d6932d20aedbbb220cd78e90ab4e82d1abaad31 commit 7d6932d20aedbbb220cd78e90ab4e82d1abaad31 Author: Mark Johnston AuthorDate: 2024-06-24 15:09:18 +0000 Commit: Mark Johnston CommitDate: 2024-06-25 19:29:03 +0000 ctladm: Fix a race when loading ctl.ko If multiple ctladm processes try to load ctl.ko at the same time, only one will succeed. Handle this possibility by retrying the operation (open /dev/cam/ctl) if kldload returns EEXIST, rather than bailing. This at least helps ensure that ctladm tests can be run in parallel when ctl.ko is not preloaded. Reviewed by: asomers MFC after: 1 week --- usr.sbin/ctladm/ctladm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 95557406741c..5abc95cddc34 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -4469,7 +4469,7 @@ main(int argc, char **argv) if (fd == -1 && errno == ENOENT) { saved_errno = errno; retval = kldload("ctl"); - if (retval != -1) + if (retval != -1 || errno == EEXIST) fd = open(device, O_RDWR); else errno = saved_errno; From nobody Tue Jun 25 20:32:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7xMq4MgDz5Pxh5; Tue, 25 Jun 2024 20:32: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 4W7xMq3wxnz4Rw8; Tue, 25 Jun 2024 20:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719347543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bw/MtWPdduX7wceXxNImFOAO71d7Rr1WfbD3cRMGwpM=; b=O+uvJJHNWMFa6MnMY38qmnUUfwEPyyB1gtWAeUoOWMjqzJyqy/2yZVO3oD6Wa+RTfHySIa KFTEwMj6j8N52j1SmaWes/l7Q/TpkXrDjVKoFBm4lUCHfTqlx1+MNMYtF1E793EgBcfZzK +PrlL4v4zZJkzAAcZIMKwXgukOv2+DeN8lxBrytckxm3xBFPw+dC+lB8TLfTqwOEM3O2BN YW4K7HiLYprTRE5e3qqfiVCpbAee72DnPPvebUS1j3+BiJph+Mji7apO8rPFYH/ncxApsq Cn0Umhi/zG3CWg6DX1pNTyDmA5CqOilTZizd64gsK9AICfMBPXWgWcs/4j2z6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719347543; a=rsa-sha256; cv=none; b=ELIOyIy2B5kbvIzRurxZpfR90jAaZ9lxeJGye7Mg/zFGZ0W+0wyz2fEmwJJyRO51lC3HxL DwKdPA7r/SM0zFsrE2UuPjECJtb85qRElU0oKvBdfKnQPLfekrCQATE01gV7FujQazkcoE Fjbf9xywz7WA6W5j3fE33NLadJJjyH4GQ49mTQ3Oh70Z+qeMSxEjGFX9e4Hl47i8JM+Agf 3gktwjcF/CCWvCsfZQM2b4wHAByj8HTCzzNWZBI8MKJUXeVh7Y1cT1k9mye9IuRf+HOF0P Y4AccM0Rhfsyg7HfCD42N9W4olwWPyqUS0ET827K63a/MC/DbFH6zxRAjwN57w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719347543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bw/MtWPdduX7wceXxNImFOAO71d7Rr1WfbD3cRMGwpM=; b=aQtUul+D7dwtk+3AgaBkSeBLSq/pYhl5wvE8tdLsaQje6cyi2NORJ+8n5v9etHM7uvceMG QTgKKzAs3t5QmAyjc7FQp1IB6KmxSpM3TZW++Z71TQZDrqSo/6EPF/jkaQZ3GZNxqFe7Se RcsStjfHGWbYxbx5ey7cndivxuewrg4ivpsqZHzvnsnfdWytjGhMJQRvVAg+7LQUrHMLqS RdldV8WKvLmj6tK9YWiCBpgOKOylPrhjgKF0ZVPeL4tmj5Ug39szI4JfX4y0Afwj9h6TBu iRubnis9ub0zvvXADbo/A9ad2y6oCCtTlQeVkfUn1ol2p2UcTmP3HqC9Pcag/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 4W7xMq3XKFzGp8; Tue, 25 Jun 2024 20:32: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 45PKWNa7026611; Tue, 25 Jun 2024 20:32:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45PKWNbS026609; Tue, 25 Jun 2024 20:32:23 GMT (envelope-from git) Date: Tue, 25 Jun 2024 20:32:23 GMT Message-Id: <202406252032.45PKWNbS026609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 3da568710fde - main - stand: module: unlink the entire tail when dependencies fail to load List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/main X-Git-Reftype: branch X-Git-Commit: 3da568710fde08251996c117b87bedb326dedb57 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=3da568710fde08251996c117b87bedb326dedb57 commit 3da568710fde08251996c117b87bedb326dedb57 Author: Kyle Evans AuthorDate: 2024-06-25 20:31:50 +0000 Commit: Kyle Evans CommitDate: 2024-06-25 20:32:08 +0000 stand: module: unlink the entire tail when dependencies fail to load Assume you have loader configured to load linux64, which has a dependency on both linux_common and mqueuefs but neither the kernel nor kernel config in question have the mqueuefs module included. When the load command for linux64 fails to find mqueuefs, it will free both linux64 and linux_common as they were loaded first, but only linux64 gets removed from the module list. As a result, future traversals hit an easy use-after-free with linux_common. Fix it so that we unlink the entire tail of the list. Anything after the initially loaded module is, by definition, a dependency on the loaded module while we're still in the load command, so we can just discard the entire tail. If linux_common were loaded before linux64, it should not move to a position during this load where it would suddenly be missing from the view presented to the kernel. Reported by: philip Reviewed by: imp, philip, tsoome MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45731 --- stand/common/module.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/stand/common/module.c b/stand/common/module.c index 832a8eb4988d..29228f0de22a 100644 --- a/stand/common/module.c +++ b/stand/common/module.c @@ -64,6 +64,7 @@ static char *mod_searchmodule(char *name, struct mod_depend *verinfo); static char * mod_searchmodule_pnpinfo(const char *bus, const char *pnpinfo); static void file_insert_tail(struct preloaded_file *mp); static void file_remove(struct preloaded_file *fp); +static void file_remove_tail(struct preloaded_file *fp); struct file_metadata* metadata_next(struct file_metadata *base_mp, int type); static void moduledir_readhints(struct moduledir *mdp); static void moduledir_rebuild(void); @@ -876,7 +877,7 @@ mod_loadkld(const char *kldname, int argc, char *argv[]) file_insert_tail(fp); /* Add to the list of loaded files */ if (file_load_dependencies(fp) != 0) { err = ENOENT; - file_remove(fp); + file_remove_tail(fp); loadaddr = loadaddr_saved; fp = NULL; break; @@ -1637,25 +1638,45 @@ file_insert_tail(struct preloaded_file *fp) * Remove module from the chain */ static void -file_remove(struct preloaded_file *fp) +file_remove_impl(struct preloaded_file *fp, bool keep_tail) { - struct preloaded_file *cm; + struct preloaded_file *cm, *next; if (preloaded_files == NULL) return; + if (keep_tail) + next = fp->f_next; + else + next = NULL; + if (preloaded_files == fp) { - preloaded_files = fp->f_next; + preloaded_files = next; return; } + for (cm = preloaded_files; cm->f_next != NULL; cm = cm->f_next) { if (cm->f_next == fp) { - cm->f_next = fp->f_next; + cm->f_next = next; return; } } } +static void +file_remove(struct preloaded_file *fp) +{ + + file_remove_impl(fp, true); +} + +static void +file_remove_tail(struct preloaded_file *fp) +{ + + file_remove_impl(fp, false); +} + static char * moduledir_fullpath(struct moduledir *mdp, const char *fname) { From nobody Wed Jun 26 00:35:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W82m51r1wz5QJRc; Wed, 26 Jun 2024 00:35: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 4W82m51C1Cz4lqp; Wed, 26 Jun 2024 00:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719362117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BobzU89A8VikXMKygGrjBwSzvzTGaY3jbZeLlIsw6+E=; b=VUJ23XyiVGtv+EvXRr4BSu6ANzUDCFLj50LctnUgYC8KXqxij8a8krm9m2CZcv+GT7i6NX 5nPT0MTubM01CL82Pg+xRBFO2JcdlAVSW3fOm5UGeLMb6u+aWDnq8vY+dMfEUhcakgTyCd VmLoX/14pDhwh1jFLp5vAOJ0pKoX4uvHN9lJY3UhSPStb3TAOMXb1PH1baCTNFULSdSBGs 47swA1Q8J2maWrCc6f7cJ91ek8NjtGJxq6auz00bYYtuCDUnkkR5wDux7c/A9CcJ44y7Kx b7jLjqnbk/w+7pbMzDICd/1hdiXijl/u26C5t7PKnZJ5wm8IyZ6YSnHqy1W+tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719362117; a=rsa-sha256; cv=none; b=HE0Fe4POJDQvRzgnQLrPLXvd3mrxMxee6hK7/hbph4S1Q6B/m0cw4EoWdWHSa1Wp7wR/+r eyTtKEIXQRaUbwM4zfBsWBeIxrUTPVbtYxeEdDc4YCLIRiVkv+c29hXAXeCZXojEVvYapg SMNUtoqgHsJt/+p2sreP5vM5Rp/hRvf4m0chPpJCqkxF9fP4qI/m9oOazTPm2J/D1ykoZ0 DG//XIU8cBehCp3/11q+qHvH0plu3ifqmb4vh81gZQk4URIWSgz7v17HzG9iCg4o4fL1Qe O2EPQ6tTAM7r3aPaAXgj/mUpHGSYIAjCOlxSzZU+yLRm3hrY8iP7hQeqsSNLXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719362117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BobzU89A8VikXMKygGrjBwSzvzTGaY3jbZeLlIsw6+E=; b=n7WTtLXzmezRQeR5iTckig2G96Mh4E0RA89o0zgJxf6uA1yq/+jzZ+OK9pccCaCwvd1NHu tEtTvc+GNLIWlgNVSfSmLsXRQ1mifGK0yzBgVJjPOQnGRIBZjUcL/06PtI7QxsymJHnnSJ Bs5p7Ymxl7k/P7FuPj+SdT7brXIAo1125oFxFDnHprHfsBIn6eCX5myGcLQW9RM7BEN7q3 pdGyX1B5Mai4BZ7IWlPBIF6iwLKqZ4GhYDfmUnqKkLShwPR1A0w2WYhZMNtTJu9Lo/haFQ BxohcVlgOcEZ3XozJQ4gBOgmL9gmZLNsdlAOm/KJb1vntBEP2Gl9yE/2LeAvDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W82m50pRbzP3b; Wed, 26 Jun 2024 00:35: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 45Q0ZHEb030671; Wed, 26 Jun 2024 00:35:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q0ZHQT030668; Wed, 26 Jun 2024 00:35:17 GMT (envelope-from git) Date: Wed, 26 Jun 2024 00:35:17 GMT Message-Id: <202406260035.45Q0ZHQT030668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 4ef9a9d28afe - stable/14 - release: Publish non-uploaded cloudware 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ef9a9d28afe86d2d73408d893064a56a8db0c32 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4ef9a9d28afe86d2d73408d893064a56a8db0c32 commit 4ef9a9d28afe86d2d73408d893064a56a8db0c32 Author: Colin Percival AuthorDate: 2024-06-19 19:28:42 +0000 Commit: Colin Percival CommitDate: 2024-06-26 00:34:43 +0000 release: Publish non-uploaded cloudware bits While most "cloudware" (AWS, Azure, GCP, Vagrant) images get uploaded to their respective clouds, we have two images -- BASIC-CI and BASIC-CLOUDINIT -- which are published via the FTP mirrors. We have been handling these using a manual and error-prone process of copying them from the internal build directories into the FTP staging tree, but they should be handled using the "make install ftp-stage" mechanism which is used for all the other published images. This commit 1. Adds a new 'make cloud-install' target which is run as part of 'make install' and installs BASIC-CI and BASIC-CLOUDINIT images, and 2. Extends 'make ftp-stage' in Makefile.mirrors to copy those bits into the FTP staging area. As a side benefit, this will also make BASIC-CI and BASIC-CLOUDINIT images available for arm64; until now they have only been available for amd64. MFC after: 1 week (cherry picked from commit 4771c2e9d1c7db949a82dfe4f2b9878bb358a50e) --- release/Makefile | 3 +- release/Makefile.mirrors | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ release/Makefile.vm | 42 +++++++++++++++++++++ 3 files changed, 140 insertions(+), 1 deletion(-) diff --git a/release/Makefile b/release/Makefile index ba9499ac5a3f..32e59a1a5c90 100644 --- a/release/Makefile +++ b/release/Makefile @@ -14,6 +14,7 @@ # install: Invokes the release-install and vm-install targets # release-install: Copies all release installation media into ${DESTDIR} # vm-install: Copies all virtual machine images into ${DESTDIR} +# cloud-install: Copies non-uploaded cloud images into ${DESTDIR} # # Variables affecting the build process: # WORLDDIR: location of src tree -- must have built world and default kernel @@ -329,7 +330,7 @@ real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -install: release-install vm-install +install: release-install vm-install .WAIT cloud-install release-install: .if defined(DESTDIR) && !empty(DESTDIR) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 591fd85b29ea..fd233e7abdb6 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -53,6 +53,11 @@ STAGE_TARGETS+= vm-images-stage VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) +STAGE_TARGETS+= ci-images-stage +CI_DIR= ${TLD}/CI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' @@ -203,6 +208,22 @@ vm-images-stage: ln -s ../${BUILDDATE}/${OSRELEASE}-${FS}-${SNAP_SUFFIX}.${VMFORMAT}.xz \ ${OSRELEASE}-${FS}.${VMFORMAT}.xz . endfor +. endfor +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CLOUDINIT +. for VMFORMAT in ${${CW}_FORMAT} +. for FS in ${${CW}_FSLIST} + cd ${RELEASEDIR}/vmimages && \ + mv ${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \ + ${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz + cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \ + ${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz + cd ${VM_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \ + ${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz +. endfor +. endfor +. endif . endfor cd ${RELEASEDIR}/vmimages && rm -f CHECKSUM.* . for CHECKSUM in ${CHECKSUM_FILES} @@ -227,11 +248,86 @@ vm-images-stage: ${VM_DIR}/Latest/${OSRELEASE}-${FS}.${VMFORMAT}.xz . endfor . endfor +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CLOUDINIT +. for VMFORMAT in ${${CW}_FORMAT} +. for FS in ${${CW}_FSLIST} + cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \ + ${VM_DIR}/Latest/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz +. endfor +. endfor +. endif +. endfor . for CHECKSUM in ${CHECKSUM_FILES} cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM} \ ${VM_DIR}/Latest/CHECKSUM.${CHECKSUM} . endfor .endif +ci-images-stage: + mkdir -p ${CI_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${CI_DIR}/Latest) + rm -rf ${CI_DIR}/Latest +. endif + mkdir -p ${CI_DIR}/Latest + mkdir -p ${CI_DIR}/${BUILDDATE} +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CI +. for VMFORMAT in ${${CW}_FORMAT} +. for FS in ${${CW}_FSLIST} + cd ${RELEASEDIR}/ciimages && \ + mv ${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz \ + ${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz + cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \ + ${CI_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz + cd ${CI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \ + ${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz +. endfor + cd ${RELEASEDIR}/ciimages && \ + mv ${OSRELEASE}-${CW}.${VMFORMAT}.xz \ + ${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${VMFORMAT}.xz + cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${VMFORMAT}.xz \ + ${CI_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${VMFORMAT}.xz + cd ${CI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${VMFORMAT}.xz \ + ${OSRELEASE}-${CW}.${VMFORMAT}.xz +. endfor +. endif +. endfor + cd ${RELEASEDIR}/ciimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ciimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ciimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${CI_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${CI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${CI_DIR}/Latest) + rm -rf ${CI_DIR}/Latest +. endif + mkdir -p ${CI_DIR}/Latest +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CI +. for VMFORMAT in ${${CW}_FORMAT} +. for FS in ${${CW}_FSLIST} + cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz \ + ${CI_DIR}/Latest/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz +. endfor + cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}.${VMFORMAT}.xz \ + ${CI_DIR}/Latest/${OSRELEASE}-${CW}.${VMFORMAT}.xz +. endfor +. endif +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cp -p ${RELEASEDIR}/ciimages/CHECKSUM.${CHECKSUM} \ + ${CI_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif + ftp-stage: remove-old-bits ${STAGE_TARGETS} diff --git a/release/Makefile.vm b/release/Makefile.vm index 95d48490c353..71a4392b6b0c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -223,6 +223,48 @@ vm-install: ${DESTDIR}/vmimages/CHECKSUM.SHA256 .endif +cloud-install-BASIC-CI: + mkdir -p ${DESTDIR}/ciimages +.for _FS in ${BASIC-CI_FSLIST} +. for _FMT in ${BASIC-CI_FORMAT} + cp -p ${.OBJDIR}/${BASIC-CI${_FS:tu}${_FMT:tu}IMAGE} \ + ${DESTDIR}/ciimages/${OSRELEASE}-BASIC-CI-${_FS}.${_FMT} + ${XZ_CMD} ${DESTDIR}/ciimages/${OSRELEASE}-BASIC-CI-${_FS}.${_FMT} +. endfor +.endfor +.for _FMT in ${BASIC-CI_FORMAT} + ln -f ${DESTDIR}/ciimages/${OSRELEASE}-BASIC-CI-${VMFS}.${_FMT}.xz \ + ${DESTDIR}/ciimages/${OSRELEASE}-BASIC-CI.${_FMT}.xz +.endfor + cd ${DESTDIR}/ciimages && sha512 ${OSRELEASE}* > \ + ${DESTDIR}/ciimages/CHECKSUM.SHA512 + cd ${DESTDIR}/ciimages && sha256 ${OSRELEASE}* > \ + ${DESTDIR}/ciimages/CHECKSUM.SHA256 + +cloud-install-BASIC-CLOUDINIT: + mkdir -p ${DESTDIR}/vmimages +.for _FS in ${BASIC-CLOUDINIT_FSLIST} +. for _FMT in ${BASIC-CLOUDINIT_FORMAT} + cp -p ${.OBJDIR}/${BASIC-CLOUDINIT${_FS:tu}${_FMT:tu}IMAGE} \ + ${DESTDIR}/vmimages/${OSRELEASE}-BASIC-CLOUDINIT.${_FS}.${_FMT} + ${XZ_CMD} ${DESTDIR}/vmimages/${OSRELEASE}-BASIC-CLOUDINIT.${_FS}.${_FMT} +. endfor +.endfor + cd ${DESTDIR}/vmimages && sha512 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA512 + cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA256 + +CLOUD_INSTALL_TGTS= +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) +. for _CW in ${CLOUDWARE} +. if target(cloud-install-${_CW}) +CLOUD_INSTALL_TGTS+= cloud-install-${_CW} +. endif +. endfor +.endif +cloud-install: ${CLOUD_INSTALL_TGTS} + .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) vm-release: ${VMTARGETS} .else From nobody Wed Jun 26 00:35:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W82m645yyz5QJX7; Wed, 26 Jun 2024 00:35: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 4W82m62RhLz4llj; Wed, 26 Jun 2024 00:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719362118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vZDqTOkTQaAqCZ/xETWa52Uj2DcIMHrsblz/G9Y5FLM=; b=ZmhqK3eE7xhGd2VrskKucucrg6xEAJSADw1OSb0bHSDowyxqGrf93tWTLRRFAz7nUpbM7K mJIvPBOrPo9yfW++/pHuFLbuywIgGGaTm64Hg0pznaYxC+GKu8F8r+JiC5qCwVs3cvelAZ bk/2vpGGJVxsAaytTnTC7Ndv/p7+mZG6NKaaj8XrpNw0i0ZuL+TjK4+iaaht3YtiqmeUaW BOrWcdSpxucZhGWbqvDzZSW3TYs8GDLVg3d+G+qOUfYhNMOcoJvFZSFUoObJCJIEBpgg3z +ssh1fu9LOTALwpGCQ3A84m374Eqpg/7gNfztKWjD8rHWSxD0G8TbkE4MB+wCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719362118; a=rsa-sha256; cv=none; b=rEft/35V0tVaKC1C5Svcm8imVFTT+nMsC/d3SWUzM8l0UXAWCu92ep0jkWx/oDyHw7BEhZ Gs1qQqu392s6SLnrNlPGpIQEHPENWGdQD1AwgSNaNSfaixzpey6EUFsZMJz3PJXWHzNF5h 5Ytziv4oj274A0BUeWlYTa9gJHt5aK2RnLJF02WyR6xpJoRJvyn3oIbkcvv6sJa+mYS02x D0trXydvLx+bgfuvzg2IyrqrvfgVnF770rxCWvkDuhfERznupr9fNQcydRFdyIlaKnOqqn GUXdpKbAZuLWy3ztA8bF6qIjTkEbT2TbeIzyXoHaOPwt2kGnu24neaDWQZw0mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719362118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vZDqTOkTQaAqCZ/xETWa52Uj2DcIMHrsblz/G9Y5FLM=; b=J0DKO7whCAitnZTSv12ovUpOhgsPqtSuakyRevxWEHtOXcptxDLkjC+hz4QHkikPEc4+Gz hjORgtcpz2emDTqWTfVthhB4ueTL6Nw58rRmu3mKE+yVOJPV3/kdSQGBkhFZdh/HdQcOd/ oq3ilPTfU0RyLiq9co6E0ZCDSFeaAhqZo3SzNFk82bNbWuejRVwLXnp9C55TCE+RDSPXVX 1vK/WPXTWY3r/LpLxMAKIHhOYzwqyG15lyVZvvvSxw4hB9os2KeXh6RaV72SteQ8xcVSvc t7u1cyRPtwFmS5BAzlhVnI0heDnWqvy578XBBuzEISE+iHmUkzTRXV1gDK1Rmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W82m61mbbzNZ9; Wed, 26 Jun 2024 00:35: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 45Q0ZIjC030716; Wed, 26 Jun 2024 00:35:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q0ZIHN030713; Wed, 26 Jun 2024 00:35:18 GMT (envelope-from git) Date: Wed, 26 Jun 2024 00:35:18 GMT Message-Id: <202406260035.45Q0ZIHN030713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 443a4ce9d401 - stable/14 - release: Don't publish CW if !WITH_CLOUDWARE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 443a4ce9d401db290a552558787765e413b34484 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=443a4ce9d401db290a552558787765e413b34484 commit 443a4ce9d401db290a552558787765e413b34484 Author: Colin Percival AuthorDate: 2024-06-21 00:38:46 +0000 Commit: Colin Percival CommitDate: 2024-06-26 00:34:43 +0000 release: Don't publish CW if !WITH_CLOUDWARE If WITH_CLOUDWARE is not set, we didn't build BASIC-CLOUDWARE; don't try to install it into the /VM-IMAGES/ directory as part of ftp-stage. Fixes: 4771c2e9d1c7 "release: Publish non-uploaded cloudware bits" MFC after: 6 days (cherry picked from commit 836f00ebb96ac343e0f8a68ea264d2d330198488) --- release/Makefile.mirrors | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index fd233e7abdb6..1888f86d3002 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -209,10 +209,11 @@ vm-images-stage: ${OSRELEASE}-${FS}.${VMFORMAT}.xz . endfor . endfor -. for CW in ${CLOUDWARE} -. if ${CW} == BASIC-CLOUDINIT -. for VMFORMAT in ${${CW}_FORMAT} -. for FS in ${${CW}_FSLIST} +. if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CLOUDINIT +. for VMFORMAT in ${${CW}_FORMAT} +. for FS in ${${CW}_FSLIST} cd ${RELEASEDIR}/vmimages && \ mv ${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \ ${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz @@ -221,10 +222,11 @@ vm-images-stage: cd ${VM_DIR}/Latest && \ ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \ ${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz +. endfor . endfor -. endfor -. endif -. endfor +. endif +. endfor +. endif cd ${RELEASEDIR}/vmimages && rm -f CHECKSUM.* . for CHECKSUM in ${CHECKSUM_FILES} cd ${RELEASEDIR}/vmimages && \ @@ -248,16 +250,18 @@ vm-images-stage: ${VM_DIR}/Latest/${OSRELEASE}-${FS}.${VMFORMAT}.xz . endfor . endfor -. for CW in ${CLOUDWARE} -. if ${CW} == BASIC-CLOUDINIT -. for VMFORMAT in ${${CW}_FORMAT} -. for FS in ${${CW}_FSLIST} +. if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CLOUDINIT +. for VMFORMAT in ${${CW}_FORMAT} +. for FS in ${${CW}_FSLIST} cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \ ${VM_DIR}/Latest/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz +. endfor . endfor -. endfor -. endif -. endfor +. endif +. endfor +. endif . for CHECKSUM in ${CHECKSUM_FILES} cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM} \ ${VM_DIR}/Latest/CHECKSUM.${CHECKSUM} From nobody Wed Jun 26 00:53:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W838m0PYtz5QL6g; Wed, 26 Jun 2024 00:53: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 4W838l6rfSz4ppB; Wed, 26 Jun 2024 00:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719363192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XM8VdKxqtBxJlShOGtL6ApstM+1VvDBaCj1cocXlS0c=; b=olD18h4OFiqiv/x6TguL2w+1ayP7FSqg4PBf0rNT6wjx4tBrwdBmFrrjEMlSgrxa0Nwtjb FNThg2Z61BgFmeVEIm0xDx4C2X2DxvoIkCeD6R4Sik5lZM+SmN3boyLThuEcg7bLlL/f0X J09gH/W7hialO091WeEDNcbqJoBwrYYy0+QyzlwDseLEI+8wf2uue5D9SaYDJa85dvtbmZ m+3uJrE+u+kjT33MSeJU5gr/hApPib0eeOXNMTwXo58tFKwxmiFLmBx2PojD0unHdTp4xG rJf47SKJ2DItPhM91YB0V06Yp4dUa+RyTADkhcNnP7fHwI61fxwtSyh0wjIP4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719363192; a=rsa-sha256; cv=none; b=jKvjPnTjpSSs8EO2RKeimoMq38oJV84XinWvjtzCcrYSNhRlRAFapMoEyUrD5f19Oi2TZD hsyubOEtaIEhhFwD2Jf9hg4p3iukilAz1dny5aHUIAoiGUsfHhua9QIk1kUbVbiTHnBYjy IUgQWO3tcdB6QRQpmMayRU2Xo0kPjTPZ4Lm3d0iXg585RSjwMUql3TL78l4r+opzc39bQh IW8eXCbpKOCRg8uZnfl9FY8hpM9yFgq6EXvlssBaSKlcx+M4vSZq9O+f9ivcwkcCw9nc94 w4soY63xFRZK3iWv7Q1IJs4ofwZmLxgSo4LdRqu4rKJ2+96FsfVZzHci8zJt2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719363192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XM8VdKxqtBxJlShOGtL6ApstM+1VvDBaCj1cocXlS0c=; b=PSmM4UA1v6kPpXSVvzHiJClgw5Zel/iIAgIVQraVCec0EUhck6IPVOaNopRNVjD9xhQZGC a7nKoLMf480wx7rRn3TmMEQgm1jDe0Uw3MALTF+VHvFYmYBDvUlxbRRPDzNNSBm1gU5P27 L7Up/uxLquJX4Ve1ZMhwy+M4IFxF9kX5Mx1zzA94fzb8BcMooW252Q+8GtIRA5wHDbKjWE c+ASz8WqdG2WxW+H9eOfPQT90g/YaXrjdYpThH2uGyJFpYorxzUq6C9UOVXeGcMyU5ZlSJ x2tvB3AH4ppZIPoUF/LE+lIdbjan224mXhzMkmCcosNjdug7vPxW0/NKpB+zLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W838l5kpTzPJT; Wed, 26 Jun 2024 00:53: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 45Q0rBu2064018; Wed, 26 Jun 2024 00:53:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q0rB3u064015; Wed, 26 Jun 2024 00:53:11 GMT (envelope-from git) Date: Wed, 26 Jun 2024 00:53:11 GMT Message-Id: <202406260053.45Q0rB3u064015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: d6fecbebfcea - stable/13 - release: Publish non-uploaded cloudware 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: d6fecbebfcea804cc00ead9e93b16ce72b4a7f3d Auto-Submitted: auto-generated The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d6fecbebfcea804cc00ead9e93b16ce72b4a7f3d commit d6fecbebfcea804cc00ead9e93b16ce72b4a7f3d Author: Colin Percival AuthorDate: 2024-06-19 19:28:42 +0000 Commit: Colin Percival CommitDate: 2024-06-26 00:52:55 +0000 release: Publish non-uploaded cloudware bits [MFC note: We don't have BASIC-CLOUDINIT or support for multiple disk formats or filesystems in VMs on 13.x so this MFC only does BASIC-CI and only for UFS on RAW.] While most "cloudware" (AWS, Azure, GCP, Vagrant) images get uploaded to their respective clouds, we have two images -- BASIC-CI and BASIC-CLOUDINIT -- which are published via the FTP mirrors. We have been handling these using a manual and error-prone process of copying them from the internal build directories into the FTP staging tree, but they should be handled using the "make install ftp-stage" mechanism which is used for all the other published images. This commit 1. Adds a new 'make cloud-install' target which is run as part of 'make install' and installs BASIC-CI and BASIC-CLOUDINIT images, and 2. Extends 'make ftp-stage' in Makefile.mirrors to copy those bits into the FTP staging area. As a side benefit, this will also make BASIC-CI and BASIC-CLOUDINIT images available for arm64; until now they have only been available for amd64. MFC after: 1 week (cherry picked from commit 4771c2e9d1c7db949a82dfe4f2b9878bb358a50e) --- release/Makefile | 3 ++- release/Makefile.mirrors | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ release/Makefile.vm | 20 +++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/release/Makefile b/release/Makefile index 7e6bc566961c..55d82a0d0f5e 100644 --- a/release/Makefile +++ b/release/Makefile @@ -14,6 +14,7 @@ # install: Invokes the release-install and vm-install targets # release-install: Copies all release installation media into ${DESTDIR} # vm-install: Copies all virtual machine images into ${DESTDIR} +# cloud-install: Copies non-uploaded cloud images into ${DESTDIR} # # Variables affecting the build process: # WORLDDIR: location of src tree -- must have built world and default kernel @@ -267,7 +268,7 @@ real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -install: release-install vm-install +install: release-install vm-install .WAIT cloud-install release-install: .if defined(DESTDIR) && !empty(DESTDIR) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index cbc5cd768e28..904040eb11ba 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -53,6 +53,11 @@ STAGE_TARGETS+= vm-images-stage VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) +STAGE_TARGETS+= ci-images-stage +CI_DIR= ${TLD}/CI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' @@ -219,5 +224,52 @@ vm-images-stage: . endfor .endif +ci-images-stage: + mkdir -p ${CI_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${CI_DIR}/Latest) + rm -rf ${CI_DIR}/Latest +. endif + mkdir -p ${CI_DIR}/Latest + mkdir -p ${CI_DIR}/${BUILDDATE} +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CI + cd ${RELEASEDIR}/ciimages && \ + mv ${OSRELEASE}-${CW}.raw.xz \ + ${OSRELEASE}-${CW}-${SNAP_SUFFIX}.raw.xz + cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.raw.xz \ + ${CI_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.raw.xz + cd ${CI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.raw.xz \ + ${OSRELEASE}-${CW}.raw.xz +. endif +. endfor + cd ${RELEASEDIR}/ciimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/ciimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/ciimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${CI_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${CI_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${CI_DIR}/Latest) + rm -rf ${CI_DIR}/Latest +. endif + mkdir -p ${CI_DIR}/Latest +. for CW in ${CLOUDWARE} +. if ${CW} == BASIC-CI + cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}.raw.xz \ + ${CI_DIR}/Latest/${OSRELEASE}-${CW}.raw.xz +. endif +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cp -p ${RELEASEDIR}/ciimages/CHECKSUM.${CHECKSUM} \ + ${CI_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif + ftp-stage: remove-old-bits ${STAGE_TARGETS} diff --git a/release/Makefile.vm b/release/Makefile.vm index 2e5bdb9a7004..520f47ab3ca6 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -174,6 +174,26 @@ vm-install: ${DESTDIR}/vmimages/CHECKSUM.SHA256 .endif +cloud-install-BASIC-CI: + mkdir -p ${DESTDIR}/ciimages + cp -p ${.OBJDIR}/${BASIC-CIIMAGE} \ + ${DESTDIR}/ciimages/${OSRELEASE}-BASIC-CI.raw + ${XZ_CMD} ${DESTDIR}/ciimages/${OSRELEASE}-BASIC-CI.raw + cd ${DESTDIR}/ciimages && sha512 ${OSRELEASE}* > \ + ${DESTDIR}/ciimages/CHECKSUM.SHA512 + cd ${DESTDIR}/ciimages && sha256 ${OSRELEASE}* > \ + ${DESTDIR}/ciimages/CHECKSUM.SHA256 + +CLOUD_INSTALL_TGTS= +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) +. for _CW in ${CLOUDWARE} +. if target(cloud-install-${_CW}) +CLOUD_INSTALL_TGTS+= cloud-install-${_CW} +. endif +. endfor +.endif +cloud-install: ${CLOUD_INSTALL_TGTS} + vm-release: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} From nobody Wed Jun 26 01:35:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W84563zFvz5NgG7; Wed, 26 Jun 2024 01:35: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 4W84563FYMz4v9l; Wed, 26 Jun 2024 01:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719365706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Lwljs9IYJpLvROQO01bdITrvT0E5gwRulSD260m0UA=; b=AmBzYnMo+mnNNT7Bgi0lTkhyQJoDJ/FKzK/Y1HzcnQ9BgsCxpx2SaVW7WajbOwSClSXtmG p0pouG8gLY50acLIQLQRHXHDZU69JEG9DRb2DaqGov9bhbBPfqa/0tQp6fg1d1POyCn0AU Outkd8rzxTFKrgcdUne9MPvb3Aklva2QIP8ROV8U3TOMxH/Fhrd5PXi4yc5I3PTb1Wc/t2 VOG1ES0OqeWAa0WJhYr8Sc5Lb2FHMeQ4B7dABzBSdVEF1qguaj492/43YBfarF198bppwA 9aaJAskaFMGLYwvv1yZbSeC1/QWQHjmLG2UnJPMnciaQUFVYTwb9aMvqZbsJ3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719365706; a=rsa-sha256; cv=none; b=c4VzDn76nsApVoMaQekeqE7kulH6yck/Huw/dEaru618bzLFw3jLtzCk3OdoObv/oWNdRx 07BYxa9M19xSFfpNVAjD5qzL57EsGtxsFgEqP+CeGwXojq0hX8pIuE6JslNV7kOgWzmyhQ m9V5PpLmzp1RFgLK4jry+i0CRtVVmVNw6JVmE2ZfexNeH4LvLWDdL4Vj5CsC8ccWfL09rx BuacDH2vAdSbGCC5b0z2gbLhsOspuwUv3tjvR0odwYhTUtRl95IoucUNuJ1L7b7SDPh7Sd XJi7Lv4xFp7kh1lb2CxdwNDzdelj/ZMoUZQTFYKZUESBfT4VXb0wF30VwX165A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719365706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Lwljs9IYJpLvROQO01bdITrvT0E5gwRulSD260m0UA=; b=y11PA3i2uSRnvi4erT0M0nYrr2r1RAKzd9PWXvYLFPntq338sjxiwWY7kGLsTfho82hCwY T8dkSR0vY0gg0lm0VRURmiULBa4iovSL2pYtAU7/ZLBlCuStaHhSVJBMSwUc0zJ9k1TXPf OQu+h+CFJPJIvPHcyBoboCU8hXfhEuy3CClgjipAeJu+OcRwW2lM8SCZfNfb7wr5zWMAY8 366h2XRwrUni7HjWAYIUI6H4GEPKmQXk4mUzNDnDbR67W22XLwhwZQsTtCVhy4zPd9k/87 YsaoW0ovutkJZV0g6eY5t1Pd/nx5FK+53Gi/NE8Uv1/S3panVOTJf2bGT5Dmjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W84562sQqzQG6; Wed, 26 Jun 2024 01:35: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 45Q1Z6wo033099; Wed, 26 Jun 2024 01:35:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q1Z6jv033096; Wed, 26 Jun 2024 01:35:06 GMT (envelope-from git) Date: Wed, 26 Jun 2024 01:35:06 GMT Message-Id: <202406260135.45Q1Z6jv033096@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: b2351a4ba5ef - main - test: disable sys.kern.unix_seqpacket_test.random_eor_and_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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b2351a4ba5ef34db040fc5ac4c54ccbac23492e8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b2351a4ba5ef34db040fc5ac4c54ccbac23492e8 commit b2351a4ba5ef34db040fc5ac4c54ccbac23492e8 Author: Warner Losh AuthorDate: 2024-06-26 01:33:05 +0000 Commit: Warner Losh CommitDate: 2024-06-26 01:35:13 +0000 test: disable sys.kern.unix_seqpacket_test.random_eor_and_waitall It's been failing for a while, at least some of the time. PR: 279994 Sponsored by: Netflix --- tests/sys/kern/unix_seqpacket_test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index dc5f89270a07..3befeceb3d0a 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -1197,6 +1197,9 @@ ATF_TC_BODY(random_eor_and_waitall, tc) size_t off; int fd[2], eor; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/279994"); + arc4random_buf(params.seed, sizeof(params.seed)); printf("Using seed:"); for (u_int i = 0; i < (u_int)sizeof(params.seed)/sizeof(u_short); i++) From nobody Wed Jun 26 04:50:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QM6XZQz5P0BL; Wed, 26 Jun 2024 04:50: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 4W88QM5dmnz56yJ; Wed, 26 Jun 2024 04:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6brjpjskV3RGb5JEIY+nN4jDCWXOtRyaKtHfIlps5Gg=; b=WAZZHpBWO5G2Am1c3EyP9nLRAZHuMyPvFc9QXJ8Eft4V6q/QsnNfYQhGtwwD7hjV3Aazsm r2CkLP+523tB+yd3EsCVHXlXzhtb82cZxwH7dakVox9mjeMXkEyAyKDATYrYs+UaWaxH5P GKsUJ0am1wXHsTDCpRi566wfw+EyIugE4pFTos/kRiIGP49CfJjZGG658xZjcBwB5UbV+m znRnc0yYsFxgt1MacshrzeQg22zVvBXT3hUN/7wuqv31OVtdmurSDJHC/82TQmO8xA+LRi /1C6XXtp+z/oPsMNJzDgoPyskRTJGjTEGSL6nzGFTN71e0/qwynOsIRY4RJkyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377419; a=rsa-sha256; cv=none; b=I85mdUGZwWpQc7rt9+zQghHL3Eo7sWKcD2pk6O0QheUtoeBxaYC3PXUAWbMF1HU7Iwp1yA EngW6Qzir0ksjCadKf795DQmO2ZLX9IeqXhFd9JA5D6v+VvST1gCfkW3PwY3uitLm3kfPm tzU/3RXWGzO2tyVzvKVI/ygD6QRly64Hld0id8E9PJqJZVHaeXBQf5zCzHkgpSIq4eGGXr +ByrYUdmsNvL2oFB7GwLfJYtEULV02vRuERukwSo6xYcHoS2TvdO0FOTNK6KTpTzaUjuE9 QyiOs6gzcZ8lo/6UmHyLOSnpE4N4Gvb2ieaIcuHSLh8SKvu6IqPXn2KjH042SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6brjpjskV3RGb5JEIY+nN4jDCWXOtRyaKtHfIlps5Gg=; b=T2yjWHyXfOlAsKPedFN89TNuLkr0jlhA3mQMwnwepqKKp7Lq9cWq53dLvxOLKauTkCD+Ic SuQ7xA4dcCdbnPubzTZCzBdMK22gnZL1MPgjfelQMVPjvJhnRdii/16CQmnE2XtiShxxI/ U9h7Hoe3kP/TvHdI11S11hUfgTNUmhgJUhDDFcSSSStR/zEP1kqmPnm6XmM58XgSm/Ibm6 tJCjfdK+iFKko9a0tMb/kwQIstN0XHYl9k3CEC22LDd9lkUjyHlhDgXiWUCjPQtVLk80Yu KraRG1IT7GW72W9cxl3u8Rz4VTH6Z/YY8w9EHKBTmzirWfz+fNIiVd/fgBapDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QM5DtbzX89; Wed, 26 Jun 2024 04:50: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 45Q4oJtf063570; Wed, 26 Jun 2024 04:50:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oJ5h063567; Wed, 26 Jun 2024 04:50:19 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:19 GMT Message-Id: <202406260450.45Q4oJ5h063567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 2193c63f9ad1 - stable/14 - icmp: do not store per-VNET identical array of 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2193c63f9ad16ce6fa9ed1747a87a4db26feda68 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2193c63f9ad16ce6fa9ed1747a87a4db26feda68 commit 2193c63f9ad16ce6fa9ed1747a87a4db26feda68 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:42 +0000 icmp: do not store per-VNET identical array of strings We need per-VNET struct counter_rate, but we don't need per-VNET set of const char *. Also, identical word "response" can go into the format string instead of being stored 7 times. Reviewed by: kp, zlei, tuexen Differential Revision: https://reviews.freebsd.org/D44475 (cherry picked from commit 7142ab4790666022a2a3d85910e9cd8e241d9b87) --- sys/netinet/ip_icmp.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index c99499d689db..89ba56dd1b11 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1093,28 +1093,26 @@ ip_next_mtu(int mtu, int dir) * the 'final' error, but it doesn't make sense to solve the printing * delay with more complex code. */ -struct icmp_rate { - const char *descr; - struct counter_rate cr; -}; -VNET_DEFINE_STATIC(struct icmp_rate, icmp_rates[BANDLIM_MAX]) = { - { "icmp unreach response" }, - { "icmp ping response" }, - { "icmp tstamp response" }, - { "closed port RST response" }, - { "open port RST response" }, - { "icmp6 unreach response" }, - { "sctp ootb response" } -}; +VNET_DEFINE_STATIC(struct counter_rate, icmp_rates[BANDLIM_MAX]); #define V_icmp_rates VNET(icmp_rates) +static const char *icmp_rate_descrs[BANDLIM_MAX] = { + [BANDLIM_ICMP_UNREACH] = "icmp unreach", + [BANDLIM_ICMP_ECHO] = "icmp ping", + [BANDLIM_ICMP_TSTAMP] = "icmp tstamp", + [BANDLIM_RST_CLOSEDPORT] = "closed port RST", + [BANDLIM_RST_OPENPORT] = "open port RST", + [BANDLIM_ICMP6_UNREACH] = "icmp6 unreach", + [BANDLIM_SCTP_OOTB] = "sctp ootb", +}; + static void icmp_bandlimit_init(void) { for (int i = 0; i < BANDLIM_MAX; i++) { - V_icmp_rates[i].cr.cr_rate = counter_u64_alloc(M_WAITOK); - V_icmp_rates[i].cr.cr_ticks = ticks; + V_icmp_rates[i].cr_rate = counter_u64_alloc(M_WAITOK); + V_icmp_rates[i].cr_ticks = ticks; } } VNET_SYSINIT(icmp_bandlimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, @@ -1125,7 +1123,7 @@ icmp_bandlimit_uninit(void) { for (int i = 0; i < BANDLIM_MAX; i++) - counter_u64_free(V_icmp_rates[i].cr.cr_rate); + counter_u64_free(V_icmp_rates[i].cr_rate); } VNET_SYSUNINIT(icmp_bandlimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, icmp_bandlimit_uninit, NULL); @@ -1144,7 +1142,7 @@ badport_bandlim(int which) if ((V_icmplim + V_icmplim_curr_jitter) <= 0) V_icmplim_curr_jitter = -V_icmplim + 1; - pps = counter_ratecheck(&V_icmp_rates[which].cr, V_icmplim + + pps = counter_ratecheck(&V_icmp_rates[which], V_icmplim + V_icmplim_curr_jitter); if (pps > 0) { /* @@ -1162,8 +1160,9 @@ badport_bandlim(int which) if (pps == -1) return (-1); if (pps > 0 && V_icmplim_output) - log(LOG_NOTICE, "Limiting %s from %jd to %d packets/sec\n", - V_icmp_rates[which].descr, (intmax_t )pps, V_icmplim + + log(LOG_NOTICE, + "Limiting %s response from %jd to %d packets/sec\n", + icmp_rate_descrs[which], (intmax_t )pps, V_icmplim + V_icmplim_curr_jitter); return (0); } From nobody Wed Jun 26 04:50:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QP02BKz5P0Cl; Wed, 26 Jun 2024 04:50: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 4W88QN6Yxsz56vp; Wed, 26 Jun 2024 04:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IyqnednLFGx4iQGPce/T0pctij+9OYapbUuFQQYCsI0=; b=iP6ArdYqyEp30N5zx+ge0pLdAmapNw6Mx+um1wpBPh+Yx+aG07xxGlyekbzppkexP7JBz4 o7MZhEfv37eb0lNml7ThHzpLaq+9yyfq+1DICbtRbw27p8K+4VOnisR8jzm9ebZqnAB1k9 co4qnKvD6HcBpbsazRcUwbDQL05L4eFErWaUwfNu3HZqgH6XFYDM3KpAU/z88lPdfS/62l tEY/CSS3ONXAePqNoWMeNoT+Pj2rDRz8Gf/AxZ2fJyy5jDB16BGxC7qRrZe1v65NGqzUvW hvFHrV4c4Laxm90ohdjcRBqOhzJGzQ0wvg8/LNplSFqdEo/PkkDVrjS5Lx2yQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377420; a=rsa-sha256; cv=none; b=cVSQsX04RhefwQ+nBrqpdVVFLIgi/aA6rFOLjyTkNM65gKDnb9fw6HRMxtRGaPjQ81iJy+ W9AiOMqZUHKxhO/WMqeRNFGGEFewRnGTJzrYgCwA5J7mEoW7NHjXetngLMw8xzy/Jwu/DV MUD5Y6qjWmdb3Scjbro4+KewLJSBxKrFCMV+wkR/JDfCzy7UuiGRAWVI9GGb2GhJ6infl/ 6hpXvdyymVDmfU6g5/vv/3xk8YbfeGNifaPX8t14IWZx08ONKBLX4wjoDkgpSgJW48aK82 TLHyGE+1Sq6j/NqeC5nE0iZaX4nyTOAC24ypTUtGhPomVgs9p3jvsZL0JACJ0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IyqnednLFGx4iQGPce/T0pctij+9OYapbUuFQQYCsI0=; b=mqWla60TC4vod/UNgJPeMEf8iJJ26EmXBMcBpYaQKbTmWc2yjcqdAwKuqShBatqtjQcihl Wsb5RUeML69S3Ypd84HVr1UnKAARZDwwDFzr9nuTyx9ESzRCzFdB/OcJDN8t4iiVkAoIZu tkl2IJPw3XLrisd8IhHrvFA7DlJYHrZLN8nbltyQ8dCGnZmSUg0of7jFGP5LHq6PlgEFFe 9Alhf0Cb6LfEjMUyg7pyyvXb8aeSbt3JR66NeTC1otlPWa+1C/3rSI0Eh5YecswYxcdEO+ xGg9Akc2HqucCRSbUZe4XHqBqpbxNTngUre/7BkL+Frna3JBWPqr0MWWZt2RQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QN69VMzXBt; Wed, 26 Jun 2024 04:50: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 45Q4oKOj063618; Wed, 26 Jun 2024 04:50:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oK2o063615; Wed, 26 Jun 2024 04:50:20 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:20 GMT Message-Id: <202406260450.45Q4oK2o063615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c04006ea039f - stable/14 - icmp: hide icmp_bandlimit_uninit() under VIMAGE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: c04006ea039f24761622caa5e2e7e188fa4b2791 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c04006ea039f24761622caa5e2e7e188fa4b2791 commit c04006ea039f24761622caa5e2e7e188fa4b2791 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:43 +0000 icmp: hide icmp_bandlimit_uninit() under VIMAGE The uninitialization may be executed only on a kernel with VIMAGE. Reviewed by: kp, tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44476 (cherry picked from commit 9d7f17d7467ed8c9740730a8db7a82e4768e5177) --- sys/netinet/ip_icmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 89ba56dd1b11..39eb46fd2d90 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1118,6 +1118,7 @@ icmp_bandlimit_init(void) VNET_SYSINIT(icmp_bandlimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, icmp_bandlimit_init, NULL); +#ifdef VIMAGE static void icmp_bandlimit_uninit(void) { @@ -1127,6 +1128,7 @@ icmp_bandlimit_uninit(void) } VNET_SYSUNINIT(icmp_bandlimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, icmp_bandlimit_uninit, NULL); +#endif int badport_bandlim(int which) From nobody Wed Jun 26 04:50:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QQ2wrjz5P0Jr; Wed, 26 Jun 2024 04:50: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 4W88QQ0VM0z571n; Wed, 26 Jun 2024 04:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B8Z1nqayFjrqFlUQzXZSH5Ly3icVrbDlx7fZ8JMvlnc=; b=Ut4DHCXduRXSKi7ye46ps5BRgCXtryqLYjcyYX6t++Cey3LebtKj+yQw631oijGq5SrZwY SDrL2hZXJ1JR4S6qOzNvZSYL3dmrGkjs5qPoa1z976I0SCgkjsZYPgaN4uLT2EhcPNeRDj eyZvkEoGbKIcdrFUwb58WtJV2bpE0R4wmh+nYGLGnTL8gk22M1KvSFb8BY/lPzQShV3u4H o+JoC7Uf+OTotogBPA7ekvyeFwRo4nBgqNOfrgzxjd6c6b18iH2m0jWBY1lp0SP+f1Dy9N QOcCpvo3gpPo2ank3OP2DooKYx7yFqRCrQ1/OyvOxNzNeebrX+Xuzt+fIaLqdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377422; a=rsa-sha256; cv=none; b=wAK1TfXHhPLfTbrUnBQ67qYG/BoRauRURVqbrbloUdkXNDQ7dbmlkLDDWP4Hf5w4423Xqa O1tTSUHbV+7dzukAz5zO6mj8GlNFqSPQ8N42GWsnVFx98kofNh8g5nF5qW5Xg2UCVUmJW+ VEFlSi5d2lW2zo14oDxB/il9skVhrjf7uwqFidb7eNykoB1RuW8JFHf/GZh0lgt/450GqG V81Veop//8DWdHGn7gZNNuFH+Fik3lYPSEupGhrx/UETQ/T/733xmWLyjpKLdJPNBvZuIi 8PVpddQwsTbVUwU39GSvwhm8Y0ElmJVZUMczIhnRWeNpXSgwVREZAELN0lElUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B8Z1nqayFjrqFlUQzXZSH5Ly3icVrbDlx7fZ8JMvlnc=; b=qvxCCYX4FEkBIdaiyRG+6epkSknY3cH63GRk0er2h4ni8LUYM1XdEoII9SjDuBFvGE+GmE VcslXfCCksd+Y2Z8TdFB9+zVtk4E3sA1mJrzaWZDsAFyrdq1RlivZNAaJDKVUQu+6YsHZy sXImyXuVlXURHeZ63fic4eWmVFnW/D3qAGLSE63CwGXqoyb9wRHntO5nieCt0wW6uJvb0j 6L7A4ME5UJhti/O083vqoZkEfQTSeCyx7Pp4Zw/ItTG8IoVB1JHzAYEWbwKsvVBgZwZj4g T7SHTCItZfE5yB3qGU8SfM02pGZg3fJIL/41WaOsXYCp/KlgDw/HIiqC6jnnfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QQ05jczXBv; Wed, 26 Jun 2024 04:50: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 45Q4oL5L063675; Wed, 26 Jun 2024 04:50:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oLov063672; Wed, 26 Jun 2024 04:50:21 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:21 GMT Message-Id: <202406260450.45Q4oLov063672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 09a05224b04f - stable/14 - icmp: when logging ICMP ratelimiting message use correct jitter 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 09a05224b04f4c67e1ebd8367788dc0068a47fc6 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09a05224b04f4c67e1ebd8367788dc0068a47fc6 commit 09a05224b04f4c67e1ebd8367788dc0068a47fc6 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:43 +0000 icmp: when logging ICMP ratelimiting message use correct jitter value The limiting of the very last second has been done using certain jitter value. We update the jitter for the next second. But the logging should report the jitter before the change. Reviewed by: kp, tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44477 (cherry picked from commit b508545ce044dbfdd83da772e73f969a3713d59d) --- sys/netinet/ip_icmp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 39eb46fd2d90..83034f9d9dd4 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1147,6 +1147,11 @@ badport_bandlim(int which) pps = counter_ratecheck(&V_icmp_rates[which], V_icmplim + V_icmplim_curr_jitter); if (pps > 0) { + if (V_icmplim_output) + log(LOG_NOTICE, + "Limiting %s response from %jd to %d packets/sec\n", + icmp_rate_descrs[which], (intmax_t )pps, + V_icmplim + V_icmplim_curr_jitter); /* * Adjust limit +/- to jitter the measurement to deny a * side-channel port scan as in CVE-2020-25705 @@ -1161,10 +1166,5 @@ badport_bandlim(int which) } if (pps == -1) return (-1); - if (pps > 0 && V_icmplim_output) - log(LOG_NOTICE, - "Limiting %s response from %jd to %d packets/sec\n", - icmp_rate_descrs[which], (intmax_t )pps, V_icmplim + - V_icmplim_curr_jitter); return (0); } From nobody Wed Jun 26 04:50:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QR3SBXz5NyxG; Wed, 26 Jun 2024 04:50: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 4W88QR1Vg5z56yh; Wed, 26 Jun 2024 04:50:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BEujx95rcDhAwozidVX3UxPLKqxxOPNvFk/34uNo8l8=; b=FZvgi2a2GTWaxjArIoDzqm3LFmKW+4I5DOMB7uUuKKZQJ4gsdBswCZRrHfgWuobLCZox0C +5QtABDkVRJc8PTWgTCf3kL0rw32sRO53+rdlIIuga4k/Bw3MVejntNa4s/73Mbt6AIW30 sgxIeXjoNuZhRyeoTzLabwj/4LcKvT974xMkzN104su8nYn6fkSZZLhWH7n7UeUUBsEse4 hPk6bEQ95foDcELh5i5dDlxLRhnjs8PhjzaiIAeIcOo/YfwjHH/Jd0DkkN1e6nIxe1tgyS ab122FMERBp0rBICmwx9N+UUDbZHOiEgO44I/O01UjZTIgTb/a5qJtkyg1XzdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377423; a=rsa-sha256; cv=none; b=e0wFEesPJHSJCAo7+Tb3HNxs3FS2gjKr92h9xWWX9WGj1smNNCHg8eKTcTSTYqlZFX1Pyp z2k0xGPgDaOSaRDBF0Tx+QP2t5x/Z7Zp9/iUSWF9k53TAcCrM1AdMn8e/T4YR1F6yxc/tt jeoi1LppfgTfuM997saF0raB6n6TxEGhN01CH20mP3VxybieLNN0570Eee0b7UFNjXVPA1 Lqvc/pXX5T26X6KxMioVW+weULXVAkqJzug7/s4PwlLjozDbRReNTS6twF499afKZr/SJm 5JUxQVCHU1HsaOD68vbtf9CN307tu1WqkrDfqwktyIyUiAK7IejhpMvsqQUOlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BEujx95rcDhAwozidVX3UxPLKqxxOPNvFk/34uNo8l8=; b=qMCGMpFzypEsX7LioN8xpTxx0nD8oi9+t0jaahjP/wdpkKn/3UvkjEBXppymx8GB0K4dmA IU6E+uZW1FPmh6Fqfqb8lxhWyl0/PvH+W5pKmxzTf3ajGb2QMpOw0fto0veyMsXbxg9rYE hhaTTPP9qu5icI5XRTc4myNN/6ZPy/299izvYQ+b1WgDBPuo61TwnGnE2Edd7cvzRzaKnT wi230Qb+WdSY9uWMlkqvWKtn/T38lRq/mHV3WmnP7563DE48MgUEbRx/kpcNXN5lQc/E6m K2Vvda2FMofSs795Ibk58wEsun2s5MjH9zYbBdT2fbmSRS7Mux3NwXxjwUR1Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QR14pZzXBw; Wed, 26 Jun 2024 04:50: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 45Q4oN8R063718; Wed, 26 Jun 2024 04:50:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oNKF063715; Wed, 26 Jun 2024 04:50:23 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:23 GMT Message-Id: <202406260450.45Q4oNKF063715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d8acc7277cec - stable/14 - icmp: improve ICMP limit jitter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: d8acc7277cecde08092289a58caceeca1b455888 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d8acc7277cecde08092289a58caceeca1b455888 commit d8acc7277cecde08092289a58caceeca1b455888 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:43 +0000 icmp: improve ICMP limit jitter Instead of fixing up invalid values set by a user in badport_bandlim() which is a fast path function, provide a sysctl handler sysctl_icmplim_and_jitter(), that will check that jitter is less than the limit. Provide jitter initilization function icmplim_new_jitter() used at boot, in the sysctl handler and when we actually hit the limit. This also fixes no jitter on a fresh booted system until first limit hit. Instead of CVE number provide link the the actual paper that explains what and why we are doing here. The CVE number isn't very informative, it will just tell you what RedHat version you need to upgrade to. Reviewed by: kp, tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44478 (cherry picked from commit ac44739fd834f51cacb26485a4140fd482e20150) --- sys/netinet/ip_icmp.c | 81 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 22 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 83034f9d9dd4..dcf387aa3c1c 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -82,19 +82,22 @@ extern ipproto_ctlinput_t *ip_ctlprotox[]; * routines to turnaround packets back to the originator, and * host table maintenance routines. */ -VNET_DEFINE_STATIC(int, icmplim) = 200; +static int sysctl_icmplim_and_jitter(SYSCTL_HANDLER_ARGS); +VNET_DEFINE_STATIC(u_int, icmplim) = 200; #define V_icmplim VNET(icmplim) -SYSCTL_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(icmplim), 0, - "Maximum number of ICMP responses per second"); +SYSCTL_PROC(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLTYPE_UINT | + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmplim), 0, + &sysctl_icmplim_and_jitter, "IU", + "Maximum number of ICMP responses per second"); VNET_DEFINE_STATIC(int, icmplim_curr_jitter) = 0; #define V_icmplim_curr_jitter VNET(icmplim_curr_jitter) -VNET_DEFINE_STATIC(int, icmplim_jitter) = 16; +VNET_DEFINE_STATIC(u_int, icmplim_jitter) = 16; #define V_icmplim_jitter VNET(icmplim_jitter) -SYSCTL_INT(_net_inet_icmp, OID_AUTO, icmplim_jitter, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(icmplim_jitter), 0, - "Random icmplim jitter adjustment limit"); +SYSCTL_PROC(_net_inet_icmp, OID_AUTO, icmplim_jitter, CTLTYPE_UINT | + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmplim_jitter), 0, + &sysctl_icmplim_and_jitter, "IU", + "Random icmplim jitter adjustment limit"); VNET_DEFINE_STATIC(int, icmplim_output) = 1; #define V_icmplim_output VNET(icmplim_output) @@ -1106,6 +1109,52 @@ static const char *icmp_rate_descrs[BANDLIM_MAX] = { [BANDLIM_SCTP_OOTB] = "sctp ootb", }; +static void +icmplim_new_jitter(void) +{ + /* + * Adjust limit +/- to jitter the measurement to deny a side-channel + * port scan as in https://dl.acm.org/doi/10.1145/3372297.3417280 + */ + if (V_icmplim_jitter > 0) + V_icmplim_curr_jitter = + arc4random_uniform(V_icmplim_jitter * 2 + 1) - + V_icmplim_jitter; +} + +static int +sysctl_icmplim_and_jitter(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + bool lim; + + MPASS(oidp->oid_arg1 == &VNET_NAME(icmplim) || + oidp->oid_arg1 == &VNET_NAME(icmplim_jitter)); + + lim = (oidp->oid_arg1 == &VNET_NAME(icmplim)); + new = lim ? V_icmplim : V_icmplim_jitter; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr) { + if (lim) { + if (new <= V_icmplim_jitter) + error = EINVAL; + else + V_icmplim = new; + } else { + if (new >= V_icmplim) + error = EINVAL; + else { + V_icmplim_jitter = new; + icmplim_new_jitter(); + } + } + } + MPASS(V_icmplim + V_icmplim_curr_jitter > 0); + + return (error); +} + static void icmp_bandlimit_init(void) { @@ -1114,6 +1163,7 @@ icmp_bandlimit_init(void) V_icmp_rates[i].cr_rate = counter_u64_alloc(M_WAITOK); V_icmp_rates[i].cr_ticks = ticks; } + icmplim_new_jitter(); } VNET_SYSINIT(icmp_bandlimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, icmp_bandlimit_init, NULL); @@ -1141,9 +1191,6 @@ badport_bandlim(int which) KASSERT(which >= 0 && which < BANDLIM_MAX, ("%s: which %d", __func__, which)); - if ((V_icmplim + V_icmplim_curr_jitter) <= 0) - V_icmplim_curr_jitter = -V_icmplim + 1; - pps = counter_ratecheck(&V_icmp_rates[which], V_icmplim + V_icmplim_curr_jitter); if (pps > 0) { @@ -1152,17 +1199,7 @@ badport_bandlim(int which) "Limiting %s response from %jd to %d packets/sec\n", icmp_rate_descrs[which], (intmax_t )pps, V_icmplim + V_icmplim_curr_jitter); - /* - * Adjust limit +/- to jitter the measurement to deny a - * side-channel port scan as in CVE-2020-25705 - */ - if (V_icmplim_jitter > 0) { - int32_t inc = - arc4random_uniform(V_icmplim_jitter * 2 +1) - - V_icmplim_jitter; - - V_icmplim_curr_jitter = inc; - } + icmplim_new_jitter(); } if (pps == -1) return (-1); From nobody Wed Jun 26 04:50:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QS4Ts2z5P0GD; Wed, 26 Jun 2024 04:50: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 4W88QS2PTLz56wX; Wed, 26 Jun 2024 04:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=00JdlhkAECGINz/nfgpK6brcgUtVxAFyhG/PmyvLzdo=; b=JDrrKmZ4K2CT7OSBbMBjFSzxTTf4X/k9e+NeLE5gRyP76w0gNwxr3fNxZuvl+vAnR5WlG4 6QCLNMJtqnlXmKJ0INF/6m6KqK2OQybySwjbkjKnC9HSg4xHWz8/d0Q5DitKnyZx7lwnu3 ipKTKbJ2AbNgpuXeum0rNv9JEC/pDI3EYFFRKUlPLb5DK3NW3Cju2+14z4F8pRlddKUG6N Upj1inKgZMCj5iNVXPeqUM4ItLhgCubzOW3cDXpKo+vrjP1k8trGXOQdAIs7/0iTgZemyl LN5RN9C0ylCbzw2wWE/ee0QLL1SXTaUNrROuQphe3HxDM0fKppumgQRk078Iow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377424; a=rsa-sha256; cv=none; b=EmQp3AvzPS2T/9yXzb7yPGP+AkEzBk2f3s+OBwWVDlYfm/LXXZib3Xpk1yTveeeSrVLa5Q hXLAV22FRid4GUw2YSJjpu3Q57Uzy1dzXTUrwp7iNLdYHFPHyUEgmbpdTZIJoAe3/D6kBx l6QxnuzrkLU2AnF0lPUjuUT14cCBRWU6bnR15cixaJpCMDjFhjEahzuaWNQKnWBL/KYcD5 X/146FRsEi8Tyhc0lT3eKH14cQTo9ZvLsVS62a0bvNNrGlkGB9vhzIPZDzdmhYmafnwcOI XwNG3z28v98C0m5x0pxLxyR6Lb4+t3MWi+9SMfesPI9RzMxPjmEm2/60kgC97A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=00JdlhkAECGINz/nfgpK6brcgUtVxAFyhG/PmyvLzdo=; b=qzHUFPYrxKS4zr8ZIrRKCz4sCykKQetTXDNaMKk2yI3WpVfhjcy4ax2xbUl+g13SWWnq1p A26YnBbKqhs6+6iBymzM8Mj8vfviMbKpq4Tz6ySFbCJ+J0eJprNOuA6C4A3FPBamLXCZYf sbUTmd1bQt90BXKZD4hbr/+dWrtJ2Pp3EA6bfcef3xoM1syNYsh9ECcfjMR46EMQJNyOoy NCyZGwFl30qiOUgYYjNIAiKlGeXPqalY3H59cqIhAY6rgtcLI05cNDfceeOBOfCHadUbGA DrB3QThM3AImDXGBbFDQ4VApH2s7+oPw20Pec8vBaeXPl6z6Ynkt32UYBHoA+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QS20VtzX44; Wed, 26 Jun 2024 04:50: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 45Q4oOsN063772; Wed, 26 Jun 2024 04:50:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oOEe063769; Wed, 26 Jun 2024 04:50:24 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:24 GMT Message-Id: <202406260450.45Q4oOEe063769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9e09b33e8efc - stable/14 - icmp6: make icmp6_ratelimit() responsible to update the stats 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e09b33e8efc9b4a7f9befb3cf61d17d4a1a35e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9e09b33e8efc9b4a7f9befb3cf61d17d4a1a35e5 commit 9e09b33e8efc9b4a7f9befb3cf61d17d4a1a35e5 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:43 +0000 icmp6: make icmp6_ratelimit() responsible to update the stats counter Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D44479 (cherry picked from commit c6c96aaba8dd74eb39469ed156ff19cc31d599b7) --- sys/netinet6/icmp6.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index b8ac3fc7b094..ba66e18b6524 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -343,10 +343,8 @@ icmp6_error(struct mbuf *m, int type, int code, int param) } /* Finally, do rate limitation check. */ - if (icmp6_ratelimit(&oip6->ip6_src, type, code)) { - ICMP6STAT_INC(icp6s_toofreq); + if (icmp6_ratelimit(&oip6->ip6_src, type, code)) goto freeit; - } /* * OK, ICMP6 can be generated. @@ -2746,6 +2744,7 @@ icmp6_ratelimit(const struct in6_addr *dst, const int type, V_icmp6errppslim)) { /* The packet is subject to rate limit */ ret++; + ICMP6STAT_INC(icp6s_toofreq); } return ret; From nobody Wed Jun 26 04:50:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QT5cbGz5P0Cs; Wed, 26 Jun 2024 04:50: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 4W88QT36nXz57NT; Wed, 26 Jun 2024 04:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5+TJRontAsJADPOnGrds5LWmoMxcx/u7b/IMuIc0X4s=; b=E01Q4pVd856gsJYg0h9KPI5SmCZ0DS7EaXIZIkvomcXkiECvLX/dDlCMyaM4cT+8p6K/jn ZnLFx6lVt+04f6VhAle6JNI7rTEAViHy738ApzCNFeHVGLimMuPBjdQTwWNec9pvHYEXeX RMoRNT+RuRgNy1N6lTpz8N4xZJvy2eSierliwGT2H79rPfdetK6iY8BWuXpjTSL/ZFuoIX Szz4rshj9ylvsGWD0gf5/LHBjbBp5WPVL4D0y65isd1hvxv5NhMUc1a7TtPMw9Y5SmYiMj Lf0kZR3xRrpxqqIfKcAXEvgqfcYuhx4ZT6aF0njmebopzof0BODSM1S9wuG1sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377425; a=rsa-sha256; cv=none; b=jBNK/SHS8acU+vYQwogFSdt8W5YcY9tms8Pl06kKMEuqheye87IwfCuUNA4mPnyUupQKxC f9OHBZGg5XtEwhFI2c3/ju13rrwqqRr53wUhI0yxTOoYYDrbpFLJCB3j6dHajI+HxKi5Vg o+xsw9/4j/H5KYXNnARzHR16AfIBAaN7Arr22qlHLCmw4z/EVloeZvvKuJI0C6SgAICAmH zYghoIUjtEbu60c3H6ZbdBhQrliO5J4E1mcru2OjQuj0+83jmjZSmaZADT/cjh5TrP5jvm ch/jlwxyx25Deajf5fZZhNCYma3ZuU2mCyzkA+qLj4GpkmsFz+Ul13uKFpFp7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5+TJRontAsJADPOnGrds5LWmoMxcx/u7b/IMuIc0X4s=; b=wqrH/h9iG2CQOR/3+yNMn7aJQgfeJgQhQbAVMEwl3IWGTSyuYR8xCoFAb4cCHUtj/HSZE0 skoM0kdstslhWuwfvLMhus3SNzhDHZ1sGwID5MGg8HfWdd/3WJZIFyp5xl3ZwHjz69D4jL Cc+U66ngR8WyiXAo6oAns0oRiruZffjSyYDUEU6bH0Xw8yuMmW2K6pVz5sd8aZd168UxKX OPDRWOsWZ/LRZkEe8znFH2Z3Wm8RoKNeH5753TEhrw1HrMKcWpw5dV0ea6MbA9SP1axLM9 UIiZNBBglSRPpIbiieaohzUup7uTEaoviUAuvgqIxaADh+5dbJBAloAouSh1EA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QT2jTSzXNM; Wed, 26 Jun 2024 04:50: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 45Q4oP2O063817; Wed, 26 Jun 2024 04:50:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oPPD063814; Wed, 26 Jun 2024 04:50:25 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:25 GMT Message-Id: <202406260450.45Q4oPPD063814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f6561ff8ee10 - stable/14 - icmp6: rate limit our echo replies List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: f6561ff8ee103194e2551efdfda1cd6d655b183d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f6561ff8ee103194e2551efdfda1cd6d655b183d commit f6561ff8ee103194e2551efdfda1cd6d655b183d Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:43 +0000 icmp6: rate limit our echo replies The generation of ICMP6_ECHO_REPLY bypasses icmp6_error(), thus rate limit was not applied. Reviewed by: tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44480 (cherry picked from commit 32aeee8ce7e72738fff236ccd5629d55035458f8) --- sys/netinet6/icmp6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index ba66e18b6524..5b384889d422 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -548,6 +548,8 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) icmp6_ifstat_inc(ifp, ifs6_in_echo); if (code != 0) goto badcode; + if (icmp6_ratelimit(&ip6->ip6_src, ICMP6_ECHO_REPLY, 0)) + break; if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { /* Give up remote */ break; From nobody Wed Jun 26 04:50:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QW0QNqz5P0PD; Wed, 26 Jun 2024 04:50: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 4W88QV42XYz57Lm; Wed, 26 Jun 2024 04:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YauO0ZRJnJbLzao5Rs9q1AUOSh7XwoC9yYllATM09Os=; b=X+5VzBZY0x6lS6YfTm4vi8cXTIX/JqHi1XURXmtny/fr0Qpu6KFJ4aLH0pQw5zBpSZQULu JerXox8nltgZse5LoqqAYpAJMyBh+veGZBT//ML7JNaUGayLcP1qHX1wAXK9vzq74DWapE H0W4eR/pQuJ89SitQd7pPP0I8N/3JBSPhYG7VkLX945jSHQuv2xB3HAGNk7bLME0uwbi2s 6pz/inGF0NjS48mabIKtPptmF+qtbGkJim/lDzf+EVz5jFp+0ceAor5CtJgfcDmlyRuBJz O+UC42wg6GdRGLrSH4o8auoNQE5MTA8cdKSBeUxjgJtLjZDfHpNCA1ChgMLFGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377426; a=rsa-sha256; cv=none; b=uaA8t5QmS761lVZWJuI2+U/OCwhSNlzrdtcTZMaYsKCnOC84o8jqN5qLltDsUfQGf2SwCM 15FBM9nmdZVvAs1ABon1QeDJLz74bID4pvodPKdkH1jc74DLHs3B8aGFXPy2rGgVdeDdBh ETfTym7nTGbMtK5E5KG65FnAS1SfKU7CD97h1fTG31lh53grjI7D1O+sNbJczKPLqM818V Xd8oajTN+7yFjOO/ukA0K8pc/T97aPu7eg5OEXoHXA102RMeW8fPzyYvCbgn2HmrSGqFbo EMvdZjCIY7IRWUnHAnxzXe63DPlRWzDTrx3kHHJnQ5QHzIQ/Kb1G+/fwu29WYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YauO0ZRJnJbLzao5Rs9q1AUOSh7XwoC9yYllATM09Os=; b=bjcqQDFpEQtH5yimxP8MgJZHuXEhSgPQ+OrKCmBJCmheEytWGRD4dALFrxBKfZlq0S8m4z Dw14YSelIOHLMes/opNCX/n7+d+Atf7wrHPFgSBa+LEVZzR3kLwQyYB+hMzXeZB2DHorzD dfdyKBWe4O5ODyi/4Vdnhy/9RXUPGWuY0qHbq1NXmhfe2uKPDj0kU8RI/9aCjeaBPcDmEW 3qc8+r6KBtZeWLqcU8WI5z+IvMSrfjKXVlzsMJEZn6CRHyfFxzvnAVKULeUqjcyZ4f8ZGe gQvP072GuJfLxle5KGAgyx5kU8DwqleBkKQkPelotpJBAwpMfUBZ3P5gEAxbcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QV3dSVzX69; Wed, 26 Jun 2024 04:50: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 45Q4oQne063887; Wed, 26 Jun 2024 04:50:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oQcG063884; Wed, 26 Jun 2024 04:50:26 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:26 GMT Message-Id: <202406260450.45Q4oQcG063884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 24a07b61ff28 - stable/14 - icmp6: move ICMPv6 related tunables to the files where they are used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 24a07b61ff28ed243615244e371ca02e326035a0 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=24a07b61ff28ed243615244e371ca02e326035a0 commit 24a07b61ff28ed243615244e371ca02e326035a0 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:44 +0000 icmp6: move ICMPv6 related tunables to the files where they are used Most of them can be declared as static after the move out of in6_proto.c. Keeping sysctl(9) declarations with their text descriptions next to the variable declaration create self-documenting code. There should be no functional changes. Differential Revision: https://reviews.freebsd.org/D44481 (cherry picked from commit 4f96be33fe7676c69c5abb476bb09bba0c63a3f4) --- sys/netinet/icmp6.h | 10 +++----- sys/netinet6/icmp6.c | 34 +++++++++++++++++++++---- sys/netinet6/in6.c | 14 ++++++++++- sys/netinet6/in6_proto.c | 65 ------------------------------------------------ sys/netinet6/ip6_var.h | 5 ---- sys/netinet6/nd6.c | 44 ++++++++++++++++++++++---------- sys/netinet6/nd6.h | 14 ----------- sys/netinet6/nd6_nbr.c | 7 ++++++ sys/netinet6/nd6_rtr.c | 10 +++++--- 9 files changed, 91 insertions(+), 112 deletions(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index e93317c66a11..ea7bf74797f1 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -646,6 +646,10 @@ struct icmp6stat { #ifdef _KERNEL #include +#ifdef SYSCTL_DECL +SYSCTL_DECL(_net_inet6_icmp6); +#endif + VNET_PCPUSTAT_DECLARE(struct icmp6stat, icmp6stat); /* * In-kernel consumers can use these accessor macros directly to update @@ -774,12 +778,6 @@ do { \ } \ } while (/*CONSTCOND*/ 0) -VNET_DECLARE(int, icmp6_rediraccept); /* accept/process redirects */ -VNET_DECLARE(int, icmp6_redirtimeout); /* cache time for redirect routes */ - -#define V_icmp6_rediraccept VNET(icmp6_rediraccept) -#define V_icmp6_redirtimeout VNET(icmp6_redirtimeout) - #define ICMP6_NODEINFO_FQDNOK 0x1 #define ICMP6_NODEINFO_NODEADDROK 0x2 #define ICMP6_NODEINFO_TMPADDROK 0x4 diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 5b384889d422..996416856b20 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -116,22 +116,46 @@ extern ip6proto_ctlinput_t *ip6_ctlprotox[]; VNET_PCPUSTAT_DEFINE(struct icmp6stat, icmp6stat); VNET_PCPUSTAT_SYSINIT(icmp6stat); +SYSCTL_VNET_PCPUSTAT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, + struct icmp6stat, icmp6stat, + "ICMPv6 statistics (struct icmp6stat, netinet/icmp6.h)"); #ifdef VIMAGE VNET_PCPUSTAT_SYSUNINIT(icmp6stat); #endif /* VIMAGE */ +VNET_DEFINE_STATIC(int, icmp6_rediraccept) = 1; +#define V_icmp6_rediraccept VNET(icmp6_rediraccept) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT, rediraccept, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0, + "Accept ICMPv6 redirect messages"); + +VNET_DEFINE_STATIC(int, icmp6_redirtimeout) = 10 * 60; /* 10 minutes */ +#define V_icmp6_redirtimeout VNET(icmp6_redirtimeout) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, redirtimeout, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6_redirtimeout), 0, + "Delay in seconds before expiring redirect route"); + +VNET_DEFINE_STATIC(int, icmp6_nodeinfo) = 0; +#define V_icmp6_nodeinfo VNET(icmp6_nodeinfo) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO, nodeinfo, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6_nodeinfo), 0, + "Mask of enabled RFC4620 node information query types"); + VNET_DECLARE(struct inpcbinfo, ripcbinfo); -VNET_DECLARE(int, icmp6errppslim); +#define V_ripcbinfo VNET(ripcbinfo) + +VNET_DEFINE_STATIC(int, icmp6errppslim) = 100; +#define V_icmp6errppslim VNET(icmp6errppslim) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ERRPPSLIMIT, errppslimit, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6errppslim), 0, + "Maximum number of ICMPv6 error messages per second"); + VNET_DEFINE_STATIC(int, icmp6errpps_count) = 0; VNET_DEFINE_STATIC(struct timeval, icmp6errppslim_last); -VNET_DECLARE(int, icmp6_nodeinfo); -#define V_ripcbinfo VNET(ripcbinfo) -#define V_icmp6errppslim VNET(icmp6errppslim) #define V_icmp6errpps_count VNET(icmp6errpps_count) #define V_icmp6errppslim_last VNET(icmp6errppslim_last) -#define V_icmp6_nodeinfo VNET(icmp6_nodeinfo) static void icmp6_errcount(int, int); static int icmp6_rip6_input(struct mbuf **, int); diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 55d675417c41..e9f16dcf5c54 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -102,6 +102,7 @@ #include #include #include +#include #include #include @@ -125,8 +126,19 @@ _Static_assert(offsetof(struct in6_ifreq, ifr_ifru) == offsetof(struct ifreq, ifr_ifru), "struct in6_ifreq and struct ifreq are not type punnable"); -VNET_DECLARE(int, icmp6_nodeinfo_oldmcprefix); +VNET_DEFINE_STATIC(int, icmp6_nodeinfo_oldmcprefix) = 1; #define V_icmp6_nodeinfo_oldmcprefix VNET(icmp6_nodeinfo_oldmcprefix) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO_OLDMCPREFIX, + nodeinfo_oldmcprefix, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(icmp6_nodeinfo_oldmcprefix), 0, + "Join old IPv6 NI group address in draft-ietf-ipngwg-icmp-name-lookup " + "for compatibility with KAME implementation"); + +VNET_DEFINE_STATIC(int, nd6_useloopback) = 1; +#define V_nd6_useloopback VNET(nd6_useloopback) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_USELOOPBACK, nd6_useloopback, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_useloopback), 0, + "Create a loopback route when configuring an IPv6 address"); /* * Definitions of some costant IP6 addresses. diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 6e7ffedc3dcd..de065f814560 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -173,11 +173,8 @@ VNET_DEFINE(int, ip6_v6only) = 1; #ifdef IPSTEALTH VNET_DEFINE(int, ip6stealth) = 0; #endif -VNET_DEFINE(int, nd6_onlink_ns_rfc4861) = 0;/* allow 'on-link' nd6 NS - * (RFC 4861) */ VNET_DEFINE(bool, ip6_log_cannot_forward) = 1; -/* icmp6 */ /* * BSDI4 defines these variables in in_proto.c... * XXX: what if we don't define INET? Should we define pmtu6_expire @@ -186,14 +183,6 @@ VNET_DEFINE(bool, ip6_log_cannot_forward) = 1; VNET_DEFINE(int, pmtu_expire) = 60*10; VNET_DEFINE(int, pmtu_probe) = 60*2; -/* ICMPV6 parameters */ -VNET_DEFINE(int, icmp6_rediraccept) = 1;/* accept and process redirects */ -VNET_DEFINE(int, icmp6_redirtimeout) = 10 * 60; /* 10 minutes */ -VNET_DEFINE(int, icmp6errppslim) = 100; /* 100pps */ -/* control how to respond to NI queries */ -VNET_DEFINE(int, icmp6_nodeinfo) = 0; -VNET_DEFINE(int, icmp6_nodeinfo_oldmcprefix) = 1; - VNET_DEFINE_STATIC(int, ip6_log_interval) = 5; VNET_DEFINE_STATIC(int, ip6_log_count) = 0; VNET_DEFINE_STATIC(struct timeval, ip6_log_last) = { 0 }; @@ -358,57 +347,3 @@ SYSCTL_BOOL(_net_inet6_ip6, OID_AUTO, log_cannot_forward, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_log_cannot_forward), 1, "Log packets that cannot be forwarded"); - -/* net.inet6.icmp6 */ -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT, rediraccept, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0, - "Accept ICMPv6 redirect messages"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, redirtimeout, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6_redirtimeout), 0, - "Delay in seconds before expiring redirect route"); -SYSCTL_VNET_PCPUSTAT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, - struct icmp6stat, icmp6stat, - "ICMPv6 statistics (struct icmp6stat, netinet/icmp6.h)"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, nd6_prune, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_prune), 0, - "Frequency in seconds of checks for expired prefixes and routers"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY, nd6_delay, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_delay), 0, - "Delay in seconds before probing for reachability"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_UMAXTRIES, nd6_umaxtries, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_umaxtries), 0, - "Number of ICMPv6 NS messages sent during reachability detection"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MMAXTRIES, nd6_mmaxtries, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_mmaxtries), 0, - "Number of ICMPv6 NS messages sent during address resolution"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_USELOOPBACK, nd6_useloopback, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_useloopback), 0, - "Create a loopback route when configuring an IPv6 address"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO, nodeinfo, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6_nodeinfo), 0, - "Mask of enabled RFC4620 node information query types"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO_OLDMCPREFIX, - nodeinfo_oldmcprefix, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(icmp6_nodeinfo_oldmcprefix), 0, - "Join old IPv6 NI group address in draft-ietf-ipngwg-icmp-name-lookup " - "for compatibility with KAME implementation"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ERRPPSLIMIT, errppslimit, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6errppslim), 0, - "Maximum number of ICMPv6 error messages per second"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXNUDHINT, nd6_maxnudhint, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_maxnudhint), 0, - ""); /* XXX unused */ -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DEBUG, nd6_debug, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_debug), 0, - "Log NDP debug messages"); -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861, - nd6_onlink_ns_rfc4861, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(nd6_onlink_ns_rfc4861), 0, - "Accept 'on-link' ICMPv6 NS messages in compliance with RFC 4861"); -#ifdef EXPERIMENTAL -SYSCTL_INT(_net_inet6_icmp6, OID_AUTO, - nd6_ignore_ipv6_only_ra, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(nd6_ignore_ipv6_only_ra), 0, - "Ignore the 'IPv6-Only flag' in RA messages in compliance with " - "draft-ietf-6man-ipv6only-flag"); -#endif diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index a3b3b0cb3585..464b74c4fd88 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -333,11 +333,6 @@ VNET_DECLARE(int, ip6stealth); #define V_ip6stealth VNET(ip6stealth) #endif -#ifdef EXPERIMENTAL -VNET_DECLARE(int, nd6_ignore_ipv6_only_ra); -#define V_nd6_ignore_ipv6_only_ra VNET(nd6_ignore_ipv6_only_ra) -#endif - VNET_DECLARE(bool, ip6_log_cannot_forward); #define V_ip6_log_cannot_forward VNET(ip6_log_cannot_forward) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index b3ca612c90d6..3eacb05f88d7 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -91,21 +91,37 @@ MALLOC_DEFINE(M_IP6NDP, "ip6ndp", "IPv6 Neighbor Discovery"); -/* timer values */ -VNET_DEFINE(int, nd6_prune) = 1; /* walk list every 1 seconds */ -VNET_DEFINE(int, nd6_delay) = 5; /* delay first probe time 5 second */ -VNET_DEFINE(int, nd6_umaxtries) = 3; /* maximum unicast query */ -VNET_DEFINE(int, nd6_mmaxtries) = 3; /* maximum multicast query */ -VNET_DEFINE(int, nd6_useloopback) = 1; /* use loopback interface for - * local traffic */ -VNET_DEFINE(int, nd6_gctimer) = (60 * 60 * 24); /* 1 day: garbage - * collection timer */ +VNET_DEFINE_STATIC(int, nd6_prune) = 1; +#define V_nd6_prune VNET(nd6_prune) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, nd6_prune, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_prune), 0, + "Frequency in seconds of checks for expired prefixes and routers"); + +VNET_DEFINE_STATIC(int, nd6_delay) = 5; +#define V_nd6_delay VNET(nd6_delay) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY, nd6_delay, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_delay), 0, + "Delay in seconds before probing for reachability"); + +VNET_DEFINE_STATIC(int, nd6_umaxtries) = 3; +#define V_nd6_umaxtries VNET(nd6_umaxtries) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_UMAXTRIES, nd6_umaxtries, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_umaxtries), 0, + "Number of ICMPv6 NS messages sent during reachability detection"); + +VNET_DEFINE(int, nd6_mmaxtries) = 3; +#define V_nd6_mmaxtries VNET(nd6_mmaxtries) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MMAXTRIES, nd6_mmaxtries, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_mmaxtries), 0, + "Number of ICMPv6 NS messages sent during address resolution"); + +VNET_DEFINE_STATIC(int, nd6_gctimer) = (60 * 60 * 24); /* 1 day: garbage + * collection timer */ +#define V_nd6_gctimer VNET(nd6_gctimer) /* preventing too many loops in ND option parsing */ VNET_DEFINE_STATIC(int, nd6_maxndopt) = 10; /* max # of ND options allowed */ -VNET_DEFINE(int, nd6_maxnudhint) = 0; /* max # of subsequent upper - * layer hints */ VNET_DEFINE_STATIC(int, nd6_maxqueuelen) = 16; /* max pkts cached in unresolved * ND entries */ #define V_nd6_maxndopt VNET(nd6_maxndopt) @@ -116,6 +132,10 @@ VNET_DEFINE(int, nd6_debug) = 1; #else VNET_DEFINE(int, nd6_debug) = 0; #endif +#define V_nd6_debug VNET(nd6_debug) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DEBUG, nd6_debug, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_debug), 0, + "Log NDP debug messages"); static eventhandler_tag lle_event_eh, iflladdr_event_eh, ifnet_link_event_eh; @@ -148,8 +168,6 @@ VNET_DEFINE_STATIC(struct callout, nd6_slowtimo_ch); VNET_DEFINE_STATIC(struct callout, nd6_timer_ch); #define V_nd6_timer_ch VNET(nd6_timer_ch) -SYSCTL_DECL(_net_inet6_icmp6); - static void nd6_lle_event(void *arg __unused, struct llentry *lle, int evt) { diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 3e7f2d814d47..1db1b666c60b 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -255,26 +255,12 @@ MALLOC_DECLARE(M_IP6NDP); #endif /* nd6.c */ -VNET_DECLARE(int, nd6_prune); -VNET_DECLARE(int, nd6_delay); -VNET_DECLARE(int, nd6_umaxtries); VNET_DECLARE(int, nd6_mmaxtries); -VNET_DECLARE(int, nd6_useloopback); -VNET_DECLARE(int, nd6_maxnudhint); -VNET_DECLARE(int, nd6_gctimer); VNET_DECLARE(struct nd_prhead, nd_prefix); VNET_DECLARE(int, nd6_debug); -VNET_DECLARE(int, nd6_onlink_ns_rfc4861); -#define V_nd6_prune VNET(nd6_prune) -#define V_nd6_delay VNET(nd6_delay) -#define V_nd6_umaxtries VNET(nd6_umaxtries) #define V_nd6_mmaxtries VNET(nd6_mmaxtries) -#define V_nd6_useloopback VNET(nd6_useloopback) -#define V_nd6_maxnudhint VNET(nd6_maxnudhint) -#define V_nd6_gctimer VNET(nd6_gctimer) #define V_nd_prefix VNET(nd_prefix) #define V_nd6_debug VNET(nd6_debug) -#define V_nd6_onlink_ns_rfc4861 VNET(nd6_onlink_ns_rfc4861) /* Lock for the prefix and default router lists. */ VNET_DECLARE(struct rwlock, nd6_lock); diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 7b4fa7a8d8c9..353db66c2323 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -110,6 +110,13 @@ VNET_DEFINE_STATIC(int, dad_maxtry) = 15; /* max # of *tries* to transmit DAD packet */ #define V_dad_maxtry VNET(dad_maxtry) +VNET_DEFINE_STATIC(int, nd6_onlink_ns_rfc4861) = 0; +#define V_nd6_onlink_ns_rfc4861 VNET(nd6_onlink_ns_rfc4861) +SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861, + nd6_onlink_ns_rfc4861, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(nd6_onlink_ns_rfc4861), 0, + "Accept 'on-link' ICMPv6 NS messages in compliance with RFC 4861"); + /* * Input a Neighbor Solicitation Message. * diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index de991c98b6c3..845f9094f4c4 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -98,11 +98,15 @@ VNET_DEFINE(u_int32_t, ip6_temp_valid_lifetime) = DEF_TEMP_VALID_LIFETIME; VNET_DEFINE(int, ip6_temp_regen_advance) = TEMPADDR_REGEN_ADVANCE; #ifdef EXPERIMENTAL -VNET_DEFINE(int, nd6_ignore_ipv6_only_ra) = 1; +VNET_DEFINE_STATIC(int, nd6_ignore_ipv6_only_ra) = 1; +#define V_nd6_ignore_ipv6_only_ra VNET(nd6_ignore_ipv6_only_ra) +SYSCTL_INT(_net_inet6_icmp6, OID_AUTO, + nd6_ignore_ipv6_only_ra, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(nd6_ignore_ipv6_only_ra), 0, + "Ignore the 'IPv6-Only flag' in RA messages in compliance with " + "draft-ietf-6man-ipv6only-flag"); #endif -SYSCTL_DECL(_net_inet6_icmp6); - /* RTPREF_MEDIUM has to be 0! */ #define RTPREF_HIGH 1 #define RTPREF_MEDIUM 0 From nobody Wed Jun 26 04:50:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QW6vY2z5P0Bh; Wed, 26 Jun 2024 04:50: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 4W88QW573jz57X1; Wed, 26 Jun 2024 04:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zeKkbbKQMu1eDPVPjnykIeUjSuTvfkrsc7cmEyi7nxo=; b=xAxt9DiN6fX7VALv4nfNUDG0ecfu19uLgtnYOgpkSOYCmwrjfEajozy7kSG7VYhXf/EDeO CA4ACv3k9Vh9797oz70i9Wc8FTm/hfMWzwHIEJZwheTZFWCJc3EkiIENcpDwrjZ3dh+Y4f 9PdcSGMk5ML1H595DFVwpeaX58gcpR/ei9DFtqRG8x3wl0ZHcRdnD5ToneNvCND1qjtnLI vojduiVSYvWKkOph1yB+jsH6NmjU3KBxDWGcLmIOscTF8aAJKwHF1dU5ldQ3qc48YVv0G7 U/aW9Yc/mSAxYpesM4xMpAYmSJd855bjeGt0JTTsQwZXWrAc7xYmeUBBXWqxjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377427; a=rsa-sha256; cv=none; b=N0RoEVuhRZETwUsc4OuOwBnHs3z0GdPlNQLO02J7Dbl+18Ny1MGdRpOEKue3qkYEqX4FF6 Gm79um0BsIyeZxsbBF8+m1O6aqZ37JMEcV3eZcCrl1pwS/WLXfb1HbMMo/oooos6dquE/n aNUIv7p4U01ZmKzeJYzcEkoZ+QrEUtib9g6vq27YvmMzJpqnRk4i4l6NA3enTcxISKPaIt A1KjAJxV/sfeslBsB40xGvBhDU9qMfpTsGMdj+B5LYiOCQSObGwdM6n7lzh8dDwPitu91Q eFkOMon4BZmbqN7sLMHuZQf1fbTsl86P5d3hrNBP5S6O8NHYlhHQdHsroeX6mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zeKkbbKQMu1eDPVPjnykIeUjSuTvfkrsc7cmEyi7nxo=; b=qCGpQbogJurLc2nxClcrODA+e8/ZlLN6/+ZzGgtJBVotmjE0aj3wCX7W2wzQhSYuGzLU2+ KB1h0VNpyBRlh28yhGakZgLBGh9dcp0cV52tHrwjNouvdNGuEZ8GnKObGiGkZv0sFI8UxZ hxpQ2VcT7qcZa0BHWgTRa2pUl7YF5Ree6WmkFNBeD3H5Z5gEE1SIXul/2hwVQWloQnQSyt Pb1oZNL2lVUmx0i0bjU2lEf5iSZkbiGrrtAMMTTk/QSavj7JLz3LH/hu0IuMmbZprpEOCl Z5czNwL8V3bNJZgEQFZLcJKEzL8zCbVvH7wlAypdi4/xc+6SvIl8gqRYYpmKPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QW4kGfzX6B; Wed, 26 Jun 2024 04:50: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 45Q4oRCa063941; Wed, 26 Jun 2024 04:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oRAJ063938; Wed, 26 Jun 2024 04:50:27 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:27 GMT Message-Id: <202406260450.45Q4oRAJ063938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: b544e62dd00f - stable/14 - icmp6: bring rate limiting on a par with IPv4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: b544e62dd00f167a3d8b4df3dd31fcd7bf1873a8 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b544e62dd00f167a3d8b4df3dd31fcd7bf1873a8 commit b544e62dd00f167a3d8b4df3dd31fcd7bf1873a8 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:44 +0000 icmp6: bring rate limiting on a par with IPv4 Use counter_ratecheck() instead of racy and slow ppsratecheck. Use a separate counter for every currently known type of ICMPv6. Provide logging of ratelimit events. Provide jitter to counter open UDP port detection. Reviewed by: tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44482 (cherry picked from commit a03aff88a14448c3084a0384082ec996d7213897) --- sys/netinet6/icmp6.c | 185 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 162 insertions(+), 23 deletions(-) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 996416856b20..4bce366c7ed4 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -145,18 +145,6 @@ SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO, nodeinfo, VNET_DECLARE(struct inpcbinfo, ripcbinfo); #define V_ripcbinfo VNET(ripcbinfo) -VNET_DEFINE_STATIC(int, icmp6errppslim) = 100; -#define V_icmp6errppslim VNET(icmp6errppslim) -SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ERRPPSLIMIT, errppslimit, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6errppslim), 0, - "Maximum number of ICMPv6 error messages per second"); - -VNET_DEFINE_STATIC(int, icmp6errpps_count) = 0; -VNET_DEFINE_STATIC(struct timeval, icmp6errppslim_last); - -#define V_icmp6errpps_count VNET(icmp6errpps_count) -#define V_icmp6errppslim_last VNET(icmp6errppslim_last) - static void icmp6_errcount(int, int); static int icmp6_rip6_input(struct mbuf **, int); static void icmp6_reflect(struct mbuf *, size_t); @@ -2745,6 +2733,126 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt) return (error); } +static int sysctl_icmp6lim_and_jitter(SYSCTL_HANDLER_ARGS); +VNET_DEFINE_STATIC(u_int, icmp6errppslim) = 100; +#define V_icmp6errppslim VNET(icmp6errppslim) +SYSCTL_PROC(_net_inet6_icmp6, ICMPV6CTL_ERRPPSLIMIT, errppslimit, + CTLTYPE_UINT | CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6errppslim), 0, + &sysctl_icmp6lim_and_jitter, "IU", + "Maximum number of ICMPv6 error/reply messages per second"); + +VNET_DEFINE_STATIC(int, icmp6lim_curr_jitter) = 0; +#define V_icmp6lim_curr_jitter VNET(icmp6lim_curr_jitter) + +VNET_DEFINE_STATIC(u_int, icmp6lim_jitter) = 8; +#define V_icmp6lim_jitter VNET(icmp6lim_jitter) +SYSCTL_PROC(_net_inet6_icmp6, OID_AUTO, icmp6lim_jitter, CTLTYPE_UINT | + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6lim_jitter), 0, + &sysctl_icmp6lim_and_jitter, "IU", + "Random errppslimit jitter adjustment limit"); + +VNET_DEFINE_STATIC(int, icmp6lim_output) = 1; +#define V_icmp6lim_output VNET(icmp6lim_output) +SYSCTL_INT(_net_inet6_icmp6, OID_AUTO, icmp6lim_output, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp6lim_output), 0, + "Enable logging of ICMPv6 response rate limiting"); + +typedef enum { + RATELIM_PARAM_PROB = 0, + RATELIM_TOO_BIG, + RATELIM_UNREACH, + RATELIM_TEXCEED, + RATELIM_REDIR, + RATELIM_REPLY, + RATELIM_OTHER, + RATELIM_MAX +} ratelim_which; + +static const char *icmp6_rate_descrs[RATELIM_MAX] = { + [RATELIM_PARAM_PROB] = "bad IPv6 header", + [RATELIM_TOO_BIG] = "packet too big", + [RATELIM_UNREACH] = "destination unreachable", + [RATELIM_TEXCEED] = "time exceeded", + [RATELIM_REPLY] = "echo reply", + [RATELIM_REDIR] = "neighbor discovery redirect", + [RATELIM_OTHER] = "(other)", +}; + +static void +icmp6lim_new_jitter(void) +{ + /* + * Adjust limit +/- to jitter the measurement to deny a side-channel + * port scan as in https://dl.acm.org/doi/10.1145/3372297.3417280 + */ + if (V_icmp6lim_jitter > 0) + V_icmp6lim_curr_jitter = + arc4random_uniform(V_icmp6lim_jitter * 2 + 1) - + V_icmp6lim_jitter; +} + +static int +sysctl_icmp6lim_and_jitter(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + bool lim; + + MPASS(oidp->oid_arg1 == &VNET_NAME(icmp6errppslim) || + oidp->oid_arg1 == &VNET_NAME(icmp6lim_jitter)); + + lim = (oidp->oid_arg1 == &VNET_NAME(icmp6errppslim)); + new = lim ? V_icmp6errppslim : V_icmp6lim_jitter; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr) { + if (lim) { + if (new <= V_icmp6lim_jitter) + error = EINVAL; + else + V_icmp6errppslim = new; + } else { + if (new >= V_icmp6errppslim) + error = EINVAL; + else { + V_icmp6lim_jitter = new; + icmp6lim_new_jitter(); + } + } + } + MPASS(V_icmp6errppslim + V_icmp6lim_curr_jitter > 0); + + return (error); +} + + +VNET_DEFINE_STATIC(struct counter_rate, icmp6_rates[RATELIM_MAX]); +#define V_icmp6_rates VNET(icmp6_rates) + +static void +icmp6_ratelimit_init(void) +{ + + for (int i = 0; i < RATELIM_MAX; i++) { + V_icmp6_rates[i].cr_rate = counter_u64_alloc(M_WAITOK); + V_icmp6_rates[i].cr_ticks = ticks; + } + icmp6lim_new_jitter(); +} +VNET_SYSINIT(icmp6_ratelimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, + icmp6_ratelimit_init, NULL); + +#ifdef VIMAGE +static void +icmp6_ratelimit_uninit(void) +{ + + for (int i = 0; i < RATELIM_MAX; i++) + counter_u64_free(V_icmp6_rates[i].cr_rate); +} +VNET_SYSUNINIT(icmp6_ratelimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, + icmp6_ratelimit_uninit, NULL); +#endif + /* * Perform rate limit check. * Returns 0 if it is okay to send the icmp6 packet. @@ -2754,24 +2862,55 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt) * XXX per-destination/type check necessary? * * dst - not used at this moment - * type - not used at this moment * code - not used at this moment */ int -icmp6_ratelimit(const struct in6_addr *dst, const int type, - const int code) +icmp6_ratelimit(const struct in6_addr *dst, const int type, const int code) { - int ret; + ratelim_which which; + int64_t pps; - ret = 0; /* okay to send */ + if (V_icmp6errppslim == 0) + return (0); - /* PPS limit */ - if (!ppsratecheck(&V_icmp6errppslim_last, &V_icmp6errpps_count, - V_icmp6errppslim)) { - /* The packet is subject to rate limit */ - ret++; + switch (type) { + case ICMP6_PARAM_PROB: + which = RATELIM_PARAM_PROB; + break; + case ICMP6_PACKET_TOO_BIG: + which = RATELIM_TOO_BIG; + break; + case ICMP6_DST_UNREACH: + which = RATELIM_UNREACH; + break; + case ICMP6_TIME_EXCEEDED: + which = RATELIM_TEXCEED; + break; + case ND_REDIRECT: + which = RATELIM_REDIR; + break; + case ICMP6_ECHO_REPLY: + which = RATELIM_REPLY; + break; + default: + which = RATELIM_OTHER; + break; + }; + + pps = counter_ratecheck(&V_icmp6_rates[which], V_icmp6errppslim + + V_icmp6lim_curr_jitter); + if (pps > 0) { + if (V_icmp6lim_output) + log(LOG_NOTICE, "Limiting ICMPv6 %s output from %jd " + "to %d packets/sec\n", icmp6_rate_descrs[which], + (intmax_t )pps, V_icmp6errppslim + + V_icmp6lim_curr_jitter); + icmp6lim_new_jitter(); + } + if (pps == -1) { ICMP6STAT_INC(icp6s_toofreq); + return (-1); } - return ret; + return (0); } From nobody Wed Jun 26 04:50:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QY1KWCz5P0D0; Wed, 26 Jun 2024 04:50: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 4W88QX6DrQz57Tt; Wed, 26 Jun 2024 04:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ogSXz0J+9vDSvBoBnGUYSCZtBUFmAL5U/W+cOTMZQuw=; b=LmWONripUYSQJ4GQor+qj697u1YxcsK6v0drvrQJBySW4ED1DoNK+Jzw3S4vnAH9GaXu/6 4Hl/+4n0izJB3eozdu0bI8NZJSR+tESkfFjDV7J/OScpfZJt4R7GANJs4862N1JTRpRj3r uv0aTQgw93TW8MOUzn/GHDocMR2r/+i5E7wjz6yy1pwgKzeOByA95Lx7CJJrObQKnkdnuh c+n3hl0b4d8rSHhBmH2SFTdTS6WN7ZFmi8qybUo8WAYPI34GaEZuglkz10ZXO6nzmLAk8s sRO2JTDeHDz+Ny+c+7osnGBsUuioL909EOMc6cDlEEzZJ1nUAjkDjQRePHTxEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377428; a=rsa-sha256; cv=none; b=L340gyEgqfvgJ4DErSy7qTIm5hawir96CQ9rYqYS2CQwxsJ+LlB3CScsVNEoS9W5bXV8Hn +/FGw98lkVGhYYOduWnNkJI8oLt1HlwBwbL7zC0foRV0OEzInHvK2lxffaeTWQ3f6Z1U04 pBfACTyB9Qa/7iwGlXwu/PlcLLCp4UXHGNa1Y6d+nyQIoS3+QRLSVdVSoUbdQ33aW/reD2 VrjqD6OAP4uKLhHV8CB1j5jRSavb9/qTWOFSEKmGmcrsue/T6aHrq5i3CMD/5Iq7MVOKHp eYtM7/P9suMZmS94N47srFOLfV2Ypgb9ktHNZXPS82xAkfhcCAthuv/PEz0bww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ogSXz0J+9vDSvBoBnGUYSCZtBUFmAL5U/W+cOTMZQuw=; b=V80hvl+4AawADZew06kRPjcKZQTQ3DHYZZddlIWNxu7oOOV+vPyCPiWxc5lRUqzFvQLChs fN+Pvcr2hFLaQi6uXz3MmQHz9RbTlUd2rtPqNp4iVEqYGS7QWQWb266QDvnvVHjksPnWNr Cv5yN2oLsM9lg8hZ4kJKKczfFangxtAgCujZonNkzPl+TabDSs6YkfX9auAwzcmUE3PUk+ 3+ZTghihqlHmvJaFG4LpE9advHGGarqchI4gGCh8rPxfz4+MdV+POyyfNflpcytkm26s5k XoSaxh1Av1aY20Uu8pjAlLdI/HQaUSgBQJ3xCtqAZgX6Pgp8/tg/1b/r/orHtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QX5qsjzXBx; Wed, 26 Jun 2024 04:50: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 45Q4oSl6063989; Wed, 26 Jun 2024 04:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oSU9063986; Wed, 26 Jun 2024 04:50:28 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:28 GMT Message-Id: <202406260450.45Q4oSU9063986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d366b4931519 - stable/14 - icmp: allow zero value for ICMP limits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: d366b4931519acf90a8e76d95356b0e4140aaf40 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d366b4931519acf90a8e76d95356b0e4140aaf40 commit d366b4931519acf90a8e76d95356b0e4140aaf40 Author: Gleb Smirnoff AuthorDate: 2024-03-25 02:52:03 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:44 +0000 icmp: allow zero value for ICMP limits Zero means limit is disabled, so the value doesn't need to be checked against jitter value. Fixes: ac44739fd834f51cacb26485a4140fd482e20150 Fixes: a03aff88a14448c3084a0384082ec996d7213897 (cherry picked from commit 4399e055ea610cdefa1470ad1ee614dd81ba5e56) --- sys/netinet/ip_icmp.c | 2 +- sys/netinet6/icmp6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index dcf387aa3c1c..67fb56dcdfa2 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1137,7 +1137,7 @@ sysctl_icmplim_and_jitter(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { if (lim) { - if (new <= V_icmplim_jitter) + if (new != 0 && new <= V_icmplim_jitter) error = EINVAL; else V_icmplim = new; diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 4bce366c7ed4..c03c90e566c3 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -2806,7 +2806,7 @@ sysctl_icmp6lim_and_jitter(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { if (lim) { - if (new <= V_icmp6lim_jitter) + if (new != 0 && new <= V_icmp6lim_jitter) error = EINVAL; else V_icmp6errppslim = new; From nobody Wed Jun 26 04:50:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88QZ15xYz5P0K1; Wed, 26 Jun 2024 04:50: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 4W88QZ06BGz57V8; Wed, 26 Jun 2024 04:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MO44US+EMsvdl8st53fHw5Sb8tiHjFWRGIZpY4rjlPw=; b=OWyg0XdAuW6u2db4TdGYpKsC7XLI7oyKbUByDbC689Nk9FcrPDCWJMROxPfrKvcNTgl9LN xmXtyxmUttOBKHVibcDM7y5GEEWTaZOi1X5xsaCgmkxjDiT6350BgbjT1birUI7smSv/ur alkdKH5bduGlwOcsy1Nu7YSPSAamemduywQDjUGctAqpVmljphM714QvaW/ZMIBcYCRzX5 AbBeUZs1+CPvM0zwczPW8MRYQov/YvMVUdYVitu/UulZPkzv0C2SyErwIAlsVVD4XCOFGL hSBUdU4wtzvWeBC4yAdIE1kN2Nw9TqfKvz0QNvAPYtT+HKARMC8QPK2kov08fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377430; a=rsa-sha256; cv=none; b=IBXwjbVNFwEWkO7FLSoRU9+FnwsASIyCSueukVhMjMGI6peIQBilJt+jV+6EGToKnNvDW9 M1eUIWXswU/4nQUNC11XeTkFv0d/RlU6hxPVOnxn1wi9mdNLhjFMF4Bj8JKVrm8P7qsHOH FoWzYWHS1dfe620CWWQvZxNIP2f6xsUds7bfpZ0RGVxlEAhCSCu4Y8gGDLWsxXZ5oyWqZW dqnnMFbozRSz3oPBQWzrQ5SsbEJ8XyNtpkgYbxSrA6dHMKTAfm8VbvpgOvPq6+k+bRe3XF X2KzEqfkN0uFdCuOdnCrS7WQ87f+0cgBdVINJdiIRyTW2Wtw1GOsBcqZ5QvoNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MO44US+EMsvdl8st53fHw5Sb8tiHjFWRGIZpY4rjlPw=; b=ZGM2WmFJ6j0GRRzB+w/3079QifPOKr5cNeZ3hrriKrJYzf4XO6sH7wI3eQ+aG6yuH8sEdB L1fiOXz0jKQ411PnR0nWLIBSBUSv7mG27fCpPvvVQ3qBUG3hgRWuwHTf03jBshVzL8P4B7 wbkpLiTAL0VuQ4i9RJndVDVAOh8EqtmFa8BqRvpwaH8a1oeXPTRNbMsE4zMQSjeVINKp1I qJB7n2GORgzTKrTJgzyA+DZ9GbIq8Y4Zbgn5s4P+zGeQcFEE6eoWhztk6R8z510uJxEcz6 m98PAYQRSpIke8CSNgdhdCirGhsjrVFjC6m3HWsiZAU2vvJcnb206SFIdq4SLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88QY6pfyzWjb; Wed, 26 Jun 2024 04:50: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 45Q4oTFg064046; Wed, 26 Jun 2024 04:50:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oT9X064043; Wed, 26 Jun 2024 04:50:29 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:29 GMT Message-Id: <202406260450.45Q4oT9X064043@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5a676edf9b61 - stable/14 - netpfil tests: disable ICMPv6 rate limiting in the test jail List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a676edf9b61db8e1677e882c445b5fc1cb46b90 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5a676edf9b61db8e1677e882c445b5fc1cb46b90 commit 5a676edf9b61db8e1677e882c445b5fc1cb46b90 Author: Gleb Smirnoff AuthorDate: 2024-03-25 02:54:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:44 +0000 netpfil tests: disable ICMPv6 rate limiting in the test jail The dummynet test uses flood ping as source of traffic, so the rate limiting of ICMP replies broke the test. Fixes: 32aeee8ce7e72738fff236ccd5629d55035458f8 (cherry picked from commit 75d15e893b14188b83c5fb5e4979fa21c557934f) --- tests/sys/netpfil/common/dummynet.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netpfil/common/dummynet.sh b/tests/sys/netpfil/common/dummynet.sh index 14d863d001c8..7537231c13bd 100644 --- a/tests/sys/netpfil/common/dummynet.sh +++ b/tests/sys/netpfil/common/dummynet.sh @@ -387,6 +387,7 @@ queue_v6_body() jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2 no_dad up jexec alcatraz /usr/sbin/inetd -p inetd-alcatraz.pid \ $(atf_get_srcdir)/../pf/echo_inetd.conf + jexec alcatraz sysctl net.inet6.icmp6.errppslimit=0 # Sanity check atf_check -s exit:0 -o ignore ping6 -i .1 -c 3 -s 1200 2001:db8:42::2 From nobody Wed Jun 26 04:50:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W88Qb5VMPz5P0K2; Wed, 26 Jun 2024 04:50: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 4W88Qb1QJnz57RT; Wed, 26 Jun 2024 04:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8Rl+bd0xm9GS90iKeLes7BB2pNJEYLpbwyquW8Ahx8=; b=kjywmZez9Ee+rERQbZVVoe1ywigU6IMI1UoWR/ktMhMiTQrlMe55IjoOXkkk/l6uI8N0JP adIQWzRylVs4AdvzGhiAmrttTrtlLqc4LsCDLMTth1CluDADAQM9VJpiLcKLhWqyO2fQZ+ jbQ4hiDs+oSdBOtQsFkjlUD+0BrJeVjj0qyMPlPdl16EDPM76g9TPk19kRY+Uatv4o5vi3 +7VXZkRepyBdGc7ecHPxUkTuCw0NDd0x/FUHjMf2BoztenqdmzRkgxhqJsOCJoqyrsox1u Lb2E8TJ+QSmr9QvGkVQsYg51OMClG6dIq1LlVyeFu3eNu9vyAUuTcI0WJAoTyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719377431; a=rsa-sha256; cv=none; b=wNZsSlA/O7TEN/vUWfz/Vc8GOmWr69dhY5blRlIVkil0moScLMZJLEdlM1V9IuduKdB0Th 2fswHXxg5AdND3W6R/MVtiIaAlOKEYTPJzxsHItDAHCCPdyQob5BzXNOsDUiCa7qCyhe5P tC6fzft45XpE+L3oZ9yhb24NSgSiZFq4/IT+iDLJnVoLrnQuqX/LysgOD5ZcYdyWipb6AS L44bm8BY0MghA8hZKdsPL/iZJtTjrDRxikL0AWyOZ9J3X2zhczC4hWvG7oEWMo/i1HdatW ZhRlNV2YkgC2ZfuN+cSlec+3/hAuveQDAmJ437K0uuPpldLtYPzcrqoBrBYN5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719377431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8Rl+bd0xm9GS90iKeLes7BB2pNJEYLpbwyquW8Ahx8=; b=QpDwoVHUe/fHj0o1qnKeQhMztOVTEpABodw9uwxR/eSfGysv/v1LnbF1kGomVn4nhOugzd l4U552MbQB2Zmv6nctjEXEmYbbvxdNYfTZyGHV4vxbB0F+1i28vkqwN6N0sHOICB0l+02J 9XUDUNfIPLDo9f+ZFnlNfeKoLZBKy/0rE3QMfLB1COXGT5eaZLe2qNVCgjr7eRvyFM8gLp jdFcT4HmdJPwrMx472L2lF7RRTMA73tuRktEl99NtwM2wtIH7Zv5F9N6G1YGGmuNaJT1Qh DGx2tTHZCnARO9KR3l0au4lBw6MxDJkdsrwcW5H0G8B431Gj28jkelEkdamZdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W88Qb0vGQzX6C; Wed, 26 Jun 2024 04:50: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 45Q4oVef064106; Wed, 26 Jun 2024 04:50:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q4oVvE064103; Wed, 26 Jun 2024 04:50:31 GMT (envelope-from git) Date: Wed, 26 Jun 2024 04:50:31 GMT Message-Id: <202406260450.45Q4oVvE064103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 2472e352d80f - stable/14 - icmp: correct the assertion that checks limit + jitter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2472e352d80fcf6440fd42fbb16960cc49d05b03 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2472e352d80fcf6440fd42fbb16960cc49d05b03 commit 2472e352d80fcf6440fd42fbb16960cc49d05b03 Author: Gleb Smirnoff AuthorDate: 2024-04-08 23:54:19 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 04:48:45 +0000 icmp: correct the assertion that checks limit + jitter Fixes: 4399e055ea610cdefa1470ad1ee614dd81ba5e56 (cherry picked from commit f7c4d12bcd5bd7f7fbf6bf9fa601c47e7f97bc5f) --- sys/netinet/ip_icmp.c | 2 +- sys/netinet6/icmp6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 67fb56dcdfa2..5ad1b2a664db 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1150,7 +1150,7 @@ sysctl_icmplim_and_jitter(SYSCTL_HANDLER_ARGS) } } } - MPASS(V_icmplim + V_icmplim_curr_jitter > 0); + MPASS(V_icmplim + V_icmplim_curr_jitter >= 0); return (error); } diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index c03c90e566c3..d6e47a29eede 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -2819,7 +2819,7 @@ sysctl_icmp6lim_and_jitter(SYSCTL_HANDLER_ARGS) } } } - MPASS(V_icmp6errppslim + V_icmp6lim_curr_jitter > 0); + MPASS(V_icmp6errppslim + V_icmp6lim_curr_jitter >= 0); return (error); } From nobody Wed Jun 26 07:04:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8CPK52Nlz5PCHN; Wed, 26 Jun 2024 07:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W8CPK48xKz461k; Wed, 26 Jun 2024 07:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719385477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhnBsiUOnWh/u4IFQGUzPNPGVOS+m8KEe+z5MSBPiHY=; b=luZoL5lOeE3nWn4QyDAUdxx5mOWLIomWMzzLRzORv9KHw8HIl/2St3dwxk2/DevRSnGbFz IZbQWdMQYOoT9BttpW34nudkwu1TaeCC52U6mFswOjxzL8A35h460QvzPTRVOIYDinoGJp 4UMc8eomVT01PIieJ1DjH6/Yx3vW4HqHBtgBITaEro0iV3UrkP/TB2tvl4zOESd365ATKl VtTlR9IY2Lwg6jIKSVKrQ1JsPFTTx8YLJ6D/vvMBktSbK1By9kqNJf/2Bsp9sV441YcETP Pkj7xk92ptkJH2zGYs2chbAz3KbW9P/Q5TFdU6Sc7S97I2cUkEef6kVxIDm1ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719385477; a=rsa-sha256; cv=none; b=MWLzVmRhfedK3LZD09HsT7szcNWllRhW1rB6nLY8T3f1B8p8C5o4zfXeGhKnCsCfDyJtSz Jw/PZpGGVWiKN/5lwn1l2aMXMX55XOB4FMmvKtLQLVmoFhWcxPXHj8EY2zTwTkOboY5cbv ANNsoIZiCNFIhMBy92L6MePG36ddqgdlk31s/GaTuM9u8dlCd17Smqe9cc16+84tVgm0PL GryNpfyVy4/At7d5Sf/8fKm9dUXiYqzmYpz37K0ZIgGIMwxUFOwPisx+ukZjzcAP1NJiHz JUvF0HeRAo5U/SDkYAvfy6lD2YPopXzL9rtgD9GDMjpdJ7zY0uOpQplr8MRTgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719385477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhnBsiUOnWh/u4IFQGUzPNPGVOS+m8KEe+z5MSBPiHY=; b=vsHAQ1zhvlx9a2cFykquGxJ5AmqtRQm76KOQAu9uyDx5TdXKkHpEBx5CN/SVbtVRtN4Mj9 M0MYaQKZmFOixtmr+fvTETBAXzfXVt2wbwNNLuMe/aSF75PKnDMNmC59FNU3prsi64GxAs WM+tTvQEBAmYM764XXczJsZLr/MFMU9Di0n9c8PeCcqxq3XiD6CAYJAZIMxFUKSoWu3Lfo lRFmsE174LIqWb7Nnv/BLX+I/aksKjUMqqeADeNEosE4WPsmRZnIp4ZDpbcypYLu6dPkKZ 5StjGgsT/e2RK/cPFKWB/Ucw0Ex/hgOGwAz6qGfGZek/o29XDLu/TVeh7kAOaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8CPK3YwZzbY9; Wed, 26 Jun 2024 07:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45Q74b0n091859; Wed, 26 Jun 2024 07:04:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q74bjM091856; Wed, 26 Jun 2024 07:04:37 GMT (envelope-from git) Date: Wed, 26 Jun 2024 07:04:37 GMT Message-Id: <202406260704.45Q74bjM091856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7e5574f9e5d9 - main - sched_unpin(): assert that curthread was pinned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/main X-Git-Reftype: branch X-Git-Commit: 7e5574f9e5d9df749ffc49657717527cfa93f6b4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7e5574f9e5d9df749ffc49657717527cfa93f6b4 commit 7e5574f9e5d9df749ffc49657717527cfa93f6b4 Author: Konstantin Belousov AuthorDate: 2024-06-25 20:08:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-06-26 07:04:10 +0000 sched_unpin(): assert that curthread was pinned Reviewed by: emaste, imp, markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45736 --- sys/sys/sched.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/sched.h b/sys/sys/sched.h index fd84b987d9b1..f017863270b4 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -180,6 +180,7 @@ static __inline void sched_unpin(void) { atomic_interrupt_fence(); + MPASS(curthread->td_pinned > 0); curthread->td_pinned--; } From nobody Wed Jun 26 08:21:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8F5W5qzvz5PKLc; Wed, 26 Jun 2024 08:21: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 4W8F5W4qdHz4DW3; Wed, 26 Jun 2024 08:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719390063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EN9G+ZvNfArt+TinI8pBNytRAtyKzZE2MHA28S/Jp/A=; b=Zb1AWu+NHyJx5yo7REcjAs9braLOzokgWcvIrzGy8bi8xVOLIVppNIIeMD9IeBg2vKULA/ lPHhKGmV1BvvlmScqx3W44sb9Enrkgbo1dZ6td4O8j61eGttiyoQuiaPIvXVaRHl+f2SA1 KxtNh15HAqQ1Ba9Shcoygs7i2McPLGz6rIn3wpj9yd7va5NJA2EqVaTO+bCfmaqr29vMdB 2TDFBnkueCGeyBcLUDMfkfGm+zbclAdLlxcKRXHOes+JsYxmN6vz267pvseZxnt/qPmXbE 3qn8Jqz5eAAJJ1IEi4hB1ozcAcIsnkER+82xioPZZgb9G7xJo3i8ZPEfe06xWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719390063; a=rsa-sha256; cv=none; b=JOGs2ywYQQzB8qu8XbaJBRBkkXS2a1NTeMKgjTSKaYeiQOnl5P/ogMMYKMpqSpOSl9H7iF H6AVng9oE7fei2533wbKNBLwwycFYtXsNLpgPmZM4Rcowqgt+GW4e7iBLl/7+Ndk8nc+VJ VnQHQeiRDOsH5r07VD3sLI4rUTBqlV8ztf8E7G27x4/lw3SdgrbkoKAEmeG1PQpYnMIq3B TojhfZrUfHWC/LLtJWeOoEkVNPFGiVNPpy6oAvoHOx5YY4AjmD0/znGIydmgza2Ti3Dce0 n9v1WVHsyGF0ulAZDrvfEY92EeQa0ltSOlD4d1/9jtywGbwmcuwQu/OFSGQQYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719390063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EN9G+ZvNfArt+TinI8pBNytRAtyKzZE2MHA28S/Jp/A=; b=yDSHmMnb1/34ZD5J03lwFe0L+Pj7DAfPkv1YTEcDvbKaUIKoENtlykGbcgpHJlP/0icpXZ eH+y+7sIGERuCRlNolziHAq5Sss0FJdSlrl+bb18UZ/8jSw5SnzLKOdzofgKW66bQ73Kk0 EkS3gGgA9pTx1XVrjhQQ01RHQvl04HhmS522sQ1yP6EXgPBXvhRZrHi6JBFWbbT7o7voMy 7Z/SsbNo7aOqpPewD4ObbQtS+LC8Q1G3U+PwijBWi4dbJ2adDVO7uXJ4DM7TFEdQwVD0Lv PRLwWyHyFqd0LoqeUuGqyZJtu2A+vrW7BNL4F5HzhpbODwEm25qfhDIt90JAPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8F5W4R1DzdVC; Wed, 26 Jun 2024 08:21: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 45Q8L3ix021109; Wed, 26 Jun 2024 08:21:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q8L3W3021106; Wed, 26 Jun 2024 08:21:03 GMT (envelope-from git) Date: Wed, 26 Jun 2024 08:21:03 GMT Message-Id: <202406260821.45Q8L3W3021106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 7d37fcbf52b1 - main - cxgbe: replace a loop with rounddown_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d37fcbf52b14785623bdbceb97bba8044fb739e Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=7d37fcbf52b14785623bdbceb97bba8044fb739e commit 7d37fcbf52b14785623bdbceb97bba8044fb739e Author: Doug Moore AuthorDate: 2024-06-26 08:19:16 +0000 Commit: Doug Moore CommitDate: 2024-06-26 08:19:16 +0000 cxgbe: replace a loop with rounddown_pow_of_two Replace a loop with a function call. Reviewed by: np, alc Differential Revision: https://reviews.freebsd.org/D45716 --- sys/dev/cxgbe/t4_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 96407e7ebaba..08cad0324c28 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -4349,9 +4349,7 @@ calculate_iaq(struct adapter *sc, struct intrs_and_queues *iaq, int itype, */ do { if (iaq->nrxq > 1) { - do { - iaq->nrxq--; - } while (!powerof2(iaq->nrxq)); + iaq->nrxq = rounddown_pow_of_two(iaq->nrxq - 1); if (iaq->nnmrxq > iaq->nrxq) iaq->nnmrxq = iaq->nrxq; } From nobody Wed Jun 26 08:53:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Fph3jCmz5PNRf; Wed, 26 Jun 2024 08: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 4W8Fpg2sjMz4H53; Wed, 26 Jun 2024 08:53:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719391995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yy1S76cvkm08ZjaIeHEckUJwDQPTCgetqK69iED7Iy0=; b=PkR6KGl3YNYbeDeEjfi8fmOwTWzIW1hx69Fguwn/R+fwaICecOrrmbsxCuDGABXzOAEL7G Akne40TyCM/jaEtzslLxj64MHQkr3Hj/AWPFokXjfr8SjqTuK7QsBuflvByRE59UGDQThA R3uo0wRHV0FCuEMvToL6XBvE887xT4WTij70jIyMKbps1C64DK2SIvl1IPGwYNeE3PtchU cBHRZULZDtZ5qOITJY1zI7Qgy/HR47zfaplMf4K21UFKOkyC4Hfc9ZRdRN5ebtt+mwBSvS 3yrx8yEgU/Q4uKJMydDNwBU0Z3Za3Q+OawNpCNT0u3CETWwcZYKTAeXDTuVvYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719391995; a=rsa-sha256; cv=none; b=N/L5GoqvIOF8IKkHF+7lCQjL0565lJE7bHmX24NKxO1QbCU/i+n8T07T74geUKBL6arG0g V0yvBXoE+sWKVxmM/ZSfe8KQZFG/lhI8JhIqBu3rCPeE5Hnnz+pzuNycA4Pnn8xg9yEGgq oQk0SgNJ7wKxhWjuf0KdilxfFiFu33VbNkRMn4txvmFXFuRJJ9liNncucnm1gzg0rWa0rt b0OB5WpFhish6RkRF3erXU9EfskwcJK0yzW+5RR0fqDeBtrt6mnMuHnbZ/Dzm3sfN5T9a6 yga1baUqCJtiZBgXHltl+NxHfZ1HO9NuYY5d9/crPTE2HAQzH952T+gX1qLEpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719391995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yy1S76cvkm08ZjaIeHEckUJwDQPTCgetqK69iED7Iy0=; b=G0Eh1WpRZMHVP+bhNqSCHFsVe6jc5DnNRZ5FhMVUsgZgG73FVgXvvOp+rz8VutytSChcH7 poECcukQb/ZCoEwuTz2Bc1XYUxWCJsCpXwyVF/TG7kiFzD7vKhSrLo7c4K5uOy17JVwdbh XfSmAg7PVO5bFPlmirIzYJURErRSgGbEZqngny9r5rXUiS8NMxJCNC1BuxLEQQoZTp5PJg iA7ZUPTgq7mkt9jJ8xGtG87fTARZboW06X3VHxysbFRZKqXw7hkF8x2MyhIWSblYchFg7n HJTqkgBNKchZS2NsOE5+hi4uXw/1HNyOIV6+gD+zXZ2T1FXpNtEI4Ipdy7rU9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Fpg2KvZzdsM; Wed, 26 Jun 2024 08:53: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 45Q8rF1N076108; Wed, 26 Jun 2024 08: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 45Q8rFqQ076105; Wed, 26 Jun 2024 08:53:15 GMT (envelope-from git) Date: Wed, 26 Jun 2024 08:53:15 GMT Message-Id: <202406260853.45Q8rFqQ076105@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: 5afc347944e7 - main - arm: Start to remove the now unneeded acle-compat.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5afc347944e760774797b3275124591d69228fc1 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5afc347944e760774797b3275124591d69228fc1 commit 5afc347944e760774797b3275124591d69228fc1 Author: Andrew Turner AuthorDate: 2024-06-25 08:59:42 +0000 Commit: Andrew Turner CommitDate: 2024-06-26 08:52:08 +0000 arm: Start to remove the now unneeded acle-compat.h All supported compilers provide the acle macros so we don't need the backup versions. Keep the file around for anything that included it directly, but make it an error to not support the acle macros. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45726 --- sys/arm/include/acle-compat.h | 158 +----------------------------------------- 1 file changed, 3 insertions(+), 155 deletions(-) diff --git a/sys/arm/include/acle-compat.h b/sys/arm/include/acle-compat.h index 0d5726b7846c..6ab48ac16669 100644 --- a/sys/arm/include/acle-compat.h +++ b/sys/arm/include/acle-compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 ARM Ltd + * Copyright (c) 2024 Arm Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,157 +27,5 @@ */ #ifndef __ARM_ARCH - -/* ACLE standardises a set of pre-defines that describe the ARM architecture. - These were mostly implemented in GCC around GCC-4.8; older versions - have no, or only partial support. To provide a level of backwards - compatibility we try to work out what the definitions should be, given - the older pre-defines that GCC did produce. This isn't complete, but - it should be enough for use by routines that depend on this header. */ - -/* No need to handle ARMv8, GCC had ACLE support before that. */ - -#define __ARM_ACLE 101 - -# ifdef __ARM_ARCH_7__ -/* The common subset of ARMv7 in all profiles. */ -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_LDREX 7 -# define __ARM_FEATURE_UNALIGNED -# endif - -# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_ARCH_ISA_ARM -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 15 -# define __ARM_FEATURE_UNALIGNED -# ifdef __ARM_ARCH_7A__ -# define __ARM_ARCH_PROFILE 'A' -# else -# define __ARM_ARCH_PROFILE 'R' -# endif -# endif - -# ifdef __ARM_ARCH_7EM__ -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 7 -# define __ARM_FEATURE_UNALIGNED -# define __ARM_ARCH_PROFILE 'M' -# endif - -# ifdef __ARM_ARCH_7M__ -# define __ARM_ARCH 7 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 7 -# define __ARM_FEATURE_UNALIGNED -# define __ARM_ARCH_PROFILE 'M' -# endif - -# ifdef __ARM_ARCH_6T2__ -# define __ARM_ARCH 6 -# define __ARM_ARCH_ISA_THUMB 2 -# define __ARM_ARCH_ISA_ARM -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_LDREX 4 -# define __ARM_FEATURE_UNALIGNED -# endif - -# ifdef __ARM_ARCH_6M__ -# define __ARM_ARCH 6 -# define __ARM_ARCH_ISA_THUMB 1 -# define __ARM_ARCH_PROFILE 'M' -# endif - -# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \ - || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \ - || defined (__ARM_ARCH_6ZK__) -# define __ARM_ARCH 6 -# define __ARM_ARCH_ISA_THUMB 1 -# define __ARM_ARCH_ISA_ARM -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_SIMD32 -# define __ARM_FEATURE_DSP -# define __ARM_FEATURE_QBIT -# define __ARM_FEATURE_SAT -# define __ARM_FEATURE_UNALIGNED -# ifndef __thumb__ -# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) -# define __ARM_FEATURE_LDREX 15 -# else -# define __ARM_FEATURE_LDREX 4 -# endif -# endif -# endif - -# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__) -# define __ARM_ARCH 5 -# define __ARM_ARCH_ISA_ARM -# ifdef __ARM_ARCH_5TE__ -# define __ARM_ARCH_ISA_THUMB 1 -# endif -# define __ARM_FEATURE_CLZ -# define __ARM_FEATURE_DSP -# endif - -# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__) -# define __ARM_ARCH 5 -# define __ARM_ARCH_ISA_ARM -# ifdef __ARM_ARCH_5TE__ -# define __ARM_ARCH_ISA_THUMB 1 -# endif -# define __ARM_FEATURE_CLZ -# endif - -# ifdef __ARM_ARCH_4T__ -# define __ARM_ARCH 4 -# define __ARM_ARCH_ISA_ARM -# define __ARM_ARCH_ISA_THUMB 1 -# endif - -# ifdef __ARM_ARCH_4__ -# define __ARM_ARCH 4 -# define __ARM_ARCH_ISA_ARM -# endif - -# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__) -# define __ARM_ARCH 3 -# define __ARM_ARCH_ISA_ARM -# endif - -# ifdef __ARM_ARCH_2__ -# define __ARM_ARCH 2 -# define __ARM_ARCH_ISA_ARM -# endif - -# ifdef __ARMEB__ -# define __ARM_BIG_ENDIAN -# endif - -/* If we still don't know what the target architecture is, then we're - probably not using GCC. */ -# ifndef __ARM_ARCH -# error Unable to determine architecture version. -# endif - -#endif /* __ARM_ARCH */ +#error Your compiler is too old +#endif From nobody Wed Jun 26 09:25:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8GWx4mDYz5PQqs; Wed, 26 Jun 2024 09:25: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 4W8GWx4DlWz4KXY; Wed, 26 Jun 2024 09:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719393933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a375PhxMthj3Ncyfbog2KGPl8gvbOiEFMYzFMIsbVkk=; b=qsVhabKvt2vajjkULZzhxdEBudXwHTpwHMM39J2qmG6jh8uK6lvT1O6hwfxidQr7qATzfj YPs0TWhKi6gYcrDTC8kYxQ2qCpn/BLuK1SWO6jNqbHUY5AK6PyIbTNKkc8Q1Ax95+aZpMa IUcKury0TRHNzfxl63LNCz6DKa9S1Zzerc9Hk24AsUHNhScR/A67b1JXGXN5wIxeyUb9Nw 0YEopNHXwMvczH6HkWrmVndlRFbSdU/1xVVSJZc+mtLoH4/LhWOb6jYcpwUPmAs803x9hY iJXmOArQIhzqi7Exzn8iqghOjfOmyy+h6SuM4aQ8Iz99k7Juph+WB4YugszbzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719393933; a=rsa-sha256; cv=none; b=iBCTi32F2Y45Rclo8xgkz8qTQFYexpbVfZkWh3EKZTqf+QtyRcLHoiVRCDTOCsbyUislk0 xBkV5LYCju1z4KbqU/Hh310WIKxshobOpE0f0RkGdWsEp703mbPrRqkXAYrTsDz22OvhhG VRb1R+/krYgYmzgQeM9iFeWCTJNkZvdXgSbN1MJdvzA2pmfojitnxqbPW1dEACzkkO89Pj 7D6dXuW7btFnIKNsaUbDzLRF/IVRQ2pNZ5t5ftkSt1u7c6j6kfmiKFG1Y5JtTLjTcVG4DL i+qJKYf9cxFQQ4/hQyBrkS2Ea/V6CFDQJtCUf3T2JMjrUpP8Nr61F730RfdNRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719393933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a375PhxMthj3Ncyfbog2KGPl8gvbOiEFMYzFMIsbVkk=; b=vmz4jTW7ijm78Ff0t01fYV0eanRGRFtlICw27IpBtOLqQz1MUl47DVw1CPaZE8BgSRZJJF gm3GZS/0+4cuUD15eTTokrMvSiZK96Al77/Fyi4cIxSOAiAKjBxSRmr5dvgLokuuOPeS7Q kvoAMjkyI0/xBe3lW/9gAMs8eWBFfp8Fa52hHnzEt/sY7N8iUbFncmkMv+z44+PXLFBgv8 0dVf1LJFI3b87TiJJuzNQrWq+XFsAxSV+o7eKQp2fYHe0VT5omnVjoFPLjjTbpOMHsgK7r gCRAAILmIKI0caLSuXaa97NeM7/dc4eA0bGiWvLUNCaQFi60T1SQN/BbRAR37w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8GWx3r2czg7h; Wed, 26 Jun 2024 09:25: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 45Q9PXFZ026675; Wed, 26 Jun 2024 09:25:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q9PX3G026672; Wed, 26 Jun 2024 09:25:33 GMT (envelope-from git) Date: Wed, 26 Jun 2024 09:25:33 GMT Message-Id: <202406260925.45Q9PX3G026672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 8502c68d29a8 - main - x86_iommu: use roundup_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8502c68d29a82556a3afd9325321153f80c1daaa Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=8502c68d29a82556a3afd9325321153f80c1daaa commit 8502c68d29a82556a3afd9325321153f80c1daaa Author: Doug Moore AuthorDate: 2024-06-26 09:23:54 +0000 Commit: Doug Moore CommitDate: 2024-06-26 09:23:54 +0000 x86_iommu: use roundup_pow_of_two Drop a private implementation of roundup_pow_of_two and use the global one instead. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45739 --- sys/x86/iommu/intel_intrmap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index 66238b46c25e..22fd51bc8be9 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -315,13 +315,6 @@ dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie) return (0); } -static u_int -clp2(u_int v) -{ - - return (powerof2(v) ? v : 1 << fls(v)); -} - int dmar_init_irt(struct dmar_unit *unit) { @@ -339,7 +332,7 @@ dmar_init_irt(struct dmar_unit *unit) "QI disabled, disabling interrupt remapping\n"); return (0); } - unit->irte_cnt = clp2(num_io_irqs); + unit->irte_cnt = roundup_pow_of_two(num_io_irqs); unit->irt = kmem_alloc_contig(unit->irte_cnt * sizeof(dmar_irte_t), M_ZERO | M_WAITOK, 0, iommu_high, PAGE_SIZE, 0, DMAR_IS_COHERENT(unit) ? From nobody Wed Jun 26 10:01:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8HKK6XC3z5PTSM; Wed, 26 Jun 2024 10:01: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 4W8HKK0l3Rz4N00; Wed, 26 Jun 2024 10:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719396085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gp678yIV1oB8u3o+7DtE1AQvaMA0TSHWLRomU5wNqc=; b=q43xqUZ8f1NlUXWcqFM9Jg8ZFlNKmtFTWdL956j+FyLzegV3lund1XLnPXMaXd3cp5ymtn sDlqxZ2oX+NU0b+EIcvDPPb7ze8SAOlmn2rn34552OOPJGcuvt4VTLXRoPbpmHw2YgtrOb nwzdRQw8AVXiSYVOUOMfgrAqODegsfBuCHyaTxQTxQtpiSjcee1xFZ0FYkjai/yNaCSYhe lX3jwcH7AAplI/69jgCjYNmxgyv4ZD+kqLN9P8U3dytJgC/KQEXK7OyZS1NJHVktWXD8YP WaE5oCXQpiIiRv/6ZQ0Osw1zXhrfWE4XRI45ycodP4MSW6zDCAYF5pWHSIsiAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719396085; a=rsa-sha256; cv=none; b=wNOq577JAyA4cxoHNIvt6o0ZI7VA3TDohBly4mSAcIXiauXk0axTetaOVW9J1Zf7M3NGwY 2Jhl5pwX62U9IKcJOnlCcnLMim/DWkAqrFUNmwOva8eIN11762BaU4GWK4lcxoLyx59zgY p3IJGWB+VlsDOyfkIz6rSEXGl9q55z4a/FiKGB6aOEUFVWkiT1wdxcEi5lvhGXwqTLyeCH hnRYLWRI43ZZBdxYEaQObS6oGEpnVGqHu54B3GwkcdK5rW8dc34bruFslVFrPA8hFKYoW3 RVNprK7rldSQqzY75lkFc3eJpyOOuCB6hTPqMemWzeCUt/Su4YzHIVz531rxkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719396085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gp678yIV1oB8u3o+7DtE1AQvaMA0TSHWLRomU5wNqc=; b=OEsRRxbnnu0mh0Om3NEZzt6phiGIUtDRMga5ZdRNfY3H/cRM1zKgp4Hz6LkLk79m0uAfPJ ZFBHYKyBZerXM6YK1lnlXyZBF2YzAYp/v/YsdQOLu9G47QurhKM+GcROemoqUufvx/020B PoDkkAE1nrCf0rIG3ZAXlw1qu+1+4LEU3wFZ3W6sL0i2EXmGienHzGbyAOyT76C7J+jQzg jtAs9DsFr8WrheD/BjCdaxVy3eb14s3UOXso9UV2gSwy3n2A4FdA3f/E/jC0aHlOX/pi8W hRu6Wql52tATcLJY691F59SzF2xK1TXYAky0fHjhpAOqaiqWa4y1aFIYZWZHFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8HKK0Ltbzh8q; Wed, 26 Jun 2024 10:01: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 45QA1Oo5090774; Wed, 26 Jun 2024 10:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QA1OgO090771; Wed, 26 Jun 2024 10:01:24 GMT (envelope-from git) Date: Wed, 26 Jun 2024 10:01:24 GMT Message-Id: <202406261001.45QA1OgO090771@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: 2cb7605a2415 - main - lo: Use new KPI to create the first loop interface List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 2cb7605a2415a1c0dd35374a88f815ef00e31de9 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2cb7605a2415a1c0dd35374a88f815ef00e31de9 commit 2cb7605a2415a1c0dd35374a88f815ef00e31de9 Author: Zhenlei Huang AuthorDate: 2024-06-26 10:00:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-26 10:00:37 +0000 lo: Use new KPI to create the first loop interface While here remove a pointless static local variable lo_cloner. No functional change intended. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45728 --- sys/net/if_loop.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index c5be3d17f447..926d264073ec 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -93,13 +93,9 @@ static int looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro); VNET_DEFINE(struct ifnet *, loif); /* Used externally */ - -#ifdef VIMAGE VNET_DEFINE_STATIC(struct if_clone *, lo_cloner); #define V_lo_cloner VNET(lo_cloner) -#endif -static struct if_clone *lo_cloner; static const char loname[] = "lo"; static int @@ -141,8 +137,6 @@ lo_clone_create(struct if_clone *ifc, char *name, size_t len, ifp->if_hwassist = LO_CSUM_FEATURES | LO_CSUM_FEATURES6; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); - if (V_loif == NULL) - V_loif = ifp; *ifpp = ifp; return (0); @@ -156,12 +150,9 @@ vnet_loif_init(const void *unused __unused) .destroy_f = lo_clone_destroy, .flags = IFC_F_AUTOUNIT, }; - lo_cloner = ifc_attach_cloner(loname, &req); -#ifdef VIMAGE - V_lo_cloner = lo_cloner; -#endif + V_lo_cloner = ifc_attach_cloner(loname, &req); struct ifc_data ifd = { .unit = 0 }; - ifc_create_ifp(loname, &ifd, NULL); + ifc_create_ifp(loname, &ifd, &V_loif); } VNET_SYSINIT(vnet_loif_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_loif_init, NULL); From nobody Wed Jun 26 14:16:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8NzG6pJ0z5PcnG; Wed, 26 Jun 2024 14:16: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 4W8NzG65MZz4gMy; Wed, 26 Jun 2024 14:16:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719411370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=it9vDHyOEIV3duoQrnYyn2+zqLJT2I1/c4xiFVUCmMQ=; b=S4DspFoINNc9GNFJPZJbFaoQhY25iRk7uusMy3gqmDtYwz4iatEo+klWFKhmX3X6KRmIn2 abo4H4FXVFwMo5Z4soldE1ynuOwDZRwuWN2ZA5taHRomDBoLnpiHFq64gmBjL3gKITASEj 5dqd5pWQ3eFa3zBmAHeQDGgXSRHitj/ncf7J9JcYrqmI6v4c6sa7vEtkiQ5hWJdjgQaznS KDvUGLPp+EAzo2l6VzV/0t+wt/AeyNeNa7SUJ/M2XvTuanwax9ZOXbJuj/9bhKICi+p1Ka Ibk7TNcdP9gMYWdCjDTBhrcyfMuCD54TKi7EeJ2eFysZi5FxOUbuo+tzzBfXMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719411370; a=rsa-sha256; cv=none; b=PM4RU90G2nllivJQEPkdX6g6/59MnciJepUd+ini2vOy47a0kqH1FYRzz+mcVwkpxfMfTH gLsrgIVevFFK0FFLr2ulJR3PKrdaD3OFxlgIUHPpJXR702OnfesJs20QTW9gGV2St+NmSe YNLQJSWi+mJOrBQRgQsvfPFiemJgMShNJRFO/b3X6fGHm3+80gyFPJb/iLI94kjUTmlmF0 684+zQL1+QSeNN+XrPvHu+UQWs0yzy/cyz6IG26G1dnyCwE7ujkHijvIBhLNKrbAHh+BnJ hlSn8bz5f9f33DUlQAp7JqnAoIgZluNVpLG/UBlMYZcgNPW/h1m50JyFBpqzkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719411370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=it9vDHyOEIV3duoQrnYyn2+zqLJT2I1/c4xiFVUCmMQ=; b=fgArSqv8aqMUt7+cEvkiAi+QzHg7fWuHzeACwpPQJyPqDJBi4ZwL7BEFkGGkiPlvotLuF1 G116aYbgkONevpel/jy8Q4q5mKlxUe1CbfkU0gv3B/wH5D9kNKL01yKkn7iS1uJ349R0NM WV/XUMiCtSHv9HdpUjFX2IbsDbc78yFnl0dn5lQPfuGYr5IvpAq2kggFRtNVjWUpIRFSE/ FPacoKHIm4Azu6gGIpeLT0jW0JEN2y+P/6kiPnCA2up4vCf6Al/hjX48OvK6CtTkOsiJ9Q i03LRQkw3kPCf3pZ18FRHaUlqHRjXwMPNKAV7iRwS0Py0ua6S8XTmlGHZqnKqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8NzG5Z4lznJY; Wed, 26 Jun 2024 14:16: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 45QEGAWx015745; Wed, 26 Jun 2024 14:16:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QEGAc8015742; Wed, 26 Jun 2024 14:16:10 GMT (envelope-from git) Date: Wed, 26 Jun 2024 14:16:10 GMT Message-Id: <202406261416.45QEGAc8015742@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: 609cdb12b962 - main - ofw: convert boolean_t to bool List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 609cdb12b9620dfa7c124b2f1834cd79e5cd98ec Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=609cdb12b9620dfa7c124b2f1834cd79e5cd98ec commit 609cdb12b9620dfa7c124b2f1834cd79e5cd98ec Author: Mitchell Horne AuthorDate: 2024-06-26 14:01:49 +0000 Commit: Mitchell Horne CommitDate: 2024-06-26 14:14:36 +0000 ofw: convert boolean_t to bool Most of these already treat it as a proper bool, i.e. using true/false. Also fix-up callers of OF_install(). No functional change intended. Reviewed by: andrew, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45733 --- sys/arm64/arm64/machdep.c | 2 +- sys/dev/ofw/ofw_bus_subr.c | 4 ++-- sys/dev/ofw/ofw_cpu.c | 4 ++-- sys/dev/ofw/ofw_cpu.h | 2 +- sys/dev/ofw/openfirm.c | 10 +++++----- sys/dev/ofw/openfirm.h | 4 ++-- sys/powerpc/include/ofw_machdep.h | 2 +- sys/powerpc/ofw/ofw_machdep.c | 18 +++++++++--------- sys/riscv/riscv/machdep.c | 2 +- sys/x86/x86/fdt_machdep.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index e7d46ff70531..090ea2c10853 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -754,7 +754,7 @@ try_load_dtb(caddr_t kmdp) return; } - if (OF_install(OFW_FDT, 0) == FALSE) + if (!OF_install(OFW_FDT, 0)) panic("Cannot install FDT"); if (OF_init((void *)dtbp) != 0) diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c index d63e89e2d677..a6d562cd8e9d 100644 --- a/sys/dev/ofw/ofw_bus_subr.c +++ b/sys/dev/ofw/ofw_bus_subr.c @@ -641,7 +641,7 @@ ofw_bus_intr_to_rl(device_t dev, phandle_t node, phandle_t iparent; uint32_t icells, *intr; int err, i, irqnum, nintr, rid; - boolean_t extended; + bool extended; nintr = OF_getencprop_alloc_multi(node, "interrupts", sizeof(*intr), (void **)&intr); @@ -707,7 +707,7 @@ ofw_bus_intr_by_rid(device_t dev, phandle_t node, int wanted_rid, phandle_t iparent; uint32_t icells, *intr; int err, i, nintr, rid; - boolean_t extended; + bool extended; nintr = OF_getencprop_alloc_multi(node, "interrupts", sizeof(*intr), (void **)&intr); diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c index e18004ae19d2..127510a64f4f 100644 --- a/sys/dev/ofw/ofw_cpu.c +++ b/sys/dev/ofw/ofw_cpu.c @@ -151,7 +151,7 @@ static int ofw_cpu_read_ivar(device_t dev, device_t child, int index, struct ofw_cpu_softc { struct pcpu *sc_cpu_pcpu; uint32_t sc_nominal_mhz; - boolean_t sc_reg_valid; + bool sc_reg_valid; pcell_t sc_reg[2]; }; @@ -335,7 +335,7 @@ ofw_cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) } int -ofw_cpu_early_foreach(ofw_cpu_foreach_cb callback, boolean_t only_runnable) +ofw_cpu_early_foreach(ofw_cpu_foreach_cb callback, bool only_runnable) { phandle_t node, child; pcell_t addr_cells, reg[2]; diff --git a/sys/dev/ofw/ofw_cpu.h b/sys/dev/ofw/ofw_cpu.h index cb30dfb6e262..9f4e9e65aa61 100644 --- a/sys/dev/ofw/ofw_cpu.h +++ b/sys/dev/ofw/ofw_cpu.h @@ -30,6 +30,6 @@ #define _DEV_OFW_OFW_CPU_H_ typedef bool (*ofw_cpu_foreach_cb)(u_int, phandle_t, u_int, pcell_t *); -int ofw_cpu_early_foreach(ofw_cpu_foreach_cb, boolean_t); +int ofw_cpu_early_foreach(ofw_cpu_foreach_cb, bool); #endif /* _DEV_OFW_OFW_CPU_H_ */ diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index 881a2cccb072..f9c73122b454 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -96,7 +96,7 @@ struct xrefinfo { static SLIST_HEAD(, xrefinfo) xreflist = SLIST_HEAD_INITIALIZER(xreflist); static struct mtx xreflist_lock; -static boolean_t xref_init_done; +static bool xref_init_done; #define FIND_BY_XREF 0 #define FIND_BY_NODE 1 @@ -193,7 +193,7 @@ xrefinfo_add(phandle_t node, phandle_t xref, device_t dev) */ SET_DECLARE(ofw_set, ofw_def_t); -boolean_t +bool OF_install(char *name, int prio) { ofw_def_t *ofwp, **ofwpp; @@ -202,7 +202,7 @@ OF_install(char *name, int prio) /* Allow OF layer to be uninstalled */ if (name == NULL) { ofw_def_impl = NULL; - return (FALSE); + return (false); } /* @@ -216,11 +216,11 @@ OF_install(char *name, int prio) prio >= curr_prio) { curr_prio = prio; ofw_def_impl = ofwp; - return (TRUE); + return (true); } } - return (FALSE); + return (false); } /* Initializer */ diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index 149f2a951745..30203404a6b0 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -83,8 +83,8 @@ MALLOC_DECLARE(M_OFWPROP); * interface as the Open Firmware access mechanism, OF_init initializes it. */ -boolean_t OF_install(char *name, int prio); -int OF_init(void *cookie); +bool OF_install(char *name, int prio); +int OF_init(void *cookie); /* * Known Open Firmware interface names diff --git a/sys/powerpc/include/ofw_machdep.h b/sys/powerpc/include/ofw_machdep.h index 7c3767dfc679..8b3f912fec8c 100644 --- a/sys/powerpc/include/ofw_machdep.h +++ b/sys/powerpc/include/ofw_machdep.h @@ -42,7 +42,7 @@ typedef uint32_t cell_t; void OF_getetheraddr(device_t dev, u_char *addr); void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)); -boolean_t OF_bootstrap(void); +bool OF_bootstrap(void); void OF_reboot(void); diff --git a/sys/powerpc/ofw/ofw_machdep.c b/sys/powerpc/ofw/ofw_machdep.c index 6d7b0b01fc84..bffc04b15259 100644 --- a/sys/powerpc/ofw/ofw_machdep.c +++ b/sys/powerpc/ofw/ofw_machdep.c @@ -595,10 +595,10 @@ OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)) fdt = fdt_ptr; } -boolean_t +bool OF_bootstrap(void) { - boolean_t status = FALSE; + bool status = false; int err = 0; #ifdef AIM @@ -613,8 +613,8 @@ OF_bootstrap(void) #endif } - if (status != TRUE) - return status; + if (!status) + return (status); err = OF_init(openfirmware); } else @@ -629,8 +629,8 @@ OF_bootstrap(void) #endif status = OF_install(OFW_FDT, 0); - if (status != TRUE) - return status; + if (!status) + return (status); #ifdef AIM /* AIM-only for now -- Book-E does this remapping in early init */ /* Get the FDT size for mapping if we can */ @@ -668,15 +668,15 @@ OF_bootstrap(void) */ else { status = OF_install(OFW_FDT, 0); - if (status != TRUE) - return status; + if (!status) + return (status); err = OF_init(&fdt_static_dtb); } #endif if (err != 0) { OF_install(NULL, 0); - status = FALSE; + status = false; } return (status); diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index ffb29e53b88e..eda7ebc32bbf 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -321,7 +321,7 @@ try_load_dtb(caddr_t kmdp) return; } - if (OF_install(OFW_FDT, 0) == FALSE) + if (!OF_install(OFW_FDT, 0)) panic("Cannot install FDT"); if (OF_init((void *)dtbp) != 0) diff --git a/sys/x86/x86/fdt_machdep.c b/sys/x86/x86/fdt_machdep.c index 901655d829b4..30820a88d263 100644 --- a/sys/x86/x86/fdt_machdep.c +++ b/sys/x86/x86/fdt_machdep.c @@ -46,7 +46,7 @@ x86_init_fdt(void) void *dtbp, *mdp; int error; - if (OF_install(OFW_FDT, 0) == FALSE) { + if (!OF_install(OFW_FDT, 0)) { error = ENXIO; goto out; } From nobody Wed Jun 26 15:19:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8QMs3hjbz5PjRj; Wed, 26 Jun 2024 15:19: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 4W8QMs33Qtz4mvv; Wed, 26 Jun 2024 15:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719415145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1hslawq+UuPhpJChuC8U7+S91BfddrMkywYRTP/u8lo=; b=MzEI0wsH264g2wPUkBny0zTGxsFoz+S6ie7syjkbNgtVxnkrC99nNuZaJvHU0YfNGpgKMC wFZzpxPfWvVGColjWgT4bKEGSxqLtUvmyExDG63g06R543Ib468sAeX8kzAhFxx3vti1Dn 4xMNbeWWJ2MWJJLkrsE90qaCDI59BoHzYfAaremRwkh7sNmD+XpcX+Lxjo9bjJpUwYFfmf atgmzSf7aPAM92Lxx6i9KJ1KTzHUvgWPfbzpE/JYURdjK/ZqrtNOUm0bTjLM4z5y0NSymT LVGu3rOOfOARzJ+xoxn+mgqrVePHHQe14FL6YDRxjYeJev10kcEP0KmJsR5OGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719415145; a=rsa-sha256; cv=none; b=dEFvhxgEbDtcJJuKh4Wh7uHJG2Kl1vvejMIPYMnMUAjETjZHzoFRhQSKB26dOOiAAReIlv I5FOmZKDlkPozyuCZA7oV+z/xf2ULRio2AgzYMVxYvGRDLqILTl+q/A1OvL4CRLL4GXRT9 ChIjeW1h1HP4y9xulEW0DX1BJ5YB7zxK+QJFx6sp/VNXQEzRJK6wVLjfpGLSrwvdesgcLk bUT0pSeeXe9fBoYmvQFrO5gW1RMJ57pOYRfxokJISnkE/NznCYgX7bLnxxUel5D5pRzqhm DKiP3O0cALOgpbopTyH9SVZqdFJjfWkIPCRBEkZxBBYnz9Nls6CCgGeCvSwM9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719415145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1hslawq+UuPhpJChuC8U7+S91BfddrMkywYRTP/u8lo=; b=tiFtotNxtf6NQiA4sbfzkXYovP7aOpJwfJ3DwjubvpB4Smoey3R41Hcr42Rp0dx3AXwZRH ho85LEFvrSbfzYBDFtMbosG0V7Vqf/ltbeIABQiIvJC43/73isZos7ukgiNFli/ieOJBRy 9VH2QJ3C3aaM6ywVJzV2rpAyZAOghZKNu0kBob2wk3hQjlZaXHRMqrdVa9yAans3EMU/P8 qP8zptf3/viq+shRSuFQ0qNOTgy/MXvTRaJBRQ36g+fuTJvTiZO1wgUS9RKRUEWi34I8T/ ZMOM2lsuTmsvJ+i/nvAf1lY6z+9Wt0KWO43AexoEJin8lZxrlDgN6HLoSOqgKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8QMs2fgczqPk; Wed, 26 Jun 2024 15:19: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 45QFJ54G017835; Wed, 26 Jun 2024 15:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QFJ5bu017832; Wed, 26 Jun 2024 15:19:05 GMT (envelope-from git) Date: Wed, 26 Jun 2024 15:19:05 GMT Message-Id: <202406261519.45QFJ5bu017832@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: 0c00c3d75b27 - main - test: Change bug number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0c00c3d75b27de4a367cfbf7299c000ed0e62486 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c00c3d75b27de4a367cfbf7299c000ed0e62486 commit 0c00c3d75b27de4a367cfbf7299c000ed0e62486 Author: Warner Losh AuthorDate: 2024-06-26 15:18:03 +0000 Commit: Warner Losh CommitDate: 2024-06-26 15:18:50 +0000 test: Change bug number There was already a bug on this, so change to old bug PR: 279354 Sponsored by: Netflix --- tests/sys/kern/unix_seqpacket_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index 3befeceb3d0a..ba3de0adb1e9 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -1198,7 +1198,7 @@ ATF_TC_BODY(random_eor_and_waitall, tc) int fd[2], eor; if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/279994"); + atf_tc_skip("https://bugs.freebsd.org/279354"); arc4random_buf(params.seed, sizeof(params.seed)); printf("Using seed:"); From nobody Wed Jun 26 20:54:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq13tJlz5QDDK; Wed, 26 Jun 2024 20:54: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 4W8Yq13JlQz4LXJ; Wed, 26 Jun 2024 20:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJ23oEtuHF6fbYm+QJ8Fix0PY4N3Bic0dRFNG1meO6Y=; b=OlEDOLkdW5fUZ0wjCwb+IvyOk9zhOhV3BVmO/aOB0VP4o4bU/yZSSPxYb3wCqJVUOOYYSP zEHhevph6oAyPk7n4XT20rrkXUDR5HvagePdaVR14KU2+IM9MP2CrJP08cyAja29oXGgbG KaqXiGPwhUM8pZxAZunCOkBph1yU1nRAhriE20B39qr5zYCbaeMtH/0PYhi/RjNkuphmnC vSfTGBv/wgfNFDw/f7Arj8Wo//nzx40Yr0p8qF+PiTNcD0RYdb8P0bQrPK5B/cl7zG/BOh z26EAV50D3NhG9nrjefzbPO+REYOW6sBl4HgZUgUFWEm6kzlQ36sXeXePXjTHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435277; a=rsa-sha256; cv=none; b=vflTJ15VplG2WB1WOTbzcN2weI3WSwEH66LSUIore0FGx6Hhi6VH32IkPOkxJvpf5WUKw7 zoS0Ozf/jtwRnC6zAJrICNE3fixxhxRt2kTtJ3D2pMYsQydH+uPZ9mKzIjoJ8KqUPhSl7/ bNi8AAYclcAsl+yLQBXKBzMueh3XPSHy1JrRtNDK2SGMSoCTI0falrteSWavP3FtsqP4It K2uMUhHNCt+FHccic3hWG+RD2RrfePODnSaaY13SSiXtojokvT31vAi6fJVFpyaW0CoYRc xzN5yb/eO88iO/ZUt26RSN4L0kUMD2sFUNplkrMD3Bf4reJ/S23wFs06qeQT7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJ23oEtuHF6fbYm+QJ8Fix0PY4N3Bic0dRFNG1meO6Y=; b=ap2zohuoIAdB7V2/3stVZbU30PwXmMsB5t5YoX0+4dn1P/GvaHYPWne477ChWn8QiT0Bzb dYiP1rdXqbSYzTUK2/aPvtmzT8KhcSOaKpKoOGTPO4gm7tBnAI0jujL9HoAG0eMfMsNvYj N1wcRCQ3K539/fp/DufHYCQri6uLKguMjIqc+BORb3R1QasuiQCFyeRaC1f27wW5hupzcG peOPYVuOjb0FGNc2d3SiIml+D8hqPy0WQdIi/6FRRVDZ1cfZDDqyVJVj57yUnfr2SnrKeH umrBfmQIDFgI2Hf7hTbVsUh6bCfCHliLsUpUZfmtwP4g9iSOPc8t8xmcyWQ/wQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Yq12p13z10FL; Wed, 26 Jun 2024 20:54: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 45QKsbVY092253; Wed, 26 Jun 2024 20:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKsbME092250; Wed, 26 Jun 2024 20:54:37 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:37 GMT Message-Id: <202406262054.45QKsbME092250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 249e24d76a7c - main - x86/pci_early_quirks: Sync Intel 11th+ gen PCI IDs with 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 249e24d76a7c369fcfd08b1b3d0802dea94b7c6c Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=249e24d76a7c369fcfd08b1b3d0802dea94b7c6c commit 249e24d76a7c369fcfd08b1b3d0802dea94b7c6c Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:42:25 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:42:25 +0000 x86/pci_early_quirks: Sync Intel 11th+ gen PCI IDs with Linux Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D45617 --- sys/x86/pci/pci_early_quirks.c | 2 ++ sys/x86/pci/pci_early_quirks.h | 50 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c index dc646fbd2c42..36523c0e3d40 100644 --- a/sys/x86/pci/pci_early_quirks.c +++ b/sys/x86/pci/pci_early_quirks.c @@ -259,7 +259,9 @@ static const struct pci_device_id intel_ids[] = { INTEL_RKL_IDS(&intel_stolen_ops_gen11), INTEL_ADLS_IDS(&intel_stolen_ops_gen11), INTEL_ADLP_IDS(&intel_stolen_ops_gen11), + INTEL_ADLN_IDS(&intel_stolen_ops_gen11), INTEL_RPLS_IDS(&intel_stolen_ops_gen11), + INTEL_RPLP_IDS(&intel_stolen_ops_gen11), }; /* diff --git a/sys/x86/pci/pci_early_quirks.h b/sys/x86/pci/pci_early_quirks.h index 2af0408e0ea5..020e9fd359db 100644 --- a/sys/x86/pci/pci_early_quirks.h +++ b/sys/x86/pci/pci_early_quirks.h @@ -466,16 +466,25 @@ INTEL_VGA_DEVICE(0x5A4C, info) /* ICL */ -#define INTEL_ICL_11_IDS(info) \ +#define INTEL_ICL_PORT_F_IDS(info) \ INTEL_VGA_DEVICE(0x8A50, info), \ - INTEL_VGA_DEVICE(0x8A51, info), \ - INTEL_VGA_DEVICE(0x8A5C, info), \ - INTEL_VGA_DEVICE(0x8A5D, info), \ INTEL_VGA_DEVICE(0x8A52, info), \ + INTEL_VGA_DEVICE(0x8A53, info), \ + INTEL_VGA_DEVICE(0x8A54, info), \ + INTEL_VGA_DEVICE(0x8A56, info), \ + INTEL_VGA_DEVICE(0x8A57, info), \ + INTEL_VGA_DEVICE(0x8A58, info), \ + INTEL_VGA_DEVICE(0x8A59, info), \ INTEL_VGA_DEVICE(0x8A5A, info), \ INTEL_VGA_DEVICE(0x8A5B, info), \ - INTEL_VGA_DEVICE(0x8A71, info), \ - INTEL_VGA_DEVICE(0x8A70, info) + INTEL_VGA_DEVICE(0x8A5C, info), \ + INTEL_VGA_DEVICE(0x8A70, info), \ + INTEL_VGA_DEVICE(0x8A71, info) + +#define INTEL_ICL_11_IDS(info) \ + INTEL_ICL_PORT_F_IDS(info), \ + INTEL_VGA_DEVICE(0x8A51, info), \ + INTEL_VGA_DEVICE(0x8A5D, info) /* EHL */ #define INTEL_EHL_IDS(info) \ @@ -483,6 +492,7 @@ INTEL_VGA_DEVICE(0x4551, info), \ INTEL_VGA_DEVICE(0x4555, info), \ INTEL_VGA_DEVICE(0x4557, info), \ + INTEL_VGA_DEVICE(0x4570, info), \ INTEL_VGA_DEVICE(0x4571, info) /* JSL */ @@ -536,6 +546,7 @@ INTEL_VGA_DEVICE(0x4682, info), \ INTEL_VGA_DEVICE(0x4688, info), \ INTEL_VGA_DEVICE(0x468A, info), \ + INTEL_VGA_DEVICE(0x468B, info), \ INTEL_VGA_DEVICE(0x4690, info), \ INTEL_VGA_DEVICE(0x4692, info), \ INTEL_VGA_DEVICE(0x4693, info) @@ -561,6 +572,12 @@ INTEL_VGA_DEVICE(0x46C2, info), \ INTEL_VGA_DEVICE(0x46C3, info) +/* ADL-N */ +#define INTEL_ADLN_IDS(info) \ + INTEL_VGA_DEVICE(0x46D0, info), \ + INTEL_VGA_DEVICE(0x46D1, info), \ + INTEL_VGA_DEVICE(0x46D2, info) + /* RPL-S */ #define INTEL_RPLS_IDS(info) \ INTEL_VGA_DEVICE(0xA780, info), \ @@ -568,6 +585,25 @@ INTEL_VGA_DEVICE(0xA782, info), \ INTEL_VGA_DEVICE(0xA783, info), \ INTEL_VGA_DEVICE(0xA788, info), \ - INTEL_VGA_DEVICE(0xA789, info) + INTEL_VGA_DEVICE(0xA789, info), \ + INTEL_VGA_DEVICE(0xA78A, info), \ + INTEL_VGA_DEVICE(0xA78B, info) + +/* RPL-U */ +#define INTEL_RPLU_IDS(info) \ + INTEL_VGA_DEVICE(0xA721, info), \ + INTEL_VGA_DEVICE(0xA7A1, info), \ + INTEL_VGA_DEVICE(0xA7A9, info), \ + INTEL_VGA_DEVICE(0xA7AC, info), \ + INTEL_VGA_DEVICE(0xA7AD, info) + +/* RPL-P */ +#define INTEL_RPLP_IDS(info) \ + INTEL_RPLU_IDS(info), \ + INTEL_VGA_DEVICE(0xA720, info), \ + INTEL_VGA_DEVICE(0xA7A0, info), \ + INTEL_VGA_DEVICE(0xA7A8, info), \ + INTEL_VGA_DEVICE(0xA7AA, info), \ + INTEL_VGA_DEVICE(0xA7AB, info) #endif /* _PCI_EARLY_QUIRKS_H_ */ From nobody Wed Jun 26 20:54:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq24RR3z5QCt5; Wed, 26 Jun 2024 20:54: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 4W8Yq23tKmz4LlL; Wed, 26 Jun 2024 20:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWR6F7dZd8hRLMkU9aUVCQ/Hvf+NSxBhIKZJvgTNcqw=; b=D++14FoMbDYImj+WpDJB9f6amFtYDdTTD4w+4mbo+COVhdnVGaN1xkQ4jigP4g4fulhhX9 x2WyKwgfPOqwY6CFWawjNFNnRGd/cSNsL3/ufNd6uHpef3Ko25u83Tbz3HIryWedSo9ooH nPShZ+oFe2qsILDfjkLXjiAlyzzaa/UB4z6Djxs+u0RQVdXpQWfrXfTSO4+0h6vw5jdk8B 0xeu+RJUFRsr4rAHxRQvbuHBQcCuoyNDpKvz+y7t7UjB9tic7TgVc/zYvHYWxmCJQj2KQw AKMyVclgpgEuh415jkYv0PrHWwjeFxIKjNPLEZrwXn5EDODf/QTlHY/g1OEcDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435278; a=rsa-sha256; cv=none; b=JGQxVNMU7hhbA1HPCQjmtzwjs8GAq/mLJS/nqwDasIeii3QoMR2rBAlg4l6+qB4DYJwv+7 9cSs9sl30vEaL9DG4v0TWiiqrRMedFoolQQsUOYCfuVAQgFVWrsCJ+1Uyzu+ywb9+EJtbx a1pElo5KIWJ3sGL8vGzlVtZ9TsGE9r6SmsrNbIuE6ZYeSqlCTQaWwfhdAg7ztZKakbDyA9 sb2xAVkbkISCEv7dYRm0/C9NhvI+Yqh1CXs57pF5F9tywqqC6ZIaeq/dxNLplWoaGY1AfV 1z/P17TxIBpCQO9wGmuwATwxj1HLxGSptVVTToKn40rqUucyXJkDiwnNGApO6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWR6F7dZd8hRLMkU9aUVCQ/Hvf+NSxBhIKZJvgTNcqw=; b=C7t7sV/jFCTvxCuRLXvaTX8eM0MEwbTuAbtBhnuV5Ky2jeJkxuw0O3IFfF3vFZkH6SXWBR XlllCdA8+VejNvKaHUAx1oeP9mEmsm/giPmkAsyLQBTuJ0rr9yXG0e3+Vvct0pCndfJvBy xtbsyHJKbQBw0tFfBMw++K6PDwSAH4PXh551mgEM6WgpgQivUFulNnLAAKz00REKu6JX7D T6+eHRrQQZ5R827p04KCt4C3/26nnNnkViHEr2q9ra4HWfuVXqWHBAiDhKhXWiASLyWaVW VFjCfqXXDwtmNX/nOPjOao0gZl0Lf0AwmdSGH/WAGpz9kpfGsxHwRVmKFozDbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Yq23VKLz10X0; Wed, 26 Jun 2024 20:54: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 45QKscDw092294; Wed, 26 Jun 2024 20:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKscIw092291; Wed, 26 Jun 2024 20:54:38 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:38 GMT Message-Id: <202406262054.45QKscIw092291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: a5cac2e672a7 - main - LinuxKPI: Add rb_add_cached 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5cac2e672a7d94c0391076e7452d6a487f7b5c1 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a5cac2e672a7d94c0391076e7452d6a487f7b5c1 commit a5cac2e672a7d94c0391076e7452d6a487f7b5c1 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:43:16 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:43:16 +0000 LinuxKPI: Add rb_add_cached function rb_add_cached inserts node into the leftmost cached tree Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45608 --- sys/compat/linuxkpi/common/include/linux/rbtree.h | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/rbtree.h b/sys/compat/linuxkpi/common/include/linux/rbtree.h index 78bf938eb000..e6033cfd760d 100644 --- a/sys/compat/linuxkpi/common/include/linux/rbtree.h +++ b/sys/compat/linuxkpi/common/include/linux/rbtree.h @@ -175,6 +175,30 @@ rb_replace_node_cached(struct rb_node *old, struct rb_node *new, root->rb_leftmost = new; } +static inline struct rb_node * +rb_add_cached(struct rb_node *node, struct rb_root_cached *tree, + bool (*less)(struct rb_node *, const struct rb_node *)) +{ + struct rb_node **link = &tree->rb_root.rb_node; + struct rb_node *parent = NULL; + bool leftmost = true; + + while (*link != NULL) { + parent = *link; + if (less(node, parent)) { + link = &RB_LEFT(parent, __entry); + } else { + link = &RB_RIGHT(parent, __entry); + leftmost = false; + } + } + + rb_link_node(node, parent, link); + rb_insert_color_cached(node, tree, leftmost); + + return (leftmost ? node : NULL); +} + #undef RB_ROOT #define RB_ROOT (struct rb_root) { NULL } #define RB_ROOT_CACHED (struct rb_root_cached) { RB_ROOT, NULL } From nobody Wed Jun 26 20:54:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq35Vv4z5QD74; Wed, 26 Jun 2024 20:54: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 4W8Yq34vBQz4LXK; Wed, 26 Jun 2024 20:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GhPmyYlY4olRuDcph/rMXoT/iGApP7P/RoGZBdLNCE=; b=v/AIr8g/4VTYOlMIiIri1SllcAFzKlQIQrkCKxXeJmeY7uf7klzAtTvJU9b+teUEuuRluK ciFnD4IiCbWDiz5mX4MrO03vLGhroTIi0b7Xsf42w6DNE+8qP5tGMDp1NIU64Fb7KZzLgf MiKlCejc6sHAdhlZRIhv2x3b4hEZAD2yJzYWXiOF4y5ceKA2edsbixaUiQjZipSiN0/xXl jEW17B6jR94mRiGj3TjM0wHnh32jnLqCOl+JmFY4HAHMlF1aFPd9QzQIeIrOtTg/WEd7An /Of97Tx0E+EDf9eg6yO0OG2N8Ik83p8f/9viveKDuN/QOONDfUcBG0CAri1OJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435279; a=rsa-sha256; cv=none; b=HjG2xCQuiXNct5nhQ66friV3Lqx5Ehv8Yutv6IsT+cFgvsjVXxPY9EzNowsIFR234Q7Cbu qXRfixa8eaWBJRZ4x/uIiVuuOkGyVURtyl+Hk3CC92QCHCCjWSS8OS48bo3GgMjgSmnx04 wQEI2MgTmOl0CZmc4hMKQbHrSeXd1XklzeN/US5zL42rX9XJzDHJW1ATiHq2PAAroq6+Ml 9Suc2NF+Ym9SuIiaae8uaJfXy0+H5TmfT3jXTVdF61J99+gVrzEiAl3cXC5jYWkFy1NO47 vlidAw5UfxSVxTlyW6irEzSciQzq6ji/hof0k9EYrfeLUsiFnSyvWZg7QS6iVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GhPmyYlY4olRuDcph/rMXoT/iGApP7P/RoGZBdLNCE=; b=FVBSOiSxibKLHLzJ3GfAQEVDYWNBkpy4TPHXpRC3n/blOn492PvIqgelkPHa/4OQnxlgu3 n912/yNz9xgMY+JNZExuiWdVFxA+z7C/m/2Tk0cjQ6h1aCmAWcbTXrPs0bX4rya9ODMbdX 3/Ux0scTlFwZBrarb/Ouxl6HqByiyy7TZUbDeCcCBLi8QZJkyPjQkbxytd8Ao6SwewNOVY zHzh8dXCl2JlgedDgYwljDxNv7ZkYKhcHvdWFgXGGqyeP6hXvGFZlM+vBPmb+u07YJa5PU rZFkrirzHZA7GDjRCz0S4ZocY3+FokjVkYmeZJ9U1RFQ/kdrX7BtH7Rm11cYgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Yq34TbSz10Rg; Wed, 26 Jun 2024 20:54: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 45QKsdvm092333; Wed, 26 Jun 2024 20:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKsdrh092330; Wed, 26 Jun 2024 20:54:39 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:39 GMT Message-Id: <202406262054.45QKsdrh092330@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 73f3589120e6 - main - LinuxKPI: Add kmap_local_page 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73f3589120e61b4b9df1ef60c5be12ccd81878f2 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=73f3589120e61b4b9df1ef60c5be12ccd81878f2 commit 73f3589120e61b4b9df1ef60c5be12ccd81878f2 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:43:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:43:43 +0000 LinuxKPI: Add kmap_local_page function kmap_local_page maps a page for temporary usage Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45609 --- sys/compat/linuxkpi/common/include/linux/highmem.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h b/sys/compat/linuxkpi/common/include/linux/highmem.h index f770bef6b3b7..252d16b2ea70 100644 --- a/sys/compat/linuxkpi/common/include/linux/highmem.h +++ b/sys/compat/linuxkpi/common/include/linux/highmem.h @@ -93,6 +93,12 @@ kmap_atomic(struct page *page) return (kmap_atomic_prot(page, VM_PROT_ALL)); } +static inline void * +kmap_local_page(struct page *page) +{ + return (kmap(page)); +} + static inline void * kmap_local_page_prot(struct page *page, pgprot_t prot) { From nobody Wed Jun 26 20:54:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq50cczz5QDDP; Wed, 26 Jun 2024 20:54: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 4W8Yq45xtqz4Lmj; Wed, 26 Jun 2024 20:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV0uJnb7Zw1v2TIZoboF9NfsSh9X14T4wWO08iXQ4JA=; b=l41T3BaL529QiwmYRVb3gMfpSoVAnwSM2l/Xi4v5W+xCXsg9AYAnNuYWxifAnWNEh5N+j8 mE4GV18TQec3hcrAya7mO+2cGplZ13A4o7kk6lq5NVRK7lxi25vJiPHN66LkGf8fe3VkB7 I88U9jKs1AC8ip9dKge+akgfzi8ONyxYsLx3OCcobvMdqy+45Ca5NCEEiuhU7Cd//SSYnM cjrrTmaogyzGb2KsVQ6a2NrrtE7LdHKs6XK6q6SX1X3DF+aZMEaGI+r8VBvz5Z6ig4+2YZ ZdZW2rOTsl9cEdp5V8tSR7MvF3JMCrWzY5aPe3Ckm/nIBEzbltEK58/tKFyL8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435280; a=rsa-sha256; cv=none; b=FHdaENDHNyFnP+NVyiadcXt+9n6ElSnMLwLepm2CPix87AU1qU2Nd/s3Wghy1hO6KsBPuJ mYw8lWqQZn/2imEhTx8U6mClzSjo+fSWovTxF83RVfIJIkOm5KMOjHUsysLmwCKHYlB43G +NA/8gFZPUIRPDzPafw2sXX9z4k9V2CYfLr3JCInLYwbts4+AbwRRlrEpp7djNs63ULVPn PiNWUQBw7pPbJo27B363QoC46/f6aCspj6OGtxr8/R9AsFzBuAaa4FcMx6WAcbTnwQSdjf P6UgFDU3R7KBNdT/k5U09C2cerqNEnJpyNj4KUqrWqfuBuJ946S1h56lElES+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=1719435280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV0uJnb7Zw1v2TIZoboF9NfsSh9X14T4wWO08iXQ4JA=; b=F3tmicxKwVCmu4Wa+xX7GWN5caprPUbS97PR6AE5g9XzRy94HoWwz0oWx1H55MF4ONdrM3 phWSTtf/D648S+aNimzQSuArzeoz6BJ0smDm8gVYfpH/KHcT3I4VULAHq9vGKl04u8oDuY YWpMc/Q/szjw54cJLOlC6ax+q5WLhkBdPHZ7IJvFInH0Kil+CAh839yhFoKsmWx1GRnHOY wdlc6/WP30Pc2gvQrUGUDUOfhV3EOWVhuLpTrhTNpGrdf0rCbVEOz6/piKfmgCrNb31BJs DgJy/FohchuaN1m7lgC/ui/9Y/kO4OJOBbnx34W+3EuExTkyTvjGh6YdMB3cXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Yq45WyPz10kk; Wed, 26 Jun 2024 20:54: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 45QKse0W092390; Wed, 26 Jun 2024 20:54:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKseik092387; Wed, 26 Jun 2024 20:54:40 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:40 GMT Message-Id: <202406262054.45QKseik092387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 460908ea55e6 - main - LinuxKPI: Remove owner argument from class_create function on KPI layer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 460908ea55e67baf85d5cd1b6093154739cc0b9a Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=460908ea55e67baf85d5cd1b6093154739cc0b9a commit 460908ea55e67baf85d5cd1b6093154739cc0b9a Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:12 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:44:12 +0000 LinuxKPI: Remove owner argument from class_create function on KPI layer to chase Linux 6.4 Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45610 --- sys/compat/linuxkpi/common/include/linux/device.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 668fe9cb8650..00c55b31b248 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -343,6 +343,9 @@ put_device(struct device *dev) } struct class *class_create(struct module *owner, const char *name); +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60400 +#define class_create(name) class_create(NULL, name) +#endif static inline int class_register(struct class *class) From nobody Wed Jun 26 20:54:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq636LMz5QCtC; Wed, 26 Jun 2024 20:54: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 4W8Yq573cmz4LXj; Wed, 26 Jun 2024 20:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kEzr4DXKwdSWgtMVTqvXob9RJKrycNe4ZIdT8fNVSQ=; b=T8zMSHUC1DfCp68nsIkLt8rkEOoGWsjI4uuzdAQ9o7mXJmLKTg5KW2FyiVidTSw5njVwbB QyD1H1UnOalOtsHK9ZetYD3HYtZEX3eD2eEqwUVD1ybYvEbj4Nu9MYPvv0qet2SFRR0Gpk yrapX03DMaZhB/CU0OeUDBAapCb7JqceAwLcImFRxTVTQT9qM87mnJEqvTz0IPKvvUS5we TrseXrAStFiC7iKWIpLUq+R8JPDfGUTE7QGPRApHkT71GZZQ/dGrwe4ip4nfoc+ytavM2b SEz46KtLKVioYutLCyy+D7fDGes8ssIGmRN0CMSY7y3xskkQw1xCnxNfRkDKmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435282; a=rsa-sha256; cv=none; b=b/4QLBZze3CiiLfOpWuKCT3USjf9Uc54/IsfP/LAU3Zusp/ezIY7nJymTKhIEYHxoBn1Go u7ZIvny6n6ly/40Y0dPqdcAsy9KC8uaKcQNi0vYLV2cIKswenywQK0063qmHiHaNFNlgox MxT99hNZp4exwMLEbrTj9Dnh6hqi2gKYHMOACcM11SMpWFBfueWUlKf5fLuduidtjyLGrl JYm4iY55SNJ+1k9YfGwPK9PweecgH4PkX+DPB4PXwwnBF2u1LncJKrFoH6pBpF3cv3PtNO 3WG9AYxQpUzB6zq75F1lW5ifKCtmRMerfsEqRcZ+10WLZk/b6Q+nyPwcmibm6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kEzr4DXKwdSWgtMVTqvXob9RJKrycNe4ZIdT8fNVSQ=; b=pIohH4qg4KD25uUiM85h07vtiMb+JJi3+SUKBvQhTZA/NXePbJUMluhvFQW9pRWZc4e3/I 4mIZpxjQ+iVrOxvLh+0XrKwAJ3Y7wq0HuE50hHvPLBKmMpVRfSSfbtBPlfZJUcKAsTUcyR HO1XTnv9gB022VJuwBENEJLcxKwNyLLl24zRjVlGFHrB890gKa3ERkGpLHALeLSjfOq4u0 KkOSDw4d7qpIeErF9bW50+ic3ihr/pbP+1H2v692Bh99NWr5XNdoXbp6SqmS/ZYca7YkEj Is3Iu/rYdG1d1U/CuXVe/bdd9DI6+KZJaVu7gcf1DSuQIxAJ9LZ+KJRCon3lrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Yq56YzGz10ly; Wed, 26 Jun 2024 20:54: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 45QKsfFo092435; Wed, 26 Jun 2024 20:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKsftm092432; Wed, 26 Jun 2024 20:54:41 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:41 GMT Message-Id: <202406262054.45QKsftm092432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 597ffdc1d350 - main - LinuxKPI: Add smp_store_release and smp_load_acquire functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 597ffdc1d3503110165dd57685c29da64386a7db Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=597ffdc1d3503110165dd57685c29da64386a7db commit 597ffdc1d3503110165dd57685c29da64386a7db Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:37 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:44:37 +0000 LinuxKPI: Add smp_store_release and smp_load_acquire functions Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45611 --- sys/compat/linuxkpi/common/include/asm/barrier.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/barrier.h b/sys/compat/linuxkpi/common/include/asm/barrier.h index d09f9c6d2c97..39c5139cb322 100644 --- a/sys/compat/linuxkpi/common/include/asm/barrier.h +++ b/sys/compat/linuxkpi/common/include/asm/barrier.h @@ -58,4 +58,7 @@ #define smp_mb__before_atomic() barrier() #define smp_mb__after_atomic() barrier() +#define smp_store_release(p, v) do { smp_mb(); WRITE_ONCE(*p, v); } while (0) +#define smp_load_acquire(p) ({ typeof(*p) _v = READ_ONCE(*p); smp_mb(); _v; }) + #endif /* _LINUXKPI_ASM_BARRIER_H_ */ From nobody Wed Jun 26 20:54:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq72fY1z5QD75; Wed, 26 Jun 2024 20:54: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 4W8Yq70T2zz4LvW; Wed, 26 Jun 2024 20:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfQ4oAvZGYV6TPkVtBg3A6YvJcKQJlaIrF7gT8Nay60=; b=T1hetDKd2Qr2ctC03xVq4dO903HYYNmAJ6DYs6ZmXYklQMIPyMA5/BCjhL4I7DZtp52wAT 1AQ0zgxnJS4DPfCSGDZUZA708EL2OdYrXg6UxI3geFqHdPKkeMLouqZ4/YQy8jDv2gMPAa sQSlEdX7msGKD1bMxYDlvY6nzA5XLOeMRF89ZmD3wuq/6N0IpXPbso6hLdVQzgAZROlOE3 eqdBCY5LpPNEThOj+5re8efJ0+yCc2UqmAvxi81SSX84KPomn/+Z2mQCjoZwsl9umioDMe 5Dsb8YvaUWyh7DogspBW541oxHzi0VpaNvfBm5a7O7A3AVBM/Ilgb26P0dVOxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435283; a=rsa-sha256; cv=none; b=XiX+DxF3lc26nvT/8Y5XK/IvXkqZdDCE0pSwTLH7IX+RpDjPGZ4gj3pXupGHav07pw2Jvk mxj3Wac97g/ODvReRhH6tAAkPrS8tQv3K3HfBh8j1almzwVYwqVRRRzlFYzwDatV5mhiJA U23V7ctDKbKtPZTlDAsWAEQlSGSOBI3X39pLLXbmwlndIUY41L1fQYXatMYA6vwoBRaXwX 41Ds3sTkkCaSdNbX3b5TsJtt/I87e/N+iCp2ej8+kc2TrgLx6H/NWbLSnNMias1JccNMoO 7oFJ3wQNMYa+c+ixwDLK0v0qXi7HChjkZGogMUD1AowtEV/nKXcLhbz9lOwBjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfQ4oAvZGYV6TPkVtBg3A6YvJcKQJlaIrF7gT8Nay60=; b=D9/yOAEUbXYqa3/zdi+WFnHhaFTYMy1Jk5vt1mtgNb82/as0MlcBpITzAdHMs6bl9iX62v c0l8M1dVvI3Tb1AYZTMuEd/d2H0fDH8BOqjVAvFj3i0YxjbJCmpH3A4Ynl2NC7MteoWSDP mhK4OBvw6uvrBvBdlAd+zaaSwkKRxSb3rKxntBXmvsgey6PPh48cPcLkWPLrtyItxVyzQt v4Ld0c/W9qFt3bJc00yhxjh6LHjGeojcTs5Yl+R41JWuPySfCKJE3PNEKwjMFs5Yv8orRl 2VplcQmUbphyrGoYByHEuLI7Opef9KoM/sgNfCn7qt07yWuCAHwYtAE6sA3//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 4W8Yq7058bz10X1; Wed, 26 Jun 2024 20:54: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 45QKsg7k092484; Wed, 26 Jun 2024 20:54:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKsgUf092481; Wed, 26 Jun 2024 20:54:42 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:42 GMT Message-Id: <202406262054.45QKsgUf092481@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: d21316ff22b1 - main - LinuxKPI: Add header polution to compile linux/numa.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d21316ff22b1468304b6db9c336f66a09c4f7be8 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d21316ff22b1468304b6db9c336f66a09c4f7be8 commit d21316ff22b1468304b6db9c336f66a09c4f7be8 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:44:56 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:44:56 +0000 LinuxKPI: Add header polution to compile linux/numa.h Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz, emaste Differential Revision: https://reviews.freebsd.org/D45612 --- sys/compat/linuxkpi/common/include/linux/highmem.h | 1 + sys/compat/linuxkpi/common/include/linux/mm.h | 1 + sys/compat/linuxkpi/common/include/linux/mmzone.h | 1 + 3 files changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h b/sys/compat/linuxkpi/common/include/linux/highmem.h index 252d16b2ea70..b8874481f9c6 100644 --- a/sys/compat/linuxkpi/common/include/linux/highmem.h +++ b/sys/compat/linuxkpi/common/include/linux/highmem.h @@ -43,6 +43,7 @@ #include #include +#include #include #define PageHighMem(p) (0) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 41af4be4c015..e2bda799dc77 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/compat/linuxkpi/common/include/linux/mmzone.h b/sys/compat/linuxkpi/common/include/linux/mmzone.h index 49cc218c6fce..9fd481e18ee4 100644 --- a/sys/compat/linuxkpi/common/include/linux/mmzone.h +++ b/sys/compat/linuxkpi/common/include/linux/mmzone.h @@ -4,6 +4,7 @@ #define _LINUX_MMZONE_H #include +#include #include #define MAX_ORDER 11 From nobody Wed Jun 26 20:54:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq83n2sz5QD9t; Wed, 26 Jun 2024 20:54: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 4W8Yq81cn5z4LWH; Wed, 26 Jun 2024 20:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByrxV3i+rqcItGL0w3vbFO9nhK/dv9BZracTfFggzOM=; b=ix2QPZ0OyS6VyMFnmr9G0ygaxj17z2+quhtVLg3hpjFlRlhsBo0v12kGSocT5KPLcNmY9Q qPD5aU3vxENsb1Jt6QV9sBPiSC1un/esXzkmxD59nMjg5HQqXwGjgcTY6RO/31U+S6oS5w DPzmu53Y2ulWAlm6XqbOKspqB+3d1W8iwhi2BxRRkTbJqH0uD/0cZ84u11t/E85DTzoRJW 1p3nIs0NcyHO9pNWemVTrFOf9NDVX5YVbWFVy8YFSRUGkgnl3UCrSBdLlWNy+8yAZp9Et4 3td1RFaDEQemXKJbJhh77QPf3pxKvBgr17HOctTWD+1uEjohiqBVNUxjPyih7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435284; a=rsa-sha256; cv=none; b=V0Vk73bkXa9EHrI2EUnENXxuc9Et3QjDU5Ec67PiipAlSsgDHka3pP5k/HD1nde2G1gsmD lxcxGNx+cfaeRW+JTCYiTxmI35b6qbz/xPKOGvpatpYDXR3fykvjzv3nKZ5eYLGwtKWPxL 7HC0kxsc5tUNoYxwb+aZ53P9mj4DrdVvXIjevsORRNIaMYOoCewBDBH2FMghY3Q9pAytE6 HV+hO0nlLK++dqNrl88HJzk2eOIDo0jAf/7B1BLTrnwqib4loPIwAuvWtItuAWpQnpzrcL x6GStz+Oz/dIFRhZsb0reGhVD7E744SoZMhT2rnoPFMGoKxxriLAIpEmILeG1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByrxV3i+rqcItGL0w3vbFO9nhK/dv9BZracTfFggzOM=; b=Rsm3CPNDBm4K7fZQGaWpCqGlE3+RR0VjsJJYjLF4TUJKzdCEFGPjM/ZPABC+x4rxGtOSof eB0fjDDVvKk6VdxbLDmhsH1N0pXEsXsuFu0Lzw5s2Tg7h+65i8j0SoNlRbCTt1N1vRLZ7M q04ZGA9xyY1nwf4vhHqwFzarCIBtC4yQvAfe9czrCIkeX53kdOP4bU4o/yRxATdgHh9HH4 GfzJ/NUfXj0lJea4QoflR5TKR42mfasrFG41YEh6hZFCefrZcuCylToOWi0FX5zP8jgpFz DZtk4yN2UCIkQSMvMQ4qyS7ERTFZs7H5eJGEbWP+y4a5GiNNUfL73JEtLjeRpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Yq816zXz10m0; Wed, 26 Jun 2024 20:54: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 45QKsiGA092537; Wed, 26 Jun 2024 20:54:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKsi2b092534; Wed, 26 Jun 2024 20:54:44 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:44 GMT Message-Id: <202406262054.45QKsi2b092534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 256eb8d53611 - main - LinuxKPI: Remove linux/sched.h include from linux/kernel.h header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 256eb8d5361143b7d436a195530e0eefe1450e6d Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=256eb8d5361143b7d436a195530e0eefe1450e6d commit 256eb8d5361143b7d436a195530e0eefe1450e6d Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:47:12 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:47:12 +0000 LinuxKPI: Remove linux/sched.h include from linux/kernel.h header This include prevents usage of any kernel.h helpers in sched.h and all of dependencies. Linux does not have it too. Fix building of kernel and drm-kmod after than. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45692 --- sys/compat/linuxkpi/common/include/linux/gpf.h | 33 ++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/idr.h | 1 + sys/compat/linuxkpi/common/include/linux/kernel.h | 1 - .../linuxkpi/common/include/linux/scatterlist.h | 3 ++ sys/compat/linuxkpi/common/src/linux_rcu.c | 1 + 5 files changed, 38 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gpf.h b/sys/compat/linuxkpi/common/include/linux/gpf.h new file mode 100644 index 000000000000..01e883a94728 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/gpf.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Serenity Cyber Security, LLC. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_GPF_H_ +#define _LINUXKPI_LINUX_GPF_H_ + +#include + +#endif /* _LINUXKPI_LINUX_GPF_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/idr.h b/sys/compat/linuxkpi/common/include/linux/idr.h index ca3f8171ff44..7f55b8e57c7e 100644 --- a/sys/compat/linuxkpi/common/include/linux/idr.h +++ b/sys/compat/linuxkpi/common/include/linux/idr.h @@ -34,6 +34,7 @@ #include #include +#include #include #define IDR_BITS 5 diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index fd5f42fbe36c..43938cdf73de 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index e462d5c649f1..51ced19e6b5b 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -32,8 +32,11 @@ #define _LINUXKPI_LINUX_SCATTERLIST_H_ #include +#include +#include #include +#include #include #include #include diff --git a/sys/compat/linuxkpi/common/src/linux_rcu.c b/sys/compat/linuxkpi/common/src/linux_rcu.c index 335708b6747f..4879c30164e3 100644 --- a/sys/compat/linuxkpi/common/src/linux_rcu.c +++ b/sys/compat/linuxkpi/common/src/linux_rcu.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include From nobody Wed Jun 26 20:54:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8Yq9651zz5QD9y; Wed, 26 Jun 2024 20:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W8Yq92Wgkz4Lt9; Wed, 26 Jun 2024 20:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mCJYGvgpG0gVzPfOsh1fw0zYDy9MeuTNppJ+4clJaoE=; b=I4BGndnXAyt373gvHS9L0r4Xqrfr+IHhIzvtrvAIsQp3Mzz9GE8pR2REyU2eAk5LqLmObl 0iAV8RZZEURvfRYnHO9KyiWOvRcJwDv/s+j25aFzHTJahU9yNQ9NTABGEnQbAna/fDXN7Q P4DvexUmJBVSDbY8DmxCTybLD2ZLfyEawNLm9OXTanwVdkNRGZoFbpXJb8Ob3FPZA7nmJu L0sj6R6BfLbWPRq6uyvjVYY8lnFRmkVi0ygWVDkkhBWWEMQfBprcpwd12SoQYPcs8q8ju7 5FDamv2uB1IpJyiHh6Txu8tE1bvqFgabDQN2llhJ6mVxiIdcsv8FOFgqxF19gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435285; a=rsa-sha256; cv=none; b=sPYFVicKwkPfBX+DEZSUTxiegFH9PqKRiBvs/WAF+so+PKzaXU/5BliYnFXtB/XaxY9w+Z +cJslDKDhzZvz84Tv1how3nq0N7zXmLGlGPnhmZkVM5k0uoKYCTg19LUcSoGP8Q9LXt0ds etYUozscYqh9LCCXbeMVODWmJ9IiNawghmaem8zKCwKAayvZ/VxKbSGUEN1W7x109lfIPF 53++lqx1bbLdloajPzCrTo/HEjzZapFIO6NTsoOcHfxYWAknJGx6MYRRQ/S6fvZxghcvpJ n5H9K0p6e8N7OMBEc/4KttWEYqCjOj2ftumyehgojoBWqcWx2YWi8OcJ+nwV5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mCJYGvgpG0gVzPfOsh1fw0zYDy9MeuTNppJ+4clJaoE=; b=lVi3lNEQLbMd/2FTQFetHvUNoBVQ3pjc6aJgc0OAGbTFaxMXOHGYhdUEgmWqCzCyuLrlvi J8caBi48XRLuncp7DHFPvcnn7oXI0it2yNbmN7JABMIaWbtEQ+tb7En1AAd3O5zoMib4ID WG7E3Zm0DdKANohY9sYFxtewzVSdHKkbdc/las4hVUDWArNV8YOvP5cNZ49vRUuqZIbJ8V psJBlfFMZqxBB358211xhZn7C1qp9utmVAUSgJjrJNHqwLg9/V2sX2gonH+Cu2kzv/vp34 o2RKiobCpQg9/CRsoqYFtHGXKTCVKKlDjoBoP1sjYxUJn7vvaF6FOPW4B1orOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8Yq925cDz10w6; Wed, 26 Jun 2024 20:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45QKsjYL092573; Wed, 26 Jun 2024 20:54:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKsjGB092570; Wed, 26 Jun 2024 20:54:45 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:45 GMT Message-Id: <202406262054.45QKsjGB092570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 889f74af66b8 - main - LinuxKPI: Add linux/nodemask.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 889f74af66b82e4401fb69ed8af6b9b4f48ce53b Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=889f74af66b82e4401fb69ed8af6b9b4f48ce53b commit 889f74af66b82e4401fb69ed8af6b9b4f48ce53b Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:49:52 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:49:52 +0000 LinuxKPI: Add linux/nodemask.h and dummy num_possible_nodes() implementation. We do not fully support NUMA in LinuxKPI yet. Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, bz Differential Revision: https://reviews.freebsd.org/D45613 --- .../linuxkpi/common/include/linux/nodemask.h | 40 ++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/sched.h | 1 + 2 files changed, 41 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/nodemask.h b/sys/compat/linuxkpi/common/include/linux/nodemask.h new file mode 100644 index 000000000000..e61573bbc19f --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/nodemask.h @@ -0,0 +1,40 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Serenity Cyber Security, LLC. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_NODEMASK_H_ +#define _LINUXKPI_LINUX_NODEMASK_H_ + +#include /* pr_debug */ + +static inline int +num_possible_nodes(void) +{ + pr_debug("%s: TODO\n", __func__); + return (1); +} + +#endif /* _LINUXKPI_LINUX_NODEMASK_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h index 8cb6b12100d5..80354493f955 100644 --- a/sys/compat/linuxkpi/common/include/linux/sched.h +++ b/sys/compat/linuxkpi/common/include/linux/sched.h @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include From nobody Wed Jun 26 20:54:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8YqB5sJyz5QDGb; Wed, 26 Jun 2024 20:54: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 4W8YqB3JqSz4LYL; Wed, 26 Jun 2024 20:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ipvNgaZIZ+Bbi1Sf1aJGuS4V43IuKHZy8+ye4InP4w=; b=osCmwcHR1w4cBVvwEg4Uk8i257I1ofHewbfp1yj2JMYWUADPe5ugBnCaoomgx4uc7fN+kT 2F1+Hp8e0n0nTyhNoFvodYD6iU3Fh4H6UvUriCHiGnR8w41C/5khL0fCx9AUO+SPGFbKdR Cp7zgikH+QaOsO+bA4lXC0cU51e7I6zd6+waohQaViluDlMrUQU7MlkI38dDmD1pBeXM8l pC9mMkghy29Gx8oGklppfvVK2C8yRyX9iqhJ5jTJyaPt30eF8F0xiMjtawo2l8Owr0Shgh G350tDXXyKCvgyU3jwAffdoUBcJ8woJPpnjJYbrykdRWxpzLpzjhA17ps5oXqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435286; a=rsa-sha256; cv=none; b=hlDxYiLLgNH6UVB9E5t9URB1tPPpW2IoGvgPGQE1D9j8b4uBDvFGXYgDYUQlIzbP915e6x mee1ok01y6hoVaB/GrQluPdBhNiC0My/g4x9qhfztbaeUbww5/fizv4TgagYwRmraVsv+T bCCqNsxeR4RTPEQ9aZmCTDNz75l2pdouMTB4AZSWmYQV9ZWR3Wt1NcP84NCis8VREdgeL9 3foooe4mmFvn3VskkgpQECwVK2LaetQhz+/oARyeDZwpy2mkCEFumatUAkxRF+crB2SOd7 rwP3T+mZplXEsWZCMOWpnxqRdXkOUaS0dFhXh88iZQk/BjM6lQCggYGYyikyfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ipvNgaZIZ+Bbi1Sf1aJGuS4V43IuKHZy8+ye4InP4w=; b=cc9nPKM9cS95EdjU4avZQ0u/oYsWurolc9rQgs75N8ENQiUZ4dfHwrSYIst3z50UO7H+Bj oYH8YZWPFvx+T9JpRB+nBmYjFAfArqMYxKCEST23gbDqh4Kt2iUPPrrIJ1iPlPGMJbCOpM gIm6iV8Vbz/C8dVgYHZ781AJpBL2q1MCjUybyz24aseWp5DM/INv+KMhFq2T2jptQfUESM zgQmIXWtmtY4LbO2srHQBxeBhhaEGJdL9rYFIrxxP93KPWhso+S62pD9821jSW15evG/6P rle/PsWXR45qQ1b6jfLRitM+9OaMP4a/pKo/o5iJ2L2aEkM4b24RFFm8H5602A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8YqB2rTkz10kl; Wed, 26 Jun 2024 20:54: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 45QKskrN092627; Wed, 26 Jun 2024 20:54:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKskLO092624; Wed, 26 Jun 2024 20:54:46 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:46 GMT Message-Id: <202406262054.45QKskLO092624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: e1b0f431a109 - main - LinuxKPI: Remove vmas argument from get_user_pages on KPI layer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1b0f431a109683ca7c232fb9282f3afabfdf12d Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e1b0f431a109683ca7c232fb9282f3afabfdf12d commit e1b0f431a109683ca7c232fb9282f3afabfdf12d Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:51:04 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:51:04 +0000 LinuxKPI: Remove vmas argument from get_user_pages on KPI layer To chase Linux kernel 6.5 Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45614 --- sys/compat/linuxkpi/common/include/linux/mm.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index e2bda799dc77..56c849b02c32 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -279,14 +279,27 @@ extern long get_user_pages(unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **, struct vm_area_struct **); +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500 +#define get_user_pages(start, nr_pages, gup_flags, pages) \ + get_user_pages(start, nr_pages, gup_flags, pages, NULL) +#endif +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500 +static inline long +pin_user_pages(unsigned long start, unsigned long nr_pages, + unsigned int gup_flags, struct page **pages) +{ + return (get_user_pages(start, nr_pages, gup_flags, pages)); +} +#else static inline long pin_user_pages(unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas) { - return get_user_pages(start, nr_pages, gup_flags, pages, vmas); + return (get_user_pages(start, nr_pages, gup_flags, pages, vmas)); } +#endif extern int __get_user_pages_fast(unsigned long start, int nr_pages, int write, From nobody Wed Jun 26 20:54:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8YqD26D6z5QD7G; Wed, 26 Jun 2024 20:54: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 4W8YqC5Ngnz4M28; Wed, 26 Jun 2024 20:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBsChlI55FNeNvPTYQfNFcsWgv+9YPNoTfyLhp8exWs=; b=JbpXGfKn7OqcCwzfCyBs03d9HNVuGEozyCyIGs8PfTMx4kNiKcPTu+elMydpWHYyMOM5Li qHcw+NKt0rUj2bSlX3yvUPu//l+pDZHphDDHysAB/kUzE24rFPvs++UzxEaE4a0+PEdhvX qjflRp1r8GF1oKLoh8x6w05GT19T2WXRjF5pp4THvg84KjZyezAmaoPheV+x9SLAFwDnuB Aect6H7etR50JnYPqikM9tM6sq2qelbQvBsM0eivMV/baUQ++G3gwqfcL3tSocma6RegvK QYbYl28XyBJ+o/mwQ/g9my8dTuCuiUFZ8RbgAhYx9WTO1JKvz9U/yCzQvrycUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435287; a=rsa-sha256; cv=none; b=JW6zfkzEE7/ZUQBVM3hoQHdvw95qAZDAgzy4BQ11eWHNg/kjnVH8g/ejmT73VKIq6BjY70 YBgyNxdR8OQvD3zvWBvcEwrKQgBY3eZYqV8JBGNYZ7JC6hCAD+PlDPsZfi+UJJTHFPhy66 C+xE8TasSOa/UOuv86j5Ci+zjPfCvNRnCW9+BLuUs+/aMFQ+Ot8Tn0hKzX4rFzzGSBmnvT XhGttC8jTPFAAaHs/muqzZuPFrRrN2zRwln9liBUVChHWxX3oGfPSzdw3uBZ7TmtnMFGZ2 ehusYdrJhPdM4OJebqeEv4hLm+RVYKSu98GJdNIHBVTn/KQlejMlYsPSlNKerQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBsChlI55FNeNvPTYQfNFcsWgv+9YPNoTfyLhp8exWs=; b=gAKz7QVm8Jmk3m1dXi8FguAC4i3TP/xBxuyPMjx9xIG2ub7AFmcQgTkBg74HMKezHEAba4 kDQXY3E9PqGtO79sk2+JvK2MebrJ1G8ZO8Lt3OuUtgdYGbvximlLDhzm9SemmeOVAv7afs 14mbQdR687qNfxoAq43nG+oR0a5GHrqVLQN/dk3irihWVE8n0gK6B8HVsngkpDudlD2Pdc 5rdKX/LhJ4Rn4XX6wHz4GSq4nvejALZDFyOWUvwvfVdEsnq9oZHFP2NRIAiUzFuA8ASrMx v5MHk6OnSSYri5XuYHJ22ye8I2XUAyGDwBfTnaS0Sz0WrzooGC6FzYhgbxP5Rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8YqC3yMFz10HW; Wed, 26 Jun 2024 20:54: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 45QKslaj092669; Wed, 26 Jun 2024 20:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKslsm092666; Wed, 26 Jun 2024 20:54:47 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:47 GMT Message-Id: <202406262054.45QKslsm092666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 8c5c57212566 - main - LinuxKPI: Add DEFINE_DEBUGFS_ATTRIBUTE_SIGNED to linux/debugfs.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c5c572125665e3fd8a033d1a8b0a370e5a43e24 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=8c5c572125665e3fd8a033d1a8b0a370e5a43e24 commit 8c5c572125665e3fd8a033d1a8b0a370e5a43e24 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:51:34 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:51:34 +0000 LinuxKPI: Add DEFINE_DEBUGFS_ATTRIBUTE_SIGNED to linux/debugfs.h Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45615 --- sys/compat/linuxkpi/common/include/linux/debugfs.h | 2 ++ sys/compat/linuxkpi/common/include/linux/fs.h | 12 ++++++++-- sys/compat/linuxkpi/common/src/linux_simple_attr.c | 27 ++++++++++++++++++---- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/debugfs.h b/sys/compat/linuxkpi/common/include/linux/debugfs.h index 470b50cb730c..13186334d75c 100644 --- a/sys/compat/linuxkpi/common/include/linux/debugfs.h +++ b/sys/compat/linuxkpi/common/include/linux/debugfs.h @@ -88,6 +88,8 @@ void debugfs_remove_recursive(struct dentry *dentry); #define DEFINE_DEBUGFS_ATTRIBUTE(__fops, __get, __set, __fmt) \ DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) +#define DEFINE_DEBUGFS_ATTRIBUTE_SIGNED(__fops, __get, __set, __fmt) \ + DEFINE_SIMPLE_ATTRIBUTE_SIGNED(__fops, __get, __set, __fmt) void debugfs_create_bool(const char *name, umode_t mode, struct dentry *parent, bool *value); diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index a28d5bf97121..9c763168b0f4 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -374,7 +374,7 @@ simple_read_from_buffer(void __user *dest, size_t read_size, loff_t *ppos, MALLOC_DECLARE(M_LSATTR); -#define DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \ +#define __DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt, __wrfunc)\ static inline int \ __fops ## _open(struct inode *inode, struct file *filp) \ { \ @@ -385,10 +385,15 @@ static const struct file_operations __fops = { \ .open = __fops ## _open, \ .release = simple_attr_release, \ .read = simple_attr_read, \ - .write = simple_attr_write, \ + .write = __wrfunc, \ .llseek = no_llseek \ } +#define DEFINE_SIMPLE_ATTRIBUTE(fops, get, set, fmt) \ + __DEFINE_SIMPLE_ATTRIBUTE(fops, get, set, fmt, simple_attr_write) +#define DEFINE_SIMPLE_ATTRIBUTE_SIGNED(fops, get, set, fmt) \ + __DEFINE_SIMPLE_ATTRIBUTE(fops, get, set, fmt, simple_attr_write_signed) + int simple_attr_open(struct inode *inode, struct file *filp, int (*get)(void *, uint64_t *), int (*set)(void *, uint64_t), const char *fmt); @@ -399,4 +404,7 @@ ssize_t simple_attr_read(struct file *filp, char *buf, size_t read_size, loff_t ssize_t simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t *ppos); +ssize_t simple_attr_write_signed(struct file *filp, const char *buf, + size_t write_size, loff_t *ppos); + #endif /* _LINUXKPI_LINUX_FS_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_simple_attr.c b/sys/compat/linuxkpi/common/src/linux_simple_attr.c index 1bdacd7c1491..8cc9ec7ecbc9 100644 --- a/sys/compat/linuxkpi/common/src/linux_simple_attr.c +++ b/sys/compat/linuxkpi/common/src/linux_simple_attr.c @@ -138,12 +138,13 @@ unlock: } /* - * simple_attr_write: write contents of buffer into simple attribute file + * simple_attr_write_common: write contents of buffer into simple attribute file * * @filp: file pointer * @buf: kernel space buffer * @write_size: number bytes to be transferred * @ppos: starting pointer position for transfer + * @is_signed: signedness of data in @buf * * The simple_attr structure is stored in filp->private_data. * Convert the @buf string to unsigned long long. @@ -153,8 +154,9 @@ unlock: * On success, number of bytes written to simple attr * On failure, negative signed ERRNO */ -ssize_t -simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t *ppos) +static ssize_t +simple_attr_write_common(struct file *filp, const char *buf, size_t write_size, + loff_t *ppos, bool is_signed) { struct simple_attr *sattr; unsigned long long data; @@ -172,7 +174,10 @@ simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t mutex_lock(&sattr->mutex); - ret = kstrtoull(buf + *ppos, 0, &data); + if (is_signed) + ret = kstrtoll(buf + *ppos, 0, &data); + else + ret = kstrtoull(buf + *ppos, 0, &data); if (ret) goto unlock; @@ -186,3 +191,17 @@ unlock: mutex_unlock(&sattr->mutex); return (ret); } + +ssize_t +simple_attr_write(struct file *filp, const char *buf, size_t write_size, + loff_t *ppos) +{ + return (simple_attr_write_common(filp, buf, write_size, ppos, false)); +} + +ssize_t +simple_attr_write_signed(struct file *filp, const char *buf, size_t write_size, + loff_t *ppos) +{ + return (simple_attr_write_common(filp, buf, write_size, ppos, true)); +} From nobody Wed Jun 26 23:51:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8dlg0zVSz5QV5k; Wed, 26 Jun 2024 23:51: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 4W8dlf56JTz4d5F; Wed, 26 Jun 2024 23:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719445918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTvfRFWvcN562bCVPurPQc4K5bWq1ufLpmkdKusnpDU=; b=KxQ5iWk5IXsuCJmwJ1/4ATTvOlp+6TYarg3HJDkUYzum5osXFE37xD1Tju3Cyoa3fKLh1b sdocCrLYd+yiFoHgCJCUnwlRY9P69fPBVlH/UQZQvJ2Bc8EYP5cawBlRrV6uOvVcG3grSb nKd5dRjyr4mIgznsH/rmh7otb9Hbsvz0J1DB8MW9iqbdRVFjYbLHVIEed08P9FsCdAG5v9 UT94psRZB0pFZjM6YBwYuOg7uoMhbziqToY0xvtP6EVJVatLkPpw2Bjv0L9j7n8kPNeLRX 3Hk5k8y7YfanEWgcN/7T2Dh5MnlPsQfqm/9kxqyqVUrVhfzGTIhs9v5K+FcFvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719445918; a=rsa-sha256; cv=none; b=Ic5iMfQqQaknV5mdSBfw450A6p915BKhNTnUH7k/ADSrQk1I3VHXfdBPzQH/xdWMMPd1UR traP4N4XbAGDVSQ4dFh024M2rBaWQzWOQSGFFtkaReBozI1wAqidh/dtGhM5b6mbpgh4XL 4TW1wrPOnheq2rF4J++GW/8crUG6uPB1ZuAlK3qXyhQvnPao3B5IOA7paClgBx0gUGJaNm 72tRe7y0zTomHSJNazuLiriLnkwEawrlPlGompZCd6UKKSPLC4RzuK0kDgICNmSPLrdW1U 8gnJRl0eXilGkw99HK2s5oRgy7fDfyYe5WH+Y+1peP+jxE2wXwwtWOAtvzfkEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719445918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wTvfRFWvcN562bCVPurPQc4K5bWq1ufLpmkdKusnpDU=; b=fLKZayzNeJdtz6hawu1TDNpJh4khIoGfx3s13d3q5SR7iaIJz2kYBjBU9U3n4jToLqiuDv nGgKXWUl+izfnKnB4Loo9g0ZUvuxiCRGCHpXO1cvkuvqZuch7X3phq8M7OJNtCx7uf355E Bsv31ko6UR9ej7lzcCq/bw+XDCdUjfRD2Z5S2bH7/y48/6d3raOLutRiG3ZW7Y4XQngVJk xwLfnoOGzaDZZAfTYt7yZEkn5csz5d24GuvYVzm1wqzGSpTm+Ff0akCigriLCnseOG0Fx7 0LP/l5bbBgb3tTccZIKil7ScEfH6ehwY9zhdKgau5bOI+QDIoHjxsp3Jz8lKKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8dlf4NhSz150T; Wed, 26 Jun 2024 23:51: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 45QNpwep094382; Wed, 26 Jun 2024 23:51:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QNpwot094379; Wed, 26 Jun 2024 23:51:58 GMT (envelope-from git) Date: Wed, 26 Jun 2024 23:51:58 GMT Message-Id: <202406262351.45QNpwot094379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 303596eac3f5 - main - Update config/build info for OpenSSL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 303596eac3f5a7fed63f1084028d811919d37eaf Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=303596eac3f5a7fed63f1084028d811919d37eaf commit 303596eac3f5a7fed63f1084028d811919d37eaf Author: Enji Cooper AuthorDate: 2024-06-26 23:41:47 +0000 Commit: Enji Cooper CommitDate: 2024-06-26 23:51:25 +0000 Update config/build info for OpenSSL This is a companion commit to the OpenSSL 3.0.14 update. MFC after: 3 days MFC with: 44096ebd22ddd0081a357011714eff8963614b65 --- crypto/openssl/include/openssl/opensslv.h | 10 +++++----- secure/lib/libcrypto/Makefile.inc | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crypto/openssl/include/openssl/opensslv.h b/crypto/openssl/include/openssl/opensslv.h index 012d77ee8bd0..537144b32e97 100644 --- a/crypto/openssl/include/openssl/opensslv.h +++ b/crypto/openssl/include/openssl/opensslv.h @@ -29,7 +29,7 @@ extern "C" { */ # define OPENSSL_VERSION_MAJOR 3 # define OPENSSL_VERSION_MINOR 0 -# define OPENSSL_VERSION_PATCH 13 +# define OPENSSL_VERSION_PATCH 14 /* * Additional version information @@ -74,21 +74,21 @@ extern "C" { * longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and * OPENSSL_VERSION_BUILD_METADATA_STR appended. */ -# define OPENSSL_VERSION_STR "3.0.13" -# define OPENSSL_FULL_VERSION_STR "3.0.13" +# define OPENSSL_VERSION_STR "3.0.14" +# define OPENSSL_FULL_VERSION_STR "3.0.14" /* * SECTION 3: ADDITIONAL METADATA * * These strings are defined separately to allow them to be parsable. */ -# define OPENSSL_RELEASE_DATE "30 Jan 2024" +# define OPENSSL_RELEASE_DATE "4 Jun 2024" /* * SECTION 4: BACKWARD COMPATIBILITY */ -# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.13 30 Jan 2024" +# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.14 4 Jun 2024" /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ # ifdef OPENSSL_VERSION_PRE_RELEASE diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index de24bfb1038a..d95f08e27256 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -2,8 +2,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 3.0.13 -OPENSSL_DATE= 2024-02-02 +OPENSSL_VER= 3.0.14 +OPENSSL_DATE= 2024-06-04 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc From nobody Wed Jun 26 23:51:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8dlf3831z5QTxk; Wed, 26 Jun 2024 23:51: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 4W8dld3qr3z4cp6; Wed, 26 Jun 2024 23:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719445917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sNInyB3eWimWzoMZDMTL6Q52NPX25O693C+Kn+lcOmc=; b=UErp0lJtgCIijaH7cEwjw4oeYQeKXhBSRTXup+Hdo9qpFoSuxaCTErz+zYLUQ8kdewMbRw HacgR6HiWYCaAlxkiz8daRT++g4Qz62nXRAYc5sOXZNEjkh9Y10C08SKhDnjhxJuMi59jk qrsxZU85UeutEBHoq7MipkkW+nR/+tWm80MKHS/r+Uxro0rxSmGoue8HHocjTfb953ha97 4zNGN9EDxJQNcaY5cL2ycGDoGJoow/vxZZr2Cmt/TkDst2Ms0xup+fDpO/ed7aWPYm4Ktu KJs3YimZ6LzC+LXpQ4tUliCGqFUS7mJVuhXD/TZlyzzzxx79LcwuZM2atOySPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719445917; a=rsa-sha256; cv=none; b=wll/aNCsA7FuZbSR7XCh1VA2/TvBo7ykxErgGXO+4CJMXeUJEtuod5Kze7wDX4MhBwqDxR rdKpxsgvGOLDewCzY05igWGpxiaKmScVTwBs29JzfMlIGIKNVuSZtDfzld5rMwyiYRcnT8 LgRkTKTM+ilB2Gxti9N7x+OgKJ+V6UIJrA7mLwgZxW3DD3M6OKPe8xTKQ6YynGAohZzvd/ GbgPj3xxIRARlFa41X2xoIGZq+pwTIYNN2FD2xT6XNEun9E/zzlZob4l/XNY49rQxVUAlw V5wT3FUUiYcX4vm9FioT5SS3/sb57vcgToMLfbCTIOaI3856yboJs5221EnGOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719445917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sNInyB3eWimWzoMZDMTL6Q52NPX25O693C+Kn+lcOmc=; b=igwb5nOJPH385Nv25KHmnijX3gLdmEklXWpm8uXI+qNgw8bhZKMaNDvxuQchG3OFz0/hfY bmL96/Q5UrwLvUWRW04yEPZ7WDfFMye4JbDy3mhz8NIYfg3btKqGqGwNrc5mDbvUiKMxAo 3rqVrLkRCJw8Ighrh5r3bAspJSZsg85XnkEribKkj/Xir5uTkmgHdi8wfSoN3m5xhqbabZ bnn9xk2GBXISpYIioj6sjKRHmgIFRMmm2x4R3cgoZNbgD9gTGpQAcyRpSBWyImYG+rmqQ1 Vpm0QYSPiZJPq5snfwziqHF3NVflZXSiISNssMgHjA/7J12tyPi9gF9i+VQVXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8dld3Mkrz15L6; Wed, 26 Jun 2024 23:51: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 45QNpvQb094340; Wed, 26 Jun 2024 23:51:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QNpq2w094322; Wed, 26 Jun 2024 23:51:52 GMT (envelope-from git) Date: Wed, 26 Jun 2024 23:51:52 GMT Message-Id: <202406262351.45QNpq2w094322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 44096ebd22dd - main - Update to OpenSSL 3.0.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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44096ebd22ddd0081a357011714eff8963614b65 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=44096ebd22ddd0081a357011714eff8963614b65 commit 44096ebd22ddd0081a357011714eff8963614b65 Merge: 8c5c57212566 1070e7dca822 Author: Enji Cooper AuthorDate: 2024-06-26 23:50:13 +0000 Commit: Enji Cooper CommitDate: 2024-06-26 23:50:13 +0000 Update to OpenSSL 3.0.14 This release resolves 3 upstream found CVEs: - Fixed potential use after free after SSL_free_buffers() is called (CVE-2024-4741) - Fixed an issue where checking excessively long DSA keys or parameters may be very slow (CVE-2024-4603) - Fixed unbounded memory growth with session handling in TLSv1.3 (CVE-2024-2511) MFC after: 3 days Merge commit '1070e7dca8223387baf5155524b28f62bfe7da3c' crypto/openssl/CHANGES.md | 69 ++++ crypto/openssl/CONTRIBUTING.md | 6 +- crypto/openssl/Configurations/10-main.conf | 9 +- crypto/openssl/Configurations/15-ios.conf | 6 +- crypto/openssl/Configurations/unix-Makefile.tmpl | 14 +- crypto/openssl/Configure | 3 +- crypto/openssl/INSTALL.md | 9 +- crypto/openssl/NEWS.md | 15 + crypto/openssl/NOTES-NONSTOP.md | 5 +- crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/lib/s_cb.c | 8 +- crypto/openssl/apps/list.c | 3 +- crypto/openssl/apps/ocsp.c | 4 +- crypto/openssl/apps/pkcs12.c | 16 +- crypto/openssl/apps/req.c | 2 +- crypto/openssl/apps/speed.c | 6 +- crypto/openssl/apps/ts.c | 11 +- crypto/openssl/crypto/aes/build.info | 2 +- crypto/openssl/crypto/bio/bio_lib.c | 10 +- crypto/openssl/crypto/bio/bio_sock.c | 6 +- crypto/openssl/crypto/bn/bn_lib.c | 53 ++- crypto/openssl/crypto/bn/bn_rand.c | 166 ++++++-- crypto/openssl/crypto/bn/bn_shift.c | 8 +- crypto/openssl/crypto/dsa/dsa_check.c | 46 ++- crypto/openssl/crypto/dsa/dsa_ossl.c | 11 +- crypto/openssl/crypto/dsa/dsa_sign.c | 9 +- crypto/openssl/crypto/ec/build.info | 2 +- .../openssl/crypto/ec/curve448/arch_64/f_impl64.c | 8 +- crypto/openssl/crypto/ec/ecdsa_ossl.c | 15 +- crypto/openssl/crypto/encode_decode/encoder_lib.c | 7 +- crypto/openssl/crypto/engine/eng_pkey.c | 44 +-- crypto/openssl/crypto/err/openssl.ec | 4 +- crypto/openssl/crypto/ess/ess_lib.c | 4 +- crypto/openssl/crypto/evp/keymgmt_lib.c | 9 +- crypto/openssl/crypto/evp/p_lib.c | 12 +- crypto/openssl/crypto/evp/pmeth_lib.c | 69 +++- crypto/openssl/crypto/evp/signature.c | 33 +- crypto/openssl/crypto/init.c | 14 +- crypto/openssl/crypto/o_str.c | 4 +- crypto/openssl/crypto/property/property_parse.c | 3 +- crypto/openssl/crypto/provider_core.c | 11 +- crypto/openssl/crypto/sha/build.info | 2 +- crypto/openssl/crypto/sm2/sm2_crypt.c | 37 +- crypto/openssl/crypto/sm2/sm2_sign.c | 18 +- crypto/openssl/crypto/x509/v3_addr.c | 4 +- crypto/openssl/demos/digest/EVP_MD_demo.c | 4 +- crypto/openssl/demos/digest/EVP_MD_stdin.c | 4 +- crypto/openssl/doc/fingerprints.txt | 3 + crypto/openssl/doc/internal/man3/OPTIONS.pod | 4 +- .../doc/internal/man3/ossl_method_construct.pod | 4 +- .../doc/internal/man3/ossl_provider_new.pod | 4 +- .../internal/man3/ossl_random_add_conf_module.pod | 4 +- crypto/openssl/doc/internal/man7/EVP_PKEY.pod | 4 +- crypto/openssl/doc/man1/openssl-crl.pod.in | 5 +- crypto/openssl/doc/man1/openssl-mac.pod.in | 17 +- crypto/openssl/doc/man1/openssl-req.pod.in | 33 +- crypto/openssl/doc/man1/openssl-smime.pod.in | 18 +- crypto/openssl/doc/man1/openssl-storeutl.pod.in | 5 +- crypto/openssl/doc/man1/openssl-ts.pod.in | 8 +- crypto/openssl/doc/man3/DEFINE_STACK_OF.pod | 6 +- crypto/openssl/doc/man3/EVP_DigestInit.pod | 4 +- crypto/openssl/doc/man3/EVP_KDF.pod | 4 +- .../openssl/doc/man3/EVP_PKEY_CTX_set_params.pod | 6 +- crypto/openssl/doc/man3/EVP_PKEY_check.pod | 7 +- crypto/openssl/doc/man3/SSL_CIPHER_get_name.pod | 4 +- crypto/openssl/doc/man3/SSL_CTX_set_cert_store.pod | 6 +- crypto/openssl/doc/man3/SSL_CTX_set_verify.pod | 5 +- .../openssl/doc/man3/SSL_CTX_use_certificate.pod | 5 +- .../openssl/doc/man3/SSL_load_client_CA_file.pod | 20 +- crypto/openssl/doc/man7/EVP_PKEY-SM2.pod | 5 +- crypto/openssl/doc/man7/migration_guide.pod | 28 +- crypto/openssl/e_os.h | 20 +- crypto/openssl/engines/e_afalg.c | 6 +- crypto/openssl/engines/e_dasync.c | 4 +- crypto/openssl/fuzz/asn1.c | 16 +- crypto/openssl/include/crypto/bn.h | 10 +- crypto/openssl/include/internal/constant_time.h | 25 +- crypto/openssl/include/openssl/sslerr.h | 4 +- crypto/openssl/os-dep/Apple/PrivacyInfo.xcprivacy | 23 ++ crypto/openssl/providers/fips-sources.checksums | 272 ++++++------- crypto/openssl/providers/fips.checksum | 2 +- crypto/openssl/providers/fips/fipsprov.c | 4 +- .../providers/implementations/exchange/kdf_exch.c | 44 ++- .../implementations/include/prov/ciphercommon.h | 15 +- .../openssl/providers/implementations/kdfs/hkdf.c | 10 +- .../openssl/providers/implementations/rands/drbg.c | 5 +- .../providers/implementations/rands/drbg_ctr.c | 7 +- .../providers/implementations/rands/drbg_hash.c | 5 +- .../providers/implementations/rands/drbg_hmac.c | 5 +- .../providers/implementations/rands/drbg_local.h | 3 +- crypto/openssl/ssl/record/rec_layer_s3.c | 15 + crypto/openssl/ssl/record/record.h | 3 +- crypto/openssl/ssl/record/ssl3_buffer.c | 4 +- crypto/openssl/ssl/ssl_err.c | 6 +- crypto/openssl/ssl/ssl_lib.c | 10 +- crypto/openssl/ssl/ssl_sess.c | 36 +- crypto/openssl/ssl/statem/statem_srvr.c | 9 +- crypto/openssl/ssl/t1_lib.c | 5 +- crypto/openssl/test/bad_dtls_test.c | 4 +- crypto/openssl/test/build.info | 1 + crypto/openssl/test/cmp_hdr_test.c | 51 ++- crypto/openssl/test/ct_test.c | 11 +- crypto/openssl/test/dsatest.c | 10 +- crypto/openssl/test/ecdsatest.c | 30 +- crypto/openssl/test/ecstresstest.c | 4 +- crypto/openssl/test/evp_extra_test.c | 48 ++- crypto/openssl/test/evp_pkey_provided_test.c | 63 ++- crypto/openssl/test/evp_test.c | 15 +- crypto/openssl/test/helpers/ssltestlib.c | 35 +- crypto/openssl/test/helpers/ssltestlib.h | 3 +- crypto/openssl/test/keymgmt_internal_test.c | 10 +- crypto/openssl/test/pathed.cnf | 22 ++ crypto/openssl/test/pkey_meth_kdf_test.c | 55 ++- crypto/openssl/test/prov_config_test.c | 56 ++- .../invalid/p10240_q256_too_big.pem | 57 +++ crypto/openssl/test/recipes/25-test_req.t | 3 +- crypto/openssl/test/recipes/30-test_prov_config.t | 8 +- crypto/openssl/test/recipes/80-test_pkcs12.t | 14 +- crypto/openssl/test/recipes/90-test_shlibload.t | 3 +- crypto/openssl/test/sm2_internal_test.c | 37 +- crypto/openssl/test/ssl-tests/14-curves.cnf.in | 7 +- crypto/openssl/test/ssl-tests/20-cert-select.cnf | 216 +++++------ .../openssl/test/ssl-tests/20-cert-select.cnf.in | 70 ++-- crypto/openssl/test/ssl-tests/28-seclevel.cnf.in | 8 +- crypto/openssl/test/sslapitest.c | 426 ++++++++++++++++++--- crypto/openssl/test/sslbuffertest.c | 176 ++++++++- crypto/openssl/test/test.cnf | 6 + crypto/openssl/test/tls-provider.c | 13 +- crypto/openssl/test/v3ext.c | 17 +- 129 files changed, 2301 insertions(+), 764 deletions(-) diff --cc crypto/openssl/CONTRIBUTING.md index 15490fd9f620,000000000000..fec6616e21fe mode 100644,000000..100644 --- a/crypto/openssl/CONTRIBUTING.md +++ b/crypto/openssl/CONTRIBUTING.md @@@ -1,110 -1,0 +1,112 @@@ +HOW TO CONTRIBUTE TO OpenSSL +============================ + +Please visit our [Getting Started] page for other ideas about how to contribute. + + [Getting Started]: + +Development is done on GitHub in the [openssl/openssl] repository. + + [openssl/openssl]: + - To request new a feature, ask a question, or report a bug, ++To request a new feature, ask a question, or report a bug, +please open an [issue on GitHub](https://github.com/openssl/openssl/issues). + +To submit a patch or implement a new feature, please open a +[pull request on GitHub](https://github.com/openssl/openssl/pulls). +If you are thinking of making a large contribution, +open an issue for it before starting work, to get comments from the community. +Someone may be already working on the same thing, +or there may be special reasons why a feature is not implemented. + +To make it easier to review and accept your pull request, please follow these +guidelines: + + 1. Anything other than a trivial contribution requires a [Contributor + License Agreement] (CLA), giving us permission to use your code. + If your contribution is too small to require a CLA (e.g., fixing a spelling + mistake), then place the text "`CLA: trivial`" on a line by itself below + the rest of your commit message separated by an empty line, like this: + + ``` + One-line summary of trivial change + + Optional main body of commit message. It might contain a sentence + or two explaining the trivial change. + + CLA: trivial + ``` + + It is not sufficient to only place the text "`CLA: trivial`" in the GitHub + pull request description. + + [Contributor License Agreement]: + + To amend a missing "`CLA: trivial`" line after submission, do the following: + + ``` + git commit --amend + # add the line, save and quit the editor + git push -f [ []] + ``` + + 2. All source files should start with the following text (with + appropriate comment characters at the start of each line and the + year(s) updated): + + ``` + Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. + + Licensed under the Apache License 2.0 (the "License"). You may not use + this file except in compliance with the License. You can obtain a copy + in the file LICENSE in the source distribution or at + https://www.openssl.org/source/license.html + ``` + + 3. Patches should be as current as possible; expect to have to rebase + often. We do not accept merge commits, you will have to remove them + (usually by rebasing) before it will be acceptable. + - 4. Code provided should follow our [coding style] and compile without warnings. ++ 4. Code provided should follow our [coding style] and [documentation policy] ++ and compile without warnings. + There is a [Perl tool](util/check-format.pl) that helps + finding code formatting mistakes and other coding style nits. + Where `gcc` or `clang` is available, you should use the + `--strict-warnings` `Configure` option. OpenSSL compiles on many varied + platforms: try to ensure you only use portable features. + Clean builds via GitHub Actions are required. They are started automatically + whenever a PR is created or updated by committers. + + [coding style]: https://www.openssl.org/policies/technical/coding-style.html ++ [documentation policy]: https://openssl.org/policies/technical/documentation-policy.html + + 5. When at all possible, code contributions should include tests. These can + either be added to an existing test, or completely new. Please see + [test/README.md](test/README.md) for information on the test framework. + + 6. New features or changed functionality must include + documentation. Please look at the `.pod` files in `doc/man[1357]` for + examples of our style. Run `make doc-nits` to make sure that your + documentation changes are clean. + + 7. For user visible changes (API changes, behaviour changes, ...), + consider adding a note in [CHANGES.md](CHANGES.md). + This could be a summarising description of the change, and could + explain the grander details. + Have a look through existing entries for inspiration. + Please note that this is NOT simply a copy of git-log one-liners. + Also note that security fixes get an entry in [CHANGES.md](CHANGES.md). + This file helps users get more in-depth information of what comes + with a specific release without having to sift through the higher + noise ratio in git-log. + + 8. For larger or more important user visible changes, as well as + security fixes, please add a line in [NEWS.md](NEWS.md). + On exception, it might be worth adding a multi-line entry (such as + the entry that announces all the types that became opaque with + OpenSSL 1.1.0). + This file helps users get a very quick summary of what comes with a + specific release, to see if an upgrade is worth the effort. + + 9. Guidelines how to integrate error output of new crypto library modules + can be found in [crypto/err/README.md](crypto/err/README.md). diff --cc crypto/openssl/os-dep/Apple/PrivacyInfo.xcprivacy index 000000000000,285dd5bebae8..285dd5bebae8 mode 000000,100644..100644 --- a/crypto/openssl/os-dep/Apple/PrivacyInfo.xcprivacy +++ b/crypto/openssl/os-dep/Apple/PrivacyInfo.xcprivacy diff --cc crypto/openssl/test/pathed.cnf index 000000000000,07bdc1fdb209..07bdc1fdb209 mode 000000,100644..100644 --- a/crypto/openssl/test/pathed.cnf +++ b/crypto/openssl/test/pathed.cnf diff --cc crypto/openssl/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem index 000000000000,e85e2953b7a2..e85e2953b7a2 mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem +++ b/crypto/openssl/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem From nobody Thu Jun 27 02:27:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8jCt2J8lz5NJxy; Thu, 27 Jun 2024 02:28:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W8jCs1Lg0z4v6f; Thu, 27 Jun 2024 02:28:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=KfffygSD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 2a00:1450:4864:20::235 as permitted sender) smtp.mailfrom=rlibby@gmail.com Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ec1620a956so88083391fa.1; Wed, 26 Jun 2024 19:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719455285; x=1720060085; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=BAY8qUx6PgfCSuLqwz3s6LIv0Tx0lbOjndPAhWKiqf8=; b=KfffygSDGoKM2ui2VuGCpZxp39HSkzPs8hxVAJ6NlO5FOc4dVLQkXWQmWdd6kTAd2a bJ84sxJkKeADdE1Z5G/T71ekIdne/p1j6Zeb+8ob+PdvdZ8JoW6Ir22VEZ+KS3IyK+Cq d9psTcj0xRWyMRd3VNWKw2ZD5hyZP3OVfhr49gUrxAS3f/nIOoia+Iqyj/Tex+Ct+UFl YvGxZM/51SD5XEXR43bLlWHnx14IxTKXRKu6MDjnnmHdg8mBMjuto7zO8iieXeOjyHi2 NA0TeTxkHczQqwpWJzoYyvK8fSuUOWxaoDP52CABDfRkPIXU3PAfLwFfZsS4ab+wIBzc tpPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719455285; x=1720060085; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BAY8qUx6PgfCSuLqwz3s6LIv0Tx0lbOjndPAhWKiqf8=; b=cPcjBy4+8MmeuaWv21xSb7lwa/R/IU7jFxRrih1QIs0syt1I3IubmEu6xqOn04Lf1L Ru8FTiLTJMtYnfVFaxPDWLLBw+XE6+Amoz65sABwzPYvpkkk4gVsdq30VCNqtFTbl4Kp Zvtvoqwh5iVuulupLKZsOipO8jZ4KMrpoSKvjjV7ovKEUze/gXmIxjs5IrkOit12Tixj dW+XUFiUEs5jART/Jiy1VAYirVwVYXSKkO8fs9x+cZuA24g48isG3YXizAjUJK3kuqyB VLr1l0N3+tMAggzr6dcuWMYrbtbOUJnEC2SNwrFUHBph6yJ83/SZUt4S5CzeyNPa/KbX Xhew== X-Forwarded-Encrypted: i=1; AJvYcCV+21ZjT9gBnW3x5KJ1BzuKEQT+cjpSZ2i8GFIhEsTAOzs8bD1sNcIHCFc44BmxvWnxwMVaIZAxE6Mr/bWObzqvMy738klzrAAKfK13+/jY9E2dYQzoIKefhS6yQMzk7GXcotGV8OJWDJBYOxdqpaKV7w== X-Gm-Message-State: AOJu0YzpKHoNY1MqIb7SUOi6SNNm4w2PCqv+7qQ7Wu/WmRB/SncYYp8s VRvc7SQu4VKMQQNOZngyy5INZNs5ynRw0xkJjeNpZkfSPf5kWHOWX+AKmVPqY5stUl4rclivKjH RsVVgTuM/qY7s2MPl7II3pPc7CqdZ6nPI X-Google-Smtp-Source: AGHT+IHA8jCRU+ir7Ciw5L62ZuxwW7P65LnHbzWf4bYBoXOESn0QOMioUjZ/yfZtXoTt0Rtvvw3Gk7kY9AsqaA7Wvj8= X-Received: by 2002:a2e:2c13:0:b0:2ec:5917:682a with SMTP id 38308e7fff4ca-2ec5b3331a3mr61823731fa.13.1719455284439; Wed, 26 Jun 2024 19:28:04 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406192058.45JKwB77036327@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Wed, 26 Jun 2024 19:27:53 -0700 Message-ID: Subject: Re: git: ddf0ed09bd8f - main - sdt: Implement SDT probes using hot-patching To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::235:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEFALL_USER(0.00)[rlibby]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4W8jCs1Lg0z4v6f On Mon, Jun 24, 2024 at 11:51=E2=80=AFAM Mark Johnston = wrote: > > On Mon, Jun 24, 2024 at 09:27:55AM -0700, Ryan Libby wrote: > > On Mon, Jun 24, 2024 at 9:06=E2=80=AFAM Mark Johnston wrote: > > > > > > On Mon, Jun 24, 2024 at 08:36:55AM -0700, Ryan Libby wrote: > > > > On Wed, Jun 19, 2024 at 1:58=E2=80=AFPM Mark Johnston wrote: > > > > > > > > > > The branch main has been updated by markj: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dddf0ed09bd8f836774= 07db36828aca2c10f419c9 > > > > > > > > > > commit ddf0ed09bd8f83677407db36828aca2c10f419c9 > > > > > Author: Mark Johnston > > > > > AuthorDate: 2024-06-19 20:57:09 +0000 > > > > > Commit: Mark Johnston > > > > > CommitDate: 2024-06-19 20:57:41 +0000 > > > > > > > > > > sdt: Implement SDT probes using hot-patching > > > > > > > > > > The idea here is to avoid a memory access and conditional bra= nch per > > > > > probe site. Instead, the probe is represented by an "unreach= able" > > > > > unconditional function call. asm goto is used to store the a= ddress of > > > > > the probe site (represented by a no-op sled) and the address = of the > > > > > function call into a tracepoint record. Each SDT probe carri= es a list > > > > > of tracepoints. > > > > > > > > Questions out of curiosity and maybe ignorance: > > > > > > > > How does this work with relocations? Something must be adjusting t= hese > > > > addresses? > > > > > > The compiler handles this as part of the implementation of asm goto: > > > the inline assembly can reference jump targets with "%l" and > > > they're specified as operands to the asm goto statement. In the kern= el > > > these references are resolved statically, and kernel modules will > > > contain relocations for the sdt_tracepoint_set section. > > > > > > > > +/* > > > > > + * Work around an apparent clang bug or limitation which prevent= s the use of the > > > > > + * "i" (immediate) constraint with the probe structure. > > > > > + */ > > > > > +#define _SDT_ASM_PROBE_CONSTRAINT "Ws" > > > > > +#define _SDT_ASM_PROBE_OPERAND "p" > > > > > > > > Is it because i386 kmods are built with -fPIC? > > > > > > I suspect that that's related, yeah. The compiler might be assuming > > > that some indirection is needed to compute the target address, but in > > > this case it's an address in the same function and presumably can saf= ely > > > be assumed to be an immediate. > > > > > > > That makes sense for the "%l1", does it also apply to the "%c0"? Or > > does use of "%c" for the probe pointer require non-PIC? As in, don't > > the _probes_ get relocated, and don't we need to patch the pointers to > > the probes? > > When I use '%c0' to refer to the input operand, the intent is to insert > the symbol name, not the address of the probe structure as computed by > the compiler. In an earlier iteration, there was no input operand and I > just had something like > > __asm( > ... > ".quad " __STRING(_SDT_PROBE_NAME(...)) "\n" > ...); > > But this doesn't work when the probe symbol is local but has global > linkage (i.e., it was defined with "static"), since we don't know what > the symbol name is at compile time. Hence the indirection, and I needed > "c" to get clang to do what I want. The assembler encounters SDT probe > symbol names and emits relocations accordingly. Maybe there's a better > way to do what I want? It seems that this doesn't work at all with gcc > when -fPIC is defined. > Thanks for the exposition and background. I think I'm still confused. I haven't tried spinning up an i386 machine yet which is probably the more reasonable next step, but I did page through some disassembly. Comparing disassembly of dtrace_test.ko with llvm-objdump -rD: clang amd64: 0000000000000000 : 0: 00 00 addb %al, (%rax) 0000000000000000: R_X86_64_64 sdt_test___sdttest 2: 00 00 addb %al, (%rax) 4: 00 00 addb %al, (%rax) 6: 00 00 addb %al, (%rax) 8: 00 00 addb %al, (%rax) 0000000000000008: R_X86_64_64 .text+0x2f a: 00 00 addb %al, (%rax) c: 00 00 addb %al, (%rax) e: 00 00 addb %al, (%rax) 10: 00 00 addb %al, (%rax) 0000000000000010: R_X86_64_64 .text+0x3b ... 1e: 00 00 addb %al, (%rax) Okay, that looks like relocations, which is what we want. clang i386: 000028a0 <__start_set_sdt_tracepoint_set>: 28a0: c4 28 lesl (%eax), %ebp 28a2: 00 00 addb %al, (%eax) 28a4: 21 18 andl %ebx, (%eax) 28a6: 00 00 addb %al, (%eax) 28a8: 2d 18 00 00 00 subl $0x18, %eax 28ad: 00 00 addb %al, (%eax) 28af: 00 ... 000028c4 : 28c4: 3c 00 cmpb $0x0, %al 28c6: 00 00 addb %al, (%eax) 28c8: b0 28 movb $0x28, %al ... That looks like plain data? It seems at 0x28a0 we have a pointer to 0x28c4, the address of the probe in the .ko. But how do we know to fix this up? Looking at readelf -r, I don't see any reference to sdt_test___sdttest like I do with the amd64. Again, I might be confusing things, using the tools wrong, etc, this isn't really my wheelhouse. I'll try to get an i386 vm up soon to improve my understanding. Ryan From nobody Thu Jun 27 03:50:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8l3P2tG3z5Nhyq; Thu, 27 Jun 2024 03:50: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 4W8l3P2QYpz42Vv; Thu, 27 Jun 2024 03:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719460257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZO2/KefHBrcKMW8QToBYeA27TP8fdIbL4LC2RHNFGi0=; b=NQwnrk8N6d+KXUrQ+9YQl0VawYU/c7SpOTWcy/7UhLRGxFxxupW99luUGAQWesdVWt3jAN fUpbC0VBXFWef+ZS2yHG+Kxieqy5MCv+kQHlUmq1WD+cGewRTMOtQDxP2UyKvGQ+37KbmZ 9u/6iOjhSGomJMtAKiOH52Jg6SCfGmQTXyCFnbRT4zEOHupKb7DQvaajMQP0W63F877D3Z WAJVy95LbdEQ/WEuswNIg8IxuFKbHkgULkA5DKwDOlZIYi7IdnR96myM8BVbQhU1nEALtx eNDAkth4QXfuyIV9hUM1PAc9+e1oJZjHEd+rBrdGuGk+0Wj7C0uHS/WQaaQ9Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719460257; a=rsa-sha256; cv=none; b=xnpMLj5JP0ogcnaRPXq7bLLYc0oHL9ba2SLfbdLx2XuJoDxaxSn37rF6hsVgE7E2FLnkZl j5hqVpWLopPG+B5MY6cqmGZJGGvwgEtVi2MpHcelUYfCeqeEFYyJXTz912TZPEcNaOuY5K nwRe+L0uFo5SUYfga9jDij5fRDEV3Lx+CHjn1BSONEygunFu+rxjs36lI9/DF8XDYBzebD aB1ETJ7wlq3tReje+/eizF+0Xsv6YDopfagqkrgaed+V0x8FTvPvmplX7Dt7SibPYenHPQ okiORnfDS1J9PG36VC5EhgYVOBWhzSXqfQBZBUJgCbiTxwXMSw7eNhgabeKFDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719460257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZO2/KefHBrcKMW8QToBYeA27TP8fdIbL4LC2RHNFGi0=; b=Et3ZqmIXr1FCtPQL3ApIeR0hkrjgJj2hf7tD+Z8mKQxlvAqf+B5lhPFflMbLfDmDd6NpLE vRHzIdiGOOF/mUkm/ZBUyLaC/bpWamcxASAWy1JrxQzTtgpl+gWb9KhYcUA4v5uLc7a+yb Y6ZY4hIuJdV38MnQ+s36UDuKdzftZmw8kh9GzV2jXwiXd1vM5xR9mt2lGMTEocfeF7ZxBB pu61sbxR9l4STkKXxD4fcLx23s6OKgSVISOOsmeL2yLwJkfrr0VQHgnLfyJIbWfxEzSovL LybNvS6jWeb+WPMwZNAczYyiSZIOVM9xluAzfiNwXOLjfAzzhqYtXVRsimwwMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8l3P1wDgz1BZj; Thu, 27 Jun 2024 03:50: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 45R3ovio097790; Thu, 27 Jun 2024 03:50:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R3ovVH097787; Thu, 27 Jun 2024 03:50:57 GMT (envelope-from git) Date: Thu, 27 Jun 2024 03:50:57 GMT Message-Id: <202406270350.45R3ovVH097787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: b195d7498b91 - main - nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b195d7498b91c4a507723f71b3b383dfeef39d86 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=b195d7498b91c4a507723f71b3b383dfeef39d86 commit b195d7498b91c4a507723f71b3b383dfeef39d86 Author: Ryan Libby AuthorDate: 2024-06-27 03:50:04 +0000 Commit: Ryan Libby CommitDate: 2024-06-27 03:50:04 +0000 nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch Reviewed by: chuck (previous version), imp Differential Revision: https://reviews.freebsd.org/D45750 --- sys/dev/nvme/nvme_ctrlr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index f058a4e33b9f..e07ac737ffc8 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1363,14 +1363,16 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr, PHOLD(curproc); buf = uma_zalloc(pbuf_zone, M_WAITOK); buf->b_iocmd = npc->opcode & 1 ? BIO_WRITE : BIO_READ; - if (vmapbuf(buf, (void *)npc->addr, npc->data_len, 1) < 0) { + if (vmapbuf(buf, (void *)(uintptr_t)npc->addr, + npc->data_len, 1) < 0) { ret = EFAULT; goto err; } req = nvme_allocate_request_vaddr(buf->b_data, npc->data_len, nvme_npc_done, npc); } else - req = nvme_allocate_request_vaddr((void *)npc->addr, npc->data_len, + req = nvme_allocate_request_vaddr( + (void *)(uintptr_t)npc->addr, npc->data_len, nvme_npc_done, npc); } else req = nvme_allocate_request_null(nvme_npc_done, npc); From nobody Thu Jun 27 04:39:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8m6w4d8Pz5NnPZ; Thu, 27 Jun 2024 04:39: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 4W8m6w1Z3Jz46X3; Thu, 27 Jun 2024 04:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719463144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rROUdgMi0wtih7Wjn6JW9A6hS2SsMo2NwYZr9cL1oE8=; b=YsMqYdZnw3vhMfnETAOtNlbSqk4bHvd7wn2r5wJLCFA5rRrVhdyNJmxhJxG6CN6GeXnB7x nERk/ag8Gj/yUtL4/fQ9um5RX48w1I2AwJufom2t2t+7rBnnHn7gI8fvXe4b2h/1FHkwck kYaG1MKeFZ0hZHXlJsH+YsvOPKZTg9C8TGQE8cefvxbi+JvCNquRfAbaAhFWknHHSJWZrc pRrciho8aAnmErbqMYZs+97lLELMG76mUMHnQyf/VqdDXRdGVDnK8fb8+fYeLCHP9/fbxK bOrCrm0ymyVBpfWFOGXF7jndm2nrF5FLAlIa/GIIEZfU76i8sNeTwsxpMiEltw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719463144; a=rsa-sha256; cv=none; b=aeEYTp+tBadfOUnUZP4h5cmJYHLecMGtQ+yFC/CmOSY3dvYycVhxdJcwsxSR0NL+807jTr BkqHySs/tY/RVCNejdhcQtvNhiLmOLcZa2+N2ayEYI+DbF2bM3JcGumn7PMfEsu2RotgE0 LrndWxuPrt8BmGgJuwlPeWm1rpRiybdNCeyJ8YhGy9QgZ1uF/Acx8y7Bhde+sfOum4ReNv XKUEV8RF9gt0VZ+bAUuAyhdIEcJjhwoGQWCEEdJszZmhFTZwY01faYcSlL0RO0GKq/XyKt r8T2wIiLhelvzR0hiJZ7qhu80Z71yXUMPpm+PamAFhdE32dC35Qotx4JxfGE3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719463144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rROUdgMi0wtih7Wjn6JW9A6hS2SsMo2NwYZr9cL1oE8=; b=P12LOUGlIkLLURXD6cI9TNQ+kyWofMeOcRXk8LkAA5rVmBavJaPsdD4867y1VvoUM5wS77 BZ2IK3sDIyJTVymWyjMxk7yw9DGAUuywfetCRDpATMtNCt6r1zP7Yw9B9ckfADRW8XrEgD STL4UmFGWphEzpZVMzmF6FaMMoKMc1Xj5INCgh+itEeH7M0WkysRkTxqEQzVl/OQt9QS2i otDpN/SNHkXBcd4uO5En6f6gOOGT50MUWIgQ0joz5GypC21djK2hAkt7UBAVuWwbzBZ0Tw xwL9DGtnUKGzt8Dh3TrmBaFsWULVEig4xoHVDjNyUAbmOxl+bh8BtUs5jEKtIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8m6w0vYVz1D5p; Thu, 27 Jun 2024 04:39: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 45R4d3Yf071630; Thu, 27 Jun 2024 04:39:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R4d3P2071627; Thu, 27 Jun 2024 04:39:03 GMT (envelope-from git) Date: Thu, 27 Jun 2024 04:39:03 GMT Message-Id: <202406270439.45R4d3P2071627@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: ef4f4a44d913 - main - ifnet: Restore curvnet earlier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: ef4f4a44d9134ddadede0e2e6e658d0688c5ab3c Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ef4f4a44d9134ddadede0e2e6e658d0688c5ab3c commit ef4f4a44d9134ddadede0e2e6e658d0688c5ab3c Author: Zhenlei Huang AuthorDate: 2024-06-27 04:38:04 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-27 04:38:04 +0000 ifnet: Restore curvnet earlier This improves readability a little. As a side effect, a redundant CURVNET_RESTORE is removed. No functional change intended. Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45595 --- sys/net/if.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index df405f088133..98be23e564c6 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1343,8 +1343,8 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) /* XXX Lock interfaces to avoid races. */ CURVNET_SET_QUIET(pr->pr_vnet); difp = ifunit(ifname); + CURVNET_RESTORE(); if (difp != NULL) { - CURVNET_RESTORE(); prison_free(pr); return (EEXIST); } @@ -1354,16 +1354,13 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, char *ifname, int jid) shutdown = VNET_IS_SHUTTING_DOWN(ifp->if_vnet); if (shutdown) { sx_xunlock(&ifnet_detach_sxlock); - CURVNET_RESTORE(); prison_free(pr); return (EBUSY); } - CURVNET_RESTORE(); found = if_unlink_ifnet(ifp, true); if (! found) { sx_xunlock(&ifnet_detach_sxlock); - CURVNET_RESTORE(); prison_free(pr); return (ENODEV); } From nobody Thu Jun 27 08:33:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8sKb4MjTz5PCk7; Thu, 27 Jun 2024 08:33: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 4W8sKb3bHlz4RZr; Thu, 27 Jun 2024 08:33:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719477219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+h7KAm1YZwDSYRf4QWurpb664xDMvBObQzxGdri/OWE=; b=km6aaxC7Czpax5D7oQ8TE35JNOkRcgXm3y83ir2Ghgg7Ch9Ne5jM3zVqnu2etNeTI0uxjf TQ5tkj6HuRIfxxjzxtBDe6+i/ybMQofXeWZcLE37RBtDdjBgTLAffnDDJpO3sa7Eucq7d2 U5ETOwahhrkOXR9LKeIenKIxr7YlyfrED7zRnHw9iGJwMAJBcOh294rZf797yBGtrv/D4w OppG7Hrh3r48EuKAPWfJVsmEQehJ8XQt0Kf4hWwUtI//hmLPWQa243cR+tBKTbSQb6PEZ2 9e8iCx5NkqWNAGoNdnk4VVNVry2+W0cdiicBs64Mjmv1wSBm1LsCfViuSZYfSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719477219; a=rsa-sha256; cv=none; b=JkRTdE0oXZs+pJfJgHFhazvAQdM7+Gvhi1iSvY4BJEsowOKsgXNbXRndZlQP92ogE2QaYN u9YbKWjAKoVDZenOK2aPEcVzYWuUxlbvGfIUI1vxn+PlhCquq4LkB7YNbBPvJIYDV3zEj4 gBXqZjZEimr83M7sgx8EQJ1eW4pmplnyPm7/alFqjQUqD43VcKj1EeYA+FC2GncOQZ5ZP8 K3KORGxoLZ5q2zZf4+zjhP9PY9AyjJCapDJnqNTAQt2XsHif2qX2KI2uo+p94yOZozhUDl 3r1xd0f++K/tAeXU4vIvnbj081FNDxwu1Z7FZ+3Pk1B8N7qYAjsECCTaImfkZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719477219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+h7KAm1YZwDSYRf4QWurpb664xDMvBObQzxGdri/OWE=; b=j6ZQwF/ain0trwV53qkv0aOnYaViXalCcVaj+RxW+qN/sg5MwlvRwrrq06KiKpVobTxZLZ W6iEaTVi0oPFBMdcSDhKLbdKNQ266PN7+iy8QEi6+Kbh7EWD4AOvLhBYtAzvS7KCDtYAjF IxfwFFvKdDYq/csGRoScbgZWpqFeXohIRVd6sF1xlLD1IHlPvTJzt+ZQVIHGXmiZatlrGH C8WQjx3aOyCW6RTrlK46FKErclf27R65+UPIyCvZcjt+TQkdDaQWzjoHaCf0Eoen1Pis0G EUHF39dt1rgaRiPBHIJjfybeqkOrOafpgC55FUjR7/MzGNfGuXs+tU9tBSnXqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8sKb38FSz1Kqx; Thu, 27 Jun 2024 08:33: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 45R8XdOP076094; Thu, 27 Jun 2024 08:33:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8Xdi0076091; Thu, 27 Jun 2024 08:33:39 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:33:39 GMT Message-Id: <202406270833.45R8Xdi0076091@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: cde6642431bb - main - nuageinit: check for both user_data and user-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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: cde6642431bb0ca21aeebc7c521e99c681d31ffb Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=cde6642431bb0ca21aeebc7c521e99c681d31ffb commit cde6642431bb0ca21aeebc7c521e99c681d31ffb Author: Baptiste Daroussin AuthorDate: 2024-06-27 08:30:07 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:32:14 +0000 nuageinit: check for both user_data and user-data openstack, ec2 and other implementation of cloudinit disagrees on the name of the file "user-data" or "user_data", test both and use the first found PR: 279876 --- libexec/nuageinit/nuageinit | 17 ++++++++++---- libexec/nuageinit/tests/nuageinit.sh | 44 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index df637bbc5064..f268f9b0f52c 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -190,18 +190,27 @@ else end -- deal with user-data -local f = io.open(path..'/user-data', "r") +local ud = nil +local f = nil +userdatas = { "user-data", "user_data" } +for _,v in pairs(userdatas) do + f = io.open(path..'/' .. v, "r") + if f then + ud = v + break + end +end if not f then os.exit(0) end local line = f:read('*l') f:close() if line == "#cloud-config" then - f = io.open(path.."/user-data") + f = io.open(path.."/" .. ud) local obj = yaml.eval(f:read("*a")) f:close() if not obj then - nuage.err("nuageinit: error parsing cloud-config file: user-data") + nuage.err("nuageinit: error parsing cloud-config file: " .. ud) end if obj.groups then for n,g in pairs(obj.groups) do @@ -298,7 +307,7 @@ if line == "#cloud-config" then routing:close() end else - local res,err = os.execute(path..'/user-data') + local res,err = os.execute(path..'/' .. ud) if not res then nuage.err("nuageinit: error executing user-data script: ".. err) end diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 42c95e1b2abd..54c88ceb539a 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -1,11 +1,13 @@ atf_test_case args atf_test_case nocloud atf_test_case nocloud_userdata_script +atf_test_case nocloud_user_data_script atf_test_case nocloud_userdata_cloudconfig atf_test_case nocloud_userdata_cloudconfig_users atf_test_case nocloud_network atf_test_case config2 atf_test_case config2_pubkeys +atf_test_case config2_pubkeys_user_data atf_test_case config2_network atf_test_case config2_network_static_v4 @@ -45,6 +47,16 @@ nocloud_userdata_script_body() atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit ${here}/media/nuageinit nocloud } +nocloud_user_data_script_body() +{ + here=$(pwd) + mkdir -p media/nuageinit + printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data + printf "#!/bin/sh\necho "yeah"\n" > ${here}/media/nuageinit/user_data + chmod 755 ${here}/media/nuageinit/user_data + atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit ${here}/media/nuageinit nocloud +} + nocloud_userdata_cloudconfig_users_body() { here=$(pwd) @@ -199,6 +211,36 @@ EOF atf_check -o inline:"ssh-rsa AAAAB3NzaC1y...== Generated by Nova\n" cat home/freebsd/.ssh/authorized_keys } + +config2_pubkeys_user_data_body() +{ + here=$(pwd) + export NUAGE_FAKE_ROOTDIR=$(pwd) + if [ $(id -u) -ne 0 ]; then + atf_skip "root required" + fi + mkdir -p media/nuageinit + touch media/nuageinit/meta_data.json + cat > media/nuageinit/user_data << EOF +#cloud-config + +ssh_authorized_keys: + - "ssh-rsa AAAAB3NzaC1y...== Generated by Nova" +EOF + mkdir -p etc + cat > etc/master.passwd < etc/group < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: c333758fca3e - stable/14 - mac_do: add a new MAC/do policy and mdo(1) utility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: c333758fca3e7dfe07b2908ba25702eb5e60d00f Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c333758fca3e7dfe07b2908ba25702eb5e60d00f commit c333758fca3e7dfe07b2908ba25702eb5e60d00f Author: Baptiste Daroussin AuthorDate: 2024-05-09 22:03:28 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:44:29 +0000 mac_do: add a new MAC/do policy and mdo(1) utility This policy enables a user to become another user without having to be root (hence no setuid binary). it is configured via rules using sysctl security.mac.do.rules For example: security.mac.do.rules=uid=1001:80,gid=0:any The above rule means the user identifier by the uid 1001 is able to become user 80 Any user of the group 0 are allowed to become any user on the system. The mdo(1) utility expects the MAC/do policy to be installed and its rules defined. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D45145 (cherry picked from commit 8aac90f18aef7c9eea906c3ff9a001ca7b94f375) --- share/man/man4/Makefile | 1 + share/man/man4/mac_do.4 | 78 +++++++ sys/modules/Makefile | 2 + sys/modules/mac_do/Makefile | 6 + sys/security/mac_do/mac_do.c | 545 +++++++++++++++++++++++++++++++++++++++++++ usr.bin/Makefile | 1 + usr.bin/mdo/Makefile | 4 + usr.bin/mdo/mdo.1 | 44 ++++ usr.bin/mdo/mdo.c | 76 ++++++ 9 files changed, 757 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 10ae7f3cef19..aa55108d8b4e 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -289,6 +289,7 @@ MAN= aac.4 \ mac_biba.4 \ mac_bsdextended.4 \ mac_ddb.4 \ + mac_do.4 \ mac_ifoff.4 \ mac_ipacl.4 \ mac_lomac.4 \ diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 new file mode 100644 index 000000000000..9a9ebe1ca989 --- /dev/null +++ b/share/man/man4/mac_do.4 @@ -0,0 +1,78 @@ +.\"- +.\" Copyright (c) 2024 Baptiste Daroussin +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 22, 2024 +.Dt MAC_DO 4 +.Os +.Sh NAME +.Nm mac_do +.Nd "policy allowing user to execute program as another user" +.Sh SYNOPSIS +To compile the +.Nm +policy into your kernel, place the following lines +in your kernel configruation file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Cd "options MAC_DO" +.Ed +.Sh DESCRIPTION +The +.Nm +policy grants users the ability to run processs as other users +according to predefined rules. +.Pp +The exact set of kernel privileges granted are: +.Bl -inset -compact -offset indent +.It Dv PRIV_CRED_SETGROUPS +.It Dv PRIV_CRET_SETUID +.El +.Pp +The following +.Xr sysctl 8 +MIBs are available: +.Bl -tag -width indent +.It Va security.mac.do.enabled +Enable the +.Nm +policy. +(Default: 1). +.It Va security.mac.do.rules +The set of rules. +.El +.Pp +The rules consist of a list of elements separated by +.So , Sc . +Each element is of the form +.Sm off +.Do +.Op Cm uid | Cm gid +.Li = +.Ar fid +.Li : +.Ar tid +.Dc +.Sm on . +Where +.Ar fid +is the uid or gid of the user or group the rule applies to, and +.Ar tid +is the uid of the targetted user. +Two special forms are accepted for +.Ar tid : +.Va any +or +.Va * , +which allow to target any user. +.Sh EXAMPLES +The following rule: +.Pp +.Dl security.mac.do.rules=uid=1001:80,gid=0:any +.Pp +means the user with the uid 1001 can execute processes as user with uid 80, +all the users which belongs to the group gid 0 can execute processes as any user. +.Sh SEE ALSO +.Xr mac 4 , +.Xr mdo 1 diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 9a92b6f3de7d..56a28b4b71ec 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -223,6 +223,7 @@ SUBDIR= \ ${_mac_biba} \ ${_mac_bsdextended} \ ${_mac_ddb} \ + ${_mac_do} \ ${_mac_ifoff} \ ${_mac_ipacl} \ ${_mac_lomac} \ @@ -586,6 +587,7 @@ _mac_bsdextended= mac_bsdextended .if ${KERN_OPTS:MDDB} || defined(ALL_MODULES) _mac_ddb= mac_ddb .endif +_mac_do= mac_do _mac_ifoff= mac_ifoff _mac_ipacl= mac_ipacl _mac_lomac= mac_lomac diff --git a/sys/modules/mac_do/Makefile b/sys/modules/mac_do/Makefile new file mode 100644 index 000000000000..532a5b9faa71 --- /dev/null +++ b/sys/modules/mac_do/Makefile @@ -0,0 +1,6 @@ +.PATH: ${SRCTOP}/sys/security/mac_do + +KMOD= mac_do +SRCS= mac_do.c vnode_if.h + +.include diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c new file mode 100644 index 000000000000..8685954b7db6 --- /dev/null +++ b/sys/security/mac_do/mac_do.c @@ -0,0 +1,545 @@ +/*- + * Copyright(c) 2024 Baptiste Daroussin + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +SYSCTL_DECL(_security_mac); + +static SYSCTL_NODE(_security_mac, OID_AUTO, do, + CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "mac_do policy controls"); + +static int do_enabled = 1; +SYSCTL_INT(_security_mac_do, OID_AUTO, enabled, CTLFLAG_RWTUN, + &do_enabled, 0, "Enforce do policy"); + +static MALLOC_DEFINE(M_DO, "do_rule", "Rules for mac_do"); + +#define MAC_RULE_STRING_LEN 1024 + +static unsigned mac_do_osd_jail_slot; + +#define RULE_UID 1 +#define RULE_GID 2 +#define RULE_ANY 3 + +struct rule { + int from_type; + union { + uid_t f_uid; + gid_t f_gid; + }; + int to_type; + uid_t t_uid; + TAILQ_ENTRY(rule) r_entries; +}; + +struct mac_do_rule { + char string[MAC_RULE_STRING_LEN]; + TAILQ_HEAD(rulehead, rule) head; +}; + +static struct mac_do_rule rules0; + +static void +toast_rules(struct rulehead *head) +{ + struct rule *r; + + while ((r = TAILQ_FIRST(head)) != NULL) { + TAILQ_REMOVE(head, r, r_entries); + free(r, M_DO); + } +} + +static int +parse_rule_element(char *element, struct rule **rule) +{ + int error = 0; + char *type, *id, *p; + struct rule *new; + + new = malloc(sizeof(*new), M_DO, M_ZERO|M_WAITOK); + + type = strsep(&element, "="); + if (type == NULL) { + error = EINVAL; + goto out; + } + if (strcmp(type, "uid") == 0) { + new->from_type = RULE_UID; + } else if (strcmp(type, "gid") == 0) { + new->from_type = RULE_GID; + } else { + error = EINVAL; + goto out; + } + id = strsep(&element, ":"); + if (id == NULL) { + error = EINVAL; + goto out; + } + if (new->from_type == RULE_UID) + new->f_uid = strtol(id, &p, 10); + if (new->from_type == RULE_GID) + new->f_gid = strtol(id, &p, 10); + if (*p != '\0') { + error = EINVAL; + goto out; + } + if (*element == '\0') { + error = EINVAL; + goto out; + } + if (strcmp(element, "any") == 0 || strcmp(element, "*") == 0) { + new->to_type = RULE_ANY; + } else { + new->to_type = RULE_UID; + new->t_uid = strtol(element, &p, 10); + if (*p != '\0') { + error = EINVAL; + goto out; + } + } +out: + if (error != 0) { + free(new, M_DO); + *rule = NULL; + } else + *rule = new; + return (error); +} + +static int +parse_rules(char *string, struct rulehead *head) +{ + struct rule *new; + char *element; + int error = 0; + + while ((element = strsep(&string, ",")) != NULL) { + if (strlen(element) == 0) + continue; + error = parse_rule_element(element, &new); + if (error) + goto out; + TAILQ_INSERT_TAIL(head, new, r_entries); + } +out: + if (error != 0) + toast_rules(head); + return (error); +} + +static struct mac_do_rule * +mac_do_rule_find(struct prison *spr, struct prison **prp) +{ + struct prison *pr; + struct mac_do_rule *rules; + + for (pr = spr;; pr = pr->pr_parent) { + mtx_lock(&pr->pr_mtx); + if (pr == &prison0) { + rules = &rules0; + break; + } + rules = osd_jail_get(pr, mac_do_osd_jail_slot); + if (rules != NULL) + break; + mtx_unlock(&pr->pr_mtx); + } + *prp = pr; + + return (rules); +} + +static int +sysctl_rules(SYSCTL_HANDLER_ARGS) +{ + char *copy_string, *new_string; + struct rulehead head, saved_head; + struct prison *pr; + struct mac_do_rule *rules; + int error; + + rules = mac_do_rule_find(req->td->td_ucred->cr_prison, &pr); + mtx_unlock(&pr->pr_mtx); + if (req->newptr == NULL) + return (sysctl_handle_string(oidp, rules->string, MAC_RULE_STRING_LEN, req)); + + new_string = malloc(MAC_RULE_STRING_LEN, M_DO, + M_WAITOK|M_ZERO); + mtx_lock(&pr->pr_mtx); + strlcpy(new_string, rules->string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + + error = sysctl_handle_string(oidp, new_string, MAC_RULE_STRING_LEN, req); + if (error) + goto out; + + copy_string = strdup(new_string, M_DO); + TAILQ_INIT(&head); + error = parse_rules(copy_string, &head); + free(copy_string, M_DO); + if (error) + goto out; + TAILQ_INIT(&saved_head); + mtx_lock(&pr->pr_mtx); + TAILQ_CONCAT(&saved_head, &rules->head, r_entries); + TAILQ_CONCAT(&rules->head, &head, r_entries); + strlcpy(rules->string, new_string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + toast_rules(&saved_head); + +out: + free(new_string, M_DO); + return (error); +} + +SYSCTL_PROC(_security_mac_do, OID_AUTO, rules, + CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE, + 0, 0, sysctl_rules, "A", + "Rules"); + +static void +destroy(struct mac_policy_conf *mpc) +{ + osd_jail_deregister(mac_do_osd_jail_slot); + toast_rules(&rules0.head); +} + +static void +mac_do_alloc_prison(struct prison *pr, struct mac_do_rule **lrp) +{ + struct prison *ppr; + struct mac_do_rule *rules, *new_rules; + void **rsv; + + rules = mac_do_rule_find(pr, &ppr); + if (ppr == pr) + goto done; + + mtx_unlock(&ppr->pr_mtx); + new_rules = malloc(sizeof(*new_rules), M_PRISON, M_WAITOK|M_ZERO); + rsv = osd_reserve(mac_do_osd_jail_slot); + rules = mac_do_rule_find(pr, &ppr); + if (ppr == pr) { + free(new_rules, M_PRISON); + osd_free_reserved(rsv); + goto done; + } + mtx_lock(&pr->pr_mtx); + osd_jail_set_reserved(pr, mac_do_osd_jail_slot, rsv, new_rules); + TAILQ_INIT(&new_rules->head); +done: + if (lrp != NULL) + *lrp = rules; + mtx_unlock(&pr->pr_mtx); + mtx_unlock(&ppr->pr_mtx); +} + +static void +mac_do_dealloc_prison(void *data) +{ + struct mac_do_rule *r = data; + + toast_rules(&r->head); +} + +static int +mac_do_prison_set(void *obj, void *data) +{ + struct prison *pr = obj; + struct vfsoptlist *opts = data; + struct rulehead head, saved_head; + struct mac_do_rule *rules; + char *rules_string, *copy_string; + int error, jsys, len; + + error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error == ENOENT) + jsys = -1; + error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len); + if (error == ENOENT) + rules = NULL; + else + jsys = JAIL_SYS_NEW; + switch (jsys) { + case JAIL_SYS_INHERIT: + mtx_lock(&pr->pr_mtx); + osd_jail_del(pr, mac_do_osd_jail_slot); + mtx_unlock(&pr->pr_mtx); + break; + case JAIL_SYS_NEW: + mac_do_alloc_prison(pr, &rules); + if (rules_string == NULL) + break; + copy_string = strdup(rules_string, M_DO); + TAILQ_INIT(&head); + error = parse_rules(copy_string, &head); + free(copy_string, M_DO); + if (error) + return (1); + TAILQ_INIT(&saved_head); + mtx_lock(&pr->pr_mtx); + TAILQ_CONCAT(&saved_head, &rules->head, r_entries); + TAILQ_CONCAT(&rules->head, &head, r_entries); + strlcpy(rules->string, rules_string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + toast_rules(&saved_head); + break; + } + return (0); +} + +SYSCTL_JAIL_PARAM_SYS_NODE(mdo, CTLFLAG_RW, "Jail MAC/do parameters"); +SYSCTL_JAIL_PARAM_STRING(_mdo, rules, CTLFLAG_RW, MAC_RULE_STRING_LEN, + "Jail MAC/do rules"); + +static int +mac_do_prison_get(void *obj, void *data) +{ + struct prison *ppr, *pr = obj; + struct vfsoptlist *opts = data; + struct mac_do_rule *rules; + int jsys, error; + + rules = mac_do_rule_find(pr, &ppr); + error = vfs_setopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error != 0 && error != ENOENT) + goto done; + error = vfs_setopts(opts, "mdo.rules", rules->string); + if (error != 0 && error != ENOENT) + goto done; + mtx_unlock(&ppr->pr_mtx); + error = 0; +done: + return (0); +} + +static int +mac_do_prison_create(void *obj, void *data __unused) +{ + struct prison *pr = obj; + + mac_do_alloc_prison(pr, NULL); + return (0); +} + +static int +mac_do_prison_remove(void *obj, void *data __unused) +{ + struct prison *pr = obj; + struct mac_do_rule *r; + + mtx_lock(&pr->pr_mtx); + r = osd_jail_get(pr, mac_do_osd_jail_slot); + mtx_unlock(&pr->pr_mtx); + toast_rules(&r->head); + return (0); +} + +static int +mac_do_prison_check(void *obj, void *data) +{ + struct vfsoptlist *opts = data; + char *rules_string; + int error, jsys, len; + + error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error != ENOENT) { + if (error != 0) + return (error); + if (jsys != JAIL_SYS_NEW && jsys != JAIL_SYS_INHERIT) + return (EINVAL); + } + error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len); + if (error != ENOENT) { + if (error != 0) + return (error); + if (len > MAC_RULE_STRING_LEN) { + vfs_opterror(opts, "mdo.rules too long"); + return (ENAMETOOLONG); + } + } + if (error == ENOENT) + error = 0; + return (error); +} + +static void +init(struct mac_policy_conf *mpc) +{ + static osd_method_t methods[PR_MAXMETHOD] = { + [PR_METHOD_CREATE] = mac_do_prison_create, + [PR_METHOD_GET] = mac_do_prison_get, + [PR_METHOD_SET] = mac_do_prison_set, + [PR_METHOD_CHECK] = mac_do_prison_check, + [PR_METHOD_REMOVE] = mac_do_prison_remove, + }; + struct prison *pr; + + mac_do_osd_jail_slot = osd_jail_register(mac_do_dealloc_prison, methods); + TAILQ_INIT(&rules0.head); + sx_slock(&allprison_lock); + TAILQ_FOREACH(pr, &allprison, pr_list) + mac_do_alloc_prison(pr, NULL); + sx_sunlock(&allprison_lock); +} + +static bool +rule_is_valid(struct ucred *cred, struct rule *r) +{ + if (r->from_type == RULE_UID && r->f_uid == cred->cr_uid) + return (true); + if (r->from_type == RULE_GID && r->f_gid == cred->cr_gid) + return (true); + return (false); +} + +static int +priv_grant(struct ucred *cred, int priv) +{ + struct rule *r; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (EPERM); + + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (rule_is_valid(cred, r)) { + switch (priv) { + case PRIV_CRED_SETGROUPS: + case PRIV_CRED_SETUID: + mtx_unlock(&pr->pr_mtx); + return (0); + default: + break; + } + } + } + mtx_unlock(&pr->pr_mtx); + return (EPERM); +} + +static int +check_setgroups(struct ucred *cred, int ngrp, gid_t *groups) +{ + struct rule *r; + char *fullpath = NULL; + char *freebuf = NULL; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (0); + if (cred->cr_uid == 0) + return (0); + + if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) + return (EPERM); + if (strcmp(fullpath, "/usr/bin/mdo") != 0) { + free(freebuf, M_TEMP); + return (EPERM); + } + free(freebuf, M_TEMP); + + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (rule_is_valid(cred, r)) { + mtx_unlock(&pr->pr_mtx); + return (0); + } + } + mtx_unlock(&pr->pr_mtx); + + return (EPERM); +} + +static int +check_setuid(struct ucred *cred, uid_t uid) +{ + struct rule *r; + int error; + char *fullpath = NULL; + char *freebuf = NULL; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (0); + if (cred->cr_uid == uid || cred->cr_uid == 0) + return (0); + + if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) + return (EPERM); + if (strcmp(fullpath, "/usr/bin/mdo") != 0) { + free(freebuf, M_TEMP); + return (EPERM); + } + free(freebuf, M_TEMP); + + error = EPERM; + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (r->from_type == RULE_UID) { + if (cred->cr_uid != r->f_uid) + continue; + if (r->to_type == RULE_ANY) { + error = 0; + break; + } + if (r->to_type == RULE_UID && uid == r->t_uid) { + error = 0; + break; + } + } + if (r->from_type == RULE_GID) { + if (cred->cr_gid != r->f_gid) + continue; + if (r->to_type == RULE_ANY) { + error = 0; + break; + } + if (r->to_type == RULE_UID && uid == r->t_uid) { + error = 0; + break; + } + } + } + mtx_unlock(&pr->pr_mtx); + return (error); +} + +static struct mac_policy_ops do_ops = { + .mpo_destroy = destroy, + .mpo_init = init, + .mpo_cred_check_setuid = check_setuid, + .mpo_cred_check_setgroups = check_setgroups, + .mpo_priv_grant = priv_grant, +}; + +MAC_POLICY_SET(&do_ops, mac_do, "MAC/do", + MPC_LOADTIME_FLAG_UNLOADOK, NULL); +MODULE_VERSION(mac_do, 1); diff --git a/usr.bin/Makefile b/usr.bin/Makefile index aa62155703a7..61834d33cabc 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -88,6 +88,7 @@ SUBDIR= alias \ lzmainfo \ m4 \ mandoc \ + mdo \ mesg \ ministat \ mkdep \ diff --git a/usr.bin/mdo/Makefile b/usr.bin/mdo/Makefile new file mode 100644 index 000000000000..e20f2719fc82 --- /dev/null +++ b/usr.bin/mdo/Makefile @@ -0,0 +1,4 @@ +PROG= mdo +SRCS= mdo.c + +.include diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 new file mode 100644 index 000000000000..115ce44f4531 --- /dev/null +++ b/usr.bin/mdo/mdo.1 @@ -0,0 +1,44 @@ +.\"- +.\" Copyright(c) 2024 Baptiste Daroussin +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 22, 2024 +.Dt MDO 1 +.Os +.Sh NAME +.Nm mdo +.Nd execute commands as another user +.Sh SYNOPSIS +.Nm +.Op Fl u Ar username +.Op Fl i +.Op command Op args +.Sh DESCRIPTION +The +.Nm +utility executes the specified +.Ar command +as user +.Ar username . +.Pp +If no +.Ar username +is provided it defaults to the +.Va root +user. +If no +.Ar command +is specified, it will execute the shell specified as +.Va SHELL +environnement variable, falling back on +.Pa /bin/sh . +.Pp +The +.Fl i +option can be used to only call +.Fn setuid +and keep the group from the calling user. +.Sh SEE ALSO +.Xr su 1 +.Xr mac_do 4 diff --git a/usr.bin/mdo/mdo.c b/usr.bin/mdo/mdo.c new file mode 100644 index 000000000000..22e2838daa08 --- /dev/null +++ b/usr.bin/mdo/mdo.c @@ -0,0 +1,76 @@ +/*- + * Copyright(c) 2024 Baptiste Daroussin + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static void +usage(void) +{ + fprintf(stderr, "usage: mdo [-u username] [-i] [--] [command [args]]\n"); + exit(EXIT_FAILURE); +} + +int +main(int argc, char **argv) +{ + struct passwd *pw; + const char *username = "root"; + bool uidonly = false; + int ch; + + while ((ch = getopt(argc, argv, "u:i")) != -1) { + switch (ch) { + case 'u': + username = optarg; + break; + case 'i': + uidonly = true; + break; + default: + usage(); + } + } + argc -= optind; + argv += optind; + + if ((pw = getpwnam(username)) == NULL) { + if (strspn(username, "0123456789") == strlen(username)) { + const char *errp = NULL; + uid_t uid = strtonum(username, 0, UID_MAX, &errp); + if (errp != NULL) + err(EXIT_FAILURE, "%s", errp); + pw = getpwuid(uid); + } + if (pw == NULL) + err(EXIT_FAILURE, "invalid username '%s'", username); + } + if (!uidonly) { + if (initgroups(pw->pw_name, pw->pw_gid) == -1) + err(EXIT_FAILURE, "failed to call initgroups"); + if (setgid(pw->pw_gid) == -1) + err(EXIT_FAILURE, "failed to call setgid"); + } + if (setuid(pw->pw_uid) == -1) + err(EXIT_FAILURE, "failed to call setuid"); + if (*argv == NULL) { + const char *sh = getenv("SHELL"); + if (sh == NULL) + sh = _PATH_BSHELL; + execlp(sh, sh, "-i", NULL); + } else { + execvp(argv[0], argv); + } + err(EXIT_FAILURE, "exec failed"); +} From nobody Thu Jun 27 08:48:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8sfq4nTVz5PFHP; Thu, 27 Jun 2024 08:48: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 4W8sfq3DmNz4T4B; Thu, 27 Jun 2024 08:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDnUCU61Xxd3JtJoCHrnngfWNv1nEFzaX8tNgCFWU9I=; b=iKFLvYW30EKzzDy4uiMbB+ClwnSk/4FyiilfhIFuUiq+PijdTR/LruxwpS238GWp5nZSZ8 YSva2LN9jy2v+cIuO3d1jq4pCq40XdEdVem8uwW8sM+5tj1lRxctB7KYysub/yfuXgbqz8 DtOvhOlzpdmRMfJv3/1i4HpG0FRwffajn4iTTOOTY4lUJR7y9g51EtpD8bVmX5i8kN8BMv ELkIMYowO7+gjhdzXv/7eqGejWekuqUs03GcWXm9glcMmJis+NE2VdSBbjVpMahY0Jf1ln XprrC91bXvl352uGwmjwgodCMKJfHmwa1M/+0TuFXmIY/IUUDRbPVynQIp70CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478115; a=rsa-sha256; cv=none; b=tJBAbCwRss7xFIU/njfkM28yXpqMhNvugiCSWiaDWLC3CTdq4cfk8+Ud8h0Xl2ku3GKemz 4v//zRbHPOY9mx2cLY8OmcbkJeSF5TpvxG18fq/BdkQVDlSg+7D33j8XPMfjQ2CwX98NGG rPdQ4C/hhCM9wxadZDemRB5/IZwFD/72ZyskLq3b5pfsv7AdSM/2Ttv2arzXpgl0T4ZbJu H86ve26WQUgY2bY0OqDH/fja6pz/GD01Nlwm9pBZO2Dz+WXfpIQ69ZZpKEoUe0Bf2pmoHe zi5CGClYeevrrQfVU0I9L3IkrnzwRuF9Akg9PSZW6uc2qE0Dpdo87nMDGSQreA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDnUCU61Xxd3JtJoCHrnngfWNv1nEFzaX8tNgCFWU9I=; b=utN8uY2vNkZMJwVh93vveQYVjkNIgCsyfUqmDe4pNMMPzV0DOx+ZpDy9CggVXWYcTVH59o 2IO6rErhtgtWtguYk2NOuY6AzrF/zJ83aaYmnJjlzWpJE7WzCup9aCxAmkXOqQAx/p8OyS s/YrMp2nbnGNOhnc7DRpuGbpTKbE7FGuHe26j5ZmD8ABuyON2QXlvJEcamvfStnbjij4yn R8QjIBefrQug4XbQv6dHMRnPANDjy1rBln/UPhm18K0zuzjFcVIG9ntOwDsoWHPMtiXMis ZSLih9RyM34/vNjvRmwyi/VpBFIu4UIPrNdku4aNAlZ6XO+mfRUqAA+31xalqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8sfq2pcBz1Ks2; Thu, 27 Jun 2024 08:48: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 45R8mZio093121; Thu, 27 Jun 2024 08:48:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8mZ4o093118; Thu, 27 Jun 2024 08:48:35 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:48:35 GMT Message-Id: <202406270848.45R8mZ4o093118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 7f66cc235b3d - stable/14 - mac_do(4): fix 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f66cc235b3d1da1b6231c98a6adc4dbadbca294 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7f66cc235b3d1da1b6231c98a6adc4dbadbca294 commit 7f66cc235b3d1da1b6231c98a6adc4dbadbca294 Author: Baptiste Daroussin AuthorDate: 2024-05-22 13:56:03 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:46:58 +0000 mac_do(4): fix typo Reported by: Gary Jennejohn (cherry picked from commit eaab8e4166a02212cb7d6aea4304834d9bcf5ff9) --- share/man/man4/mac_do.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index 9a9ebe1ca989..ce9f8cf25a4a 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -27,7 +27,7 @@ according to predefined rules. The exact set of kernel privileges granted are: .Bl -inset -compact -offset indent .It Dv PRIV_CRED_SETGROUPS -.It Dv PRIV_CRET_SETUID +.It Dv PRIV_CRED_SETUID .El .Pp The following From nobody Thu Jun 27 08:48:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8sfs11Qpz5PFHR; Thu, 27 Jun 2024 08:48: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 4W8sfr4dQDz4T0P; Thu, 27 Jun 2024 08:48:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTc05Tb0XH43F926/oaYaOE2KZ7nu4TCqEq6Kx3THzQ=; b=aG8k5VoWnLShhNRX2Gy9m2zZkSRz1M1GCXq2VwgFZB+Jq8MzacfTtutNE3/ouZz3riYmMu ScmOIT+qSHEAvmaDIpTc/ELl52G8e1eFwzolMkySkMWE5wzbcn11ihbCGEfE6xlqOp5rqs RzO0vxzMbNVtCHaTiickjz4jtu8kncA3781FnZTH2W5WKcYCbIB5LeBLAKBCBnIFKsAINt e/iNG/Loviy9pKi4rSW6bXupiKUGo+jPhxBNGBFs1WTH/SnR2qsyGBebLYXhEXxjHrb2Al slD3rbMWS29sjoNEOoaMphdXAW7IO08nkC2CI+jInw8HT7NHPqQyECTczmiE4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478116; a=rsa-sha256; cv=none; b=gpO86SWN8lggbBv/GoUzf6i7FVtWGhGeGQsS24tXEPZ+yfLGCShnRNHVPcWhBZedHOW7Hr +HOUKRfVEUPXSFgQyifWTD5Vg4xOJKuRBlYPnC219hNoFZwmwd8LFTqbAXW7p5Oajf7xSL V8tAwtNsOyz55A/+inYRbfveNhXb1QZYTRrKl2IM2f6aK2r9fhfpu1nH76Bl56BtQ5vNe/ gGQB76Pcfj8BOfFMY3iJiFDnqoq+KCy8wx/6A2oKcwrJmcpzZ3KqBrbOIchJ2SAU8y5cq4 c7Ahw4Vph0V2fx7WBO5mV668SomBImZkC4lDkAR1ESDE+6RtbuZ/8LKZBIwRxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTc05Tb0XH43F926/oaYaOE2KZ7nu4TCqEq6Kx3THzQ=; b=AGkb5Hn6x0DbBns+E+XBeMcKPidTwOro9uRrylp0vtDmPBZnmrk/ybVWCDeZTIvoRlNt2T GAb3jjVJh50DH+DnVmaXVW2Tz8KiYIXvd/2QYsLIdEdMApf5WugzdL8XpgQywFsl0MUof+ jZ+Bb2nHyuuF91WIt3gpZ9okEGhRHzo53sb2XjjOSg06s0yKZsHpFbV8IwCMRaXqEnlMPn AU7/zIaoqoAhFR3kEPNB3RqasSW3iOI7Y2QbH92zDVGzaKZDZmeylX+lLn+oJvqeur/j48 OhvJTeDdzTwVN78wcBcuTZRyzNYVPkuZ0+t+fDOEquoES+H40vNnJp1Um0ponA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8sfr49ttz1Kp6; Thu, 27 Jun 2024 08:48: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 45R8maa3093185; Thu, 27 Jun 2024 08:48:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8maqD093182; Thu, 27 Jun 2024 08:48:36 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:48:36 GMT Message-Id: <202406270848.45R8maqD093182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 9722023c4875 - stable/14 - MAC/do: allow to call setuid if real user id is 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9722023c4875a326ee9e4e9e0db71d463d990368 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=9722023c4875a326ee9e4e9e0db71d463d990368 commit 9722023c4875a326ee9e4e9e0db71d463d990368 Author: Baptiste Daroussin AuthorDate: 2024-05-23 10:09:11 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:47:06 +0000 MAC/do: allow to call setuid if real user id is 0 This fixed sshd not able to call restore_uid when MAC/do policy is loaded (cherry picked from commit 61b07f8aa52844b21637ac264ea134c1aef48cb7) --- sys/security/mac_do/mac_do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 8685954b7db6..507e64ea0175 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -489,7 +489,7 @@ check_setuid(struct ucred *cred, uid_t uid) if (do_enabled == 0) return (0); - if (cred->cr_uid == uid || cred->cr_uid == 0) + if (cred->cr_uid == uid || cred->cr_uid == 0 || cred->cr_ruid == 0) return (0); if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) From nobody Thu Jun 27 08:51:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8skZ1xmxz5PF7g; Thu, 27 Jun 2024 08:51: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 4W8skY6SJTz4V8Z; Thu, 27 Jun 2024 08:51:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwwgWjuGjt7p057gNo1uiBTHtbYBvbp0ZhOOVhmb8q8=; b=hv+d2fpgAcP2IwSOYcADzTdGmcnwrhkH7s+2QJ2/bFxZgJbQb7b0yAVUgwb3nY84qRD3Ex QE6CTGmtJSjV6A+SVaJ+u7edGeks+89ej9rRworyZQpMtwXiGn5mJk9aBODbt0KP7N9p1H Y3CbEDzTzJe6z5eH49lNmNsAxHv1jXp1IjhKNf0izbXMKbaHESGcz5BjfetulAOdmm47FN T7ZGF532yycC0Bk3F5xd/li4XKQD+1zG0531SG57moWf97G1okcHigJZdnhtETR7F8FsYy Y6DpEgIn0vMM4llMZmme4tdQCSB+hhfLW69TsQBM3zDQjQK6HnN0urdPJfdMkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478309; a=rsa-sha256; cv=none; b=pxgdGoA8APhJPrBlC36doV3uci6NRzgJfg30KVEb1IJjchN/hpLsRBUCV1SYc3cAEUhoO5 K2h3xFqBpZY+MgdRQJoAWDOb/KxKkVn2INbPpHpJCxDrVlvdc28/iQz0nrAm1QDcCXUpM0 QDTS3wKp249zV2y8HKgGSavpotblZUQPUDvu27ViRMOk8cFLdCouIzB+ciSBaoAOZB6YX8 GH7Q+pTdh7sIPw/QFi8rq3vmMYHojMCej5zamV2hgQSpmpZ5wlhAMI3Mpgz0XTztrFJsaq cNGfHVgp1bEKspkEwS9EJSu+XaJDLWtKro/i5kbTYXkYXW2VizdKpgGG6Cwsbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HwwgWjuGjt7p057gNo1uiBTHtbYBvbp0ZhOOVhmb8q8=; b=jpZ6Uf+zrOpfU6q26AoPYoQLttJjtADAzlPJqgVaRZHb+ORGJ62jTDPhbtByQ3hEXS3Wif P3iJKopG8KDho5RWXXBLJUFpibAom8cIxSaJgcfWhU6EYDNrXdbDs85sHOmlYuiJ9PDC8/ dhL1msJjIdZxlcFWf/sSIf+7xweuA5j+B0ravYpF0uvswykcetseFmWbFxlzyw9pz+JZPo tnNFF114+FjYNbPQG/7fgQTMMToGoxHDpN+nwBvgq1RS6O2gfWPa001Dw2ouvU8lRmk0bx 52bUS0E3NsQiYTEfecaQgzHrgprX6iRBU1/hPqzysGjb39cAfVmbBCF8VdEA3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8skY61Dmz1L5W; Thu, 27 Jun 2024 08:51: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 45R8pnaF007649; Thu, 27 Jun 2024 08:51:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8pnZ7007640; Thu, 27 Jun 2024 08:51:49 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:51:49 GMT Message-Id: <202406270851.45R8pnZ7007640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: b8722a229e9a - stable/14 - RELNOTES: document MAC/do List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: b8722a229e9a0343aa403df975c82bda33c28137 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=b8722a229e9a0343aa403df975c82bda33c28137 commit b8722a229e9a0343aa403df975c82bda33c28137 Author: Baptiste Daroussin AuthorDate: 2024-05-22 12:05:57 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:50:17 +0000 RELNOTES: document MAC/do (cherry picked from commit c180fd3d75c4289a7dcf675dc160c74aafd451c3) --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index 1ec11c872d77..1ff7364f0ed5 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +c333758fca3e: + new MAC/do policy and mdo(1) utility which enables a user to + become another user without the requirement of setuid root. + eeb04a736cb9: date(1) now supports nanoseconds. For example: `date -Ins` prints "2024-04-22T12:20:28,763742224+02:00" and From nobody Thu Jun 27 08:55:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8spH1mKrz5PFc4; Thu, 27 Jun 2024 08:55: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 4W8spH1DGRz4VVs; Thu, 27 Jun 2024 08:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZ6us/4VjmXyNE08uR3uC2w9KKbrC5BRHkP2BB6hV7w=; b=ifOIgLNfAM+hYr9kHSAZ5u11pt7jnVQ5A1XpK4kmjEYW3nuwKGt20vHKrr4WF4zBJlXkL6 aZ1hyC17a0xH/PDlrryXUeJp8Ujtk7aTew0fc8MtoJERlMw4ZJOdOQJkrN8LNzWt2Mpl5B 6fWsHc06uY3EH0fgeo+pI+RPeJDzbjFdbyQNlE96vtWRQ07tlbEitdrBHKhGZI4YVZ7COY WAMhTSgaZ87stxcwCx/8F23z20B5OZJ3qUDm7ITMMpRTuKUGJBnv4aRh7LOKbXxZxJANJm CU9JF1qEyqC50ZhJzENd58B7kJyTUWzqE13CHYepthypSybH1QJqXsKWI+D46w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478503; a=rsa-sha256; cv=none; b=mVz+mPQd2sTBbIyMN3J3W2qqdCa5OEOZ3xtFU/I5WDReeCZZKJGWaem5exe66sOX2B3Smh kFN1LtDy7pXT4eS7wZsUdlz26MaRJcOXWVFkXyzIX8FDOCmpHMSu5N0LzYEH4QcR95IRZ7 qEGq8tcSoGNlg1byzbVszl29OwEDIqY6ynQv5hSg3MRzhzIvJJcrmIfzANjWXX4neEToxU TGBiPHjvk/iafuTpoD2SGwZ0dPXzUJ7pM9ECWLbGaPeJpdzFcFEHmn8Fg+F8IQwq3O6lyI +mOgBMAVSb1DWIUGErc6C07cmAOxcNJHVZnEFkkjmMmUfq/BZzL7Xa9Mf8jjEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZ6us/4VjmXyNE08uR3uC2w9KKbrC5BRHkP2BB6hV7w=; b=S2mLXJ4bEup+EDgAF0Qg6hm+dfCr8XsGD3R4PR2jUNShP9SBIiNUJDJTX5wWTgAl33sucu ne5wOPUBfEXKsrFAKc/pTcjKZS1OVb4t0au8cAWUpK/sSyufnbVa1g43oGFGtjbPYx/0XZ Nmz2/oqXxcHtBe8G66SsNW63xIbIJ8LTBiqSIS9J4CklufXCqAN6xBpWXc7I/q//HQVRsZ NUCvP2fgfHbW4VxsODK7KRevf01AN5g0SU3xu9qX0sfVPdYYKrIF5h74nZnpvVGqQGQ0ER z1f1iDccIKdweOh0CEipiOda4zEkXMLrxP28jr2nSYTqTrrV5m1LpsYsVT9vMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8spH0Tkjz1LBv; Thu, 27 Jun 2024 08:55: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 45R8t28g009919; Thu, 27 Jun 2024 08:55:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8t28D009916; Thu, 27 Jun 2024 08:55:02 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:55:02 GMT Message-Id: <202406270855.45R8t28D009916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 8ef92ee26b9d - stable/14 - libarchive: fix thread autodetermination for zstd compression format List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ef92ee26b9d8e5bb76a759b6356119b5a8b8e9d Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=8ef92ee26b9d8e5bb76a759b6356119b5a8b8e9d commit 8ef92ee26b9d8e5bb76a759b6356119b5a8b8e9d Author: Baptiste Daroussin AuthorDate: 2024-05-03 13:37:29 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:53:41 +0000 libarchive: fix thread autodetermination for zstd compression format The libarchive code uses sysconf(3) to determine the number of threads when 0 has been given as the number of thread to use MFC after: 3 days (cherry picked from commit a25e0ba57ee17e75ab27fdc09ac3275a8215087e) --- lib/libarchive/Makefile.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libarchive/Makefile.inc b/lib/libarchive/Makefile.inc index 153f96b12165..755a39ec01e8 100644 --- a/lib/libarchive/Makefile.inc +++ b/lib/libarchive/Makefile.inc @@ -4,7 +4,8 @@ LIBADD= z bz2 lzma bsdxml zstd CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 \ - -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 -DHAVE_ZSTD_compressStream=1 + -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 -DHAVE_ZSTD_compressStream=1 \ + -DHAVE_SYSCONF=1 CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" .if ${MK_OPENSSL} != "no" From nobody Thu Jun 27 08:55:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8spV4jkkz5PFt0; Thu, 27 Jun 2024 08:55: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 4W8spV4Dnqz4VcQ; Thu, 27 Jun 2024 08:55:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbF+CHpIcMJ3u5HXEwCSORZ0g6SIU0HJZdavF4BgfcE=; b=C5A1Pgn+MrLQv83CpywILzNMP5BIlAKjpBZqP9khH0gjEvDHgM056OqQMJmFSB2fK9c+33 +e1FWA51C0SJ1Dxe74OYidCUH9We/vcI8bRoCWm9iQmQjHxDtQb7yknmbdjy3EUg5TYSDi ri8bLQM280a5/dXu8PziTehkfc8OJBSg5uWunNAPvTDMhmnFH8HQuTQ/HDllwCehKKuwmg gwYGUF25FpS7K1nmbiIiGch6MJIITB5lE7nbVf+qjF9mq3N68LG994edE6Kqt1xbHaaJ9d VB4Foxj95D2nNeamfXUduBqDVLpa/Q9dsI1XQ/ThzZbJBhPtqPOUTkGte18OlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478514; a=rsa-sha256; cv=none; b=l4Y1ljwq2JEXKixbp8jOqeuKO7u9afkcaGWfRXbgZEr/Cwt6hJu9xi1uq9s48Waj5o7qMm 3QmG/vqodaOGl6Xhu0zs7W6LusSqy7+oamAG36Lo4smsHMOHcO3NyEk13Py58tXnLGs2QG PsyocQRlay9HCFslV3l+LVYAYLUWg0SQDofmDR/lkUxf6we/lFKHgNCxx0yMdz7Kqb+EBI ePzJtrdw0zrSENTnU0TQsqVx2qNiaMnsSOh4BbdEMZXd7bAxUOB3/BtaRbIShj4lxyhO8f Dk6pxHZP20TNLUTJtJvsFGP0CYFAHBGxdx/Ir8GhBf3p7Ci0r3olZI9q50mvTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbF+CHpIcMJ3u5HXEwCSORZ0g6SIU0HJZdavF4BgfcE=; b=yKvYPnArZOgb5IxLmBflly49aGvQNPWAa2htiIH2q7760FlZ1Kjuycy+WAQYjftMuKfvc7 hUDXg54vBRzxOj7AKtRBYrhTk1YqSXhH0AgC9EePryrMbFs8BHbiE++NIjJGcAPuEfhDe7 vaKdM53OwvfF2J+k1VJc6DytXY5IgN97sLYRoS5yo1MT3R76aVc7Gz8c3R1+9iWRUupFZ8 3DdH6BqXd+QcJ8uomyblp525QXpLIgMIeb5ffFOLwIpsC+RcWrN2YVUPASCLesPR7imzZa /JcTjWGXCg5pR3Y3QzBGEfFIkF8C03ilUOdyTwBipkGPbFnhdebQKPg4dJMWiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8spV3nvFz1L5k; Thu, 27 Jun 2024 08:55: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 45R8tESt010074; Thu, 27 Jun 2024 08:55:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8tEuK010071; Thu, 27 Jun 2024 08:55:14 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:55:14 GMT Message-Id: <202406270855.45R8tEuK010071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 798c7248e7b8 - stable/13 - libarchive: fix thread autodetermination for zstd compression format List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 798c7248e7b83487b3c3a93540b826d8344b50e1 Auto-Submitted: auto-generated The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=798c7248e7b83487b3c3a93540b826d8344b50e1 commit 798c7248e7b83487b3c3a93540b826d8344b50e1 Author: Baptiste Daroussin AuthorDate: 2024-05-03 13:37:29 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:54:04 +0000 libarchive: fix thread autodetermination for zstd compression format The libarchive code uses sysconf(3) to determine the number of threads when 0 has been given as the number of thread to use MFC after: 3 days (cherry picked from commit a25e0ba57ee17e75ab27fdc09ac3275a8215087e) --- lib/libarchive/Makefile.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libarchive/Makefile.inc b/lib/libarchive/Makefile.inc index 153f96b12165..755a39ec01e8 100644 --- a/lib/libarchive/Makefile.inc +++ b/lib/libarchive/Makefile.inc @@ -4,7 +4,8 @@ LIBADD= z bz2 lzma bsdxml zstd CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 \ - -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 -DHAVE_ZSTD_compressStream=1 + -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 -DHAVE_ZSTD_compressStream=1 \ + -DHAVE_SYSCONF=1 CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" .if ${MK_OPENSSL} != "no" From nobody Thu Jun 27 08:57:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8ssM5N0Qz5PGDd; Thu, 27 Jun 2024 08:57: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 4W8ssM4qQjz4W3Z; Thu, 27 Jun 2024 08:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dTgXnt8e+X0VM/REYVfNUThSLqyIlEJbRbQQ/TwfTN8=; b=pUzAJbhsDaHGgx9i/MbksWvNZQBWlZtdcAfX6+Eme+bvLXMg0Frm0FDms5PQB8Go9+ypE+ bq2mWYf9lcWysTK12B0VGpJAur1xPyzJatBz0sYr7iHintSQWcjBs06mzzweImJnZ97EG2 jFxhWpMw2hrXImJoShbyJCv25gELUrRX8LfdlVEB/5mH45LffZiFm2NER52VDS1fYY3yqj JFPEqstctha43bVe1rqYK9mDYugrXWMd8Oaj1rDw/uhArn72aiSjwGeDv/KwD+L1lbhIqh 9VjVDmgZYBuCCGqawZoEFjibY0D377cf63+YHEGodhq32V9ODUc8cfjwsPQ3UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478663; a=rsa-sha256; cv=none; b=YRB5eg0K2eruIrW3vetUIeKyr2e+cOOANaAm1qPU/97I0dNO7JT9a7k6H5zPCuuv0lxigB 3hTZzzti2ezsgiEZNSMi06N/2gaGvp78qvvzh9t9B/cgK7A4ut/ymwq5dnNA4RNsOUU4H0 S5aYasGhxD8K2ZTAp5um+DG3EncktxpIdWMDhYj6xfBlM2wl40NeTxzbcUU3aafUlvWOzp iEaucqBletkMj/pL00TrlvcvHLAO46nLHLCNBydC6e+f7P58w1Nt1t3tb7yG1BeSKV6YRm 4deS1EUnLIvjmzk/nWq3QVtIOkj6N/lPri9k4whgPdH/E5hfjAm6ZCWIJVAYww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dTgXnt8e+X0VM/REYVfNUThSLqyIlEJbRbQQ/TwfTN8=; b=xvolaexJ3FsKERrm5n5W3NIdh7OQmDRTHcyGQmGbaJSJCxPqupta6qSSiZP9yHklcyUeDU OlGClsSBT3ZyxTxlEJA3cwsoELb1E2i5sRp0Vd34SIKXbBQ/TrIVJZcDocIy4loysUbSbo RNuY+THtUQFegG5RQloPATLj3v/y7iDek123ANU4Ybd0bXGN2enf+Nn8FSo0n04s+XWN+c cu/xSEoosZ93hNE/HpfzYjJUAIpzzW0LyeOG9XpR39f6d02zJOLMYdzbAViD800DheTNbM 1/KT4+P+orufyqftgpEs2ZoB8UUsaspqhHVZn/RdPPB2V8xrn5eIgyCKPaQgAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8ssM47lyz1L5m; Thu, 27 Jun 2024 08:57: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 45R8vhcT010485; Thu, 27 Jun 2024 08:57:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8vheu010483; Thu, 27 Jun 2024 08:57:43 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:57:43 GMT Message-Id: <202406270857.45R8vheu010483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 12e584c11e25 - stable/14 - nuageinit: use pw(8) instead of getent(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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 12e584c11e25d10ec86a1124b7d350f8a26b67db Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=12e584c11e25d10ec86a1124b7d350f8a26b67db commit 12e584c11e25d10ec86a1124b7d350f8a26b67db Author: Baptiste Daroussin AuthorDate: 2024-06-05 08:34:25 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:55:06 +0000 nuageinit: use pw(8) instead of getent(1) pw(8) allows to seek for users in a custom rootdir, which makes it easier for a testsuite MFC After: 3 days (cherry picked from commit 83fcab792c9d7f13f7e8bd73cf1850ba74f49341) --- libexec/nuageinit/nuage.lua | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 55486ae2b122..020b54b0776c 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -72,7 +72,12 @@ local function adduser(pwd) warnmsg("Argument should be a table") return nil end - local f = io.popen("getent passwd "..pwd.name) + local root = os.getenv("NUAGE_FAKE_ROOTDIR") + local cmd = "pw " + if root then + cmd = cmd .. "-R " .. root .. " " + end + local f = io.popen(cmd .. " usershow " ..pwd.name .. " -7 2>/dev/null") local pwdstr = f:read("*a") f:close() if pwdstr:len() ~= 0 then @@ -109,8 +114,7 @@ local function adduser(pwd) precmd = "echo "..pwd.plain_text_passwd .. "| " postcmd = " -H 0 " end - local root = os.getenv("NUAGE_FAKE_ROOTDIR") - local cmd = precmd .. "pw " + cmd = precmd .. "pw " if root then cmd = cmd .. "-R " .. root .. " " end @@ -140,7 +144,12 @@ local function addgroup(grp) warnmsg("Argument should be a table") return false end - local f = io.popen("getent group "..grp.name) + local root = os.getenv("NUAGE_FAKE_ROOTDIR") + local cmd = "pw " + if root then + cmd = cmd .. "-R " .. root .. " " + end + local f = io.popen(cmd .. " groupshow " ..grp.name .. " 2>/dev/null") local grpstr = f:read("*a") f:close() if grpstr:len() ~= 0 then @@ -151,8 +160,7 @@ local function addgroup(grp) local list = splitlist(grp.members) extraargs = " -M " .. table.concat(list, ',') end - local root = os.getenv("NUAGE_FAKE_ROOTDIR") - local cmd = "pw " + cmd = "pw " if root then cmd = cmd .. "-R " .. root .. " " end From nobody Thu Jun 27 08:57:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8ssN6B0vz5PG3S; Thu, 27 Jun 2024 08:57: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 4W8ssN5cf8z4W3d; Thu, 27 Jun 2024 08:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yti766KZtYjbb/t6jL0i+2VFyjS1xxzPzqVtOzZVX7k=; b=qA67CPY6xCMYf9suTBR6cuOWcV6PvqAjcmKsbCYjcwCHoRx3Y0DmfgLeDk/BwNyVAO0Qb9 jkkd0H1Pa3XnVoSrAUko7bP2WIjlDKW0vzNkwvd73oY0dyXNF7GeFh4hx4Lzgqu/G6jSDo /2gQCvMs0UZjUxLXb0xivl6i3O2voYqv7JqOpcgCoemfCmZUX69J57xoQ2Bl+J3i3DiybL UefBnxdaLA9itk0eznayf/mvJCoXf2JMlhTrgDRpFII80T6UnMoQ8saFcXwwED0WmcYRjS PnR3H96qmGgsbF8eG1rlUM/wQOlHbWJAF/T7HR5YCVFaP9mLgJwfbb7LrqLb4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478664; a=rsa-sha256; cv=none; b=o8XHAluk5QC1KHTRu+anxctBrn6ZPD/WH6xALmpC3S7cxduskLpeeDaN3aVedWbITnjABt hdVxM3JNYJ1a0GUfHjSwqiNkn940QplNQo8yFBZ58OryTqb9j+M6RDrhwXL5xr/ZHX+Bny NxMkwW6Jr0oNZ6qdfVxB9dsyxYHXyEGuNp1pcrMLimPdf1JuARZxjEjBdxjqxJXAlcY0hG qq+m/dPlEt4cKsGKe1IqCDtlv+4Nj31P+e0wF9nrSKNL7jCteLOkEP6p7Xjd67uY/U1Mum q7fMPcJDnEaPPv87pujzdzXtDHDizjwomW+Fge/6Wuj96OeswkcDGD1FXRFZWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yti766KZtYjbb/t6jL0i+2VFyjS1xxzPzqVtOzZVX7k=; b=kvwXg1Q7UeiDxIuS/HhlQabeTC6/FYZheTkQWf6nQUEYvFOiFcQJvarWCXwRiEwTB4dVsx twygmMsxqcN+AUmy/OEmHQqPs/Wftx5oK9eQxdmdaeEZ3R1Wl5S3aguSNtNcEmzmzgvIFf kUI1x4Xt4TTRCq4hPn/SVrQXJ1RVNz/3k74ibCHqat0cz3ovGCX+k6ad/4soB7quQ7bFZc Mo1m6TeXtqzf022w1Ts47wHN5qZRMSh+qXpJRMpNqYuMMbTiaYdWvpBFaqWgio0K31jmWx uK+shjS0nrqEfgC65xNK46ikJTZA+ZQp8NAXHY0E8ksVfwBm5ZnEhhRa4JPjwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8ssN4w3yz1L5n; Thu, 27 Jun 2024 08:57: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 45R8viSY010531; Thu, 27 Jun 2024 08:57:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8viTo010528; Thu, 27 Jun 2024 08:57:44 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:57:44 GMT Message-Id: <202406270857.45R8viTo010528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 3cfc085f8ac9 - stable/14 - nuageinit: make addsshkey friendly for testsuite List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3cfc085f8ac9c24a3d6dac0027efa1d8e96197d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=3cfc085f8ac9c24a3d6dac0027efa1d8e96197d1 commit 3cfc085f8ac9c24a3d6dac0027efa1d8e96197d1 Author: Baptiste Daroussin AuthorDate: 2024-06-05 08:44:17 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:55:07 +0000 nuageinit: make addsshkey friendly for testsuite (cherry picked from commit fa07b02f6e09f776b3afe5709e8fee1764c11a2a) --- libexec/nuageinit/nuage.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 020b54b0776c..ca70c778791b 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -177,6 +177,10 @@ end local function addsshkey(homedir, key) local chownak = false local chowndotssh = false + local root = os.getenv("NUAGE_FAKE_ROOTDIR") + if root then + homedir = root .. "/" .. homedir + end local ak_path = homedir .. "/.ssh/authorized_keys" local dotssh_path = homedir .. "/.ssh" local dirattrs = lfs.attributes(ak_path) From nobody Thu Jun 27 08:57:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8ssQ1trMz5PGKC; Thu, 27 Jun 2024 08:57: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 4W8ssQ08rmz4W7W; Thu, 27 Jun 2024 08:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MSWab7f0Z5wQfUCUCnGkNijwvuBzf4gCv/psiCk4eD0=; b=T3rgjxlR/hHlVbqaxnBDz4P/abtNCxYLZx2pBbNoW1lom5M8aEq/QqvXSmrC2dUxhD6eIa MkYiNb03FjjYOLdFmOp8JT4o/BR935UPX1QafiJiqvkPgXzKrhixc2lpU4iaM+WPe7t+GT BRvkFHOAnOlJ830D+pgkXxTAGU4YgA0b6vncBojXz9M6IbNULgAbNgZihXTRGBg6by6EUp JjNDr5rclLrE2C+Q8p4/V1hRRpnkWeYV0nf9dLls7PuXd3tvBwAqgG+7i0Ay+MluYpRjRd ASmrj0rtab8f363wap/7+pWM2wP9X+AwjU8nXTfpVc0a+ZmZdOW8rRCvjF00uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478666; a=rsa-sha256; cv=none; b=sOmBNTDwhAN+zoPC8brGJ3Sgi4yA0/xS+XMN35rub4truW7uIKdFllZBpxQZMsD6Ip068Y YheYLcoXAMEgmkKGutBwBTvQtj+6EFcDCN7IKgpg8ocZ++W3Iav6bwgs9hQEmQOsQpsfso o7Dnl9K/GS1y5KjBrqgm0C+cgHxl8TenQQqq6vWUK08bSbH8yKfS9Wg1NU63bkgMjuTDBz 1YXjWJ733ITBTfDe1Zzl9kUA3rkjP6ZsUlox1A8KVWfkPIqRrzV3l2HZ4colpXFXgs1gQI s9ka4RlEApwWfzN3z6XK/GS0LHwhpTSyt0SVIN6pZLLNQBnpmwtXl+fqJsk5dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MSWab7f0Z5wQfUCUCnGkNijwvuBzf4gCv/psiCk4eD0=; b=WUfvS1lbm8gyTqTqOz7T8/E9QmL1dexsxpsC1LF/XVak6tuoLhgNI7G6hhWKYpQsa9LKHk WUOgh7mwu20KzX+BHBhUoWB/LXIorbvsO0wdr8Cy27t63zdJrIGYTvow28f2ahnOBzO6Kv Mvs2679sjrgW5QyS+n2qhKFVPYd0nRXFaNNPX7BYtd4MR3wyCdYYAjq+jkYM29BX1Z1+5o qk6qxSunqjEGLoz4Dl2OcmYIecgnJVEVGfISCkKpMf6VDZWYf1hRF8yHRpBRRMoECRexTB hidjydjPPeMSesoC+1FG+UlBMsMcCRG/pl11cPlT4ECXfqFykxQPoxg0XgNMFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8ssP5tljz1LcV; Thu, 27 Jun 2024 08:57: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 45R8vjuH010576; Thu, 27 Jun 2024 08:57:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R8vjZQ010573; Thu, 27 Jun 2024 08:57:45 GMT (envelope-from git) Date: Thu, 27 Jun 2024 08:57:45 GMT Message-Id: <202406270857.45R8vjZQ010573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 30346359b377 - stable/14 - nuageinit: fix authorized_key test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 30346359b3775a958a7241e90982bf68fef667fc Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=30346359b3775a958a7241e90982bf68fef667fc commit 30346359b3775a958a7241e90982bf68fef667fc Author: Baptiste Daroussin AuthorDate: 2024-06-05 08:58:17 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:56:17 +0000 nuageinit: fix authorized_key test After miss reading the cloudinit spec I ended up writting a wrong test for basic ssh key setup, nuageinit has been fixed, but not the test, here is the actual fix. Reported by: markj (cherry picked from commit 8d7331e62a5aa75760ac54e3cb1594b0001645c6) --- libexec/nuageinit/tests/nuageinit.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 926233bcf66d..42c95e1b2abd 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -173,16 +173,17 @@ EOF config2_pubkeys_body() { here=$(pwd) + export NUAGE_FAKE_ROOTDIR=$(pwd) if [ $(id -u) -ne 0 ]; then atf_skip "root required" fi mkdir -p media/nuageinit - cat > media/nuageinit/meta_data.json << EOF -{ - "public_keys": { - "mykey": "ssh-rsa AAAAB3NzaC1y...== Generated by Nova" - }, -} + touch media/nuageinit/meta_data.json + cat > media/nuageinit/user-data << EOF +#cloud-config + +ssh_authorized_keys: + - "ssh-rsa AAAAB3NzaC1y...== Generated by Nova" EOF mkdir -p etc cat > etc/master.passwd < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: d45717e497d1 - stable/14 - release: don't keep old packages if the BRANCH changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: d45717e497d10d6f6584e10d39a13a4e5dcd214d Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d45717e497d10d6f6584e10d39a13a4e5dcd214d commit d45717e497d10d6f6584e10d39a13a4e5dcd214d Author: Siva Mahadevan AuthorDate: 2024-06-05 18:11:38 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:58:52 +0000 release: don't keep old packages if the BRANCH changes (cherry picked from commit 4231a5e5040403f4ae46a63bf6e1209d5eb7adb8) --- Makefile.inc1 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 141a18d7b745..b2e7be43f2ee 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -550,17 +550,23 @@ MAJOR_REVISION= ${_REVISION:R} _PKG_REVISION= ${_REVISION} _STRTIMENOW= %Y%m%d%H%M%S _TIMENOW= ${_STRTIMENOW:gmtime} +BRANCH_EXT= .if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} _PKG_REVISION= ${MAJOR_REVISION} -EXTRA_REVISION= .snap${_TIMENOW} +BRANCH_EXT= snap +EXTRA_REVISION= .${BRANCH_EXT}${_TIMENOW} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= a${_BRANCH:C/ALPHA([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= b${_BRANCH:C/BETA([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} +BRANCH_EXT= rc${_BRANCH:C/RC([0-9]+).*/\1/} +EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} .elif ${_BRANCH:M*-p*} -EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} +BRANCH_EXT= p${_BRANCH:C/.*-p([0-9]+$)/\1/} +EXTRA_REVISION= ${BRANCH_EXT} .endif PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif @@ -1995,9 +2001,11 @@ PKG_EXT= pkg .if exists(${REPODIR}/${PKG_ABI}) PKG_VERSION_FROM!=/usr/bin/readlink ${REPODIR}/${PKG_ABI}/latest PKG_VERSION_FROM_DIR= ${REPODIR}/${PKG_ABI}/${PKG_VERSION_FROM} +BRANCH_EXT_FROM= ${PKG_VERSION_FROM:C/.*([[:alpha:]][^\.]*).*/\1/} .else PKG_VERSION_FROM= PKG_VERSION_FROM_DIR= +BRANCH_EXT_FROM= .endif .endif .endif @@ -2035,7 +2043,7 @@ real-update-packages: stage-packages .PHONY continue; \ fi ; \ newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \ - if [ "$${oldsum}" == "$${newsum}" ]; then \ + if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT}" -a $${oldsum}" == "$${newsum}" ]; then \ echo "==> Keeping old ${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION_FROM}.${PKG_EXT}" ; \ rm ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ; \ cp $${pkg} ${REPODIR}/${PKG_ABI}/${PKG_VERSION} ; \ From nobody Thu Jun 27 09:00:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8sx05Bllz5PG3h; Thu, 27 Jun 2024 09: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 4W8sx04WdDz4Wp1; Thu, 27 Jun 2024 09: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=1719478852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PZnRCqI+/B0qqFkMFYIDO0hPD1EZT2QYuVQGnMZXGBY=; b=jPr4JyPNgUqNXX7RlZ72hPQiDhdC6ATeb8GQPeBGSkRLJcd/l/+aLWTT8zYmYaDqd64P25 Harpdj2FbU87oeQCSQQQerL7iolQJx90B/B0HtOujNOE1IUZ1nTvNeLYBZFkS6ZtGUscfo QB4yjpUMzIWmMMzD+ztHYg/OUnkyZ8Bx+S5YdA5rb5VzivR6tldqn3iqlH0+/7bK8ET1VK bKk4LEHoux92DNU2Q/hYqWX1dkiUPmrEsyvyB0psdmZ1ERbPG9WE/DLxZgL3XjpNYPCllJ g8IS0cW6N4TfV+r0Qug1HSLEIRHm+2E7hzD/2hKjGvUvFGmZrbde1vOFes2b/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478852; a=rsa-sha256; cv=none; b=eC/l5FHcsW8CRjZ7wBnljmPQwOOMGjpbOxzw6zG8C9igeZD1vMogO8+magbN6NtFRpuex/ 22XOrPKcHsZmP4Cxi0+q7hObcZoHhVUUT/jKtwv6zSqpUddQCzg1yOpwkR5fp3ZMAGIrzs mKgtw51YS6HFNEkbU7s7wDY4wIUyzW2KLGB+OGzZjDvahRr/58L0czbrGLRPYN370a8enn VMBJBQj5iEvP1xveUdSvGdcHtkXuzqiy7wYtC5/Z1NjI9T4zQD2IZloW2bLe1mcn/U6Lfa kdahBb8l/5bzyEUtKVgVKSSIjrtEt3/0JXmMeNc0PB5KQQ6BdE66mfGbVEC68g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PZnRCqI+/B0qqFkMFYIDO0hPD1EZT2QYuVQGnMZXGBY=; b=i3RWPEga8wUkuvy5gHLJ8tqUF5c921SzmhTjkM894OK3FmSI+H9kto/fcIYWHoEX0Z7TDU toupFHf+qjeadknvQGNV/rAh7+DjAWkDtanfEZT6JN2wNSFb7iqUl3Y8pwAY5L/njrbMJM mfNUkTOkUfSquAUTg3wkqQLizvaMjWTjrun/nKvcRJaQ8rQR11Ec2XW3PfPz+z/V4psfCl 7GwgGUz3YdOCfA2B9o5B4H1j3+Iit72y5ys8GXNT1JIemoJWAXOkBUWxL89MFAY/s31Bpt CieF9x26g8L1BYyxPKbRITZf76e0MdJfS/lqV/Bb/vwiTgx2kzMe2I21nGtziw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8sx047RCz1LC3; Thu, 27 Jun 2024 09: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 45R90qOK020834; Thu, 27 Jun 2024 09: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 45R90qHb020830; Thu, 27 Jun 2024 09:00:52 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:00:52 GMT Message-Id: <202406270900.45R90qHb020830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: f8df17340cd6 - stable/14 - Makefile.inc1: Fix typo affecting incremental pkgbase builds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: f8df17340cd6b28e76cfc55ec41e7878db78af81 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=f8df17340cd6b28e76cfc55ec41e7878db78af81 commit f8df17340cd6b28e76cfc55ec41e7878db78af81 Author: Navdeep Parhar AuthorDate: 2024-06-20 19:15:12 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 08:59:29 +0000 Makefile.inc1: Fix typo affecting incremental pkgbase builds. Fixes: 4231a5e50404 release: don't keep old packages if the BRANCH changes Sponsored by: Chelsio Communications (cherry picked from commit aee4c9c5b88adc899b2e155a1c144acf96719f1e) --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index b2e7be43f2ee..935421ea3b9a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2043,7 +2043,7 @@ real-update-packages: stage-packages .PHONY continue; \ fi ; \ newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \ - if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT}" -a $${oldsum}" == "$${newsum}" ]; then \ + if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT}" -a "$${oldsum}" == "$${newsum}" ]; then \ echo "==> Keeping old ${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION_FROM}.${PKG_EXT}" ; \ rm ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ; \ cp $${pkg} ${REPODIR}/${PKG_ABI}/${PKG_VERSION} ; \ From nobody Thu Jun 27 09:02:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8sz962Z6z5PGdf; Thu, 27 Jun 2024 09:02: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 4W8sz93tJLz4XXq; Thu, 27 Jun 2024 09:02:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLaSi30cFbt6aY8Y8JUCmOVAlelGNPht93RJ2Mw+LeQ=; b=C2QZ4cHAgy3Ed9AvxheOvnX/N9Xoe4QvGcq7PrsC24AhAt8YykTLkiAukLAcXTC+aCmZDw jsHFy+Wq/qBzZUHPSVvOTbPnqMAweJg3yjrFhkozf5KX0aqp9HCuPqBMqNM4fiZ8bsMFwo 6Q/E0gldz+um29qeBSOAvzvMFzeiP24div4IRgH230oXjGCuRHaWPBOvbgJU883TNmIKll i5mYi7MRzvO/rYkjFoeJhGdOH0iefx92e4iAwpa+rBXpZHRBr9OVEXahbtGzI2UEPL2CAj Vs1rEJGfzO1x3P8QU4mNBw5MrjmF1L2vtbwaRAAhwBnyWAyr2uCmIxoKWJrlOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478965; a=rsa-sha256; cv=none; b=DFH2sQKC3FotzWRQbGnbxyWjG0op8zZ48yCD1JTn8sspK92C/U78hbXDTc7FRQ9RJcqnSU KUUbkuMHfjGn71bHVw/QbJZda7gh08DtwmpXi9Tucsqz/KAeIFA9nzwIQfusZxKyH9QeQl Vuq2H/Mc0XppAHfv/mBSI5CmAn5sv5HewJbPabqybwwvYKRerVp5TNgIO0KOCn/+Xu69Mk NC3k2tCyW6jDykLcPJlho9Ovpl9995bA9+L5iphMUhEEWMrL1mMnQQ8R9y2EBbgoNP/0lg bO87YdDInFXW7vrisxmO450E6fXTPjhPW8A6HVoAp1UQFlQJwsX3dcpU2aGfsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLaSi30cFbt6aY8Y8JUCmOVAlelGNPht93RJ2Mw+LeQ=; b=KVU9nHC7Ljux5hTo+hB5nuoOEBB2C7JtzeOhtdOt79Fb8qs5oAI/21z2Ta+p0ctO1TeX9/ cCU6+PWaymT4ngV4MqUD80UR9nw40q7rLjf6p5u49OtJnvUsU9lRyJ5DWGzDlun6UXxdT6 wgdbkX49t29NLFEzVF9DGM0TGUCPH1IXcGI4Vag+fQKuzub3mGJ23/mxJ5hN4WZXgJy5TI ulf8fddKlH3S0i/2RwXFlgm4hStM9Vxw6eH1ewVJWuvrdlFamKhmh2qXt038DBkNEaaMbx h4pgTYvtH+wVxdUQD5EacDRqsSLmeJP1GE3OBnPlgNPOQvaj9q4zuD5a42k6tQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8sz92pMvz1L99; Thu, 27 Jun 2024 09:02: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 45R92jvv027499; Thu, 27 Jun 2024 09:02:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R92jYO027496; Thu, 27 Jun 2024 09:02:45 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:02:45 GMT Message-Id: <202406270902.45R92jYO027496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: e91fd8934231 - stable/14 - systat: fix build with newer ncurses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: e91fd89342310ec5f3af4206ee649d7b2e7de9f2 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=e91fd89342310ec5f3af4206ee649d7b2e7de9f2 commit e91fd89342310ec5f3af4206ee649d7b2e7de9f2 Author: Baptiste Daroussin AuthorDate: 2024-06-20 13:10:38 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 09:01:24 +0000 systat: fix build with newer ncurses (cherry picked from commit 35e941ce5520b8ef710bb388bd63460aa0ce63eb) --- usr.bin/systat/netcmds.c | 2 +- usr.bin/systat/sctp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c index 6320dd21562d..b09a14bbf634 100644 --- a/usr.bin/systat/netcmds.c +++ b/usr.bin/systat/netcmds.c @@ -248,7 +248,7 @@ showports(void) if (sp) printw("%s ", sp->s_name); else - printw("%d ", p->port); + printw("%ld ", p->port); } } diff --git a/usr.bin/systat/sctp.c b/usr.bin/systat/sctp.c index 928472dbfdc5..9be137700055 100644 --- a/usr.bin/systat/sctp.c +++ b/usr.bin/systat/sctp.c @@ -277,7 +277,7 @@ showsctp(void) domode(&stats); #define DO(stat, row, col) \ - mvwprintw(wnd, row, col, "%12lu", stats.stat) + mvwprintw(wnd, row, col, "%12u", stats.stat) #define L(row, stat) DO(stat, row, 0) #define R(row, stat) DO(stat, row, 38) L(1, sctps_activeestab); R(1, sctps_outpackets); From nobody Thu Jun 27 09:02:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8szB70F5z5PGgf; Thu, 27 Jun 2024 09:02: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 4W8szB4rZLz4XvY; Thu, 27 Jun 2024 09:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n5wq8XcQzodcODei4lUGf+ZxHkDkRS8zXmgfGx4d3x0=; b=VnrDgLMTs++X6jQ7NKgIml9Bxcb3+DrZK+cGvGbdr0xe1pvpM0goP3NUUCI4W2vZXMVYk2 +O10iIdMIm8urOcFrDprQOgUxVpC61Zj3TyGjzn8UF+CchmkQk4WF3KA1kd7vKCa9LcB9X 85AWVFDDZn7plyToo/nEyXk2N5wDewKM5KQZhXjEulWUUktG6POE0D1SPKudRKjNKHnylV 4SU325ELE7p6xq/hFbFWKGKsz+AtRIIff4LI2i6GbmKrJMz1+fqC14udgTvg4g19AHVlzc kho1QvoIyMkVLI3Knejrs1Olrq+H463L5vv16YCFncZpFg6bd0p2BNJCCspXDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478966; a=rsa-sha256; cv=none; b=n/acXfS2GvReEdudFcXQt9sS1roLlNAsFXDgYewcxJMsucBEsYXm9COXmp9uMWoeIa4e6P xhSNC2KnawQ8vT/L8znuOypSz93thYizJeICeHzDUXWwbS/pudqjaaxu2ZtVyDe+muj6Vs CVBxIYDiRPYin6hnoxZJk4RCzXMRMDhzjBMI6ofdudyYCTZrLeZv9Hzfyc65cTBqvWGz+b fQuCblM5Z0R1N5O5dP0wZANTwRDTXEHLFT7YGlP7OsitbjSa7jSR4as6o2cBUoPZTxJFXj 0jyVl8kqzYGxdAQDO8Zb8WZbwUEhuPtRGuKp2cn/B2dr8NSw4JoQEAUuEBZq+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=1719478966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n5wq8XcQzodcODei4lUGf+ZxHkDkRS8zXmgfGx4d3x0=; b=tYdA40u+D7yYx1dNx7R65nUZJ+wSnkRkB4hUj4+nA0PtxV+YDI2CybQ3jBQnFp69E5OJZt yKGbUJxuAM6ck3K5WVxevU0BQhg92SRHFDTFjUp9OGVto1qk6Pz7d/LlJ1k6qpKXKBHL9/ oFxCVaq15zqRRMzPjcuWqoXeNtfVS4iyL7XZTWvQ6dc0ALy75mCcj0DXUyM5VbtQOCpWBs oubN/RNVeP4NFMmoIBNTVxRwcH6oAqhet+FXc/0ynWsOmcAnJ0ZxSksrmTcSw4gy5mQdSB 01AeObG9TjVskPNgLmqBOjFYYrdDmiimoeL+ETDxR3khv9DUL7fxg0lPeXM1oA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8szB48mWz1L9B; Thu, 27 Jun 2024 09:02: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 45R92k0G027556; Thu, 27 Jun 2024 09:02:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R92k68027553; Thu, 27 Jun 2024 09:02:46 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:02:46 GMT Message-Id: <202406270902.45R92k68027553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: d3e5871503aa - stable/14 - ee: fix wprintw usage (highlighted by ncurses 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: d3e5871503aab2e6348e78dc1d0ac718f6ee3df2 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d3e5871503aab2e6348e78dc1d0ac718f6ee3df2 commit d3e5871503aab2e6348e78dc1d0ac718f6ee3df2 Author: Baptiste Daroussin AuthorDate: 2024-06-20 13:42:59 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 09:01:25 +0000 ee: fix wprintw usage (highlighted by ncurses 6.5) Reported by: cy (cherry picked from commit 0667538b888c1171932c6cf28b62fc19d393e119) --- contrib/ee/ee.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 072d26519f4c..2f122981dbe7 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -591,11 +591,11 @@ main(int argc, char *argv[]) { wmove(com_win, 0, 0); werase(com_win); - wprintw(com_win, ree_no_file_msg); + wprintw(com_win, "%s", ree_no_file_msg); wrefresh(com_win); edit_abort(0); } - wprintw(com_win, no_file_string); + wprintw(com_win, "%s", no_file_string); wrefresh(com_win); } else @@ -615,7 +615,7 @@ main(int argc, char *argv[]) if (!nohighlight) wstandout(info_win); wmove(info_win, 5, 0); - wprintw(info_win, separator); + wprintw(info_win, "%s", separator); wmove(info_win, 5, 5); wprintw(info_win, "line %d col %d lines from top %d ", curr_line->line_number, scr_horz, absolute_lin); @@ -1668,7 +1668,7 @@ command_prompt(void) if (result == 0) wprintw(com_win, unkn_cmd_str, cmd_str); else - wprintw(com_win, non_unique_cmd_msg); + wprintw(com_win, "%s", non_unique_cmd_msg); wrefresh(com_win); @@ -1744,7 +1744,7 @@ command(char *cmd_str1) wmove(com_win, 0, 0); wclrtoeol(com_win); if (in_file_name == NULL) - wprintw(com_win, no_file_string); + wprintw(com_win, "%s", no_file_string); else wprintw(com_win, current_file_str, in_file_name); } @@ -2245,7 +2245,7 @@ get_file(char *file_name) { if ((errno == ENOTDIR) || (errno == EACCES) || (errno == EROFS) || (errno == ETXTBSY) || (errno == EFAULT)) { - wprintw(com_win, read_only_msg); + wprintw(com_win, "%s", read_only_msg); ro_flag = TRUE; } } @@ -2282,7 +2282,7 @@ get_file(char *file_name) wclrtoeol(com_win); wprintw(com_win, file_read_lines_msg, in_file_name, curr_line->line_number); if (ro_flag) - wprintw(com_win, read_only_msg); + wprintw(com_win, "%s", read_only_msg); wrefresh(com_win); } else if (can_read) /* not input_file and file is non-zero size */ @@ -2400,7 +2400,7 @@ finish(void) if ((file_name == NULL) || (*file_name == '\0')) { wmove(com_win, 0, 0); - wprintw(com_win, file_not_saved_msg); + wprintw(com_win, "%s", file_not_saved_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; @@ -2577,7 +2577,7 @@ search(int display_message) { wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, searching_msg); + wprintw(com_win, "%s", searching_msg); wrefresh(com_win); clear_com_win = TRUE; } @@ -3378,7 +3378,7 @@ menu_op(struct menu_entries menu_list[]) { wmove(com_win, 0, 0); werase(com_win); - wprintw(com_win, menu_too_lrg_msg); + wprintw(com_win, "%s", menu_too_lrg_msg); wrefresh(com_win); clear_com_win = TRUE; return(0); @@ -3630,10 +3630,10 @@ paint_menu(struct menu_entries menu_list[], int max_width, int max_height, { if (list_size > 1) wprintw(menu_win, "%c) ", item_alpha[min((counter - 1), max_alpha_char)]); - wprintw(menu_win, menu_list[counter].item_string); + wprintw(menu_win, "%s", menu_list[counter].item_string); } else - wprintw(menu_win, more_below_str); + wprintw(menu_win, "%s", more_below_str); } else { @@ -3663,7 +3663,7 @@ help(void) wrefresh(help_win); werase(com_win); wmove(com_win, 0, 0); - wprintw(com_win, press_any_key_msg); + wprintw(com_win, "%s", press_any_key_msg); wrefresh(com_win); counter = wgetch(com_win); if (counter == -1) @@ -3790,7 +3790,7 @@ file_op(int arg) if ((string == NULL) || (*string == '\0')) { wmove(com_win, 0, 0); - wprintw(com_win, file_not_saved_msg); + wprintw(com_win, "%s", file_not_saved_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; @@ -3925,7 +3925,7 @@ Format(void) wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -3971,7 +3971,7 @@ Format(void) wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -4046,7 +4046,7 @@ Format(void) wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -4270,7 +4270,7 @@ dump_ee_conf(void) if (option == 0) { - wprintw(com_win, conf_not_saved_msg); + wprintw(com_win, "%s", conf_not_saved_msg); wrefresh(com_win); return; } @@ -4293,7 +4293,7 @@ dump_ee_conf(void) init_file = fopen(file_name, "w"); if (init_file == NULL) { - wprintw(com_win, conf_dump_err_msg); + wprintw(com_win, "%s", conf_dump_err_msg); wrefresh(com_win); return; } @@ -4412,7 +4412,7 @@ spell_op(void) command(shell_echo_msg); adv_line(); wmove(com_win, 0, 0); - wprintw(com_win, spell_in_prog_msg); + wprintw(com_win, "%s", spell_in_prog_msg); wrefresh(com_win); command("<>!spell"); /* send contents of buffer to command 'spell' and read the results back into the editor */ @@ -5000,7 +5000,7 @@ restrict_mode(void) return(FALSE); wmove(com_win, 0, 0); - wprintw(com_win, restricted_msg); + wprintw(com_win, "%s", restricted_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; From nobody Thu Jun 27 09:03:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8szk4zZyz5PGk7; Thu, 27 Jun 2024 09:03: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 4W8szk2vtzz4YMq; Thu, 27 Jun 2024 09:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PldrCIifdzkLmINhLFu/Gjf6lVEKf3J9rW8adcgd2nY=; b=AV5QFITmifXlWdHL8cmc1smGzn1J4raLwjGMT4CPhEi7k8Vzs3BE+8T3EJAP/+xfHVQwu9 RBzG6Kdy/nR0N6eDKmqcb4xx72rABVnjdUjIIJ9ZlZtP/DU+XUSl1XutJkNCJLaHks0ep3 USlaxwWXNvAFeDrERE7FKIiwK2PbGT25Z05/gtotQcIw433GlMUCbJ/RPi5wpgG/Qx8TRM TpgoK0Sfx+U0S4rzRcOh8jQ1IgXuUed4WcmHsnpu7r4ZJWovNo2/QwMVFbOGnfZKn+bgJV NrxKu3T3PZppb9BaUTD7YjEzntYidv9KIgkXQWx/5T4Zr7NLz+oa33+5zTa5aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478994; a=rsa-sha256; cv=none; b=NBwyyBWthlvm28ox8gNifzdvGkMOBO9GWADeJqmKOwXS8vNeYAFXIEnAx8owc3anaNW3Ax ZXa99k6Pt1K5Tpqg1Uu2qwwbUiEBbCPhC0wPSWyW88O3mAEnY2THj+nzhpa2JaLUo5f+wB 9Pb7MyJtZwqOqv1j8nMTm4/LCTOg6DBmmj0ljLPnz47KB7JqJAq5F/90PlJvRnzu0/rXTq rmlrGogUuu67G4g3qb3kbOnaElStuJ571wzZHTPcr+OoDAAar6/tSP5nMmXsQzctjzmy9B lJIp4GmLaF1lDeYsgU7K8+Yv2fw6SINgiTtsxXpUfT/Jr/jt7JhgVNYanw/biw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PldrCIifdzkLmINhLFu/Gjf6lVEKf3J9rW8adcgd2nY=; b=NsEuZjIyLz7I5ZauAHsmaP6dGXhcJ0H33aYdQCZ+uES47FxAsUm8db33Q4qsIjIFUmhI19 EQ3omxGcWaJ6bZTxfWq2iDcrh/KHZuZLVywyrpBHk1mKtwfYXWjMB8+tFr4LiyFJLgMQhn LFX7myQuafAkrMFLGYZgavzbEVFb0j7f7dTGxhH08VcrCXiUhfQd1HE0AEyOe4UdGROHRM sSe492faaltpsWwBQqPTHNQ1NWfE6GflNQIW5WhkROanMYoTvcgK1COBtf49LdASPiOXHx MIC1AH/c4NhQibsDt0dSP/GLg4mhwEBjvYMFq2+t3qPbNHY+wACU89s913nwCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8szk2WFMz1L9C; Thu, 27 Jun 2024 09:03: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 45R93EDD027761; Thu, 27 Jun 2024 09:03:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R93EBV027758; Thu, 27 Jun 2024 09:03:14 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:03:14 GMT Message-Id: <202406270903.45R93EBV027758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 53b41929560d - stable/13 - systat: fix build with newer ncurses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 53b41929560d9853a7d2b38b4ab205c091869a17 Auto-Submitted: auto-generated The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=53b41929560d9853a7d2b38b4ab205c091869a17 commit 53b41929560d9853a7d2b38b4ab205c091869a17 Author: Baptiste Daroussin AuthorDate: 2024-06-20 13:10:38 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 09:01:57 +0000 systat: fix build with newer ncurses (cherry picked from commit 35e941ce5520b8ef710bb388bd63460aa0ce63eb) --- usr.bin/systat/netcmds.c | 2 +- usr.bin/systat/sctp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c index 6320dd21562d..b09a14bbf634 100644 --- a/usr.bin/systat/netcmds.c +++ b/usr.bin/systat/netcmds.c @@ -248,7 +248,7 @@ showports(void) if (sp) printw("%s ", sp->s_name); else - printw("%d ", p->port); + printw("%ld ", p->port); } } diff --git a/usr.bin/systat/sctp.c b/usr.bin/systat/sctp.c index 928472dbfdc5..9be137700055 100644 --- a/usr.bin/systat/sctp.c +++ b/usr.bin/systat/sctp.c @@ -277,7 +277,7 @@ showsctp(void) domode(&stats); #define DO(stat, row, col) \ - mvwprintw(wnd, row, col, "%12lu", stats.stat) + mvwprintw(wnd, row, col, "%12u", stats.stat) #define L(row, stat) DO(stat, row, 0) #define R(row, stat) DO(stat, row, 38) L(1, sctps_activeestab); R(1, sctps_outpackets); From nobody Thu Jun 27 09:03:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8szl4s0Lz5PGf3; Thu, 27 Jun 2024 09:03: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 4W8szl3xLQz4YPk; Thu, 27 Jun 2024 09:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5Phl9vaF80NcQ8UgiIITMiWugkOfFgMn7GQ/EIQ93g=; b=yadDTXWdSMcjud9HITU0E69HN6KwCkHOQVN9rgNU5wqkLVUroWfnZftwlk7Y48wIXSGmrA VPLs2vEfp/AooZp80A8NrgventhlaXGQASSWvE716z4Fjslcz1ys7Ek/cFwgzlm+58reVK SxgBYlJaVLlJoapd4IWzOAwwG7/7RcWYtmVlw5QvsYOVd30dUHj3obb9qAXZuF2gMyJGhr zvG5mH0iXXiWAjwMMbQrKyN+pBvI/RAeyxwUvPh0YPbnsXMQk5npVzfostwSXjHb0I+ntn AGdJnKMaE8181rew6cjtEyp05wObfOsjHgY2S1v82IOHFVScfqdF317WvMUqGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719478995; a=rsa-sha256; cv=none; b=dJ5UXGOYo5yrJ8hOYHDbhb03iQvCrSNLDDDyGwLhMBAFn+PIOrUBBvvaR+kI9nqUB3XHw2 A76OPlyhaev+XfAouIPtDe1RlgNhGZba8LL886tFadT3/uXMP6d+dEn2SnpLROXc3q7trt 9duti0pDVBhZnwT3hLMhyyITIHwuj8ZvIg/BuUdfge2Lnv3NxB7321BTBQkvWZMe6jT0OO kQQNxDJ8IiXsmfLkqstmDOzcOUYvUM00PLEinm+yQmv5MrgT6Vb6r3/pxvr8yIgJtD9ELg WpES6emM+NGFIXMfZUD3rtG28qGuAp49d6qzi/KHvxCAoP0m2YSW/bVqcE/FyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719478995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5Phl9vaF80NcQ8UgiIITMiWugkOfFgMn7GQ/EIQ93g=; b=U3kX6SRp+Wj+70oYMWMzBGBPd+0ZtUmZSrzxDWUKpST1+UIhFw1Raq0vKOe05dPmqvUwet jTRMfWhzQCOnBerGodcow33KvJ3gfb0NriO26CHJGTQyTH+F1OiGkyVdyfwsGupQIFU9Kq UfSsnHvdMTRyBcmVl4HWqWB6h6+wzrjea7FqNrVo0G7eHhLCYsnFRI2NamidL+nAwQ+MlH pAo/AuYFg83/IfzNkzAsc9SrvH+beEv8cVaj7HzSjvGNOK+GJwtiZIWsIdDwdlFlwxf+qt D9IgtkBFwRQd293RvvI1bMdYAiM+5etJgM8/bpH3yUmpP+t0qUS7abGJLL9HGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8szl3XWXz1LgG; Thu, 27 Jun 2024 09:03: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 45R93FSD027825; Thu, 27 Jun 2024 09:03:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R93Fg9027822; Thu, 27 Jun 2024 09:03:15 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:03:15 GMT Message-Id: <202406270903.45R93Fg9027822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 1cac66d0db77 - stable/13 - ee: fix wprintw usage (highlighted by ncurses 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1cac66d0db7737a7f1c394b2f50d058bd2a8c8d9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=1cac66d0db7737a7f1c394b2f50d058bd2a8c8d9 commit 1cac66d0db7737a7f1c394b2f50d058bd2a8c8d9 Author: Baptiste Daroussin AuthorDate: 2024-06-20 13:42:59 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 09:01:57 +0000 ee: fix wprintw usage (highlighted by ncurses 6.5) Reported by: cy (cherry picked from commit 0667538b888c1171932c6cf28b62fc19d393e119) --- contrib/ee/ee.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 70a44076f882..5976152414cb 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -595,11 +595,11 @@ char *argv[]; { wmove(com_win, 0, 0); werase(com_win); - wprintw(com_win, ree_no_file_msg); + wprintw(com_win, "%s", ree_no_file_msg); wrefresh(com_win); edit_abort(0); } - wprintw(com_win, no_file_string); + wprintw(com_win, "%s", no_file_string); wrefresh(com_win); } else @@ -619,7 +619,7 @@ char *argv[]; if (!nohighlight) wstandout(info_win); wmove(info_win, 5, 0); - wprintw(info_win, separator); + wprintw(info_win, "%s", separator); wmove(info_win, 5, 5); wprintw(info_win, "line %d col %d lines from top %d ", curr_line->line_number, scr_horz, absolute_lin); @@ -1666,7 +1666,7 @@ command_prompt() if (result == 0) wprintw(com_win, unkn_cmd_str, cmd_str); else - wprintw(com_win, non_unique_cmd_msg); + wprintw(com_win, "%s", non_unique_cmd_msg); wrefresh(com_win); @@ -1742,7 +1742,7 @@ char *cmd_str1; wmove(com_win, 0, 0); wclrtoeol(com_win); if (in_file_name == NULL) - wprintw(com_win, no_file_string); + wprintw(com_win, "%s", no_file_string); else wprintw(com_win, current_file_str, in_file_name); } @@ -2253,7 +2253,7 @@ char *file_name; { if ((errno == ENOTDIR) || (errno == EACCES) || (errno == EROFS) || (errno == ETXTBSY) || (errno == EFAULT)) { - wprintw(com_win, read_only_msg); + wprintw(com_win, "%s", read_only_msg); ro_flag = TRUE; } } @@ -2290,7 +2290,7 @@ char *file_name; wclrtoeol(com_win); wprintw(com_win, file_read_lines_msg, in_file_name, curr_line->line_number); if (ro_flag) - wprintw(com_win, read_only_msg); + wprintw(com_win, "%s", read_only_msg); wrefresh(com_win); } else if (can_read) /* not input_file and file is non-zero size */ @@ -2409,7 +2409,7 @@ finish() /* prepare to exit edit session */ if ((file_name == NULL) || (*file_name == '\0')) { wmove(com_win, 0, 0); - wprintw(com_win, file_not_saved_msg); + wprintw(com_win, "%s", file_not_saved_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; @@ -2589,7 +2589,7 @@ int display_message; { wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, searching_msg); + wprintw(com_win, "%s", searching_msg); wrefresh(com_win); clear_com_win = TRUE; } @@ -3381,7 +3381,7 @@ struct menu_entries menu_list[]; { wmove(com_win, 0, 0); werase(com_win); - wprintw(com_win, menu_too_lrg_msg); + wprintw(com_win, "%s", menu_too_lrg_msg); wrefresh(com_win); clear_com_win = TRUE; return(0); @@ -3637,10 +3637,10 @@ int off_start, vert_size; { if (list_size > 1) wprintw(menu_win, "%c) ", item_alpha[min((counter - 1), max_alpha_char)]); - wprintw(menu_win, menu_list[counter].item_string); + wprintw(menu_win, "%s", menu_list[counter].item_string); } else - wprintw(menu_win, more_below_str); + wprintw(menu_win, "%s", more_below_str); } else { @@ -3670,7 +3670,7 @@ help() wrefresh(help_win); werase(com_win); wmove(com_win, 0, 0); - wprintw(com_win, press_any_key_msg); + wprintw(com_win, "%s", press_any_key_msg); wrefresh(com_win); counter = wgetch(com_win); if (counter == -1) @@ -3798,7 +3798,7 @@ int arg; if ((string == NULL) || (*string == '\0')) { wmove(com_win, 0, 0); - wprintw(com_win, file_not_saved_msg); + wprintw(com_win, "%s", file_not_saved_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; @@ -3932,7 +3932,7 @@ Format() /* format the paragraph according to set margins */ wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -3978,7 +3978,7 @@ Format() /* format the paragraph according to set margins */ wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -4053,7 +4053,7 @@ Format() /* format the paragraph according to set margins */ wmove(com_win, 0, 0); wclrtoeol(com_win); - wprintw(com_win, formatting_msg); + wprintw(com_win, "%s", formatting_msg); wrefresh(com_win); /* @@ -4276,7 +4276,7 @@ dump_ee_conf() if (option == 0) { - wprintw(com_win, conf_not_saved_msg); + wprintw(com_win, "%s", conf_not_saved_msg); wrefresh(com_win); return; } @@ -4299,7 +4299,7 @@ dump_ee_conf() init_file = fopen(file_name, "w"); if (init_file == NULL) { - wprintw(com_win, conf_dump_err_msg); + wprintw(com_win, "%s", conf_dump_err_msg); wrefresh(com_win); return; } @@ -4417,7 +4417,7 @@ spell_op() /* check spelling of words in the editor */ command(shell_echo_msg); adv_line(); wmove(com_win, 0, 0); - wprintw(com_win, spell_in_prog_msg); + wprintw(com_win, "%s", spell_in_prog_msg); wrefresh(com_win); command("<>!spell"); /* send contents of buffer to command 'spell' and read the results back into the editor */ @@ -5007,7 +5007,7 @@ restrict_mode() return(FALSE); wmove(com_win, 0, 0); - wprintw(com_win, restricted_msg); + wprintw(com_win, "%s", restricted_msg); wclrtoeol(com_win); wrefresh(com_win); clear_com_win = TRUE; From nobody Thu Jun 27 09:08:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8t5g5qBZz5PHBs; Thu, 27 Jun 2024 09:08: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 4W8t5g5V9gz4Z08; Thu, 27 Jun 2024 09:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719479303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0BQwDq/bO0OlsWnw+xv0s0nZxLfLy7Bo6PR3Zv7YhAY=; b=m4u/iBR2mqJodVs7hpipx3ZVEw7ARItJ/9MZIK1yspRz4wWAc8ox6MFVs5jiHQVovC0Z/+ GxQI6MXba+yUlMh9hxyEg+tISzdCME77jROcOS4swEQEA82crma5h1uBVdWA53pG5ZzUOO Lvf2CuN61qA9TuxN7hCnfrPWfcgFa5qpaG1qu47iV+tKH07O513wzrhv6+1JwAXdHJPTRB br0Tg535EXulC8KL7Pui135Rq5uws4c94oxXXSce9qKH4dvDlbajbOtBUWtsEgT3+8TM7R YhYIjzu32kzm9Kzrm/4woQ52CZ+YT2neV1tWI2mUv2XISGWBIbKG0tu3p7+l9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719479303; a=rsa-sha256; cv=none; b=T8mFI94ynLJoVXGVxVTJGyQ8AGruFxVQBYAXXCIw0TvYXtI/6QrDvXSmn9cprpdH3uH+ma xAAPMemDVrGXJA05EtcP1tPhSWAAKvBzjC+2ZkmXK0ITCL9C3NcwODNZrDOZAo1zSp6YZ8 g7E4/Ofdh0pGouo4+ADrZT0wzTLpRJYSxNUh6LcoBuAyJP6KzpGsGMSJeuAvs/hZ3p76RK cONKyfOForE/AKseR2B3KrS1qw3aUKxTtT9POXGeFld2q5H1tCRTg8nOA9rXzuFkbKt7EG 5j0Ped7clzQE77kXqiQi1S3qBM/hUEbJMBR7+VFFHjcBgbQMFE5qCq/+7mcVeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719479303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0BQwDq/bO0OlsWnw+xv0s0nZxLfLy7Bo6PR3Zv7YhAY=; b=nvVWjJcQ74dT3B8rRfAdNdbh0IiWnPkXE8+weTFmcCCoMZrUNNEblAiE+MHbmmJDOaGsx6 dCXINunvxwkoqLimLj6bHRepb6gbwr3BWVD8CNcO5wrkyw1DbDf20Rkk7RBe+tWzuOv6BN TaxwsywXDGxhH59iUcop4J2f+QAW6C3TtEd1TGqygMNOj9J20nVr6FkAa9b2vDwMnYwFft oKGKSk3GyOyUmQzxxJFXo0nClk7ZzG0S8wimdlIUp0DmdKuvdBc3660AxFu8KVJmR26mWK MsYbBzm6wMM6WCndmbBnf4K0lqBKe05tIs2zfaE0RqMPRzTDLlU/+KQSqyD53Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8t5g4w22z1LLn; Thu, 27 Jun 2024 09:08: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 45R98NcP028698; Thu, 27 Jun 2024 09:08:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R98MUU028688; Thu, 27 Jun 2024 09:08:22 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:08:22 GMT Message-Id: <202406270908.45R98MUU028688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 30ef78b46b62 - stable/14 - ncurses: vendor import version 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 30ef78b46b622279c93776140b9cf060817da410 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=30ef78b46b622279c93776140b9cf060817da410 commit 30ef78b46b622279c93776140b9cf060817da410 Author: Baptiste Daroussin AuthorDate: 2024-06-20 11:15:14 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 09:06:04 +0000 ncurses: vendor import version 6.5 (cherry picked from commit 21817992b3314c908ab50f0bb88d2ee750b9c4ac) --- contrib/ncurses/ANNOUNCE | 909 +- contrib/ncurses/AUTHORS | 6 +- contrib/ncurses/COPYING | 4 +- contrib/ncurses/INSTALL | 316 +- contrib/ncurses/MANIFEST | 15 +- contrib/ncurses/Makefile.in | 25 +- contrib/ncurses/Makefile.os2 | 6 +- contrib/ncurses/NEWS | 1177 ++- contrib/ncurses/README | 41 +- contrib/ncurses/README.emx | 8 +- contrib/ncurses/VERSION | 2 +- contrib/ncurses/aclocal.m4 | 1687 +++- contrib/ncurses/announce.html.in | 1609 ++- contrib/ncurses/config.guess | 1263 ++- contrib/ncurses/config.sub | 828 +- contrib/ncurses/configure | 8956 +++++++++------- contrib/ncurses/configure.in | 310 +- contrib/ncurses/dist.mk | 25 +- contrib/ncurses/doc/hackguide.doc | 48 +- .../doc/html/NCURSES-Programming-HOWTO.html | 7415 -------------- contrib/ncurses/doc/html/announce.html | 2220 ---- contrib/ncurses/doc/html/hackguide.html | 969 -- contrib/ncurses/doc/html/ncurses-intro.html | 3446 ------- contrib/ncurses/doc/ncurses-intro.doc | 182 +- contrib/ncurses/form/Makefile.in | 15 +- contrib/ncurses/form/READ.ME | 8 +- contrib/ncurses/form/fld_def.c | 10 +- contrib/ncurses/form/fld_ftchoice.c | 6 +- contrib/ncurses/form/fld_ftlink.c | 10 +- contrib/ncurses/form/fld_info.c | 12 +- contrib/ncurses/form/fld_just.c | 12 +- contrib/ncurses/form/fld_link.c | 12 +- contrib/ncurses/form/fld_max.c | 8 +- contrib/ncurses/form/fld_move.c | 8 +- contrib/ncurses/form/fld_opts.c | 24 +- contrib/ncurses/form/fld_pad.c | 12 +- contrib/ncurses/form/fld_page.c | 14 +- contrib/ncurses/form/fld_stat.c | 14 +- contrib/ncurses/form/fld_type.c | 12 +- contrib/ncurses/form/fld_user.c | 12 +- contrib/ncurses/form/form.h | 6 +- contrib/ncurses/form/form.priv.h | 18 +- contrib/ncurses/form/frm_cursor.c | 8 +- contrib/ncurses/form/frm_data.c | 23 +- contrib/ncurses/form/frm_def.c | 8 +- contrib/ncurses/form/frm_driver.c | 51 +- contrib/ncurses/form/frm_opts.c | 28 +- contrib/ncurses/form/frm_page.c | 12 +- contrib/ncurses/form/frm_req_name.c | 15 +- contrib/ncurses/form/frm_scale.c | 8 +- contrib/ncurses/form/frm_sub.c | 14 +- contrib/ncurses/form/frm_user.c | 12 +- contrib/ncurses/form/frm_win.c | 14 +- contrib/ncurses/form/fty_enum.c | 46 +- contrib/ncurses/form/fty_generic.c | 6 +- contrib/ncurses/form/fty_int.c | 44 +- contrib/ncurses/form/fty_ipv4.c | 16 +- contrib/ncurses/form/fty_num.c | 20 +- contrib/ncurses/form/fty_regex.c | 35 +- contrib/ncurses/form/llib-lform | 192 +- contrib/ncurses/form/llib-lformt | 192 +- contrib/ncurses/form/llib-lformtw | 198 +- contrib/ncurses/form/llib-lformw | 198 +- contrib/ncurses/include/Caps | 303 +- contrib/ncurses/include/Caps-ncurses | 21 +- contrib/ncurses/include/Caps.aix4 | 297 +- contrib/ncurses/include/Caps.hpux11 | 301 +- contrib/ncurses/include/Caps.keys | 298 +- contrib/ncurses/include/Caps.osf1r5 | 222 +- contrib/ncurses/include/Caps.uwin | 225 +- contrib/ncurses/include/MKkey_defs.sh | 15 +- contrib/ncurses/include/MKncurses_def.sh | 6 +- contrib/ncurses/include/MKterm.h.awk.in | 39 +- contrib/ncurses/include/Makefile.in | 19 +- contrib/ncurses/include/capdefaults.c | 6 +- contrib/ncurses/include/curses.events | 4 +- contrib/ncurses/include/curses.h.in | 116 +- contrib/ncurses/include/curses.tail | 16 +- contrib/ncurses/include/curses.wide | 6 +- contrib/ncurses/include/edit_cfg.sh | 19 +- contrib/ncurses/include/headers | 8 +- contrib/ncurses/include/nc_access.h | 80 + contrib/ncurses/include/nc_alloc.h | 17 +- contrib/ncurses/include/nc_mingw.h | 13 +- contrib/ncurses/include/nc_string.h | 8 +- contrib/ncurses/include/nc_tparm.h | 5 +- contrib/ncurses/include/nc_win32.h | 8 +- contrib/ncurses/include/ncurses_defs | 30 +- contrib/ncurses/include/ncurses_dll.h.in | 10 +- contrib/ncurses/include/ncurses_mingw.h | 14 +- contrib/ncurses/include/term_entry.h | 29 +- contrib/ncurses/include/termcap.h.in | 10 +- contrib/ncurses/include/tic.h | 47 +- contrib/ncurses/include/win32_curses.h | 6 +- contrib/ncurses/install-sh | 671 +- contrib/ncurses/man/MKada_config.in | 139 +- contrib/ncurses/man/MKncu_config.in | 111 +- contrib/ncurses/man/MKterminfo.sh | 18 +- contrib/ncurses/man/Makefile.in | 23 +- contrib/ncurses/man/captoinfo.1m | 274 +- contrib/ncurses/man/clear.1 | 223 +- contrib/ncurses/man/curs_add_wch.3x | 403 +- contrib/ncurses/man/curs_add_wchstr.3x | 115 +- contrib/ncurses/man/curs_addch.3x | 579 +- contrib/ncurses/man/curs_addchstr.3x | 114 +- contrib/ncurses/man/curs_addstr.3x | 156 +- contrib/ncurses/man/curs_addwstr.3x | 157 +- contrib/ncurses/man/curs_attr.3x | 667 +- contrib/ncurses/man/curs_beep.3x | 38 +- contrib/ncurses/man/curs_bkgd.3x | 267 +- contrib/ncurses/man/curs_bkgrnd.3x | 237 +- contrib/ncurses/man/curs_border.3x | 177 +- contrib/ncurses/man/curs_border_set.3x | 256 +- contrib/ncurses/man/curs_clear.3x | 123 +- contrib/ncurses/man/curs_color.3x | 561 +- contrib/ncurses/man/curs_delch.3x | 117 +- contrib/ncurses/man/curs_deleteln.3x | 93 +- contrib/ncurses/man/curs_extend.3x | 85 +- contrib/ncurses/man/curs_get_wch.3x | 346 +- contrib/ncurses/man/curs_get_wstr.3x | 273 +- contrib/ncurses/man/curs_getcchar.3x | 118 +- contrib/ncurses/man/curs_getch.3x | 981 +- contrib/ncurses/man/curs_getstr.3x | 282 +- contrib/ncurses/man/curs_getyx.3x | 108 +- contrib/ncurses/man/curs_in_wch.3x | 73 +- contrib/ncurses/man/curs_in_wchstr.3x | 162 +- contrib/ncurses/man/curs_inch.3x | 97 +- contrib/ncurses/man/curs_inchstr.3x | 137 +- contrib/ncurses/man/curs_initscr.3x | 283 +- contrib/ncurses/man/curs_inopts.3x | 724 +- contrib/ncurses/man/curs_ins_wch.3x | 119 +- contrib/ncurses/man/curs_ins_wstr.3x | 151 +- contrib/ncurses/man/curs_insch.3x | 122 +- contrib/ncurses/man/curs_insstr.3x | 139 +- contrib/ncurses/man/curs_instr.3x | 129 +- contrib/ncurses/man/curs_inwstr.3x | 155 +- contrib/ncurses/man/curs_kernel.3x | 278 +- contrib/ncurses/man/curs_legacy.3x | 132 +- contrib/ncurses/man/curs_memleaks.3x | 113 +- contrib/ncurses/man/curs_mouse.3x | 631 +- contrib/ncurses/man/curs_move.3x | 82 +- contrib/ncurses/man/curs_opaque.3x | 242 +- contrib/ncurses/man/curs_outopts.3x | 216 +- contrib/ncurses/man/curs_overlay.3x | 92 +- contrib/ncurses/man/curs_pad.3x | 302 +- contrib/ncurses/man/curs_print.3x | 55 +- contrib/ncurses/man/curs_printw.3x | 263 +- contrib/ncurses/man/curs_refresh.3x | 148 +- contrib/ncurses/man/curs_scanw.3x | 322 +- contrib/ncurses/man/curs_scr_dump.3x | 171 +- contrib/ncurses/man/curs_scroll.3x | 156 +- contrib/ncurses/man/curs_slk.3x | 445 +- contrib/ncurses/man/curs_sp_funcs.3x | 496 +- contrib/ncurses/man/curs_termattrs.3x | 146 +- contrib/ncurses/man/curs_termcap.3x | 701 +- contrib/ncurses/man/curs_terminfo.3x | 1455 ++- contrib/ncurses/man/curs_threads.3x | 1117 +- contrib/ncurses/man/curs_touch.3x | 109 +- contrib/ncurses/man/curs_trace.3x | 211 +- contrib/ncurses/man/curs_util.3x | 382 +- contrib/ncurses/man/curs_variables.3x | 403 +- contrib/ncurses/man/curs_window.3x | 252 +- contrib/ncurses/man/default_colors.3x | 59 +- contrib/ncurses/man/define_key.3x | 41 +- contrib/ncurses/man/form.3x | 238 +- contrib/ncurses/man/form_cursor.3x | 33 +- contrib/ncurses/man/form_data.3x | 33 +- contrib/ncurses/man/form_driver.3x | 122 +- contrib/ncurses/man/form_field.3x | 57 +- contrib/ncurses/man/form_field_attributes.3x | 81 +- contrib/ncurses/man/form_field_buffer.3x | 79 +- contrib/ncurses/man/form_field_info.3x | 59 +- contrib/ncurses/man/form_field_just.3x | 57 +- contrib/ncurses/man/form_field_new.3x | 62 +- contrib/ncurses/man/form_field_opts.3x | 52 +- contrib/ncurses/man/form_field_userptr.3x | 35 +- contrib/ncurses/man/form_field_validation.3x | 179 +- contrib/ncurses/man/form_fieldtype.3x | 93 +- contrib/ncurses/man/form_hook.3x | 90 +- contrib/ncurses/man/form_new.3x | 42 +- contrib/ncurses/man/form_new_page.3x | 55 +- contrib/ncurses/man/form_opts.3x | 53 +- contrib/ncurses/man/form_page.3x | 71 +- contrib/ncurses/man/form_post.3x | 43 +- contrib/ncurses/man/form_requestname.3x | 44 +- contrib/ncurses/man/form_userptr.3x | 34 +- contrib/ncurses/man/form_variables.3x | 44 +- contrib/ncurses/man/form_win.3x | 60 +- contrib/ncurses/man/infocmp.1m | 611 +- contrib/ncurses/man/infotocap.1m | 104 +- contrib/ncurses/man/key_defined.3x | 31 +- contrib/ncurses/man/keybound.3x | 38 +- contrib/ncurses/man/keyok.3x | 33 +- contrib/ncurses/man/legacy_coding.3x | 90 +- contrib/ncurses/man/make_sed.sh | 43 +- .../man/{man_db.renames => man_db.renames.in} | 143 +- contrib/ncurses/man/manhtml.aliases | 68 +- contrib/ncurses/man/manhtml.externs | 28 +- contrib/ncurses/man/manlinks.sed | 40 +- contrib/ncurses/man/menu.3x | 210 +- contrib/ncurses/man/menu_attributes.3x | 108 +- contrib/ncurses/man/menu_cursor.3x | 33 +- contrib/ncurses/man/menu_driver.3x | 57 +- contrib/ncurses/man/menu_format.3x | 44 +- contrib/ncurses/man/menu_hook.3x | 79 +- contrib/ncurses/man/menu_items.3x | 58 +- contrib/ncurses/man/menu_mark.3x | 46 +- contrib/ncurses/man/menu_new.3x | 42 +- contrib/ncurses/man/menu_opts.3x | 49 +- contrib/ncurses/man/menu_pattern.3x | 45 +- contrib/ncurses/man/menu_post.3x | 46 +- contrib/ncurses/man/menu_requestname.3x | 42 +- contrib/ncurses/man/menu_spacing.3x | 78 +- contrib/ncurses/man/menu_userptr.3x | 32 +- contrib/ncurses/man/menu_win.3x | 60 +- contrib/ncurses/man/mitem_current.3x | 65 +- contrib/ncurses/man/mitem_name.3x | 38 +- contrib/ncurses/man/mitem_new.3x | 42 +- contrib/ncurses/man/mitem_opts.3x | 51 +- contrib/ncurses/man/mitem_userptr.3x | 33 +- contrib/ncurses/man/mitem_value.3x | 43 +- contrib/ncurses/man/mitem_visible.3x | 27 +- contrib/ncurses/man/ncurses.3x | 3402 ++++--- contrib/ncurses/man/new_pair.3x | 104 +- contrib/ncurses/man/panel.3x | 349 +- contrib/ncurses/man/resizeterm.3x | 165 +- contrib/ncurses/man/scr_dump.5 | 427 +- contrib/ncurses/man/tabs.1 | 323 +- contrib/ncurses/man/term.5 | 247 +- contrib/ncurses/man/term.7 | 122 +- contrib/ncurses/man/term_variables.3x | 145 +- contrib/ncurses/man/terminfo.head | 132 +- contrib/ncurses/man/terminfo.tail | 1188 ++- contrib/ncurses/man/tic.1m | 541 +- contrib/ncurses/man/toe.1m | 324 +- contrib/ncurses/man/tput.1 | 1345 ++- contrib/ncurses/man/tset.1 | 463 +- contrib/ncurses/man/user_caps.5 | 231 +- contrib/ncurses/man/wresize.3x | 56 +- contrib/ncurses/menu/Makefile.in | 17 +- contrib/ncurses/menu/READ.ME | 6 +- contrib/ncurses/menu/llib-lmenu | 98 +- contrib/ncurses/menu/llib-lmenut | 98 +- contrib/ncurses/menu/llib-lmenutw | 98 +- contrib/ncurses/menu/llib-lmenuw | 98 +- contrib/ncurses/menu/m_attribs.c | 38 +- contrib/ncurses/menu/m_cursor.c | 10 +- contrib/ncurses/menu/m_driver.c | 18 +- contrib/ncurses/menu/m_format.c | 7 +- contrib/ncurses/menu/m_global.c | 48 +- contrib/ncurses/menu/m_hook.c | 44 +- contrib/ncurses/menu/m_item_cur.c | 16 +- contrib/ncurses/menu/m_item_nam.c | 12 +- contrib/ncurses/menu/m_item_new.c | 34 +- contrib/ncurses/menu/m_item_opt.c | 28 +- contrib/ncurses/menu/m_item_top.c | 16 +- contrib/ncurses/menu/m_item_val.c | 18 +- contrib/ncurses/menu/m_item_vis.c | 8 +- contrib/ncurses/menu/m_items.c | 18 +- contrib/ncurses/menu/m_new.c | 18 +- contrib/ncurses/menu/m_pad.c | 14 +- contrib/ncurses/menu/m_pattern.c | 12 +- contrib/ncurses/menu/m_post.c | 64 +- contrib/ncurses/menu/m_req_name.c | 15 +- contrib/ncurses/menu/m_scale.c | 10 +- contrib/ncurses/menu/m_sub.c | 12 +- contrib/ncurses/menu/m_win.c | 12 +- contrib/ncurses/misc/Makefile.in | 32 +- contrib/ncurses/misc/csort | 6 +- contrib/ncurses/misc/gen-pkgconfig.in | 24 +- contrib/ncurses/misc/gen_edit.sh | 12 +- contrib/ncurses/misc/magic | 6 +- contrib/ncurses/misc/makedef.cmd | 8 +- contrib/ncurses/misc/makellib | 40 +- contrib/ncurses/misc/ncu2openbsd | 1288 +++ contrib/ncurses/misc/ncurses-config.in | 32 +- contrib/ncurses/misc/run_tic.in | 43 +- contrib/ncurses/misc/shlib | 8 +- contrib/ncurses/misc/tdlint | 24 +- contrib/ncurses/misc/terminfo.src | 10094 ++++++++++--------- contrib/ncurses/mk-0th.awk | 12 +- contrib/ncurses/mk-1st.awk | 100 +- contrib/ncurses/mk-2nd.awk | 6 +- contrib/ncurses/mk-hdr.awk | 8 +- contrib/ncurses/ncurses/Makefile.in | 50 +- contrib/ncurses/ncurses/README.IZ | 6 +- contrib/ncurses/ncurses/base/MKlib_gen.sh | 23 +- contrib/ncurses/ncurses/base/MKunctrl.awk | 7 +- contrib/ncurses/ncurses/base/key_defined.c | 7 +- contrib/ncurses/ncurses/base/keyok.c | 6 +- contrib/ncurses/ncurses/base/lib_addch.c | 35 +- contrib/ncurses/ncurses/base/lib_addstr.c | 32 +- contrib/ncurses/ncurses/base/lib_bkgd.c | 4 +- contrib/ncurses/ncurses/base/lib_clreol.c | 8 +- contrib/ncurses/ncurses/base/lib_color.c | 82 +- contrib/ncurses/ncurses/base/lib_delwin.c | 38 +- contrib/ncurses/ncurses/base/lib_dft_fgbg.c | 8 +- contrib/ncurses/ncurses/base/lib_echo.c | 8 +- contrib/ncurses/ncurses/base/lib_endwin.c | 28 +- contrib/ncurses/ncurses/base/lib_erase.c | 6 +- contrib/ncurses/ncurses/base/lib_freeall.c | 11 +- contrib/ncurses/ncurses/base/lib_getch.c | 63 +- contrib/ncurses/ncurses/base/lib_getstr.c | 35 +- contrib/ncurses/ncurses/base/lib_insnstr.c | 9 +- contrib/ncurses/ncurses/base/lib_instr.c | 8 +- contrib/ncurses/ncurses/base/lib_mouse.c | 153 +- contrib/ncurses/ncurses/base/lib_mvwin.c | 8 +- contrib/ncurses/ncurses/base/lib_newterm.c | 7 +- contrib/ncurses/ncurses/base/lib_newwin.c | 8 +- contrib/ncurses/ncurses/base/lib_nl.c | 8 +- contrib/ncurses/ncurses/base/lib_overlay.c | 16 +- contrib/ncurses/ncurses/base/lib_pad.c | 12 +- contrib/ncurses/ncurses/base/lib_refresh.c | 24 +- contrib/ncurses/ncurses/base/lib_restart.c | 17 +- contrib/ncurses/ncurses/base/lib_screen.c | 61 +- contrib/ncurses/ncurses/base/lib_set_term.c | 51 +- contrib/ncurses/ncurses/base/lib_slk.c | 8 +- contrib/ncurses/ncurses/base/lib_slkinit.c | 7 +- contrib/ncurses/ncurses/base/lib_slkrefr.c | 6 +- contrib/ncurses/ncurses/base/lib_wattron.c | 8 +- contrib/ncurses/ncurses/base/lib_window.c | 10 +- contrib/ncurses/ncurses/base/new_pair.c | 6 +- contrib/ncurses/ncurses/base/resizeterm.c | 14 +- contrib/ncurses/ncurses/base/safe_sprintf.c | 36 +- contrib/ncurses/ncurses/base/tries.c | 7 +- contrib/ncurses/ncurses/base/vsscanf.c | 11 +- contrib/ncurses/ncurses/base/wresize.c | 10 +- contrib/ncurses/ncurses/curses.priv.h | 508 +- contrib/ncurses/ncurses/llib-lncurses | 1420 +-- contrib/ncurses/ncurses/llib-lncursest | 1422 +-- contrib/ncurses/ncurses/llib-lncursestw | 1888 ++-- contrib/ncurses/ncurses/llib-lncursesw | 1886 ++-- contrib/ncurses/ncurses/llib-ltic | 54 +- contrib/ncurses/ncurses/llib-ltict | 54 +- contrib/ncurses/ncurses/llib-ltictw | 52 +- contrib/ncurses/ncurses/llib-lticw | 52 +- contrib/ncurses/ncurses/llib-ltinfo | 372 +- contrib/ncurses/ncurses/llib-ltinfot | 374 +- contrib/ncurses/ncurses/llib-ltinfotw | 370 +- contrib/ncurses/ncurses/llib-ltinfow | 368 +- contrib/ncurses/ncurses/new_pair.h | 13 +- contrib/ncurses/ncurses/report_offsets.c | 59 +- contrib/ncurses/ncurses/term.priv.h | 364 + contrib/ncurses/ncurses/tinfo/MKcaptab.sh | 5 +- contrib/ncurses/ncurses/tinfo/MKfallback.sh | 7 +- contrib/ncurses/ncurses/tinfo/MKkeys_list.sh | 10 +- contrib/ncurses/ncurses/tinfo/access.c | 127 +- contrib/ncurses/ncurses/tinfo/add_tries.c | 7 +- contrib/ncurses/ncurses/tinfo/alloc_entry.c | 206 +- contrib/ncurses/ncurses/tinfo/alloc_ttype.c | 122 +- contrib/ncurses/ncurses/tinfo/captoinfo.c | 16 +- contrib/ncurses/ncurses/tinfo/comp_error.c | 23 +- contrib/ncurses/ncurses/tinfo/comp_expand.c | 16 +- contrib/ncurses/ncurses/tinfo/comp_hash.c | 21 +- contrib/ncurses/ncurses/tinfo/comp_parse.c | 140 +- contrib/ncurses/ncurses/tinfo/comp_scan.c | 84 +- contrib/ncurses/ncurses/tinfo/db_iterator.c | 24 +- contrib/ncurses/ncurses/tinfo/doalloc.c | 11 +- contrib/ncurses/ncurses/tinfo/entries.c | 30 +- contrib/ncurses/ncurses/tinfo/free_ttype.c | 18 +- contrib/ncurses/ncurses/tinfo/init_keytry.c | 8 +- contrib/ncurses/ncurses/tinfo/lib_cur_term.c | 17 +- contrib/ncurses/ncurses/tinfo/lib_data.c | 28 +- contrib/ncurses/ncurses/tinfo/lib_kernel.c | 48 +- contrib/ncurses/ncurses/tinfo/lib_longname.c | 7 +- contrib/ncurses/ncurses/tinfo/lib_napms.c | 7 +- contrib/ncurses/ncurses/tinfo/lib_options.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_print.c | 9 +- contrib/ncurses/ncurses/tinfo/lib_raw.c | 60 +- contrib/ncurses/ncurses/tinfo/lib_setup.c | 278 +- contrib/ncurses/ncurses/tinfo/lib_termcap.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_tgoto.c | 16 +- contrib/ncurses/ncurses/tinfo/lib_tparm.c | 681 +- contrib/ncurses/ncurses/tinfo/lib_tputs.c | 50 +- contrib/ncurses/ncurses/tinfo/lib_win32con.c | 1294 ++- contrib/ncurses/ncurses/tinfo/lib_win32util.c | 28 +- contrib/ncurses/ncurses/tinfo/make_hash.c | 6 +- contrib/ncurses/ncurses/tinfo/make_keys.c | 12 +- contrib/ncurses/ncurses/tinfo/obsolete.c | 99 +- contrib/ncurses/ncurses/tinfo/parse_entry.c | 78 +- contrib/ncurses/ncurses/tinfo/read_entry.c | 110 +- contrib/ncurses/ncurses/tinfo/read_termcap.c | 36 +- contrib/ncurses/ncurses/tinfo/strings.c | 6 +- contrib/ncurses/ncurses/tinfo/tinfo_driver.c | 19 +- contrib/ncurses/ncurses/tinfo/trim_sgr0.c | 14 +- contrib/ncurses/ncurses/tinfo/write_entry.c | 118 +- contrib/ncurses/ncurses/trace/lib_trace.c | 99 +- contrib/ncurses/ncurses/trace/lib_traceatr.c | 26 +- contrib/ncurses/ncurses/trace/lib_tracechr.c | 16 +- contrib/ncurses/ncurses/trace/lib_tracedmp.c | 8 +- contrib/ncurses/ncurses/trace/trace_buf.c | 10 +- contrib/ncurses/ncurses/trace/varargs.c | 12 +- contrib/ncurses/ncurses/trace/visbuf.c | 12 +- contrib/ncurses/ncurses/tty/MKexpanded.sh | 9 +- contrib/ncurses/ncurses/tty/hardscroll.c | 47 +- contrib/ncurses/ncurses/tty/hashmap.c | 11 +- contrib/ncurses/ncurses/tty/lib_mvcur.c | 59 +- contrib/ncurses/ncurses/tty/lib_tstp.c | 24 +- contrib/ncurses/ncurses/tty/lib_twait.c | 25 +- contrib/ncurses/ncurses/tty/lib_vidattr.c | 6 +- contrib/ncurses/ncurses/tty/tty_update.c | 41 +- contrib/ncurses/ncurses/wcwidth.h | 18 +- contrib/ncurses/ncurses/widechar/lib_add_wch.c | 18 +- contrib/ncurses/ncurses/widechar/lib_cchar.c | 14 +- contrib/ncurses/ncurses/widechar/lib_erasewchar.c | 34 +- contrib/ncurses/ncurses/widechar/lib_get_wch.c | 6 +- contrib/ncurses/ncurses/widechar/lib_get_wstr.c | 53 +- contrib/ncurses/ncurses/widechar/lib_ins_wch.c | 13 +- contrib/ncurses/ncurses/widechar/lib_key_name.c | 19 +- contrib/ncurses/ncurses/widechar/lib_pecho_wchar.c | 6 +- contrib/ncurses/ncurses/widechar/lib_unget_wch.c | 6 +- contrib/ncurses/ncurses/widechar/lib_vid_attr.c | 6 +- contrib/ncurses/ncurses/win32con/gettimeofday.c | 6 +- contrib/ncurses/ncurses/win32con/win32_driver.c | 12 +- contrib/ncurses/ncurses/win32con/win_driver.c | 97 +- contrib/ncurses/panel/Makefile.in | 17 +- contrib/ncurses/panel/llib-lpanel | 22 +- contrib/ncurses/panel/llib-lpanelt | 22 +- contrib/ncurses/panel/llib-lpaneltw | 22 +- contrib/ncurses/panel/llib-lpanelw | 22 +- contrib/ncurses/panel/p_bottom.c | 6 +- contrib/ncurses/panel/p_new.c | 8 +- contrib/ncurses/panel/p_show.c | 6 +- contrib/ncurses/panel/p_user.c | 6 +- contrib/ncurses/progs/MKtermsort.sh | 37 +- contrib/ncurses/progs/Makefile.in | 61 +- contrib/ncurses/progs/capconvert | 45 +- contrib/ncurses/progs/clear.c | 6 +- contrib/ncurses/progs/dump_entry.c | 86 +- contrib/ncurses/progs/dump_entry.h | 7 +- contrib/ncurses/progs/infocmp.c | 163 +- contrib/ncurses/progs/modules | 10 +- contrib/ncurses/progs/progs.priv.h | 153 +- contrib/ncurses/progs/reset_cmd.c | 305 +- contrib/ncurses/progs/reset_cmd.h | 8 +- contrib/ncurses/progs/tabs.c | 223 +- contrib/ncurses/progs/tic.c | 622 +- contrib/ncurses/progs/toe.c | 85 +- contrib/ncurses/progs/tparm_type.c | 13 +- contrib/ncurses/progs/tparm_type.h | 6 +- contrib/ncurses/progs/tput.c | 195 +- contrib/ncurses/progs/tset.c | 39 +- contrib/ncurses/progs/tty_settings.c | 12 +- contrib/ncurses/test/back_ground.c | 300 - contrib/ncurses/test/dup_field.c | 394 - contrib/ncurses/test/move_field.c | 524 - contrib/ncurses/test/test_tparm.c | 388 - lib/ncurses/config.mk | 4 +- lib/ncurses/tinfo/Makefile | 5 + lib/ncurses/tinfo/ncurses_cfg.h | 60 +- usr.bin/ncurses/Makefile | 6 +- 451 files changed, 48795 insertions(+), 50440 deletions(-) diff --git a/contrib/ncurses/ANNOUNCE b/contrib/ncurses/ANNOUNCE index e0603d622394..6abf551c684d 100644 --- a/contrib/ncurses/ANNOUNCE +++ b/contrib/ncurses/ANNOUNCE @@ -1,4 +1,4 @@ - Announcing ncurses 6.2 + Announcing ncurses 6.5 Overview @@ -40,19 +40,19 @@ Overview The ncurses distribution is available at ncurses' homepage: - ftp://ftp.invisible-island.net/ncurses/ or + https://invisible-island.net/archives/ncurses/ or https://invisible-mirror.net/archives/ncurses/ . - It is also available via anonymous FTP at the GNU distribution site + It is also available at the GNU distribution site - ftp://ftp.gnu.org/gnu/ncurses/ . + https://ftp.gnu.org/gnu/ncurses/ . Release Notes - These notes are for ncurses 6.2, released February 12, 2020. + These notes are for ncurses 6.5, released April 27, 2024. This release is designed to be source-compatible with ncurses 5.0 - through 6.1; providing extensions to the application binary interface + through 6.4; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the ncurses 5 ABI, the reason for the release is to reflect improvements to the ncurses 6 ABI and the supporting utility programs. @@ -60,340 +60,192 @@ Release Notes There are, of course, numerous other improvements, listed in this announcement. - The most important bug-fixes/improvements dealt with user-defined - capabilities in terminal descriptions. The release notes also mention - some other bug-fixes, but are focused on new features and improvements - to existing features since ncurses 6.1 release. + The most important bug-fixes/improvements dealt with robustness + issues. The release notes also mention some other bug-fixes, but are + focused on new features and improvements to existing features since + ncurses 6.4 release. Library improvements New features - There are several new features: - * O_EDGE_INSERT_STAY tells the form library to optionally delay - cursor movement on a field edge/boundary - * O_INPUT_FIELD extension to form library allows a dynamic field to - shrink if the new limit is smaller than the current field size. - * added exit_curses and exit_terminfo to replace internal symbols - for leak-checking. - * added curses_trace, to replace trace(). - - Additionally, to improve performance other changes (and extensions) - are provided in this release: - * mouse decoding now handles shift/control/alt logic when decoding - xterm's 1006 mode - * ncurses now defines a limit for wgetnstr, wgetn_wstr when length - is negative or "too large". - * reordered loop-limit checks in winsnstr in case the string has no - terminating null and only the number of characters is used. - * there is now no buffer-size limit when reading the $TERMCAP - variable. - * the $TERMCAP variable may be interpreted as a fallback to a - terminfo entry - * mvcur now decides whether to use hard-tabs, using xt, tbc and hts - as clues. - * extended colors are improved by modifying an internal call to - vid_puts to pass extended color pairs e.g., from tty_update.c and - lib_mvcur.c - * the initialization functions now avoid relying upon persistent - data for the result from getenv - * scrolling is improved: - + a limit check in newline_forces_scroll handles the case where - the row is inside scroll-margins, but not at the end. - + improved loop limits in _nc_scroll_window handle a case where - the scrolled data is a pad which is taller than the window. + These are new features: + * The low-level terminfo and termcap interfaces are used both by the + higher-level curses library, as well as by many applications. + The functions which convert parameterized terminal capability + strings for output to the terminal (tiparm and tparm) analyze the + capability string to determine which parameters are strings (i.e., + addresses), versus numbers (not addresses). + The library's analysis of a capability string may differ from the + calling application's design if environment variables are used to + point to an invalid terminal database. This is a longstanding + problem with all implementations of terminfo, dating from the + early 1980s. + Two new functions address this problem: by providing a function + which allows the calling application to tell ncurses how many + string-parameters to expect: + + tiscan_s helps applications check formatting capabilities + that would be passed to tiparm_s. + + tiparm_s provides applications a way to tell ncurses what the + expected parameters are for a capability. + * The ncurses library supports a compile-time feature (enabled with + the configure --enable-check-size option) which simplifies + initialization with terminals which do not negotiate window + (screen) size. This is done in setupterm, by providing for using + ANSI cursor-position report (in user6/user7 terminfo capabilities) + to obtain the screen size if neither environment variables or + ioctl is used. + The ncurses test-program with options "-E -T" demonstrates this + feature. + * add functions to query tty-flags in SCREEN + + This release drops compatibility with obsolete versions of tack, e.g., + pre-1.08 Other improvements - These are revised features: - * used "const" in some prototypes rather than NCURSES_CONST where - X/Open Curses was updated to do this, e.g., wscanw, newterm, the - terminfo interface. Also use "const" for consistency in the - termcap interface, which was withdrawn by X/Open Curses in Issue 5 - (2007). As of Issue 7, X/Open Curses still lacks "const" for - certain return values, e.g., keyname. - * modified wbkgd and wbkgrnd to improve compatibility with SVr4 - curses, changing the way the window rendition is updated when the - background character is modified - * improved terminfo write/read by modifying the fourth item of the - extended header to denote the number of valid strings in the - extended string table (see term(5)). - * modified the initialization checks for mouse so that the - xterm+sm+1006 block will work with terminal descriptions not - mentioning xterm. - - These were done to limit or ultimately deprecate features: - * deprecated safe-sprintf, since the vsnprintf function, which does - what was needed, was standardized long ago. - * marked vwprintw and vwscanw as deprecated; recommend using - vw_printw and vw_scanw, respectively. - * added deprecation warnings for internal functions called by older - versions of tack. - * removed unused _nc_import_termtype2 function. - These are improvements to existing features: - * check parameter of set_escdelay, return ERR if negative. - * check parameter of set_tabsize, return ERR if not greater than - zero - * correct a status-check in _nc_read_tic_entry() so that if reading - a hex/b64 $TERMINFO, and the $TERM does not match, fall-through to - the compiled-in search list. - * amend check for repeat_char to handle a case where setlocale() was - called after initscr - * move macro for is_linetouched inside NCURSES_NOMACROS ifndef. - * use _nc_copy_termtype2 rather than direct assignment in setupterm, - in case it is called repeatedly using fallback terminfo - descriptions - * improve workaround for Solaris wcwidth versus line-drawing - characters - * add checks in repair_subwindows to keep the current position and - scroll-margins inside the resized subwindow. - * correct a buffer-limit in write_entry.c for systems that use - caseless filenames. - * improved build-time utility report_offsets: - + add categories, e.g., "w" for wide-character, "t" for threads - to make the report more readable. Reorganized the structures - reported to make the categories more apparent. - + add NCURSES_GLOBALS and NCURSES_PRESCREEN to report to show - how similar the different libtinfo configurations are. - * modified some header files to ensure that those include necessary - files except for the previously-documented cases - * added some traces in initialization to show whether a fallback - entry is used. - * made minor optimization to reduce calls to _nc_reserve_pairs + * In addition to the new, safer function tiparm_s, ncurses adds + checks to make the older tiparm, tparm and tgoto functions safer: + + the terminfo functions tiparm and tparm ensure that the + capability string comes from the terminal description which + ncurses loads, rather than from random data which the + application happens to have. + + the tgoto function disallows capabilities which its analysis + shows will attempt to use string parameters. + + ncurses uses internal functions which correspond to tiparm, + and tgoto which ensure that the capability strings which are + passed to these functions come from the loaded terminal + description. + * improve check in lib_tparm.c, ensuring that a char* fits into a + TPARM_ARG + * modify _nc_syserr_abort to use _nc_env_access, rather than only + checking root uid + * improve thread lock in lib_trace.c + * modify flushinp to use file descriptors in SCREEN, rather than + from TERMINAL, and check if they are for a terminal, like SVr4 + * modify mcprint to use file descriptor in SCREEN, for consistency + * modify internal function _nc_read_file_entry to show relevant + filename in warnings + * improve checks in internal function convert_string for corrupt + terminfo entry + * review/improve handling of out-of-memory conditions + * limit delays to 30 seconds, i.e., padding delays in terminfo, as + well as napms and delay_output functions + * fix reallocation loop for vsnprintf in _nc_sprintf_string by + copying the va_list variable + * modify delscreen to limit the windows which it creates to just + those associated with the screen + * modify endwin to return an error if it is called again without an + intervening screen update + * modify wenclose to handle pads + * eliminate use of PATH_MAX in lib_trace.c + * provide for any CCHARW_MAX greater than 1 These are corrections to existing features: - * fix a special case in PutAttrChar where a cell is marked as - alternate-character set, but the terminal does not actually - support the given graphic character. This would happen in an older - terminal such as vt52, which lacks most line-drawing capability. - * corrected flag for "seq" method of db 1.8.5 interface, needed by - toe on some of the BSDs. - * modify comparison in make_hash.c to correct a special case in - collision handling for Caps-hpux11 - * add extended_slk_color{,_sp} symbols to the appropriate - package/*.{map,sym} files - * modify lib_setup to avoid calling pthread_self() without first - verifying that the address is valid, i.e., for weak symbols - * add a couple of broken-linker symbols to the list of versioned - symbols to help with link-time optimization versus weak symbols. + * correct loop termination condition in waddnstr and waddnwstr + * improve parsing in internal function _nc_msec_cost, allowing a + single decimal point + * amend parameter check for entire string versus specific length in + winsnstr and wins_nwstr to match Solaris; make similar correction + to wins_nwstr + * correct internal function wadd_wch_literal when adding a + non-spacing character to a double-width character + * correct definition of Charable macro for non-wide ncurses library + . Program improvements - Several improvements were made to the utility programs: - - clear - - + improved logic for clearing with the E3 extension, in case - the terminal scrolls content onto its saved-lines before - actually clearing the display, by clearing the saved-lines - after clearing the display + Several improvements were made to the utility programs. Some were done + to make the infocmp option "-u" option help refactor the terminal + database. infocmp - + omit filtering of "OTxx" names which are used for obsolete - capabilities, when the output is sorted by long-names. This - change helps when making a table of the short/long capability - names. + + add limit checks for processing extended capabilities with + the "-u" option + + correct initial alignment of extended capabilities, so that + the "-u" option can be used for more than two terminal types + + modify "-u" option to not report cancels for strings which + were already cancelled in a use'd chunk. + + correct an assignment "-u" for detecting if a boolean is + unset in a base entry and set in a use'd chunk, i.e., if it + was cancelled. tic - + added check for consistent alternate character set - capabilities. - + added check for paired indn/rin. - + added check for terminals with parm_dch vs parm_ich. - + added check for the case where setf/setb are given using - different strings, but provide identical results to - setaf/setab. - + corrected check for ich1. - + changed a too-large terminal entry from a fatal error to a - warning. - - toe - - + ignores any hex/b64 $TERMINFO value in the list of terminfo - databases. - - tset - - + replace check in reset command for obsolete "pt" capability - using tbc and hts capabilities as clues - + modify reset to allow for tabstops at intervals other than 8. - + change reset's behavior for margins to simply clear - soft-margins if possible, rather than clearing and then - setting them according to the terminal's width. - - tput - - + add "x" to getopt string so that "tput -x clear" works. - - Several changes were made to the generated ncurses*config scripts and - the analogous ".pc" files to reduce differences between the - configurations they report: - * modified the ncurse*-config and pc-files to more closely match for - the -I and -l options. - * filtered out linker-specs from the --libs report. - * amended the ncurses*-config and pc-files to take into account the - rpath hack which differed between those files. - * modified generated ncurses*config and ncurses.pc, ncursesw.pc, - etc., to list helper libraries such as gpm for static linking. + + correct limit-check when dumping tc/use clause via "-I" + + check return value of _nc_save_str, in special case where + extended capabilities are processed but the terminal + description was not initialized + + modify check for multiply defined aliases to report problems + within the current runtime rather than for conflicts with + pre-existing terminal descriptions. + + disallow using $TERMINFO or $HOME/.terminfo when "-o" option + is used + + tput and tset + + + add "-v" option to tput, to show warnings + + modify reset command to avoid altering clocal if the terminal + uses a modem + + modify reset feature to avoid 1-second sleep if running in a + pseudo-terminal Examples Along with the library and utilities, improvements were made to the - ncurses-examples. Most of this activity aimed at improving the - test-packages. A few changes are more generally useful, e.g., for the - main ncurses test-program, and for analyzing traces using the - tracemunch script: - * improve recovery from error when reading command-character in - test/ncurses.c, showing the relevant error message and not exiting - on EINTR. - * improve tracemunch, by keeping track of TERMINAL* values, and if - tracing was first turned on after initialization, attempt to show - distinct screen, window and terminal names anyway. - * modify tracemunch to accept filename parameters in addition to use - as a pipe/filter. - * update tracemunch to work with perl 5.26.2, which changed the - rules for escaping regular expressions. - * add some checks in tracemunch for undefined variables. - * modify TurnOn/TurnOff macros (in lib_vidattr.c and lib_vid_attr.c) - to avoid expansion of "CUR" in trace. - - There are other new demo/test programs and reusable examples: - - color_content - Demonstrate the color_content and extended_color_content - functions. - - demo_tabs - A simple demo of tabs in curses. - - dump_window - A portable curses screen-dump, used to compare ncurses screen - contents with Solaris. - - pair_content - Demonstrate the pair_content and extended_pair_content - functions. - - report_hashing - Check hash-tables used for terminfo and termcap names. - - parse_rgb - Sample implementation of the ncurses RGB extension from - user_caps.5, used in picsmap and savescreen programs. - - A variety of improvements were made to existing programs, both new - features as well as options added to make the set of programs more - consistent. - * add "-l" option to test/background, to dump screen contents in a - form that lets different curses implementations be compared. - * add "@" command to test/ncurses F-test, to allow rapid jump to - different character pages. - * added enum, regex examples to test/demo_forms - * amend Scaled256() macro in test/picsmap.c to cover the full range - 0..1000 - * corrected pathname used in Ada95 sample programs for explain.txt, - to work with test-packages, and used an awk script to split the - resulting pathname when it would be too long for a single line. - * ignore interrupted system-call in test/ncurses's command-line, - e.g., if the terminal were resized. - * improved ifdef's for TABSIZE variable, to help with AIX/HPUX - ports. + ncurses-examples: + * modify test_tparm to account for extended capabilities + * corrected mouse mask in test/testcurs.c + * modify test/clip_printw.c to optionally test non-wrapped updates + * modify test/test_mouse.c to use curses api for raw/noraw + * modify test/clip_printw.c to optionally test non-wrapped updates + + There is one new demo/test programs: + + test/test_endwin.c + This program shows the return-status from endwin with different + combinations of endwin (repeated), initscr, newterm. Terminal database There are several new terminal descriptions: - - alacritty, domterm, kitty, mintty, mintty-direct, ms-terminal, - n7900, nsterm-build309, nsterm-direct, screen5, ti703, ti707, - ti703-w, ti707-w vscode, vscode-direct, xterm-mono, xterm.js + * ansi+apparrows + * contour + * linux+kbs for terminals which imitate xterm's behavior with Linux + * rio, rio-direct + * mostlike + * ms-vt100-16color, winconsole + * vt100+noapp, vt100+noapp+pc, xterm+app+pc, xterm+decedit from + xterm #389 + * putty+cursor to reflect amending of modified cursor-keys in 2021 + * wezterm There are many changes to existing terminal descriptions. Some were - updates to several descriptions: - * use ansi+rep in a dozen places - * add rs1 to konsole, mlterm - * improve several flash capabilities with trailing mandatory delays - * drop ich1 from rxvt-basic, Eterm and mlterm to improve - compatibility with old non-curses programs - * add/use xterm+keypad in xterm-new - * use xterm+sl-twm for consistency, nine places - * improve xm example in xterm+x11mouse and xterm+sm_1006. - - while others affected specific descriptions. These were retested, to - take into account changes by their developers: - - terminator, st - - while these are specific fixes based on reviewing documentation, user - reports, or warnings from tic: - - adds200: - - + fix typo - - gnome-256color - - + base entry on "gnome", not "vte", for consistency - - interix - - + trim unnecessary setf/setb - - linux-16color - - + accommodate Linux console driver incompatibility introduced - in early 2018 - - nsterm-256color: - - + add nsterm-build309 to replace nsterm-256color, assigning the - latter as an alias of nsterm, to make mouse work with - nsterm-256color - - regent40: - - + renumber function-keys to match manual - - regent60: - - + add cd (clr_eos) - + corrected acsc - + add shifted function-keys - - tvi950: - - + added function-key definitions to agree with Televideo 950 - manual - + corrected acsc - + remove bogus kf0 - + add bel - - tvi955: - - + fix typo - - vi200: - - + add acsc string, including right/down-arrow - - wy50: - - + corrected acsc - - wy50 and wy60: - - + add shifted function-keys as kF1 to kF16 - - xterm+x11hilite: - - + eliminate unused p5 parameter. - - A few entries use extensions (user-defined terminal capabilities): - * use xterm+sm+1006 (aka "SGR 1006 mouse") for konsole-base and - putty - * add Smol/Rmol user-defined capability to tmux and vte-2018 - * add Smulx user-defined capability to tmux, vte-2018 + updates to several descriptions, using the infocmp "-u" option in a + script to determine which building-block entries could be used to + replace multiple capability settings (and trim redundant information). + + Other changes include: + * document XF, kxIN and kxOUT + * add note on sun regarding wscons/cmdtool/shelltool + * remove DECCOLM+DECSCLM from foot + * add xterm+focus to foot+base + * add ecma+strikeout to putty + * use CSI 3J in vte-2017 + * use oldxterm+sm+1006 in vte-2014 + * modify xgterm to work around line-drawing bug *** 164498 LINES SKIPPED *** From nobody Thu Jun 27 09:08:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8t5j1zmMz5PHC4; Thu, 27 Jun 2024 09:08: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 4W8t5h6YrPz4YsL; Thu, 27 Jun 2024 09:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719479304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1rutC+9tIxwRTapXzmLs9JMm3jMXYIN9Q42EUUe8Mk=; b=cPh9VDPRRsnnQ3qphfI5kJucQMJB1Gj2sgcdVdsjbCb0mRLsCXNH2mdZqpCqXyHICuwiOC XR0T5kKSJ6yLl7k4JA/jmhP4tTNgsadpRoSzegx3EHUEHhhM9U6vmpsCSYPOguSIB33nWE 6QI3iAHjcaQ7faSp4F0HnQSDg4r4Ie9AfCeXRHwZtMbj56s3AGnzQjn2J8llhWPJPMQz7a RNcaE6es41W2hCiTuaA4Opv5ygCLlX3YtQxsOLIpRZCckAR1+hkos/mIJI1izmEI9Y4KLT ZpOr5odYAL6c1jBrml5CQqZ7rcf3l4zmemZHsrUFz8N+lclAdzm/Gd3RUQ6Jlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719479304; a=rsa-sha256; cv=none; b=q18bJSBo3kPa1eIAlb+HEd8cSVfNy4hMeDaY95Fnp+mu0aGh3fnf6vM5TgQknuJg8I4Sxb 3BoXbWUnzNk6jbPqWPKOPize/vIqLEAnKXvd0XwIVOZyS9/pdbEG7DLD5MtG/s+l3Bt7ru ZYDS/mLgn+2RiYtH3Pjd9rvN2taQpi5Th4z/jzcEd2emSXE6aG6TunBzxHuaRou1NOC7d7 tcKYt9Y+G3Cz8+cVGdUZJinBnWa3x/MeIcCJEwbotwKiuerymWMhtZEl+SW/xdK75F9okX kEWldz4ee/uaNxlnKYgsZw11sJSGldAeyJ7LQaopEuG/IoI99gD01PFG0PgDzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719479304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1rutC+9tIxwRTapXzmLs9JMm3jMXYIN9Q42EUUe8Mk=; b=abj52UISlqXqI2tXzAxbVTggU8Snxc7OeNcH78+CZOtHeNWas0d+EJw3WQ1tooivgTTHhA lKtjTLSX1SS8vFgvM9T2SbIn43I2ip3mVAZ/kg6K1P4G6x3uKeGulWANXbM3h+cYwnaoTw zbM7kzzMFlXrimr1cahcgfcuamZPBTVM1b74ugC7OcxoYD7w7nzT59sAjG5wQbUIhazt/R dTXIDcNd2a0TaMLcRNVK+gHQ7/f8yK/PWFrauD4HOiCLdah49yUL/6qW6spyTQ36+Qm+8m V/5sKTshWOG/fIiQYlTXyRqO6caPgJHg352YFubb5rwG39yrh6QmeWQne+MpEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8t5h5ZTvz1LgH; Thu, 27 Jun 2024 09:08: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 45R98OGJ028755; Thu, 27 Jun 2024 09:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R98O0x028752; Thu, 27 Jun 2024 09:08:24 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:08:24 GMT Message-Id: <202406270908.45R98O0x028752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 80cd5ab568e2 - stable/14 - ncurses: readd 2 html files in the doc (fix MK_HTML=yes) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 80cd5ab568e26f185cd2dad3a7766514cf4a6443 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=80cd5ab568e26f185cd2dad3a7766514cf4a6443 commit 80cd5ab568e26f185cd2dad3a7766514cf4a6443 Author: Baptiste Daroussin AuthorDate: 2024-06-20 13:33:23 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 09:06:23 +0000 ncurses: readd 2 html files in the doc (fix MK_HTML=yes) Reported by: Michael Butler (cherry picked from commit 8d9900a313593adeeaae295b4aea982cb14cb8a5) --- contrib/ncurses/doc/html/hackguide.html | 962 ++++++++ contrib/ncurses/doc/html/ncurses-intro.html | 3390 +++++++++++++++++++++++++++ 2 files changed, 4352 insertions(+) diff --git a/contrib/ncurses/doc/html/hackguide.html b/contrib/ncurses/doc/html/hackguide.html new file mode 100644 index 000000000000..2b9445538dc8 --- /dev/null +++ b/contrib/ncurses/doc/html/hackguide.html @@ -0,0 +1,962 @@ + + + + + + A Hacker's Guide to Ncurses Internals + + + + +

A Hacker's Guide to NCURSES

+ +

A Hacker's Guide to NCURSES

+ + + +

Abstract

+ +

This document is a hacker's tour of the + ncurses library and utilities. It discusses + design philosophy, implementation methods, and the conventions + used for coding and documentation. It is recommended reading for + anyone who is interested in porting, extending or improving the + package.

+ +

Objective of the + Package

+ +

The objective of the ncurses package is to + provide a free software API for character-cell terminals and + terminal emulators with the following characteristics:

+ +
    +
  • Source-compatible with historical curses implementations + (including the original BSD curses and System V curses.
  • + +
  • Conformant with the XSI Curses standard issued as part of + XPG4 by X/Open.
  • + +
  • High-quality — stable and reliable code, wide + portability, good packaging, superior documentation.
  • + +
  • Featureful — should eliminate as much of the drudgery + of C interface programming as possible, freeing programmers to + think at a higher level of design.
  • +
+ +

These objectives are in priority order. So, for example, + source compatibility with older version must trump featurefulness + — we cannot add features if it means breaking the portion + of the API corresponding to historical curses versions.

+ +

Why System V Curses?

+ +

We used System V curses as a model, reverse-engineering their + API, in order to fulfill the first two objectives.

+ +

System V curses implementations can support BSD curses + programs with just a recompilation, so by capturing the System V + API we also capture BSD's.

+ +

More importantly for the future, the XSI Curses standard + issued by X/Open is explicitly and closely modeled on System V. + So conformance with System V took us most of the way to + base-level XSI conformance.

+ +

How to Design + Extensions

+ +

The third objective (standards conformance) requires that it + be easy to condition source code using ncurses + so that the absence of nonstandard extensions does not break the + code.

+ +

Accordingly, we have a policy of associating with each + nonstandard extension a feature macro, so that ncurses client + code can use this macro to condition in or out the code that + requires the ncurses extension.

+ +

For example, there is a macro + NCURSES_MOUSE_VERSION which XSI Curses does not + define, but which is defined in the ncurses + library header. You can use this to condition the calls to the + mouse API calls.

+ +

Portability and + Configuration

+ +

Code written for ncurses may assume an + ANSI-standard C compiler and POSIX-compatible OS interface. It + may also assume the presence of a System-V-compatible + select(2) call.

+ +

We encourage (but do not require) developers to make the code + friendly to less-capable UNIX environments wherever possible.

+ +

We encourage developers to support OS-specific optimizations + and methods not available under POSIX/ANSI, provided only + that:

+ +
    +
  • All such code is properly conditioned so the build process + does not attempt to compile it under a plain ANSI/POSIX + environment.
  • + +
  • Adding such implementation methods does not introduce + incompatibilities in the ncurses API between + platforms.
  • +
+ +

We use GNU autoconf(1) as a tool to deal with + portability issues. The right way to leverage an OS-specific + feature is to modify the autoconf specification files + (configure.in and aclocal.m4) to set up a new feature macro, + which you then use to condition your code.

+ +

Documentation + Conventions

+ +

There are three kinds of documentation associated with this + package. Each has a different preferred format:

+ +
    +
  • Package-internal files (README, INSTALL, TO-DO etc.)
  • + +
  • Manual pages.
  • + +
  • Everything else (i.e., narrative documentation).
  • +
+ +

Our conventions are simple:

+ +
    +
  1. Maintain package-internal files in plain + text. The expected viewer for them is more(1) or + an editor window; there is no point in elaborate mark-up.
  2. + +
  3. Mark up manual pages in the man macros. + These have to be viewable through traditional man(1) + programs.
  4. + +
  5. Write everything else in HTML. +
  6. +
+ +

When in doubt, HTMLize a master and use lynx(1) to + generate plain ASCII (as we do for the announcement + document).

+ +

The reason for choosing HTML is that it is (a) well-adapted + for on-line browsing through viewers that are everywhere; (b) + more easily readable as plain text than most other mark-ups, if + you do not have a viewer; and (c) carries enough information that + you can generate a nice-looking printed version from it. Also, of + course, it make exporting things like the announcement document + to WWW pretty trivial.

+ +

How to Report Bugs

+ +

The reporting address for + bugs is bug-ncurses@gnu.org. This is a + majordomo list; to join, write to + bug-ncurses-request@gnu.org with a message + containing the line:

+ +
+             subscribe <name>@<host.domain>
+
+

The ncurses code is maintained by a small group + of volunteers. While we try our best to fix bugs promptly, we + simply do not have a lot of hours to spend on elementary + hand-holding. We rely on intelligent cooperation from our users. + If you think you have found a bug in ncurses, there + are some steps you can take before contacting us that will help + get the bug fixed quickly.

+ +

In order to use our bug-fixing time efficiently, we put people + who show us they have taken these steps at the head of our queue. + This means that if you do not, you will probably end up at the + tail end and have to wait a while.

+ +
    +
  1. Develop a recipe to reproduce the bug. +

    Bugs we can reproduce are likely to be fixed very quickly, + often within days. The most effective single thing you can do + to get a quick fix is develop a way we can duplicate the bad + behavior — ideally, by giving us source for a small, + portable test program that breaks the library. (Even better + is a keystroke recipe using one of the test programs provided + with the distribution.)

    +
  2. + +
  3. Try to reproduce the bug on a different terminal type. +

    In our experience, most of the behaviors people report as + library bugs are actually due to subtle problems in terminal + descriptions. This is especially likely to be true if you are + using a traditional asynchronous terminal or PC-based + terminal emulator, rather than xterm or a UNIX console + entry.

    + +

    It is therefore extremely helpful if you can tell us + whether or not your problem reproduces on other terminal + types. Usually you will have both a console type and xterm + available; please tell us whether or not your bug reproduces + on both.

    + +

    If you have xterm available, it is also good to collect + xterm reports for different window sizes. This is especially + true if you normally use an unusual xterm window size — + a surprising number of the bugs we have seen are either + triggered or masked by these.

    +
  4. + +
  5. Generate and examine a trace file for the broken behavior. +

    Recompile your program with the debugging versions of the + libraries. Insert a trace() call with the + argument set to TRACE_UPDATE. (See "Writing Programs with + NCURSES" for details on trace levels.) Reproduce your + bug, then look at the trace file to see what the library was + actually doing.

    + +

    Another frequent cause of apparent bugs is application + coding errors that cause the wrong things to be put on the + virtual screen. Looking at the virtual-screen dumps in the + trace file will tell you immediately if this is happening, + and save you from the possible embarrassment of being told + that the bug is in your code and is your problem rather than + ours.

    + +

    If the virtual-screen dumps look correct but the bug + persists, it is possible to crank up the trace level to give + more and more information about the library's update actions + and the control sequences it issues to perform them. The test + directory of the distribution contains a tool for digesting + these logs to make them less tedious to wade through.

    + +

    Often you will find terminfo problems at this stage by + noticing that the escape sequences put out for various + capabilities are wrong. If not, you are likely to learn + enough to be able to characterize any bug in the + screen-update logic quite exactly.

    +
  6. + +
  7. Report details and symptoms, not just interpretations. +

    If you do the preceding two steps, it is very likely that + you will discover the nature of the problem yourself and be + able to send us a fix. This will create happy feelings all + around and earn you good karma for the first time you run + into a bug you really cannot characterize and fix + yourself.

    + +

    If you are still stuck, at least you will know what to + tell us. Remember, we need details. If you guess about what + is safe to leave out, you are too likely to be wrong.

    + +

    If your bug produces a bad update, include a trace file. + Try to make the trace at the least voluminous level + that pins down the bug. Logs that have been through + tracemunch are OK, it does not throw away any information + (actually they are better than un-munched ones because they + are easier to read).

    + +

    If your bug produces a core-dump, please include a + symbolic stack trace generated by gdb(1) or your local + equivalent.

    + +

    Tell us about every terminal on which you have reproduced + the bug — and every terminal on which you cannot. + Ideally, send us terminfo sources for all of these (yours + might differ from ours).

    + +

    Include your ncurses version and your OS/machine type, of + course! You can find your ncurses version in the + curses.h file.

    +
  8. +
+ +

If your problem smells like a logic error or in cursor + movement or scrolling or a bad capability, there are a couple of + tiny test frames for the library algorithms in the progs + directory that may help you isolate it. These are not part of the + normal build, but do have their own make productions.

+ +

The most important of these is mvcur, a test + frame for the cursor-movement optimization code. With this + program, you can see directly what control sequences will be + emitted for any given cursor movement or scroll/insert/delete + operations. If you think you have got a bad capability + identified, you can disable it and test again. The program is + command-driven and has on-line help.

+ +

If you think the vertical-scroll optimization is broken, or + just want to understand how it works better, build + hashmap and read the header comments of + hardscroll.c and hashmap.c; then try it + out. You can also test the hardware-scrolling optimization + separately with hardscroll.

+ +

A Tour of the Ncurses + Library

+ +

Library Overview

+ +

Most of the library is superstructure — fairly trivial + convenience interfaces to a small set of basic functions and data + structures used to manipulate the virtual screen (in particular, + none of this code does any I/O except through calls to more + fundamental modules described below). The files

+ +
+ lib_addch.c lib_bkgd.c lib_box.c lib_chgat.c lib_clear.c + lib_clearok.c lib_clrbot.c lib_clreol.c lib_colorset.c + lib_data.c lib_delch.c lib_delwin.c lib_echo.c lib_erase.c + lib_gen.c lib_getstr.c lib_hline.c lib_immedok.c lib_inchstr.c + lib_insch.c lib_insdel.c lib_insstr.c lib_instr.c + lib_isendwin.c lib_keyname.c lib_leaveok.c lib_move.c + lib_mvwin.c lib_overlay.c lib_pad.c lib_printw.c lib_redrawln.c + lib_scanw.c lib_screen.c lib_scroll.c lib_scrollok.c + lib_scrreg.c lib_set_term.c lib_slk.c lib_slkatr_set.c + lib_slkatrof.c lib_slkatron.c lib_slkatrset.c lib_slkattr.c + lib_slkclear.c lib_slkcolor.c lib_slkinit.c lib_slklab.c + lib_slkrefr.c lib_slkset.c lib_slktouch.c lib_touch.c + lib_unctrl.c lib_vline.c lib_wattroff.c lib_wattron.c + lib_window.c +
+ +

are all in this category. They are very unlikely to need + change, barring bugs or some fundamental reorganization in the + underlying data structures.

+ +

These files are used only for debugging support:

+ +
+ lib_trace.c lib_traceatr.c lib_tracebits.c lib_tracechr.c + lib_tracedmp.c lib_tracemse.c trace_buf.c +
+ +

It is rather unlikely you will ever need to change these, + unless you want to introduce a new debug trace level for some + reason.

+ +

There is another group of files that do direct I/O via + tputs(), computations on the terminal capabilities, or + queries to the OS environment, but nevertheless have only fairly + low complexity. These include:

+ +
+ lib_acs.c lib_beep.c lib_color.c lib_endwin.c + lib_initscr.c lib_longname.c lib_newterm.c lib_options.c + lib_termcap.c lib_ti.c lib_tparm.c lib_tputs.c lib_vidattr.c + read_entry.c. +
+ +

They are likely to need revision only if ncurses is being + ported to an environment without an underlying terminfo + capability representation.

+ +

These files have serious hooks into the tty driver and signal + facilities:

+ +
+ lib_kernel.c lib_baudrate.c lib_raw.c lib_tstp.c + lib_twait.c +
+ +

If you run into porting snafus moving the package to another + UNIX, the problem is likely to be in one of these files. The file + lib_print.c uses sleep(2) and also falls in this + category.

+ +

Almost all of the real work is done in the files

+ +
+ hardscroll.c hashmap.c lib_addch.c lib_doupdate.c + lib_getch.c lib_mouse.c lib_mvcur.c lib_refresh.c lib_setup.c + lib_vidattr.c +
+ +

Most of the algorithmic complexity in the library lives in + these files. If there is a real bug in ncurses + itself, it is probably here. We will tour some of these files in + detail below (see The Engine Room).

+ +

Finally, there is a group of files that is actually most of + the terminfo compiler. The reason this code lives in the + ncurses library is to support fallback to + /etc/termcap. These files include

+ +
+ alloc_entry.c captoinfo.c comp_captab.c comp_error.c + comp_hash.c comp_parse.c comp_scan.c parse_entry.c + read_termcap.c write_entry.c +
+ +

We will discuss these in the compiler tour.

+ +

The Engine Room

+ +

Keyboard Input

+ +

All ncurses input funnels through the function + wgetch(), defined in lib_getch.c. This + function is tricky; it has to poll for keyboard and mouse events + and do a running match of incoming input against the set of + defined special keys.

+ +

The central data structure in this module is a FIFO queue, + used to match multiple-character input sequences against + special-key capabilities; also to implement pushback via + ungetch().

+ +

The wgetch() code distinguishes between function + key sequences and the same sequences typed manually by doing a + timed wait after each input character that could lead a function + key sequence. If the entire sequence takes less than 1 second, it + is assumed to have been generated by a function key press.

+ +

Hackers bruised by previous encounters with variant + select(2) calls may find the code in + lib_twait.c interesting. It deals with the problem + that some BSD selects do not return a reliable time-left value. + The function timed_wait() effectively simulates a + System V select.

+ +

Mouse Events

+ +

If the mouse interface is active, wgetch() polls + for mouse events each call, before it goes to the keyboard for + input. It is up to lib_mouse.c how the polling is + accomplished; it may vary for different devices.

+ +

Under xterm, however, mouse event notifications come in via + the keyboard input stream. They are recognized by having the + kmous capability as a prefix. This is kind of + klugey, but trying to wire in recognition of a mouse key prefix + without going through the function-key machinery would be just + too painful, and this turns out to imply having the prefix + somewhere in the function-key capabilities at terminal-type + initialization.

+ +

This kluge only works because kmous is not + actually used by any historic terminal type or curses + implementation we know of. Best guess is it is a relic of some + forgotten experiment in-house at Bell Labs that did not leave any + traces in the publicly-distributed System V terminfo files. If + System V or XPG4 ever gets serious about using it again, this + kluge may have to change.

+ +

Here are some more details about mouse event handling:

+ +

The lib_mouse() code is logically split into a + lower level that accepts event reports in a device-dependent + format and an upper level that parses mouse gestures and filters + events. The mediating data structure is a circular queue of event + structures.

+ +

Functionally, the lower level's job is to pick up primitive + events and put them on the circular queue. This can happen in one + of two ways: either (a) _nc_mouse_event() detects a + series of incoming mouse reports and queues them, or (b) code in + lib_getch.c detects the kmous + prefix in the keyboard input stream and calls _nc_mouse_inline to + queue up a series of adjacent mouse reports.

+ +

In either case, _nc_mouse_parse() should be + called after the series is accepted to parse the digested mouse + reports (low-level events) into a gesture (a high-level or + composite event).

+ +

Output and Screen Updating

+ +

With the single exception of character echoes during a + wgetnstr() call (which simulates cooked-mode line + editing in an ncurses window), the library normally does all its + output at refresh time.

+ +

The main job is to go from the current state of the screen (as + represented in the curscr window structure) to the + desired new state (as represented in the newscr + window structure), while doing as little I/O as possible.

+ +

The brains of this operation are the modules + hashmap.c, hardscroll.c and + lib_doupdate.c; the latter two use + lib_mvcur.c. Essentially, what happens looks like + this:

+ +
    +
  • +

    The hashmap.c module tries to detect vertical + motion changes between the real and virtual screens. This + information is represented by the oldindex members in the + newscr structure. These are modified by vertical-motion and + clear operations, and both are re-initialized after each + update. To this change-journalling information, the hashmap + code adds deductions made using a modified Heckel algorithm + on hash values generated from the line contents.

    +
  • + +
  • +

    The hardscroll.c module computes an optimum + set of scroll, insertion, and deletion operations to make the + indices match. It calls _nc_mvcur_scrolln() in + lib_mvcur.c to do those motions.

    +
  • + +
  • +

    Then lib_doupdate.c goes to work. Its job is + to do line-by-line transformations of curscr + lines to newscr lines. Its main tool is the + routine mvcur() in lib_mvcur.c. + This routine does cursor-movement optimization, attempting to + get from given screen location A to given location B in the + fewest output characters possible.

    +
  • +
+ +

If you want to work on screen optimizations, you should use + the fact that (in the trace-enabled version of the library) + enabling the TRACE_TIMES trace level causes a report + to be emitted after each screen update giving the elapsed time + and a count of characters emitted during the update. You can use + this to tell when an update optimization improves efficiency.

+ +

In the trace-enabled version of the library, it is also + possible to disable and re-enable various optimizations at + runtime by tweaking the variable + _nc_optimize_enable. See the file + include/curses.h.in for mask values, near the + end.

+ +

The Forms and Menu Libraries

+ +

The forms and menu libraries should work reliably in any + environment you can port ncurses to. The only portability issue + anywhere in them is what flavor of regular expressions the + built-in form field type TYPE_REGEXP will recognize.

+ +

The configuration code prefers the POSIX regex facility, + modeled on System V's, but will settle for BSD regexps if the + former is not available.

+ +

Historical note: the panels code was written primarily to + assist in porting u386mon 2.0 (comp.sources.misc v14i001-4) to + systems lacking panels support; u386mon 2.10 and beyond use it. + This version has been slightly cleaned up for + ncurses.

+ +

A Tour of the Terminfo Compiler

+ +

The ncurses implementation of + tic is rather complex internally; it has to do a + trying combination of missions. This starts with the fact that, + in addition to its normal duty of compiling terminfo sources into + loadable terminfo binaries, it has to be able to handle termcap + syntax and compile that too into terminfo entries.

+ +

The implementation therefore starts with a table-driven, + dual-mode lexical analyzer (in comp_scan.c). The + lexer chooses its mode (termcap or terminfo) based on the first + “,” or “:” it finds in each entry. The + lexer does all the work of recognizing capability names and + values; the grammar above it is trivial, just "parse entries till + you run out of file".

+ +

Translation of + Non-use Capabilities

+ +

Translation of most things besides use + capabilities is pretty straightforward. The lexical analyzer's + tokenizer hands each capability name to a hash function, which + drives a table lookup. The table entry yields an index which is + used to look up the token type in another table, and controls + interpretation of the value.

+ +

One possibly interesting aspect of the implementation is the + way the compiler tables are initialized. All the tables are + generated by various awk/sed/sh scripts from a master table + include/Caps; these scripts actually write C + initializers which are linked to the compiler. Furthermore, the + hash table is generated in the same way, so it doesn't have to be + generated at compiler startup time (another benefit of this + organization is that the hash table can be in shareable text + space).

+ +

Thus, adding a new capability is usually pretty trivial, just + a matter of adding one line to the include/Caps + file. We will have more to say about this in the section on + Source-Form Translation.

+ +

Use Capability Resolution

+ +

The background problem that makes tic tricky + is not the capability translation itself, it is the resolution of + use capabilities. Older versions would not + handle forward use references for this reason + (that is, a using terminal always had to follow its use target in + the source file). By doing this, they got away with a simple + implementation tactic; compile everything as it blows by, then + resolve uses from compiled entries.

+ +

This will not do for ncurses. The problem is + that that the whole compilation process has to be embeddable in + the ncurses library so that it can be called by + the startup code to translate termcap entries on the fly. The + embedded version cannot go promiscuously writing everything it + translates out to disk — for one thing, it will typically + be running with non-root permissions.

+ +

So our tic is designed to parse an entire + terminfo file into a doubly-linked circular list of entry + structures in-core, and then do use resolution + in-memory before writing everything out. This design has other + advantages: it makes forward and back use-references equally easy + (so we get the latter for free), and it makes checking for name + collisions before they are written out easy to do.

+ +

And this is exactly how the embedded version works. But the + stand-alone user-accessible version of tic + partly reverts to the historical strategy; it writes to disk (not + keeping in core) any entry with no use + references.

+ +

This is strictly a core-economy kluge, implemented because the + terminfo master file is large enough that some core-poor systems + swap like crazy when you compile it all in memory...there have + been reports of this process taking three hours, + rather than the twenty seconds or less typical on the author's + development box.

+ +

So. The executable tic passes the + entry-parser a hook that immediately writes out the + referenced entry if it has no use capabilities. The compiler main + loop refrains from adding the entry to the in-core list when this + hook fires. If some other entry later needs to reference an entry + that got written immediately, that is OK; the resolution code + will fetch it off disk when it cannot find it in core.

+ +

Name collisions will still be detected, just not as cleanly. + The write_entry() code complains before overwriting + an entry that postdates the time of tic's first + call to write_entry(), Thus it will complain about + overwriting entries newly made during the tic + run, but not about overwriting ones that predate it.

+ +

Source-Form + Translation

+ +

Another use of tic is to do source + translation between various termcap and terminfo formats. There + are more variants out there than you might think; the ones we + know about are described in the captoinfo(1) + manual page.

+ +

The translation output code (dump_entry() in + ncurses/dump_entry.c) is shared with the + infocmp(1) utility. It takes the same internal + representation used to generate the binary form and dumps it to + standard output in a specified format.

+ +

The include/Caps file has a header comment + describing ways you can specify source translations for + nonstandard capabilities just by altering the master table. It is + possible to set up capability aliasing or tell the compiler to + plain ignore a given capability without writing any C code at + all.

+ +

For circumstances where you need to do algorithmic + translation, there are functions in parse_entry.c + called after the parse of each entry that are specifically + intended to encapsulate such translations. This, for example, is + where the AIX box1 capability get translated to + an acsc string.

+ +

Other Utilities

+ +

The infocmp utility is just a wrapper around + the same entry-dumping code used by tic for + source translation. Perhaps the one interesting aspect of the + code is the use of a predicate function passed in to + dump_entry() to control which capabilities are + dumped. This is necessary in order to handle both the ordinary + De-compilation case and entry difference reporting.

+ +

The tput and clear utilities + just do an entry load followed by a tputs() of a + selected capability.

+ +

Style Tips for Developers

+ +

See the TO-DO file in the top-level directory of the source + distribution for additions that would be particularly useful.

+ +

The prefix _nc_ should be used on library public + functions that are not part of the curses API in order to prevent + pollution of the application namespace. If you have to add to or + modify the function prototypes in curses.h.in, read + ncurses/MKlib_gen.sh first so you can avoid breaking XSI + conformance. Please join the ncurses mailing list. See the + INSTALL file in the top level of the distribution for details on + the list.

+ +

Look for the string FIXME in source files to tag + minor bugs and potential problems that could use fixing.

+ +

Do not try to auto-detect OS features in the main body of the + C code. That is the job of the configuration system.

+ +

To hold down complexity, do make your code data-driven. + Especially, if you can drive logic from a table filtered out of + include/Caps, do it. If you find you need to augment + the data in that file in order to generate the proper table, that + is still preferable to ad-hoc code — that is why the fifth + field (flags) is there.

+ +

Have fun!

+ +

Porting Hints

+ +

The following notes are intended to be a first step towards + DOS and Macintosh ports of the ncurses libraries.

+ +

The following library modules are “pure curses”; + they operate only on the curses internal structures, do all + output through other curses calls (not including + tputs() and putp()) and do not call any + other UNIX routines such as signal(2) or the stdio library. Thus, + they should not need to be modified for single-terminal + ports.

+ +
+ lib_addch.c lib_addstr.c lib_bkgd.c lib_box.c lib_clear.c + lib_clrbot.c lib_clreol.c lib_delch.c lib_delwin.c lib_erase.c + lib_inchstr.c lib_insch.c lib_insdel.c lib_insstr.c + lib_keyname.c lib_move.c lib_mvwin.c lib_newwin.c lib_overlay.c + lib_pad.c lib_printw.c lib_refresh.c lib_scanw.c lib_scroll.c + lib_scrreg.c lib_set_term.c lib_touch.c lib_tparm.c lib_tputs.c + lib_unctrl.c lib_window.c panel.c +
+ +

This module is pure curses, but calls outstr():

+ +
+ lib_getstr.c +
+ +

These modules are pure curses, except that they use + tputs() and putp():

+ +
+ lib_beep.c lib_color.c lib_endwin.c lib_options.c + lib_slk.c lib_vidattr.c +
+ +

This modules assist in POSIX emulation on non-POSIX + systems:

+ +
+
sigaction.c
+ +
signal calls
+
+ +

The following source files will not be needed for a + single-terminal-type port.

+ +
+ alloc_entry.c captoinfo.c clear.c comp_captab.c + comp_error.c comp_hash.c comp_main.c comp_parse.c comp_scan.c + dump_entry.c infocmp.c parse_entry.c read_entry.c tput.c + write_entry.c +
+ +

The following modules will use + open()/read()/write()/close()/lseek() on files, but no other OS + calls.

+ +
+
lib_screen.c
+ +
used to read/write screen dumps
+ +
lib_trace.c
+ +
used to write trace data to the logfile
+
+ +

Modules that would have to be modified for a port start + here:

+ +

The following modules are “pure curses” but + contain assumptions inappropriate for a memory-mapped port.

+ +
+
lib_longname.c
+ +
assumes there may be multiple terminals
+ +
lib_acs.c
+ +
assumes acs_map as a double indirection
+ +
lib_mvcur.c
+ +
assumes cursor moves have variable cost
+ +
lib_termcap.c
+ +
assumes there may be multiple terminals
+ +
lib_ti.c
+ +
assumes there may be multiple terminals
+
+ +

The following modules use UNIX-specific calls:

+ +
+
lib_doupdate.c
+ +
input checking
+ +
lib_getch.c
+ +
read()
+ +
lib_initscr.c
+ +
getenv()
+ +
lib_newterm.c
+ +
lib_baudrate.c
+ +
lib_kernel.c
+ +
various tty-manipulation and system calls
+ +
lib_raw.c
+ +
various tty-manipulation calls
+ +
lib_setup.c
+ +
various tty-manipulation calls
+ +
lib_restart.c
+ +
various tty-manipulation calls
+ +
lib_tstp.c
+ +
signal-manipulation calls
+ +
lib_twait.c
+ +
gettimeofday(), select().
+
+ +
+ +
+ Eric S. Raymond <esr@snark.thyrsus.com> +
+ (Note: This is not the bug + address!) *** 3398 LINES SKIPPED *** From nobody Thu Jun 27 09:08:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8t5k4BNZz5PHM7; Thu, 27 Jun 2024 09:08: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 4W8t5k0p74z4Ybx; Thu, 27 Jun 2024 09:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719479306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ZUpsbFfaO/Cwypq/xwTX4UvwYAMyHviJ4+ut11uruo=; b=XSmquZQpGyBUq83m5Zqudb9uSH9TwhCcaoiU3hWfhZD9sP5PQzit3SOrBnY3/vcx5XJL48 KEuMPwnumWL3KpNxchL0RFAU3nJz7TDedSTOHr0BAH5FrR79hlG+Kvt2oNIJCF4DqazwC9 AWtUfb2c1D0PbfFf9y6e1EXeL1NVHQnDov2ETSrpOaFf+83Ki8KHvy8faB3H4lOEvaX/1l AetwllGfGf76y7ShO81+ykILqKXwjrztYb20a3O47HAit0wj6Nxl8qvJ81JXtulmohQ5gi WIugG58mFWyTvNSD9n931udWPzt6/dUMa1NJBsA+/Yz7voy+lfe65/wDXZuUAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719479306; a=rsa-sha256; cv=none; b=bglizp7U8WzrJ0KjBQMTVkukpw3f9GipATkDgSJ05K4KlK6lsBYmx/ifJp7thvek9c7cI3 Ba1kDAANOCiE2rYIppofPmJq2acITot7BBp/TWFCzcbL7f7Kf0z3SnBtc3WDyXgrRHYd9V FcGyB90agu90mWrweRbjJzoKmNZv06aSWlq2O7M6gxAGaqaW/j/D6f+LHEXBSOSP8k+Cc1 bI7hL9IqCozXbVHgrxkIBF+cXBHlkcmkBOGY9yT4z0njBBoGkDetoeuecRbDPczSd51G0x YqguDTyieInXliILXtuiyRWahRHs+cB4MRhryeNF57prboR220DwhwGm1LvCpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719479306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ZUpsbFfaO/Cwypq/xwTX4UvwYAMyHviJ4+ut11uruo=; b=FwbtqtDc0FqA1Hu3k4r3YTFIoXUkgd59sU3zQ0oIAj8ymskG1+qk1UEd/M6BgwXhM5vyVg xbxpnC8jGK3D6SUVewHCFk/cQYbUbaWXArBV4PcUM25LKDKYd8ivXPnCrudBaAiKLlOYT8 6IF5fAGC6S2NDzMIkdGvgPggAQIa7LsVylTEZs1unXe4dO1usB7brmQWr+WlM3Ik8e4fpf E6AtXRalCN+8igPLK/pnNQcRfBLU6FFIQuFOHYg1FptaURnVgdgwJBqh449KztQBOv4hJ0 qJkCbK310G9n5Hjef9O+XwMvxiELIwATVA0UTIWfBoCeCxKOjo7gK8SJ1i4WTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8t5j6rNYz1LLp; Thu, 27 Jun 2024 09:08: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 45R98PdU028800; Thu, 27 Jun 2024 09:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45R98PNi028797; Thu, 27 Jun 2024 09:08:25 GMT (envelope-from git) Date: Thu, 27 Jun 2024 09:08:25 GMT Message-Id: <202406270908.45R98PNi028797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 2b9196bd3a42 - stable/14 - ncurses: reinstantiate bsd specific 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2b9196bd3a423cf9ef0b7cf5050ace66fed8f261 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2b9196bd3a423cf9ef0b7cf5050ace66fed8f261 commit 2b9196bd3a423cf9ef0b7cf5050ace66fed8f261 Author: Baptiste Daroussin AuthorDate: 2024-06-20 18:26:14 +0000 Commit: Baptiste Daroussin CommitDate: 2024-06-27 09:06:37 +0000 ncurses: reinstantiate bsd specific code This fixes ncurses 6.5 badly reading termcap (cherry picked from commit e402155e1ad7ec92a1fbd1712ce86c2ca43e1823) --- lib/ncurses/tinfo/ncurses_cfg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ncurses/tinfo/ncurses_cfg.h b/lib/ncurses/tinfo/ncurses_cfg.h index ced59c68e93c..33890f300310 100644 --- a/lib/ncurses/tinfo/ncurses_cfg.h +++ b/lib/ncurses/tinfo/ncurses_cfg.h @@ -60,6 +60,9 @@ #define HAVE_LONG_FILE_NAMES 1 #define MIXEDCASE_FILENAMES 1 #define STDC_HEADERS 1 +#define USE_GETCAP 1 +#define USE_BSD_TPUTS 1 +#define HAVE_BSD_CGETENT 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 From nobody Thu Jun 27 10:33:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8vzd2SZcz5PQjF; Thu, 27 Jun 2024 10:33: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 4W8vzd1xZmz4gLd; Thu, 27 Jun 2024 10:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719484397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=icfO/pSFzaCr0bYL5TQegoxvhUolGKXh02cELuKK7g4=; b=q5NSQBOaclCd25xWp5vs7KAcQiNtGjMHSXKKT4kWJfRuq3uiBbt+A15dLB8geljdccCxSM DkEofN7fMY6raI3z551ywrdk0lr9vxTF8vCIKeTBMESgMRQveOUyoneBBoiO81wwuelolc E87v57aBlvS+tAYnjkAIY9dqpkiS051IGkpJ9WR0vxxX9/NacejxzOyZY1s7YKUsqywnta c6o2W57FdMgwKDPNPafv1C+4TSs+I0/uYdqVv5hDmhtnbLfISw6RyM/DyXWFf8zWNCiOso B4gQd7p2GqREDe7gC/mb1tcXAwlTsTXMoKJcexU0zEYG34khjLTuGufK5smq2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719484397; a=rsa-sha256; cv=none; b=PlWPG19MmXbehB95Y7/QuziHuLlKPBY4yGk+Sj9+6mJr7JR4TJi6+wMJL4/mp5nJ/GiHap xODcRKZVuoEEFahtGMCBgB0tAOB/6gMK74BSsXhG/bAh8kDEvjHcO+tBK6LwXGT1AGHrQc YqRarJd2vZ7S9Y5xzOIN/Rw9G4vDihYHEnBCL6oDjnLuznzbgUMdF/uVuAeaE9Tlf0FBvm wF5O6m6XbOvKN6aerxcls/zx8boAiZpItXLXwOsC5lngFzFvbpIV/uvqV1B8JEvR4OscZ7 mNf0FGqfPxWLdjtqLpNl8w8TqVqn7jO39yHhCOissZbAs06DHQbY/oxfwZlC2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719484397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=icfO/pSFzaCr0bYL5TQegoxvhUolGKXh02cELuKK7g4=; b=K+tLz4vqXfwG2FjbZxwi9q7SRpTYtdtgvRiBCXtOAFpPA8vcnRaXBIwCZ/7HylDS6I+OlS j/uRdN28haPR1wl+gbj4jFx1au7wqzdm+hEgPTg/jOv1w8dxrwwUpbUhHaW/UT3RDMxwGs t5dbjYzcNsGZ7rlSrbZXoVbtQkSlIeeNsnzCH/AIt4kc4ik9eyNtUXTyD2Gihcfu0cvSig WQ9dSjQ4HxJMO9fu9d7qbyyaWE7+Ub8xaIftt/336LKjx/f27PoLUUrQF5cNTg0lBnRAvq 5P3Om0/KWtoYEQwUsKbwhac0DKpTO5AZDxeKIT3tQHdeaPZyhsD7+8s7MLNPog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8vzd1QR4z1Nvx; Thu, 27 Jun 2024 10:33: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 45RAXHZX079149; Thu, 27 Jun 2024 10:33:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RAXHqX079145; Thu, 27 Jun 2024 10:33:17 GMT (envelope-from git) Date: Thu, 27 Jun 2024 10:33:17 GMT Message-Id: <202406271033.45RAXHqX079145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 0deaf4be346f - main - rk_i2c: emulate repeated 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0deaf4be346f7f343bd2cf771bbf5d172d1c0d2a Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=0deaf4be346f7f343bd2cf771bbf5d172d1c0d2a commit 0deaf4be346f7f343bd2cf771bbf5d172d1c0d2a Author: Andriy Gapon AuthorDate: 2024-06-27 07:40:22 +0000 Commit: Andriy Gapon CommitDate: 2024-06-27 10:32:15 +0000 rk_i2c: emulate repeated start rk_i2c_send_stop is modified so that it sends a stop condition, like it always did, if there is no IIC_M_NOSTOP flag. But if the flag is set then the function completely resets the control register and sets the driver state to transfer completed. Something like this was previously done for a write with IIC_M_NOSTOP. Now it is done for a read with IIC_M_NOSTOP as well. Linux code says that the hardware does not support the repeated start condition and the documentation, indeed, does not mention it. But according to the Linux driver clearing the control register and then sending a start condition acts as if it were a repeated start. While here, add braces around a single-line 'if' branch to balance it with a multi-line 'else' branch. Tested with max44009(4). MFC after: 2 weeks --- sys/dev/iicbus/controller/rockchip/rk_i2c.c | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/sys/dev/iicbus/controller/rockchip/rk_i2c.c b/sys/dev/iicbus/controller/rockchip/rk_i2c.c index 4a431649de49..9f2a98bcea12 100644 --- a/sys/dev/iicbus/controller/rockchip/rk_i2c.c +++ b/sys/dev/iicbus/controller/rockchip/rk_i2c.c @@ -281,13 +281,26 @@ rk_i2c_send_stop(struct rk_i2c_softc *sc) { uint32_t reg; - RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_STOPIEN); + if (!(sc->msg->flags & IIC_M_NOSTOP)) { + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_STOPIEN); - sc->state = STATE_STOP; + sc->state = STATE_STOP; - reg = RK_I2C_READ(sc, RK_I2C_CON); - reg |= RK_I2C_CON_STOP; - RK_I2C_WRITE(sc, RK_I2C_CON, reg); + reg = RK_I2C_READ(sc, RK_I2C_CON); + reg |= RK_I2C_CON_STOP; + RK_I2C_WRITE(sc, RK_I2C_CON, reg); + } else { + /* + * Do not actually set stop bit, set up conditions to + * emulate repeated start by clearing all state. + */ + sc->state = STATE_IDLE; + sc->transfer_done = 1; + + reg = RK_I2C_READ(sc, RK_I2C_CON); + reg &= ~RK_I2C_CON_CTRL_MASK; + RK_I2C_WRITE(sc, RK_I2C_CON, reg); + } } static void @@ -350,9 +363,9 @@ rk_i2c_intr_locked(struct rk_i2c_softc *sc) case STATE_READ: rk_i2c_drain_rx(sc); - if (sc->cnt == sc->msg->len) + if (sc->cnt == sc->msg->len) { rk_i2c_send_stop(sc); - else { + } else { sc->mode = RK_I2C_CON_MODE_RX; reg = RK_I2C_READ(sc, RK_I2C_CON) & \ ~RK_I2C_CON_CTRL_MASK; @@ -369,7 +382,6 @@ rk_i2c_intr_locked(struct rk_i2c_softc *sc) RK_I2C_WRITE(sc, RK_I2C_CON, reg); RK_I2C_WRITE(sc, RK_I2C_MRXCNT, transfer_len); } - break; case STATE_WRITE: if (sc->cnt < sc->msg->len) { @@ -378,12 +390,10 @@ rk_i2c_intr_locked(struct rk_i2c_softc *sc) RK_I2C_IEN_NAKRCVIEN); transfer_len = rk_i2c_fill_tx(sc); RK_I2C_WRITE(sc, RK_I2C_MTXCNT, transfer_len); - break; - } else if (!(sc->msg->flags & IIC_M_NOSTOP)) { + } else { rk_i2c_send_stop(sc); - break; } - /* passthru */ + break; case STATE_STOP: /* Disable stop bit */ reg = RK_I2C_READ(sc, RK_I2C_CON); From nobody Thu Jun 27 10:33:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8vzf4Z9Lz5PR2y; Thu, 27 Jun 2024 10:33: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 4W8vzf3lPbz4grR; Thu, 27 Jun 2024 10:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719484398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEcSUH1JG/Aeas9moXD9n5XWTuyvtHU1HRUiPZYBvaA=; b=bmasqveNQwUr8qkdWwwu767BuVE6SXXeRNH4j5HNyfMkbVR1hLWRy/asI3nlntcdzxm8Xu OcLo0nf2ygDMq24rBeZ6J/KoRqUFPr2nto5aBcppSHd0rneUbY61jxZTKPEdkk+ArDhGPY BVOiRwtGkqH/f3CsZoi1OcdNVXYAfWF59CK59oLIPKcdWk7h7Gwhla1ucLbs8aYmrhiVZt X1tXZTKSW9fXzFk9KYRWnAMHr0qumEHw5R7/CZw+4YDeo6zOxpbMpu990tHiFNBY9G5P4B aG2UcPDY0PbzN6qrIfDVSLNPTx0U96dmZGdnA07cqmIxUS+FefuMPtNpA6An9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719484398; a=rsa-sha256; cv=none; b=hJtU5Uhh9R4k4qHTcu9mnj99VLTOjv9wfk28sM+fjD4QhsnvJynMCptQcRb1HF8JFmLqSJ G8nmu81BjbLAyBz93JHL0opKJleY4/K3i81EEPsvvMuTbPfoUA2zyjtRnvY8i5B+rpT0eD Aitq9QaDsD0eQmPtzEsi4DeNdOE/lpWHwYImuflj3mfFN7YOLELUCdJrIj19qQX8HyhCMY vBSzIIkpYVROFxILkAmD2gLK2nhO3GP4+DHstktogVulZg2pq2KVR4BezIafV8HwJ/lBPG GOi2VU3vHI8FNHIZ625lFZTqFxjdPJRbuomP/XqQPnHroSVgk6Q/TvXE2cGsig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719484398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEcSUH1JG/Aeas9moXD9n5XWTuyvtHU1HRUiPZYBvaA=; b=sMnTGmRRo6W4lJlVAUsQLodIBBSWgQ3hUz+CcD+bn4Dbfq/V1Ckis8yxs4jyOF2piBxkO4 1DhETLSq7TrMLhklXFwmXh/xkM/3CS1pV/kna9eAl/0F3hQRTzX28MS3N5hdkXSJaPLRWU YJux878uUyttfHQxszmUk3k5NCfOOV6mKsxpGO3cZHvzqW5HAChmFAyW9Ijwp3M4qI+orC Xcxx3L6SBT/YocUvTU/qO2rA0/yamW5etuONDMtODDYbKNsEG0SffKP4S1UMPiFUIDAkW5 xn9auiSUFfRMpAjD2z96qe8eFrruWOVfDsHzVy3SeDnBzrAKfuwv8gKm1ORY5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8vzf2SfTz1NKX; Thu, 27 Jun 2024 10:33: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 45RAXIbW079220; Thu, 27 Jun 2024 10:33:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RAXIiB079217; Thu, 27 Jun 2024 10:33:18 GMT (envelope-from git) Date: Thu, 27 Jun 2024 10:33:18 GMT Message-Id: <202406271033.45RAXIiB079217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: a743e280ea05 - main - rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a743e280ea0541163afa7d1c320504925a02f80b Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=a743e280ea0541163afa7d1c320504925a02f80b commit a743e280ea0541163afa7d1c320504925a02f80b Author: Andriy Gapon AuthorDate: 2024-06-27 07:48:30 +0000 Commit: Andriy Gapon CommitDate: 2024-06-27 10:32:47 +0000 rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP Tested with max44009(4). MFC after: 2 weeks --- sys/dev/iicbus/controller/rockchip/rk_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/controller/rockchip/rk_i2c.c b/sys/dev/iicbus/controller/rockchip/rk_i2c.c index 9f2a98bcea12..d9fcc8fa8a7a 100644 --- a/sys/dev/iicbus/controller/rockchip/rk_i2c.c +++ b/sys/dev/iicbus/controller/rockchip/rk_i2c.c @@ -525,7 +525,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) if (nmsgs - i >= 2 && msgs[i].len < 4 && msgs[i].flags == (IIC_M_WR | IIC_M_NOSTOP) && - msgs[i + 1].flags == IIC_M_RD && + (msgs[i + 1].flags & IIC_M_RD) == IIC_M_RD && (msgs[i].slave & ~LSB) == (msgs[i + 1].slave & ~LSB)) { sc->mode = RK_I2C_CON_MODE_RRX; From nobody Thu Jun 27 13:37:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W904L22tJz5Pk7v; Thu, 27 Jun 2024 13:37: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 4W904L17V7z3xYp; Thu, 27 Jun 2024 13:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719495458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wd3jjNWeKzU7FKryBGB21vbAMekqC0kLkKSRZubGXnQ=; b=RnQwFZM5VmPLGK7ebDGv/ps+VLD2VtH4IF+ZZPRS+qS9PQ6HXdUcIkm/dzBSqciViZ1DpI nhG6LKz44enhvUIIOigu2m8JBzJan5oeNUiayWTCwcTDef44I5ARvFB/cKSg4gLYzUEWw6 tfpGMX9K6M0+CK7jVPAvzvK2CBEtcG99+U+eTocNQTxNwO/Z5H5w7Kn+tOcohVcBuNHoi0 xtXQDpgUaTgpAoKvW7XWXQUheYSNlz6IUNVglUABJ2m8H8XJUXGxieCO/spjAoZfvIY4QT +MBZLBtrisZ7VBAgjrTirBViSnQbK3z2kZuNqmSD2ocCokXba0cLPPnkAbca6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719495458; a=rsa-sha256; cv=none; b=C+pbWL4Rseqjk9c3f1J8Zr8rLJoYhw3fT877K+UtubwoXtkGk1ah8xzwcQABuvScQOgyX2 Q/sIOixfzV/Fyr432rW+SLjg8O7VoyVGr78Wid0+ilgqY9dsJmkmbUZORyaAVsvbx7RA+r wKQvugLEltKMiik/F+vhAF3ObRacuA3U+vZzpsrTpGF53nWxNh+Faxb7a0E+rL6+5gczmL 8Utl4QSruSercGI1PuKHQZXwThvPBYwa1RSrDF0DraW2+2HMsQj+XmJEdic0NbJg0f2HkE g5g4Qwkjvdw2LjjwfJIg0RSC3dJy2xKXaBQ2ED/pNm/c1DX3cLTDgEjdeVJ4Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719495458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wd3jjNWeKzU7FKryBGB21vbAMekqC0kLkKSRZubGXnQ=; b=m2da2tL1YcfWHhQqslqffv8gmUCnNsNj5oAK/T5uUENR7b6Gfb4B1LPhCdfpy4656XT5JF H6TYodaTChgCfz8xFEDQFPD6UCslabDP9X9J4WLtRmIt+nYjzEBQVwLSsjX20GDTuLPrUZ 3blngrva8tBbddmWwDbTXTEK1AdAI/rJNH0iRwshnFrfqxqsnllCkDpHQcve2Atj2tY6j/ uNdf/8vLiIsvJDEefp0YUzcvnviRcx6ge0hCaV+AEH/rnbqdqWTAHPbFYzZYHNbnPHdPKI 1VoG843cJhCLZBkxkI7r3tBD6nkprjrs/MPmo2d7ebr+6Tzl4u69rU4FGbqGBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W904L0gZLzFMy; Thu, 27 Jun 2024 13:37: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 45RDbcvE082754; Thu, 27 Jun 2024 13:37:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RDbcHn082751; Thu, 27 Jun 2024 13:37:38 GMT (envelope-from git) Date: Thu, 27 Jun 2024 13:37:38 GMT Message-Id: <202406271337.45RDbcHn082751@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: 87085c12ba8f - main - Fix SATA NCQ error recovery after 25375b1415 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 87085c12ba8fa51f777bc636df67008b45e20d1c Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=87085c12ba8fa51f777bc636df67008b45e20d1c commit 87085c12ba8fa51f777bc636df67008b45e20d1c Author: Alexander Motin AuthorDate: 2024-06-27 13:29:23 +0000 Commit: Alexander Motin CommitDate: 2024-06-27 13:29:23 +0000 Fix SATA NCQ error recovery after 25375b1415 Since that commit ahci(4), siis(4) and mvs(4) drivers ended up using wrong command to fetch error information for NCQ commands. Since ATA errors are not very informative to begin with, the only noticeable effect is a lack of retries on those errors by CAM. MFC after: 1 week PR: 279978 --- sys/dev/ahci/ahci.c | 2 +- sys/dev/mvs/mvs.c | 2 +- sys/dev/siis/siis.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index b8cca377e47f..2910247d9327 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2175,7 +2175,7 @@ completeall: } xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path, ch->hold[i]->ccb_h.pinfo.priority); - if (ccb->ccb_h.func_code == XPT_ATA_IO) { + if (ch->hold[i]->ccb_h.func_code == XPT_ATA_IO) { /* READ LOG */ ccb->ccb_h.recovery_type = RECOVERY_READ_LOG; ccb->ccb_h.func_code = XPT_ATA_IO; diff --git a/sys/dev/mvs/mvs.c b/sys/dev/mvs/mvs.c index 253fdc096475..9677d16f088c 100644 --- a/sys/dev/mvs/mvs.c +++ b/sys/dev/mvs/mvs.c @@ -1798,7 +1798,7 @@ completeall: } xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path, ch->hold[i]->ccb_h.pinfo.priority); - if (ccb->ccb_h.func_code == XPT_ATA_IO) { + if (ch->hold[i]->ccb_h.func_code == XPT_ATA_IO) { /* READ LOG */ ccb->ccb_h.recovery_type = RECOVERY_READ_LOG; ccb->ccb_h.func_code = XPT_ATA_IO; diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c index ad370c99f85e..e5b0b8b1f009 100644 --- a/sys/dev/siis/siis.c +++ b/sys/dev/siis/siis.c @@ -1394,7 +1394,7 @@ completeall: } xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path, ch->hold[i]->ccb_h.pinfo.priority); - if (ccb->ccb_h.func_code == XPT_ATA_IO) { + if (ch->hold[i]->ccb_h.func_code == XPT_ATA_IO) { /* READ LOG */ ccb->ccb_h.recovery_type = RECOVERY_READ_LOG; ccb->ccb_h.func_code = XPT_ATA_IO; From nobody Thu Jun 27 14:56:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W91qG0bz6z5Pr2C; Thu, 27 Jun 2024 14:56: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 4W91qF6J9Tz45sK; Thu, 27 Jun 2024 14:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719500185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EyPhdXwRxFg4UoTLjdxQXilmiu9rFQZaCOwhDwD77zk=; b=rEWSdOGaCmGvkRysUemgPuIuQKvCxhYYA+VodI5jCnncS0vWDCapvKFPi9Q+IVAQNVSPmT CVlhXRZaBVleGLwhMofCloulMR1IcssjMRPWNV/JEk4iMHrZOxshIFAfQAv5F6NpRuo845 sCDZGd39RYLaoRKhJT1SU7u20LsLRkR42B6g/FYq3iGhOSDIAZ+wf5Yq7OmR623pPF2lBk uvkDkwdkJSw2QWN1g4ru6YDON0DfBsQHdD58CMHZ7NS3Hc1R1VcWvtsUUDElAlUoJrGIcw +VOXR/Rx9eKDCXLyaFil7bO7EiDJaZtohYFMcXb12KrcrXW5vtuxhcGEDkfcNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719500185; a=rsa-sha256; cv=none; b=t+W2r4t6VfclxQWWSA6osL0SwUxdr8NzB+LsdI/tKTF9zByVDVS07hRhz3ORrNc1vQjAME qKbwWacizXFfGFgmObUhUOPASXSK+2NsNTmvBASkqieWrzcoHwe4Q8Ima3g6X47YechJzJ kVCLF1chQ1Ar9etiH8Z1PTdo4EgxdJIdW2YW+nMARHUdeOs9HLU6vAAyCDDcrWRDewHs0G v19lFe9gxCIIuZPKA1gECmtjYIYJ9ULrUFJKcYnI4LoArQxJkIdJZSP611oP24tt3Ja20V Tp1IvFIKY+27LLKCUuJllsAFxbxplPIvq6Nz8YWXPQDMlSgIvowq2Z4SbLJZKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719500185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EyPhdXwRxFg4UoTLjdxQXilmiu9rFQZaCOwhDwD77zk=; b=mwjJb6ChneGUYoEvTMFQso3AazJzjuL91RWfOMrwUQtS/lBtYl8AzcQyiHvsHTONgxNrCl Cw4gO2k81opRuP8hRtFJu0o4dUsTdEoldiKox68lj2MjTKWk+UNGoTwpHJrDPIr1JyzKij ripaPV7VfWZpnJXyNh/pRjRh9zk/tsDts8LBrqkhEYh2rK1NK1b2bvezTbMVTgTlg0G+e3 m5dOWkhSa+1Aa61CJta/jpxuie/y+XfDXLT3dJfarHumntlctvgBF57CW/OUJ+7MlsA5mn 45Wwie0xHyJNqMRxIJosG/32h/0+MglaFjnTj9EtoFNyl5444L4Vp2S6QFc39w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W91qF5M5jzH3Z; Thu, 27 Jun 2024 14:56: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 45REuPOE016893; Thu, 27 Jun 2024 14:56:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45REuPa5016890; Thu, 27 Jun 2024 14:56:25 GMT (envelope-from git) Date: Thu, 27 Jun 2024 14:56:25 GMT Message-Id: <202406271456.45REuPa5016890@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: 18a27dd64129 - main - wpa_cli.8: describe better + tag spdx + linter nit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 18a27dd64129f4b11ba458065bb5bb883f6b4c6e Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=18a27dd64129f4b11ba458065bb5bb883f6b4c6e commit 18a27dd64129f4b11ba458065bb5bb883f6b4c6e Author: Alexander Ziaee AuthorDate: 2024-06-18 05:00:05 +0000 Commit: Mitchell Horne CommitDate: 2024-06-27 14:55:41 +0000 wpa_cli.8: describe better + tag spdx + linter nit "how do I switch active wifi network on console" "% apropos wifi" MFC after: 3 days Reviewed by: mhorne, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1299 --- usr.sbin/wpa/wpa_cli/wpa_cli.8 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/wpa/wpa_cli/wpa_cli.8 b/usr.sbin/wpa/wpa_cli/wpa_cli.8 index c484434f0b0c..4fdd892da193 100644 --- a/usr.sbin/wpa/wpa_cli/wpa_cli.8 +++ b/usr.sbin/wpa/wpa_cli/wpa_cli.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2005 Sam Leffler .\" All rights reserved. .\" @@ -22,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 24, 2017 +.Dd June 21, 2024 .Dt WPA_CLI 8 .Os .Sh NAME .Nm wpa_cli -.Nd "text-based frontend program for interacting with wpa_supplicant" +.Nd console utility for WiFi authentication with wpa_supplicant .Sh SYNOPSIS .Nm wpa_cli .Op Fl p Ar path_to_ctrl_sockets @@ -118,7 +121,7 @@ The .Nm utility shows these requests with a -.Dq Li CTRL-REQ- Ns Ao Ar type Ac Ns Li - Ns Ao Ar id Ac Ns : Ns Aq Ar text +.Dq Li CTRL-REQ- Ns Ao Ar type Ac Ns Li - Ns Ao Ar id Ac : Ns Aq Ar text prefix, where .Aq Ar type is From nobody Thu Jun 27 15:30:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92b25ZHWz5PtbK; Thu, 27 Jun 2024 15:30: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 4W92b258NYz49wb; Thu, 27 Jun 2024 15:30:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYvtJzbTGbbKVTfEgxq4Ae+DsCbHd8Tg8/K8a6dDi7o=; b=or1czDQAjQ5EdhFjfab3e3+5pAu0EHcSsR0bE2IeDKDJSQcQ3neonofqvPZWY75ABuxn1n nMI5ny5G5shj3QV1dLkjFUxC0GVAt3OWLM+e/sqq3hIncgWvNavn02eU40NGV3XtUBQw3H 6D0jVZkRDVsYCUtH9nb9ZyJejbKamiv29fOY9P1GZw30gyuJlwQyxEBlEA4JP8hM+MpUKo 2aMhmWweSSNvmJBHx4Oam+gZnF5cbj8mcuUVf+02M6Y1qF++VpN8fpwBOanrFF9faYcxaB gaPaSNKYzAJMGvbm3Z4L5aTwtJpVp6gGfT3CCrGf9W9bxnyGA68bM+7D8CxdVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502254; a=rsa-sha256; cv=none; b=JlugB2upDzbY/fxv9PYJ+tNzU8Mf/U3WF4Ta0klSThbkwKEu/O0qLT/8/vrUSR3aP7bx/s EwS5ZqFiQQ7q0jxQDGeio727RBqfv5lRUTmjMgQ4nUgi4n+MEOZKre9c8E8YRh5TiNc50r 16IJ89kEVq9yyJ0/H5UuSr+OcqVSU0Emc0L8nF+T55yjl/IYTM/w+N7m7gc+tgj+EWTjIX i0O+MKH7ndSEOITXD4PcEoAqQ9G0nL/9GDo6afXDxjPI06Up2C0bevs6JnpRPO+ojS9n/b TnSoWi8AMK3LIdjOaz4HN3K8JzLv7FGBjyeyWkXhdEnCEsbp371pSn8ydBeI7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYvtJzbTGbbKVTfEgxq4Ae+DsCbHd8Tg8/K8a6dDi7o=; b=ZjXGSDSyLY+hcIwGKhwKKhp6PC1GNLEsO2GgxBHdb2UZlxf1msONmVlnQow5dzomR+lCyO ACROi+kisH/Vq10VQqUqK+IIP5lv7448zf+dUAZ3lI087gt0njjKXBLwlEIkVLPe8bBgTo 96HFxant9KRoNw6l6bNyCsg7OCiszlkrGf9XypJlJPEtKEFfgqIIosnJ5ILgpd2o76McvT /vxlrACRd1NXLVkDH2olzjkVcF9yMMrBuFsjQyDsvQ8aL2fF53JEOjRLhuNGwXNAtpy6lT Ew8zjSVsc4dq2wbL86uMyxAg8BM9/4FEECZ6AKb32E3Gu1Fz1c518KiMJwmUtA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92b24mQYzHlm; Thu, 27 Jun 2024 15:30: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 45RFUs7q078382; Thu, 27 Jun 2024 15:30:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFUsIl078379; Thu, 27 Jun 2024 15:30:54 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:30:54 GMT Message-Id: <202406271530.45RFUsIl078379@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: aebd6d5b1fc4 - stable/14 - arcmsr: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: aebd6d5b1fc43826fe688d0ea1b6fd4cd11492b7 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aebd6d5b1fc43826fe688d0ea1b6fd4cd11492b7 commit aebd6d5b1fc43826fe688d0ea1b6fd4cd11492b7 Author: Mark Johnston AuthorDate: 2024-06-05 14:13:26 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 arcmsr: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 4f0ff49fee00dee624e13b2d305cf9dfee395b7d) --- sys/dev/arcmsr/arcmsr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c index ea37da30db93..6de4372a67ea 100644 --- a/sys/dev/arcmsr/arcmsr.c +++ b/sys/dev/arcmsr/arcmsr.c @@ -5238,7 +5238,6 @@ static int arcmsr_probe(device_t dev) { u_int32_t id; u_int16_t sub_device_id; - static char buf[256]; char x_type[]={"unknown"}; char *type; int raid6 = 1; @@ -5313,9 +5312,8 @@ static int arcmsr_probe(device_t dev) } if(type == x_type) return(ENXIO); - sprintf(buf, "Areca %s Host Adapter RAID Controller %s\n%s\n", - type, raid6 ? "(RAID6 capable)" : "", ARCMSR_DRIVER_VERSION); - device_set_desc_copy(dev, buf); + device_set_descf(dev, "Areca %s Host Adapter RAID Controller %s\n%s\n", + type, raid6 ? "(RAID6 capable)" : "", ARCMSR_DRIVER_VERSION); return (BUS_PROBE_DEFAULT); } /* From nobody Thu Jun 27 15:30:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92b40GDTz5Ptgr; Thu, 27 Jun 2024 15:30:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W92b365cNz4BN4; Thu, 27 Jun 2024 15:30:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXl0AGw1+aSVwJPA+xUy6cGhiHTtm3agon4q6WPSWxk=; b=C+oKP/mMIvU8bdajc7xRc2aQqlqo6IZErAAwzN0B1TkC4mYOszvCCuQ0o2gfYrbudo5eJg WaFW5k+BU1U/KMhszWCmcfxW+XP2hCScOFh5bakA7m7mGTCaPZgNbxsUtRR3jFk1IeDl4b CmTX6FnrJVfc0hvstExKeDAjuyyK58MXgsr/SRX7wrx7UaZccza8o++mNs5GCuxfFFP6tA AE+vk6/g3EPrcdqObEO1iEQjEkDCs1fpH48xX7BpyjAK75ExYExrnlC+6g4f0q1ZclaPHW yNpDz6K16QZEsPBXUjGemF1/4XL+83NFgUR0TWbACxh/fzl0oPS59J8CrajxsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502255; a=rsa-sha256; cv=none; b=otrw92PSMTJMgYV1CD3HwfTXvHl/Wu5F4z0DRTbyKZ/5l2WwT+yU57xLQzBr3Vm7ddiC21 PkwdKxxuQN35lSv2Y0NjXqZp9+RvOL0dFn8GKktgErSV0O5y3LEFuD7KZKV2nR+214hmG6 KEZ1KGGy9I3J7M4bbE0u7WmYRQHVQ4rgAl5A1WxWr6NJ0wf/WFPjm57agwJeL/XYZ+rTYc kSn+6yCbwjbocdsuWnF+vJB5sMPPfJG/vMUjfNYAY9BWhHwIzaG529QtKE101JFNCubeYQ 64MtRRZJm3uf7xqweEUuevMTrmiKbmoIyy3j/C41IkS5rLEnR+j/v/gm50kubA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXl0AGw1+aSVwJPA+xUy6cGhiHTtm3agon4q6WPSWxk=; b=lyZGe+Qh8y9MkYviEdrbAxlLylF/rOiE89bCtxh0mSQx+3UYle64hiAZFGwOjuVNtohr0r naDx8bo2Bn0VoWd+kF/9eqU9TBkLOBAaIgbRCB7xAu40rBMh86D5qtjndKo5M1H3IlRKg4 fuAgo4ciK68ofQ8jOqIFFdcXw/oQGPGGLGzY+P0B6EHNcI4pQ5gDZT1QDLBl1UTrWmF+kh MMcWndyJssCztLv+myLjV523VsM21nDj91dDJWSaRqgedVnH7dqJ0M2UBuJVI9+TxFlWNK +szz/+MoI8uFEAtA52EUKKLRlbSPbP0t9f3PSFgp9c7nIedLIsOS8iEA4VazFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92b35hfQzJ0S; Thu, 27 Jun 2024 15:30:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45RFUtYs078423; Thu, 27 Jun 2024 15:30:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFUtcm078420; Thu, 27 Jun 2024 15:30:55 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:30:55 GMT Message-Id: <202406271530.45RFUtcm078420@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: 0d96ceb1e1a8 - stable/14 - cavium/thunder: Use device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0d96ceb1e1a87348083a72fbd085e181b6583d17 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0d96ceb1e1a87348083a72fbd085e181b6583d17 commit 0d96ceb1e1a87348083a72fbd085e181b6583d17 Author: Mark Johnston AuthorDate: 2024-06-05 14:14:00 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 cavium/thunder: Use device_set_desc() No functional change intended. MFC after: 1 week (cherry picked from commit 5823a09f79499d426f9f57131be756ddc9be3ff9) --- sys/arm64/cavium/thunder_pcie_pem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index a1bd54d9744d..2841486c1442 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -735,7 +735,7 @@ thunder_pem_probe(device_t dev) if ((pci_vendor_id == THUNDER_PEM_VENDOR_ID) && (pci_device_id == THUNDER_PEM_DEVICE_ID)) { - device_set_desc_copy(dev, THUNDER_PEM_DESC); + device_set_desc(dev, THUNDER_PEM_DESC); return (0); } From nobody Thu Jun 27 15:30:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92b51Dbzz5Ptnv; Thu, 27 Jun 2024 15:30: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 4W92b50Byyz49rL; Thu, 27 Jun 2024 15:30:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6EO3wVkxD1SWMW9K91EVegw8u/UZwwnMY6tg29HYb/M=; b=uEvVUU3Itu+cZVNL6zDT6HrsNURYERRKVg2hwCLo1L6JZUJkVPPeQJGEaW4kQl/MGm5ddk jZc6K0Zxv/ddIQfc57hK4Kuxa3SuxP0DfLiPVo6sPvtrklPyx7YEUoDUJFiE52Vc9ExYHz iPbkpRc2stZgRLkvvnPj7Mcc3WT3cGINj2w6/J4CpkDaLk98E+7QDE9bmwg14rCkteVB2V /SEUqap8by53n3EjwFwhMcSK6Y0wdR2DDHMocTfSrWUaUBhT2+AuyLrdUMj5S+rP4U/q9z V5tlU2G3Lrken53ABnuQbLqjpq5fTezB4MlqIAKxtej2NMHLJ1iRVKeoPTYFmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502257; a=rsa-sha256; cv=none; b=YPEnCt/nVnwothlvSqdjX2NhKsKM7Yn6lhwMmsxCoCdLtqLH+5ybeldELUg4HiwoZKCf4Z DTupxIsQ9AlrmeSJIkK044dPSN6/sUdTHIgH/UL24XuitMlqCypWjQwTxCtxTqLyKuANOe 5K8EWAlqBJshiepUm2hyeM1qo9ThRhoknhjLX2QCTlvNvkrcRL4pGpVuv7QDpEd8CrviEJ xuhgsCR44fo6a4aYPjvIzHssco0QlCtW7ZD2IgfIqS8VM8wYhb3iDNlYaOnbI5IvUgHQ43 r6P/AandEEKzIn8Q6Clu0gqViXEd2MxHtluhps7TV1k6bXFmP9e9z/3LBQ5MYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6EO3wVkxD1SWMW9K91EVegw8u/UZwwnMY6tg29HYb/M=; b=yX0zE5ibIkDT7zuA+52vZFx6T5JHFP8DTut0gpIFrg+nlQP6/+p556ydaFhwXgAIpZ5CJJ h62b/mYx+tl/uqfPGOuYTiG8uOitHQq2I6yqG/BEQJIfiMMrTRphAe6h8Z2JbNa1lk2icr 0xO8+V1Jov2sp++wsV3u2Mmq2UAUbzOqVlijcuYlMITpAdPcANKSZZT1yD096fgHFUy6wR MR+d18tlzDKagTEi27PPfJRagcCg/VEE4ApC/G3r4mJvHEj6xIwuu6rqaBAyiSRSIZ6Csc oq6sBSQ83j8zwrki0711RMYTtqci4st1mmIio2nfTlBson0ePJ8fdXGLWN+m7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92b46glWzJ0T; Thu, 27 Jun 2024 15:30: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 45RFUuqR078460; Thu, 27 Jun 2024 15:30:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFUuvI078457; Thu, 27 Jun 2024 15:30:56 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:30:56 GMT Message-Id: <202406271530.45RFUuvI078457@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: 55156b1fc397 - stable/14 - amdsbwd: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 55156b1fc397274fa9985ecfa60dd2c69549baf3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=55156b1fc397274fa9985ecfa60dd2c69549baf3 commit 55156b1fc397274fa9985ecfa60dd2c69549baf3 Author: Mark Johnston AuthorDate: 2024-06-05 14:15:36 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 amdsbwd: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 1878529d2fc861ba2f14ec3c15bf373221883e41) --- sys/dev/amdsbwd/amdsbwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/amdsbwd/amdsbwd.c b/sys/dev/amdsbwd/amdsbwd.c index b04aa8564ccd..1dfe6c1b11bf 100644 --- a/sys/dev/amdsbwd/amdsbwd.c +++ b/sys/dev/amdsbwd/amdsbwd.c @@ -376,7 +376,6 @@ static void amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) { uint8_t val; - char buf[36]; /* * Enable decoding of watchdog MMIO address. @@ -414,9 +413,8 @@ amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) amdsbwd_verbose_printf(dev, "AMDFCH41_PM_DECODE_EN3 value = %#04x\n", val); #endif - snprintf(buf, sizeof(buf), "%s FCH Rev 41h+ Watchdog Timer", + device_set_descf(dev, "%s FCH Rev 41h+ Watchdog Timer", cpu_vendor_id == CPU_VENDOR_HYGON ? "Hygon" : "AMD"); - device_set_desc_copy(dev, buf); } static int From nobody Thu Jun 27 15:30:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92b6371cz5PtmP; Thu, 27 Jun 2024 15:30: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 4W92b61QWhz49x5; Thu, 27 Jun 2024 15:30:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D/kWh/Tc0rXSt9Pz6JG5uYJXEA8z8bNRZduojGHN7iY=; b=EzcO9AZJ9KQ3XRttzoHVsvLeuk3m2Nt1MEoRXcj1ev7j9loCdtaHpn1X9lcttPULGT92jy ImtjtHCFDNefnnelUuXkJ1+zi4dv9UwwBEB6bGQtX3VM1Hnnvf/8ETw7tAhxpyQkJfaQ70 YTR6O3qEaCKaWJf+jxaT+dSFIxqe3JWOQArBxr6Wwd4wJO9BLR9A5yZfjDb3hf3jPVPbT4 EJMm50JtqksV3Eyt71/pcsjrRrBdMO3oZMhS5D7nduTAyXiEp3ZGpof3G7MqKBCWsQWj9U koFkh2YOXjyZFsVi3rzehUcbvwzDyGLERzfGG2Y6jnfiI+5JatgUnm85CP/NkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502258; a=rsa-sha256; cv=none; b=STOE0t1SRYyMLns/Hw6MfPTWfw6ms7mfzyG+i0UFdzEwKMnjs+pMm53PxmjSY2uJN+UaHT 2ZWILS2NZ0BEc5M/Uglk42P4Tv0oiRdPcK63jZtGGCy9ZW9L2iH9Kh9n/6sZfcracUdi8e 6v622RbpY0h0mMWdkudNrYBBlpiwqZn9+goK+tgd0PW0qo/c8IyGMj05lOrZVDVXKqi1q3 gZ4BkkcR+2j3B4CTmikaTx+WAcYedJtLdWrxyJbO2NOqRWXecOj4wSXDs5XmVS19cqdR7R i1O3KgJpEF4Iv9j7oJViXV8llg/GFvYSu1uJFtX1KGNQf63rl3gtn6/6ThWZ/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D/kWh/Tc0rXSt9Pz6JG5uYJXEA8z8bNRZduojGHN7iY=; b=JBdfkpjfLWTUL77WnXXjU/ZIPqMOGmJZxv8YG1WFpKo+KIAJn6soxVW/IoSOj6wCAyfQL3 je6dASlj8MC5cxI8evzVV+PW5mXONL3ASqpk3hrhN4d/ASOSC0iWIhh1uHRcITYxE/pHV7 S6fynWbHWbWIT8pcCAumd4pzmOqToaKfpdpRQ2YINF46ElguXYFw3QE4R3yt5L14EnD19x Pzurp8aXNnYtn5pbwZ0ikN5vYkbFrkVJmsOGxFXhAxScfipZh/Wg3DDRw8Vsufk593YCYd 4sI2xAhEMKhGl9p6m1v7/evwXN8egUB/GpvLUmd8otq/aYd5qwWw7U4cLs0sFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92b60W5NzHQ7; Thu, 27 Jun 2024 15:30: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 45RFUvH0078499; Thu, 27 Jun 2024 15:30:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFUvBi078496; Thu, 27 Jun 2024 15:30:57 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:30:57 GMT Message-Id: <202406271530.45RFUvBi078496@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: b8ddd59d9d16 - stable/14 - amdsmn: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b8ddd59d9d166f0712b1739fe342558663eed78f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b8ddd59d9d166f0712b1739fe342558663eed78f commit b8ddd59d9d166f0712b1739fe342558663eed78f Author: Mark Johnston AuthorDate: 2024-06-05 14:16:22 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 amdsmn: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 48ef9cff9c2934d8a13eb8624c02050cd8f00595) --- sys/dev/amdsmn/amdsmn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c index 36e3c5a5cae7..5af8d9aca7bd 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -186,7 +186,6 @@ static int amdsmn_probe(device_t dev) { uint32_t family; - char buf[64]; if (resource_disabled("amdsmn", 0)) return (ENXIO); @@ -203,9 +202,8 @@ amdsmn_probe(device_t dev) default: return (ENXIO); } - snprintf(buf, sizeof(buf), "AMD Family %xh System Management Network", + device_set_descf(dev, "AMD Family %xh System Management Network", family); - device_set_desc_copy(dev, buf); return (BUS_PROBE_GENERIC); } From nobody Thu Jun 27 15:30:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92b815hdz5PtmQ; Thu, 27 Jun 2024 15:31: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 4W92b71rRrz49v5; Thu, 27 Jun 2024 15:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqR/K/yY0ky1Dk3Km0SeFURx+meeA8J5CAmX0muM83E=; b=ih978VNXXGU6TydsID0+h9PXKjduEPjYKyHe8HqYobr1FrSY4mTBEQEaEHt1t85z51u56n PR+TMtqAeDAfUDVOqyJi4nU2C51XN8r3uaHXIx4p6lnetgAwjanJkT2bdjkmVH7xkclG7x 0jo9uyUu0+6PHg1Wb5XxjeFvRsV12+jnA6nOYzSfv6mT7i9xtEmpqNlhHf9B7Bz3OjG2PH Awt/oZ9WCCLPr6r75MSpp6oVu4MTB1ULUO2eeBXUK8Lo1Cxf4Cjcdpf3rr6VEE+jdG5oOt oTirkmdVkkuT1sSgeMpEQq+O4Qe39igL3tna8kKeEXtflZ862DK0x0/7PvXznA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502259; a=rsa-sha256; cv=none; b=MMs5/4d5ChjnNer+ZSDZiqHrwZRG18uLPqnlLXfvHQ0VcvKhcFH7GIBNE+X/ZIs63sOXSX yS0slEdM2GHJKLBDELbnKSfiZuOSXlmYTYAbw0/t1BTd+0MJRE0iwrF8e272Wr3zsKTnTj 2iG21tv9yOLNW7KgTlMH6hu3EL8xGW9N5JEzlGpWUaJiGN/PVg1CO3tBYKyOhTdFpkV+jt OtqyQFcbXAhOdbDvYPrN0Nv7/cXsJtsyv9QzgMp1fL9h3Go/8e2dpiAaR5wfMuqpGiNKSm NKpnSMHmgixLRy4TRC1edCxkL+Ztmfm6coOtAeLzzElY92gVow7wo2jJWkh1UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqR/K/yY0ky1Dk3Km0SeFURx+meeA8J5CAmX0muM83E=; b=lf1VsX7pgVYPhd9XitMbrhHp80E3DheL7DAVVz22lZnyplvK8pW7knQ7VJKH3H6HA5aMcu J5Lh0/YxvDZ/iVOeptQYmlor6TqokwQWC2GtsHGBDqUwXjwJoHwtQpeGLVAOHo91xkMg+0 QOqeAz/vaBqqO1f1OBC/y5BKkUnIUgAQLJJEOOIanuXOcKLFbIdwXMEPCQ4LTDu1ZcSkCs v/J3+Dh1iE2ETyMbeyNHR2EeXQR1yycpBuaynWjyGN0NifPQycvXSiaFQMb75bPnlJ+RoD o5KhIIJEr+cec3hE+uo+QSsEfEjU9WIvsV7gM1lrRAsO5OvsYPiXxsaeK+4emw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92b71D6pzHQ8; Thu, 27 Jun 2024 15:30: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 45RFUx1F078537; Thu, 27 Jun 2024 15:30:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFUxB3078534; Thu, 27 Jun 2024 15:30:59 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:30:59 GMT Message-Id: <202406271530.45RFUxB3078534@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: e416932e18a0 - stable/14 - netmap: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e416932e18a0c4c8b485689a79224d2f0c98fbb2 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e416932e18a0c4c8b485689a79224d2f0c98fbb2 commit e416932e18a0c4c8b485689a79224d2f0c98fbb2 Author: Mark Johnston AuthorDate: 2024-06-05 14:17:14 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 netmap: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 44d36c9731c172977ad8a95a09c0d6fbddcc9b2f) --- sys/dev/netmap/netmap_freebsd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index a4a0124471c0..cf3578ddc7fe 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -864,16 +864,12 @@ nm_os_pt_memdev_iounmap(struct ptnetmap_memdev *ptn_dev) static int ptn_memdev_probe(device_t dev) { - char desc[256]; - if (pci_get_vendor(dev) != PTNETMAP_PCI_VENDOR_ID) return (ENXIO); if (pci_get_device(dev) != PTNETMAP_PCI_DEVICE_ID) return (ENXIO); - snprintf(desc, sizeof(desc), "%s PCI adapter", - PTNETMAP_MEMDEV_NAME); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "%s PCI adapter", PTNETMAP_MEMDEV_NAME); return (BUS_PROBE_DEFAULT); } From nobody Thu Jun 27 15:31:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92b84mdNz5Ptnx; Thu, 27 Jun 2024 15:31: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 4W92b82MyJz4B8Q; Thu, 27 Jun 2024 15:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qAX85gQ89giO6sAsB6EzOZTLZkfBct8COIf9aXvhTy8=; b=uqQoXy0dM5+2haQ2MzhneyPSmYo77u2I6JGitjyQQ+nl1Q3t3NFDwDsULy01nmHK6g7Ee3 6kZx3QJZGuDBSP5cq3kJe5vEwPtiVR1dSSo8XFwj4xCP0LL6k+x8MVc9hRRDNvpcSYgR50 8d+KAn9rTWak7UGpkf2S43zLZWlicexYhpMdqsbnSF6GpnAz5wYYjtm0PES1Vzl08y1YMe Ua0CgRZaIIy1bjBX6SD0STNWCOazfDUi7sGWQY2WimNmG8wq3/1i57t4BSUpYwflXPmvl7 sdCTVm2QILeCBq+Oj5PtxGT0p7dHWKn25ZDfSrr6NEzN0v70XM4k0cdCFYWlXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502260; a=rsa-sha256; cv=none; b=sOkAMVgo0GUNSxkjF+WKyMRHfX1JNcxCvKjQQ7JXFswLu8n3sgO0t4p7bbE20awWIdrm5i toyVt/ckrS+onfm118x53FnOdK6YALls14yzBzIUiBgyo1uBSmEX424/fzBnJhpCDBEvFB /vbgTu+vtmqMc2q7D76C1sDf4Q+OJ2+EEFHko3+SZy6YvEnZ1BxJvwA4/jTNrwuBs3Cc0Z Lpuic2GFmcYYJGB5lLTtgqEo23xGxt1OAP54/Wuc9nM2slc7qiNUTEJu8XXSem8xVG8D99 QF3BsPOIl6Gld4grf4gVAF807lnqZnNuyq5FcRrQerqOS6CN4y+yEULyiqnNPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qAX85gQ89giO6sAsB6EzOZTLZkfBct8COIf9aXvhTy8=; b=C/+mn1YiYV4poz83r5zgrbeOk+dAmz4KmSXB9Jk6HN/WK8y2iRD2SwL1/j97zQ65c/fTZf UqmcqKWyIJiAfB5+nIj+BV/Jfz3VdRfPu0yXJYrEmvw1Wr8jKZ/HB9t+GGWgERwIZcc93j Drq8O9zTZG4h8XMpLl2tzY142HFa8eCNIN4yJ0yt0pdB37gHkOTONdpd8MP6zN8Ji/HBUf 5rfBTVvcBFUTfs9ifxbeO8wTOYTUbcGPgRP4Uxd8jlbgktFld8BT5KkDLG2GekBKuamqol FGFjFqfoDG47TfxUnVMwpSgxwvJhlSH4EwXeaFgSpapiHMVNpDc2+8o+bQy0Gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92b81pTkzHQ9; Thu, 27 Jun 2024 15:31: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 45RFV03B078580; Thu, 27 Jun 2024 15:31:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV0So078577; Thu, 27 Jun 2024 15:31:00 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:00 GMT Message-Id: <202406271531.45RFV0So078577@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: b86ba6cdf113 - stable/14 - iicbus: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b86ba6cdf11385330f7d84022bc477ead676ee2a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b86ba6cdf11385330f7d84022bc477ead676ee2a commit b86ba6cdf11385330f7d84022bc477ead676ee2a Author: Mark Johnston AuthorDate: 2024-06-05 14:19:06 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 iicbus: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 48f5a429c95513465327f722a8df52cb48eeb473) --- sys/dev/iicbus/iichid.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index ff443afbf30a..222f20842a04 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1037,7 +1037,6 @@ iichid_probe(device_t dev) { struct iichid_softc *sc; ACPI_HANDLE handle; - char buf[80]; uint16_t config_reg; int error, reg; @@ -1097,10 +1096,8 @@ iichid_probe(device_t dev) sc->probe_result = BUS_PROBE_DEFAULT; done: - if (sc->probe_result <= BUS_PROBE_SPECIFIC) { - snprintf(buf, sizeof(buf), "%s I2C HID device", sc->hw.name); - device_set_desc_copy(dev, buf); - } + if (sc->probe_result <= BUS_PROBE_SPECIFIC) + device_set_descf(dev, "%s I2C HID device", sc->hw.name); return (sc->probe_result); } From nobody Thu Jun 27 15:31:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92b96Wjlz5PttX; Thu, 27 Jun 2024 15:31: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 4W92b935ZRz4BnW; Thu, 27 Jun 2024 15:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b8QvfAGbGFiQEfNsnqgylmSB9jOwMIlyiJD6EhSWvA4=; b=EbUUpTok7kU9dSaGAKWeCKoI9cpLqHVr1zyktlHYjH35pECwCmPuSk78OW9aPgG21a9tez dCni5jClxfK3ztnadMXKZWESW76wwQWv59tNOHpFiWElsXPr5pRqG/SfXDbzEoS2p/iTNu EqrDaOVKlMzLHQHUqnCLeDO4AXOAS/P0/gpONE5Xh19L6olbddsG2bED+TlD1f5kL3KveG 6hnkSp/WLuHrm67t8S8wwnKB7oIQa+njmiPPJuL0xcO4XXF1fPIcsO4z/GhAYsp/dIR/1Z dfFKBJdKGP0Bu0B/4my2XJxMf4nVIku6loHMTBtYPk7gKu2qWOixaR+kb8uyiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502261; a=rsa-sha256; cv=none; b=i6HwVFe66rBbt+NvIQJCE8CJJ3pmgH3iPl+1qMaGl0z5cV8XiCeHdV46oBrC5UhhJOs3jk Pv++g39TYXNOBOIn6PGlX5ZLfER6qEFx0mvAG16nw0yzDPMq9GZYJ4JEJGlxJMJJXhztoL fHVMqDxobyQq2eDWz5u0aCnn38C3M8UxhgZIIV7Q0KYozI63WSPNBmsiQPnSTeST0pNyYE 8lnYDdhxcMdNFHdF3jEcyYNz9jFHqSfvYSqSdPEtlDa1iHtyJDDSLzq6yHzzUqTqZ6s429 Q9oUT60bIIn+pSF4MrBE4IV4DveLj+c4KE70yhWFsTVSPuDLy3luihVD5YweMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b8QvfAGbGFiQEfNsnqgylmSB9jOwMIlyiJD6EhSWvA4=; b=RLCpvgG4FgmvyTxsUff0tY1XodbWnET4hFV8bcge0tLQ7KWVIbNlR4SXm4UTScT/7urFU1 k+5z7gGXvliBXjJLs+OYyod3MUZntJTiu30V8SYU401ZWKsUJ/eYTKS8rE858e8f4H3i9Q QmG/GVgUQzUfSOiPgvIEfpxWktFFBdkscu08o7CRQ+BtaR6K11ZiQWTKRuVaOZaoNoXCn4 bDXZ9mstGP3GznEb7VXCKL9aWAHUK3Hh3Df8pSkOaD+e4ee7Iq+DXfxHXeI8a1pX7xCf3x lEHPOlJ4jHOC+i6tqxyhurnkJOxHpQuMA/+2ZFKMnn7/1pjaYW1I3aXmAQ8EPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92b92WbBzHpY; Thu, 27 Jun 2024 15:31: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 45RFV1kQ078616; Thu, 27 Jun 2024 15:31:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV1vU078613; Thu, 27 Jun 2024 15:31:01 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:01 GMT Message-Id: <202406271531.45RFV1vU078613@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: 50d188a80585 - stable/14 - wbwd: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 50d188a805851febb238f4fce82f9d7f98249edb Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=50d188a805851febb238f4fce82f9d7f98249edb commit 50d188a805851febb238f4fce82f9d7f98249edb Author: Mark Johnston AuthorDate: 2024-06-05 14:19:51 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 wbwd: Use device_set_descf() No functional change intended. (cherry picked from commit eb634b9f4f48c29753e177f3340d03f73a75dbe5) --- sys/dev/wbwd/wbwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/wbwd/wbwd.c b/sys/dev/wbwd/wbwd.c index 4fe77c1874be..9aeaa2014eda 100644 --- a/sys/dev/wbwd/wbwd.c +++ b/sys/dev/wbwd/wbwd.c @@ -462,7 +462,6 @@ wb_watchdog_fn(void *private, u_int cmd, int *error) static int wb_probe(device_t dev) { - char buf[128]; struct wb_softc *sc; int j; uint8_t devid; @@ -479,10 +478,9 @@ wb_probe(device_t dev) for (j = 0; j < nitems(wb_devs); j++) { if (wb_devs[j].device_id == devid) { sc->chip = wb_devs[j].chip; - snprintf(buf, sizeof(buf), + device_set_descf(dev, "%s (0x%02x/0x%02x) Watchdog Timer", wb_devs[j].descr, devid, revid); - device_set_desc_copy(dev, buf); return (BUS_PROBE_SPECIFIC); } } From nobody Thu Jun 27 15:31:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bD13bkz5Ptr4; Thu, 27 Jun 2024 15:31: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 4W92bC4lg0z4C99; Thu, 27 Jun 2024 15:31:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmIwhnOx61R4gB6RMBw/LeJ6lud/9kiY5ZDt8IaqpME=; b=mpDE4LGnI6w28p/Ux4f5yXsB3Vj+TY03ZrrBrv/xZxmyPfQLq48l/zgohjZTIbKbS9GRKt oowOmpXus9tTUKY+xNNqS+eYi+L2qsncQ+6GF2GqEz5X1x+XzzwYZ/gbUIhcz4bF4ofA7L 2lwzVClNRHEQwCSE/F5yTMPnwPSUio93/32GkNbu+Qe7Gd7gA8i12JoqhKWLczWheASEIH IellDGdTcr6JOF0tu15hIlMvYmQ2vn9k1S1Z/qtJpagLH+U6LGOQJBlvgJhhCNw04R21Gr tcMogNDLbwSDIxeju7DLVfwWv0ph8StnuGT3/niwZBEEyuV3fiyIpE1bD41dpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502263; a=rsa-sha256; cv=none; b=w4w/iP6ieJNu3Yf4d9N5Ar2lR6I+BKAlXWv16d8n0t8khbKYt8V55cYxVrwll6T9QwOuVK HF5BhNPY0lrnPO3la+aeyjl6YIk/RiRSDM9mUfBE7yKt8K0PjhFhzNF86mLbWR8v6bnMQK DaLoaFgqi6sOJa28R4+R0WYjo0ScAerW5tCgF/yOCdAvXiluThqZltk5HML6CQSwSORSRD 8T5vA7iFBlbOVjMdWjnw6W7jqeoXDiTo/aqiA+WhfL2YvqmCYShq822KspJTIXzIAY1lkP 7BHRvpTSoTxwrGztVJeRKjCWKHz08+9q/OTUE+ICeUSn4LxRnwuM/vCAWUKzsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmIwhnOx61R4gB6RMBw/LeJ6lud/9kiY5ZDt8IaqpME=; b=HJxcjSdYk7+Khztv965LP6CHFj8aBl6mZX5FfZappntRsyR1Am89c+WiMX40rQe85OA69H sDrz0caoj1m1bUaANCfUvNOqGf6/y+nG2OpBM7M1HhoTVCEeS1GL0TTcvCev0YzqOFTILO V+MuKXSf3A5b/GICV7nRe24TrHKEKuD1Ve141lrgPGPD5aCi8nhVs7zS6p8PFQd5VIFKGb w0zq9+qSaHtKhfgpT/NOhbCL0nG5R3XZTtGjftyB3n5Erq0/SaC3zDLWhkgC7TK1JFhfI3 JHt1n+Z4V4TpEcM3GCCtf1NKH1SiPwdp5Sp0zi2dg308nPFSveBqA5kyySjjuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bC4MtRzJ7H; Thu, 27 Jun 2024 15:31: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 45RFV3P0078688; Thu, 27 Jun 2024 15:31:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV3G6078685; Thu, 27 Jun 2024 15:31:03 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:03 GMT Message-Id: <202406271531.45RFV3G6078685@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: 57d8375451c7 - stable/14 - msk: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 57d8375451c7eb53049f45064afd60bd4c311391 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=57d8375451c7eb53049f45064afd60bd4c311391 commit 57d8375451c7eb53049f45064afd60bd4c311391 Author: Mark Johnston AuthorDate: 2024-06-05 14:20:58 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 msk: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 443f33481e461ae1f36e0110537131b972ec6a37) --- sys/dev/msk/if_msk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index 4b6954e7d067..ea6157cbbec6 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -1565,7 +1565,6 @@ static int msk_probe(device_t dev) { struct msk_softc *sc; - char desc[100]; sc = device_get_softc(device_get_parent(dev)); /* @@ -1574,11 +1573,10 @@ msk_probe(device_t dev) * mskc_attach() will create a second device instance * for us. */ - snprintf(desc, sizeof(desc), + device_set_descf(dev, "Marvell Technology Group Ltd. %s Id 0x%02x Rev 0x%02x", model_name[sc->msk_hw_id - CHIP_ID_YUKON_XL], sc->msk_hw_id, sc->msk_hw_rev); - device_set_desc_copy(dev, desc); return (BUS_PROBE_DEFAULT); } From nobody Thu Jun 27 15:31:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bB6Qy8z5Ptdy; Thu, 27 Jun 2024 15:31: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 4W92bB4Z8rz4BKg; Thu, 27 Jun 2024 15:31:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PKZTvhuvknwgTba/mnxUOw6Q6YLQxfX/6VD8uk3QTfU=; b=Ww/oL+k+QP48bbtxOLAG7bGRiHsfFsYt37Tda25X6eFYxWt7htN3qyCJT4qGm5sMiUDQiA sAD2UAGXctpvnYGwcHtN94QLkupnMe+PqEHI6JaRYd/sRI5vUHUBHHfZsjz+2KuJi8peN2 1L2moUkr42pyl7/mKJry4Y4jxrwpiUFysuIVMmQl8jZDjt/3+HSBbFlNjN4hf4VjWiuMKJ p9YfNgGl2oPb8VXUB+NZqrObjRFcYiQ2+JJI/05gkvGtDWv7iVa9uz5Cp64pTL3bDSFVdv jvgdwfwIbPaMr0xzc1t2yp52B+XFjEQUj66p7+bNWZ+6kKvMrZO/37k5oPyO2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502262; a=rsa-sha256; cv=none; b=EDkDxzzR/CKvq3zYTbxc9+ZP3iWHr+eEwE9XMWnZnSCDDfuHVHXjdnrodQlc11zB90yIGo qr/4PJ6Hq5gJL+yhOM556VC03Lcy09q+MujxMHIZ00iwSI/5UO6vMMqQ3+SwfcrAHuDZ1M 1cXwih2XqoP31/jhRK1QhrP1Z+B+aNE4FnGpesJIlhJDqDwLpGgCA0Z9/7EBZaMZrYXF2m NtAxIsRlg8KrU1tGdCIj6/50/pVtjoMR1l0u+UprZ1zLPnvtsUa6F2jfU1O2l5j67/ry5/ n2mbva16tE0oHpexoLXGxTnbCiRfQyA717ELWOBpKUGl2zkVA3r8DCWN8HUArA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PKZTvhuvknwgTba/mnxUOw6Q6YLQxfX/6VD8uk3QTfU=; b=poJHmKPoQgg4MAiYE91KPXzBhPmtazXl6DSEQwmBEezXEwFFrPEJ5SK4LTai6pZBDB4Gfg 9Bvn6qr8EkjQc4SneOndkz/tStKQp3VBCi0XDhe182JGjIFIn0gTJW1VmryIIdVlF656k+ Bw8uMwwm6fBs8hPgk1JXMF3FA5ta2XgkZh3XlejWLblspJS/ob52pUu4U20cgGQviJVYzR VNFpD0BB2NMWWJnNTA5YHhRqhpT+1G+fZ93v70plrLWQIUNsWCgncMKm9tTforhPv4AG9G jLmf9WWjg5O2q8No62xy1EyKX9+mCyPQQ13dvDjYLsEZCQOKUBvP/SxsVF6kPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bB3HGXzJ3h; Thu, 27 Jun 2024 15:31: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 45RFV2bm078652; Thu, 27 Jun 2024 15:31:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV2BC078649; Thu, 27 Jun 2024 15:31:02 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:02 GMT Message-Id: <202406271531.45RFV2BC078649@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: 363ef77c07fb - stable/14 - mpc85xx: Use device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 363ef77c07fb8c0e4822c1a4561c8974897ac96c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=363ef77c07fb8c0e4822c1a4561c8974897ac96c commit 363ef77c07fb8c0e4822c1a4561c8974897ac96c Author: Mark Johnston AuthorDate: 2024-06-05 14:20:12 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 mpc85xx: Use device_set_desc() No functional change intended. MFC after: 1 week (cherry picked from commit aaa878e956761167f8115a32698c8b424fd341c6) --- sys/powerpc/mpc85xx/fsl_sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/mpc85xx/fsl_sata.c b/sys/powerpc/mpc85xx/fsl_sata.c index 16a8ec963b27..9279a8d43810 100644 --- a/sys/powerpc/mpc85xx/fsl_sata.c +++ b/sys/powerpc/mpc85xx/fsl_sata.c @@ -317,7 +317,7 @@ fsl_sata_probe(device_t dev) !ofw_bus_is_compatible(dev, "fsl,pq-sata")) return (ENXIO); - device_set_desc_copy(dev, "Freescale Integrated SATA Controller"); + device_set_desc(dev, "Freescale Integrated SATA Controller"); return (BUS_PROBE_DEFAULT); } From nobody Thu Jun 27 15:31:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bH070Zz5Ptx8; Thu, 27 Jun 2024 15:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W92bG07GYz4Brg; Thu, 27 Jun 2024 15:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NSj46aadkt36ZaSCJDokCiUH8/XM4+RZc66TJOT5HBo=; b=fWcp5h3fQoYbDcvxpmu9ZqOXLW4+Ifgb8wIdbHeBPp6w1VWftzpZ5o3UU0uAFJvw9XrW09 ThIopFM+20AWjELCN8mhjElOIKTdSC6eAoDkZJxC/0iHmMnGoRHAeHmf1+SnN2x/SrN06x 6PPbACdmKKVMpZfyUgAnbcS5NJRxCn53I3FLdCmIILVq2lF/UGp8kKT5foHnzupPd1wMLM 2tNMWOBaxe3EtEndsaI3t7BluZwevYf8tv1jF6nnnQoR7s7x4iAwfMZd8ThMcY3GUbk4J/ cF0M09wk4IAAWOpHAtGH7rGl4zeF6ZYXVg4fTVwR4h1PX/kWl526Fyd+zT4kEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502266; a=rsa-sha256; cv=none; b=VYNXH/EcewPMKuS6WD5L7L0hYfiVRq1p7MTjWlIrlXx59kEeF+u5QAhtqcB1M+xSejzh6X w12yBE6S6am8LmLIFUSXSpkC1GgsqrGm1ZFWr6AHjYPev7hGuAIU5RvAa4FFQjck6WIPMK KV2YnQP7lyE0jzyMc8sYBrkjM5gUz6ACvT5v+K3Bpy8f7fmkItqX4dThA3botuMCBcfX2/ NTdMcY0zKSu4tjIX8L7LL2opGDGk3CQhQPy9DXTNW6ulNNWIvWswi7lCv5mHSe7Sd1fa8h jiXaoBKPNEes5JJN8BKJB7AwZIjS7BQtPcd7SySucTyjRJ2Lw0wmR5nUUaWunA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NSj46aadkt36ZaSCJDokCiUH8/XM4+RZc66TJOT5HBo=; b=xG78LLfFNPIrGf9NWYATmPOIfstpeUbKvo30XoVSPMZ+ZhPkO4z9Q+HXtac30rJV2ev2V5 tsa4xV1NWiwmlRJ1IZAiMuL7trX/Mp2ZKS9nTMuzstHwtFLLSGLcvws0wJ4SHsFhebaYTQ odr2TREjCIlFdIEO+IKYyFeALvCHKEyt7oxczOL0pJGCOYDUrBTul5XiEIVz0kEC1bBFbJ PlrJfXovsQmFoaMCeK+4G0yqjyR74mbG4xS/N3DWfDL/9LTAHwQ71/sMub5MXWS7pw6ZI5 DeYaJKULL/00eCHXFN3AeXfRtCsW5TiaDp7+JNBFh2zYieYI3vUbeM73qu4Eng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bF6f18zHgX; Thu, 27 Jun 2024 15:31: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 45RFV5Eb078762; Thu, 27 Jun 2024 15:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV5pk078759; Thu, 27 Jun 2024 15:31:05 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:05 GMT Message-Id: <202406271531.45RFV5pk078759@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: 14dbc9a4b4d4 - stable/14 - bce: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 14dbc9a4b4d44a1cd8503255a4aa2a99365731fc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=14dbc9a4b4d44a1cd8503255a4aa2a99365731fc commit 14dbc9a4b4d44a1cd8503255a4aa2a99365731fc Author: Mark Johnston AuthorDate: 2024-06-05 19:22:32 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 bce: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit c0bd6ec3bb2414d23f3013766b79eed51b31f696) --- sys/dev/bce/if_bce.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 33158b75486c..2564d0c1dac6 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -671,7 +671,6 @@ bce_probe(device_t dev) { const struct bce_type *t; struct bce_softc *sc; - char *descbuf; u16 vid = 0, did = 0, svid = 0, sdid = 0; t = bce_devs; @@ -695,19 +694,10 @@ bce_probe(device_t dev) if ((vid == t->bce_vid) && (did == t->bce_did) && ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { - descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); - - if (descbuf == NULL) - return(ENOMEM); - - /* Print out the device identity. */ - snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", + device_set_descf(dev, "%s (%c%d)", t->bce_name, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); - - device_set_desc_copy(dev, descbuf); - free(descbuf, M_TEMP); return(BUS_PROBE_DEFAULT); } t++; From nobody Thu Jun 27 15:31:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bG2gHsz5PtkZ; Thu, 27 Jun 2024 15:31: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 4W92bD6n2Kz4C9y; Thu, 27 Jun 2024 15:31:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETp47ZbetvtbQ3ooPNN8XmKGrjey66uT12um0nZjTH8=; b=S1OnvjcqT1uqG1qZkMkKIezqWhKhiJW1VtFPB81Sf2rWb6t2X1hzzdngxXyt59KxSj3xyg bQrxYLR7Sl9dU6yr6aOBiuuzuGDSUvVNMr7QAz3mqfhT7MrsMN7j/CqlpfTTwRzKP8QMDX rzx62rN8xxm8rsUBEPw3NRRkV1OU9oqZc4YTbEGFmoWND2Jdv7Yqv5EC7eseJ2+j7XrRgw c7f5cLd8tXrfSTsCQUskOwqE5fvX635/9mQqxeEMmqaSbppinSuEBVx9KFHE3BI/9d0GKZ mttIwPPcsiavDzda2Vk3vx5Kf+j0KDqqDcyLPnCy6jdJhcEcCWyhr/LdvjqZSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502265; a=rsa-sha256; cv=none; b=NRpmxR8EWyT7Is0hzdwxokShjN5GPhSpYgUbFXAEYUKOe9OaIgMGHNOdDklUCAZRq/0MXy PVW15Le9Ifc74R8e03VZcEBwKYPN7XFbTDNDPkv6UJLYZp194zcR3Nk75P+dN4wvT3oh/z uL2vuYQ5f9e6wkEGr6/d6A484Pqz6WEPvhOKDS7hHYM1rnZXOlHtqkbHYb1hAJpbAJA4rR mLFg1VKm9UA7Nz6yN4E3z2b/FTf7TDcVB5gAkUMr3P6HK4I2taRVLYfOK3dIMnwOLH91yn THHwgeSudwmeQ0206ko6LfyT1TJuvxlCFPMFh9MwrmZphH/2h2DUPbGB1cGI5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETp47ZbetvtbQ3ooPNN8XmKGrjey66uT12um0nZjTH8=; b=aonf7PASlx0c7E0YDQC/F0VCsX5ZkL5rXJrfNFfvPdk3ylwQ1mSyq+iy25kryKIr6j501S Pld3DFfB1CSpU995bC/cSze6eXKLXDvmNInuU4FaR8jVHAvBSNtwLohuHCTh9MB2qDTKn3 JvqX32PKRCjP2qeB7zUx3tS+FD5l6JVTYZXJRlC62W7nWQUJlzw5wBIO2rD7fis0PuEHp8 XdYNKr6nqbZdCSaCpnGeZ2SJRNrbI3gz2n2U+IWqyfGsnLTLbsKGtZg6xgq4OJ8OFzPUIf cvzCpghcY/6k9LIqPUU6UAxkattjY+6SP5/7kJaVivbWp83kyaGePvTvY8cwIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bD5NmNzHgW; Thu, 27 Jun 2024 15:31: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 45RFV4xg078724; Thu, 27 Jun 2024 15:31:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV4D7078721; Thu, 27 Jun 2024 15:31:04 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:04 GMT Message-Id: <202406271531.45RFV4D7078721@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: d0983e084ba2 - stable/14 - liquidio: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: d0983e084ba20799ed59deb69f77e10a25d7ef87 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d0983e084ba20799ed59deb69f77e10a25d7ef87 commit d0983e084ba20799ed59deb69f77e10a25d7ef87 Author: Mark Johnston AuthorDate: 2024-06-05 14:26:22 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 liquidio: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 1794a0a87e0cecee1ef63fcf4f0a8a6cf6945dc8) --- sys/dev/liquidio/lio_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c index bec510af0c65..aa52612dda04 100644 --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -200,7 +200,6 @@ lio_probe(device_t dev) uint16_t device_id; uint16_t subdevice_id; uint8_t revision_id; - char device_ver[256]; vendor_id = pci_get_vendor(dev); if (vendor_id != PCI_VENDOR_ID_CAVIUM) @@ -216,9 +215,8 @@ lio_probe(device_t dev) (device_id == tbl->device_id) && (subdevice_id == tbl->subdevice_id) && (revision_id == tbl->revision_id)) { - sprintf(device_ver, "%s, Version - %s", - lio_strings[tbl->index], LIO_VERSION); - device_set_desc_copy(dev, device_ver); + device_set_descf(dev, "%s, Version - %s", + lio_strings[tbl->index], LIO_VERSION); return (BUS_PROBE_DEFAULT); } From nobody Thu Jun 27 15:31:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bH4YyMz5Ptth; Thu, 27 Jun 2024 15:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W92bH1YWDz4CMV; Thu, 27 Jun 2024 15:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IGe7A75tX6JUJ2VigcLiN/PXlzjKhbE99rFEPzlPhjo=; b=rW1LNPWSAriP1R2U9I5czTPEzMa02/577ky73BFFPV9QawZsI6OfI+r4ibSc/dLWx3K8o7 pYrk8GQA8UzU+gOHi47ODoRVYEEu0J/aatQSSvH02E9xwKm9GmrMftPFVolca9arrUuUxI afHCH4sLGW+c9jwIzJ/qRcqXYee3ZPCOAnw955QugL6VXcZzanvC9iDmY6wsUJf1sRmEds Zjj+RC/aLdkMpD2CIsO5bLdChBGyhVO6PxKLeM0+7sAXcJ6IsbgWks00ObCCs1+sTzwtUH GnCGpVmnCCTssv0ixFYimV5+o+OG1jQkeDaTk7aIHDmpMd5i84vH9HVdA8yudA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502267; a=rsa-sha256; cv=none; b=gzvmj0QzEbKJnJSw50YP+Gg3njS94JYDEIOrX5ROg0vq/a6sJ2esUWtFN+rvm6pOk0yos4 RaqJHa3MWew+DNQlsUGU4HFfsgSriulgkBGx7AXdaa51oIcleO8QYyUFzlYv5UytNcaUYo q24ZWtLxHq/MKRaWcL+GWCfc84bNYwYGLtKOHCltM5K0e6ZQcCej2ku2SaVvHNF86wlosq 1arzJ3JlY3wDX5JbQzTDBg/EesXAMwB20M9PUeIXxXjWlDGL8C0uw89AzqkzKPONyDeBPp ZoGy+GfilLR6RvgBYwmA87DIQLaDEGTgnD9MS09IE1QnhsnVZj5r4pWtoEJx4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IGe7A75tX6JUJ2VigcLiN/PXlzjKhbE99rFEPzlPhjo=; b=IdUJo7ZiIZcDXkAtVBwRHIuVtHdjQVW2lbGubMEybueOz9VhSm/M+PyUuE79kcyK/FxxYW ZlJIO3c5qN7k5ndCUveDznCN6USqlL/PKupB08NsicpD4KsCCEBwHfc8IuW/M7IE6Jhmv2 w7vKL+EjSL2lU0T7tyHVZA4uwLwtT9gjSWBuBUFPxRjSoaHhMMnjkzjTLDNh0Zxsrl2h6+ r4RZqdAEyGfWTTVFdCDQ0CrXAojvPKmAKEk2NhQ2eZxR3YZ2COXQGkrlRCWkaMjlWHvVvJ dRn2r4xVzUwLe7lTAdezmfMa2wHhorBLXdyQSObicECN6WKaWKflcWFeL4Ya7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bH0W1JzJBD; Thu, 27 Jun 2024 15:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45RFV6js078802; Thu, 27 Jun 2024 15:31:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV6VZ078799; Thu, 27 Jun 2024 15:31:06 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:06 GMT Message-Id: <202406271531.45RFV6VZ078799@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: 9f74e5edafdc - stable/14 - bge: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9f74e5edafdc91469ab72f4900e46e27cfe72f54 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9f74e5edafdc91469ab72f4900e46e27cfe72f54 commit 9f74e5edafdc91469ab72f4900e46e27cfe72f54 Author: Mark Johnston AuthorDate: 2024-06-05 19:23:26 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 bge: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 50505c853c6cf1a4e8fac54d20c43f0f91ff0c67) --- sys/dev/bge/if_bge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index a646ed226d3c..3e43b8e31442 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -2699,7 +2699,6 @@ bge_chipid(device_t dev) static int bge_probe(device_t dev) { - char buf[96]; char model[64]; const struct bge_revision *br; const char *pname; @@ -2727,9 +2726,8 @@ bge_probe(device_t dev) br != NULL ? br->br_name : "NetXtreme/NetLink Ethernet Controller"); } - snprintf(buf, sizeof(buf), "%s, %sASIC rev. %#08x", + device_set_descf(dev, "%s, %sASIC rev. %#08x", model, br != NULL ? "" : "unknown ", id); - device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } t++; From nobody Thu Jun 27 15:31:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bJ4Mlyz5PtxF; Thu, 27 Jun 2024 15:31: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 4W92bJ21Ggz4CMq; Thu, 27 Jun 2024 15:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gqtvgCZ/tzZqan8sTXagkbAGalkKteBsjyVe7kslCI=; b=jRec4R37m9KluX8iWRJA7MijYSFLOwFpXWjBEA4Cg7791aevTty6rDyJw6BDBGctYWdHna UcbKppsLUZXruv81vXUlZBaXIXSvepCFQAjJjj7rG49H7pd9PNAICy3a4hnzzS6NvJVpJy P1kRVV3Pe3Qy84h0Yc8MIZOPsUMRX71/dRW4pbLPbNeSSpRH2cu0MxNdkjoTeRcswD7dC7 8xh+fFjYhCSKcADa4ECsHM0cWLGXqrnsQekgPjhJMFpJMWA0tJKXUl9+AacCQiKoNG+Koq IniCSToZNUmutrt0K0jj6F+zN/KVdX8kwU19+yltYVt/aJVRR2PGuUlGblcHkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502268; a=rsa-sha256; cv=none; b=soaIixefS7M/vxM/e+o8Uwoy3eC8769Sd+i5bODFYX8M3so8tYRe6s20zPmOH8uYoTmqgD /amL4oEI39n4VIblfepaaBSjfnXXwA+VdxtvZ52K4ODm7HWYSV5/rvNhFtlJTvo1mFYG8M fklSeQaLni2LXlWBgZt7Oa8q47p3+RHMvZDxW4VaDEiPZOKoc27PRpwbFtvgLBIx0FnCot DJ1J7AL1GtJ4zu+wkI/7hMYhopR9romIMvlm30gZZjZuX8SBlESvqXcgKzorP9FiWN7SIl /C/RYwc9nid+RBa3KoaR4iRlBOC03/PO4BoTnfADkf5IkZ7SDQehqiWIrO0EWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gqtvgCZ/tzZqan8sTXagkbAGalkKteBsjyVe7kslCI=; b=V4bqpiVGuDoAf6FAKikslYjuvKXRzFk3F1vLTZmU4AaMbVWQKjfs6F2oMJYxXqyDZZ9Aak /3E3vKsQ1+xoB9/pp9RN/3uyh1mcy9ZxW+qJzaoiltXbr02y846WBAlua9TqUv4Rpu5M6W R1qgDZA1NRop84Q2jf2KGchQDG+u6Vzf5JDw1LWV/SRmaW64qhdgpx7PI5vqnbVws2p637 O79Fmr0TH32+FSz/nzCoPF9gnpp/Mxkz8VheNBnYCwMoe3+sIh/A9h4LawTvZA/i91ZmGF 0+HchKUAW46HkhTx9bjIJoeMej9lOOEnqukhvogD0yNYQ4CBDoyiM45aSjOtEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bJ1crjzJ65; Thu, 27 Jun 2024 15:31: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 45RFV8fC078838; Thu, 27 Jun 2024 15:31:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV8Dm078835; Thu, 27 Jun 2024 15:31:08 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:08 GMT Message-Id: <202406271531.45RFV8Dm078835@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: 4fcaee7a5f4a - stable/14 - bxe: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4fcaee7a5f4ac12aeb9513755a816bd5b2953fa3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4fcaee7a5f4ac12aeb9513755a816bd5b2953fa3 commit 4fcaee7a5f4ac12aeb9513755a816bd5b2953fa3 Author: Mark Johnston AuthorDate: 2024-06-05 19:24:16 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 bxe: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 9da1b6dc161bfd7b494ba472cde33af49ef8196f) --- sys/dev/bxe/bxe.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 86e396bad4ae..8524deeb354e 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -2489,7 +2489,6 @@ static int bxe_probe(device_t dev) { struct bxe_device_type *t; - char *descbuf; uint16_t did, sdid, svid, vid; /* Find our device structure */ @@ -2506,20 +2505,12 @@ bxe_probe(device_t dev) if ((vid == t->bxe_vid) && (did == t->bxe_did) && ((svid == t->bxe_svid) || (t->bxe_svid == PCI_ANY_ID)) && ((sdid == t->bxe_sdid) || (t->bxe_sdid == PCI_ANY_ID))) { - descbuf = malloc(BXE_DEVDESC_MAX, M_TEMP, M_NOWAIT); - if (descbuf == NULL) - return (ENOMEM); - - /* Print out the device identity. */ - snprintf(descbuf, BXE_DEVDESC_MAX, + device_set_descf(dev, "%s (%c%d) BXE v:%s", t->bxe_name, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf), BXE_DRIVER_VERSION); - - device_set_desc_copy(dev, descbuf); - free(descbuf, M_TEMP); return (BUS_PROBE_DEFAULT); } t++; From nobody Thu Jun 27 15:31:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bK5NQ4z5PtxH; Thu, 27 Jun 2024 15:31: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 4W92bK2pLrz4CQB; Thu, 27 Jun 2024 15:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNlk2mASKQG4LQdJNKOKRJS2e7hVXDxJ1Z3z53q2AnY=; b=C/N1cFdqSO2EK9fCD7k6INWp0ahFbjUB1ouDIL37a4m5n4Zyl3yJQw3WFGSFFMzBxinof7 nKIpQuzig+txEVo4J4xhIkJq1qLf2bwpdoas78ACE0o8NNFHToLUl2LeH0jUp+3PVpEy2d ee9IR+eaZvXQ+9K0VdQGZxt8LmHDg0N/SFceSWyGGylUzjC9HaqyR8/3D/b1S0cSeHbv1G rcmW3gUlutCToAXpRs1NsRqBHhAOrPxyiXoGemW98YKpgUAMZryrXk8djSyT9epkzADvlp 151TBBz2hR/SYY9/PlBNKGs5aQr1A/4si/De5mxqJW8x+BToqjjCMQBzaqL+ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502269; a=rsa-sha256; cv=none; b=lZnxoQ1il3eycakE5S+m77Rb4woI8h18JlbY1W3ZJK5Xh18So8udES2kP57hHFHdjZCtuh cdqcOY59SIbbjrV/h8/CUo/YrszPPDkS+fIElR6zbuWq2QARfPU1ss7133DetPdQpeCx3t Y3yZxSpZu+HPiOkyVlEeLXm0EXxQVlobaPYANm6XJxWZPqb9YlV9a7SgnlFu25chBhI+UZ vaBbp+m0CBrN+ZLimvDcLevBNuD89TDBbGa5vtarvIVAmg6/AKEiHL9qw4bXRM6bwJq4du NIHcVNmIbhwv1raxjI6CWAGk+IBRS5YGiG8CJcE2wR5VgANgQ6tOVCyq8Do+Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNlk2mASKQG4LQdJNKOKRJS2e7hVXDxJ1Z3z53q2AnY=; b=vw+iwmw5EJQ6OnrxzPK2GX/3FLQuNFvV0HvE8SZ6jar5XC8LcWEzPN8rW9j6pTSAzP/a5N tTyS8l8gUCh9R4i6PyIXO+mTLnTshXbfEJ/eVglCcoGP10WMyKUXfst5AwujbRJEY7bHOn z4EDrOqBCWAzpXoWJznyxzJ49MqGEWp/q4k3A0KhnYWucRBWJasZTNLvrnBqtkDnXZTKZ8 UJ/3fNv0d/Z0MD8SsMmfDQyZjm2vZjUjFXQG+0DiFsZo1h6+2gtn6EvpidIyrWpeVnA+Oc SSfeUVohC0UpRMoBja+uDP102AAkjh/KmwNfCfMRqFxosEUIOGiGdh+IjR+pWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bK2Q2fzHcq; Thu, 27 Jun 2024 15:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45RFV9Tq078874; Thu, 27 Jun 2024 15:31:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV9gp078871; Thu, 27 Jun 2024 15:31:09 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:09 GMT Message-Id: <202406271531.45RFV9gp078871@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: da334b4f5431 - stable/14 - hidbus: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: da334b4f5431599addb7bf88f5a7764b809422d0 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=da334b4f5431599addb7bf88f5a7764b809422d0 commit da334b4f5431599addb7bf88f5a7764b809422d0 Author: Mark Johnston AuthorDate: 2024-06-05 19:25:05 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 hidbus: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 3f795763e45326489ab707c369b8daea495f6562) --- sys/dev/hid/hidbus.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index fd73136c289f..c2f8f58552e1 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -526,14 +526,12 @@ hidbus_set_desc(device_t child, const char *suffix) struct hidbus_softc *sc = device_get_softc(bus); struct hid_device_info *devinfo = device_get_ivars(bus); struct hidbus_ivars *tlc = device_get_ivars(child); - char buf[80]; /* Do not add NULL suffix or if device name already contains it. */ if (suffix != NULL && strcasestr(devinfo->name, suffix) == NULL && - (sc->nauto > 1 || (tlc->flags & HIDBUS_FLAG_AUTOCHILD) == 0)) { - snprintf(buf, sizeof(buf), "%s %s", devinfo->name, suffix); - device_set_desc_copy(child, buf); - } else + (sc->nauto > 1 || (tlc->flags & HIDBUS_FLAG_AUTOCHILD) == 0)) + device_set_descf(child, "%s %s", devinfo->name, suffix); + else device_set_desc(child, devinfo->name); } From nobody Thu Jun 27 15:31:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bL5DLxz5Ptp9; Thu, 27 Jun 2024 15:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W92bL47hYz4CRQ; Thu, 27 Jun 2024 15:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n0IgeZschpdKCI2wQ2pd7zPPfAX2W9j+Ic4Yc1ukFbM=; b=h0iaN+9tsQPbDBJmJoPkaVEmgRUEki2GojstXl+I+tuK9iA2ESkrwuSLRySDXv8Af+8hwc AEziBj9KnS6W46MGYRQfx20ej6RNQS7WVefMFbUwZkKlLqp5gt63UdZ20AQuTWh8kf4Ygp Rq69IpyERVDnYRQkX8UaCjgyQacbvLjNOre/G7zTciGJ0m74zOZh+fCxWrKCPrVygpWNNO 035OrQjDAzIyPNwa4YLxrBZehoxcrvX10l81KLXhD06tQ+MWaJIMrTkQJEyDvNvXqU6fgE 7bxiB2CWZG8/rwpu0/UMYddPkjw4UF87vb1w95v9nRvZo2kF+qnFZD3kUc7+PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502270; a=rsa-sha256; cv=none; b=Z7JXSwThqNC+gJ9IiAXbSOQuT2/XW3KyWChIC5Fh2EfycvvZ+pf8A0FuwkTSfbcUjslVDT 6Gl58YOIPRdHJbVHG3t1VR+uKC+sUWpM5qyCeEUf+L1UGERpI/xZvMyA9005UGRmztwZn0 csvOPDuSAijsHMxFC+O0Qxl7ZMTurdfaDmakPhIwTWOGWK5ujmnBAIMGrGpoMx+N8MOe99 tjXnQe+pMSPcvXAuRresJ34t+zQ/BIbXxXW3wElMze7hcKBgV1OGcnH6nPtKCVhTkWE9Jt T0ndnUuQ6w/8bmdnwG98WgaUxZys6xEpvVKWuX5p8jVBc6j7Hty3oSsT2AEjXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n0IgeZschpdKCI2wQ2pd7zPPfAX2W9j+Ic4Yc1ukFbM=; b=wLlwwxc5dqVJvQQsEzOHiTnq67IwJ3ksvSdnAW9MS0qNUqbccwC4IKpwZ21qJcJc8fFFHf ihx+cg3wFLmWtLRYsp61VGcrdVqFAxifX8NHNmvEIfVTdasIT8DTAPnXqDzrP6gkWAy1Fp 5HkgDE0Cz8JFZmtqevD8jaA44cShuC30DtemlcEEBzcuzYsOozH2EsWEG3qQlnvXYeCWr/ byuK7ODcwE78mwrxM5zc9O8S+IJAEzoCKt4aDzjurfzBql67/85HgNG1HCOSiFYG6kv8te vpz17eo3Q7YeMHJXDAtrE6k2/xBbcP7LplzfLIoo+gaZuwnmlCgCJLVYRMWA3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bL3lPbzJ68; Thu, 27 Jun 2024 15:31: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 45RFVAN8078910; Thu, 27 Jun 2024 15:31:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVAXs078907; Thu, 27 Jun 2024 15:31:10 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:10 GMT Message-Id: <202406271531.45RFVAXs078907@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: 2e382b3bc8e7 - stable/14 - superio: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 2e382b3bc8e75583e2b260e88d5b38ccbfd1112b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e382b3bc8e75583e2b260e88d5b38ccbfd1112b commit 2e382b3bc8e75583e2b260e88d5b38ccbfd1112b Author: Mark Johnston AuthorDate: 2024-06-05 19:25:58 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 superio: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 76a79178187f5a3ac05733e068c0860b14fd8632) --- sys/dev/superio/superio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index 6333cb06a7c1..ff05d378ce92 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -616,12 +616,9 @@ superio_detect(device_t dev, bool claim, struct siosc *sc) if (superio_table[i].descr != NULL) { device_set_desc(dev, superio_table[i].descr); } else if (sc->vendor == SUPERIO_VENDOR_ITE) { - char descr[64]; - - snprintf(descr, sizeof(descr), + device_set_descf(dev, "ITE IT%4x SuperIO (revision 0x%02x)", sc->devid, sc->revid); - device_set_desc_copy(dev, descr); } return (0); } From nobody Thu Jun 27 15:31:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bN0K1Sz5Pttr; Thu, 27 Jun 2024 15:31: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 4W92bM5Dfbz4CRp; Thu, 27 Jun 2024 15:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bXwV8x7w/ZLE0c9rTNwKsAkq0+JZaW9dBzF0SksIgd8=; b=Z/tlycQoVQxMMF5H4c7e4Dh4xmdUg662/YmMCtrsndOstXie0yWpXfEia9bU1FA4/pMYkd G+D7iaooQPww2+P7xoZQy/U1KZHueutKNUMMFeS4vku8vMJj0+VxrnO3AVpNWtDEAZowxJ cNmTuiXzkBQ9jcZz5GJeKRp5ORiUgHA6Z1taDNoFWhJqIk4mcxR5qRvDr/m2YZHOCM/IWW Af+RsSusHTltS4M32QIDZqsmwQfLyrvJQgQiELcutT4QnMGLeoESYJSyH1KVvXBL4iILC0 n5FJKTAnV71pnvKnaFy5gLBUZCD47HK9MZygm3Q1HP0J3wwDjr0Of5/wmQzpIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502271; a=rsa-sha256; cv=none; b=VfEuAfdHmgkanzzz8k9xeKg2EELMFVmgh85wf3LzUFR2MaCisNc6frPIfZyesaQpVOtXNa ErQryyxjMyAW4EzK9MPtvsfYFR4DYQlWz0a983Als/EmnrDZgBBNGUPjAFoDC+iI4LNpwf Pt+wxN6BgXBZBkjXjf5bV+Vgwhx0gZPlxymqejrWFMno2zfgCLKjbXIcrfzLG+nDciRwvW kmM+MONo7yVJseDYTBl9OBrvw8yZppb5QOah/Oj9kFNVDUExCxYnN5Qyn4JxStyr5yncIh 3QG+uG5TPil6zC5fDGE1l4yxE9PYiXTJvfWJ6qbRU9/e0Hn4dpJxVwJwbqaTbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bXwV8x7w/ZLE0c9rTNwKsAkq0+JZaW9dBzF0SksIgd8=; b=ccuH5HWo67ne8V7uUQ8sdxgRufz5rwDib7QL2bbtEzUs7Lu/s1xIPHVW8rVOUblI5DUDTm JgGwv05G/aVGxDENptqzR3wzXEOATtl0xsHSGPw67AEJ4fPyxnyDP92Rs0o+qSHZQGE/bl BsPHQnkdzJNQVV9MzJD8E5JfyvSlw7Guu4zdnNofN/v5uIJp04MQhKVyNMB6+nKLV+JnOF T+7vyDYE0ZfqTeom5/usKza1hU/a8zbzv06A/Owz8SxiHdHE6H03LiG4703PCtURgHl54x 5GQqvY8a0n0VAVIDIz5TeEGT5kJStfMblPeBYSbdFAygdUfEMf9hudV5urYLQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bM4rlwzHgZ; Thu, 27 Jun 2024 15:31: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 45RFVB2C078950; Thu, 27 Jun 2024 15:31:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVBoG078947; Thu, 27 Jun 2024 15:31:11 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:11 GMT Message-Id: <202406271531.45RFVBoG078947@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: c07458f1931e - stable/14 - cfi: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c07458f1931e27846cf260d5f0552149878a1cf1 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c07458f1931e27846cf260d5f0552149878a1cf1 commit c07458f1931e27846cf260d5f0552149878a1cf1 Author: Mark Johnston AuthorDate: 2024-06-05 19:26:50 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 cfi: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 2ef1f61df2d5961ffff1205d4800e46efadbf5ba) --- sys/dev/cfi/cfi_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/cfi/cfi_core.c b/sys/dev/cfi/cfi_core.c index 4e137140372c..9554a710d8f2 100644 --- a/sys/dev/cfi/cfi_core.c +++ b/sys/dev/cfi/cfi_core.c @@ -194,7 +194,6 @@ cfi_fmtsize(uint32_t sz) int cfi_probe(device_t dev) { - char desc[80]; struct cfi_softc *sc; char *vend_str; int error; @@ -279,9 +278,7 @@ cfi_probe(device_t dev) if (error) goto out; - snprintf(desc, sizeof(desc), "%s - %s", vend_str, - cfi_fmtsize(sc->sc_size)); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "%s - %s", vend_str, cfi_fmtsize(sc->sc_size)); out: bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); From nobody Thu Jun 27 15:31:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bP1sjbz5Pttw; Thu, 27 Jun 2024 15:31: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 4W92bN6Ynrz4CSJ; Thu, 27 Jun 2024 15:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UXcBYcJz0UOAc2RGPqm/42yJ1R9vpMJ+sG9TfTkAQ7c=; b=TcxSw9iZr9HDeUX7conKRMvYUx0cCTmjZ3iIK3NoOQDlqt1nFBAYUg2zAjJB36AlBFc8EB awuBVdqSFPmYCaZU1b6lLQEHLdE9nSkDucrY0ck+tjKTkkyALqRF0Vz9V3Vs//+wBKZX09 wd2MkXBadkig5lDv2CDd9oPbjCCBveSiwQznc+cbj+0M18gDRK8KOHet/P8BMTfz5DRiXs kanAPegCD6iycgucorG+o/uv/7yClt/lYV7GWtBTm1zFlaxkKe3yw1aJQNDJbmgfUBk06v wl0/ZUpSpy+1lTsKXWOnQmdBcXhdvA88DloB3VuoZr/+UwPuy6G1ZK3g/aSauw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502272; a=rsa-sha256; cv=none; b=fuDHpg7lSzTr1iKjsWRjDv95CWiahFMN8B04+jSFd/JV9b21zyX6AJm0usezJCEUJzGlGe MD/6+eX6w25bYl2MfZXmDhp4e/1hIgANT47CFAUhtyWWT0xKoq33WlMGibqWdhyLgfHtzR 8oMW4wR1YJZjAE37ZrfFnjQ/Zii3IOaeF6Q+Y8G0lnRpMWEKcIlCUHRnuxZRnvGlh3Nj94 GLD7ULOdxCymyebE9VEctm4hPBkky1XLmj5hRoOvVKSeEUf5Yh93fBiJLchyKE6oUAfOsM KgWDu7TeRKC41e+dwTFquhnUGLbBFUUqsYM9JWH6N57yYUD8H9mzVynTWN+WtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UXcBYcJz0UOAc2RGPqm/42yJ1R9vpMJ+sG9TfTkAQ7c=; b=MmAdtZ0toCU6kJYxXrygqjg7rV9j+HmQvmm2igJfWpAvD8ePVUEeJ5tpkSfjlN8gs6ioJ6 kAOKyUbQD3GvdEF6P8c7aBCiDh6qtMBGekZ2XDD7xRknq4KuPJKt/ot51K3nkvvxz8iNCz 3+WAzybCi9yfCw+0I7TDwvN46nhBD0QbV4YhQADlbS85DmB/CYOffKE2+NyMMSDzclTY/f WtoQ85FuyIxiWUN/LJ0ZtVwfZpo6I1xVWtKrbipyz6WhoSZ05l+owyvM5wG2xG3RDa91ce kY2mg8dmqegq6occ0IdRoc34GS2u/n9am8hS6AZV8tfwkYvPlG038P0QsdMnwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bN61q6zJDH; Thu, 27 Jun 2024 15:31: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 45RFVC6x078988; Thu, 27 Jun 2024 15:31:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVCHp078985; Thu, 27 Jun 2024 15:31:12 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:12 GMT Message-Id: <202406271531.45RFVCHp078985@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: ddb9040fc2e9 - stable/14 - oce: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: ddb9040fc2e972f99f379f9f18f551ee854f9107 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ddb9040fc2e972f99f379f9f18f551ee854f9107 commit ddb9040fc2e972f99f379f9f18f551ee854f9107 Author: Mark Johnston AuthorDate: 2024-06-05 19:28:13 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 oce: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit c704b87ba679563cb8b344da69aa3cb7118a10b0) --- sys/dev/oce/oce_if.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index d7ec58ec1f5e..2084b9c84fff 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -252,7 +252,6 @@ oce_probe(device_t dev) uint16_t vendor = 0; uint16_t device = 0; int i = 0; - char str[256] = {0}; POCE_SOFTC sc; sc = device_get_softc(dev); @@ -265,9 +264,9 @@ oce_probe(device_t dev) for (i = 0; i < (sizeof(supportedDevices) / sizeof(uint32_t)); i++) { if (vendor == ((supportedDevices[i] >> 16) & 0xffff)) { if (device == (supportedDevices[i] & 0xffff)) { - sprintf(str, "%s:%s", "Emulex CNA NIC function", - component_revision); - device_set_desc_copy(dev, str); + device_set_descf(dev, + "%s:%s", "Emulex CNA NIC function", + component_revision); switch (device) { case PCI_PRODUCT_BE2: From nobody Thu Jun 27 15:31:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bR3b6tz5Ptkt; Thu, 27 Jun 2024 15:31: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 4W92bR227zz4CWy; Thu, 27 Jun 2024 15:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3vKgaYU/foqGH1GtkCBCB0oT9zScUY67/O0tRYWWbE=; b=B6FT3ccCctZFeS3Zr6hkW2S4ZoRGMcu3tuIkz50QBF37yxAGFSF1ksQMyCM4tpisslse5E NXJEYF6INz75lISIWHG+Zus1syIt49p9mYXM7AcQjuyd4uYagsQPnAv1FGN4XPGM+sBSS5 pqZv+jvek4wAPdB2FyUAnKJBirW6phh1g12WLdv2pdKL55cMi61B6Ea8v5IYmJTOf8BwPf uox7bXT+UOryKi+gWvGfhzyu65wHm/DM8zN9fgbeLRiqVVaAnHSOivIDeYcAiiPtWffCHI W3r62HW/nmOqo01bqWR8lTni2ztmxP4orzlcvcUkvH4nS61D/YkOnhm9FFBTpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502275; a=rsa-sha256; cv=none; b=jXq7WkXenmdtKO7TcRKDV3Tn+2O7Zr1xRqHAqCx8stDl67Ldun/kQ31Yj8oQhS6UeaOk36 EJkifWYKyqE90U/tb6QrAWCKCv9djuqtRg50mnwL7DSEoIz32Vnkggna6p4lunFxIY3gqv v3osnn8v+bXONuqI32Gw091ZmLlePcqbKvo9LQ2j0KdTyfKWVQB+QpxXEcApJ3q3zk/XqM 0Fo5HQx006Zi/+GuxiMd1JwQ+H8UjXlQpi5fo5S+n7ffK12vxlbCrwuEQs+P4HQr/NCtvK G4QbxC72xvNDbzyd7F4nkKp+XeG0TI0z0JijGXtEy8/qA8mt4CHFVXen1+Sfcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3vKgaYU/foqGH1GtkCBCB0oT9zScUY67/O0tRYWWbE=; b=TD/HRwpsgaBNydioUUnGTZMBXfzSV3u/SQBPPCBiFbjvEeg2m9pkGqJ/uvKgWr77ye0wnl HkTGFW+nbSme72o2rL9lor4WZd1pxgmxL7RC43Phq5m+4XvKCQ7/frMnvjVYIuaYd/Nrb0 y4Bq+VaGJcFzIjn753QgBneG8SbSECSCk4SB59yan33lafTvk1dGqlIsGCVB4gEr5vQayn FXOd14RCtSc+4IrRbNxOPmY0ZVb3QXWA69WQrlZn9tFbaHcPd0+kbbjoLVXX5ns7rjSF9z XpxAd9c7+BC4ZC9WhIZ3pm8KaI7VdpRUJkYi+Lm48P6legfLe6oAeaCZCRV1TA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bR1B0RzJ6C; Thu, 27 Jun 2024 15:31: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 45RFVFRb079060; Thu, 27 Jun 2024 15:31:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVFMO079057; Thu, 27 Jun 2024 15:31:15 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:15 GMT Message-Id: <202406271531.45RFVFMO079057@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: 16cc589d9157 - stable/14 - mana: Use device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 16cc589d9157b318f3bf42018144e760a2ab7831 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=16cc589d9157b318f3bf42018144e760a2ab7831 commit 16cc589d9157b318f3bf42018144e760a2ab7831 Author: Mark Johnston AuthorDate: 2024-06-05 19:30:15 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 mana: Use device_set_desc() No functional change intended. MFC after: 1 week (cherry picked from commit 89848b3445ad52c304e6f9c5036aa9108bedb4c8) --- sys/dev/mana/gdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index e09918496b03..d0438f127b83 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -1750,7 +1750,6 @@ static int mana_gd_probe(device_t dev) { mana_vendor_id_t *ent; - char adapter_name[60]; uint16_t pci_vendor_id = 0; uint16_t pci_device_id = 0; @@ -1764,8 +1763,7 @@ mana_gd_probe(device_t dev) mana_dbg(NULL, "vendor=%x device=%x\n", pci_vendor_id, pci_device_id); - sprintf(adapter_name, DEVICE_DESC); - device_set_desc_copy(dev, adapter_name); + device_set_desc(dev, DEVICE_DESC); return (BUS_PROBE_DEFAULT); } From nobody Thu Jun 27 15:31:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bQ42CVz5Ptks; Thu, 27 Jun 2024 15:31: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 4W92bQ0Trhz4Bs8; Thu, 27 Jun 2024 15:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2KyOXGK497dodNkoUYbFMmXGdAleIaiwo+PgbzH+cYM=; b=bPRdyMx2/AJwqdWxNsHQRP94K9Doxl3H2wNsFm7wNoAjO554ZzlCZ3UNAfI0nzabVNTJOp g7yjVsw6U/Y0k2HFrw4TEThBHyI2DqGJfahfCL2RVtqrKIyn1Ztf0Sb/1mwuMdlsRu4/uP L351LzZZ87LAIxLR8KC/2Ehb6YRKAePPXDwRMAoyDJRD+Ue3U26UkCGVzWyEpfZAKsuV7J ybUxcL+C2aqerpwCsuA7oON4PRnSAUWGBYX4637QIhBMZySHLgYeQo8KZdnmtUpy9fFfT2 68eEeXrui6p+a0fFTkIGG+eM/yg9PcB/YY5ezUisQCsouEW/5RzikGuLhc4f+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502274; a=rsa-sha256; cv=none; b=IiwZFeJCUtXWU1IYvLSlWNbtYDW/FmNf5P5zy60fYZqE6ckk2gMtiH3C15bYtlzZEDS3ku mt6njsHn2rlmBt11SH0O5VjWWljKWZ7jq5HQis+xPe0idVyRquq6jei4XxNgMsxpVXK9Dg a3JjLFiymJGKq1gwvwOV86AFw7vWK8qK9/kw7mZ2br2l1EDBy0eGB+oGOMy2vkQFjCJhjy kppynWfFFlH+jNpB3eHLc0NBU4auU1pUt+PQtttD69CyMXNi09HgnBieImh+zaw4+UfWOc WutDMHktVbyv4jA3AoezdE5o/46arU3q8gWmKY2xAFSib+sbFIeHTh4a+n32aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2KyOXGK497dodNkoUYbFMmXGdAleIaiwo+PgbzH+cYM=; b=EZlGF+5Duc5MSIRb1qgEnWNeJkld9oYGfkwDpewLZP4G8NzcKcb0wIgZPGU0gIO2WZ/VHR mHerFJ/Ew8zWZ6twvg42mjU+9FMS/w7pbGDbhr5VEtQafAkwZd5Sbv9J65MYUC8TkQSEA8 kjxlElPI5A1A27VY1LFMURh8JRN7Uc0a09QtXpKIVp0MMKkeTZ7EaeVBiOGYPP2cJ7gk9S ratxi8ZyifygGY69UvhCe8n7d3p/AGuwrlEjAkPak6nRIugWo2AyZqHulzhmurCKK1Y0mq K2mqBu4CLANX94jMeS3tLy6CASG3xj+186LFv/hDTmOYiWr3Vo5jHOAxEN9DTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bQ05zSzJ69; Thu, 27 Jun 2024 15:31: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 45RFVDKM079024; Thu, 27 Jun 2024 15:31:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVDuK079021; Thu, 27 Jun 2024 15:31:13 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:13 GMT Message-Id: <202406271531.45RFVDuK079021@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: c64abeae220e - stable/14 - pir: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c64abeae220e3d6bf17f9c6a066cb75b4cf17ec6 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c64abeae220e3d6bf17f9c6a066cb75b4cf17ec6 commit c64abeae220e3d6bf17f9c6a066cb75b4cf17ec6 Author: Mark Johnston AuthorDate: 2024-06-05 19:29:30 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 pir: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit a96a9577127c9bf804e7e47e38e7b4123a43efa1) --- sys/i386/pci/pci_pir.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c index d3ae100a43d0..71dbb66b920b 100644 --- a/sys/i386/pci/pci_pir.c +++ b/sys/i386/pci/pci_pir.c @@ -654,11 +654,8 @@ pci_pir_probe(int bus, int require_parse) static int pir_probe(device_t dev) { - char buf[64]; - - snprintf(buf, sizeof(buf), "PCI Interrupt Routing Table: %d Entries", + device_set_descf(dev, "PCI Interrupt Routing Table: %d Entries", pci_route_count); - device_set_desc_copy(dev, buf); return (0); } From nobody Thu Jun 27 15:31:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bT22fXz5Pth8; Thu, 27 Jun 2024 15:31: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 4W92bS3CR0z4CZn; Thu, 27 Jun 2024 15:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=siJKRIq+EsH4neb+M+dxoLf0N5UhJLa0xj/iJXKbxyg=; b=qqhr7uhfRMF1qSoixCbeGN08mxl2AX3qGS22psxJv0QO5Nc2bRyF6IA2nh+NyuKFaQqpMs 8DsIsYFIl6HZeW2gpqukgVay9/4Vqdsb2RIo1xeyhgt4qpAIz8C783DFDCWFAxlg78qBkG 43aKId0dunbqgs6O3yNj97Go7P9y2K8vWxHhF/XlwN2wlAcw9SzXFDQGtsYBtjpDYcK/ua AD4t3hr2xnXhXtGh1Ai2fZw4xXFqNRlBMj1tiG+2IpzPdbGQ9sh4rLa+aAM7XkePzIpta9 l8yi7yoHh+MPxvs5rUEIm839t3uZo+6qsUXecf2ORFyQN9Z/a17Y/y5HoH+RMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502276; a=rsa-sha256; cv=none; b=LFJS1+0WPx4sjmV8yL96u2+TgUKqArDpK4OO+F9xgRnW4UDrmWDDmag1ckGOdCWKVwNqCy p9ktNcKUnwdttkJNthrKDf0370psan6zNsDMU1kg1WuWyREiCotT5RdTy7m07NLF4giTmz O7ty3RkFCYpsr3LhjDuWsmTJmHRt5p29SPcFAsirEp0QpGBvf2T6RA7VLMzb1SmctcTDNi nFmkspOhj/+2pq8jTqRkirx7dB+TAzQqr63nUag6a0/lMQvQ9RyXq6WUsa0SwEGJDS2Cet qtUE4kbD2/b2qdzrNIZlZJDX08iOpeFsXhViiV7uKE6HplgzPcPs3G1UjJsLGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=siJKRIq+EsH4neb+M+dxoLf0N5UhJLa0xj/iJXKbxyg=; b=SFPJw61gjO6Pqrx/fA66YDD1bfuBAfmCMaBdBjSQ6r7d9wl3PITJRxZrHNX7AuvfqrpSDD iLTOEt2jGzK8bAqEVyEwE17th41eON8PUd1oou82QGkikevKyaYxzkI8SvMwnVHoiLhqQW L39/W/f9WuQ1yiVRuX3SyunlrgIm8vFLI2PBERuwSrkEylCRcx1RnB2EIsi507Hv5IrMjf Kl2pVRAiELLepxFUz+KGQXTVEP9UaR7E0wpOV16DIRHjXCYjDHKdrgfDkkTAFA92R7NSSh oWHjnbz3OADkc+czY+/0/8nHgrDB7j2+2oVVUahb0X05NuHZ9477bVltDDLTOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bS2KLWzJDJ; Thu, 27 Jun 2024 15:31: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 45RFVGAP079096; Thu, 27 Jun 2024 15:31:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVGCf079093; Thu, 27 Jun 2024 15:31:16 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:16 GMT Message-Id: <202406271531.45RFVGCf079093@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: 48d60dd3ac32 - stable/14 - padlock: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 48d60dd3ac325b61bf7d07c024ce83b84da97e14 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48d60dd3ac325b61bf7d07c024ce83b84da97e14 commit 48d60dd3ac325b61bf7d07c024ce83b84da97e14 Author: Mark Johnston AuthorDate: 2024-06-05 19:33:59 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 padlock: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 131c8ee7331af701c78e694c9c7051f53600c4fe) --- sys/crypto/via/padlock.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/crypto/via/padlock.c b/sys/crypto/via/padlock.c index b8dae256dbf4..2acdefd75bc6 100644 --- a/sys/crypto/via/padlock.c +++ b/sys/crypto/via/padlock.c @@ -80,31 +80,14 @@ padlock_identify(driver_t *drv, device_t parent) static int padlock_probe(device_t dev) { - char capp[256]; - #if defined(__amd64__) || defined(__i386__) /* If there is no AES support, we has nothing to do here. */ if (!(via_feature_xcrypt & VIA_HAS_AES)) { device_printf(dev, "No ACE support.\n"); return (EINVAL); } - strlcpy(capp, "AES-CBC", sizeof(capp)); -#if 0 - strlcat(capp, ",AES-EBC", sizeof(capp)); - strlcat(capp, ",AES-CFB", sizeof(capp)); - strlcat(capp, ",AES-OFB", sizeof(capp)); -#endif - if (via_feature_xcrypt & VIA_HAS_SHA) { - strlcat(capp, ",SHA1", sizeof(capp)); - strlcat(capp, ",SHA256", sizeof(capp)); - } -#if 0 - if (via_feature_xcrypt & VIA_HAS_AESCTR) - strlcat(capp, ",AES-CTR", sizeof(capp)); - if (via_feature_xcrypt & VIA_HAS_MM) - strlcat(capp, ",RSA", sizeof(capp)); -#endif - device_set_desc_copy(dev, capp); + device_set_descf(dev, "AES-CBC%s", + (via_feature_xcrypt & VIA_HAS_SHA) ? ",SHA1,SHA256" : ""); return (0); #else return (EINVAL); From nobody Thu Jun 27 15:31:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bW1hyNz5Pv34; Thu, 27 Jun 2024 15:31: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 4W92bV4WtNz4Ckd; Thu, 27 Jun 2024 15:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJwEULCoV4tf4xW2/9pNFH+XMinw8eq4GiVAB9Ow2fs=; b=fwOs3GgtOKtVu3HIxL55c0XmzultMak0ulP2wjmt1PwhK+ycBS5fNXlhtwFtjraK7wZCOH PE8XN0CmepiXLQijkMoKHrbljBFSz06QURvQESb/f8b/jn/WAdnExpvh6INurVUCBDEy+S U9FaBdeMDxwLdJBOlrOcBs/RJWW8GXE1V/KUYugsfaqBYDxfsA9gxlKsfFXew/L/MEveUr XGG8Drai/1i+svn/HX5Upnh8S2Eoj3Qhqbn2gGZqlYmrcLXagkgOo3f99979Hi85ApEX3+ i3G/jVncevHxZdvazI1U23lrluT+hd5hEIcFLXuaNafHMRyBdlDbfTACiQ0BYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502278; a=rsa-sha256; cv=none; b=XzNWRbd0Fyoy2d/H+0uP3z4xxPxpWqvQ7ANnQKcdGHn58CakcmwdsWAtNlXyXHH18GFIvR Q9+0NSetl/nb1MLJH0s2NyNJ4LjfFF1fVs5FyN+MFkqr7uGPpz64eHOu1YAKqEr4+TZar1 ezIM3zXU75snzsYl/QXzxTVpHC0Vo2LQqc8JfGeedRXgexg9mchG48q9eOe18iS2UJLrxy lf0PjsyooapoUASIAdvOmpSQ1+jxHKHxtfXuq+l1GMW3UzAXLvf3k6oGyH2OtfZ2P15Tuh CYWvoxVvg+sltt9S4np4lE4G75NEMy6zmPrThVhC7JsVG9iS0207r+xAsOjcyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cJwEULCoV4tf4xW2/9pNFH+XMinw8eq4GiVAB9Ow2fs=; b=MZY2zS+C0iBnmEGPMo8dGXTApdtAwlqGZ+auzvfRTa+1A3GlgN4M9G6LC7EwmkBCg8wpcv PA4QExC/SflIxCHStxbGYeLWreprDgdbSWApix6SaJm41saPLYcTDZT7dlsG+JrL0uA371 0sKZzQhG7MO7+zdco7r1O0YAgX3Lus48eua5/lYAu5EwO2lOzca1COqxPgAHDNgToXUQOY WkeiUdpg65rHfUkpqOf5QoANj1O8pJFAsrST6Sw+gh+LguvaZJ1zZCLiNYFq3M8l0RLR3D BEN3hnz95hVwRr+ek1HzDJBOGmg/Aj9zbSnDQg+sJTeE8EG2MG62LGFtvkU3gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bV46ggzJ6D; Thu, 27 Jun 2024 15:31: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 45RFVI7T079184; Thu, 27 Jun 2024 15:31:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVIDD079181; Thu, 27 Jun 2024 15:31:18 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:18 GMT Message-Id: <202406271531.45RFVIDD079181@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: e437440b7aa4 - stable/14 - uniq tests: Make uniq_test:stdout more reliable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: e437440b7aa4a9f36d2219fc32cb6bd60d118dd6 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e437440b7aa4a9f36d2219fc32cb6bd60d118dd6 commit e437440b7aa4a9f36d2219fc32cb6bd60d118dd6 Author: Mark Johnston AuthorDate: 2024-06-14 00:00:47 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:42 +0000 uniq tests: Make uniq_test:stdout more reliable When running regression tests in paralle, this one occasionally fails because uniq exits with status 0. I believe this is because the test is a bit racy: it assumes that true(1) will exit before uniq writes to standard out. Just sleep for a bit to give the other end of the pipe to exit. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45534 (cherry picked from commit d9220f64da8b1d55b15259e8b266b50371ed4f47) --- usr.bin/uniq/tests/uniq_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index 804e82ce7766..9d37245dee4e 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -167,6 +167,8 @@ stdout_head() { stdout_body() { ( trap "" PIPE + # Give true(1) some time to exit. + sleep 1 echo a | uniq 2>stderr echo $? >result ) | true From nobody Thu Jun 27 15:31:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bV2HlVz5Ptv5; Thu, 27 Jun 2024 15:31: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 4W92bT3p2yz4CdS; Thu, 27 Jun 2024 15:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hGEZWacbsmc7lMacLXYsBBPzkO6hDE4rknc6itcukMk=; b=MDhtCuPihNqaQ5kvBbs6lhpso3rSR7na8PWj827TMILwaUzGFZRiMg7AM+yPuH2fSRxCpX xrSBqhUFviyCfXzw/FE1vSnemQucc198BUUh9nukwYdaoEx6NdSU4cP9qkhrEtEap7PMzJ rop0sGGlfgBNWSjWaO+XapqysVkUP2g6Hf3qO9cU2SjRCMjqroMCK/43zzW52TcOF9oqrb G2WUPE3+7Px35kQQBaJ4rZOaXa1xP4ZP8U1k4ycyKoJ3gctd31/TPA7HRNyXTPBysoXfqn PZVMTO8aI307uMLBvQiNWtpmCoXzuUYX5CaoEqdOFIwFBAA1k9F1bD5M/wuYrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502277; a=rsa-sha256; cv=none; b=XhZ+W8Wtd7tNFaAzpPw5+iySjTYhTBC9FDZHiWKc/ojY7KAJ1Wseh9w3Lod3XHPMYtuRK0 oIIDdWoUDmPH4MNUfEEDtJ7/7JmXLMvwGZ+/EzVj+w0V6RiUQff4G4NV6Vle5+HLkqMLVQ EhiQZZrEn3OsvRobB4QENrrl1F9u2p5X4d441OYlpUfCPSbwg21Lsb0CYEmatmWCL7NZFM CMdgDkQ+jk5KC20E/3Pmue6B76eGJysEmWB6ykjb+rUt/pRH/JLOiSmsafG1lWQvV8VR+V Pnh54P1sEgNhY+EW4Uw4vLI2RUsZYUKEnk9qVKQp7ZRL3i1RjLmzymlE+1Uoxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hGEZWacbsmc7lMacLXYsBBPzkO6hDE4rknc6itcukMk=; b=ihOHVQsGi6UUq3mzlVdKNWGDb+7kdXXuGgW4mCqcwR1q36vGmW3z0SH5K6ZaCAjHjT5Eku J0WI1BKZ9FPOErjVi24IM89XGfSxQm+Gd7t2hmmjBsExwHm8aXVl8B3J6X/+gzPq9oJinT Wd9k8YWYOlZk+BmeWxW7flcUVNl8AuQROgvrlzUP5RCaDxjkX9GIQ+Vqgyxeo9niEXa0Kv 3rZkYnOsEnaN/VwVlY+8ZmdiPrQ1iM4o7BJm+MjylQ6i4rcMwYF7D/0uaihi1Kzwc58JHQ CI9OepdZVKJGZQG7rsDAZIjbgA7j98tfYyLzpbktHN7Uma+MeM7vVsS5I7WRaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bT36gpzJDM; Thu, 27 Jun 2024 15:31: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 45RFVHZv079136; Thu, 27 Jun 2024 15:31:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVHKK079133; Thu, 27 Jun 2024 15:31:17 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:17 GMT Message-Id: <202406271531.45RFVHKK079133@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: 0d03585e6bc7 - stable/14 - jedec_dimm: Use device_set_descf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0d03585e6bc7effbbf52bbe49a4ee33e4b8a7889 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0d03585e6bc7effbbf52bbe49a4ee33e4b8a7889 commit 0d03585e6bc7effbbf52bbe49a4ee33e4b8a7889 Author: Mark Johnston AuthorDate: 2024-06-05 19:34:30 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:42 +0000 jedec_dimm: Use device_set_descf() Note that it is ok to use device_get_desc() as one of the format string parameters because it is set using device_set_desc() (not device_set_desc_copy()) and so won't be freed when the description is updated. No functional change intended. MFC after: 1 week (cherry picked from commit 83caa244bc9eef6949a1250a875ad1409775a46e) --- sys/dev/jedec_dimm/jedec_dimm.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/sys/dev/jedec_dimm/jedec_dimm.c b/sys/dev/jedec_dimm/jedec_dimm.c index ddaa0e96856e..697e7695a009 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.c +++ b/sys/dev/jedec_dimm/jedec_dimm.c @@ -265,7 +265,6 @@ jedec_dimm_attach(device_t dev) uint16_t vendorid; bool tsod_present; int rc; - int new_desc_len; enum dram_type type; struct jedec_dimm_softc *sc; struct sysctl_ctx_list *ctx; @@ -273,7 +272,6 @@ jedec_dimm_attach(device_t dev) struct sysctl_oid_list *children; const char *tsod_match; const char *slotid_str; - char *new_desc; sc = device_get_softc(dev); ctx = device_get_sysctl_ctx(dev); @@ -447,26 +445,13 @@ no_tsod: * device description. */ if ((tsod_match != NULL) || (sc->slotid_str != NULL)) { - new_desc_len = strlen(device_get_desc(dev)); - if (tsod_match != NULL) { - new_desc_len += strlen(tsod_match); - new_desc_len += 4; /* " w/ " */ - } - if (sc->slotid_str != NULL) { - new_desc_len += strlen(sc->slotid_str); - new_desc_len += 3; /* space + parens */ - } - new_desc_len++; /* terminator */ - new_desc = malloc(new_desc_len, M_TEMP, (M_WAITOK | M_ZERO)); - (void) snprintf(new_desc, new_desc_len, "%s%s%s%s%s%s", + device_set_descf(dev, "%s%s%s%s%s%s", device_get_desc(dev), (tsod_match ? " w/ " : ""), (tsod_match ? tsod_match : ""), (sc->slotid_str ? " (" : ""), (sc->slotid_str ? sc->slotid_str : ""), (sc->slotid_str ? ")" : "")); - device_set_desc_copy(dev, new_desc); - free(new_desc, M_TEMP); } out: From nobody Thu Jun 27 15:31:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bX1WMhz5Ptrf; Thu, 27 Jun 2024 15:31: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 4W92bW6CnGz4CXp; Thu, 27 Jun 2024 15:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4qWyM19X1/OnIS4z+TZzcg7Y6ykIBR4icbzpntAxztw=; b=mV3W0sQMoVfzRCtX5noN0lr8k+96mYKCkeUCP743LF+IWoQovaDrDnvHaI3qzkqE0TgVLB nNWdmtvqCJW8Co2dKwcxwB706skKvNsUYS82myjSKvDNyMxO4Kxo6gUJmhymahy/wo0ffJ IaZjlQ2A5sO64r7E3m7Fii+9J+0BSQhRz9uGUhgY0wlRXCwKceFEbpd21vaTdgjlpgSh+X RXX/J6i+VNDEJ7R2+mNXVS3NMRYTo8Xi3eP82yxQmoRFDLt5lELeDTmYYiqED9NtY66XUY ThTxk/Egjyr0XVhL/BrLzCMSoZvhWQzESmSO9X3/gs/r1dwiceRGdjcTez1XEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502279; a=rsa-sha256; cv=none; b=DzPtw9SPoZSLO4/vIAkD0AOiZN4WF5JP3ifZLL43rOxhvuHD9HI+zQRtiATf4B8hlcz46V 7u40EWlvfiCoTKm39d3VgRn2Mdp1lrmIqxtbXLxROFV8flNIHfXHs9TWBMkGpYr3zmXmNL RfW8HUdOIULGKaZyt9BzlujN8gdTvP9Ixp2524ejh+Kg4olHTzfzaR0/GD5znEp29tC43h Lpt7sZsaEBpdmn3WRdbDBN36RnCpJpcbHuNady7lqNeZ/6Fm55T9EZzx+x/aOLfl/NP//A WNVTrdIEVE8bj6mSFLLFo/6MaBZMKVseQamj5FxGyhSat/KJmo+TzSUeM/bRog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4qWyM19X1/OnIS4z+TZzcg7Y6ykIBR4icbzpntAxztw=; b=r0JzsXdWQxpSznyPJTXmvGm1x7EyhUcd0IgXQOMRI/kgPnuWi6l0Dv3LOHBhPM3BDon/py TpGk6htO2km6wSsUlmGZ60HRwdnyVs0c+Qkgbcl2QhyE/YhZRhfQqsPeqltKurZgeSfXV5 TTpZjMJu9WRslnznBPDCql3NLo1XTm8MfI+e1IztMJ5FEma+hL/k6cPk8MhOf7Y/b9tA+c n/C7Qi/Iux0WL5+FDtq++D7kY76vebG5Ax2T2k3/yhQPNKYvf+RMcBzTQ7ISIdMmAu0Nd1 0Q20Iy49+kk7iG+sOYlBkDvPJfVyT9hbOE4F3RoRSLsh+d1PPSXcHKFFOt4b/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 4W92bW58hTzHQr; Thu, 27 Jun 2024 15:31: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 45RFVJW3079226; Thu, 27 Jun 2024 15:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVJMM079223; Thu, 27 Jun 2024 15:31:19 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:19 GMT Message-Id: <202406271531.45RFVJMM079223@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: 3026c74b87a2 - stable/14 - amd64/vmm: Make vmm.h more self-contained List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 3026c74b87a201c185168183a21d6d89d068ac7d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3026c74b87a201c185168183a21d6d89d068ac7d commit 3026c74b87a201c185168183a21d6d89d068ac7d Author: Mark Johnston AuthorDate: 2024-06-14 00:17:07 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:42 +0000 amd64/vmm: Make vmm.h more self-contained CTASSERT is defined in kassert.h, so include that here. No functional change intended. MFC after: 1 week (cherry picked from commit aede0d3badd1be92b57deb14c494785ab61022d4) --- sys/amd64/include/vmm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index 7d5d13678122..368c3a6cb95b 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -144,6 +144,8 @@ enum x2apic_state { (SPECNAMELEN - VM_MAX_PREFIXLEN - VM_MAX_SUFFIXLEN - 1) #ifdef _KERNEL +#include + CTASSERT(VM_MAX_NAMELEN >= VM_MIN_NAMELEN); struct vm; From nobody Thu Jun 27 15:31:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W92bY2lmRz5Ptrh; Thu, 27 Jun 2024 15:31: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 4W92bY06fDz4CVc; Thu, 27 Jun 2024 15:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYd2OPuYS9211U7Ir7K+8aMT2pb/AKX5wpxnUlLl+6U=; b=jWvCLJyfPqVnW2nwKGgCOXq6n4monvW7dQczKfjrv0Jis6tmwh6kcIdVDUPHF9geJx9EWO xvch99v/jM8jOH3mI/ICJC8J6PBZeFcBx6eeGlgs0TVD6SuCYTRCh+i5hrKWhNxVlBiVeI L8WebSawhOSYc/ruJJ0jj8sWP9CrIiu2DNBZffFFGnOn3eNOKH40qr1SLDsOJencMiE9C9 feCXDcxhDj0h6+3oxabd+brzhwSRXpqWjz+PEn0AW/ChNWQLP0z7IB0quWPuegRCdm5aoz bjrGu4Nrb9vsFVcebJoZAJqxD8uoBcf5q87jBEFcXoqHP3rEpOt80Gk7xYe3ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502281; a=rsa-sha256; cv=none; b=fMqXZ7DnIPw3oq5BxB2Ix/A8ZiGiUrXYvvTZUSkhK23i7uOPIvQQ80XKMjyTWIK6tlWvmD pcrV05QlJQPe02KpJR4gmRTl6I4z3c/QRPhW/8VssjTzcLe9ot37Qc52L/RNa/IkgW1o6N OJgFtsgj4HBJYsNmDIkGSygCu6ZdfO1Pw2e0e6UeEEEDzPDSyHHr9tck00b+R63FMbVdmP FR7hpjNmWibIjrx+vYtjWJndJX2/4wfVxuBwDef9jbFhIyCDYKNAiv3Q5r7Sk5cvPcEwpR I3RIbutSimfoQWi0zJ6DQVLRL2jnW6Kh+GJG8iPF0v/F7ZaWCT+tN3NMTGID+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=1719502281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYd2OPuYS9211U7Ir7K+8aMT2pb/AKX5wpxnUlLl+6U=; b=ccBIFYqnMNE2n92EPwFGHtOXJA0LmGdbraKKIUeSuo0XHz6DwhbC7pE75CXG17E2NV40dE QC9rceOMNo4Q5A4n6sKIOg305MF+esh0Qq9OuQOYh8jUUKUGKKdZLRqUrJ+5WaLAI88EWr 9686dD/eQjZ3+h+FqJg5C0MI4Q0pcjyeL4TrdNyZlVBKvB3ewPVM0X62TEN2lq4yb0oqRN qU8HphprRg0yJfGpnzo6YlW4jsd3CSHfLaVXYmT349gbHXpmUmeFs+UH6zrX+IHoMZ13FU WdkfmwE/EmZ1JMpPQceDu4zHkeSXwx93ADUolvp5avpL8Kip+QDSzc0AjhkFUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W92bX6B7hzHcv; Thu, 27 Jun 2024 15:31: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 45RFVKKA079265; Thu, 27 Jun 2024 15:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFVKkZ079262; Thu, 27 Jun 2024 15:31:20 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:20 GMT Message-Id: <202406271531.45RFVKkZ079262@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: b31999c05135 - stable/14 - physmem: Correct 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: b31999c05135cec637cfffbb62dbccfa47b1cc5c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b31999c05135cec637cfffbb62dbccfa47b1cc5c commit b31999c05135cec637cfffbb62dbccfa47b1cc5c Author: Mark Johnston AuthorDate: 2024-06-20 20:43:39 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:42 +0000 physmem: Correct a comment MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. (cherry picked from commit f45213c74cbac7f41ab3c94440cb37a2fd92a449) --- sys/kern/subr_physmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index 79fedf58d66d..e74a11f47c2c 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -177,7 +177,8 @@ physmem_print_tables(void) * * Updates the value at *pavail with the sum of all pages in all hw regions. * - * Returns the number of pages of non-excluded memory added to the avail list. + * Returns the number of entries in the avail list, which is twice the number + * of returned regions. */ static size_t regions_to_avail(vm_paddr_t *avail, uint32_t exflags, size_t maxavail, From nobody Thu Jun 27 16:24:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W93nQ596Zz5Q089; Thu, 27 Jun 2024 16:24: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 4W93nQ35rXz4QCn; Thu, 27 Jun 2024 16:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719505498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rswVVqCbqaglMmTkUO68K/MEsXUFtfhg2LEqSywZ9Sk=; b=xouA8p+zrJ769SZu9q23kMDyDOAIQNaP31aHf2B/RHwDppfb6LzUgQEAZRCXTQMxXgw+6H zxE3iFSfpwh7Ay/NL73N8heE0zZM4Svz4nz3wSyxZOZA6ymzdIa0IwvwFhR0rAp6e21jUl mk/bnsanW2tnTJQ0605/qBVWNl8wGL5nX8tuEbhbR+Mrdspn5H+xj/DDGil8PMpFz/AbC0 o0DGAGRWdbFjwwiVpxuuzuev1CGR/1MD1IiG2cOeVyFNVAczVvuLO31eslTJ7pOaBN/Xjm E5rrEfkXRq2VjGZv+MxWLVAznqdR+6kkTAuDNXtbDw4RwbmumADwZK+HjNTfVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719505498; a=rsa-sha256; cv=none; b=hSNwmtMicPin61srAdAVhti7sdTPcCyizZYYlK1ha+IEITT5qzpENmjEtz5cE5RnYrYtrC MrvyvbnWraEJ2WDySKHoU7/l4Kjx/u5NOe+L7Gqpchi5Uvd1WKa9Xiia1aYFAx+RPIERuS NwSp1150BxaICmrig9y0lMqZm/WEx8wdzBH0xN7Ghs+26FdZiIcRzLNHyBUa29rGH/sSen +8cyVgFhMWj8rRvjwtquQkm5bEKlp8qv1bFuetDtYEKRmdDx5S0fFbF3avpzIqKt7bn6sE M3vNGzbeQT1zaRgllQX77eS98fI0ca1i4UxEHEa40H2daTT7OXEBvwKoMSajZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719505498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rswVVqCbqaglMmTkUO68K/MEsXUFtfhg2LEqSywZ9Sk=; b=sAmLdDoof9RvanEyUbYkHfhBkM5J1Mcus1K+Hzo8YAVUFoVVNdCUCOMHPsmUuxSw57nNWg HucGfruAfAmR1UuQy5yoKDK36sfVONuAsL0AugWQeJ3GNi1QiZIIbCBYvQlT+XTnb9klw8 45QxOsLx6/VhTyIgC3GRCBC/ykD7Rh/PMNeeXtM+TRvcS08T2UTd/92n1pkIc1//9q6r4C xAVH9Q1U96Bhpg7EayD33HGckBS+OfKDyg7cDfoUYKpMWroMJhmJlEGTa1kqmsCQcat0Mq hAnIP7d83XTdcPFeNYeoel/ph0phypKNBCp1Az1sBU3Y4n0RMo8h/AUGIKMKgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W93nQ0tWzzJrM; Thu, 27 Jun 2024 16:24: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 45RGOvE2070194; Thu, 27 Jun 2024 16:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RGOvp4070191; Thu, 27 Jun 2024 16:24:57 GMT (envelope-from git) Date: Thu, 27 Jun 2024 16:24:57 GMT Message-Id: <202406271624.45RGOvp4070191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 3703e1a73e0e - main - tcp: improve error handling in syncache_socket() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3703e1a73e0e0367c04f47f793e46495e46e647b Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3703e1a73e0e0367c04f47f793e46495e46e647b commit 3703e1a73e0e0367c04f47f793e46495e46e647b Author: Michael Tuexen AuthorDate: 2024-06-27 05:25:15 +0000 Commit: Michael Tuexen CommitDate: 2024-06-27 05:25:15 +0000 tcp: improve error handling in syncache_socket() If syncache_socket() fails after calling tcp_newtcpcb(), the resources allocated in tcp_newtcpcb() needs to be freed. Just call tcp_discardcb() to do this. Thanks to jtl for making me aware of the issue and proposing a fix. Reviewed by: glebius, jtl, rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45749 --- sys/netinet/tcp_syncache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index c21dbbb58e31..1a3b6ebf6788 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1053,6 +1053,7 @@ allocfail: return (NULL); abort: + tcp_discardcb(tp); in_pcbfree(inp); sodealloc(so); if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { From nobody Thu Jun 27 17:44:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W95Yj0rPTz5Q6V8; Thu, 27 Jun 2024 17:44: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 4W95Yj0C7Zz4Ytn; Thu, 27 Jun 2024 17:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719510297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3RAx09v5SAw20mS83Um/0ftkenSSH6W+KjnIHIAun7g=; b=jhZ5OI1s7vMIKc+KswkEFTseTcF37ORs05ZiXslJO2oL1CFYXTl0LaZ3q4nv7BIP+dFLye zZV+4nonAr4Xi00fVZp8jMd6eI6R+9I7Tz0H4QXRs7zv46VgYZmgmupgV9fGAdOhjvnoaV D0AN06AVkktSGcRpF7SuevsTGCMT9YFU5Y8R+1GhUNEBWW/SmVDErjLAKgAc/QILd6ptlx 2m6kcRuP7Ua6GmEKxmH3bMmyqyTB4GJeBetjZuWC9XE3C9p/Rj4m43UguSNaQ3i4dpKd1Z nIWutEUpCCC3yFG5eU9oiAEEo/U9ezP8qMA1uNZd8j5fsBWEQgf5wbbdXFmUbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719510297; a=rsa-sha256; cv=none; b=t6wQGt54lHmCCcc4ar6/dcfxT4bBdayjPik1uHV/jC56jNbYqojXCZUsPfbC8g1HgU0AIb tkIIU17SeuR0sHMfwOdcAqXxCPtZVylkg2N1kucjcHojb9kw8DoBMnqQ7HIH3gEvIMZs9j rfdrBIXgcLZV828mpjlVqQSkN8CCjWsnhbxFlGB2GR2Us82Ve1D51UNpKyo92o0I5xcgVl CxeKaYo+Y+ddRZ6zxnOSWPeqCITRj7SXjH0DdtCp9sqyeXJIGuWrCs0Xaa/lebYMChRrnx DSvCnAFFQ5A68dPHVTCk/UPBIPaPqLEfN7+ypZvMmqXsbgbAQxom6J/nfauBPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719510297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3RAx09v5SAw20mS83Um/0ftkenSSH6W+KjnIHIAun7g=; b=BVmE6Sfz82sHJfiXJK0dJaF9ixj2/MKbHnU2c4emAJZMsdBkqRDFO+sZGiZv3G2J9G9L+f 1o9o9PCeR3g7YjQ3Equ30/4EoTp0SL+ixi2oyqeRPnMOAhW8x7U5tQgo/reKdoXr1peGkI vsw9BLde7R85mgE0ijzKK2NvbkxWN8oAqLaM+kWPLWTEMJlNhPzX1wUjuO5fGw25oBonFE UMZ1BxO4VflpfMkSt/ZYpAxv+5TmH+vR5oUq6/HWujFk1ryHS6CIkaiY1PBA+NxCKOWWyh AlboR16qMe6jBX/iDO1A4zFzICQEgqH+QyN2FT47Qk0vj+ci8ejDwKoy+N0Nfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W95Yh6lWdzM1t; Thu, 27 Jun 2024 17:44: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 45RHiuJ0005016; Thu, 27 Jun 2024 17:44:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RHiuBJ005013; Thu, 27 Jun 2024 17:44:56 GMT (envelope-from git) Date: Thu, 27 Jun 2024 17:44:56 GMT Message-Id: <202406271744.45RHiuBJ005013@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: a35f66510917 - main - if_genet: don't load DMA mapping when tx_queue is full List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a35f66510917f5ac21c11e9642174cda7718fbc6 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a35f66510917f5ac21c11e9642174cda7718fbc6 commit a35f66510917f5ac21c11e9642174cda7718fbc6 Author: Mitchell Horne AuthorDate: 2024-06-27 17:26:54 +0000 Commit: Mitchell Horne CommitDate: 2024-06-27 17:44:36 +0000 if_genet: don't load DMA mapping when tx_queue is full gen_encap() always calls bus_dmamap_load_mbuf_sg() into 'map' (which is the current tx_queue). If the tx_queue is full, it will load with a 'map' that already has a currently active mapping. This violates the busdma(9) KPI. Checking for a full queue and returning ENOBUFS will allow gen_start_locked() to set the IFF_DRV_OACTIVE faster without having to needlessly check if the mbuf will fit (it won't). PR: 256482 Reviewed by: mhorne MFC after: 1 week Submitted by: ghuckriede@blackberry.com --- sys/arm64/broadcom/genet/if_genet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/arm64/broadcom/genet/if_genet.c b/sys/arm64/broadcom/genet/if_genet.c index e102b6c3a95f..ccc35fe841df 100644 --- a/sys/arm64/broadcom/genet/if_genet.c +++ b/sys/arm64/broadcom/genet/if_genet.c @@ -1069,6 +1069,10 @@ gen_encap(struct gen_softc *sc, struct mbuf **mp) GEN_ASSERT_LOCKED(sc); q = &sc->tx_queue[DEF_TXQUEUE]; + if (q->queued == q->nentries) { + /* tx_queue is full */ + return (ENOBUFS); + } m = *mp; From nobody Thu Jun 27 17:56:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W95pk4GYfz5Q7VP; Thu, 27 Jun 2024 17:56: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 4W95pk20JTz4b2s; Thu, 27 Jun 2024 17:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719510974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ckO6SwbYrzsAH5CQvisH6MV6xvtEOIHeXm8MHMquWyU=; b=dbvd/JeiIioQXlLIQWafBuKHZauPYcnMAw91cDd9F8rbRp/+JKyv3tlWLg7TN3JIzyUG8Z X8RjnJ184rIOmJX1xlQBnuv032dRn0UbodLw+e4rlZm3HviGrN381bl3FGMIG4xoAGLCMy jKAC6J0b8tFffZQtrPnNacDewwFUEAEWmWHTyIyxhyyy+24g72f0w4k427a3hby2aWu2Ef bPP6VKhMRqq7R5gd7P1GgMVqcrtLotcsqDKIWXaUM10jwf2wB2JbsBUoPAyCw3nsWQg+il KnciK6D14GB/qPzRdeAqC5MgpRk/yBIi/qbhdLof5v6cRqTcjIbdspaqfyahUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719510974; a=rsa-sha256; cv=none; b=LVVeuH1iCYpwUHBgMOpilcyu3KoFfYEDKqFwwckWxhHCne79P/4OuD7K0K7CCP9inBim/l qdoDB9RA9dUPioolpag5MYrW0kdsnJJ05r2lSv90aR6yqFQYgzv0VYcaHMcIyiDcHVBmw0 rRH+rIm7Xy4CkdOnSvWENEQiF3zBBdngBVhLcTUTXgdvaDrduVGNjHilAnUBvT9DVr+vpY /HEhDbWnQ3JBnGgzuY2YTEmp7F0l4xfVv2wLhgCnFxVVB2nMto33jEYbcTF7E8vGgj0RlL WWp+e0ivLlAeNFKalRBH0Z8NZSL87BL2AHOfy4gQjcnmCDzws417uvKwMnpkxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719510974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ckO6SwbYrzsAH5CQvisH6MV6xvtEOIHeXm8MHMquWyU=; b=WRoMhmymlkxQdfOaeQDmbeLEwYE4L6shHrkMzCGglAbWupfgVV3q/6YXSLzKaIlRAcRTad vO4v9VtrAluQ9TPflVaWoAiIbcsk1BjT1Mn0NekMDAd/7aU2dMHtL0j/U+2nmAGVt/lOb0 ZZfKWljGRqJ1Ady7Bp0ka8iIBRmivwDVPqcZ/hg7bT116z7qRc/vopcWdCo8zMQoIz/LXF SitWEXuAIejmfegUvXbnCjXxP6VdmbDgP0ULFfla4awsSq490Gr2rMQRQSOGMat1pGtodl 1PCbCH9tTehIpqmMYjrEtbqwj8op1ykGBv7W7IwwvVqyhzd1svuGTJ8a9XdKvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W95pk1BTnzM6s; Thu, 27 Jun 2024 17:56: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 45RHuEBq021827; Thu, 27 Jun 2024 17:56:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RHuEdN021824; Thu, 27 Jun 2024 17:56:14 GMT (envelope-from git) Date: Thu, 27 Jun 2024 17:56:14 GMT Message-Id: <202406271756.45RHuEdN021824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 14fee5324a9b - main - tcp: improve failure handling in tcp_newtcpcb() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14fee5324a9b76fff6e8aad266600eefab3ef335 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=14fee5324a9b76fff6e8aad266600eefab3ef335 commit 14fee5324a9b76fff6e8aad266600eefab3ef335 Author: Michael Tuexen AuthorDate: 2024-06-27 06:26:34 +0000 Commit: Michael Tuexen CommitDate: 2024-06-27 06:26:34 +0000 tcp: improve failure handling in tcp_newtcpcb() In case of a failure of tcp_newtcpcb, where NULL is returned, * call CC_ALGO(tp)->cb_destroy, after CC_ALGO(tp)->cb_init was called. * call khelp_destroy_osd(), after khelp_init_osd() was called. Reviewed by: glebius, rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45753 --- sys/netinet/tcp_subr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b871d8416b19..438c9cf899c6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2215,6 +2215,10 @@ tcp_newtcpcb(struct inpcb *inp) #ifdef TCP_HHOOK if (khelp_init_osd(HELPER_CLASS_TCP, &tp->t_osd)) { + if (CC_ALGO(tp)->cb_destroy != NULL) + CC_ALGO(tp)->cb_destroy(&tp->t_ccv); + CC_DATA(tp) = NULL; + cc_detach(tp); if (tp->t_fb->tfb_tcp_fb_fini) (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); refcount_release(&tp->t_fb->tfb_refcnt); @@ -2291,6 +2295,13 @@ tcp_newtcpcb(struct inpcb *inp) tp->t_pacing_rate = -1; if (tp->t_fb->tfb_tcp_fb_init) { if ((*tp->t_fb->tfb_tcp_fb_init)(tp, &tp->t_fb_ptr)) { + if (CC_ALGO(tp)->cb_destroy != NULL) + CC_ALGO(tp)->cb_destroy(&tp->t_ccv); + CC_DATA(tp) = NULL; + cc_detach(tp); +#ifdef TCP_HHOOK + khelp_destroy_osd(&tp->t_osd); +#endif refcount_release(&tp->t_fb->tfb_refcnt); return (NULL); } From nobody Thu Jun 27 17:56:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W95qJ4qskz5Q7j5; Thu, 27 Jun 2024 17:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W95qJ4J8bz4bFh; Thu, 27 Jun 2024 17:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719511004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uky5QWTEE+WpQJDO/PGMlBTLWWvB/krA7U9xa1CHQoU=; b=OuPcGY80dlWm1ZF1EEVS+r2yXKWzKYh1B2e9PT1Ap5VASuZEwrpjJ73CYt9eRglMHf9ONJ mKpr2vq4WIi7e3llKaAo07shFoc3Bbgjg0Eb3MIbdPNsID0UdM8bHsRrnP2ICJC7D3W7/z jiNnPV7cwQjiGYoVzli78RITZHj7IohVrAza2OD7tgB5OuqMmPc50Jb7rI0qvv7HArGoVk 6t5/PkXuXNtzpv5KXe0IZrYnnYk7CPIcuprpuXXYlzz3AMJRwoqw22/dG29S1eRldpMd2O kYlDkooPdIX0Vse4im/dEWM2ep/C7Q2rk7TdWJB/URJ15fycxjvzZzclLWTW4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719511004; a=rsa-sha256; cv=none; b=k6kMi8ef2SIUq5PzkQ2tfS71/9VRbjOrCUI1ccNgA7wAumMsE3GTLoL6aFOTSshNrvsfKq cHqqF5pZOKeBdr0MPF5sIJBq34fRBd270bzpT5B4Bi79tJdVQwqHIrKjoiyyXa2wJHvole kLJOBriQTHKab/XW0ri7LWdNufQfE5ILndfFvc8XjhM2A329KmwpaHuNYFIEgSp8h2/9wz 0o4AMD2TnXJDUNkJnEMJ29NwNhj41gmrYXWA2ZMBDXg/D6hWr2FOurzyC6rxW/8khS+vJO QG4xxzPDtEnk5PwMQ5R0Lb4NXnYrql/olKmzy3iWGJBahdAePKuTdkTvuVbP5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719511004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uky5QWTEE+WpQJDO/PGMlBTLWWvB/krA7U9xa1CHQoU=; b=EMNzH9mViHTd+7SV9PoXafMn4ni8bXLr/hmDsGU7nVtlK3vKrH9WhNkEa82lm6QI94O9Cs y6EZvQBAutbURNJmq9irbPnl0C+mD7J42VidBwYCyko1ecnvPZcs4caa+eCjPYoZIvS/QI h33i1i5gKWGsy+LA2AC+oz4Hn9zyHUoEBg9LF/SJIOjI2JzSTIvXR4VycUkvQ+T3zj/jrc 5aCmb2JmeEncDPTqs9sYgQ2xFyIEM6UH9/13efMHUy+T0T/HE5p604eE1uPfhS+C7kXOdu MryjLL8ZrvxSMbyGGnm3PndnjnnlbaV5bGvx2dWt3YO2Qe5tQfkWIr1E9v09CA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W95qJ34MmzMTr; Thu, 27 Jun 2024 17:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45RHuiLg022028; Thu, 27 Jun 2024 17:56:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RHuiOg022025; Thu, 27 Jun 2024 17:56:44 GMT (envelope-from git) Date: Thu, 27 Jun 2024 17:56:44 GMT Message-Id: <202406271756.45RHuiOg022025@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: 53a64a093824 - stable/14 - rk_pinctrl: fix error check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 53a64a0938241869b7dc657c5bf30e3bde1879c2 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=53a64a0938241869b7dc657c5bf30e3bde1879c2 commit 53a64a0938241869b7dc657c5bf30e3bde1879c2 Author: John F. Carr AuthorDate: 2024-06-14 16:37:06 +0000 Commit: Mitchell Horne CommitDate: 2024-06-27 17:56:23 +0000 rk_pinctrl: fix error check The parse_bias method returns a signed int, with a value of -1 when the device tree reports nothing of the bias configuration. Convert the local 'bias' from unsigned to signed to properly check this condition. PR: 229721 Reviewed by: mhorne MFC after: 3 days (cherry picked from commit 97ab935d566c85458bc7cab99c402f026d704eff) --- sys/arm64/rockchip/rk_pinctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c index 7a47e3b9d468..02017258dbe2 100644 --- a/sys/arm64/rockchip/rk_pinctrl.c +++ b/sys/arm64/rockchip/rk_pinctrl.c @@ -1142,9 +1142,9 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, uint32_t *pindata) { phandle_t pin_conf; struct syscon *syscon; - uint32_t bank, subbank, pin, function, bias; + uint32_t bank, subbank, pin, function; uint32_t bit, mask, reg, drive; - int i, rv; + int i, rv, bias; bank = pindata[0]; pin = pindata[1]; From nobody Thu Jun 27 17:56:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W95qK74c9z5Q7Xc; Thu, 27 Jun 2024 17:56: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 4W95qK537pz4bJ0; Thu, 27 Jun 2024 17:56:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719511005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yc+gqUw2oAcll8pou273mpNdFoyRqCWTWIVZbUj8xfg=; b=DnzkLiqVdbFfLZ3oYaN6Bi5YFsNEU2SQnT6u2GhKeerT2keD2ZsJ2RNlERMM2wGWLs5+pF twCxZS6I+mVQptFpv3Bpsymp/RQZo5omNrPU/fq/W3ecgmpctCbKksZkIzBHyhE8wU6SUE /jKLIcgmUQvyzqZZICIhTYjMC3iS7XjTOeW0Ccab/Vc9UBSaG/3vYmq+oyv1OTHk9UzTXU zXq7nXKjQXBjn/eAyqX6TD/bNw7Sgn1rFjao8/sccZuxu+izkCOtstIAJlTRXA9+bcqgi0 ILE7o7cZlNZN5xGuNEIsPXZojhEVmLg2PdDooHcsJi7WlPzpXbbZjgu6DlbE2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719511005; a=rsa-sha256; cv=none; b=Ce2HLLgzvcsa8g1Y2J8fun4jEqQ5dlOSC8DWU48r2ZoLSmQjtAkM9SvAXkDzG/HP9qBQ1Y gSJjvVvt4HBKbRGuDO526/9dlcEMdNgkUc3d7DSsOAIVre1akRUtf16l0LaxfN/FykM3W5 pzhISQh+zCXJKPdx2UEWlCpEeg9e1mkowd9kd4gZP/bRSeiJrYBLpnAHHTrrZf6K9UxPeN vitWYEhf7u5R54bds5LRKF2C2kV8ABZGrymPSsKA1lpslANuDoBAMnXWLXlYdS9je8Pi6t dRrJwpVQ2V0v/n9Nfl8f5HSBzjEQE+1v6WIPN+Gry4rs9uJkJyrUNsh0s9aWtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719511005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yc+gqUw2oAcll8pou273mpNdFoyRqCWTWIVZbUj8xfg=; b=NL7qk3jrRF+xIexvVJRDwFMvvBnlRZqS8j2dG5XLnzoQxEpPeWEsc+QJ6qPJOD/SJl1WfU cvjEw+gq4xVAfzDxaZCQ1Fzy33K0649RcLzV5XC+rAb6iX6DfgEqiCFTUVzOOF2hbO406/ vLYImjg7OSIHJf4AiPAPrEZ37TUn5sBN9pjns2QX6YrxOgO8YHxphA1K3nZ0eoC7F6jVVS IBv+uVKGAiZVWRvCOzOaP3MJwvmGT6dCkQ6UKHB0igrxeh3MBGA37KyawELwyhwsPjAfrN 4xg0VjAktsUIGRBOjQUOEAkYyVKx/0ATsBf/qcFvINs4PVSzv6NqT4FaVlK2uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W95qK4LKgzMms; Thu, 27 Jun 2024 17:56: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 45RHujNG022068; Thu, 27 Jun 2024 17:56:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RHujVf022065; Thu, 27 Jun 2024 17:56:45 GMT (envelope-from git) Date: Thu, 27 Jun 2024 17:56:45 GMT Message-Id: <202406271756.45RHujVf022065@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: 9a53391b601d - stable/14 - riscv: adjust physmem reservation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a53391b601dd19dec2be2b68e356e2378deb085 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9a53391b601dd19dec2be2b68e356e2378deb085 commit 9a53391b601dd19dec2be2b68e356e2378deb085 Author: Mitchell Horne AuthorDate: 2024-06-14 17:57:28 +0000 Commit: Mitchell Horne CommitDate: 2024-06-27 17:56:23 +0000 riscv: adjust physmem reservation Make sure we do this BEFORE pmap_bootstrap(). Reviewed by: markj, jhb MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45325 (cherry picked from commit 0e4e77072f65df71644140e41229b868a73f3371) --- sys/riscv/riscv/machdep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 5872ef9f94ac..61f86f9e6958 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -550,10 +550,6 @@ initriscv(struct riscv_bootparams *rvbp) cache_setup(); - /* Bootstrap enough of pmap to enter the kernel proper */ - kernlen = (lastaddr - KERNBASE); - pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); - #ifdef FDT /* * XXX: Unconditionally exclude the lowest 2MB of physical memory, as @@ -566,6 +562,11 @@ initriscv(struct riscv_bootparams *rvbp) physmem_exclude_region(mem_regions[0].mr_start, L2_SIZE, EXFLAG_NODUMP | EXFLAG_NOALLOC); #endif + + /* Bootstrap enough of pmap to enter the kernel proper */ + kernlen = (lastaddr - KERNBASE); + pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); + physmem_init_kernel_globals(); /* Establish static device mappings */ From nobody Thu Jun 27 19:17:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W97cQ52Lbz5QFZM; Thu, 27 Jun 2024 19:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W97cQ4WBvz4lFh; Thu, 27 Jun 2024 19:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719515846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P75oqIWqR/ws+GKLiZNjvkfIKUwrlHyOc8gl0ROamrc=; b=grF1j6YgJSgFEGqpenR5IvmKEvZYTG3DlwzSoNLiVZY+dzSsoX3J324gJM3yZHewYrPnC2 QKUDKTJxE8yp+u95xwS53wd0PL/Zf/J/Pqx72CiIkvIzoYcfBBaDerZR9w/7wl1tvXYmz3 LmPPMyi3IiXAjovanBVLY8yke7jqrV9cR8vwxSlR1ogmuVhS8ahu3iCfwxIRJs09GR0YLq LYYVBpiWKmAGzdhjEbM88hkRiIdqhRP6OaV6xF960Plt2fviX+x3Mjg6fnyfxaFpYrJR93 hpUdq5i6rmVDXFWVE/wApIAhG85EQGK5sqReZo6HJXiYLMJp5nLPd8PfSWWHYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719515846; a=rsa-sha256; cv=none; b=YN5d9dkjEUYL1s6udTW7Tbn7Lk8A+6yia6i80G5EYP6NT78DIFGuCvffyNeZUEDl1le6EM QeD4qDIeqfvar1UkpA6Q2pw56fW9mBEo7X2BQHFyPO4sQZTOKDTVWeiQxu7XcliuDGpKSY 5kZ8gqu/xxl1o7sBnmr7a8xBEY2sBE3VY0c8TIG0qQqYFFo6nvhiaROwcYQefa66tFSnwC h8ty6SXDqH9Ax/x+gSDxHmMfjNSUTQSIJqKh/2kkFyEBi1CnSYZ/7PmVPC8O/F2jcg1SNK ElMzeRlYi2jnYZQs8QumF2w1JmI/Y44VNcz0DrpefbJqdiBck92rhOY6lT8pUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719515846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P75oqIWqR/ws+GKLiZNjvkfIKUwrlHyOc8gl0ROamrc=; b=SBBrIxoy41P5Z1U3jslk+GkqP9YSDT3i6xjTbfI0fBOJMNK2R1IItPINpsdQf3RYHIHAct V04MNm8Ct49Fbu7Ku/zjvpTTqqHiWbic16Z7PX4BdLZM6MvFFWgmx2Jp12rRUc/p/Cquc9 e/SPJJjOlOqRejKyvTkTse15wbmonDWNsciMHSq3aGcaW69vBVNWfyXZolBJx6wPJuak8d wn46PV4gsz7Ez/lhdW9iqp2cyYlvkP32mqPkovYMJdhaMEXRfCuquVTtnloE+ZjkwlLKNz dpN63uoLWwIIYSyjoG7ZttIQhwS7fhJP0qNwq18tfcFFmwbZs55A1QzsUvLgdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W97cQ3pgVzPdk; Thu, 27 Jun 2024 19:17: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 45RJHQiN058156; Thu, 27 Jun 2024 19:17:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RJHQ31058153; Thu, 27 Jun 2024 19:17:26 GMT (envelope-from git) Date: Thu, 27 Jun 2024 19:17:26 GMT Message-Id: <202406271917.45RJHQ31058153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 995730a635bc - main - swap_pager: cleanup swapoff_object List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 995730a635bcb3bf6e5f2ffde950fb930cb1c23b Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=995730a635bcb3bf6e5f2ffde950fb930cb1c23b commit 995730a635bcb3bf6e5f2ffde950fb930cb1c23b Author: Doug Moore AuthorDate: 2024-06-27 19:06:09 +0000 Commit: Doug Moore CommitDate: 2024-06-27 19:06:09 +0000 swap_pager: cleanup swapoff_object Function swap_pager_swapoff_object calls vm_pager_unswapped (via swp_pager_force_dirty) for every page that must be unswapped. That means that there's an unneeded check for lock ownership (the caller always owns it), a needless PCTRIE_LOOKUP (the caller has already found it), a call to free one page of swap space only, and a check to see if all blocks are empty, when the caller usually knows that the check is useless. Isolate the essential part, needed however swap_pager_unswapped is invoked, into a smaller function swap_pager_unswapped_acct. From swapoff_object, invoke swp_pager_update_freerange for each appropriate page, so that there are potentially fewer calls to swp_pager_freeswapspace. Consider freeing a set of blocks (a struct swblk) only after having invalidated all those blocks. Replace the doubly-nested loops with a single loop, and refetch and rescan a swblk only when the object write lock has been released and reacquired. After getting a page from swap, dirty it immediately to address a race condition observed by @kib. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45668 --- sys/vm/swap_pager.c | 184 +++++++++++++++++++++++++++++----------------------- 1 file changed, 103 insertions(+), 81 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 8d9236a2eb1a..79986842d814 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1183,6 +1183,21 @@ swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, return (TRUE); } +static void +swap_pager_unswapped_acct(vm_page_t m) +{ + KASSERT((m->object->flags & OBJ_SWAP) != 0, + ("Free object not swappable")); + if ((m->a.flags & PGA_SWAP_FREE) != 0) + counter_u64_add(swap_free_completed, 1); + vm_page_aflag_clear(m, PGA_SWAP_FREE | PGA_SWAP_SPACE); + + /* + * The meta data only exists if the object is OBJT_SWAP + * and even then might not be allocated yet. + */ +} + /* * SWAP_PAGER_PAGE_UNSWAPPED() - remove swap backing store related to page * @@ -1229,16 +1244,7 @@ swap_pager_unswapped(vm_page_t m) } return; } - if ((m->a.flags & PGA_SWAP_FREE) != 0) - counter_u64_add(swap_free_completed, 1); - vm_page_aflag_clear(m, PGA_SWAP_FREE | PGA_SWAP_SPACE); - - /* - * The meta data only exists if the object is OBJT_SWAP - * and even then might not be allocated yet. - */ - KASSERT((m->object->flags & OBJ_SWAP) != 0, - ("Free object not swappable")); + swap_pager_unswapped_acct(m); sb = SWAP_PCTRIE_LOOKUP(&m->object->un_pager.swp.swp_blks, rounddown(m->pindex, SWAP_META_PAGES)); @@ -1786,11 +1792,12 @@ swap_pager_nswapdev(void) } static void -swp_pager_force_dirty(vm_page_t m) +swp_pager_force_dirty(struct page_range *range, vm_page_t m, daddr_t *blk) { - vm_page_dirty(m); - swap_pager_unswapped(m); + swap_pager_unswapped_acct(m); + swp_pager_update_freerange(range, *blk); + *blk = SWAPBLK_NONE; vm_page_launder(m); } @@ -1827,18 +1834,23 @@ swap_pager_swapped_pages(vm_object_t object) static void swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) { + struct page_range range; struct swblk *sb; vm_page_t m; vm_pindex_t pi; daddr_t blk; - int i, nv, rahead, rv; + int i, rahead, rv; + bool sb_empty; + VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_SWAP) != 0, ("%s: Object not swappable", __func__)); - for (pi = 0; (sb = SWAP_PCTRIE_LOOKUP_GE( - &object->un_pager.swp.swp_blks, pi)) != NULL; ) { - if ((object->flags & OBJ_DEAD) != 0) { + pi = 0; + i = 0; + swp_pager_init_freerange(&range); + for (;;) { + if (i == 0 && (object->flags & OBJ_DEAD) != 0) { /* * Make sure that pending writes finish before * returning. @@ -1847,76 +1859,86 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) swp_pager_meta_free_all(object); break; } - for (i = 0; i < SWAP_META_PAGES; i++) { - /* - * Count the number of contiguous valid blocks. - */ - for (nv = 0; nv < SWAP_META_PAGES - i; nv++) { - blk = sb->d[i + nv]; - if (!swp_pager_isondev(blk, sp) || - blk == SWAPBLK_NONE) - break; - } - if (nv == 0) - continue; - /* - * Look for a page corresponding to the first - * valid block and ensure that any pending paging - * operations on it are complete. If the page is valid, - * mark it dirty and free the swap block. Try to batch - * this operation since it may cause sp to be freed, - * meaning that we must restart the scan. Avoid busying - * valid pages since we may block forever on kernel - * stack pages. - */ - m = vm_page_lookup(object, sb->p + i); - if (m == NULL) { - m = vm_page_alloc(object, sb->p + i, - VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL); - if (m == NULL) - break; - } else { - if ((m->oflags & VPO_SWAPINPROG) != 0) { - m->oflags |= VPO_SWAPSLEEP; - VM_OBJECT_SLEEP(object, &object->handle, - PSWP, "swpoff", 0); - break; - } - if (vm_page_all_valid(m)) { - do { - swp_pager_force_dirty(m); - } while (--nv > 0 && - (m = vm_page_next(m)) != NULL && - vm_page_all_valid(m) && - (m->oflags & VPO_SWAPINPROG) == 0); - break; - } - if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) - break; + if (i == SWAP_META_PAGES) { + pi = sb->p + SWAP_META_PAGES; + if (sb_empty) { + SWAP_PCTRIE_REMOVE( + &object->un_pager.swp.swp_blks, sb->p); + uma_zfree(swblk_zone, sb); } + i = 0; + } - vm_object_pip_add(object, 1); - rahead = SWAP_META_PAGES; - rv = swap_pager_getpages_locked(object, &m, 1, NULL, - &rahead); - if (rv != VM_PAGER_OK) - panic("%s: read from swap failed: %d", - __func__, rv); - VM_OBJECT_WLOCK(object); - vm_object_pip_wakeupn(object, 1); - vm_page_xunbusy(m); + if (i == 0) { + sb = SWAP_PCTRIE_LOOKUP_GE( + &object->un_pager.swp.swp_blks, pi); + if (sb == NULL) + break; + sb_empty = true; + m = NULL; + } - /* - * The object lock was dropped so we must restart the - * scan of this swap block. Pages paged in during this - * iteration will be marked dirty in a future iteration. - */ - break; + /* Skip an invalid block. */ + blk = sb->d[i]; + if (blk == SWAPBLK_NONE || !swp_pager_isondev(blk, sp)) { + if (blk != SWAPBLK_NONE) + sb_empty = false; + m = NULL; + i++; + continue; } - if (i == SWAP_META_PAGES) - pi = sb->p + SWAP_META_PAGES; + + /* + * Look for a page corresponding to this block, If the found + * page has pending operations, sleep and restart the scan. + */ + m = m != NULL ? vm_page_next(m) : + vm_page_lookup(object, sb->p + i); + if (m != NULL && (m->oflags & VPO_SWAPINPROG) != 0) { + m->oflags |= VPO_SWAPSLEEP; + VM_OBJECT_SLEEP(object, &object->handle, PSWP, "swpoff", + 0); + i = 0; /* Restart scan after object lock dropped. */ + continue; + } + + /* + * If the found page is valid, mark it dirty and free the swap + * block. + */ + if (m != NULL && vm_page_all_valid(m)) { + swp_pager_force_dirty(&range, m, &sb->d[i]); + i++; + continue; + } + + /* Is there a page we can acquire or allocate? */ + if (m == NULL) { + m = vm_page_alloc(object, sb->p + i, + VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL); + } else if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) + m = NULL; + + /* If no page available, repeat this iteration. */ + if (m == NULL) + continue; + + /* Get the page from swap, mark it dirty, restart the scan. */ + vm_object_pip_add(object, 1); + rahead = SWAP_META_PAGES; + rv = swap_pager_getpages_locked(object, &m, 1, NULL, &rahead); + if (rv != VM_PAGER_OK) + panic("%s: read from swap failed: %d", __func__, rv); + VM_OBJECT_WLOCK(object); + vm_object_pip_wakeupn(object, 1); + KASSERT(vm_page_all_valid(m), + ("%s: Page %p not all valid", __func__, m)); + swp_pager_force_dirty(&range, m, &sb->d[i]); + vm_page_xunbusy(m); + i = 0; /* Restart scan after object lock dropped. */ } + swp_pager_freeswapspace(&range); } /* From nobody Thu Jun 27 19:19:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W97fb6Ts7z5QFML; Thu, 27 Jun 2024 19:19:19 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W97fZ710Tz4lk8; Thu, 27 Jun 2024 19:19:18 +0000 (UTC) (envelope-from unkadoug@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=acqsofRn; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of unkadoug@gmail.com designates 2607:f8b0:4864:20::32c as permitted sender) smtp.mailfrom=unkadoug@gmail.com Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6fb840d8ffdso4391508a34.1; Thu, 27 Jun 2024 12:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719515957; x=1720120757; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=T+NyAr0mdgm8LnaYLwg3YBqENlxhjE4sw2OAM/aVpyI=; b=acqsofRn9xOuJ/z4NRAaF4nZoPe9IlQ2O+yIf7BH/5rDxrFjwVS7Np3Cg87GRrlFZI Cjmy3phGR/muPpd+m3LpIwddK9xZ+7vJtMkUT1HVdiP9BgKUjPbswwPvMAweUkv6wA3a UvZ62jNfMGJzuc7L9C8wdisBG6oBOGj0QZJ3y+7lt0OB1madRadQJcx0sdrEna1APAm6 PsmSVU3V8BYw3zYoIvZiS5pbJwQvUdL2XqUFucI+z0jDx5mkXA6BXiWqxmq59Z+Cgxjb bq8d/Y0ibiSCsaIH6hkNTMmFKf2X9YYrA5QcmO1Xji1WfdaHyoHK9Ww7Ox+xOmzZPmVC r0UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719515957; x=1720120757; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=T+NyAr0mdgm8LnaYLwg3YBqENlxhjE4sw2OAM/aVpyI=; b=LxTTN2nhlGSpIUzkdRdnxpIKYeYeKyopj4z8IGDWM4jtSqC3bsvmgNdfRrQClho1gm U0qZU07s5Td6yXSFL3OqW8RGRhqw6NvvvnqDCC/G2umMCXI9+lK8owZ2HUF5StYgeoSE piEqmjOPePFlRqUXXJ4FQl9qu0dClSz8MqZStjV6pUScMFdbDWebg62YGjanH5SRF+4n o0cqme+coJomigdJ2Jga/qDlNWewTytSnZtn+stQL9LqtVj+Es95Q9lh9g43tOlZWUXQ UeU59qQHQC2/nePQ8QntaRL0JKhN7qhW0BJb4mJRFdbRN1/Em5Tyj+IFF+c0yTwBt1Fw dxCw== X-Forwarded-Encrypted: i=1; AJvYcCWnxdqUznCJuh7bx6//PB0zftWlFmtnCbrC/MfpbTOlc5NXhnHxStW4eEwkF5gyXc/gBJyrR5uoCKSc5AwiHq8PDwzRyZhhs8D8yq7qFnSLC7y63EOouWNtTyypgSzLGhtZc4VK+TnSChkeXKTIvDX0nw== X-Gm-Message-State: AOJu0YzH1HUPvgL6cPNMzxTstzmW47cUOTjgVL5AGvCkULrJUo1aaFZk rxOln8gl1RCa81/jwVBZ3qxuI09m8GXQAM57ci54feuAMXmkN/Y9mFcsI5H+ X-Google-Smtp-Source: AGHT+IGg/z2SA2zYqCxhS1ez6rbfIL+BU0fQfousD77xOdjdDmoGnGNwbVkIeEhfZyiUjS3+UaZfXA== X-Received: by 2002:a05:6830:88:b0:701:ef8b:d676 with SMTP id 46e09a7af769-701ef8bf6d8mr3672767a34.5.1719515956767; Thu, 27 Jun 2024 12:19:16 -0700 (PDT) Received: from [108.254.203.202] (108-254-203-202.lightspeed.hstntx.sbcglobal.net. [108.254.203.202]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-701f7b20212sm52836a34.61.2024.06.27.12.19.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jun 2024 12:19:16 -0700 (PDT) From: Doug Moore X-Google-Original-From: Doug Moore Message-ID: <960d761d-5c58-9e97-c07a-d689d07bdab1@freebsd.org> Date: Thu, 27 Jun 2024 14:19:15 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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.10.0 Subject: Re: git: 995730a635bc - main - swap_pager: cleanup swapoff_object Content-Language: en-US To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406271917.45RJHQ31058153@gitrepo.freebsd.org> In-Reply-To: <202406271917.45RJHQ31058153@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MID_RHS_MATCH_TO(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.94)[-0.938]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::32c:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCPT_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4W97fZ710Tz4lk8 Omitted: Previous version tested by pho. My apologies. Doug On 6/27/24 14:17, Doug Moore wrote: > The branch main has been updated by dougm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=995730a635bcb3bf6e5f2ffde950fb930cb1c23b > > commit 995730a635bcb3bf6e5f2ffde950fb930cb1c23b > Author: Doug Moore > AuthorDate: 2024-06-27 19:06:09 +0000 > Commit: Doug Moore > CommitDate: 2024-06-27 19:06:09 +0000 > > swap_pager: cleanup swapoff_object > > Function swap_pager_swapoff_object calls vm_pager_unswapped (via > swp_pager_force_dirty) for every page that must be unswapped. That > means that there's an unneeded check for lock ownership (the caller > always owns it), a needless PCTRIE_LOOKUP (the caller has already > found it), a call to free one page of swap space only, and a check to > see if all blocks are empty, when the caller usually knows that the > check is useless. > > Isolate the essential part, needed however swap_pager_unswapped is > invoked, into a smaller function swap_pager_unswapped_acct. From > swapoff_object, invoke swp_pager_update_freerange for each appropriate > page, so that there are potentially fewer calls to > swp_pager_freeswapspace. Consider freeing a set of blocks (a struct > swblk) only after having invalidated all those blocks. > > Replace the doubly-nested loops with a single loop, and refetch and > rescan a swblk only when the object write lock has been released and > reacquired. > > After getting a page from swap, dirty it immediately to address a race > condition observed by @kib. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D45668 > --- > sys/vm/swap_pager.c | 184 +++++++++++++++++++++++++++++----------------------- > 1 file changed, 103 insertions(+), 81 deletions(-) > > diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c > index 8d9236a2eb1a..79986842d814 100644 > --- a/sys/vm/swap_pager.c > +++ b/sys/vm/swap_pager.c > @@ -1183,6 +1183,21 @@ swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, > return (TRUE); > } > > +static void > +swap_pager_unswapped_acct(vm_page_t m) > +{ > + KASSERT((m->object->flags & OBJ_SWAP) != 0, > + ("Free object not swappable")); > + if ((m->a.flags & PGA_SWAP_FREE) != 0) > + counter_u64_add(swap_free_completed, 1); > + vm_page_aflag_clear(m, PGA_SWAP_FREE | PGA_SWAP_SPACE); > + > + /* > + * The meta data only exists if the object is OBJT_SWAP > + * and even then might not be allocated yet. > + */ > +} > + > /* > * SWAP_PAGER_PAGE_UNSWAPPED() - remove swap backing store related to page > * > @@ -1229,16 +1244,7 @@ swap_pager_unswapped(vm_page_t m) > } > return; > } > - if ((m->a.flags & PGA_SWAP_FREE) != 0) > - counter_u64_add(swap_free_completed, 1); > - vm_page_aflag_clear(m, PGA_SWAP_FREE | PGA_SWAP_SPACE); > - > - /* > - * The meta data only exists if the object is OBJT_SWAP > - * and even then might not be allocated yet. > - */ > - KASSERT((m->object->flags & OBJ_SWAP) != 0, > - ("Free object not swappable")); > + swap_pager_unswapped_acct(m); > > sb = SWAP_PCTRIE_LOOKUP(&m->object->un_pager.swp.swp_blks, > rounddown(m->pindex, SWAP_META_PAGES)); > @@ -1786,11 +1792,12 @@ swap_pager_nswapdev(void) > } > > static void > -swp_pager_force_dirty(vm_page_t m) > +swp_pager_force_dirty(struct page_range *range, vm_page_t m, daddr_t *blk) > { > - > vm_page_dirty(m); > - swap_pager_unswapped(m); > + swap_pager_unswapped_acct(m); > + swp_pager_update_freerange(range, *blk); > + *blk = SWAPBLK_NONE; > vm_page_launder(m); > } > > @@ -1827,18 +1834,23 @@ swap_pager_swapped_pages(vm_object_t object) > static void > swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) > { > + struct page_range range; > struct swblk *sb; > vm_page_t m; > vm_pindex_t pi; > daddr_t blk; > - int i, nv, rahead, rv; > + int i, rahead, rv; > + bool sb_empty; > > + VM_OBJECT_ASSERT_WLOCKED(object); > KASSERT((object->flags & OBJ_SWAP) != 0, > ("%s: Object not swappable", __func__)); > > - for (pi = 0; (sb = SWAP_PCTRIE_LOOKUP_GE( > - &object->un_pager.swp.swp_blks, pi)) != NULL; ) { > - if ((object->flags & OBJ_DEAD) != 0) { > + pi = 0; > + i = 0; > + swp_pager_init_freerange(&range); > + for (;;) { > + if (i == 0 && (object->flags & OBJ_DEAD) != 0) { > /* > * Make sure that pending writes finish before > * returning. > @@ -1847,76 +1859,86 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) > swp_pager_meta_free_all(object); > break; > } > - for (i = 0; i < SWAP_META_PAGES; i++) { > - /* > - * Count the number of contiguous valid blocks. > - */ > - for (nv = 0; nv < SWAP_META_PAGES - i; nv++) { > - blk = sb->d[i + nv]; > - if (!swp_pager_isondev(blk, sp) || > - blk == SWAPBLK_NONE) > - break; > - } > - if (nv == 0) > - continue; > > - /* > - * Look for a page corresponding to the first > - * valid block and ensure that any pending paging > - * operations on it are complete. If the page is valid, > - * mark it dirty and free the swap block. Try to batch > - * this operation since it may cause sp to be freed, > - * meaning that we must restart the scan. Avoid busying > - * valid pages since we may block forever on kernel > - * stack pages. > - */ > - m = vm_page_lookup(object, sb->p + i); > - if (m == NULL) { > - m = vm_page_alloc(object, sb->p + i, > - VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL); > - if (m == NULL) > - break; > - } else { > - if ((m->oflags & VPO_SWAPINPROG) != 0) { > - m->oflags |= VPO_SWAPSLEEP; > - VM_OBJECT_SLEEP(object, &object->handle, > - PSWP, "swpoff", 0); > - break; > - } > - if (vm_page_all_valid(m)) { > - do { > - swp_pager_force_dirty(m); > - } while (--nv > 0 && > - (m = vm_page_next(m)) != NULL && > - vm_page_all_valid(m) && > - (m->oflags & VPO_SWAPINPROG) == 0); > - break; > - } > - if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) > - break; > + if (i == SWAP_META_PAGES) { > + pi = sb->p + SWAP_META_PAGES; > + if (sb_empty) { > + SWAP_PCTRIE_REMOVE( > + &object->un_pager.swp.swp_blks, sb->p); > + uma_zfree(swblk_zone, sb); > } > + i = 0; > + } > > - vm_object_pip_add(object, 1); > - rahead = SWAP_META_PAGES; > - rv = swap_pager_getpages_locked(object, &m, 1, NULL, > - &rahead); > - if (rv != VM_PAGER_OK) > - panic("%s: read from swap failed: %d", > - __func__, rv); > - VM_OBJECT_WLOCK(object); > - vm_object_pip_wakeupn(object, 1); > - vm_page_xunbusy(m); > + if (i == 0) { > + sb = SWAP_PCTRIE_LOOKUP_GE( > + &object->un_pager.swp.swp_blks, pi); > + if (sb == NULL) > + break; > + sb_empty = true; > + m = NULL; > + } > > - /* > - * The object lock was dropped so we must restart the > - * scan of this swap block. Pages paged in during this > - * iteration will be marked dirty in a future iteration. > - */ > - break; > + /* Skip an invalid block. */ > + blk = sb->d[i]; > + if (blk == SWAPBLK_NONE || !swp_pager_isondev(blk, sp)) { > + if (blk != SWAPBLK_NONE) > + sb_empty = false; > + m = NULL; > + i++; > + continue; > } > - if (i == SWAP_META_PAGES) > - pi = sb->p + SWAP_META_PAGES; > + > + /* > + * Look for a page corresponding to this block, If the found > + * page has pending operations, sleep and restart the scan. > + */ > + m = m != NULL ? vm_page_next(m) : > + vm_page_lookup(object, sb->p + i); > + if (m != NULL && (m->oflags & VPO_SWAPINPROG) != 0) { > + m->oflags |= VPO_SWAPSLEEP; > + VM_OBJECT_SLEEP(object, &object->handle, PSWP, "swpoff", > + 0); > + i = 0; /* Restart scan after object lock dropped. */ > + continue; > + } > + > + /* > + * If the found page is valid, mark it dirty and free the swap > + * block. > + */ > + if (m != NULL && vm_page_all_valid(m)) { > + swp_pager_force_dirty(&range, m, &sb->d[i]); > + i++; > + continue; > + } > + > + /* Is there a page we can acquire or allocate? */ > + if (m == NULL) { > + m = vm_page_alloc(object, sb->p + i, > + VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL); > + } else if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) > + m = NULL; > + > + /* If no page available, repeat this iteration. */ > + if (m == NULL) > + continue; > + > + /* Get the page from swap, mark it dirty, restart the scan. */ > + vm_object_pip_add(object, 1); > + rahead = SWAP_META_PAGES; > + rv = swap_pager_getpages_locked(object, &m, 1, NULL, &rahead); > + if (rv != VM_PAGER_OK) > + panic("%s: read from swap failed: %d", __func__, rv); > + VM_OBJECT_WLOCK(object); > + vm_object_pip_wakeupn(object, 1); > + KASSERT(vm_page_all_valid(m), > + ("%s: Page %p not all valid", __func__, m)); > + swp_pager_force_dirty(&range, m, &sb->d[i]); > + vm_page_xunbusy(m); > + i = 0; /* Restart scan after object lock dropped. */ > } > + swp_pager_freeswapspace(&range); > } > > /* From nobody Thu Jun 27 19:33:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W97yP4rVrz5QGxb; Thu, 27 Jun 2024 19:33: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 4W97yP45hQz4nZ4; Thu, 27 Jun 2024 19:33:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719516781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r2MTg+TWRska1rtWuLpk2UEdFc1RT4FcdBk6ysao8AE=; b=Co6rCEUCaQNXaC9XRqnQFhyv55iTFLj79Q99h2eBAVivdRr6oIpwGyqWzDNH7hgd/N4ZEF wbeR2DAuY0p/5WYHgilo0OIdKBOogRMg+MGLvrJfSuW+fWMjZ6ZxPK4fcjusQMiqUYHEZT Ak4OPa+EhyUuDyH7j8+05XTmkBX81rYPtkEytReaSpet/Z6jjEqvPlpsa9/U0N/IURXmX9 +V8YcMEvttBTw3Y2FNi5AYUqlqDfnCDR9HDOCgfTgYWYeTQl5oQfC8vQ6bXe1gvNJ5LnKY aVoeqnPoFNPVofWWNiiDJyg2Uog025gLZn2CY+14yo1c6huw9JiLZJ6UZbyGHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719516781; a=rsa-sha256; cv=none; b=a9MscjrL3wK6f9NoAy0HeJXk5oMlAJZfWXgq3dB9mNJCx9KFQuSoAz8a23F3pGvYm1x1ZH aDncdDbRCNjGaoqi7ia+5F3fK1VQHB1ff+Lf4Rv6DS9ZaGM8tHsXSNQa5LItuBBJmzasjX S0vPPW3kn31/vF6/L5UHoY4v9oBpTP6lwfAkQpOohz3HxK3Ve+qhtdPbpzQMVviZcDAQxw HlH3kaWbcSinDuQUNuIbePjWUqXKJ+YdnjeqHquR2LThao61dWF5+jjOJi+J11ymmWQ9JF 4uh3M6LT7ITTbAHBHfkGRZH4FMxN0BK2r63oSnCdtglHs1FKKF0RSUD+jHsXZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719516781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r2MTg+TWRska1rtWuLpk2UEdFc1RT4FcdBk6ysao8AE=; b=eW4WqhrsWchJmk1v6CPGARXYzmBtnnoBd0kPO3c+4dB9+fxSdt2TBqF4cRTBzRltYVVzCl v8JZrA8CKw8dFv/R/7rlTHiyJuy9L7XYpY4ANDrU7ZYjlStMbr+I8Yf08jxjjBnbnFROTl N+UosCMfJ9AOJ6uXyHw/MAqARPrjDrxX3VQK/QLadDhEtqWIhTHQvmCkgb6Pfh7a1Vynr8 qXSNBPCW9rhlyfVBvkHJ6W6a6rxwzOLAypFT4PwH8qJvNwZXMvp6WM6SQtlQBmpnXCqrB6 sGV/0yEWSiZMbialNRJZtZenNjNSMhUvttYUK7z9qcJlHhzbIqo6dsgJ4oPcmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W97yP3dh0zQFK; Thu, 27 Jun 2024 19:33: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 45RJX1Lj090129; Thu, 27 Jun 2024 19:33:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RJX1XY090126; Thu, 27 Jun 2024 19:33:01 GMT (envelope-from git) Date: Thu, 27 Jun 2024 19:33:01 GMT Message-Id: <202406271933.45RJX1XY090126@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: 32d2a1de3d64 - main - arm64: correct physmap bounds in pmap_bootstrap() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 32d2a1de3d64981ad99650bb0d9bc011a0aab7fc Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=32d2a1de3d64981ad99650bb0d9bc011a0aab7fc commit 32d2a1de3d64981ad99650bb0d9bc011a0aab7fc Author: Mitchell Horne AuthorDate: 2024-06-27 19:30:00 +0000 Commit: Mitchell Horne CommitDate: 2024-06-27 19:32:44 +0000 arm64: correct physmap bounds in pmap_bootstrap() physmap_idx now contains the raw value; we should not multiply it. Reviewed by: markj Fixes: d03e1ffbea6d ("arm64: Remove some redundant calculations...") --- 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 d072a387d9b9..f4a46823428a 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1215,7 +1215,7 @@ pmap_bootstrap_dmap(vm_paddr_t min_pa) dmap_phys_max = 0; dmap_max_addr = 0; - for (i = 0; i < (physmap_idx * 2); i += 2) { + for (i = 0; i < physmap_idx; i += 2) { bs_state.pa = physmap[i] & ~L3_OFFSET; bs_state.va = bs_state.pa - dmap_phys_base + DMAP_MIN_ADDRESS; From nobody Fri Jun 28 00:29:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9GXn6PScz5NlNM; Fri, 28 Jun 2024 00:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9GXn5wWPz3xbB; Fri, 28 Jun 2024 00:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719534585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5cyVq3nOsWCninMquFcpxZHDOR5zJEW/S1qn9+CuMTg=; b=HmarVP+4r6lG68ctE/t29P3gndwmibZdt23/sk838jfJutT2CCDTXUKsgccXvd78tRtYh4 blw9gcKA0vYaXG1Q3uPtR2i7pmwOxZXPP1pJmWX4iRlzQEmpHHOY9Fgd8OoHTGN2pLS4a2 xGLd9IV/7uVKzsVNrgE0KzSk3knZoDFkRVFF5hRduASdoWpgyu3kzeR/UZ/sA+foOSkOps 2Z0tJRTi30JrM0/zy2It4FAKUds3Lyom0dFmkF5TOYD8SQCO33esVP8eoFZrzjguuFr1DT UbISbVLeEhP/0MjIVkhCYAlXTHdP9HcSVLy9X4gguXtOBwxKb5JAGgyCxKxLIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719534585; a=rsa-sha256; cv=none; b=xyW+ayJ1uwDAfKoJQoO6bif1C6ypAdey7LpX/SOMmfNSYqe/gEAxg8Z9GrUpC0h4ofq4LL QT+mE37SlBSk0/EbMKnVMETt9kbWmqFlUMuDu2iSUjCgB94nKdheVt9Frz8Rh+kENWVXn7 SV2KnalXq4g78VSPMibqGBp8X0Y2cCjvEeE1mu6afha7g/foCcjpNvf76i54x/X/nMHDw6 aSuMOmJqIs22yKAg5bXtrnceKnJ08XP8WG2Ogmd1Ly8w5wfFaTkiCFr7PGK/3PrWVpLT4q RWaL7z5ow6z2EZb9nCaNgtIM6JqWWXJNq7deobD/W3TuhsEQGZ+Ufj5FMZOnRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719534585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5cyVq3nOsWCninMquFcpxZHDOR5zJEW/S1qn9+CuMTg=; b=T+XFAb1DEwRwGqmYKZSR7NS6LUWEXAO+EgFbESpBobjm4ACbnjkwhPPjb8prEbKkgk9PN7 REY4RbsP+1H9qnKy66iZxWm+JXDsG46+yYa1m8DO1x1z1+EZmm09rsf9EcnAVq9EAOZEo2 bYR8zwDNLh5LG/dZl6C1iwFqfO2CEofJzRkjzwispAv1mvUJ1gn/PVSG3HAwutRPDGYfHa 4IYuv57tUOHelqMmPKHt4Mj2eYko9ygj7eJMfWZCUNZc0lASQ7fyDhZNMX7Wu36SQMVZjc m9tQ1fL0+YxK6ijX2HSyGMhVCrxXjoz+ujjXdapmiO2ZHrSRdER0KDqE+9kjaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9GXn5QsJzZBq; Fri, 28 Jun 2024 00:29: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 45S0TjRU079777; Fri, 28 Jun 2024 00:29:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S0Tjh6079774; Fri, 28 Jun 2024 00:29:45 GMT (envelope-from git) Date: Fri, 28 Jun 2024 00:29:45 GMT Message-Id: <202406280029.45S0Tjh6079774@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: cfe55a8af81d - main - fwget.8: polish List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: cfe55a8af81df098995143cf3a17f67f591f5dae Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cfe55a8af81df098995143cf3a17f67f591f5dae commit cfe55a8af81df098995143cf3a17f67f591f5dae Author: Alexander Ziaee AuthorDate: 2024-06-01 08:45:07 +0000 Commit: Warner Losh CommitDate: 2024-06-28 00:28:32 +0000 fwget.8: polish MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1269 --- usr.sbin/fwget/fwget.8 | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/usr.sbin/fwget/fwget.8 b/usr.sbin/fwget/fwget.8 index 71cee817b7e6..7b8b606cc591 100644 --- a/usr.sbin/fwget/fwget.8 +++ b/usr.sbin/fwget/fwget.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG .\" .\" Redistribution and use in source and binary forms, with or without @@ -20,40 +23,38 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd Apr 26, 2023 +.Dd June 27, 2024 .Dt FWGET 8 .Os .Sh NAME .Nm fwget -.Nd Install firmwares for the running system +.Nd install firmware packages for the running system .Sh SYNOPSIS .Nm -.Op Fl v .Op Fl n -.Ar subsystem +.Op Fl v +.Op Ar subsystem .Sh DESCRIPTION The .Nm -utility can be used to install firmwares packaged needed for the running -system -.Pp -If not specified the -.Ar subsystem -argument will default to pci cards. +utility can be used to detect and install firmware packages +for devices present on a running system. .Pp The options are as follows: -.Bl -tag -width +.Bl -tag -width Fl .It Fl n Dry run, only show needed packages .It Fl v Be more verbose +.It Ar subsystem +Hardware subsystem, default pci .El .Sh SEE ALSO .Xr firmware 9 .Sh HISTORY The .Nm -utility appeared in +utility first appeared in .Fx 14.0 . .Sh AUTHORS .An -nosplit @@ -61,4 +62,6 @@ The .Nm utility and this manual page were written by .An Emmanuel Vadot Aq Mt manu@FreeBSD.org -for Beckhoff Automation GmbH & Co. KG . +for Beckhoff Automation GmbH & Co\. KG. +.Sh CAVEATS +This utility currently only supports the pci subsystem. From nobody Fri Jun 28 00:32:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9GcK1H92z5Nlfr; Fri, 28 Jun 2024 00:32: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9GcK0vCXz3yft; Fri, 28 Jun 2024 00:32:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719534769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vXDjRrnGi1XftmqA+CKdNOnLDKvu/Wq3ikb2UJDOd1k=; b=KfWLeoivoeL5u0N4e7m4ddUsTX+quO6LAzF9GZL2Z4WkoTHLHypq3XX9xo/x9DAocp1Je6 h76g2IYszX0e5HW32nhMkHtsnUfAn8CzfUVa/yeXAZ34WaDIicric3DRFrI042voEq4hpU KSMYb242WGQlrXtdZg3yJXadcKWzwko82q0MLGvK/wxYFMPQ7sCEaeUM0zHeCGy0zS3QHv 3WYHVfQAxzIuuilClktQxeS3QAS9dtWajSSPnNuqFXa1xW4/cbqYzbhmrqPCpomtBVlnCm aDK7xAPDxfjlYOgxXyQNFry+ayO5xVaWlUC7QhQ3yvNTVYa8v96fuLphmrk02w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719534769; a=rsa-sha256; cv=none; b=xFBeNZscmykhNYn/TsKZiN8Fd/wZBEBi6jQ7euOq46Cj7CZPWW6+p/4kv9oMej2AkYUqCY l12VssgeMuxrzBwO3K4/JD2kzheS8kPhtBcpaWORNcQMitqVqxOjU3sFnwpSgnP4uJdEHQ v8/2jrsouybN97mqNjA+yuHvxcTWk6GyiKT/BFGUDo7T1UrUIH2EDbvPt91u3PGNdzjuxx +GUP87i5FhSBKlk5yGKVauMhlbXxI2TutFo0DZTvvikIvQqHD7vh28FhdkPIlMHfw5Ti7M XgYmJoOiBLj0KS6mPGrWmHj0/7Y/zMkoJssUFpL4/HizuRM9e4hTltxEzZLJZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719534769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vXDjRrnGi1XftmqA+CKdNOnLDKvu/Wq3ikb2UJDOd1k=; b=tY2AGWG9Pj1w/xOnqcxVXQ6YNRRj4v43AWDFPKlAiXu1/FlxmiV2WgM7gJij4yXWP9JGog oESRxEeZ/kRXsete6dyZz38WJlvpeHvLaP2XYX8nRxaKzwEIt1MwyOHlWeJ1W0bYR40xtF AFC8C+niBk8DyXUE0QQC56R6NkMT1FgtH/BCrv1ZV4dSwYrKcWWR2L490LnTEopNV+ZVfN 8wgu5QSlO0MvB90yUIHrGmvCCrbcat3NB/q2//gq3ucbDOPCy9Z6plM+YAAQstGXvcIIpp xQZdCAZlFtLgshOBNFW/TA/Zbgz2lLSzcinj8FOVUOo7bJ2LPapO7+KNzEvG/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 4W9GcK0VHxzZ7h; Fri, 28 Jun 2024 00:32: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 45S0WnS1095715; Fri, 28 Jun 2024 00:32:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S0WmEv095712; Fri, 28 Jun 2024 00:32:48 GMT (envelope-from git) Date: Fri, 28 Jun 2024 00:32:48 GMT Message-Id: <202406280032.45S0WmEv095712@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: 088cc7d221bb - main - man filesystems: fix more xrefs after move to s4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 088cc7d221bb0743fc5ec12de983559b812366bd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=088cc7d221bb0743fc5ec12de983559b812366bd commit 088cc7d221bb0743fc5ec12de983559b812366bd Author: Alexander Ziaee AuthorDate: 2024-06-08 08:30:51 +0000 Commit: Warner Losh CommitDate: 2024-06-28 00:32:05 +0000 man filesystems: fix more xrefs after move to s4 Fixes: 1a720cbec513 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1282 --- MAINTAINERS | 4 ++-- contrib/netbsd-tests/lib/libc/sys/t_revoke.c | 6 +++--- lib/libc/gen/getvfsbyname.c | 2 +- libexec/rc/rc.initdiskless | 2 +- sbin/devd/autofs.conf | 2 +- sbin/devfs/devfs.rules | 2 +- sys/README.md | 2 +- sys/kern/imgact_binmisc.c | 2 +- tests/sys/fs/fusefs/mknod.cc | 2 +- tests/sys/fs/fusefs/open.cc | 2 +- tests/sys/fs/fusefs/xattr.cc | 2 +- tools/test/stress2/misc/devfs5.sh | 2 +- tools/test/stress2/misc/ext2fs3.sh | 2 +- tools/test/stress2/misc/fifo4.sh | 2 +- tools/test/stress2/misc/mkfifo5.sh | 2 +- tools/test/stress2/misc/mkfifo6.sh | 2 +- tools/test/stress2/misc/mkfifo7.sh | 2 +- tools/test/stress2/misc/mlockall4.sh | 2 +- tools/test/stress2/misc/msdos14.sh | 2 +- tools/test/stress2/misc/nullfs18.sh | 2 +- tools/test/stress2/misc/pread.sh | 10 +++++----- tools/test/stress2/misc/procfs3.sh | 2 +- tools/test/stress2/misc/readdir.sh | 8 ++++---- tools/test/stress2/misc/sendfile5.sh | 4 ++-- tools/test/stress2/misc/tmpfs10.sh | 2 +- tools/test/stress2/misc/tmpfs11.sh | 2 +- tools/test/stress2/misc/tmpfs17.sh | 2 +- tools/test/stress2/misc/tmpfs8.sh | 2 +- tools/test/stress2/misc/unionfs17.sh | 2 +- tools/test/stress2/misc/unionfs18.sh | 2 +- tools/test/stress2/misc/unionfs6.sh | 2 +- tools/test/stress2/misc/unionfs7.sh | 2 +- tools/test/stress2/misc/unionfs8.sh | 2 +- 33 files changed, 44 insertions(+), 44 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8c3c798c256c..ea9bb4195aa1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -54,7 +54,7 @@ contrib/pjdfstest asomers,ngie,pjd,#test Pre-commit review requested. etc/mail gshapiro Pre-commit review requested. Keep in sync with -STABLE. etc/sendmail gshapiro Pre-commit review requested. Keep in sync with -STABLE. fetch des Pre-commit review requested, email only. -fusefs(5) asomers Pre-commit review requested. +fusefs(4) asomers Pre-commit review requested. geli pjd Pre-commit review requested (both sys/geom/eli/ and sbin/geom/class/eli/). iwm(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org iwn(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org @@ -121,7 +121,7 @@ libvmmapi jhb Pre-commit review requested via #bhyve phabricator group. usr.sbin/bhyve* jhb Pre-commit review requested via #bhyve phabricator group. -autofs(5) trasz Pre-commit review recommended. +autofs(4) trasz Pre-commit review recommended. iscsi(4) trasz Pre-commit review recommended. rctl(8) trasz Pre-commit review recommended. sys/dev/ofw nwhitehorn Pre-commit review recommended. diff --git a/contrib/netbsd-tests/lib/libc/sys/t_revoke.c b/contrib/netbsd-tests/lib/libc/sys/t_revoke.c index ec225b9be491..73cb9144f680 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_revoke.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_revoke.c @@ -59,7 +59,7 @@ ATF_TC_BODY(revoke_basic, tc) int *buf; #ifdef __FreeBSD__ - atf_tc_skip("revoke(2) is only implemented for devfs(5)."); + atf_tc_skip("revoke(2) is only implemented for devfs(4)."); #endif (void)memset(&res, 0, sizeof(struct rlimit)); (void)getrlimit(RLIMIT_NOFILE, &res); @@ -117,7 +117,7 @@ ATF_TC_BODY(revoke_err, tc) ATF_REQUIRE_ERRNO(ENAMETOOLONG, revoke(buf) == -1); #ifdef __FreeBSD__ - atf_tc_skip("revoke(2) is only implemented for devfs(5)."); + atf_tc_skip("revoke(2) is only implemented for devfs(4)."); #endif errno = 0; ATF_REQUIRE_ERRNO(EPERM, revoke("/etc/passwd") == -1); @@ -140,7 +140,7 @@ ATF_TC_BODY(revoke_perm, tc) pid_t pid; #ifdef __FreeBSD__ - atf_tc_skip("revoke(2) is only implemented for devfs(5)."); + atf_tc_skip("revoke(2) is only implemented for devfs(4)."); #endif pw = getpwnam("nobody"); fd = open(path, O_RDWR | O_CREAT, 0600); diff --git a/lib/libc/gen/getvfsbyname.c b/lib/libc/gen/getvfsbyname.c index b782e5793334..18cbf64b9f4a 100644 --- a/lib/libc/gen/getvfsbyname.c +++ b/lib/libc/gen/getvfsbyname.c @@ -38,7 +38,7 @@ #include /* - * fusefs(5) file systems may have a "subtype" which gets appended to + * fusefs(4) file systems may have a "subtype" which gets appended to * statfs(2)'s f_fstypename field on a per-mount basis. Allow getvfsbyname to * match either the full "fusefs.foobar" or the more general "fusefs". */ diff --git a/libexec/rc/rc.initdiskless b/libexec/rc/rc.initdiskless index a6820a546e55..a4c6c613b85a 100644 --- a/libexec/rc/rc.initdiskless +++ b/libexec/rc/rc.initdiskless @@ -204,7 +204,7 @@ handle_remount() { # $1 = mount point } # Create a generic memory disk. -# The 'auto' parameter will attempt to use tmpfs(5), falls back to md(4). +# The 'auto' parameter will attempt to use tmpfs(4), falls back to md(4). # $1 is size in 512-byte sectors, $2 is the mount point. mount_md() { if [ ${o_verbose} -gt 0 ] ; then diff --git a/sbin/devd/autofs.conf b/sbin/devd/autofs.conf index a06ca7295d38..2671687ecd83 100644 --- a/sbin/devd/autofs.conf +++ b/sbin/devd/autofs.conf @@ -1,5 +1,5 @@ # -# autofs(5) specific devd events +# autofs(4) specific devd events # Discard autofs caches, useful for the -media special map. notify 100 { diff --git a/sbin/devfs/devfs.rules b/sbin/devfs/devfs.rules index f85940aaa7dd..c51672815e64 100644 --- a/sbin/devfs/devfs.rules +++ b/sbin/devfs/devfs.rules @@ -1,5 +1,5 @@ # -# The following are some default rules for devfs(5) mounts. +# The following are some default rules for devfs(4) mounts. # The format is very simple. Empty lines and lines beginning # with a hash '#' are ignored. If the hash mark occurs anywhere # other than the beginning of a line, it and any subsequent diff --git a/sys/README.md b/sys/README.md index 10c9f183f7e1..c36686e979f5 100644 --- a/sys/README.md +++ b/sys/README.md @@ -55,6 +55,6 @@ Source Roadmap: | security | security facilities - `audit(4)` and `mac(4)` | | sys | kernel headers | | tests | kernel unit tests | -| ufs | Unix File System - `ffs(7)` | +| ufs | Unix File System - `ffs(4)` | | vm | virtual memory system | | x86 | code shared by AMD64 and i386 architectures | diff --git a/sys/kern/imgact_binmisc.c b/sys/kern/imgact_binmisc.c index aa037bb6046a..ed7a314ec475 100644 --- a/sys/kern/imgact_binmisc.c +++ b/sys/kern/imgact_binmisc.c @@ -656,7 +656,7 @@ imgact_binmisc_exec(struct image_params *imgp) if (imgp->args->fname != NULL) { fname = imgp->args->fname; } else { - /* Use the fdescfs(5) path for fexecve(2). */ + /* Use the fdescfs(4) path for fexecve(2). */ sname = sbuf_new_auto(); sbuf_printf(sname, "/dev/fd/%d", imgp->args->fd); sbuf_finish(sname); diff --git a/tests/sys/fs/fusefs/mknod.cc b/tests/sys/fs/fusefs/mknod.cc index 1fb855f44f29..eb745f19acd5 100644 --- a/tests/sys/fs/fusefs/mknod.cc +++ b/tests/sys/fs/fusefs/mknod.cc @@ -283,7 +283,7 @@ TEST_F(Mknod, parent_inode) } /* - * fusefs(5) lacks VOP_WHITEOUT support. No bugzilla entry, because that's a + * fusefs(4) lacks VOP_WHITEOUT support. No bugzilla entry, because that's a * feature, not a bug */ TEST_F(Mknod, DISABLED_whiteout) diff --git a/tests/sys/fs/fusefs/open.cc b/tests/sys/fs/fusefs/open.cc index 7ab3aeb6ba2a..ff736e6c3a94 100644 --- a/tests/sys/fs/fusefs/open.cc +++ b/tests/sys/fs/fusefs/open.cc @@ -79,7 +79,7 @@ class OpenNoOpenSupport: public FuseTest { }; /* - * fusefs(5) does not support I/O on device nodes (neither does UFS). But it + * fusefs(4) does not support I/O on device nodes (neither does UFS). But it * shouldn't crash */ TEST_F(Open, chr) diff --git a/tests/sys/fs/fusefs/xattr.cc b/tests/sys/fs/fusefs/xattr.cc index 7fa2a741e074..b1cbb9ffa768 100644 --- a/tests/sys/fs/fusefs/xattr.cc +++ b/tests/sys/fs/fusefs/xattr.cc @@ -350,7 +350,7 @@ TEST_F(Listxattr, enotsup) * On Linux, however, the file system is supposed to return ERANGE if an * insufficiently large buffer is passed to listxattr(2). * - * fusefs(5) must guarantee the usual FreeBSD behavior. + * fusefs(4) must guarantee the usual FreeBSD behavior. */ TEST_F(Listxattr, erange) { diff --git a/tools/test/stress2/misc/devfs5.sh b/tools/test/stress2/misc/devfs5.sh index ab96b37bfa2b..5a72d7db9efb 100755 --- a/tools/test/stress2/misc/devfs5.sh +++ b/tools/test/stress2/misc/devfs5.sh @@ -30,7 +30,7 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 # Test scenario for https://reviews.freebsd.org/D20411 -# Add devfs(5) support for VOP_MKDIR(9) and VOP_RMDIR(9) +# Add devfs(4) support for VOP_MKDIR(9) and VOP_RMDIR(9) . ../default.cfg diff --git a/tools/test/stress2/misc/ext2fs3.sh b/tools/test/stress2/misc/ext2fs3.sh index f33b4cc73547..fd129a235102 100755 --- a/tools/test/stress2/misc/ext2fs3.sh +++ b/tools/test/stress2/misc/ext2fs3.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# ext2fs(5) test scenario with a 1k block size +# ext2fs(4) test scenario with a 1k block size # "panic: ext2_reallocblks: alloc mismatch" seen. # "Fatal trap 12: page fault while in kernel mode" seen. diff --git a/tools/test/stress2/misc/fifo4.sh b/tools/test/stress2/misc/fifo4.sh index 2a8a149e3105..1578b8786d43 100755 --- a/tools/test/stress2/misc/fifo4.sh +++ b/tools/test/stress2/misc/fifo4.sh @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# tmpfs(5) version of fifo2.sh +# tmpfs(4) version of fifo2.sh # No problems seen on HEAD. [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 diff --git a/tools/test/stress2/misc/mkfifo5.sh b/tools/test/stress2/misc/mkfifo5.sh index c0355cef2db0..96d30e5fe024 100755 --- a/tools/test/stress2/misc/mkfifo5.sh +++ b/tools/test/stress2/misc/mkfifo5.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# mkfifo(2), select(2) with tmpfs(5) scenario. +# mkfifo(2), select(2) with tmpfs(4) scenario. . ../default.cfg [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 diff --git a/tools/test/stress2/misc/mkfifo6.sh b/tools/test/stress2/misc/mkfifo6.sh index 5647bf9493d6..13a62b5e0286 100755 --- a/tools/test/stress2/misc/mkfifo6.sh +++ b/tools/test/stress2/misc/mkfifo6.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# mkfifo(2), select(2) with tmpfs(5) scenario. +# mkfifo(2), select(2) with tmpfs(4) scenario. . ../default.cfg [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 diff --git a/tools/test/stress2/misc/mkfifo7.sh b/tools/test/stress2/misc/mkfifo7.sh index b17e84536bed..c1af3374526e 100755 --- a/tools/test/stress2/misc/mkfifo7.sh +++ b/tools/test/stress2/misc/mkfifo7.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# mkfifo(2), poll(2) with tmpfs(5) scenario. +# mkfifo(2), poll(2) with tmpfs(4) scenario. . ../default.cfg [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 diff --git a/tools/test/stress2/misc/mlockall4.sh b/tools/test/stress2/misc/mlockall4.sh index 778256fa8976..66ae05fa4ae1 100755 --- a/tools/test/stress2/misc/mlockall4.sh +++ b/tools/test/stress2/misc/mlockall4.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# mlockall(2) / nullfs(5) scenario causes: +# mlockall(2) / nullfs(4) scenario causes: # http://people.freebsd.org/~pho/stress/log/kostik619.txt # kern/182661, fixed in r256211. diff --git a/tools/test/stress2/misc/msdos14.sh b/tools/test/stress2/misc/msdos14.sh index 9c7a636f5f59..aaa95144c14e 100755 --- a/tools/test/stress2/misc/msdos14.sh +++ b/tools/test/stress2/misc/msdos14.sh @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# Rename(2) test with msdosfs(5) +# Rename(2) test with msdosfs(4) # Test scenario by kib@ . ../default.cfg diff --git a/tools/test/stress2/misc/nullfs18.sh b/tools/test/stress2/misc/nullfs18.sh index 0ee0a1c2ef6b..b4414cbc3e3e 100755 --- a/tools/test/stress2/misc/nullfs18.sh +++ b/tools/test/stress2/misc/nullfs18.sh @@ -28,7 +28,7 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 -# Demonstate nullfs(5) inode leak. +# Demonstate nullfs(4) inode leak. # Fixed by r295717. . ../default.cfg diff --git a/tools/test/stress2/misc/pread.sh b/tools/test/stress2/misc/pread.sh index 1bf3b874e6af..24ee2efb696a 100755 --- a/tools/test/stress2/misc/pread.sh +++ b/tools/test/stress2/misc/pread.sh @@ -46,13 +46,13 @@ mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart mount -t tmpfs tmpfs $mntpoint cp -a /usr/include $mntpoint -echo "Testing tmpfs(5)" +echo "Testing tmpfs(4)" /tmp/pread $mntpoint while mount | grep -q "on $mntpoint "; do umount $mntpoint || sleep 1 done -echo "Testing fdescfs(5)" +echo "Testing fdescfs(4)" mount -t fdescfs null /dev/fd for i in `jot 100`; do /tmp/pread /dev/fd @@ -62,7 +62,7 @@ while mount | grep -q "on /dev/fd "; do umount /dev/fd || sleep 1 done -echo "Testing procfs(5)" +echo "Testing procfs(4)" mount -t procfs procfs $mntpoint /tmp/pread $mntpoint while mount | grep -q "on $mntpoint "; do @@ -81,13 +81,13 @@ done mdconfig -d -u $mdstart mount -t nullfs /bin $mntpoint -echo "Testing nullfs(5)" +echo "Testing nullfs(4)" /tmp/pread $mntpoint while mount | grep -q "on $mntpoint "; do umount $mntpoint || sleep 1 done -echo "Testing procfs(5)" +echo "Testing procfs(4)" mount -t procfs procfs $mntpoint /tmp/pread $mntpoint while mount | grep -q "on $mntpoint "; do diff --git a/tools/test/stress2/misc/procfs3.sh b/tools/test/stress2/misc/procfs3.sh index c9c4820adbff..30bcc8b3cd62 100755 --- a/tools/test/stress2/misc/procfs3.sh +++ b/tools/test/stress2/misc/procfs3.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# procfs(5) test scenario. +# procfs(4) test scenario. # "panic: wchan 0xc10a4f68 has no wmesg" seen [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 diff --git a/tools/test/stress2/misc/readdir.sh b/tools/test/stress2/misc/readdir.sh index 8616a8a40206..425295631181 100755 --- a/tools/test/stress2/misc/readdir.sh +++ b/tools/test/stress2/misc/readdir.sh @@ -45,19 +45,19 @@ mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart mount -t tmpfs tmpfs $mntpoint -echo "Testing tmpfs(5)" +echo "Testing tmpfs(4)" cp -a /usr/include $mntpoint /tmp/readdir $mntpoint umount $mntpoint -echo "Testing fdescfs(5)" +echo "Testing fdescfs(4)" kldstat -v | grep -q fdescfs || { kldload fdescfs.ko; loaded=1; } mount -t fdescfs null /dev/fd /tmp/readdir /dev/fd umount /dev/fd [ $unload ] && kldunload fdescfs.ko -echo "Testing procfs(5)" +echo "Testing procfs(4)" mount -t procfs procfs $mntpoint /tmp/readdir $mntpoint umount $mntpoint @@ -89,7 +89,7 @@ umount $mntpoint mdconfig -d -u $mdstart mount -t nullfs /bin $mntpoint -echo "Testing nullfs(5)" +echo "Testing nullfs(4)" /tmp/readdir $mntpoint umount $mntpoint diff --git a/tools/test/stress2/misc/sendfile5.sh b/tools/test/stress2/misc/sendfile5.sh index c81515003a13..933e4f94a73c 100755 --- a/tools/test/stress2/misc/sendfile5.sh +++ b/tools/test/stress2/misc/sendfile5.sh @@ -52,7 +52,7 @@ mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart kldstat | grep -q tmpfs.ko || loaded=1 mount -t tmpfs tmpfs $mntpoint -echo "Testing tmpfs(5)" +echo "Testing tmpfs(4)" cp $diskimage $mntpoint /tmp/sendfile5 $mntpoint/$file umount $mntpoint @@ -68,7 +68,7 @@ umount $mntpoint mdconfig -d -u $mdstart mount -t nullfs $dir $mntpoint -echo "Testing nullfs(5)" +echo "Testing nullfs(4)" /tmp/sendfile5 $mntpoint/$file umount $mntpoint diff --git a/tools/test/stress2/misc/tmpfs10.sh b/tools/test/stress2/misc/tmpfs10.sh index 870530c57ea7..6388f59959a4 100755 --- a/tools/test/stress2/misc/tmpfs10.sh +++ b/tools/test/stress2/misc/tmpfs10.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# tmpfs(5) name lookup problem seen: +# tmpfs(4) name lookup problem seen: # $ ./tmpfs10.sh # tmpfs10: unlink(p01193.14729) at loop #2: No such file or directory diff --git a/tools/test/stress2/misc/tmpfs11.sh b/tools/test/stress2/misc/tmpfs11.sh index efb535b8ea94..629ca8ae3d31 100755 --- a/tools/test/stress2/misc/tmpfs11.sh +++ b/tools/test/stress2/misc/tmpfs11.sh @@ -28,7 +28,7 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 -# Test with two tmpfs(5) file systems mounted. +# Test with two tmpfs(4) file systems mounted. . ../default.cfg diff --git a/tools/test/stress2/misc/tmpfs17.sh b/tools/test/stress2/misc/tmpfs17.sh index 878fcf6c95d1..d5f6c50d2e48 100755 --- a/tools/test/stress2/misc/tmpfs17.sh +++ b/tools/test/stress2/misc/tmpfs17.sh @@ -26,7 +26,7 @@ # SUCH DAMAGE. # -# tmpfs(5) option nonc test scenario +# tmpfs(4) option nonc test scenario . ../default.cfg [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 diff --git a/tools/test/stress2/misc/tmpfs8.sh b/tools/test/stress2/misc/tmpfs8.sh index b17a329f69e7..b78f0e74562b 100755 --- a/tools/test/stress2/misc/tmpfs8.sh +++ b/tools/test/stress2/misc/tmpfs8.sh @@ -28,7 +28,7 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 -# Demonstrate rename(2) cache problem for tmpfs(5). Fixed in r226987. +# Demonstrate rename(2) cache problem for tmpfs(4). Fixed in r226987. # Variation of rename6.sh . ../default.cfg diff --git a/tools/test/stress2/misc/unionfs17.sh b/tools/test/stress2/misc/unionfs17.sh index bcb6d242187b..9ddbd1cab8cb 100755 --- a/tools/test/stress2/misc/unionfs17.sh +++ b/tools/test/stress2/misc/unionfs17.sh @@ -6,7 +6,7 @@ # SPDX-License-Identifier: BSD-2-Clause # -# unionfs(8) test +# unionfs(4) test # Variation of unionfs7.sh, but with tmpfs # "mkdir: rmdir(d17) Directory not empty" seen. diff --git a/tools/test/stress2/misc/unionfs18.sh b/tools/test/stress2/misc/unionfs18.sh index e772a67a07fb..a7840db263e1 100755 --- a/tools/test/stress2/misc/unionfs18.sh +++ b/tools/test/stress2/misc/unionfs18.sh @@ -6,7 +6,7 @@ # SPDX-License-Identifier: BSD-2-Clause # -# Simple unionfs(8) + tmpfs test +# Simple unionfs(4) + tmpfs(4) test # "rmdir: d2: Directory not empty" seen. diff --git a/tools/test/stress2/misc/unionfs6.sh b/tools/test/stress2/misc/unionfs6.sh index 54e688b0a111..cae1995a2e0d 100755 --- a/tools/test/stress2/misc/unionfs6.sh +++ b/tools/test/stress2/misc/unionfs6.sh @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# unionfs(8) test +# unionfs(4) test # "panic: ufs dir vp 0xfffffe0157351068 ip 0xfffffe016a63d488 flags 0x3c06" seen [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 diff --git a/tools/test/stress2/misc/unionfs7.sh b/tools/test/stress2/misc/unionfs7.sh index 1684a960d142..6adcd01a5f83 100755 --- a/tools/test/stress2/misc/unionfs7.sh +++ b/tools/test/stress2/misc/unionfs7.sh @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# unionfs(8) test +# unionfs(4) test # "unionfs_get_node_status: 0xfffffe018f356770 is not exclusive locked but # should be" seen. diff --git a/tools/test/stress2/misc/unionfs8.sh b/tools/test/stress2/misc/unionfs8.sh index 9ddf5a990b82..fdc37b16ff03 100755 --- a/tools/test/stress2/misc/unionfs8.sh +++ b/tools/test/stress2/misc/unionfs8.sh @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# unionfs(8) test with a cd9660 file system +# unionfs(4) test with a cd9660(4) file system # "panic: unionfs_noderem: vnode 0xfffffe014f9259c8 locked recursively" seen # https://people.freebsd.org/~pho/stress/log/log0233.txt From nobody Fri Jun 28 00:35:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9GgD6WbQz5NmKc; Fri, 28 Jun 2024 00:35: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9GgD5wMXz40ZM; Fri, 28 Jun 2024 00:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719534920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZJpUuozrCp73iHhrhMwAZ41Q8YPZAxX9BbbwI0fhSuo=; b=U+yVbBpTO2iWYqXUouBeyPv62iqh5KJWzmhleOyWZyITTmAQ454ivcXDjNf25/BiADro7H 6bgzxoQRwwRkK1a96LS6HPQFDM5qTAPSp70gkQnFjNgJ1XNsDdWhVUHyUUk1OMYwxo0ZEW AGoLChjLHzIZhb8UIWCAtEWUhdQ8F2a8nJdi8v9L9HuFa5i6Fse2dUXTxAoMCgfa7xkxCm cFDo8lMpxPfotndQcTid1VRWi04xU/wM6e4mCfjNzyz139yMtAXT3TMPjRcCtBTJjzP90q xyWvtn+GKFLGhdqEWQtOzeJIW6U9KIO87GtCPQ1pe9MI+BrOecQUQPfu6CytIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719534920; a=rsa-sha256; cv=none; b=MwkXB2LVf3ADzj/QeGVUhfGFWO1f2xr8Tw12D7DyFx+7wLKk0SEU/O158ByglvAYsUiSl8 gQzSn9u+sZ1gBh7pbDEU4nVK6lPqMVLdeUSjBHVo2zLtwrayxFxuIijk/i/nr1ONxpRlWU l2UcMbK0JPm5kxzMMAvzAGVpGRyrfQ/9hpyUHl6bz1wAG+ioBoC5FS6IOogYMWTEw40VlO J9uZqSJ7itftiuCg3XryOVOMvIuZNp5nwWuGOBd82GTeviSywnVksG8mbCMGDe/jkIsvch XKP/g+UVyuUutySUBNNYXJpUfrxf1368eNXfnPsFOTYzGzgZ4Z5Xns5I++Uh6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719534920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZJpUuozrCp73iHhrhMwAZ41Q8YPZAxX9BbbwI0fhSuo=; b=OiqVQOOFX4hJz3zCP0kgHS5Bx84zCed40Dko5oZyBkZDL0vtWnHmqjMYqjC2fXehhkV0XN 6/soj6AZBIltmA2aXx4sA17Njrt5Ggs9MjF+vaxRvpq17+8xKRYOgEbNzdApCHsxCfVkhS yYr14vGe/8ya/QB1ucOqDvGkyoFwHviymeGi12R7bW5WlVPAOPZ77YgTWklSrxIGZiRxuS cMx/Zcy80QfUbIXAcmF+n1VM+mQoARTsa7vYsB/UDXK5GwsVMwFCCHNF5ez3eqwkEOjJRD pgvohr/vTBCZ2g/d6C8X5TVdRqU5ym5DwBcBUo1Bm4hzE92aghRPZniBJXq0Rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9GgD5WcxzZMR; Fri, 28 Jun 2024 00:35: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 45S0ZKop096368; Fri, 28 Jun 2024 00:35:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S0ZKh9096365; Fri, 28 Jun 2024 00:35:20 GMT (envelope-from git) Date: Fri, 28 Jun 2024 00:35:20 GMT Message-Id: <202406280035.45S0ZKh9096365@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: a85d870007e7 - main - man.sh: revert trapping SIGPIPE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a85d870007e7dd94242a2084dbb750438332ac1e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a85d870007e7dd94242a2084dbb750438332ac1e commit a85d870007e7dd94242a2084dbb750438332ac1e Author: Alexander Ziaee AuthorDate: 2024-06-10 04:04:51 +0000 Commit: Warner Losh CommitDate: 2024-06-28 00:34:33 +0000 man.sh: revert trapping SIGPIPE PR: 279542 Fixes: 14a5c1068d37 Reported by: emaste Reviewed by: imp, emaste, jilles Pull Request: https://github.com/freebsd/freebsd-src/pull/1283 --- usr.bin/man/man.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 7461153942f5..f4037ed92215 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -36,9 +36,6 @@ ulimit -t 20 # do not ignore the exit status of roff tools set -o pipefail -# ignore SIGPIPE exits because pagers may exit before reading all their input. -trap '' SIGPIPE - # Usage: add_to_manpath path # Adds a variable to manpath while ensuring we don't have duplicates. # Returns true if we were able to add something. False otherwise. From nobody Fri Jun 28 00:37:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9Gk45RFrz5NmJc; Fri, 28 Jun 2024 00:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9Gk44wWqz40ws; Fri, 28 Jun 2024 00:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719535068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MO6W0kwbR9AM9d+3pEhpK2KAZNJCLTaZtpwoVIhW1Wo=; b=gqDfEHjJ7MNSsw59onCWLN+CuSlUEc/gT0CMvg/DbTj6DBTXShEl25LZkDCKl5B/+SDAvn s5F4Nd6lPll94ENHfJ5zYTA5uSgTM7nq6YDPaEw++82bP84Sz/Ipkr7joAVd08SCcFMQKc VE1FdN4ql2GatLTgXKmoIFCZIwnXd2ZXLegX7DhbnPHcq5IFjjp3luGjD6n8c3Hl2Gnn2L 0tkURKPS3NHBjxKqmZjn+/b2LLKN5m7Or9KgbqEQmbVJw4Jw8QLt9+a58IICq2WbEu6fzb upZI4rw9eF0u50wZJ6ir51MfrsqywJ/y2s66Fc7FPBRqDhab+yYie2CTChcEjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719535068; a=rsa-sha256; cv=none; b=ESn0f6jMCFtwXKK3TIhlzXZpPRDc/7FgoIBrvhHL57lMD0nPWYvsLS3KZwuJojmCwQ9n1q eHdCj5DXCqXwkV27YBWe4DZcdkVLfWm/lj1TZg6HGiSgbEGZouYHbhxPoHWMZ4LoFgkXKQ Y7JGL89k9S30njdELMlXMMJnqmIiSJEF0dLBUbnDyzefhmhh5XzYALrj0VhIzTIEP2UrKb OcAED4UV0uKe0SkTWQ3Z7Tk1UNfZsCfMSXNBYgWTUN8ShXG4MlfUmtIHjuYprZSmMgcyRV 4ltmBOWhSxeAGAMy5earEuD/HwAfrGi6df7fPSL96ruppjvIV4r7V9Xt1FTg0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719535068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MO6W0kwbR9AM9d+3pEhpK2KAZNJCLTaZtpwoVIhW1Wo=; b=isSDPYJvAFvdRnGCkKc1ilbH6t+XVv7cn9hwZ6uLKLHklGfdnmvudkcpIjQubCJ1jk2FZG r0n0UBSEt8EcSpga5sU/5ujNx4Xd4y8lnWPSgpEZCpYBK07jYQyYTnOyTShoKy6No7IVmM G1f9TxCdMfZ+qTLEeUEyCdQiM2w258c4cEYqiukGS2ToE4HpEcHhdOzdRCIWN4CxHlxvXW cXaTR6tiOx7jEeKzI0kfuVqJVLKdu3D5oMl/TkCa61HH7VVEDnA7vthpHOgC64+MW/s4g4 LpyPiR7QO14WHnEkbS/+g/PbNbnQJOxmsamAxkpxKXrmaGFCaBthIikFSd09KA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9Gk44WZ5zZMV; Fri, 28 Jun 2024 00:37: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 45S0bm1P096816; Fri, 28 Jun 2024 00:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S0bm8X096813; Fri, 28 Jun 2024 00:37:48 GMT (envelope-from git) Date: Fri, 28 Jun 2024 00:37:48 GMT Message-Id: <202406280037.45S0bm8X096813@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: cf9c4b32cca0 - main - RELNOTES: mention moving filesystems to section 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: cf9c4b32cca0550da1da9658bf13015d3105d2a9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cf9c4b32cca0550da1da9658bf13015d3105d2a9 commit cf9c4b32cca0550da1da9658bf13015d3105d2a9 Author: Alexander Ziaee AuthorDate: 2024-06-13 01:56:20 +0000 Commit: Warner Losh CommitDate: 2024-06-28 00:37:20 +0000 RELNOTES: mention moving filesystems to section 4 Fixes: 1687d7 (move filesystems to s4) Reported by: mhorne Reviewed by: imp, mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/1289 --- RELNOTES | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index ddc2a781d5fa..0f95a95e2c65 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,13 +10,16 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. - 822ca3276345: byacc was updated to 20240109. 21817992b331: ncurses was updated to 6.5. +1687d77197c0: + Filesystem manual pages have been moved to section four. + Please check ports you are maintaining for crossreferences. + 8aac90f18aef: new MAC/do policy and mdo(1) utility which enables a user to become another user without the requirement of setuid root. From nobody Fri Jun 28 00:40:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9GnC1xRDz5Nmc0; Fri, 28 Jun 2024 00:40: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9GnC08Bjz41W7; Fri, 28 Jun 2024 00:40:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719535231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qfTLIq54zqP/YzqHGUUrfyoq+0aHso8vqT1zODR/Fs=; b=X4BGRaYsxwxxNzrqbMWkNs1ht0cagNDiWnlJNw58JQCqVcHkZIBWbzmCBUlomjdZ+g3mNk uxAMbUH6aQf4GHxLY5/L557N9NLifZZ+34OF8ovwDuEAu2diVYrvORAjKWlqvoOVn1QaVR SWcnAjot0pQd7fMLAXtCSclD5H9YaRLKxM5a2glmcQv0Kc1vnO9RoCzwb/T+cJgVZ6eed2 Kddq9bSr/snD19OqkygAehOKRpXJPz8V6leWIIFMCToEHAcjNlDQ62fHAuL4anpxeyCEmp pfF3oKLZwOiv+y+6vdQDJwFiZrpKd4fr9r/dNK+Yv5bCGhcvzvrFGRWzdkvKcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719535231; a=rsa-sha256; cv=none; b=WABzrDoSfQNCTnB08giH088HqMBE3kKxRFnqOCG9La6R5QO/SfZoH4qRn61GamxkAZ1W3C RKOtHsB658J0p0mYlEBSuvlqxk/mWHVMPRGXbLu1XmCYpArnO10BWbEt1Awr6T8vynh+7T tLukm/aBqG5/HrYuFVfi1s21fvOU4BGvcIpicF95Jq2gytwjzVqSmfMci1K9yNStxW9knl fkxymJQtDsmagUYy+n0kjpjrPMJzX9FfJX/V720koUHjPmoNs3c8ZAVNtLG/xt64W3grrT 1sKxF4iiq9yDucFI4AdAyAuIt0gjy3CCpfF9Crg/B25/Ch3li5PhhTRBq7shAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719535231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qfTLIq54zqP/YzqHGUUrfyoq+0aHso8vqT1zODR/Fs=; b=B+Li+P3vNg9XFI4eK8q+qagwKxlY2M3c0dz7HcHCKvGp8riQmAeuOjnw8WBV0xgjL+kaUh nRV8ny+Vej7v0KKFx5uUEVoAH4BeTZqNtereK4yyMmcnOH1fWZ4XTK9xgGwbN3cdyliD68 xpqgwCJ70VWAmAZRDEOiLHTFF4WgmMColtkCp8sScRjFqF/r79fcyUyPalteaOCP5XOhgz G9BAuh3eFZc9MXFeRjJFiA6cj/FcTIFLwOpdIGANlx1wEhVl/5/ZDi3/RjTP5Br4yolVc1 saGR8COKuh0QeG+IL0T7U/Z8vWPmL56sI0WF2dzR8XF1Ogyb6cP2sbWopSI8zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9GnB6t4KzZjl; Fri, 28 Jun 2024 00: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 45S0eU9v006268; Fri, 28 Jun 2024 00:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S0eUe2006264; Fri, 28 Jun 2024 00:40:30 GMT (envelope-from git) Date: Fri, 28 Jun 2024 00:40:30 GMT Message-Id: <202406280040.45S0eUe2006264@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: ab08da5328b4 - main - loader: Increase buffer size to accommodate longer commands List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: ab08da5328b4175e399d8e59adc4dfad0eea24f1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab08da5328b4175e399d8e59adc4dfad0eea24f1 commit ab08da5328b4175e399d8e59adc4dfad0eea24f1 Author: Ahmad Khalifa AuthorDate: 2024-06-05 00:32:58 +0000 Commit: Warner Losh CommitDate: 2024-06-28 00:40:15 +0000 loader: Increase buffer size to accommodate longer commands The longest command we have is "efi-autoresizecons". That combined with the two spaces before and after the command gives us a total of 23 characters including the null-terminator. Also move the two trailing spaces to their own pager_output call so they don't get truncated if the command is too long and increase the minimum string length to 20 in order to fix alignment issues caused by the increased buffer size. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1277 --- stand/common/commands.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stand/common/commands.c b/stand/common/commands.c index e6e4fd005f72..95d12ad95973 100644 --- a/stand/common/commands.c +++ b/stand/common/commands.c @@ -229,7 +229,7 @@ command_commandlist(int argc __unused, char *argv[] __unused) { struct bootblk_command **cmdp; int res; - char name[20]; + char name[23]; res = 0; pager_open(); @@ -238,9 +238,10 @@ command_commandlist(int argc __unused, char *argv[] __unused) if (res) break; if ((*cmdp)->c_name != NULL && (*cmdp)->c_desc != NULL) { - snprintf(name, sizeof(name), " %-15s ", + snprintf(name, sizeof(name), " %-20s", (*cmdp)->c_name); pager_output(name); + pager_output(" "); pager_output((*cmdp)->c_desc); res = pager_output("\n"); } From nobody Fri Jun 28 03:41:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9Lnm3qJsz5P6Bf; Fri, 28 Jun 2024 03:41: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9Lnm1tdNz4G4W; Fri, 28 Jun 2024 03:41:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719546076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8U++9D3HGMnZLnhhZ0YE1CDFV+cqvGgDlQXSOaRKxs=; b=E4dPlyqj9kcn4iG4t6DDX/G3E5k+p5S/+9GxGVC10sx0OrkCxaWsFHAUSj/bzKIav85P4q DBFvvnQOU0QfrHZRkaBbpD7K3EaRKaWev0h5Lvy4u84x0GW8YXJ8wQ9BY+PoXHb90QuCJA w0vfl7PouMNjwZdK7GgmPRzW3+8Y65/UE4SnKVn84VpzYjaEsM2Vz2s1HyntYk6Ny3p16m 4hR6NYQmFMwYtW/S84e3BVtw2zfMvBT/akBFhT3DnBiq2cd9zHoplseMLIaAGLeBkHt9aG 8KDQrs70EADGIwkLAbxjBcxxPQY+oZqGiMBi+bihPrKOjSIF2+BQubO/HlzYqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719546076; a=rsa-sha256; cv=none; b=UngwJchiQb6nsf+k5mrpPcUNHOVSM2z7PbhOMIwMJqi9IlxN8Nt9pXUkX7kMM4QhWkGUvw IKnuE9QOs1/hpdHanz7nLTgn/bPHR60A5zxKionOTXGLManU3RtrOWdOR7RMdhBjPQb9tZ kRUfYMFyw9YWSyP8xxWlc4WVITM0qunKLObn3HEgZK7yIgtB4c6WJRs0pBraxyKvgnrYIC 6+z6L5xyB0Y6rFZU0zTYFRTTuV5I7KVHYE2NYpbGzo1RLhDpoE3sA3FGDjpFT4IV4J5xZL CE6vw3ry1vpNdhT3QlPeAV1WczxNpFrqTTSJxaNUNxHNVfj3T+cokPlLIsQ88A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719546076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8U++9D3HGMnZLnhhZ0YE1CDFV+cqvGgDlQXSOaRKxs=; b=mrbwSarWuT5cxYN+2nu4kHmKWNT9DKLpBv5mL/eoLo7/zeJPekelKDbKx4h74kNTCCVMNA NEfoMf2mLzRcJPNKdrLHYtMj1bD1aqSnPW1XdghwWk9AlI0+tqaTPNe4nyoPnc60+54gdE taaMQ2aZXto1J0KlhMFYmNaggNPWvldY34STNvnLvDaiy23SW9fP7B3DoRzct0rlEP05/T pj37cMI/Xxcg4cZB7WTVD8VNclofTE3BC3zkmwT7ATHeBrfmhR3uNfx+9J8GJOWVX/TBBW 4T8qAGmKje6HVRLfGk6fxGZkCNxCVsfU6N+z/cp9zmyu2BEow8sjwz+gnNk5xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9Lnm1Vl9zg9f; Fri, 28 Jun 2024 03:41: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 45S3fGnH011253; Fri, 28 Jun 2024 03:41:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S3fGuU011250; Fri, 28 Jun 2024 03:41:16 GMT (envelope-from git) Date: Fri, 28 Jun 2024 03:41:16 GMT Message-Id: <202406280341.45S3fGuU011250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: c02a8caf50bb - main - tcp_bbr: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c02a8caf50bb68cb675fdef30ed803cc67a3bdac Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=c02a8caf50bb68cb675fdef30ed803cc67a3bdac commit c02a8caf50bb68cb675fdef30ed803cc67a3bdac Author: Ryan Libby AuthorDate: 2024-06-28 03:37:26 +0000 Commit: Ryan Libby CommitDate: 2024-06-28 03:37:26 +0000 tcp_bbr: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D45751 --- sys/netinet/tcp_stacks/bbr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index cee8da71af0b..cb87932fa8db 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -2356,11 +2356,11 @@ bbr_log_to_event(struct tcp_bbr *bbr, uint32_t cts, int32_t to_num) log.u_bbr.flex1 = bbr->bbr_timer_src; log.u_bbr.flex2 = 0; log.u_bbr.flex3 = bbr->r_ctl.rc_hpts_flags; - ar = (uint64_t)(bbr->r_ctl.rc_resend); + ar = (uintptr_t)(bbr->r_ctl.rc_resend); ar >>= 32; ar &= 0x00000000ffffffff; log.u_bbr.flex4 = (uint32_t)ar; - ar = (uint64_t)bbr->r_ctl.rc_resend; + ar = (uintptr_t)bbr->r_ctl.rc_resend; ar &= 0x00000000ffffffff; log.u_bbr.flex5 = (uint32_t)ar; log.u_bbr.flex6 = TICKS_2_USEC(bbr->rc_tp->t_rxtcur); @@ -2718,12 +2718,13 @@ bbr_type_log_hdwr_pacing(struct tcp_bbr *bbr, const struct ifnet *ifp, { if (tcp_bblogging_on(bbr->rc_tp)) { union tcp_log_stackspecific log; + uint64_t ifp64 = (uintptr_t)ifp; bbr_fill_in_logging_data(bbr, &log.u_bbr, cts); log.u_bbr.flex1 = ((hw_rate >> 32) & 0x00000000ffffffff); log.u_bbr.flex2 = (hw_rate & 0x00000000ffffffff); - log.u_bbr.flex3 = (((uint64_t)ifp >> 32) & 0x00000000ffffffff); - log.u_bbr.flex4 = ((uint64_t)ifp & 0x00000000ffffffff); + log.u_bbr.flex3 = ((ifp64 >> 32) & 0x00000000ffffffff); + log.u_bbr.flex4 = (ifp64 & 0x00000000ffffffff); log.u_bbr.bw_inuse = rate; log.u_bbr.flex5 = line; log.u_bbr.flex6 = error; From nobody Fri Jun 28 03:41:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9Lnp6yQ8z5P6Lq; Fri, 28 Jun 2024 03: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9Lnn2l0yz4G8y; Fri, 28 Jun 2024 03: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=1719546077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZT+pStHzi5sCXvrxEFxwhFx1fnaokBmCFWjOI/q+q/g=; b=IedbtMO8P3N4qS3T/BbG/gr8jPvpWRPNNOXt1h5b9bctPF9zFt9gyz5BuxulrCcDOUN1ec 7eGWfNYdOlzjxcPKB7cHYuq+eY+vJSckgP4ml/GyQM4eCj5DzDwW4EuoYPaZdf59I1SXk4 WE28p2MtfxOULbyDBiDuOmHxOzhIsxCXShY0SwT+5r4qm9MGCTVRqEEfUd+NBmtR4HGatO JZhkjskCg7zSurECMhqxykWRb616stqZan7kLWUD98LniXxtDCknDhqbQ6pRI2SnSgGEbI IvqCVsk2k3HZY6RtQNUpF13qV3qj/uCmXklh4xg04GF5/Iou3peVcXfhLlD81A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719546077; a=rsa-sha256; cv=none; b=avnbNXo91QqVh85ijBMG/ryU0s517uImAZdytxqAspCARA4BqMZGkpEOuHRzz42YRO5HcM utJnGMwO2JkaAAfyVQoTB38XE8DjugmJ7P7fb6C41/lQxG0NVmvpDHD9V9pzdrCVbIQJ3K vdXoXdgvwsrDLBPh/9CYvBQZu9XpJkKK+oRZB3LyRaLlIejPbHbr9hejgeoI7s8wPmw3oa GUgT+6yBHvXQQmCi/IwVBKDRAymyn3EBIk7P2B49mo+M4h7X6wsRQKZ4AyhRcXC2Wp3e4Z a0lAPIhJl1mBqgH+T5lfHT43+T/mN2S+THwEcIm/cLFI8e32bupx0kz2xwxVaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719546077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZT+pStHzi5sCXvrxEFxwhFx1fnaokBmCFWjOI/q+q/g=; b=osB5xbQuLiF3eda/j8QSrZCETRF9oXqIGtZfLlGRgslxYi3YF1NJrMCRwBMdMaj1wbFfVN Uipb/Gr9Uwqjv716Ay2+Xen1SXShP9lYnDGusqrizL4tNpDn6ga6Q1DOHEGIUiq71zj1AS f5wFNgvI+Sm+0mnsnCMAuk05l92hnSq3v+c3NtwV+sw6/SaC2oK2tVZgb7s3en2mOWlbvT mttO3hOVhSioYJBCUXdPv2/Nvwx/ms9+AWpY8/LL3L/QuCLHMsdPhrbhv49ZibBmezl4Z/ XywZZnz4r6uhq913+t4rvztwvmVGPsw4Xr8eElE6DxauFC/+we5quNSjYTLOcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9Lnn2LPFzg9g; Fri, 28 Jun 2024 03: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 45S3fHxW011301; Fri, 28 Jun 2024 03: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 45S3fHcB011298; Fri, 28 Jun 2024 03:41:17 GMT (envelope-from git) Date: Fri, 28 Jun 2024 03:41:17 GMT Message-Id: <202406280341.45S3fHcB011298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 0d8da0df4150 - main - tcp_rack: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d8da0df415091d6ceceb74e4b6f42a15a3269e3 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=0d8da0df415091d6ceceb74e4b6f42a15a3269e3 commit 0d8da0df415091d6ceceb74e4b6f42a15a3269e3 Author: Ryan Libby AuthorDate: 2024-06-28 03:40:12 +0000 Commit: Ryan Libby CommitDate: 2024-06-28 03:40:12 +0000 tcp_rack: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D45752 --- sys/netinet/tcp_stacks/rack.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 551ccc1d337a..b7d9d383fc61 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -2643,6 +2643,7 @@ rack_log_hdwr_pacing(struct tcp_rack *rack, union tcp_log_stackspecific log; struct timeval tv; const struct ifnet *ifp; + uint64_t ifp64; memset(&log, 0, sizeof(log)); log.u_bbr.flex1 = ((hw_rate >> 32) & 0x00000000ffffffff); @@ -2655,8 +2656,9 @@ rack_log_hdwr_pacing(struct tcp_rack *rack, } else ifp = NULL; if (ifp) { - log.u_bbr.flex3 = (((uint64_t)ifp >> 32) & 0x00000000ffffffff); - log.u_bbr.flex4 = ((uint64_t)ifp & 0x00000000ffffffff); + ifp64 = (uintptr_t)ifp; + log.u_bbr.flex3 = ((ifp64 >> 32) & 0x00000000ffffffff); + log.u_bbr.flex4 = (ifp64 & 0x00000000ffffffff); } log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.bw_inuse = rate; @@ -2881,9 +2883,9 @@ rack_log_map_chg(struct tcpcb *tp, struct tcp_rack *rack, memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.flex8 = flag; log.u_bbr.inhpts = tcp_in_hpts(rack->rc_tp); - log.u_bbr.cur_del_rate = (uint64_t)prev; - log.u_bbr.delRate = (uint64_t)rsm; - log.u_bbr.rttProp = (uint64_t)next; + log.u_bbr.cur_del_rate = (uintptr_t)prev; + log.u_bbr.delRate = (uintptr_t)rsm; + log.u_bbr.rttProp = (uintptr_t)next; log.u_bbr.flex7 = 0; if (prev) { log.u_bbr.flex1 = prev->r_start; @@ -5527,7 +5529,7 @@ skip_measurement: rack_log_pacing_delay_calc(rack, tp->gput_seq, tp->gput_ack, - (uint64_t)rsm, + (uintptr_t)rsm, tp->gput_ts, (((uint64_t)rack->r_ctl.rc_app_limited_cnt << 32) | (uint64_t)rack->r_ctl.rc_gp_output_ts), 9, @@ -12739,7 +12741,7 @@ rack_log_collapse(struct tcp_rack *rack, uint32_t cnt, uint32_t split, uint32_t if (rsm == NULL) log.u_bbr.rttProp = 0; else - log.u_bbr.rttProp = (uint64_t)rsm; + log.u_bbr.rttProp = (uintptr_t)rsm; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); TCP_LOG_EVENTP(rack->rc_tp, NULL, @@ -15878,9 +15880,9 @@ rack_fini(struct tcpcb *tp, int32_t tcb_is_purged) log.u_bbr.flex3 = cnt_free; log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); rsm = tqhash_min(rack->r_ctl.tqh); - log.u_bbr.delRate = (uint64_t)rsm; + log.u_bbr.delRate = (uintptr_t)rsm; rsm = TAILQ_FIRST(&rack->r_ctl.rc_free); - log.u_bbr.cur_del_rate = (uint64_t)rsm; + log.u_bbr.cur_del_rate = (uintptr_t)rsm; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.pkt_epoch = __LINE__; (void)tcp_log_event(tp, NULL, NULL, NULL, TCP_LOG_OUT, ERRNO_UNK, @@ -18885,7 +18887,7 @@ start_set: rack_log_pacing_delay_calc(rack, tp->gput_seq, tp->gput_ack, - (uint64_t)my_rsm, + (uintptr_t)my_rsm, tp->gput_ts, (((uint64_t)rack->r_ctl.rc_app_limited_cnt << 32) | (uint64_t)rack->r_ctl.rc_gp_output_ts), 9, @@ -18938,7 +18940,7 @@ use_latest: rack_log_pacing_delay_calc(rack, tp->gput_seq, tp->gput_ack, - (uint64_t)my_rsm, + (uintptr_t)my_rsm, tp->gput_ts, (((uint64_t)rack->r_ctl.rc_app_limited_cnt << 32) | (uint64_t)rack->r_ctl.rc_gp_output_ts), 9, __LINE__, NULL, 0); @@ -19754,7 +19756,7 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma } log.u_bbr.lt_epoch = rack->r_ctl.cwnd_to_use; log.u_bbr.delivered = 0; - log.u_bbr.rttProp = (uint64_t)rsm; + log.u_bbr.rttProp = (uintptr_t)rsm; log.u_bbr.delRate = rsm->r_flags; log.u_bbr.delRate <<= 31; log.u_bbr.delRate |= rack->r_must_retran; @@ -22941,7 +22943,7 @@ send: } log.u_bbr.lt_epoch = cwnd_to_use; log.u_bbr.delivered = sendalot; - log.u_bbr.rttProp = (uint64_t)rsm; + log.u_bbr.rttProp = (uintptr_t)rsm; log.u_bbr.pkt_epoch = __LINE__; if (rsm) { log.u_bbr.delRate = rsm->r_flags; From nobody Fri Jun 28 10:17:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9WZg4FnNz5FCx8; Fri, 28 Jun 2024 10:17: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9WZg3FFDz4nFJ; Fri, 28 Jun 2024 10:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XD6vnSF1znq/D6NTOfs2O2bIxq4szlWaVtR5vKF084=; b=PX22MA3Z+RXeq+9Wme72DscdowDx95mqJVHhR8WKz94tAVJbIJle93q5M3bqGJFbV32+5x O+mMI9FmPzi0IA+Qn47/1jTl0jka21YPIpM4kza354rIRvtRpwVuu4tP6/Kjv/7FymAx6t CnUoFT21nFh75u/AOUCUbjgS1Dd7ngvjbkqGWufaTinMRfMMpqAu0PT8SdM2NTUDCbRLXl HbzZlIlWZ+PpRsoQljdTmkG3m3SqDrV+gMciWFQCsDzbtOB5X0Mz+l1CLk3SGmgtXygEGX Xldlu+EbhSqn2kx20LO3mWv5/3CGUVlVI10N0GLj3Ltd4XEmYRcsKpA3Cc5gkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719569835; a=rsa-sha256; cv=none; b=sHpVuNizJvQ8kqAUsCz42AV3oNOoYODxbINlWRe0zx+UIIDXJLaMpp8ixTNs0FpijnZ6uY wmbmkCBSsH0YfbuML9Dor2LtNhTK78VPtu+MO8Mrnne3a/nKZxUKDBbw45WDzIjHFC+mpR ZxGKhr9PXiHAu2N1vdkjYJ93xi2V/Un9f59INVYBzxZrgTuc/Grx0Ym7X7p0TBpuU9LetG Meid9dIEZY7hGP9+knf2TmqirdAES+y09twKVysw4HpeJBQmO7bgmFEvucHz0fAbWbgMV7 qoJ1oKmyRJlrLh6njqyHBivXofhLCD30lRVxF0RKFUbvk0XTIHnjVefBfWzrng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XD6vnSF1znq/D6NTOfs2O2bIxq4szlWaVtR5vKF084=; b=JvLDONKd8zaNbQkQ8YpVexG1HkGlX0brIDBRHzhXvNT93tZ1+1yCp5rqi6V5MzYQs8K69F Bya2VzOXlxGru/YksGctsOB+R511F4Fj8Sy9KWTgPyL2CdsXqsBjoZ0YduCg6uk4+jwTRn X9YSAE6URBc8s5xGBxCEP+xJnxAOaPIosU2XSK6Y5/SO7nnUYfkMaQQnH81I490+7dgV7+ jJvwBkxAluZlSGQcD6H26MExa1hrTpW74BI2eeqJBC3RMUIfkx27vuZsZwyjIDPH3bSqMx dFlIbdg/I4krHlDPbEN4CwrIZhIVUFKldar8/q2XqyFcN2Pz3dR5E2a5fovAjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9WZg2rlgzrbm; Fri, 28 Jun 2024 10:17: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 45SAHF3B075532; Fri, 28 Jun 2024 10:17:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SAHFH5075529; Fri, 28 Jun 2024 10:17:15 GMT (envelope-from git) Date: Fri, 28 Jun 2024 10:17:15 GMT Message-Id: <202406281017.45SAHFH5075529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: c5e0b035d9eb - stable/14 - libutil: move ftime to libutil List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: c5e0b035d9eb14e73fc17899cd007a31e0d1edc8 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e0b035d9eb14e73fc17899cd007a31e0d1edc8 commit c5e0b035d9eb14e73fc17899cd007a31e0d1edc8 Author: Mariusz Zaborski AuthorDate: 2024-05-29 12:32:16 +0000 Commit: Mariusz Zaborski CommitDate: 2024-06-28 10:17:52 +0000 libutil: move ftime to libutil It seems that there are still some applications that use ftime(3) (for example, science/siconos and sysutils/lcdproc). The issue is that we don't build libcompat as a shared library anymore. The easiest solution is to move it to libutil, until we deprecate it for good. This solution was proposed by kib@ in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257789. PR: 257789 MFC after: 1 month Reviewed by: kib (ages ago) Differential Revision: https://reviews.freebsd.org/D39994 (cherry picked from commit bb421be6c1174fad837973acc5e4a7bade4489db) --- lib/libcompat/Makefile | 7 +------ lib/libutil/Makefile | 6 +++--- lib/{libcompat/4.1 => libutil}/ftime.3 | 4 ++-- lib/{libcompat/4.1 => libutil}/ftime.c | 2 ++ sys/sys/timeb.h | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile index 7c99556e7513..e30e120c3d41 100644 --- a/lib/libcompat/Makefile +++ b/lib/libcompat/Makefile @@ -7,12 +7,7 @@ NO_PIC= WARNS?= 0 -.PATH: ${.CURDIR}/4.1 ${.CURDIR}/4.3 ${.CURDIR}/4.4 - -# compat 4.1 sources -SRCS+= ftime.c - -MAN+= 4.1/ftime.3 +.PATH: ${.CURDIR}/4.3 ${.CURDIR}/4.4 # compat 4.3 sources SRCS+= re_comp.c rexec.c diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 889a81747c82..5bce5c158958 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -12,7 +12,7 @@ LIB= util SHLIB_MAJOR= 9 SRCS= _secure_path.c auth.c cpuset.c expand_number.c flopen.c fparseln.c \ - getlocalbase.c gr_util.c \ + ftime.c getlocalbase.c gr_util.c \ hexdump.c humanize_number.c kinfo_getfile.c \ kinfo_getallproc.c kinfo_getproc.c kinfo_getvmmap.c \ kinfo_getvmobject.c kld.c \ @@ -30,8 +30,8 @@ CFLAGS+= -DINET6 CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libc/gen/ -MAN+= cpuset.3 expand_number.3 flopen.3 fparseln.3 getlocalbase.3 hexdump.3 \ - humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \ +MAN+= cpuset.3 expand_number.3 flopen.3 fparseln.3 ftime.3 getlocalbase.3 \ + hexdump.3 humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \ kinfo_getproc.3 kinfo_getvmmap.3 kinfo_getvmobject.3 kld.3 \ login_auth.3 login_cap.3 \ login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \ diff --git a/lib/libcompat/4.1/ftime.3 b/lib/libutil/ftime.3 similarity index 98% rename from lib/libcompat/4.1/ftime.3 rename to lib/libutil/ftime.3 index 48eb465aed31..dbed25317115 100644 --- a/lib/libcompat/4.1/ftime.3 +++ b/lib/libutil/ftime.3 @@ -27,14 +27,14 @@ .\" .\" @(#)ftime.3 8.1 (Berkeley) 6/4/93 .\" -.Dd August 4, 2018 +.Dd May 28, 2024 .Dt FTIME 3 .Os .Sh NAME .Nm ftime .Nd get date and time .Sh LIBRARY -.Lb libcompat +.Lb libuitl .Sh SYNOPSIS .In sys/types.h .In sys/timeb.h diff --git a/lib/libcompat/4.1/ftime.c b/lib/libutil/ftime.c similarity index 99% rename from lib/libcompat/4.1/ftime.c rename to lib/libutil/ftime.c index 5ea57bca40fd..b31fca907883 100644 --- a/lib/libcompat/4.1/ftime.c +++ b/lib/libutil/ftime.c @@ -33,6 +33,8 @@ #include #include #include + +#define _IN_LIBUITL #include int diff --git a/sys/sys/timeb.h b/sys/sys/timeb.h index 952a5e83b8a7..853541e27ae6 100644 --- a/sys/sys/timeb.h +++ b/sys/sys/timeb.h @@ -39,7 +39,7 @@ #ifndef _SYS_TIMEB_H_ #define _SYS_TIMEB_H_ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(_IN_LIBUITL) #warning "this file includes which is deprecated" #endif From nobody Fri Jun 28 10:17:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9WZh4nkLz5FD7p; Fri, 28 Jun 2024 10:17: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9WZh4Fklz4nfH; Fri, 28 Jun 2024 10:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Q5CbBBCIM1SfVLJWzgtXKvJMzkbCidIxnryGigDuOI=; b=ykkD10CS3EO42JNohWLS+iJqWsTa9Xe4E15UA/s0W8xr3vuCueGjGKQ7Bi6jDxTwz+ZK2C +6EBrErT0NsWR4wRuqd7YRPU0Y462qvOZOawMx6/0wKJvezKNogdUoKT+lw73HGPPosMdI YBbsOFuQEd2xj7rgYFmRU9jui1GG2QfXZkHRo/jcndWtyc7186fyH7bUu3TLO7hKRuVJ29 J/SECGfQeYUP0Sq1PqNPL79X0hkn0qIzWX8X3lfZBEsEqz3yHFxms4uwj8b+ixtAlOpYXC Gspgh/uC5H/GWk6zD6Y75ccS5nJbUZakY2e6Czfr/2uoy1ZPzIiYlFiYEPWCVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719569836; a=rsa-sha256; cv=none; b=ScbFfdQpIJgBrSJaQ1ebHm2jkj75GU63oYRpNlj8BaQWCwAxKfa4ittKoxs/5SOydhZRtF GI7u5nUeXC8jTc6esNmY7cbO+qWal5zV6DeY9tNC8kdCui9cUfzOa3eMJ/yp0FqtEUC6lb U5XpSARiN4KWAqRbyjL+sje6qRdgR8I/XkWBjQ2Ohhzv/IwJ46vkJ1JJnKSZc371Q4e9Le S/JQAsdUmt08JHPORM8q1QzKJ2OLKKHoGWmq4GJh2GhftF/rk7+39KNaNWQxDO7iVbX7WL /vSnU9c4Y/mGvYcNifHNMTzh/9l2PbrA081eexlYWagjPidFwSUjv6PllY/jgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Q5CbBBCIM1SfVLJWzgtXKvJMzkbCidIxnryGigDuOI=; b=NABtXQ38yJ9hijg4hFa21apyae4iPngBv+HubmECBAsEjQtXfO/IzKD2cHcRIcdpFGFfXY 3lhOOuUGmYlnERoBDRzq2PhVRvIhd/h5L/Hq/C3Tqz/r9o4Pf421S0iPOFje8FFUaS38MT R4us85/KRQNiMnZbdBjSq841/bxXrtQHwINhSbLNCLEgkQ0POZw0ohNa6ovFAkMYrV6MB6 mQGreRBaHFH8mGx7+YO4khwM2A3v7GPP/pRuyKcQawA7vD0Lw8KzaW7oS9xaxUABiU/+K6 Szt96b2rF34QuDZwugSN6kzy7b3dZ1niWoRQXgJbgIq81zS+PLHytAZ7sKjBOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9WZh3sMQzrsr; Fri, 28 Jun 2024 10:17: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 45SAHGmr075574; Fri, 28 Jun 2024 10:17:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SAHGYs075571; Fri, 28 Jun 2024 10:17:16 GMT (envelope-from git) Date: Fri, 28 Jun 2024 10:17:16 GMT Message-Id: <202406281017.45SAHGYs075571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 944827bcf6f0 - stable/14 - isp: fix ISPCTL_ABORT_CMD switch case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 944827bcf6f0b7db74d47e18885d327a623ef6b7 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=944827bcf6f0b7db74d47e18885d327a623ef6b7 commit 944827bcf6f0b7db74d47e18885d327a623ef6b7 Author: Mariusz Zaborski AuthorDate: 2024-06-25 14:50:28 +0000 Commit: Mariusz Zaborski CommitDate: 2024-06-28 10:18:23 +0000 isp: fix ISPCTL_ABORT_CMD switch case Prevent kernel panic by not running ISPCTL_FCLINK_TEST after a failed ISPCTL_ABORT_CMD. Reviewed by: mav Tested by: Arne Steinkamm MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45718 (cherry picked from commit 8aa9192ce98aec07b24f8279c709237dd2c4421b) --- sys/dev/isp/isp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index b53171add5f5..ad6dbd1e6f76 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -3088,6 +3088,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ctl, ...) if (ab->abrt_nphdl == ISP24XX_ABRT_OKAY) return (0); isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d abort returned 0x%x", chan, tgt, ab->abrt_nphdl); + break; } case ISPCTL_FCLINK_TEST: { From nobody Fri Jun 28 10:17:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9WbN1RmLz5FDF2; Fri, 28 Jun 2024 10:17: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9WbN0XLxz4nwk; Fri, 28 Jun 2024 10:17:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH4g3cDMid8JajYV1Sqxc/U/4DOlzu6dKDQAnmBgCa4=; b=GXr/DrHU1d3YYqwjLCR8kszz83IjwT6XnSdh7YmdfmDrZQsRpFdToDdBCcRS2NjlmdRTH2 caVTCQPm3vaqhtPlv81YhjleVenmopZOmhRsc3xWpD7YSHZl1R5Sn9KVF9uY5HZEZKm7Mk fVPK1Ar0RiR9LVWvroulHDkSD2o9GMIfCeE07X2QfbIoLXnU7DGpvMpLW4ifpY0DDZPOFo xyMtOXxKuMZdY5c1sEfuuHKk2/k6CBpDvpsojA0NXypcrwDPGadZDihyz24Wy4ZB9J7Nqh CkwYrQYywK556XXeH7efrlKZC0Ei9NqA4cAFicM4h21eL6F7QsqzL2vJriCIWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719569872; a=rsa-sha256; cv=none; b=Yu1ceZGlBVkaoApQL74w2Y8CEPF46T/Eb7XTpJ1sHwG0gd0NcVs4rVSqGUhRFfjsFQxM7t MKPC8MMk/NawMv/Jlwhau5ixMUxgzuj/JsBabYMbIlZ033HfdWKn7pMObwW1xXx+R4sJDY +3txgn6zSndgf3HSN93raN4FhbgG9gHbrD/eOM3kz4P8lE1W520IH7ni8Yuxy276P0afWn PQxDAEWVH4FT+/TSH0MS+mgEqUjOLmK11YN42qRw10Dj2cEro4kmi5mgXPbPD4zhWKhPW3 lzQXBminUNIoWZ0jKcZBpcvveaHFrhsw5LlH+Uc89tn1wSYhOZJq/4aQgjOyxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH4g3cDMid8JajYV1Sqxc/U/4DOlzu6dKDQAnmBgCa4=; b=OTgF2q854WaHN2iahGxVh191xbpjXUB2lBUQY1sCA/3rJ1iHdTjXkC90RNc30DN/FE3R9v fMhuWsiHu76b/kkRUOkCiAiatuzl5KP60H2F6o39q7twRLCWJg7DgaJY3UAXfc1qK5HTOx oPaT3mxwnGx8jWLCk0jz8xRpQpMYF4BbXALeIDGEFvqlm/d72Sq1SK4DVfRrDlR87ST3+n /ayVT9FHd0EzWI8YBGuU0YGkIFafcgmsKSqHRf6rsETNCI/hpYQuFLRCLQEFKO6KyuVK4k fi6SKVUMpXyNlKnAeuO0Dt0TbbOvXEifxEfFCT8lyPpuS22Zlj8RPfpM6vTbyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9WbN07XVzrMC; Fri, 28 Jun 2024 10:17: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 45SAHpHg075779; Fri, 28 Jun 2024 10:17:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SAHpcM075776; Fri, 28 Jun 2024 10:17:51 GMT (envelope-from git) Date: Fri, 28 Jun 2024 10:17:51 GMT Message-Id: <202406281017.45SAHpcM075776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 7fa105d91f0d - stable/13 - isp: fix ISPCTL_ABORT_CMD switch case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7fa105d91f0dd31d55d178811cc5a62f6fdbd501 Auto-Submitted: auto-generated The branch stable/13 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=7fa105d91f0dd31d55d178811cc5a62f6fdbd501 commit 7fa105d91f0dd31d55d178811cc5a62f6fdbd501 Author: Mariusz Zaborski AuthorDate: 2024-06-25 14:50:28 +0000 Commit: Mariusz Zaborski CommitDate: 2024-06-28 10:19:14 +0000 isp: fix ISPCTL_ABORT_CMD switch case Prevent kernel panic by not running ISPCTL_FCLINK_TEST after a failed ISPCTL_ABORT_CMD. Reviewed by: mav Tested by: Arne Steinkamm MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45718 (cherry picked from commit 8aa9192ce98aec07b24f8279c709237dd2c4421b) --- sys/dev/isp/isp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index b53171add5f5..ad6dbd1e6f76 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -3088,6 +3088,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ctl, ...) if (ab->abrt_nphdl == ISP24XX_ABRT_OKAY) return (0); isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d abort returned 0x%x", chan, tgt, ab->abrt_nphdl); + break; } case ISPCTL_FCLINK_TEST: { From nobody Fri Jun 28 10:18:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9Wbx68rqz5FDHV; Fri, 28 Jun 2024 10:18: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9Wbx5kbmz4pPM; Fri, 28 Jun 2024 10:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFCSf3VeDeL8TVovwvtvafweSIBLLglYVn62LQf6nyI=; b=tGihta1sxwHQ3/c7iDJgWIXt+KW9cSg3dSSOYDBBJKaYQx2Qu1ZtDqjDAhZgPVkHNWN7P/ cpaJHGtt7ad1RmEF05Z25c72F4b1E+VBD8eWGYsQzRcNro1YUwml1RM6AGXA83IS3ocbE1 yzVf+MJe4F6gFCm/wWZ5YV6HWfLc56fhLlr5H09Vy+lrtA8GAr6Wo4ldgWGjFw/9TFzt2N J5mcWW2zOq19ldF6Ui366AZi+CU4ZVq0h6sn0a3/7Gjc10b7esde9/XI8TbG2p0oWA/EPi C1mEsh/NlbtoCVrhNio7xoo0M0/FpcW9tygr9iuVv6gnzgNSOXtn4FBr65h6+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719569901; a=rsa-sha256; cv=none; b=t4fmccgWxNB7Tzc6eCDbbA9IQqJzNnudP7ZjvpAFHkDIl41Yx1tPh8V1pFvU51Wyef0M+4 J/rgBXLMkhEnuAwaNxlN2txLTWmSIYBDlrEBQAK8StBKk715jv9P0aBOB0fUULdbvoM6S8 xOG5txudMVKnm8lQ3e3A9FN52TzbJagyQQTjTFfavmdpuEVNhaPiVqxxiBdlZ8s8/shZyi ojxaXklfispCCE/4iWRgJCyS0DNYL9flPoBnqJdjWrGFg1xALfEa7O0pcDV6hPFd9AHDKU RLrEkXadWUqhjSDcs3sYa/jtQE8vBfDGOUosxntVvo5qRtMcbfWKT2bAiof9AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFCSf3VeDeL8TVovwvtvafweSIBLLglYVn62LQf6nyI=; b=sUXtmBMozJMe0J0otc9wn499JUKYf+PeF3kYPVdkwa/MSO7sGtFaQacALtF4zOjavWzWS5 BHpEN6DJII42d9oe1pSFN3mLWzskSxb1B01Dx6guTOe+Pqh3ho/cTOOZnPbuihD8n6HuzZ e7+g3qOmSDocLKXZeZEDzYnFLF2rgBfOoEiPHqBTTJdrTPnug+ljy+Sv6+69I+dcDDrA66 Mo/ZqkntZiVwR/STgw9NlqzUN9Qz6ZxrriY4EZD2LhBFHlnmakof3LNT6aR/Ga5y7asevG cayqMkgEqlV3JmzRGB4vJFyLkIw2ajNkIQORFPBjGH1zkMpWDKTDOQMxMN+0WQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9Wbx5KXnzs5W; Fri, 28 Jun 2024 10:18: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 45SAIL4J075983; Fri, 28 Jun 2024 10:18:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SAILbb075980; Fri, 28 Jun 2024 10:18:21 GMT (envelope-from git) Date: Fri, 28 Jun 2024 10:18:21 GMT Message-Id: <202406281018.45SAILbb075980@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: aa3860851b9f - main - net: Remove unneeded NULL check for the allocated ifnet List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: aa3860851b9f6a6002d135b1cac7736e0995eedc Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=aa3860851b9f6a6002d135b1cac7736e0995eedc commit aa3860851b9f6a6002d135b1cac7736e0995eedc Author: Zhenlei Huang AuthorDate: 2024-06-28 10:16:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-28 10:16:29 +0000 net: Remove unneeded NULL check for the allocated ifnet Change 4787572d0580 made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle(). No functional change intended. Reviewed by: kp, imp, glebius, stevek MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45740 --- sys/arm/allwinner/if_emac.c | 5 ----- sys/arm/ti/cpsw/if_cpsw.c | 5 ----- sys/dev/ae/if_ae.c | 6 ------ sys/dev/age/if_age.c | 6 ------ sys/dev/alc/if_alc.c | 6 ------ sys/dev/ale/if_ale.c | 6 ------ sys/dev/altera/atse/if_atse.c | 5 ----- sys/dev/axgbe/if_axgbe.c | 5 ----- sys/dev/bce/if_bce.c | 6 ------ sys/dev/bfe/if_bfe.c | 5 ----- sys/dev/bge/if_bge.c | 5 ----- sys/dev/bxe/bxe.c | 16 +++------------- sys/dev/cadence/if_cgem.c | 5 ----- sys/dev/cas/if_cas.c | 2 -- sys/dev/cxgb/cxgb_main.c | 5 ----- sys/dev/cxgbe/t4_main.c | 21 +++++---------------- sys/dev/cxgbe/t4_tracer.c | 5 ----- sys/dev/dc/if_dc.c | 5 ----- sys/dev/dpaa/if_dtsec.c | 6 ------ sys/dev/dpaa2/dpaa2_ni.c | 5 ----- sys/dev/ena/ena.c | 17 +++-------------- sys/dev/et/if_et.c | 5 ----- sys/dev/etherswitch/ar40xx/ar40xx_phy.c | 8 -------- sys/dev/etherswitch/arswitch/arswitch.c | 6 ------ sys/dev/etherswitch/e6000sw/e6000sw.c | 2 -- sys/dev/etherswitch/e6000sw/e6060sw.c | 6 ------ sys/dev/etherswitch/felix/felix.c | 3 --- sys/dev/etherswitch/infineon/adm6996fc.c | 6 ------ sys/dev/etherswitch/ip17x/ip17x.c | 6 ------ sys/dev/etherswitch/micrel/ksz8995ma.c | 6 ------ sys/dev/etherswitch/mtkswitch/mtkswitch.c | 6 ------ sys/dev/etherswitch/rtl8366/rtl8366rb.c | 6 ------ sys/dev/etherswitch/ukswitch/ukswitch.c | 6 ------ sys/dev/firewire/if_fwe.c | 6 +----- sys/dev/firewire/if_fwip.c | 4 +--- sys/dev/fxp/if_fxp.c | 5 ----- sys/dev/gem/if_gem.c | 2 -- sys/dev/gve/gve_main.c | 13 ++----------- sys/dev/iicbus/if_ic.c | 2 -- sys/dev/jme/if_jme.c | 6 ------ sys/dev/le/lance.c | 2 -- sys/dev/lge/if_lge.c | 5 ----- sys/dev/liquidio/lio_main.c | 5 ----- sys/dev/mana/mana_en.c | 5 ----- sys/dev/mge/if_mge.c | 6 ------ sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c | 5 ----- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 6 ------ sys/dev/msk/if_msk.c | 5 ----- sys/dev/mxge/if_mxge.c | 6 ------ sys/dev/my/if_my.c | 6 ------ sys/dev/neta/if_mvneta.c | 5 ----- sys/dev/netmap/if_ptnet.c | 6 ------ sys/dev/netmap/netmap_freebsd.c | 4 ---- sys/dev/nfe/if_nfe.c | 5 ----- sys/dev/nge/if_nge.c | 5 ----- sys/dev/ntb/if_ntb/if_ntb.c | 4 ---- sys/dev/oce/oce_if.c | 13 +++---------- sys/dev/ppbus/if_plip.c | 4 ---- sys/dev/qlnx/qlnxe/qlnx_os.c | 4 ---- sys/dev/qlxgb/qla_os.c | 3 --- sys/dev/qlxgbe/ql_os.c | 4 ---- sys/dev/qlxge/qls_os.c | 4 ---- sys/dev/re/if_re.c | 5 ----- sys/dev/rl/if_rl.c | 5 ----- sys/dev/sbni/if_sbni.c | 5 +---- sys/dev/sbni/if_sbni_isa.c | 7 +------ sys/dev/sbni/if_sbni_pci.c | 17 +++-------------- sys/dev/sbni/if_sbnivar.h | 2 +- sys/dev/sfxge/sfxge.c | 7 ------- sys/dev/sge/if_sge.c | 5 ----- sys/dev/sis/if_sis.c | 5 ----- sys/dev/sk/if_sk.c | 5 ----- sys/dev/smc/if_smc.c | 4 ---- sys/dev/ste/if_ste.c | 5 ----- sys/dev/stge/if_stge.c | 6 ------ sys/dev/sume/if_sume.c | 16 +++------------- sys/dev/ti/if_ti.c | 5 ----- sys/dev/tsec/if_tsec.c | 6 ------ sys/dev/usb/net/if_usie.c | 5 ----- sys/dev/usb/net/uhso.c | 4 ---- sys/dev/usb/net/usb_ethernet.c | 5 ----- sys/dev/usb/usb_pf.c | 6 ------ sys/dev/vge/if_vge.c | 6 ------ sys/dev/virtio/network/if_vtnet.c | 16 +++------------- sys/dev/vnic/nicvf_main.c | 17 +++-------------- sys/dev/vnic/thunder_mdio.c | 4 ---- sys/dev/vr/if_vr.c | 5 ----- sys/dev/vte/if_vte.c | 6 ------ sys/dev/xilinx/if_xae.c | 5 ----- sys/dev/xl/if_xl.c | 5 ----- sys/net/if_bridge.c | 4 ---- sys/net/if_disc.c | 5 ----- sys/net/if_edsc.c | 5 ----- sys/net/if_enc.c | 4 ---- sys/net/if_epair.c | 11 ----------- sys/net/if_lagg.c | 4 ---- sys/net/if_loop.c | 3 --- sys/net/if_stf.c | 5 ----- sys/net/if_tuntap.c | 3 --- sys/net/if_vlan.c | 8 -------- sys/net/if_vxlan.c | 5 ----- sys/net/iflib.c | 4 ---- sys/net80211/ieee80211.c | 4 ---- sys/netgraph/ng_eiface.c | 5 ----- sys/netgraph/ng_iface.c | 4 ---- sys/netpfil/ipfw/ip_fw_bpf.c | 4 ---- sys/netpfil/pf/if_pflog.c | 3 --- sys/netpfil/pf/if_pfsync.c | 4 ---- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 ---- 109 files changed, 33 insertions(+), 608 deletions(-) diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index f581d361d3d9..1db43cbca26c 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -940,11 +940,6 @@ emac_attach(device_t dev) emac_reset(sc); ifp = sc->emac_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "unable to allocate ifp\n"); - error = ENOSPC; - goto fail; - } if_setsoftc(ifp, sc); /* Setup MII */ diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index c2651c33e1b1..8012f8441e76 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -1025,11 +1025,6 @@ cpswp_attach(device_t dev) /* Allocate network interface */ ifp = sc->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - cpswp_detach(dev); - return (ENXIO); - } - if_initname(ifp, device_get_name(sc->dev), sc->unit); if_setsoftc(ifp, sc); if_setflags(ifp, IFF_SIMPLEX | IFF_MULTICAST | IFF_BROADCAST); diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c index 62c1a8a30cc8..e424e1bd0e76 100644 --- a/sys/dev/ae/if_ae.c +++ b/sys/dev/ae/if_ae.c @@ -326,12 +326,6 @@ ae_attach(device_t dev) goto fail; ifp = sc->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "could not allocate ifnet structure.\n"); - error = ENXIO; - goto fail; - } - if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/age/if_age.c b/sys/dev/age/if_age.c index afed720b6e56..6630f2cf782d 100644 --- a/sys/dev/age/if_age.c +++ b/sys/dev/age/if_age.c @@ -590,12 +590,6 @@ age_attach(device_t dev) age_get_macaddr(sc); ifp = sc->age_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "cannot allocate ifnet structure.\n"); - error = ENXIO; - goto fail; - } - if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index 86ae705667de..859d1214b46a 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -1584,12 +1584,6 @@ alc_attach(device_t dev) alc_get_macaddr(sc); ifp = sc->alc_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "cannot allocate ifnet structure.\n"); - error = ENXIO; - goto fail; - } - if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c index dcab9d10dfa4..5b3ae438810c 100644 --- a/sys/dev/ale/if_ale.c +++ b/sys/dev/ale/if_ale.c @@ -609,12 +609,6 @@ ale_attach(device_t dev) ale_get_macaddr(sc); ifp = sc->ale_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "cannot allocate ifnet structure.\n"); - error = ENXIO; - goto fail; - } - if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/altera/atse/if_atse.c b/sys/dev/altera/atse/if_atse.c index 923292484207..9e3871cf5779 100644 --- a/sys/dev/altera/atse/if_atse.c +++ b/sys/dev/altera/atse/if_atse.c @@ -1372,11 +1372,6 @@ atse_attach(device_t dev) /* Setup interface. */ ifp = sc->atse_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "if_alloc() failed\n"); - error = ENOSPC; - goto err; - } if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/axgbe/if_axgbe.c b/sys/dev/axgbe/if_axgbe.c index 65a546f8dae2..b35beca9c886 100644 --- a/sys/dev/axgbe/if_axgbe.c +++ b/sys/dev/axgbe/if_axgbe.c @@ -388,11 +388,6 @@ axgbe_attach(device_t dev) OF_getprop(node, "mac-address", sc->mac_addr, ETHER_ADDR_LEN); sc->prv.netdev = ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "Cannot alloc ifnet\n"); - return (ENXIO); - } - sc->prv.dev = dev; sc->prv.dmat = bus_get_dma_tag(dev); sc->prv.phy.advertising = ADVERTISED_10000baseKR_Full | diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 2564d0c1dac6..226fca16ac28 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -1351,12 +1351,6 @@ bce_attach(device_t dev) /* Allocate an ifnet structure. */ ifp = sc->bce_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - BCE_PRINTF("%s(%d): Interface allocation failed!\n", - __FILE__, __LINE__); - rc = ENXIO; - goto bce_attach_fail; - } /* Initialize the ifnet interface. */ if_setsoftc(ifp, sc); diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c index 962dd24ae85c..817c867862d0 100644 --- a/sys/dev/bfe/if_bfe.c +++ b/sys/dev/bfe/if_bfe.c @@ -477,11 +477,6 @@ bfe_attach(device_t dev) /* Set up ifnet structure */ ifp = sc->bfe_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "failed to if_alloc()\n"); - error = ENOSPC; - goto fail; - } if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 2662568c850a..23259179cc62 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -3712,11 +3712,6 @@ bge_attach(device_t dev) /* Set up ifnet structure */ ifp = sc->bge_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(sc->bge_dev, "failed to if_alloc()\n"); - error = ENXIO; - goto fail; - } if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 38a45de95083..26a87354e5b1 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -12965,7 +12965,7 @@ bxe_init(void *xsc) BXE_CORE_UNLOCK(sc); } -static int +static void bxe_init_ifnet(struct bxe_softc *sc) { if_t ifp; @@ -12985,10 +12985,7 @@ bxe_init_ifnet(struct bxe_softc *sc) BLOGI(sc, "IFMEDIA flags : %x\n", sc->ifmedia.ifm_media); /* allocate the ifnet structure */ - if ((ifp = if_gethandle(IFT_ETHER)) == NULL) { - BLOGE(sc, "Interface allocation failed!\n"); - return (ENXIO); - } + ifp = if_gethandle(IFT_ETHER); if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); @@ -13034,8 +13031,6 @@ bxe_init_ifnet(struct bxe_softc *sc) /* Attach driver debugnet methods. */ DEBUGNET_SET(ifp, bxe); - - return (0); } static void @@ -16261,12 +16256,7 @@ bxe_attach(device_t dev) bxe_get_phy_info(sc); /* initialize the FreeBSD ifnet interface */ - if (bxe_init_ifnet(sc) != 0) { - bxe_release_mutexes(sc); - bxe_deallocate_bars(sc); - pci_disable_busmaster(dev); - return (ENXIO); - } + bxe_init_ifnet(sc); if (bxe_add_cdev(sc) != 0) { if (sc->ifp != NULL) { diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 9d2b1d71883e..67fbdf4e3fc5 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -1813,11 +1813,6 @@ cgem_attach(device_t dev) /* Set up ifnet structure. */ ifp = sc->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "could not allocate ifnet structure\n"); - cgem_detach(dev); - return (ENOMEM); - } if_setsoftc(ifp, sc); if_initname(ifp, IF_CGEM_NAME, device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c index 0cf17cf04b33..76d1b713e5bb 100644 --- a/sys/dev/cas/if_cas.c +++ b/sys/dev/cas/if_cas.c @@ -188,8 +188,6 @@ cas_attach(struct cas_softc *sc) /* Set up ifnet structure. */ ifp = sc->sc_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) - return (ENOSPC); if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index c5fc067f8312..9bcdb86312c4 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -1011,11 +1011,6 @@ cxgb_port_attach(device_t dev) /* Allocate an ifnet object and set it up */ ifp = p->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "Cannot allocate ifnet\n"); - return (ENOMEM); - } - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setinitfn(ifp, cxgb_init); if_setsoftc(ifp, p); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 08cad0324c28..ab477595bdb9 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2544,7 +2544,7 @@ cxgbe_probe(device_t dev) IFCAP_HWRXTSTMP | IFCAP_MEXTPG) #define T4_CAP_ENABLE (T4_CAP) -static int +static void cxgbe_vi_attach(device_t dev, struct vi_info *vi) { if_t ifp; @@ -2583,10 +2583,6 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) /* Allocate an ifnet and set it up */ ifp = if_alloc_dev(IFT_ETHER, dev); - if (ifp == NULL) { - device_printf(dev, "Cannot allocate ifnet\n"); - return (ENOMEM); - } vi->ifp = ifp; if_setsoftc(ifp, vi); @@ -2689,8 +2685,6 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) pa.pa_type = PFIL_TYPE_ETHERNET; pa.pa_headname = if_name(ifp); vi->pfil = pfil_head_register(&pa); - - return (0); } static int @@ -2699,13 +2693,11 @@ cxgbe_attach(device_t dev) struct port_info *pi = device_get_softc(dev); struct adapter *sc = pi->adapter; struct vi_info *vi; - int i, rc; + int i; sysctl_ctx_init(&pi->ctx); - rc = cxgbe_vi_attach(dev, &pi->vi[0]); - if (rc) - return (rc); + cxgbe_vi_attach(dev, &pi->vi[0]); for_each_vi(pi, i, vi) { if (i == 0) @@ -3584,11 +3576,8 @@ vcxgbe_attach(device_t dev) if (rc) return (rc); - rc = cxgbe_vi_attach(dev, vi); - if (rc) { - t4_free_vi(sc, sc->mbox, sc->pf, 0, vi->viid); - return (rc); - } + cxgbe_vi_attach(dev, vi); + return (0); } diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c index d9b336c4b64a..80689a543e83 100644 --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -167,11 +167,6 @@ t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) } ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - rc = ENOMEM; - goto done; - } - /* Note that if_xname is identical to the nexus nameunit */ if_initname(ifp, name, -1); if_setdname(ifp, t4_cloner_name); diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index ddb81d8a486c..809feed7855f 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -2380,11 +2380,6 @@ dc_attach(device_t dev) goto fail; ifp = sc->dc_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "can not if_alloc()\n"); - error = ENOSPC; - goto fail; - } if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/dpaa/if_dtsec.c b/sys/dev/dpaa/if_dtsec.c index b5899a340f98..a5f9955061a4 100644 --- a/sys/dev/dpaa/if_dtsec.c +++ b/sys/dev/dpaa/if_dtsec.c @@ -708,12 +708,6 @@ dtsec_attach(device_t dev) /* Create network interface for upper layers */ ifp = sc->sc_ifnet = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(sc->sc_dev, "if_alloc() failed.\n"); - dtsec_detach(dev); - return (ENOMEM); - } - if_setsoftc(ifp, sc); if_setflags(ifp, IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index a9e6aa120549..a21351a20b49 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -548,11 +548,6 @@ dpaa2_ni_attach(device_t dev) /* Allocate network interface */ ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "%s: failed to allocate network interface\n", - __func__); - goto err_exit; - } sc->ifp = ifp; if_initname(ifp, DPAA2_NI_IFNAME, device_get_unit(sc->dev)); diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 3ff32cc9966c..47d066a2e4f1 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -148,7 +148,7 @@ static int ena_ioctl(if_t, u_long, caddr_t); static int ena_get_dev_offloads(struct ena_com_dev_get_features_ctx *); static void ena_update_host_info(struct ena_admin_host_info *, if_t); static void ena_update_hwassist(struct ena_adapter *); -static int ena_setup_ifnet(device_t, struct ena_adapter *, +static void ena_setup_ifnet(device_t, struct ena_adapter *, struct ena_com_dev_get_features_ctx *); static int ena_enable_wc(device_t, struct resource *); static int ena_set_queues_placement_policy(device_t, struct ena_com_dev *, @@ -2462,7 +2462,7 @@ ena_update_hwassist(struct ena_adapter *adapter) if_sethwassistbits(ifp, flags, 0); } -static int +static void ena_setup_ifnet(device_t pdev, struct ena_adapter *adapter, struct ena_com_dev_get_features_ctx *feat) { @@ -2470,10 +2470,6 @@ ena_setup_ifnet(device_t pdev, struct ena_adapter *adapter, int caps = 0; ifp = adapter->ifp = if_gethandle(IFT_ETHER); - if (unlikely(ifp == NULL)) { - ena_log(pdev, ERR, "can not allocate ifnet structure\n"); - return (ENXIO); - } if_initname(ifp, device_get_name(pdev), device_get_unit(pdev)); if_setdev(ifp, pdev); if_setsoftc(ifp, adapter); @@ -2516,8 +2512,6 @@ ena_setup_ifnet(device_t pdev, struct ena_adapter *adapter, ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); ether_ifattach(ifp, adapter->mac_addr); - - return (0); } void @@ -3811,11 +3805,7 @@ ena_attach(device_t pdev) ena_sysctl_add_nodes(adapter); /* setup network interface */ - rc = ena_setup_ifnet(pdev, adapter, &get_feat_ctx); - if (unlikely(rc != 0)) { - ena_log(pdev, ERR, "Error with network interface setup\n"); - goto err_customer_metrics_alloc; - } + ena_setup_ifnet(pdev, adapter, &get_feat_ctx); /* Initialize reset task queue */ TASK_INIT(&adapter->reset_task, 0, ena_reset_task, adapter); @@ -3852,7 +3842,6 @@ ena_attach(device_t pdev) err_detach: ether_ifdetach(adapter->ifp); #endif /* DEV_NETMAP */ -err_customer_metrics_alloc: free(adapter->customer_metrics_array, M_DEVBUF); err_metrics_buffer_destroy: ena_com_delete_customer_metrics_buffer(ena_dev); diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c index e6d73ab3c860..dedd2218b4a8 100644 --- a/sys/dev/et/if_et.c +++ b/sys/dev/et/if_et.c @@ -231,11 +231,6 @@ et_attach(device_t dev) callout_init_mtx(&sc->sc_tick, &sc->sc_mtx, 0); ifp = sc->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "can not if_alloc()\n"); - error = ENOSPC; - goto fail; - } /* * Initialize tunables diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c index b9a308e3620d..f27e7503eb28 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c @@ -200,14 +200,6 @@ ar40xx_attach_phys(struct ar40xx_softc *sc) snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->sc_dev)); for (phy = 0; phy < AR40XX_NUM_PHYS; phy++) { sc->sc_phys.ifp[phy] = if_alloc(IFT_ETHER); - if (sc->sc_phys.ifp[phy] == NULL) { - device_printf(sc->sc_dev, - "PHY %d: couldn't allocate ifnet structure\n", - phy); - err = ENOMEM; - break; - } - sc->sc_phys.ifp[phy]->if_softc = sc; sc->sc_phys.ifp[phy]->if_flags |= IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX; diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c index 70f3ad501d5d..f1e6d1944038 100644 --- a/sys/dev/etherswitch/arswitch/arswitch.c +++ b/sys/dev/etherswitch/arswitch/arswitch.c @@ -150,12 +150,6 @@ arswitch_attach_phys(struct arswitch_softc *sc) snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->sc_dev)); for (phy = 0; phy < sc->numphys; phy++) { sc->ifp[phy] = if_alloc(IFT_ETHER); - if (sc->ifp[phy] == NULL) { - device_printf(sc->sc_dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - if_setsoftc(sc->ifp[phy], sc); if_setflagbits(sc->ifp[phy], IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX, 0); diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c index 95f1a2e96db6..3b309f7f36f8 100644 --- a/sys/dev/etherswitch/e6000sw/e6000sw.c +++ b/sys/dev/etherswitch/e6000sw/e6000sw.c @@ -454,8 +454,6 @@ e6000sw_init_interface(e6000sw_softc_t *sc, int port) snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->dev)); sc->ifp[port] = if_alloc(IFT_ETHER); - if (sc->ifp[port] == NULL) - return (ENOMEM); if_setsoftc(sc->ifp[port], sc); if_setflagbits(sc->ifp[port], IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX, 0); diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c index 8bc482af24e8..3ff38abb69a0 100644 --- a/sys/dev/etherswitch/e6000sw/e6060sw.c +++ b/sys/dev/etherswitch/e6000sw/e6060sw.c @@ -214,12 +214,6 @@ e6060sw_attach_phys(struct e6060sw_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - if (sc->ifp[port] == NULL) { - device_printf(sc->sc_dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - sc->ifp[port]->if_softc = sc; sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX; diff --git a/sys/dev/etherswitch/felix/felix.c b/sys/dev/etherswitch/felix/felix.c index 92d654961f50..6e9bc29e5757 100644 --- a/sys/dev/etherswitch/felix/felix.c +++ b/sys/dev/etherswitch/felix/felix.c @@ -240,9 +240,6 @@ felix_init_interface(felix_softc_t sc, int port) snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->dev)); sc->ports[port].ifp = if_alloc(IFT_ETHER); - if (sc->ports[port].ifp == NULL) - return (ENOMEM); - if_setsoftc(sc->ports[port].ifp, sc); if_setflags(sc->ports[port].ifp, IFF_UP | IFF_BROADCAST | IFF_MULTICAST | IFF_DRV_RUNNING | IFF_SIMPLEX); diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c index 95a24a2fb37a..2c6c83a4388d 100644 --- a/sys/dev/etherswitch/infineon/adm6996fc.c +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -173,12 +173,6 @@ adm6996fc_attach_phys(struct adm6996fc_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - if (sc->ifp[port] == NULL) { - device_printf(sc->sc_dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - sc->ifp[port]->if_softc = sc; sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX; diff --git a/sys/dev/etherswitch/ip17x/ip17x.c b/sys/dev/etherswitch/ip17x/ip17x.c index 45119ded83a9..5e07e1f72b80 100644 --- a/sys/dev/etherswitch/ip17x/ip17x.c +++ b/sys/dev/etherswitch/ip17x/ip17x.c @@ -172,12 +172,6 @@ ip17x_attach_phys(struct ip17x_softc *sc) sc->phyport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - if (sc->ifp[port] == NULL) { - device_printf(sc->sc_dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - if_setsoftc(sc->ifp[port], sc); if_setflags(sc->ifp[port], IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX); diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c index 2b5af2a5625a..e512a86202c6 100644 --- a/sys/dev/etherswitch/micrel/ksz8995ma.c +++ b/sys/dev/etherswitch/micrel/ksz8995ma.c @@ -219,12 +219,6 @@ ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - if (sc->ifp[port] == NULL) { - device_printf(sc->sc_dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - sc->ifp[port]->if_softc = sc; sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX; diff --git a/sys/dev/etherswitch/mtkswitch/mtkswitch.c b/sys/dev/etherswitch/mtkswitch/mtkswitch.c index 75f7cbfa6941..fa96a81b40ef 100644 --- a/sys/dev/etherswitch/mtkswitch/mtkswitch.c +++ b/sys/dev/etherswitch/mtkswitch/mtkswitch.c @@ -121,12 +121,6 @@ mtkswitch_attach_phys(struct mtkswitch_softc *sc) continue; } sc->ifp[phy] = if_alloc(IFT_ETHER); - if (sc->ifp[phy] == NULL) { - device_printf(sc->sc_dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - sc->ifp[phy]->if_softc = sc; sc->ifp[phy]->if_flags |= IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX; diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rb.c b/sys/dev/etherswitch/rtl8366/rtl8366rb.c index 8a74ae189284..761a96b0ec80 100644 --- a/sys/dev/etherswitch/rtl8366/rtl8366rb.c +++ b/sys/dev/etherswitch/rtl8366/rtl8366rb.c @@ -238,12 +238,6 @@ rtl8366rb_attach(device_t dev) /* PHYs need an interface, so we generate a dummy one */ for (i = 0; i < sc->numphys; i++) { sc->ifp[i] = if_alloc(IFT_ETHER); - if (sc->ifp[i] == NULL) { - device_printf(dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - if_setsoftc(sc->ifp[i], sc); if_setflagbits(sc->ifp[i], IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX, 0); diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c index c1e23f7c0f65..f2cf6ef74e90 100644 --- a/sys/dev/etherswitch/ukswitch/ukswitch.c +++ b/sys/dev/etherswitch/ukswitch/ukswitch.c @@ -124,12 +124,6 @@ ukswitch_attach_phys(struct ukswitch_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - if (sc->ifp[port] == NULL) { - device_printf(sc->sc_dev, "couldn't allocate ifnet structure\n"); - err = ENOMEM; - break; - } - if_setsoftc(sc->ifp[port], sc); if_setflags(sc->ifp[port], IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING | IFF_SIMPLEX); diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index 60a9806656e8..44d3425799e9 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -178,10 +178,6 @@ fwe_attach(device_t dev) /* fill the rest and attach interface */ ifp = fwe->eth_softc.ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "can not if_alloc()\n"); - return (ENOSPC); - } if_setsoftc(ifp, &fwe->eth_softc); if_initname(ifp, device_get_name(dev), unit); @@ -201,7 +197,7 @@ fwe_attach(device_t dev) if_setcapenablebit(ifp, IFCAP_VLAN_MTU, 0); FWEDEBUG(ifp, "interface created\n"); - return 0; + return (0); } static void diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index b698db6c9620..6350ec9cb56e 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -153,8 +153,6 @@ fwip_attach(device_t dev) fwip = ((struct fwip_softc *)device_get_softc(dev)); unit = device_get_unit(dev); ifp = fwip->fw_softc.fwip_ifp = if_alloc(IFT_IEEE1394); - if (ifp == NULL) - return (ENOSPC); mtx_init(&fwip->mtx, "fwip", NULL, MTX_DEF); /* XXX */ @@ -199,7 +197,7 @@ fwip_attach(device_t dev) splx(s); FWIPDEBUG(ifp, "interface created\n"); - return 0; + return (0); } static void diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index d5c977782440..7684b94df316 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -443,11 +443,6 @@ fxp_attach(device_t dev) fxp_serial_ifmedia_sts); ifp = sc->ifp = if_gethandle(IFT_ETHER); - if (ifp == (void *)NULL) { - device_printf(dev, "can not if_alloc()\n"); - error = ENOSPC; - goto fail; - } /* * Enable bus mastering. diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index 91389d0dfd2c..434c5309d019 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -152,8 +152,6 @@ gem_attach(struct gem_softc *sc) /* Set up ifnet structure. */ ifp = sc->sc_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) - return (ENOSPC); sc->sc_csum_features = GEM_CSUM_FEATURES; if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(sc->sc_dev), diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index cd7849778bce..f8a37b9f37a9 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -352,18 +352,13 @@ gve_get_counter(if_t ifp, ift_counter cnt) } } -static int +static void gve_setup_ifnet(device_t dev, struct gve_priv *priv) { int caps = 0; if_t ifp; ifp = priv->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(priv->dev, "Failed to allocate ifnet struct\n"); - return (ENXIO); - } - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setsoftc(ifp, priv); if_setdev(ifp, dev); @@ -401,8 +396,6 @@ gve_setup_ifnet(device_t dev, struct gve_priv *priv) ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO); - - return (0); } static int @@ -794,9 +787,7 @@ gve_attach(device_t dev) if (err != 0) goto abort; - err = gve_setup_ifnet(dev, priv); - if (err != 0) - goto abort; + gve_setup_ifnet(dev, priv); priv->rx_copybreak = GVE_DEFAULT_RX_COPYBREAK; diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c index 52ab5afb9c4e..caca35a3d22b 100644 --- a/sys/dev/iicbus/if_ic.c +++ b/sys/dev/iicbus/if_ic.c @@ -162,8 +162,6 @@ icattach(device_t dev) if_t ifp; ifp = sc->ic_ifp = if_alloc(IFT_PARA); - if (ifp == NULL) - return (ENOSPC); mtx_init(&sc->ic_lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c index aebeb9c617fa..96824e2d7f27 100644 --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -804,12 +804,6 @@ jme_attach(device_t dev) goto fail; ifp = sc->jme_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "cannot allocate ifnet structure.\n"); - error = ENXIO; - goto fail; - } - if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/le/lance.c b/sys/dev/le/lance.c index 74ae09ee14c3..6eef8b5da052 100644 --- a/sys/dev/le/lance.c +++ b/sys/dev/le/lance.c @@ -107,8 +107,6 @@ lance_config(struct lance_softc *sc, const char* name, int unit) return (ENXIO); ifp = sc->sc_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) - return (ENOSPC); callout_init_mtx(&sc->sc_wdog_ch, &sc->sc_mtx, 0); diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index d77866ee3cad..dfcaa01d366b 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -512,11 +512,6 @@ lge_attach(device_t dev) } ifp = sc->lge_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "can not if_alloc()\n"); - error = ENOSPC; - goto fail; - } if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c index aa52612dda04..7104ff07674f 100644 --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -1327,11 +1327,6 @@ lio_setup_nic_devices(struct octeon_device *octeon_dev) ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - lio_dev_err(octeon_dev, "Device allocation failed\n"); - goto setup_nic_dev_fail; - } - *** 1274 LINES SKIPPED *** From nobody Fri Jun 28 10:18:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9WcD4RPvz5FCyF; Fri, 28 Jun 2024 10:18: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9WcD2XSwz4pbs; Fri, 28 Jun 2024 10:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nnb0ARn/T46seoql92pp2TjMQULdqG1MGy238s6F4e4=; b=NuND0FciRHr8HVB2MaqiRki3QOFNLd087JfvJR7uksiuH8LwOYW89zxMEilj1X4ak9KxXW wTYsYa/Hwz4hZsM0qXqdB6PsazkuyvvwpAUx42jP4Hne9ZqaaONelJoU2R9CaSPGVPxWEP LD6NdiwBFLTjtASCQKgyGuoym+kddSZMIAARU/7U6rNkG+zpjpcyQpUA9MxDqoMRovKTXH mro6vOhuB8yj4b4BnhbC6ccIwM7U/PADX3fcQ0EShGBwKPdlvaYbGDbIzEkjK2vlvFGkJW iQHnGjHSnoeXXWRllYu1Gxz5ZzR3y0AirgXyaOFenJQOgCYKXbp86T7eTwQnAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719569916; a=rsa-sha256; cv=none; b=b197MNifzDUuK4sNLUvHoCaBLKwSZH+V4v9MfWBhh7Kkkv5fIGG/MqB5No+q847oOA8Y97 17l54ISMf/OyDththXS75bLttKnyjhjzem0N2w1jytryfkSelrjkITZUZ0+q2NHs0Dk+XY XRuRxuucar9OAGqaL2mjFRhulYzUAmGIJKuifZQBHxI3urivFD31P5cAOtwODhmYy6YyoB 9BjhZpahxZXY6TCiefU0CFKONaA4V0kAWSGuZvchsazUtsxcgH/rssGryyatE36/YE9pHI T35p0KXO+JhSXtkJwxtifhdqfvzC4N18nMDJWvUZcWluBThiADu9WLfTgJfLTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nnb0ARn/T46seoql92pp2TjMQULdqG1MGy238s6F4e4=; b=gY6L6vD9OOvRLtd1lmTGSMMzzvqCIyuH0oypSDj6JqJsikgNNvHdrJYn1J6Td0z40j7LBi HrteslsasybS+nocPTWgVHMeaTXlEQNv9a6bm3i6a+Vh7LKrLNKtYjQHmmyVWCvo7Os/6k jQM0dnW9L4zECeyW1EDeZbG06KWV6pvH5sbIbzyz6jbu2Sg8RrEibrXiOtEaly+J7DCOwR rCJQVhLvayp33reoggWJei/sbRguBnkWOgKyz8G5cTv53HugcEl6LGhvBcROAG0v7/M4tm DQgB17jwURDzzLPaIZcPZHToKR8FLmMZ4z1OtmswPu2C5Y4caG7vVGkKOhI3dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9WcD1sgXzrss; Fri, 28 Jun 2024 10:18: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 45SAIaCC076144; Fri, 28 Jun 2024 10:18:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SAIa8S076141; Fri, 28 Jun 2024 10:18:36 GMT (envelope-from git) Date: Fri, 28 Jun 2024 10:18:36 GMT Message-Id: <202406281018.45SAIa8S076141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: c7bb7a23336a - stable/13 - libcapsicum: cache more time zone information List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: c7bb7a23336ad1c526b7fb910092a828455094ee Auto-Submitted: auto-generated The branch stable/13 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=c7bb7a23336ad1c526b7fb910092a828455094ee commit c7bb7a23336ad1c526b7fb910092a828455094ee Author: Mariusz Zaborski AuthorDate: 2024-05-27 11:17:03 +0000 Commit: Mariusz Zaborski CommitDate: 2024-06-28 10:19:56 +0000 libcapsicum: cache more time zone information The functions like gmtime(3) expect to cache a GMT time zone. Some sandboxed programs (like last(1)) use the gmtime(3) function. In case of last(1), this function fails to load a proper time zone because it is called after entering the capability mode. _open () at _open.S:4 0x00000008011bc5a8 in tzloadbody (name=0x8018b9580 "/usr/share/zoneinfo/Etc/UTC", sp=0x801870140, tzload (name=, sp=0x801870140, doextend=true) 0x00000008011bb8ba in gmtload (sp=0x801870140) at /usr/src/contrib/tzcode/localtime.c:1456 gmtcheck () at /usr/src/contrib/tzcode/localtime.c:1581 0x000000080111f85a in _libc_once (once_control=0x80127c550, init_routine=0x0) _once (once_control=0x80127c550, init_routine=0x0) at /usr/src/lib/libc/gen/_once_stub.c:63 0x00000008011bb9d0 in gmtime_r (timep=0x7fffffffe3a8, tmp=0x80127c568) gmtime (timep=timep@entry=0x7fffffffe3a8) at /usr/src/contrib/tzcode/localtime.c:1865 0x0000000001024cd4 in printentry (bp=bp@entry=0x8018b4800, tt=tt@entry=0x80186a0a0) 0x00000000010245ae in doentry (bp=0x8018b4800) 0x00000000010243a7 in main (argc=1, argv=) This time zone is not loaded by the tzset(3) function. Because of that, extend the caph_cache_tzdata(3) function to also include the GMT time zone. There is no other way to cache this data than calling gmtime(3) once. MFC after: 5 days Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D45297 (cherry picked from commit e24ff5c99be080007ff9086398fbe3ef56cd94dc) --- lib/libcapsicum/capsicum_helpers.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/libcapsicum/capsicum_helpers.h b/lib/libcapsicum/capsicum_helpers.h index f137ec1806f9..a6c696aa9a8e 100644 --- a/lib/libcapsicum/capsicum_helpers.h +++ b/lib/libcapsicum/capsicum_helpers.h @@ -133,8 +133,17 @@ caph_limit_stdio(void) static __inline void caph_cache_tzdata(void) { + time_t delta; tzset(); + + /* + * The tzset() function does not cache all time zones. + * Some functions, such as gmtime(), require a GMT time zone. + * The only way to cache them is to call the function directly. + */ + delta = 0; + (void)gmtime(&delta); } static __inline void From nobody Fri Jun 28 10:18:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9WcY1cWgz5FCyH; Fri, 28 Jun 2024 10:18: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9WcX72BWz4ppr; Fri, 28 Jun 2024 10: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=1719569933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jK2gi4IQz0HFTMBMJ/2rmLOFdsXRtVbiTkJBB2Q5JOw=; b=F3CtK8/A2gJRHTFr5dWmt75sLHrifdvaD+M+n+RCHAsPbhu6LVq7Cd9yvcMDlX+vUO0C4g Lu1zOY33Ou9nYLvtNOr7EPitYy3DffKKb7ozAh8M87dZI9lx3UtYowHoengDSjYvVaqvPg vRZS0vI3KtG9drBDawaXihvbp+embsHUCMq7Pp2zz9CdWZ2L5EV5SH1S1NcVq00DrH45ti EXr8XLZ2XK3OFonyFR2WpPuARkIxy6oZEcpwWBob6X/PaK0kytevhWP5MikIEyAw4nh6MZ E7FZbgktmGsTn5zoXOFG44S2Z1Un0FdQwKnwf1aK3nYd6Dt3qBdr8qwNt8Ry7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719569933; a=rsa-sha256; cv=none; b=OtqQMxUwJUiAb1bVZiKhRPHEEETZw1yynLYbOZmOE4pwN3LJLPfQD6R0Z597lXqahEFuE4 uKTsbEoZfRU0+zKx2JaCTfqUCEKdknuBm8vLNagimONjzqrTxoYU7lrvvjXxGBoAnbo/Tx n6LQab4VXefLwUphZzMAfgCosA7MZHBnvyfWfMFvg5cVOj2ygbzuoCttBTS9vu/m0yy/B4 CQSBsWWIz0VwZRaXQeENWH4jhw8J+ZRZ/KJhsw2hzoY8D+twAhyyBJqTEhyac4eBSZnJ5M 7LW+x3WCmllCccD2kdBQvV6HnXFs47PvShDXVttRkomJNf83hC5llVMxBbAWNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719569933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jK2gi4IQz0HFTMBMJ/2rmLOFdsXRtVbiTkJBB2Q5JOw=; b=Au6KCuefLtKQ5d46A5inU5UateSVji65jnN29gACAHWGB92FOOUumX+L/5yArzAosbHH82 voexpE0oh9vtKM3aW5UOu4hY165hP8yjUvRf1sMfBaQBr7FTzNiEJAG+Ihq9mvCXctMc7f tkjLLvvaRp4gyqfmpHsFQm5tAV1oi93Ugidm/DB4nU/Q4zMc38L8TjYjdsJwxzbhwPW0nJ VmtHIstpMuS44QCyGM0ne8ctlBadaym2cabQyk14nx8h1S6biQQsHO03Nab7EYNuxlqYP8 4HDasI0Xy2P7TWAM4+tzjyeAiw481W0rTl3p1fk4jTPDILkz29Vs9gK+5UU05Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9WcX6cVBzrn9; Fri, 28 Jun 2024 10: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 45SAIqp6076340; Fri, 28 Jun 2024 10: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 45SAIqjJ076337; Fri, 28 Jun 2024 10:18:52 GMT (envelope-from git) Date: Fri, 28 Jun 2024 10:18:52 GMT Message-Id: <202406281018.45SAIqjJ076337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 2c88494a3364 - stable/14 - libcapsicum: cache more time zone information List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2c88494a336488caa3eec75a126d8b9bc23c20b0 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=2c88494a336488caa3eec75a126d8b9bc23c20b0 commit 2c88494a336488caa3eec75a126d8b9bc23c20b0 Author: Mariusz Zaborski AuthorDate: 2024-05-27 11:17:03 +0000 Commit: Mariusz Zaborski CommitDate: 2024-06-28 10:20:15 +0000 libcapsicum: cache more time zone information The functions like gmtime(3) expect to cache a GMT time zone. Some sandboxed programs (like last(1)) use the gmtime(3) function. In case of last(1), this function fails to load a proper time zone because it is called after entering the capability mode. _open () at _open.S:4 0x00000008011bc5a8 in tzloadbody (name=0x8018b9580 "/usr/share/zoneinfo/Etc/UTC", sp=0x801870140, tzload (name=, sp=0x801870140, doextend=true) 0x00000008011bb8ba in gmtload (sp=0x801870140) at /usr/src/contrib/tzcode/localtime.c:1456 gmtcheck () at /usr/src/contrib/tzcode/localtime.c:1581 0x000000080111f85a in _libc_once (once_control=0x80127c550, init_routine=0x0) _once (once_control=0x80127c550, init_routine=0x0) at /usr/src/lib/libc/gen/_once_stub.c:63 0x00000008011bb9d0 in gmtime_r (timep=0x7fffffffe3a8, tmp=0x80127c568) gmtime (timep=timep@entry=0x7fffffffe3a8) at /usr/src/contrib/tzcode/localtime.c:1865 0x0000000001024cd4 in printentry (bp=bp@entry=0x8018b4800, tt=tt@entry=0x80186a0a0) 0x00000000010245ae in doentry (bp=0x8018b4800) 0x00000000010243a7 in main (argc=1, argv=) This time zone is not loaded by the tzset(3) function. Because of that, extend the caph_cache_tzdata(3) function to also include the GMT time zone. There is no other way to cache this data than calling gmtime(3) once. MFC after: 5 days Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D45297 (cherry picked from commit e24ff5c99be080007ff9086398fbe3ef56cd94dc) --- lib/libcapsicum/capsicum_helpers.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/libcapsicum/capsicum_helpers.h b/lib/libcapsicum/capsicum_helpers.h index f137ec1806f9..a6c696aa9a8e 100644 --- a/lib/libcapsicum/capsicum_helpers.h +++ b/lib/libcapsicum/capsicum_helpers.h @@ -133,8 +133,17 @@ caph_limit_stdio(void) static __inline void caph_cache_tzdata(void) { + time_t delta; tzset(); + + /* + * The tzset() function does not cache all time zones. + * Some functions, such as gmtime(), require a GMT time zone. + * The only way to cache them is to call the function directly. + */ + delta = 0; + (void)gmtime(&delta); } static __inline void From nobody Fri Jun 28 10:25:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9Wm20bKJz5FDZG; Fri, 28 Jun 2024 10:25: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9Wm205DKz4qgY; Fri, 28 Jun 2024 10:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719570322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hn75RlR2odnQLABhH7wK7me5iejYl1Zp+NFYKjf1GiU=; b=tQE1HXgV2i2JEFq8bhlud1K6VY1ipU3OFQWQ5+vjT7tTyLiynbtssAwzobqBLq6wbuia53 NfJ0ktXA1bbEXZvcYiNjY28s4Mj5GEiaaOCj1eDnRofkdRFpmoB75AxbMmbcNlZvwEOCX9 qOAlhXUBxib2ReNiTGPFoTFT4And/8Ksa1PlyF6dvYb0hWpEQW6GwwMjWx1bvKzeb6K300 b0JTmwqcI5LH+uBVB1dL16XP9dc8NPgKkBAy52rxKbZnIgovzqx3pPxrMAXMx5jeUJfUoT yVFVMvldLx36/2N+j1xn+7lVNG4uAnRiKS6/XVZygdOUV51oNisb9qlghUjI+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719570322; a=rsa-sha256; cv=none; b=P/vmCNJTSa7dvTC3FuIw1e/nJ/b5zsyuuCNjKmlHqe1qP5FnyiqLZw3GIfbByfQB8pIrtR EywO4Qoa0aLxEDfqSwKVHrCOoxNyzMwquCiteDHGhmyOGhmq3pg45zGq7088mduUhbbwja io3Ld+sU5yNDeACuCCsFNXQZFzVWJJqRsGEoU62eLaABtItCtTyvkh4uq8sGhz0D0K5818 7ExQOcCzq2nGgM4Qcv775QX7apvWScUtjvdijsrzKHgF22oIqUSbQvo9hayS8pKFavS/mA WSisgb8jyUEUd2Am1WiavixOdQn1YcbysXdWaGwbH2jD1Vnd72boayy6gCiAbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719570322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hn75RlR2odnQLABhH7wK7me5iejYl1Zp+NFYKjf1GiU=; b=ujAlEcBd4+2AMLD9Cl/NRriBqHD6+tdB9bx3jBKHbGKz4JIPpB49+FONUuBjqwfurTEl6O b1oRM4DDOb+7rciGbwTN2Z7G1Lvlte3VQ5TI/CgWUZMOcBGrMwTDTFNEpB3GOxDf9d6xmz Axi9s+jnD9BUHdXWx3A9kOizjrHP/q+71rfblFL1m6UCW0uXlpRx6+CwEze5oRpO5DVuPe K8+wWK+9DBVVctBduhTUVjzHRpixRHoQWdkgfMReicdauX/OeFeTUV6Nd7WD/tcQcNu7Bg vtBUL0WGG8Vhsiys5rO6VObk9sIHzll5rwj6KerPk7QVrnNwRo1eyqgrW14puQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9Wm16pNXzsG9; Fri, 28 Jun 2024 10:25: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 45SAPL57092199; Fri, 28 Jun 2024 10:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SAPLcL092196; Fri, 28 Jun 2024 10:25:21 GMT (envelope-from git) Date: Fri, 28 Jun 2024 10:25:21 GMT Message-Id: <202406281025.45SAPLcL092196@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: d3bb35d4e51b - main - jail: allow adjustment of host time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: d3bb35d4e51b06488b731071e7841f549bd5d26f Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=d3bb35d4e51b06488b731071e7841f549bd5d26f commit d3bb35d4e51b06488b731071e7841f549bd5d26f Author: Mariusz Zaborski AuthorDate: 2024-06-28 10:23:31 +0000 Commit: Mariusz Zaborski CommitDate: 2024-06-28 10:23:31 +0000 jail: allow adjustment of host time Add a special permission to the jail to adjust and to set the host time. This can be useful if we want to compartmentalize the NTP daemon from the rest of the system. Reviewed by: olce, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45545 --- sys/kern/kern_jail.c | 28 ++++++++++++++++++++++++++++ sys/sys/jail.h | 4 +++- usr.sbin/jail/jail.8 | 17 +++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 90a043394792..38aea998d196 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -223,6 +223,8 @@ static struct bool_flags pr_flag_allow[NBBY * NBPW] = { {"allow.nfsd", "allow.nonfsd", PR_ALLOW_NFSD}, #endif {"allow.extattr", "allow.noextattr", PR_ALLOW_EXTATTR}, + {"allow.adjtime", "allow.noadjtime", PR_ALLOW_ADJTIME}, + {"allow.settime", "allow.nosettime", PR_ALLOW_SETTIME}, }; static unsigned pr_allow_all = PR_ALLOW_ALL_STATIC; const size_t pr_flag_allow_size = sizeof(pr_flag_allow); @@ -4167,6 +4169,28 @@ prison_priv_check(struct ucred *cred, int priv) return (0); return (EPERM); + /* + * Conditionally allow privileged process in the jail adjust + * machine time. + */ + case PRIV_ADJTIME: + case PRIV_NTP_ADJTIME: + if (cred->cr_prison->pr_allow & + (PR_ALLOW_ADJTIME | PR_ALLOW_SETTIME)) { + return (0); + } + return (EPERM); + + /* + * Conditionally allow privileged process in the jail set + * machine time. + */ + case PRIV_CLOCK_SETTIME: + if (cred->cr_prison->pr_allow & PR_ALLOW_SETTIME) + return (0); + else + return (EPERM); + default: /* * In all remaining cases, deny the privilege request. This @@ -4631,6 +4655,10 @@ SYSCTL_JAIL_PARAM(_allow, nfsd, CTLTYPE_INT | CTLFLAG_RW, #endif SYSCTL_JAIL_PARAM(_allow, extattr, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may set system-level filesystem extended attributes"); +SYSCTL_JAIL_PARAM(_allow, adjtime, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may adjust system time"); +SYSCTL_JAIL_PARAM(_allow, settime, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may set system time"); SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 6e7b6cc9ad6a..31928be73502 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -254,7 +254,9 @@ struct prison_racct { #define PR_ALLOW_KMEM_ACCESS 0x00010000 /* reserved, not used yet */ #define PR_ALLOW_NFSD 0x00020000 #define PR_ALLOW_EXTATTR 0x00040000 -#define PR_ALLOW_ALL_STATIC 0x000787ff +#define PR_ALLOW_ADJTIME 0x00080000 +#define PR_ALLOW_SETTIME 0x00100000 +#define PR_ALLOW_ALL_STATIC 0x001f87ff /* * PR_ALLOW_DIFFERENCES determines which flags are able to be diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index ca7b3f95fdbc..2ecb711c971f 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -656,6 +656,18 @@ The super-user is enabled by default. .It Va allow.extattr Allow privileged process in the jail to manipulate filesystem extended attributes in the system namespace. +.It Va allow.adjtime +Allow privileged process in the jail to slowly adjusting global operating system +time. +For example through utilities like +.Xr ntpd 8 . +.It Va allow.settime +Allow privileged process in the jail to set global operating system data +and time. +For example through utilities like +.Xr date 1 . +This permission includes also +.Va allow.adjtime . .El .El .Pp @@ -1416,6 +1428,7 @@ appears relative to its creator's own This is by virtue of the child jail being created in the chrooted environment of the first jail. .Sh SEE ALSO +.Xr date 1 , .Xr killall 1 , .Xr lsvfs 1 , .Xr newaliases 1 , @@ -1423,6 +1436,9 @@ environment of the first jail. .Xr pkill 1 , .Xr ps 1 , .Xr quota 1 , +.Xr adjtime 2 , +.Xr clock_settime 2 , +.Xr ntp_adjtime 2 , .Xr jail_set 2 , .Xr devfs 4 , .Xr fdescfs 4 , @@ -1444,6 +1460,7 @@ environment of the first jail. .Xr mount 8 , .Xr mountd 8 , .Xr nfsd 8 , +.Xr ntpd 8 , .Xr reboot 8 , .Xr rpcbind 8 , .Xr sendmail 8 , From nobody Fri Jun 28 10:38:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9X3f1H71z5JjPX; Fri, 28 Jun 2024 10:38:54 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.3 with cipher TLS_AES_256_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 4W9X3d5v8Lz4rgD; Fri, 28 Jun 2024 10:38:53 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Authentication-Results: mx1.freebsd.org; none Received: from critter.freebsd.dk (unknown [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id DA9BF892BF; Fri, 28 Jun 2024 10:38:45 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.18.1/8.16.1) with ESMTPS id 45SAcjSD010521 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 28 Jun 2024 10:38:45 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.18.1/8.16.1/Submit) id 45SAcjNd010520; Fri, 28 Jun 2024 10:38:45 GMT (envelope-from phk) Message-Id: <202406281038.45SAcjNd010520@critter.freebsd.dk> To: Zhenlei Huang cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: aa3860851b9f - main - net: Remove unneeded NULL check for the allocated ifnet In-reply-to: <202406281018.45SAILbb075980@gitrepo.freebsd.org> From: "Poul-Henning Kamp" References: <202406281018.45SAILbb075980@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10518.1719571125.1@critter.freebsd.dk> Date: Fri, 28 Jun 2024 10:38:45 +0000 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:1835, ipnet:130.225.0.0/16, country:EU] X-Rspamd-Queue-Id: 4W9X3d5v8Lz4rgD -------- Zhenlei Huang writes: > commit aa3860851b9f6a6002d135b1cac7736e0995eedc > > net: Remove unneeded NULL check for the allocated ifnet > > Change 4787572d0580 made if_alloc_domain() never fail, then also do the > wrappers if_alloc(), if_alloc_dev(), and if_gethandle(). > >[...] > diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c > index f581d361d3d9..1db43cbca26c 100644 > --- a/sys/arm/allwinner/if_emac.c > +++ b/sys/arm/allwinner/if_emac.c > @@ -940,11 +940,6 @@ emac_attach(device_t dev) > emac_reset(sc); > > ifp = sc->emac_ifp = if_alloc(IFT_ETHER); > - if (ifp == NULL) { > - device_printf(dev, "unable to allocate ifp\n"); > - error = ENOSPC; > - goto fail; > - } > if_setsoftc(ifp, sc); > > /* Setup MII */ I would like to suggest that we use a KASSERT() to document the expectations in cases like this. It will costs us nothing, and it helps tell both human readers of the source code, the compiler, and code analysis tools what to expect. Background: One of the things I did with Varnish Cache was make asserts mandatory and numerous, to the point where about one source line in ten is an assert in our code base. In Varnish asserts are not compiled out in production code, and so far nobody has ever documented any performance difference by doing so. This is because almost all the asserts are on data already present in a CPU register at the time, and in many cases the compiler is even able to determine that the assert is always false and eliminates it before code generation. But having the assert there still clearly states the expectation for both humans and programs. For basic "is(n't) NULL" we have two short-hand assert macros: AZ(expression) // is zero AN(expression) // is not zero/NULL Maybe we should have something similar in sys/kassert.h ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From nobody Fri Jun 28 13:22:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9bhj6TDLz5Mm9F; Fri, 28 Jun 2024 13:22:45 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9bhj5hbPz47Ky; Fri, 28 Jun 2024 13:22:45 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719580965; 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=liFRWJNWT+USNtGSzKV4t9Czw8jhAknM7AutGj8LszY=; b=Z3nCSr15p54qaCjtFML6l/5Z6A/MHGCI346kLNu5QVHIGwDQ5I+UH7IhAr4YrjeSuEYT9h 8ixKSoVYcBkGR4BoGCRL2ZXDSlCeqMvmcrFOq+5BSqOI1OLetzvT//mLp7ph6wW3loaGqy CP8U30PHES9zqdCsg+RlcPG52LylZhoazj/RBCeiS7rV33d3JGuJCJtqbfjNAQpFEq9/61 Hg869u1jPmRs3+4X/sM9hRWtIhGA2oisk+p17xrK5FmvvyHODNzVrjGQHSNmzS76JofLlY egC20aKuM5VDMdXW9HQYXFeRm+/sh0x5FfG3xbn4y/Sp+atJ/+vnltWPY5JUtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719580965; a=rsa-sha256; cv=none; b=MqsNuHXtNZO7e4L3ItAx8rKQCgtKWm8lT9nioliHXiXHclguhRKfDtOfWzwMXq8MtjlhN7 u57NbKrtUlg5xSwPTdFusgqbNfZ5bUKJxMjBIU2rlr9F8xJwjqat2AfVdUT+PPLmlTzUCx 5K//D/9dgKbDWV/iun3OFoAUgewxkrijhpIaceFbjvyGho8+RllNLSgwh4Xi1o4o6n0Dbp VzcOiNC3+OKpUlpq5n63yob+lCmn2R527Wd2ourag1couhBIWnYATot7/uZcNJYn/g6oAJ J6RlWwUfzbmP/KuZy9TycM/KierWpHgtkIG4qQsmOjdBg8JKbHcBO6cpMvnfbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719580965; 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=liFRWJNWT+USNtGSzKV4t9Czw8jhAknM7AutGj8LszY=; b=WS4kxcXkJih8TPesqfYe1hd8uTJ36hi4gCpc9XCMDG8ywbEbFNSM9F2TP+dgnEgGQTSaT6 46ZQcaz7zVlcY5ttwdlbLNu+3+jQwOwpArYfcgEzBiapQTYCpaEJACFeveAZrTELnAZ/SH ZTafwVWBx6wkjFq07yZQEKEF74alXvpEyDWNOhUmzPuv0OiRyJk3lkaFzvXI7lOw8xWD+2 LGWFqCEWhb5qsYS7H3OVUZpFUqpo9EBYFJFzC8y6x7SMrYwyvy+AC+PfrGuOPHnpmK6ifE soA5OXbgn4H7jLJbrwQeqcYm5LuXO20I36dSclsTnJvTa7y2pChNJ88gdQZ2kQ== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W9bhg55MLz16g2; Fri, 28 Jun 2024 13:22:43 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_64E2865D-B60F-40FF-9720-2EB6536D1822" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: git: aa3860851b9f - main - net: Remove unneeded NULL check for the allocated ifnet Date: Fri, 28 Jun 2024 21:22:30 +0800 In-Reply-To: <202406281038.45SAcjNd010520@critter.freebsd.dk> Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Poul-Henning Kamp References: <202406281018.45SAILbb075980@gitrepo.freebsd.org> <202406281038.45SAcjNd010520@critter.freebsd.dk> X-Mailer: Apple Mail (2.3696.120.41.1.8) --Apple-Mail=_64E2865D-B60F-40FF-9720-2EB6536D1822 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jun 28, 2024, at 6:38 PM, Poul-Henning Kamp wrote: > > -------- > Zhenlei Huang writes: > >> commit aa3860851b9f6a6002d135b1cac7736e0995eedc >> >> net: Remove unneeded NULL check for the allocated ifnet >> >> Change 4787572d0580 made if_alloc_domain() never fail, then also do the >> wrappers if_alloc(), if_alloc_dev(), and if_gethandle(). >> >> [...] >> diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c >> index f581d361d3d9..1db43cbca26c 100644 >> --- a/sys/arm/allwinner/if_emac.c >> +++ b/sys/arm/allwinner/if_emac.c >> @@ -940,11 +940,6 @@ emac_attach(device_t dev) >> emac_reset(sc); >> >> ifp = sc->emac_ifp = if_alloc(IFT_ETHER); >> - if (ifp == NULL) { >> - device_printf(dev, "unable to allocate ifp\n"); >> - error = ENOSPC; >> - goto fail; >> - } >> if_setsoftc(ifp, sc); >> >> /* Setup MII */ > > I would like to suggest that we use a KASSERT() to document the > expectations in cases like this. > > It will costs us nothing, and it helps tell both human readers of > the source code, the compiler, and code analysis tools what to > expect. I would recommend further, that, to have some compiler hints for those kind of tasks. I think gcc extensions _Nullable _Nonnull could fulfil but I have not tried yet. Other language for example Java also have such means so that the human labor can be freed. There're also other kind of issues, such as do NULL check after malloc with M_WAITOK flag. That is quite common but is more domain specific. I guess simple compiler hints will not help, at least static code analyzer is required. More suggestions are welcomed! > > Background: > > One of the things I did with Varnish Cache was make asserts mandatory > and numerous, to the point where about one source line in ten is an > assert in our code base. > > In Varnish asserts are not compiled out in production code, and so > far nobody has ever documented any performance difference by doing so. > > This is because almost all the asserts are on data already present > in a CPU register at the time, and in many cases the compiler is > even able to determine that the assert is always false and eliminates > it before code generation. > > But having the assert there still clearly states the expectation > for both humans and programs. > > For basic "is(n't) NULL" we have two short-hand assert macros: > > AZ(expression) // is zero > AN(expression) // is not zero/NULL > > Maybe we should have something similar in sys/kassert.h ? > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. --Apple-Mail=_64E2865D-B60F-40FF-9720-2EB6536D1822 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Jun 28, 2024, at 6:38 PM, Poul-Henning Kamp <phk@phk.freebsd.dk> = wrote:

--------
Zhenlei Huang writes:

commit = aa3860851b9f6a6002d135b1cac7736e0995eedc

=    net: Remove unneeded NULL check for the allocated = ifnet

   Change = 4787572d0580 made if_alloc_domain() never fail, then also do the
   wrappers if_alloc(), if_alloc_dev(), and = if_gethandle().

[...]
diff = --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c
index f581d361d3d9..1db43cbca26c 100644
--- = a/sys/arm/allwinner/if_emac.c
+++ = b/sys/arm/allwinner/if_emac.c
@@ -940,11 +940,6 @@ = emac_attach(device_t dev)
emac_reset(sc);

= ifp =3D sc->emac_ifp =3D if_alloc(IFT_ETHER);
- = if (ifp =3D=3D NULL) {
- = device_printf(dev, "unable to allocate ifp\n");
- = = error =3D ENOSPC;
- goto fail;
- }
= if_setsoftc(ifp, sc);

/* Setup = MII */

I would like to suggest = that we use a KASSERT() to document the
expectations in = cases like this.

It will costs us nothing, = and it helps tell both human readers of
the source code, = the compiler, and code analysis tools what to
expect.

I = would recommend further, that, to have some compiler hints = for
those kind of tasks. I think gcc extensions _Nullable = _Nonnull could
fulfil but I have not tried yet.

Other language for example Java also have such = means so that
the human labor can be freed.

There're also other kind of issues, such as do = NULL check after malloc
with M_WAITOK flag. That is quite = common but is more domain specific.
I guess simple compiler hints will not help, at least = static code analyzer
is = required.

More suggestions are welcomed!


Background:

One = of the things I did with Varnish Cache was make asserts mandatory
and numerous, to the point where about one source line in ten = is an
assert in our code base.

In Varnish asserts are not compiled out in production code, = and so
far nobody has ever documented any performance = difference by doing so.

This is because = almost all the asserts are on data already present
in a = CPU register at the time, and in many cases the compiler is
even able to determine that the assert is always false and = eliminates
it before code generation.

But having the assert there still clearly states the = expectation
for both humans and programs.

For basic "is(n't) NULL" we have two short-hand assert = macros:

AZ(expression) // is = zero
AN(expression) // is not = zero/NULL

Maybe we should have something = similar in sys/kassert.h ?

--
Poul-Henning Kamp       | UNIX = since Zilog Zeus 3.20
phk@FreeBSD.ORG =         | TCP/IP since RFC = 956
FreeBSD committer =       | BSD since 4.3-tahoe =    
Never attribute to malice what can = adequately be explained by incompetence.



= --Apple-Mail=_64E2865D-B60F-40FF-9720-2EB6536D1822-- From nobody Fri Jun 28 13:34:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9bzD4Kwdz5Mmcr; Fri, 28 Jun 2024 13:35:20 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9bzD14xmz49BZ; Fri, 28 Jun 2024 13:35:20 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; none List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1719581705; 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=uKUjLYBFmkdKnpVUHWy5yIXP3TYR8D4336x/8HmxN7M=; b=akgLi1FNzwfyr3tTiLbqC7MVNnNCx6NAOT7AjhjPZ20NUXM0GHEmTz2bn3KpwbsyeLuItX 4aWBEty63ZCymch4VDXdQhcRZ/r0WgbIP4VKKANYaUD63tSl9uSCg4X5yOiVHN4Ksvc7kZ HjuP8jOgMwIqIeFE3giYj86uPOgnC3zdkgvC23vpCKM+sCYNlVfMpkWTN6G8WylIG/Gtmg XHJGeW7Fl+4KvM9XPKetkaG8TH6jz4Ma3Gplekl0hYGdaYv6QtEu2EnETfUTbGA9C06zuH 43njzH8pvA420z5ESI8otPzuFE4DePEkCSGe9JLG9XxgAYjn9SHI1rLSg1YX+w== Date: Fri, 28 Jun 2024 15:34:01 +0200 From: Alexander Leidinger To: Mariusz Zaborski Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d3bb35d4e51b - main - jail: allow adjustment of host time In-Reply-To: <202406281025.45SAPLcL092196@gitrepo.freebsd.org> References: <202406281025.45SAPLcL092196@gitrepo.freebsd.org> Message-ID: <748b26fecd710a15fb114d69d443da2f@Leidinger.net> Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_a7152074a93115fbb8de8d1340c6c7e1"; micalg=pgp-sha256 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:34240, ipnet:89.238.64.0/18, country:DE] X-Rspamd-Queue-Id: 4W9bzD14xmz49BZ This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_a7152074a93115fbb8de8d1340c6c7e1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Am 2024-06-28 12:25, schrieb Mariusz Zaborski: > The branch main has been updated by oshogbo: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=d3bb35d4e51b06488b731071e7841f549bd5d26f > > commit d3bb35d4e51b06488b731071e7841f549bd5d26f > Author: Mariusz Zaborski > AuthorDate: 2024-06-28 10:23:31 +0000 > Commit: Mariusz Zaborski > CommitDate: 2024-06-28 10:23:31 +0000 > > jail: allow adjustment of host time > > Add a special permission to the jail to adjust and to set the host > time. > This can be useful if we want to compartmentalize the NTP daemon > from the rest of the system. Do you plan to add a setting to service jails (rc.subr + rc.conf-man-page) for this, e.g. ---snip--- case "$_svcj_option" in chtime) _svcj_cmd_options="allow.adjtime allow.settime ${_svcj_cmd_options}" ;; ---snip--- and change the ntpd start script to use it (removing ntpd_svcj="NO" and adding ntpd_svcj_options="net_basic chtime" ... maybe net_raw is needed too, TBD)? Like this ntpd could be compartmentalized with "sysrc ntpd_svcj=YES". Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_a7152074a93115fbb8de8d1340c6c7e1 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmZ+u94ACgkQEg2wmwP4 2IaRUA/9Hp90beWPpJVyEYQT4mzw/hi7M2y5E6kN5dJGYkCtbABanU9Ne++ww+th vjiT9zh2axDxEVxc05KfmJZ/kk9pKiZzLTooraWtNqv4RHsg99YHkmkeadk9jFJu 9+lQgVVpmU2KWpQcKDZpkhHluqpz+7PfwLdY0VucPGKdE5h0mnSDJcb0yiRnefop +fwSiYFt9lOOeqK3u0fS07z3uC6NISV94F3/QEVvFcKVBbLox1teS+jr/176XVU/ h8+6pFG6KORcuJyno8hyjR9PF/pIzDre/SaOF3UhebwJ6EPhf9WtICal/hCSVGsp Y4ss1AEeMCmZZYGcWV1Ku8I4b3oeA90XEzKDm8JhOhis/bX+uPRWVRccp17OUksO T2YKG8+lDU9kjGz/6kI7zDLERMm5H63FCN47lOJiCvP1G+yNx+kXhjPoaSS1xspw gOC6s3hLY6SyQK82Nzqh8e2dBPXjih2uMM+bm9ZJgcuGGjdThfO8dmUkhDU2eauo uXr+9I6C5x7/+jGP6UBBtEI72JOKBfLWjZpsJBl3G6Hp7ZWJ6+EgZJeY6ctxz7N2 z3jT+XM6DNon3+UmO/TDBdghST+4U8ZEsxuLtdrGNDa1L7hoAzEKcORfIJ3Fr8Ob 8ZcrxfR82RjAfG9SiifcWn6r75rdgNOm5fs/JYKTD99V4wSZIEk= =jwsK -----END PGP SIGNATURE----- --=_a7152074a93115fbb8de8d1340c6c7e1-- From nobody Fri Jun 28 14:13:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9cqD68tMz5MrHl; Fri, 28 Jun 2024 14:13: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9cqD5MBnz4DrM; Fri, 28 Jun 2024 14:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719584008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fqou+m3HxEwi0vowu6DZM3y/329M2WSLNj2K4/e57ag=; b=cY+ektbRacqhxLVB/uoXs86qNcQjMNdJN5cGuPZo8o/zWS3nvqkyA3ORPliTQIlgtX+f/p jXQGEhEvwb0gxl3wErhJaR5lVdaK/nsEjdRx3T7YbfSLj3zOta4y0PtUxNQg20v+mXksfL 2/MM2WV0t4aKRoF3Ic77XTgSTfrvbU/2Xp+kd0GxqSYFae07OHfx7xerRceAwpB6AzPqfh fPAa/GlQ7DfXc/mpXeJ4xm7WQM3EqC9gluvWTTQUrgsMbvPKN/4GEQ2cLgycMkN3QVjss6 JlRkCIUaH1lmfcx+Cxlo6sc0NV8zHfY4hDASXdJlx8hqSEhLfRGcKSWHSHygMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719584008; a=rsa-sha256; cv=none; b=TWFDPfcN0xctV+0K+GAAeNs7bBtbBkn094UlLlIxX3OABG7lMHyKG4jUvLQ90ZF6GsMtzl /78FMWOBfJDo2sb6qvPNTlXikbCNvBKitTPnCPsebk/6Qc+Tlx/+issQc9kX+8ss1/Moth aXMi5M5PFLgrCGbhcy6cDXDifNha02J4txTIPOc39x3vVBfDuGZImYCZQMN4sHoubg6/ER TmMy8oowg19G1mRN2QhjdadBYDimMYOs25LXx11CKdTaxbsv+8158HgnlQBNCnJ18ihGUj cQRhTpwGGtkLzOmcs1/iU2oMWA9xrqnaG+DJVddoefVymQgPaxm+xiXLPE9yDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719584008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fqou+m3HxEwi0vowu6DZM3y/329M2WSLNj2K4/e57ag=; b=iwVUCH752q/Wacv7Xmx/tuphv2oVVCAuZsXJnYPBjqyK9NvyWi+kSBOiP121Floo6uScYJ FzUx7F984WcGYQ1Hdqzp38WP39gC7XpT9oUARy0NntdEypWB0OITyAfiir5wkAqy26Qzoo H49ovQt5TB/zt0jzp2z3+1lgpPBrhIgGHyIm/ioxLle4+LJ0ElJrQXzLF2+X5wynnxDiSr M6ti+OnuCz5ZCdDhwWirXbDb4Oy3LTJfxE3oJp0htGSTP6gJzmvG5wRTJc+RykjDmpQIXA nJbSAzmuLff7vOgIt3rLltsIkIYeQkUOkpBBXwzbHlOO+XyQokvqCHZwK/diOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9cqD4yYPzyj7; Fri, 28 Jun 2024 14:13: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 45SEDSM2080215; Fri, 28 Jun 2024 14:13:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SEDScv080212; Fri, 28 Jun 2024 14:13:28 GMT (envelope-from git) Date: Fri, 28 Jun 2024 14:13:28 GMT Message-Id: <202406281413.45SEDScv080212@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: 2eb64df7f53d - main - riscv: remove a redundant check on PGA_WRITEABLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 2eb64df7f53d699f0be5d9ad3828bafee175a606 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2eb64df7f53d699f0be5d9ad3828bafee175a606 commit 2eb64df7f53d699f0be5d9ad3828bafee175a606 Author: wy-chung AuthorDate: 2024-06-26 07:46:32 +0000 Commit: Mitchell Horne CommitDate: 2024-06-28 14:10:57 +0000 riscv: remove a redundant check on PGA_WRITEABLE This is achieved by the preceding call to pmap_page_is_write_mapped(). It appears the second check and comment were left mistakenly when the intent was to remove them. Reviewed by: mhorne MFC after: 1 week Fixes: 638f867814a6 ("(6/6) Convert pmap to expect busy in write... ") Pull Request: https://github.com/freebsd/freebsd-src/pull/1304 --- sys/riscv/riscv/pmap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 377d038a9a8a..781f6b250a18 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -4611,19 +4611,12 @@ pmap_clear_modify(vm_page_t m) int md_gen, pvh_gen; KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_clear_modify: page %p is not managed", m)); + ("%s: page %p is not managed", __func__, m)); vm_page_assert_busied(m); if (!pmap_page_is_write_mapped(m)) return; - /* - * If the page is not PGA_WRITEABLE, then no PTEs can have PG_M set. - * If the object containing the page is locked and the page is not - * exclusive busied, then PGA_WRITEABLE cannot be concurrently set. - */ - if ((m->a.flags & PGA_WRITEABLE) == 0) - return; pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); lock = VM_PAGE_TO_PV_LIST_LOCK(m); From nobody Fri Jun 28 15:00:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9dsy30FKz5Ng23; Fri, 28 Jun 2024 15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9dsy2Y14z4Pqc; Fri, 28 Jun 2024 15: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=1719586854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xR8rZyiYFWBTrT2ENx8e4zelzPqJNjGJ1BYGOXd/XAI=; b=tWvdi3lkKCGY5G92UUsqnMdYH8AbOwOtudrxnJfIDUH64dqM97ReYevO7f6X5CuYfj0Cnj MJdJIU7cTvX7WO2HlRE4eJXPk++OsmlbssyKC8PheDk+zC6fGKHBTkHoUnTlK3ng+2rVHz 9fA1jAX60KYaAD+/xdeSD/uZqWG8qE2ucY9sH4a6N1eCpseZA+aseX66/N6GSZlXAwjTZ3 syBoLDCCBfEXYyvDL7boYk3HVfsPiSvo7em8Gr7dFbU/6PWfd2/LHXbPt7Y97FTds+ADvW trtLOyJ6Pj0gk7RlkLsXmhyMYzDhgJEll3F/3P+WXjtqjTZLyU5h9p1QvVw20A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719586854; a=rsa-sha256; cv=none; b=BcYRDh9O5Y6fhXQjXmJH1n+TDcyK0VUReBeRUPCh728hLZ6VYlTyo0PHZxL7lF4UXNlp3B gjBcn4VOI0YJ3miVP9N3+PC/uaXsvPvog+D0XvAL8OUlAMhd2/eRnSuLOcXFaLNayCcMY0 PyJZ4zAsrpVNG8vzpC83VSri+Qjvby561dNVJpjSy0aHJQUEKO2vyfLAZmugHmXUjAiUqf YwdIe9ODR5yWjENJ6hGGJpQwhJYhZZBHip+tosPLc8xf4iU17huwN2RcVAi51sdOvWzUhV hW7FpmUlZW4dxQpV+q+UXKq6agmNwxT82tiye2PFHXc7shDA1v7wUFaGWmoLGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719586854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xR8rZyiYFWBTrT2ENx8e4zelzPqJNjGJ1BYGOXd/XAI=; b=LOsM1K5XRpoF89zm9d9L50zKPW9oKgSdpPsGXQfBDcyFDCLHnO/K3oHsRmCMoffigdOGvU 0ol2hVoSRBGShIsg2iNKRFlMzprI4f9rxorWqtIPRiOoKvP2n1u34GnyNnySiTndqiiGpC 9hLj5mT130c11DvcHM9Fyefuyx8XtWbNzNl214JaG2chfhhrZS3omYBpSgAMPgKA9WBTnJ 9pAq4gcyrPugRUsKUN1dz3FJf0FkZduBbPepe8t+OIWHQQ6AMa8blWzzRIt4pe55vkRcV+ hjVuJK8cHYBd2LmZz0VlVJiI55XaW+H+fcpxzlGIkdJApnSz5hu4uJKopcFxKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9dsy28v3zym5; Fri, 28 Jun 2024 15: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 45SF0shS057465; Fri, 28 Jun 2024 15: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 45SF0sOZ057462; Fri, 28 Jun 2024 15:00:54 GMT (envelope-from git) Date: Fri, 28 Jun 2024 15:00:54 GMT Message-Id: <202406281500.45SF0sOZ057462@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: fc3e5334ab89 - main - Fix "%hhi" conversion for kvprintf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: fc3e5334ab891eab22a4278384be6f9b74d6d91a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc3e5334ab891eab22a4278384be6f9b74d6d91a commit fc3e5334ab891eab22a4278384be6f9b74d6d91a Author: Sebastian Huber AuthorDate: 2024-06-13 11:01:31 +0000 Commit: Warner Losh CommitDate: 2024-06-28 14:57:39 +0000 Fix "%hhi" conversion for kvprintf() The signedness of "char" is implementation-dependent. Reviewed by: imp,zlei,nightquick@proton.me Pull Request: https://github.com/freebsd/freebsd-src/pull/1290 --- sys/kern/subr_prf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index e291a1fa00a6..4dc989e2d1f1 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -904,7 +904,7 @@ handle_sign: else if (hflag) num = (short)va_arg(ap, int); else if (cflag) - num = (char)va_arg(ap, int); + num = (signed char)va_arg(ap, int); else num = va_arg(ap, int); number: From nobody Fri Jun 28 15:13:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9f8460fyz5NhQF; Fri, 28 Jun 2024 15:13:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9f840VnZz4RNC; Fri, 28 Jun 2024 15:13:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 45SFD0CO018419; Fri, 28 Jun 2024 18:13:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 45SFD0CO018419 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 45SFD0nh018418; Fri, 28 Jun 2024 18:13:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Jun 2024 18:13:00 +0300 From: Konstantin Belousov To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fc3e5334ab89 - main - Fix "%hhi" conversion for kvprintf() Message-ID: References: <202406281500.45SF0sOZ057462@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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202406281500.45SF0sOZ057462@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4W9f840VnZz4RNC On Fri, Jun 28, 2024 at 03:00:54PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fc3e5334ab891eab22a4278384be6f9b74d6d91a > > commit fc3e5334ab891eab22a4278384be6f9b74d6d91a > Author: Sebastian Huber > AuthorDate: 2024-06-13 11:01:31 +0000 > Commit: Warner Losh > CommitDate: 2024-06-28 14:57:39 +0000 > > Fix "%hhi" conversion for kvprintf() > > The signedness of "char" is implementation-dependent. > > Reviewed by: imp,zlei,nightquick@proton.me > Pull Request: https://github.com/freebsd/freebsd-src/pull/1290 > --- > sys/kern/subr_prf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c > index e291a1fa00a6..4dc989e2d1f1 100644 > --- a/sys/kern/subr_prf.c > +++ b/sys/kern/subr_prf.c > @@ -904,7 +904,7 @@ handle_sign: > else if (hflag) > num = (short)va_arg(ap, int); > else if (cflag) > - num = (char)va_arg(ap, int); > + num = (signed char)va_arg(ap, int); > else > num = va_arg(ap, int); > number: Isn't the same fix needed for libexec/rtld-elf/rtld_printf.c ? From nobody Fri Jun 28 16:19:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9gcq3fkYz5Npf0; Fri, 28 Jun 2024 16:19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9gcq2vSZz4Z0c; Fri, 28 Jun 2024 16:19:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719591579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LBYH7RBuWMOvqjCI0CjWHOjWMOb3k/YtsG4mph+tMRI=; b=NdFdJ3eTC6oq/Rzv7YO0kJP/gANiezi1gVWwxw5sW9zRnvMa8VKHjLjqMGPfb/spDNlbnX Ab7V7JKvVrnrtyjp9L7d5QNC1qqhmJMKNT+VhXEz6e8ddNmwiBZ+gLPLBkzAHjwngAOVVV qZiwZbj2DexLZJeSPKXPCG2aZv1LtGvmV31Y6IJM4cILkZegw6nXGIJB8DL4REoKF2q7iG w/6q6t5yfBuL9a13l6kv9E/D2TpWAsFKRGH21qBy5DRsimh+s7xIF9MBAroFrHiZ6LIt7n iiOZe8aSPvSEQrrgi9Ibd2/uwm9T9x1rSXiygHk2Q90ReeOZ61aCMjJ8mX0BWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719591579; a=rsa-sha256; cv=none; b=JioOH6yb7dNurYqQtvwFEJjuFN9oadXE3XkR0ceM1KX3wPZB/Mc+lrtPX+FWZrPvIzgJE6 DtFai0DAYFDmqcnRvqOaIe/sybwPsSAIg+NyeFmP2weiH4DZamjGkkLLDwzaTcdz2dhb9S xR6nT+I9HTEuvRLDIF0XoiKvyzyfLH2TxPH/BqzgE+MSY9vszT28+ptpOmN/Nlx+W2Sfoh 53yly9trp2bI/ldybY23XwWIkN2lTk6SB+H97wg+6vfKd1RnYluKYBrhhMByWabl2nfM7N iwSAmPw3FeSYyEpXWJpREKB7b1Fh2rbxDIoLCH1egSUpeJWrtLP+EKOCkKT92w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719591579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LBYH7RBuWMOvqjCI0CjWHOjWMOb3k/YtsG4mph+tMRI=; b=EixXl74NvKlG3fw7lISXWKVHrv49K/fak1AgJgX8QNNuNmUGxxMbNomPVWELCefVNkb3lB Ebzj95vQ3DE0p3IOLy503nDjzTi3K3Xsgnf9oAfegxo4Y/azx8YgQ6Yq2FuK3oIQusPQR5 62cfI1gSb4zLUC39lr5iZ3fI3l5G4kL65mcW5FrAgTF1eBQCRLigdJL0mPo64vZcmZGLqg yOH5A7DadeMpnYbccQl+WW4DgUqmHncr4PPfwIEox1Jj4x/IqDIfvVsETTnWiONcDvaJiO 9D9HpNRR0Vt8vgFMC/weq4u7yyxRRKeEozFq+pgeKT5NBoTwBBGNdm/vPeB/hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9gcq2Vghz12Vb; Fri, 28 Jun 2024 16:19: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 45SGJdKJ083833; Fri, 28 Jun 2024 16:19:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SGJdeO083830; Fri, 28 Jun 2024 16:19:39 GMT (envelope-from git) Date: Fri, 28 Jun 2024 16:19:39 GMT Message-Id: <202406281619.45SGJdeO083830@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: 5654b42142e1 - main - libusb: claim to be version 1.0.16 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5654b42142e1f689b26d405c90379b85f22349a0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5654b42142e1f689b26d405c90379b85f22349a0 commit 5654b42142e1f689b26d405c90379b85f22349a0 Author: Ed Maste AuthorDate: 2024-06-06 13:33:44 +0000 Commit: Ed Maste CommitDate: 2024-06-28 16:18:34 +0000 libusb: claim to be version 1.0.16 We are not 100% compatible with 1.0.16, but implement some functionality from that version that is required by certain ports. PR: 277799 PR: 279555 (exp-run) Event: Kitchener-Waterloo Hackathon 202406 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45514 --- lib/libusb/libusb-1.0.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libusb/libusb-1.0.pc.in b/lib/libusb/libusb-1.0.pc.in index 7dbf746e773e..3a2f27cc52b8 100644 --- a/lib/libusb/libusb-1.0.pc.in +++ b/lib/libusb/libusb-1.0.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: libusb-1.0 Description: Library that abstracts ways to access USB devices (v1.0) -Version: 1.0.13 +Version: 1.0.16 Libs: -L${libdir} -lusb Cflags: -I${includedir} From nobody Fri Jun 28 16:55:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9hQR2GqCz5Nt8k; Fri, 28 Jun 2024 16:55:43 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9hQR0c34z4dDN; Fri, 28 Jun 2024 16:55:43 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-25075f3f472so74019fac.2; Fri, 28 Jun 2024 09:55:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719593742; x=1720198542; 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=RlDHjKxrUjaTpn9IS6v4rPUNQqJzo9XCA6lX+DEHoWc=; b=vdgP65SSd7P7qxZ8N2368MqOddwS9Sqru6kmrRPrR5bZbTszGvZf5BtbPJuQDHqweX mb/5Z4GVZOI6cax1IAehpQK9QAJPsgC5DkNReBILvyPA14RQNzpxmFK3xfpYxqA9UEbZ 1mTp1vf+dCmuSlxChEYu1UjPQn/I8pBpOlWTnDo5kGlebI2Ab+iCB6ZCWReYMm/cTyiW Rz6P53Ti4a5uv2doUdlz3+SNPsFoUHp9MA1T7RZTidKRGmPieQ0qDm4Qezi2ic0XLnZI 0M0UCF2V1wvad8iGRiyMQTlueoj6jN6ST8jZ+ohQLxrD5hEOvfcurShC2LeNcdYUefKL ZPPQ== X-Forwarded-Encrypted: i=1; AJvYcCXqEjK+BR0LcfRYhhMeS16XNF8PRKhTFXm8kPuRr1ZempPql/Nr/UHpjtnSxkZYDGwbBSXFWIo0oAt4kGU8G4EHIJXLLSGqNq/ALb0jbgn439Fjyx4FfeiNfOkEuI2h8fWCqrNV2R6Qm90HUyw= X-Gm-Message-State: AOJu0YzDT3Vn8bYDiJhGL97zg4lTTQqlH6S53aPC4QZu8A8eaedwNskl 8Fhv94IOiCaWuMrd5GF69gOwN9o/nc8sdEkRHrVe7R6d1Ui44x/8PzqcO41pk/VEPtFai+9i0r3 SvRugJAJ6OmUq73REzH98xUNJWurN4ulj X-Google-Smtp-Source: AGHT+IHQZNo1+qSHsbGYNbHtwTYaxu0VAh3/hNmPwpt45LsSucvXlseSloFOVtFAnuJl58j2Th5n5DnmvoS4QNVr+Qc= X-Received: by 2002:a05:6871:293:b0:254:d417:351f with SMTP id 586e51a60fabf-25ceff4a66amr18811491fac.1.1719593741618; Fri, 28 Jun 2024 09:55:41 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202406281025.45SAPLcL092196@gitrepo.freebsd.org> <748b26fecd710a15fb114d69d443da2f@Leidinger.net> In-Reply-To: <748b26fecd710a15fb114d69d443da2f@Leidinger.net> From: Mariusz Zaborski Date: Fri, 28 Jun 2024 18:55:27 +0200 Message-ID: Subject: Re: git: d3bb35d4e51b - main - jail: allow adjustment of host time To: Alexander Leidinger Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, src-committers@freebsd.org Content-Type: multipart/alternative; boundary="000000000000209794061bf61e43" 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]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4W9hQR0c34z4dDN --000000000000209794061bf61e43 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable W dniu pt., 28.06.2024 o 15:35 Alexander Leidinger napisa=C5=82(a): > Am 2024-06-28 12:25, schrieb Mariusz Zaborski: > > The branch main has been updated by oshogbo: > > > > URL: > > > https://cgit.FreeBSD.org/src/commit/?id=3Dd3bb35d4e51b06488b731071e7841f5= 49bd5d26f > > > > commit d3bb35d4e51b06488b731071e7841f549bd5d26f > > Author: Mariusz Zaborski > > AuthorDate: 2024-06-28 10:23:31 +0000 > > Commit: Mariusz Zaborski > > CommitDate: 2024-06-28 10:23:31 +0000 > > > > jail: allow adjustment of host time > > > > Add a special permission to the jail to adjust and to set the host > > time. > > This can be useful if we want to compartmentalize the NTP daemon > > from the rest of the system. > > Do you plan to add a setting to service jails (rc.subr + > rc.conf-man-page) for this, e.g. > ---snip--- > case "$_svcj_option" in > chtime) > _svcj_cmd_options=3D"allow.adjti= me > allow.settime ${_svcj_cmd_options}" > ;; > ---snip--- > and change the ntpd start script to use it (removing ntpd_svcj=3D"NO" and > adding ntpd_svcj_options=3D"net_basic chtime" ... maybe net_raw is needed > too, TBD)? > > Like this ntpd could be compartmentalized with "sysrc ntpd_svcj=3DYES". > Hello, Yes, I'm going to follow up. Thanks, Mariusz > Bye, > Alexander. > > -- > http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF > http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF > --000000000000209794061bf61e43 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


W dniu pt., 28.06.2024 o 15:35 Alexander Leidinger <Alexander@leidinger.net> napi= sa=C5=82(a):
Am 2024-06-28 12:25, schrieb Mariusz= Zaborski:
> The branch main has been updated by oshogbo:
>
> URL:
> https://cgit.= FreeBSD.org/src/commit/?id=3Dd3bb35d4e51b06488b731071e7841f549bd5d26f >
> commit d3bb35d4e51b06488b731071e7841f549bd5d26f
> Author:=C2=A0 =C2=A0 =C2=A0Mariusz Zaborski <oshogbo@FreeBSD.org>= ;
> AuthorDate: 2024-06-28 10:23:31 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Mariusz Zaborski <oshogbo@FreeBSD.org>= ;
> CommitDate: 2024-06-28 10:23:31 +0000
>
>=C2=A0 =C2=A0 =C2=A0jail: allow adjustment of host time
>
>=C2=A0 =C2=A0 =C2=A0Add a special permission to the jail to adjust and = to set the host
> time.
>=C2=A0 =C2=A0 =C2=A0This can be useful if we want to compartmentalize t= he NTP daemon
>=C2=A0 =C2=A0 =C2=A0from the rest of the system.

Do you plan to add a setting to service jails (rc.subr +
rc.conf-man-page) for this, e.g.
---snip---
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0case "$_svcj_option" in
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0chtime)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0_s= vcj_cmd_options=3D"allow.adjtime
allow.settime ${_svcj_cmd_options}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;=
---snip---
and change the ntpd start script to use it (removing ntpd_svcj=3D"NO&q= uot; and
adding ntpd_svcj_options=3D"net_basic chtime" ... maybe net_raw i= s needed
too, TBD)?

Like this ntpd could be compartmentalized with "sysrc ntpd_svcj=3DYES&= quot;.

Hello,=C2=A0

Yes, I= 9;m going to follow up.

= Thanks,
Mariusz


Bye,
Alexander.

--
h= ttp://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF=
htt= p://www.FreeBSD.org=C2=A0 =C2=A0 netchild@FreeBSD.org=C2=A0 : PGP 0x8F3= 1830F9F2772BF
--000000000000209794061bf61e43-- From nobody Fri Jun 28 18:49:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9ky25bBnz5P6nG; Fri, 28 Jun 2024 18:49:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9ky253D2z4t2G; Fri, 28 Jun 2024 18:49:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719600586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en3BC+vkLw7y+IjUGf3vw8aH0Rsf9MyVLQahsNokaD8=; b=gpjDcdBf5Nq195WyrYoECCU7jd0MF6hRp7+Am1NWAtLIrBAxJi8tinxQHo9EqrJ+kUXpkA hwYiz7+oK7Wnh60o/AmyxdmTdtCPSWvTLkSWgYxFO1iMzIM0MUrZtKgeqS028nRg+eIHhu VVioyNqH7j7jDyuKsYwaEREwC1m6MY3pzBOIIMYDitNLo+d6TRFuZxHelPnpkmEeAKXm9f FlxsXlOWCxM9G2S2QPD0taz69j6aB4Qdp6f6uED6DymKg4Y+EfvB861mDD7cy31ECwmHjx 08NM/6XnMmKyTfxn6QtgBAOQ/GUzPYCYdwlKYFIg3DSK8ELusX31Ssc29zINcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719600586; a=rsa-sha256; cv=none; b=sw2JXkQDVfNiSi1N7WTzptjjwqSiz+fIgkLCPPCygc5srzgxokwi7y4Ia8lVVOtOfVv2hq lpMG/l81hpRmZ8MhHuf0RARiBEv86BVLGD3AAVYduxHEC57x9BSvEJa4p1SG6wWPKjvBhX 8VtSqpUNFg4Gzz9J1p4lX0JqYeqzA6JzteYTrfP/X7mL5P6EezE2MphHcVdl4fwr0r4CpR sAqmKCA1m4Gokc89kcfnSrK6FrA7zsHUCqQVo65bgEC4sDN1Ficwm5oEOIV964TIoFdH/6 SO1OGCg4Wwa4XEpXpqlTfiDbuuUP8EG/7gG45CN3LC3x+gmoG2TS3t+6gGnXVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719600586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en3BC+vkLw7y+IjUGf3vw8aH0Rsf9MyVLQahsNokaD8=; b=uDp/tqi3kUasSiXMY7AFmDM65KZoZry7g/zXiqsnFEwS1ElVHrdkOSF0UxjmlEJWxucZcK Ug0XdYp1utwRbtDw6AtuOaEHkxDSUc2jh+GZV2Ch0STo+SXH5u3ELGqwiZrBd7+OPAgGjI EXPpICQZgMNqvZAZeNTNzEpHdpD+i6DiJb2pvj7Wb/pYLD3RVlSUtGJ1ifRkC97gJVG06H NipzpMZ59VwW8XngATgv/CeQfDWRXg19Fey3VAaFMaPxt1rodu6Ay7Drj58CJusult8+aO z071VxLSnwn1I2ycvsuuN/HugRZXDB8IYgP6CVMI8f6jhpPdzaPrcUaToJc6zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9ky24fXMz16XF; Fri, 28 Jun 2024 18:49: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 45SInkEs036231; Fri, 28 Jun 2024 18:49:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SInkSD036228; Fri, 28 Jun 2024 18:49:46 GMT (envelope-from git) Date: Fri, 28 Jun 2024 18:49:46 GMT Message-Id: <202406281849.45SInkSD036228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 51bee6ab6535 - stable/13 - geli.8: minor proofreading List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 51bee6ab65358a261858778d57c2fbd69fb181ce Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=51bee6ab65358a261858778d57c2fbd69fb181ce commit 51bee6ab65358a261858778d57c2fbd69fb181ce Author: Alan Somers AuthorDate: 2024-04-22 21:11:09 +0000 Commit: Alan Somers CommitDate: 2024-06-28 18:49:18 +0000 geli.8: minor proofreading Sponsored by: Axcient Reviewed by: imp, pauamma (manpages) Differential Revision: https://reviews.freebsd.org/D44907 (cherry picked from commit c0f02dcd4c9c17181c59fa3c43259cce793a0b21) --- lib/geom/eli/geli.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/geom/eli/geli.8 b/lib/geom/eli/geli.8 index c378c591290c..501b948fde49 100644 --- a/lib/geom/eli/geli.8 +++ b/lib/geom/eli/geli.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2022 +.Dd April 20, 2024 .Dt GELI 8 .Os .Sh NAME @@ -867,7 +867,7 @@ If set to 0, a CPU-pinned thread will be started for every active CPU. When set to 1, can speed-up crypto operations by using batching. Batching reduces the number of interrupts by responding to a group of crypto requests with one interrupt. -The crypto card and the driver has to support this feature. +The crypto card and the driver have to support this feature. .It Va kern.geom.eli.key_cache_limit : No 8192 Specifies how many Data Keys to cache. The default limit @@ -884,7 +884,7 @@ Reports how many times we were looking up a Data Key and it was not in cache. This sysctl is not updated for providers that need fewer Data Keys than the limit specified in .Va kern.geom.eli.key_cache_limit . -.Va kern.geom.eli.unmapped_io +.It Va kern.geom.eli.unmapped_io Enable support for unmapped I/O buffers, currently implemented only on 64-bit platforms. This is an optimization which reduces the overhead of I/O processing. From nobody Fri Jun 28 18:53:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9l2q6p95z5P6sR; Fri, 28 Jun 2024 18:53: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9l2q6C2wz4vDF; Fri, 28 Jun 2024 18:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719600835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyLXDbEN0xi1TWMJN6pHkyRe7zFzXxkb+TgR4U2wuV0=; b=PIcyjchBUkfXp9YfdNyBSz3xu85+3SEKxcZVjVNRMV3oYkUn2svgoo7sUAXn9LSoKXaxnC 5om9WZbX2iUaNYFtm0jCHmwIMxznJbXZGQF2mGdcJfkyqROfWIdaM5ZQvbA6lHxPuoLtJP AAGKiIPDwSfg4vj9I4w+k+PWaXfYxIAML68bLzu3EN9RzeWudQKr20K+mLV6lLl243+14H 3YTv6076+AMV8GMXRgCQw3GiyQ0+3MsBUs4ibjLTAbgJ8MF8+rC3B7qsIBY8NI3nAiLGTL z3rBYEQdC5h/+DBNQFDutdAH6Z5+cMd6rLOEXCUgctOyptTi6ePb8O/07WvQvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719600835; a=rsa-sha256; cv=none; b=OMfot7m+gtBYduWk7ohtoOqZ/W/uE1UyuGT222xBKz15aEvF3+SOUAPeV+uqYntaypKcpx NzqYrqTwzsJS3a07jn7uHWxabMCh6X6dtnUkl3SiUh4fy3E2lQ66Kjf0ZqThpYuuifR85z OptIj/N5pbyLmBh8ucwZhnA+Km7qiw9zTcANwOrGHxY85n5llLxK9gwtawZCo6QHv/WqkX vyrW0MRO5CIWRNY0omYoQZgMGlyQtWrcfNZcv/KKvZ7kEBefX3NYD0uBG/BP36CW5EjSui 8DUGGwXNLEbTyo8c9FLeopfw//x06RyNDMZoRTgAvuVfP5UR3zrZY/CQHF6B4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719600835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyLXDbEN0xi1TWMJN6pHkyRe7zFzXxkb+TgR4U2wuV0=; b=hcZgmOx+bGjzObooS29PTTvhKWrUNwSCim8GZmn1b+DbC/9kEHF8AV3p9+xx0616dymlkd 8FYy4SA+g0nIPLyXRJtarN2a4Z+psLD3val6lNV5Y9Xab63KJSVNDqkh5vtkHcYe4xTGAv pF7ZXZtJUwt6JzeqV9wE+a4XZUmBIpWY5UURKIKpbOEIcu6RSlQ0GkmF1WN66PpFk+J3S0 IBwTOLmcx4FdHOiGRCJLEIxv9sRaSksVnC+GCsYV1CbbcNN2lsVoKsm9WHTgvPpnL0yMF2 XiA8vxVT9l03HDrDtS4uUGTrGVyOz9INFBN+5bDCQU33ADsCVfJReDV91BFthw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9l2q5pWXz16mY; Fri, 28 Jun 2024 18:53: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 45SIrt1w052532; Fri, 28 Jun 2024 18:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SIrt2K052529; Fri, 28 Jun 2024 18:53:55 GMT (envelope-from git) Date: Fri, 28 Jun 2024 18:53:55 GMT Message-Id: <202406281853.45SIrt2K052529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 4052c952803f - stable/13 - tests/fusefs: fix all tests that depend on kern.maxphys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4052c952803f2ba33bb26e13aeeaf9c0651e3702 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4052c952803f2ba33bb26e13aeeaf9c0651e3702 commit 4052c952803f2ba33bb26e13aeeaf9c0651e3702 Author: Gleb Smirnoff AuthorDate: 2024-05-06 19:03:20 +0000 Commit: Alan Somers CommitDate: 2024-06-28 18:52:07 +0000 tests/fusefs: fix all tests that depend on kern.maxphys The tests try to read kern.maxphys sysctl into int value, while unsigned long is required. Not sure when this was broken, seems like since cd8537910406e. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D45053 (cherry picked from commit e9b411d273336647e61704213964b995952a44fd) --- tests/sys/fs/fusefs/bmap.cc | 12 ++++++------ tests/sys/fs/fusefs/read.cc | 2 +- tests/sys/fs/fusefs/utils.cc | 13 ++++++------- tests/sys/fs/fusefs/utils.hh | 2 +- tests/sys/fs/fusefs/write.cc | 5 +++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index fae5aabee471..06342e7cc23b 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -105,8 +105,8 @@ TEST_F(Bmap, bmap) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, pbn); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf - 1); leak(fd); } @@ -142,7 +142,7 @@ TEST_F(Bmap, default_) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, 0); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1); EXPECT_EQ(arg.runb, 0); /* In the middle */ @@ -152,8 +152,8 @@ TEST_F(Bmap, default_) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE); - EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1); /* Last block */ lbn = filesize / m_maxbcachebuf - 1; @@ -163,7 +163,7 @@ TEST_F(Bmap, default_) ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE); EXPECT_EQ(arg.runp, 0); - EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1); + EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1); leak(fd); } diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 90516a2f7c8a..df2ca2380f00 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -1339,7 +1339,7 @@ TEST_P(ReadAhead, readahead) { expect_open(ino, 0, 1); maxcontig = m_noclusterr ? m_maxbcachebuf : m_maxbcachebuf + m_maxreadahead; - clustersize = MIN(maxcontig, m_maxphys); + clustersize = MIN((unsigned long )maxcontig, m_maxphys); for (offs = 0; offs < bufsize; offs += clustersize) { len = std::min((size_t)clustersize, (size_t)(filesize - offs)); expect_read(ino, offs, len, len, contents + offs); diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index 55a552e28eeb..831ded0c0815 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -130,8 +130,7 @@ class FuseEnv: public Environment { void FuseTest::SetUp() { const char *maxbcachebuf_node = "vfs.maxbcachebuf"; const char *maxphys_node = "kern.maxphys"; - int val = 0; - size_t size = sizeof(val); + size_t size; /* * XXX check_environment should be called from FuseEnv::SetUp, but @@ -141,12 +140,12 @@ void FuseTest::SetUp() { if (IsSkipped()) return; - ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &val, &size, NULL, 0)) - << strerror(errno); - m_maxbcachebuf = val; - ASSERT_EQ(0, sysctlbyname(maxphys_node, &val, &size, NULL, 0)) + size = sizeof(m_maxbcachebuf); + ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &m_maxbcachebuf, &size, + NULL, 0)) << strerror(errno); + size = sizeof(m_maxphys); + ASSERT_EQ(0, sysctlbyname(maxphys_node, &m_maxphys, &size, NULL, 0)) << strerror(errno); - m_maxphys = val; /* * Set the default max_write to a distinct value from MAXPHYS to catch * bugs that confuse the two. diff --git a/tests/sys/fs/fusefs/utils.hh b/tests/sys/fs/fusefs/utils.hh index 383f01ea4bfe..506e8a985212 100644 --- a/tests/sys/fs/fusefs/utils.hh +++ b/tests/sys/fs/fusefs/utils.hh @@ -77,7 +77,7 @@ class FuseTest : public ::testing::Test { public: int m_maxbcachebuf; - int m_maxphys; + unsigned long m_maxphys; FuseTest(): m_maxreadahead(0), diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 9412d68603de..9d152aeb0617 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -184,7 +184,7 @@ virtual void SetUp() { if (m_maxphys < 2 * DFLTPHYS) GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS" << " for this test"; - if (m_maxphys < 2 * m_maxbcachebuf) + if (m_maxphys < 2 * (unsigned long )m_maxbcachebuf) GTEST_SKIP() << "MAXPHYS must be at least twice maxbcachebuf" << " for this test"; } @@ -860,7 +860,8 @@ TEST_F(WriteMaxWrite, write) ssize_t halfbufsize, bufsize; halfbufsize = m_mock->m_maxwrite; - if (halfbufsize >= m_maxbcachebuf || halfbufsize >= m_maxphys) + if (halfbufsize >= m_maxbcachebuf || + (unsigned long )halfbufsize >= m_maxphys) GTEST_SKIP() << "Must lower m_maxwrite for this test"; bufsize = halfbufsize * 2; contents = new int[bufsize / sizeof(int)]; From nobody Fri Jun 28 18:59:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9l9T2cjqz5P7b3; Fri, 28 Jun 2024 18:59: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9l9T22Czz4vT5; Fri, 28 Jun 2024 18:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719601181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZjxaS8kAgmgHgshhFQeE/O/0g3GxeoFQq1pdSchZII=; b=iYyu7q8Gr5ebzQvHvNd/gglJkkFhvjBI5lnAFjocxkW5Zj4gTF8R/gwEFvND+6GSVp5NiS WcJxIfS1TioxcDer/MkTVZpqsQM3aNoIbjsld7sBY+AKI0qDa4Eh5SrDjKN7PDq/kZUN4o glhf6xBneSvujD+h9b6BYIduozJ1brtyD/Xjh6fRUToW0aj5gmcz8mzxTP+hMxKFqREHsE DAbgaAD5mRqw5BDfS8rPnovm7PD8Mj3rzrDXLP965YmTArsI8UEZcOm5W/amCkuhv7byOd LoTsnTXillLCaPeTTYfJxSeQxTSCgEZ3F/9bjEmLExR0xKWYyXixmU1ekDHutQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719601181; a=rsa-sha256; cv=none; b=K+9BG5bo2EuQn8ZoLvCiPSc65YAPZii3uiiDHzEXU3WtUnizsHcaBr7hEfk5cxffmP4Rm3 Q3wG2HMYb6vy6K+Yy9uyqdzhpNxkbcOFO+YUnWJn37ixTb57s9kE1FjMz/dGyL0x8LwGYG UN0x4xvOBGCXkb472ARJbNdXRW6CFQLRkYSbADSKy67On8DrPbBS9y60hKjccXqLwENvTe 9Tyjt3SJlPrZwf/Gkhuhn7WfFIO5Bqn3zHTcrryKKoAoT+Cm1K3p2+2apJy1w5Qe0ouE3u 2wGB9fq5wzr+eTwePE/JkKuSMqs1ydXeNu792RxAUfw1VEnrSE4HkwzOD/OZCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719601181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZjxaS8kAgmgHgshhFQeE/O/0g3GxeoFQq1pdSchZII=; b=N76xOGN4fYLvCCNoRGsA5olagYomwBKDNWT3SPOnfOENb51tA3/3eF/8Qo6oOiIBRx2SMp atL/H6fDSG23RJ5kLyiK98wT7LPEZyyaNuEJRbrZghV7SKV3BM16c80tDr1ZLK+uwo7Upc XPf9G9LJYo2S2yQB+AT5+5p9ep8d35NKOy48dpgTK7PwQo7HTEbpv+/CNMJphSSxNDDZsV G4K2RzUAHngULXRy+kP9uHsUyNJaJzJv+mK1bTf0BN3xoC4qzjH5StzXCfCe/5HBbOiM6n NsoSlDkf8AmroAL8pjTDz3rJhVfuhp5dFCGIB35PnJCBlSFfC1Bgc4MJhlgFNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9l9T1Bg0z16xh; Fri, 28 Jun 2024 18:59: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 45SIxfcq053482; Fri, 28 Jun 2024 18:59:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SIxfMl053479; Fri, 28 Jun 2024 18:59:41 GMT (envelope-from git) Date: Fri, 28 Jun 2024 18:59:41 GMT Message-Id: <202406281859.45SIxfMl053479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: af64741bba63 - stable/13 - fusefs: make the tests more robust to changes to maxphys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: af64741bba6391a765294a41fe43030d4f242e4b Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=af64741bba6391a765294a41fe43030d4f242e4b commit af64741bba6391a765294a41fe43030d4f242e4b Author: Alan Somers AuthorDate: 2024-05-09 14:40:21 +0000 Commit: Alan Somers CommitDate: 2024-06-28 18:54:00 +0000 fusefs: make the tests more robust to changes to maxphys Remove assumptions in two test cases that maxphys won't be huge. Reported by: kib Sponsored by: Axcient (cherry picked from commit b2792a300ddb8d8334b234fe7744f5141cc96103) --- tests/sys/fs/fusefs/bmap.cc | 17 +++++++++++++---- tests/sys/fs/fusefs/write.cc | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index 06342e7cc23b..8e9268058e96 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -77,8 +77,6 @@ class BmapEof: public Bmap, public WithParamInterface {}; /* * Test FUSE_BMAP - * XXX The FUSE protocol does not include the runp and runb variables, so those - * must be guessed in-kernel. */ TEST_F(Bmap, bmap) { @@ -105,8 +103,19 @@ TEST_F(Bmap, bmap) arg.runb = -1; ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno); EXPECT_EQ(arg.bn, pbn); - EXPECT_EQ((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf - 1); - EXPECT_EQ((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf - 1); + /* + * XXX The FUSE protocol does not include the runp and runb variables, + * so those must be guessed in-kernel. There's no "right" answer, so + * just check that they're within reasonable limits. + */ + EXPECT_LE(arg.runb, lbn); + EXPECT_LE((unsigned long)arg.runb, m_maxreadahead / m_maxbcachebuf); + EXPECT_LE((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf); + EXPECT_GT(arg.runb, 0); + EXPECT_LE(arg.runp, filesize / m_maxbcachebuf - lbn); + EXPECT_LE((unsigned long)arg.runp, m_maxreadahead / m_maxbcachebuf); + EXPECT_LE((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf); + EXPECT_GT(arg.runp, 0); leak(fd); } diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 9d152aeb0617..0b93369ad66d 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -179,7 +179,7 @@ class WriteCluster: public WriteBack { public: virtual void SetUp() { m_async = true; - m_maxwrite = 1 << 25; // Anything larger than MAXPHYS will suffice + m_maxwrite = UINT32_MAX; // Anything larger than MAXPHYS will suffice WriteBack::SetUp(); if (m_maxphys < 2 * DFLTPHYS) GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS" From nobody Fri Jun 28 18:59:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9l9V2kwyz5P7dH; Fri, 28 Jun 2024 18:59: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9l9V2DGzz4vT6; Fri, 28 Jun 2024 18:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719601182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KjSF6WzImV5FF+DxoumCeVoogbTBkQbVcD53TFTwuw0=; b=OM78qRm8vrFLFTBmh+O/CO98mAPv7BH/H0Rs7ovs1cxotG12aGnXWuAME9WLzSbQOi4hrS tNOADswbrBPzyaGYFcDTpqXigW02aY6jX11XD1aTigRbzeOMHsFwxbbh6wYMj7GXRpjgdQ hnNYov2YT+ESqM9B0w0zPgwNm9CkZsyI6bYqyVt+KsVOFEsZm07EbTHZwLCBws7pV3GR8l xMYvjv99I5lSpX27pf0PujJWkofLsxLMaSM3sQuK+CNCQdQ4uWAv7E02cR7pRZd9nhzU2X xv0WA/x3SV0Vi/xpAbEyum/3T3PDwgWYurEdxgdYP0pWj64K6MWpv+6TQz0nCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719601182; a=rsa-sha256; cv=none; b=QXpv8bEO4i8GCtgtPMpVFzoBZWBwjDHxUiZWCQmzbbVdCGOdL0XeLzkXF2/oIjeOrvphpl lvLrZN+WG4MOJTK3T1jnNCAj6hy7AhNm8MOwAtlonUhocLCJsZ1f29vB9YxXT4CfClD3mT zE3U5dZ6wJHmTkBMleICEJITwkZpN8i8wxOZyEvEeQlHFwsJ+uJ0ZHIgpEDQnVu99yyV3L OldkakTWLX9/9knxEc2khSoojCZR6S5TS+cSZLbSy6yzz5UHv5AkCftwZHkTwQ1CC02vZO zeG6m48c28cpX4Aehlrl1CGJawJLCQAxtgMo8HtDp/zYNBxfZuwGNoo67EMZnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719601182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KjSF6WzImV5FF+DxoumCeVoogbTBkQbVcD53TFTwuw0=; b=dwKzu1I3X7gjSfbdk9vLDR5GCo86pzaaiuuKaPOinzZfpLDhgfR887A6qkdu6cvL626Qfl MdcU6liTFkpPZTyR5ssPcN9QtS974tc2mA2By2wV2hysI1kyn80GRJcBsG8vZVAUqM7k6q MiXAw2JxRzpFRgZhS5vyYqVzQ7IPaBKf2RzTgLN0tG4OWejiMmNfv5flbWVI+ExTlmX7L4 aKglTDPQ4FNmjrbcP3uDSw6gO76d9gAt0i7a1PyeW7rpY8JP7BswtUXiJfe+1T/9ixmABs 1JE/KqhN+WeQSnjOBFBAIJFF530BDfzgL3P7pXU63WSfUrjCMtSfnDOyyj5irw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9l9V1rJ5z16Jp; Fri, 28 Jun 2024 18:59: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 45SIxgmv053518; Fri, 28 Jun 2024 18:59:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SIxg5M053515; Fri, 28 Jun 2024 18:59:42 GMT (envelope-from git) Date: Fri, 28 Jun 2024 18:59:42 GMT Message-Id: <202406281859.45SIxg5M053515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 43d29dceeabe - stable/13 - vfs_getopt(9): fix 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 43d29dceeabe26f01fb449ec8fe5270302f7a8d1 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=43d29dceeabe26f01fb449ec8fe5270302f7a8d1 commit 43d29dceeabe26f01fb449ec8fe5270302f7a8d1 Author: Alan Somers AuthorDate: 2024-05-19 15:49:03 +0000 Commit: Alan Somers CommitDate: 2024-06-28 18:56:11 +0000 vfs_getopt(9): fix typo [skip ci] Reported by: Claudiu (cherry picked from commit 3cc1b35bc1bdcdee279b3ee7d0e0946b684df898) --- share/man/man9/vfs_getopt.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man9/vfs_getopt.9 b/share/man/man9/vfs_getopt.9 index 0e68655f540f..ff0f027314c7 100644 --- a/share/man/man9/vfs_getopt.9 +++ b/share/man/man9/vfs_getopt.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 31, 2011 +.Dd May 19, 2024 .Dt VFS_GETOPT 9 .Os .Sh NAME @@ -46,7 +46,7 @@ .Fa "struct vfsoptlist *opts" "const char *name" "void **buf" "int *len" .Fc .Ft "char *" -.Fn vfs_getops "struct vfsoptlist *opts" "const char *name" "int *error" +.Fn vfs_getopts "struct vfsoptlist *opts" "const char *name" "int *error" .Ft int .Fo vfs_flagopt .Fa "struct vfsoptlist *opts" "const char *name" "uint64_t *flags" "uint64_t flag" @@ -177,7 +177,7 @@ function returns 0 if the option was found; otherwise, is returned. .Pp The -.Fn vfs_getops +.Fn vfs_getopts function returns the specified option if it is found, and is .Dv NUL terminated. From nobody Fri Jun 28 18:59:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9l9W4g9Wz5P7dM; Fri, 28 Jun 2024 18:59: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9l9W3Km9z4vWK; Fri, 28 Jun 2024 18:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719601183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sBl4ISJKjvvhrf8Dht+CEWUB5g05tk1WBKUZGxf7hZw=; b=xYSyo9jw/OelwZ6a51/i/rp+muxrUEmU5GXTJk38dRhBTqgUMB1Ysj3DlkByaRhOP0Hp3P NF0GjSexDZO3TrF5pOhxMtnEhlNE/4lY+pVp1EDsisSL1IsenHGtQh+TNhthqVWHw9pFyg Fx2VAIYkt1bOmjV9xCzA/NM2dUOFVpcvMv3bpEbQNEvc3rYAsYt5d2zZvKmsFfMna+029z 2M3tLJLeu11AedGuFHWbLWBOOfDhq55qm4dV0uOUmhvyYESSbearuPiFV8Hfi1yEyHLxA/ PbwgSoFGCbrncQJQfiFReMbtGIHn32IeBofBLX0/nQa3OZrD9cDBeipk5m/sTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719601183; a=rsa-sha256; cv=none; b=onAJU5wW1XxiqabvRTSr/8OVSJUMMIp/Eo92GfsBQUbFI8/YhzShKJAJBqZ/Hw8NqLLtA+ ShD+xSpUQlp97KepCDhlSHCvVr46sXj+w7MfFbwFD9cpZvF2g4K3LH6XszaI52NctKPqw0 YAQj7X6oRS1Z0oRZB6sUwX2XranwrZt0U8u9e2FbRSxjxsma8zjIiHoezoEWhDDNwrAG+T t6pt3OPuCvqkBi7UBPLDAupUWARk3MaRKkGmSOsM+EDfsdY81YDPv0EsaL7zDmzHdNu5Jr 2cQrCtLorFKOyQkSeK0efvWK1fwmvrVcSM7eeT5Nk/FqHAmYSLbGI3C10hTf/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=1719601183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sBl4ISJKjvvhrf8Dht+CEWUB5g05tk1WBKUZGxf7hZw=; b=oC6J/y3F437bLRz5iWSpUijELrpJOaWheD/5y1KcaZH7cpqz6vD0vPyY5H0qILRceVo1DK DoA7iS/16SDX8ohUCdVEf+iaabbNLXku+WPSd6YURXJXqw96KUo0CHk7xisL+0lzVF5kR1 8BbjtrfMCQ3wCat1hIuTYMv7HYWdypVA0gOpsU/3pys+TnXq1irJTlhSf9TlCvAFc4MgH5 6NjxatvwwTD5gVSz3Uhfm1I/TIN9ja8TIgMA/N/NyIuifraO2jbPnDZbrFXZRnKPO0z02L Vlf+jb2dJB3hhxPw5yz5mzsm3ZHnv6EZ8orjYCwt7f+YF05fi1YsVC/Tm59mOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9l9W2tFFz16CK; Fri, 28 Jun 2024 18:59: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 45SIxh89053566; Fri, 28 Jun 2024 18:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SIxhgl053563; Fri, 28 Jun 2024 18:59:43 GMT (envelope-from git) Date: Fri, 28 Jun 2024 18:59:43 GMT Message-Id: <202406281859.45SIxhgl053563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 1cc56f881fde - stable/13 - mdconfig: fix cleanup in the attach_size_rounddown test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1cc56f881fde26f7ade811bd2fd5ce5c3f300069 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1cc56f881fde26f7ade811bd2fd5ce5c3f300069 commit 1cc56f881fde26f7ade811bd2fd5ce5c3f300069 Author: Alan Somers AuthorDate: 2024-05-31 21:18:25 +0000 Commit: Alan Somers CommitDate: 2024-06-28 18:56:38 +0000 mdconfig: fix cleanup in the attach_size_rounddown test Sponsored by: Axcient (cherry picked from commit d1bd097d52cb5f8b0484e1f22c5506846f4ed304) --- sbin/mdconfig/tests/mdconfig_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mdconfig/tests/mdconfig_test.sh b/sbin/mdconfig/tests/mdconfig_test.sh index 9aaf724206b1..655b7fd63b40 100755 --- a/sbin/mdconfig/tests/mdconfig_test.sh +++ b/sbin/mdconfig/tests/mdconfig_test.sh @@ -291,7 +291,7 @@ attach_size_rounddown_body() -x "mdconfig -r -u ${md#md} -s ${ms2}b" check_diskinfo "$md" 16384 2 $ss } -attach_size_rounddown() +attach_size_rounddown_cleanup() { cleanup_common } From nobody Fri Jun 28 19:25:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9lkx0667z5PBDr; Fri, 28 Jun 2024 19:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9lkw6LC9z3ymS; Fri, 28 Jun 2024 19:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719602712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xKIUdiXfTFtJdFrYxerHs3VCoLdoMAL7HG+GUACTZsY=; b=RLQef9XOgJKnFYLfDIpdLE8erU7xMca+GVrw0v9x6KkDR86ZyvnM4iw1yc+GzbFhpbyxEQ UkP/EyeEGgOB1qKTrdLx/55trAZiFupIBWKKfti11y80jRNlo7Q3daMoCaHzc1JRRxZfCr WeUqa892kkJhNQT2hFz8q0ACvylrmPqe7f8TLTHwY6aQnEVAcUD40eNn/tL5QPyacxbH/3 cVCxkCKTM/KUvm3VvUJdRXt+KfErG9cD7X9ZXpai9BCJspwpmWvM6Z6U6AOMsLxY0Uq6A6 sK3rbswC0yDcGe4AqIRbJFz7hkwM2Xl9aB3jTxd+UEF+2BComF6vObGkZRR0dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719602712; a=rsa-sha256; cv=none; b=EjS4zVxIfwiXJfbteixFL3Qfs0VLST8fEtL8snwNICEZstbrdsXsxGsO1bMulBcZW2kNgC GZ3xUgapmsnd0/EeSn5CmyrgvznYek2vjyr11Wnd9isBSi7Xugm9Nqrchp6SjWm2lVUA5g Wcx/675LQPwITh9DXDZH9m0kqdxsVrAv/KJsVhCmAj4ci8UgcQTjuDpMk+Chetv2RuWb2t ciGnoCoOhnpSKGymu89rJiyUPQ7S+1xXSGOkWVJion2l2X0v+Xaw5BQn+Ow453kT301OzJ /GcDkUIbI05y4LY0ZuCMWa0yL0xoTPzk/IxI5v71Ry2Lz6B+yreyljou/pricg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719602712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xKIUdiXfTFtJdFrYxerHs3VCoLdoMAL7HG+GUACTZsY=; b=trkzi9pK9rCt6twhW/nR/ozOoJHJNNftA6I4ItJu45kXBBKHgqDhB/ov0FTxqv981u1Cc0 p3pfAiX5/JPm1Nl8HmuwYY933nytzeOUECNYgea9zY+L44Tufxg7M0VqIUHS/NiB14Vkg9 iOLi+Me0fX9Zm7GAkfMkYuWBR1Jkujb6zW+mr+vRVTLaASaQe1fZSuiKaYUFifrDB8rZOQ cOlqiFQrbZIruUJ3cokFB952bib8wx6X5VydpaqoqkL/2trCZbDSpDfhDBA92G3eqza8mU 7KcLr9BQL/aXE3PjwqWikbrjzB9Xmismvf8cLSRX1QNzCSOtB6mWP9ac6i1Z1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9lkw5q0kz17YK; Fri, 28 Jun 2024 19:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45SJPCLs003968; Fri, 28 Jun 2024 19:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJPCew003965; Fri, 28 Jun 2024 19:25:12 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:25:12 GMT Message-Id: <202406281925.45SJPCew003965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 4451b1de2179 - stable/13 - ctladm.8: fix several errors in the "port" section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4451b1de2179cc554489207e6456aaf3252b1e16 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=4451b1de2179cc554489207e6456aaf3252b1e16 commit 4451b1de2179cc554489207e6456aaf3252b1e16 Author: Alan Somers AuthorDate: 2024-06-05 20:13:04 +0000 Commit: Alan Somers CommitDate: 2024-06-28 19:00:41 +0000 ctladm.8: fix several errors in the "port" section * Document the "-d" option. * Add the "-c" and "-r" options to the summary. * Correct the list of required options. * Clarify that the "-t" option is only for use with "-o", "-w", and "-W" * Replace references to the nonexistent "-n" with "-p". Also, fix a few related error strings in the ctladm command. Sponsored by: Axcient Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45503 (cherry picked from commit 60107d23d8f2c05f418c024000a31a6148d2f7de) --- usr.sbin/ctladm/ctladm.8 | 32 ++++++++++++++++++++++++++++---- usr.sbin/ctladm/ctladm.c | 7 ++++--- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8 index ba2712cb278c..4e7288dac6b6 100644 --- a/usr.sbin/ctladm/ctladm.8 +++ b/usr.sbin/ctladm/ctladm.8 @@ -35,7 +35,7 @@ .\" .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" -.Dd December 27, 2023 +.Dd June 5, 2024 .Dt CTLADM 8 .Os .Sh NAME @@ -162,6 +162,7 @@ .Nm .Ic port .Op Fl c +.Op Fl d Ar driver .Op Fl o Ar on|off .Op Fl w Ar wwpn .Op Fl W Ar wwnn @@ -591,6 +592,10 @@ The serial number is returned when the error is injected. Perform one of several CTL frontend port operations. Either get a list of frontend ports .Pq Fl l , +create a new frontend port +.Pq Fl c , +destroy a frontend port +.Pq Fl r , turn one or more frontends on or off .Pq Fl o Ar on|off , @@ -600,6 +605,8 @@ or World Wide Port Name .Pq Fl W Ar wwpn for a given port. One of +.Fl c , +.Fl r , .Fl l , .Fl o , or @@ -612,6 +619,18 @@ combined with enabling/disabling or listing ports. .Bl -tag -width 12n .It Fl c Create new frontend port using free pp and vp=0. +.It Fl d Ar driver +Specify the name of the frontend driver used by the +.Pq Fl c +or +.Pq Fl r +subcommands. +Valid driver names include +.Dq ioctl , +.Dq iscsi , +and +.Dq nvmf , +but more can be added by external kernel modules. .It Fl o Ar on|off Turn the specified CTL frontend ports on or off. If no port number or port type is specified, all ports are turned on or @@ -626,7 +645,12 @@ The port numbers can be found in the frontend port list. Remove port specified with .Pq Fl p Ar targ_port . .It Fl t Ar fe_type -Specify the frontend type. +Specify the frontend type used by the +.Pq Fl o , +.Pq Fl w , +and +.Pq Fl W +subcommands. Currently defined port types are .Dq fc (Fibre Channel), @@ -640,7 +664,7 @@ and .It Fl w Ar wwnn Set the World Wide Node Name for the given port. The -.Fl n +.Fl p argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWNN should be the same across all ports on the @@ -648,7 +672,7 @@ system. .It Fl W Ar wwpn Set the World Wide Port Name for the given port. The -.Fl n +.Fl p argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWPN must be different for every port in the system. diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 1384daed74a2..1cf42aa5933b 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -541,7 +541,7 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) * we'll throw an error, since that only works on one port at a time. */ if ((port_type != CTL_PORT_NONE) && (targ_port != -1)) { - warnx("%s: can only specify one of -t or -n", __func__); + warnx("%s: can only specify one of -t or -p", __func__); retval = 1; goto bailout; } else if ((targ_port == -1) && (port_type == CTL_PORT_NONE)) @@ -625,7 +625,7 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) } case CCTL_PORT_MODE_SET: if (targ_port == -1) { - warnx("%s: -w and -W require -n", __func__); + warnx("%s: -w and -W require -p", __func__); retval = 1; goto bailout; } @@ -674,7 +674,8 @@ bailout: return (retval); bailout_badarg: - warnx("%s: only one of -l, -o or -w/-W may be specified", __func__); + warnx("%s: only one of -c, -r, -l, -o or -w/-W may be specified", + __func__); return (1); } From nobody Fri Jun 28 19:25:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9lky0FDfz5PB1y; Fri, 28 Jun 2024 19:25: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9lkx6bxQz3ymT; Fri, 28 Jun 2024 19:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719602713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5k/G33uduVnOlEJ2HoWYtSj7a+a9SHv2OB6f1kDL3oE=; b=vHy2msbQA6aKdct1zNIeVOUIi0Q0Nq6aqRb3v1szy93eGY1Q5HRRgihd2lcWT+vVwXzW7A rqKXp9X4x1SONGKFHCg9VNk9C8teWOroWFLLCaLGKghRkkGmFHss5X+To/Sd7NobY9PB3H xAdBT2Y70OsIUC1F9EWw/fQP0UGa+4Z+AIOwelbJHBW/4wUfxfVKFu07exZumbslNeGUgF CXv4fIkYJmEBJrkio0uNEKL/mfIRoeOBTk3UOD2lAjWHeZ41zwNM5U796l59wH1gvbJVCF ZK2ll7Kr5MvPt2+WHXriwikWJNAd9v/FwmSU2a4dPo9yiGmP2wzoAh2M5ombRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719602713; a=rsa-sha256; cv=none; b=NSpExN40wlqWWlI94hTm3aFFGeZCoh34nb4wngeIFh+0x8fd/VOIMrtC/an+mAqEdkKdBP JwuOrj2RStOsUrWOe9pmVU9ETq4h+nFtYvobJauSxQpudPnU4OK3O2CAPdjzU7Lmg1wroD El12xkZR+fa4/jK+PdFKEfJmUvIYFGRb1ZBa8Bzlzx7gJJX8Xfja06bjg9E+rZb5ARxib5 sI09VZZKhhz/JTykj9KY+fRk1Bk96X/gTwEqfzF6IreQnk37lkyDLvxcuqKE2KvBJafDLb ZZhT9IFTAkf07HXgopcRtgRMHVo1uAvRswWl7ao0Z/BnAYmkZ3iXiVR0IAlMOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719602713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5k/G33uduVnOlEJ2HoWYtSj7a+a9SHv2OB6f1kDL3oE=; b=DU7P1494mOeGgRUi3p8Nz6lhGBDt/vnveeaNRttGuVNmRLQa3Dhki3ifA41RUuE3NOVnGJ 6nWtlalD9ZtEjhZ9QTRMgcaGxWYW7hrlkNq9giwajgGH6+oZ0cCEoR3ruWdIoYlQ5Nsqkd f/9xSHpSzDuqAiU0SgXCUC7rK27f+cmUbxGZOh4vKXkiHtTA/FBdPeNLwgiVUHGzvVfyVv xrTHVAQpN/vANIb9Kc5O/O/idpMoYL7Lo1FScp3HXBX+Xb33BDTMiYx4rzk3ei85lPryVL cItYG3jk9dNxRQOkDTtMT6mo5UDBJPBp4JDxZRPhKo1/PAJkwB0dy5EV4V3JFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9lkx6C9Rz17YL; Fri, 28 Jun 2024 19:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45SJPDbi004014; Fri, 28 Jun 2024 19:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJPDCJ004011; Fri, 28 Jun 2024 19:25:13 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:25:13 GMT Message-Id: <202406281925.45SJPDCJ004011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: ab9e5b86596c - stable/13 - Add some ATF tests for ctladm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: ab9e5b86596c998b2001b87a2a6c67f564769075 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ab9e5b86596c998b2001b87a2a6c67f564769075 commit ab9e5b86596c998b2001b87a2a6c67f564769075 Author: Alan Somers AuthorDate: 2024-06-05 20:16:25 +0000 Commit: Alan Somers CommitDate: 2024-06-28 19:04:11 +0000 Add some ATF tests for ctladm So far only "ctladm port -c" and "ctladm port -r" are covered. Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 (cherry picked from commit 9747d11d91642cb9b81602d88e8aebeb388543c7) Fix mtree entry for ctladm tests Sponsored by: Axcient (cherry picked from commit 81ef0a89fcc055bdf3d0f1affbadb643412ebce9) ctladm: add a copyright header to the port test [skip ci] Reported by: markj Sponsored by: Axcient (cherry picked from commit a1608e8854da7f3b5734c2fcb85dd740733a08e6) --- etc/mtree/BSD.tests.dist | 2 + usr.sbin/ctladm/Makefile | 3 + usr.sbin/ctladm/tests/Makefile | 10 +++ usr.sbin/ctladm/tests/port.sh | 180 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 5d31c374166d..91e02c4ae7e5 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1141,6 +1141,8 @@ usr.sbin chown .. + ctladm + .. daemon .. etcupdate diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile index f9ddd251f96c..69dc727deaf4 100644 --- a/usr.sbin/ctladm/Makefile +++ b/usr.sbin/ctladm/Makefile @@ -23,4 +23,7 @@ MAN= ctladm.8 CFLAGS+= -DWANT_ISCSI .endif +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/usr.sbin/ctladm/tests/Makefile b/usr.sbin/ctladm/tests/Makefile new file mode 100644 index 000000000000..73ac94d77d21 --- /dev/null +++ b/usr.sbin/ctladm/tests/Makefile @@ -0,0 +1,10 @@ + +PACKAGE= tests + +ATF_TESTS_SH= port + +# "ctladm port" does not report the name of the port just created, so we can't +# cleanup unless we assume that no other test created a port too. +TEST_METADATA+= is_exclusive="true" + +.include diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh new file mode 100644 index 000000000000..110b89bd965b --- /dev/null +++ b/usr.sbin/ctladm/tests/port.sh @@ -0,0 +1,180 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Axcient +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS DOCUMENTATION 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. + +# Things that aren't tested due to lack of kernel support: +# * Creating camsim ports +# * Creating tpc ports +# * Creating camtgt ports +# * Creating umass ports + +# TODO +# * Creating iscsi ports +# * Creating nvmf ports +# * Creating ha ports +# * Creating fc ports + +skip_if_ctld() { + if service ctld onestatus > /dev/null; then + # If ctld is running on this server, let's not interfere. + atf_skip "Cannot run this test while ctld is running" + fi +} + +cleanup() { + driver=$1 + + if [ -e after-ports ]; then + diff before-ports after-ports | awk "/$driver/ {print \$2}" | xargs -n1 ctladm port -r -d ioctl -p + fi +} + +atf_test_case create_ioctl cleanup +create_ioctl_head() +{ + atf_set "descr" "ctladm can create a new ioctl port" + atf_set "require.user" "root" +} +create_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi +} +create_ioctl_cleanup() +{ + cleanup ioctl +} + +atf_test_case create_ioctl_options cleanup +create_ioctl_options_head() +{ + atf_set "descr" "ctladm can set options when creating a new ioctl port" + atf_set "require.user" "root" +} +create_ioctl_options_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" -O pp=101 -O vp=102 + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + if ! egrep -q '101[[:space:]]+102' after-ports; then + ctladm portlist + atf_fail "Did not create the port with the specified options" + fi +} +create_ioctl_options_cleanup() +{ + cleanup ioctl +} + + +atf_test_case disable_ioctl cleanup +disable_ioctl_head() +{ + atf_set "descr" "ctladm can disable an ioctl port" + atf_set "require.user" "root" +} +disable_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o ignore ctladm port -o off -p $portnum + atf_check -o match:"^$portnum *NO" ctladm portlist -qf ioctl +} +disable_ioctl_cleanup() +{ + cleanup ioctl +} + +atf_test_case enable_ioctl cleanup +enable_ioctl_head() +{ + atf_set "descr" "ctladm can enable an ioctl port" + atf_set "require.user" "root" +} +enable_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o ignore ctladm port -o off -p $portnum + atf_check -o ignore ctladm port -o on -p $portnum + atf_check -o match:"^$portnum *YES" ctladm portlist -qf ioctl +} +enable_ioctl_cleanup() +{ + cleanup ioctl +} + +atf_test_case remove_ioctl +remove_ioctl_head() +{ + atf_set "descr" "ctladm can remove an ioctl port" + atf_set "require.user" "root" +} +remove_ioctl_body() +{ + skip_if_ctld + + atf_check -o save:before-ports ctladm portlist -qf ioctl + atf_check ctladm port -c -d "ioctl" + atf_check -o save:after-ports ctladm portlist -qf ioctl + if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then + atf_fail "Did not create a new ioctl port" + fi + portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check ctladm port -r -d ioctl -p $portnum +} + +atf_init_test_cases() +{ + atf_add_test_case create_ioctl + atf_add_test_case create_ioctl_options + atf_add_test_case disable_ioctl + atf_add_test_case enable_ioctl + atf_add_test_case remove_ioctl +} From nobody Fri Jun 28 19:36:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9lzc1vZNz5PCDC; Fri, 28 Jun 2024 19:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9lzc1HYFz40tc; Fri, 28 Jun 2024 19:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zF1gPpoa30emELgxB6crDYDsq4GjM26TAZtX6lqAK0I=; b=XhrR8cgsweKZDi3qkqytiu8kSsdC0ns68O4K65nXy+fAENY9rlWtcpwlpTvH+80Vciec5A Bl0iPvBLGIn35Jbx48eEOxoU3Pxv/khSfgh29py8GTKcb3sC+aX2xXKJU16TqZfHGpLAZY a0N6uDDDz9QvUGhRwli/cOwzOyatAEMei3/w5hj/nEmTNKCYz3gGtyJ890Ka3hqci1i3Zy R4g1ljhsmADEtFv7400yajN7redJ9sZ05pfJ3RsO9zEDugkXhv2mHZAnUYJy2nH9hQcsbg /lNQLkk9AA5m1HFEaSr1lwtr6Oeq3uHCwbSWi73l2qkGAGaTU37VMm0VeW8q+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719603372; a=rsa-sha256; cv=none; b=D4jwyKEwVloKY4LR8JF/Gcut3SfeA615MBSCrTrCYP4PUh7M+4JeY5Aj9s9u920bsZ05Ng BMQ7CqFPIw5bsMCfDyXN8gEcWVhExTbJz6xCEM+Sje+k/J+GP0IUC91W1cC4TrLBRUUSlY 8VKpbNlD/pnT/ZKemBiy797uNaQ1MzrmzyEB1CiRuneIie3jg5zdp/n32nCo+kDp3WgLXi MYuvMvQRrCPUI29jccaVPKZ2fFuBbr5AuEpFLLe43YO8gsNkCHJUow3iz7yTtPIoApe1nD AX+z2kVauJxqqJ80jPIcH4cv0HTi8y0aloB0sacRqirKSG/rzGjDAch/6dy33g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zF1gPpoa30emELgxB6crDYDsq4GjM26TAZtX6lqAK0I=; b=Awrg2Igk+TGgGU55uVKTerzaVlY7OceDmy4iDWKHvBs1JAL7EUwGsEv8fG29qAWeHUChaI iNDe5iVZ02ZKQpHol/ZtH6rCn8zf8GTGb/abqvDb2Bog3B/WvcEc/dxYAf0Qo5jnV8x+Xs 7KVUUblTCO9YH9RF0kWm+TmdkGZVVwTUqSgSckPM9JVo9dPmLhJGq1/O2ODOPM7BwqmRPe 7BuR3Tx/eh6cH+Q846JJwkG1o+Zh8DW6/7NnmGzwUT3LHTlNSWEHeIZW06vrnt9pLetEbe l8foDR7S8bFVRzrlG/b36y1vNQz4tWf3FI6fOaHPxpMJtwiPQMzcjHeMvz+O+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9lzc0twMz17Z6; Fri, 28 Jun 2024 19:36: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 45SJaCtT021052; Fri, 28 Jun 2024 19:36:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJaCdQ021049; Fri, 28 Jun 2024 19:36:12 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:36:12 GMT Message-Id: <202406281936.45SJaCdQ021049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 1dc90424b26f - stable/13 - ctladm: print port number with a succesful "port -c" command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1dc90424b26f80e4a9475a722f46e754fe7aba76 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1dc90424b26f80e4a9475a722f46e754fe7aba76 commit 1dc90424b26f80e4a9475a722f46e754fe7aba76 Author: Alan Somers AuthorDate: 2024-06-05 23:54:46 +0000 Commit: Alan Somers CommitDate: 2024-06-28 19:25:54 +0000 ctladm: print port number with a succesful "port -c" command Make "ctladm port -c" print the port number of the newly successful port. This way it won't have to be guessed by a subsequent "ctladm portlist" command. That means it's safe to use it concurrently with other ctladm processes. In particular, this allows the tests to be run in parallel. Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 (cherry picked from commit 591de7534fb3acb2e6eef94a1e5e92000d2cf83d) --- usr.sbin/ctladm/ctladm.c | 18 +++++++++++ usr.sbin/ctladm/tests/Makefile | 4 --- usr.sbin/ctladm/tests/port.sh | 70 ++++++++++++++++++++---------------------- 3 files changed, 52 insertions(+), 40 deletions(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 1cf42aa5933b..6af25ed28925 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -392,7 +392,9 @@ static struct ctladm_opts cctl_fe_table[] = { static int cctl_port(int fd, int argc, char **argv, char *combinedopt) { + char result_buf[1024]; int c; + uint64_t created_port = -1; int32_t targ_port = -1; int retval = 0; int wwnn_set = 0, wwpn_set = 0; @@ -582,6 +584,8 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) case CCTL_PORT_MODE_CREATE: { bzero(&req, sizeof(req)); strlcpy(req.driver, driver, sizeof(req.driver)); + req.result = result_buf; + req.result_len = sizeof(result_buf); if (port_mode == CCTL_PORT_MODE_REMOVE) { req.reqtype = CTL_REQ_REMOVE; @@ -614,6 +618,20 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) warnx("warning: %s", req.error_str); break; case CTL_LUN_OK: + if (port_mode == CCTL_PORT_MODE_CREATE) { + req.result_nvl = nvlist_unpack(result_buf, req.result_len, 0); + if (req.result_nvl == NULL) { + warnx("error unpacking result nvlist"); + break; + } + created_port = nvlist_get_number(req.result_nvl, "port_id"); + printf("Port created successfully\n" + "frontend: %s\n" + "port: %ju\n", driver, + (uintmax_t) created_port); + nvlist_destroy(req.result_nvl); + } else + printf("Port destroyed successfully\n"); break; default: warnx("unknown status: %d", req.status); diff --git a/usr.sbin/ctladm/tests/Makefile b/usr.sbin/ctladm/tests/Makefile index 73ac94d77d21..825e38e6c6e3 100644 --- a/usr.sbin/ctladm/tests/Makefile +++ b/usr.sbin/ctladm/tests/Makefile @@ -3,8 +3,4 @@ PACKAGE= tests ATF_TESTS_SH= port -# "ctladm port" does not report the name of the port just created, so we can't -# cleanup unless we assume that no other test created a port too. -TEST_METADATA+= is_exclusive="true" - .include diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index 110b89bd965b..782a8ee5b6c1 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -45,8 +45,9 @@ skip_if_ctld() { cleanup() { driver=$1 - if [ -e after-ports ]; then - diff before-ports after-ports | awk "/$driver/ {print \$2}" | xargs -n1 ctladm port -r -d ioctl -p + if [ -e port-create.txt ]; then + portnum=`awk '/port:/ {print $2}' port-create.txt` + ctladm port -r -d $driver -p $portnum fi } @@ -60,12 +61,13 @@ create_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *ioctl" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl + atf_check egrep -q "$portnum *YES *ioctl *ioctl" portlist.txt } create_ioctl_cleanup() { @@ -82,13 +84,13 @@ create_ioctl_options_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" -O pp=101 -O vp=102 - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi - if ! egrep -q '101[[:space:]]+102' after-ports; then + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" -O pp=101 -O vp=102 + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *ioctl" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl + if ! egrep -q '101[[:space:]]+102' portlist.txt; then ctladm portlist atf_fail "Did not create the port with the specified options" fi @@ -109,13 +111,9 @@ disable_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi - portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl atf_check -o ignore ctladm port -o off -p $portnum atf_check -o match:"^$portnum *NO" ctladm portlist -qf ioctl } @@ -134,13 +132,9 @@ enable_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" - fi - portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl atf_check -o ignore ctladm port -o off -p $portnum atf_check -o ignore ctladm port -o on -p $portnum atf_check -o match:"^$portnum *YES" ctladm portlist -qf ioctl @@ -160,14 +154,18 @@ remove_ioctl_body() { skip_if_ctld - atf_check -o save:before-ports ctladm portlist -qf ioctl - atf_check ctladm port -c -d "ioctl" - atf_check -o save:after-ports ctladm portlist -qf ioctl - if test `wc -l before-ports | cut -w -f2` -ge `wc -l after-ports | cut -w -f2`; then - atf_fail "Did not create a new ioctl port" + # Specify exact pp and vp to make the post-removal portlist check + # unambiguous + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" -O pp=10001 -O vp=10002 + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf ioctl + atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d ioctl -p $portnum + # Check that the port was removed. A new port may have been added with + # the same ID, so match against the pp and vp numbers, too. + if ctladm portlist -qf ioctl | egrep -q "^${portnum} .*10001 *10002"; then + ctladm portlist -qf ioctl + atf_fail "port was not removed" fi - portnum=`diff before-ports after-ports | awk '/ioctl/ {print $2}'`; - atf_check ctladm port -r -d ioctl -p $portnum } atf_init_test_cases() From nobody Fri Jun 28 19:36:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9lzd3pJFz5PCDD; Fri, 28 Jun 2024 19:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9lzd2Lpgz40qm; Fri, 28 Jun 2024 19:36:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKZzyibGREguP38hzUnfFU9ZvxyiSzDeQHuvxGssERg=; b=Mo4qTLPz9dw44FRyPFLeK8U4hdgPlUWt6SQrvkJzShov4HTC9zj5p1QLRUcpKk9ewkB4kv dbGMpdLXXwQRSCAY8/ojwjc0eVISXrQYgRCPTmO6FWvRnt8uHPRN50z7HuUoOVvudEgP8Y CWgK5YHU/O5XZ4mtKFFyNPYIArNmPdJl9rtcUMQEC3+olMqK31D/7V21rJjJzE+e0/E4QK 7H9CnZPtJ2YppIXS+Cq+EgOrla+mT8BiP6r5fr1J1axvFuwsCUv1jxmUL10JwVdRPfUCgr N/vejGahKl9AUu0Q/8LFNuxv6UnKiVPNE18sCNCZXu0ReTYlc/uTQURFUB0PYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719603373; a=rsa-sha256; cv=none; b=A0TNqKLQXbokT9Lhi/rEiRill6Bz66NOMFl/h0kBv4jsOjjQDYAzkQZSB8ip+8O2HG6q5M lKviMmRI4sL5aWKlYDluhqZj/ehR/Jn070u5GcYxc8gz8utxcx+nKitxWM1RgYwBKYnh8x TNFrccpbEeTu+Igy133yvmuMpcKWgsnuak+ecax9bN4S7KS4LQtc7S6An8ZUNl3/bpHuG0 5RCZ6eH84tdw7+TnbcBPQpGeNHYY5UkiJO+GH09C3oKQvRMAqPZwKa5ULm0dwQ+I5Bx9p+ e8FfWbMYsR5dHuCaYtt9eR0Pp9os6WA9Jg8rg2cWiMUlDDhm8HcfJyYNo3IeCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKZzyibGREguP38hzUnfFU9ZvxyiSzDeQHuvxGssERg=; b=dl/JineO9qrixt4/e+ei+g8gJucBESjrJSPRhGZ1JbmoAk+VW547XV8KQzMeK0wToVbdX1 PIjXo7Xo1uSuGGJAV0sU9axPiz9eNQkJM1bIHby+bQY1ywl62cVdbSfxurOR/BmzarsMXO AnPj1Iln6t/+g1K0yFgma9N8BDpqY/WV7Vfjhq9kspugPlekbhDjEar1k2aSfUmQn4b1Ol izTqhIKD67DefRPt4ZvK9ftC/fpHy+2b7lCvCk/H9wt8vuRdyCPuU/tVHqHKb3Cps8ahBz 5Na51uzdZRAhY2URe5cCWNiMQVmqiIBwbJ7xtxzVOekEwxBUD5GpaZ6L1ySpAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9lzd1yKhz175D; Fri, 28 Jun 2024 19:36: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 45SJaDx3021106; Fri, 28 Jun 2024 19:36:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJaDML021103; Fri, 28 Jun 2024 19:36:13 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:36:13 GMT Message-Id: <202406281936.45SJaDML021103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 259f94f8ab4f - stable/13 - ctladm: better documentation for adding and removing cfiscsi ports List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 259f94f8ab4fefbf5531c42d06e5079285ae3b7c Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=259f94f8ab4fefbf5531c42d06e5079285ae3b7c commit 259f94f8ab4fefbf5531c42d06e5079285ae3b7c Author: Alan Somers AuthorDate: 2024-06-06 17:19:19 +0000 Commit: Alan Somers CommitDate: 2024-06-28 19:26:44 +0000 ctladm: better documentation for adding and removing cfiscsi ports Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 (cherry picked from commit afecc74cd7158da8e89c26c5267bc715c2417fe7) --- sys/cam/ctl/ctl_frontend_iscsi.c | 27 ++++++-- usr.sbin/ctladm/ctladm.8 | 32 +++++++-- usr.sbin/ctladm/tests/port.sh | 146 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 191 insertions(+), 14 deletions(-) diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index 253ffbe7dbdc..03d5c91f7bf5 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -2150,17 +2150,24 @@ cfiscsi_ioctl_port_create(struct ctl_req *req) uint16_t tag; target = dnvlist_get_string(req->args_nvl, "cfiscsi_target", NULL); - alias = dnvlist_get_string(req->args_nvl, "cfiscsi_target_alias", NULL); + if (target == NULL) { + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Missing required argument: cfiscsi_target"); + return; + } + val = dnvlist_get_string(req->args_nvl, "cfiscsi_portal_group_tag", NULL); - - if (target == NULL || val == NULL) { + if (val == NULL) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "Missing required argument"); + "Missing required argument: cfiscsi_portal_group_tag"); return; } + alias = dnvlist_get_string(req->args_nvl, "cfiscsi_target_alias", NULL); + tag = strtoul(val, NULL, 0); ct = cfiscsi_target_find_or_create(&cfiscsi_softc, target, alias, tag); if (ct == NULL) { @@ -2251,13 +2258,19 @@ cfiscsi_ioctl_port_remove(struct ctl_req *req) uint16_t tag; target = dnvlist_get_string(req->args_nvl, "cfiscsi_target", NULL); + if (target == NULL) { + req->status = CTL_LUN_ERROR; + snprintf(req->error_str, sizeof(req->error_str), + "Missing required argument: cfiscsi_target"); + return; + } + val = dnvlist_get_string(req->args_nvl, "cfiscsi_portal_group_tag", NULL); - - if (target == NULL || val == NULL) { + if (val == NULL) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "Missing required argument"); + "Missing required argument: cfiscsi_portal_group_tag"); return; } diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8 index 4e7288dac6b6..a7eb1d58cbbf 100644 --- a/usr.sbin/ctladm/ctladm.8 +++ b/usr.sbin/ctladm/ctladm.8 @@ -35,7 +35,7 @@ .\" .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" -.Dd June 5, 2024 +.Dd June 6, 2024 .Dt CTLADM 8 .Os .Sh NAME @@ -166,7 +166,7 @@ .Op Fl o Ar on|off .Op Fl w Ar wwpn .Op Fl W Ar wwnn -.Op Fl O Ar pp|vp +.Op Fl O Ar name=value .Op Fl p Ar targ_port .Op Fl r .Op Fl t Ar fe_type @@ -618,7 +618,7 @@ The WWNN and WWPN may both be specified at the same time, but cannot be combined with enabling/disabling or listing ports. .Bl -tag -width 12n .It Fl c -Create new frontend port using free pp and vp=0. +Create new frontend port. .It Fl d Ar driver Specify the name of the frontend driver used by the .Pq Fl c @@ -637,7 +637,31 @@ If no port number or port type is specified, all ports are turned on or off. .It Fl O Ar pp|vp Specify generic options on the ioctl frontend port. -At present, only pp and vp port numbers can be set. +The list of recognized options is driver-dependent. +The +.Dq ioctl +driver recognizes +.Dq pp +and +.Dq vp . +The +.Dq iscsi +driver recongizes +.Dq cfiscsi_portal_group_tag , +.Dq cfiscsi_target , +and +.Dq cfiscsi_target_alias . +The +.Dq nvmf +driver recognizes +.Dq subnqn , +.Dq portid , +.Dq max_io_qsize , +.Dq enable_timeout , +.Dq ioccsz , +.Dq nn , +and +.Dq serial . .It Fl p Ar targ_port Specify the frontend port number. The port numbers can be found in the frontend port list. diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index 782a8ee5b6c1..161759ec14d0 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -30,11 +30,20 @@ # * Creating umass ports # TODO -# * Creating iscsi ports # * Creating nvmf ports # * Creating ha ports # * Creating fc ports +# The PGTAG can be any 16-bit number. The only constraint is that each +# PGTAG,TARGET pair must be globally unique. +PGTAG=30257 + +load_cfiscsi() { + if ! kldstat -q -m cfiscsi; then + kldload cfiscsi || atf_skip "could not load cfscsi kernel mod" + fi +} + skip_if_ctld() { if service ctld onestatus > /dev/null; then # If ctld is running on this server, let's not interfere. @@ -46,8 +55,18 @@ cleanup() { driver=$1 if [ -e port-create.txt ]; then - portnum=`awk '/port:/ {print $2}' port-create.txt` - ctladm port -r -d $driver -p $portnum + case "$driver" in + "ioctl") + PORTNUM=`awk '/port:/ {print $2}' port-create.txt` + ctladm port -r -d $driver -p $PORTNUM + ;; + "iscsi") + TARGET=`awk '/target:/ {print $2}' port-create.txt` + # PORTNUM is ignored, but must be set + PORTNUM=9999 + ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET + ;; + esac fi } @@ -74,6 +93,75 @@ create_ioctl_cleanup() cleanup ioctl } +atf_test_case create_iscsi cleanup +create_iscsi_head() +{ + atf_set "descr" "ctladm can create a new iscsi port" + atf_set "require.user" "root" +} +create_iscsi_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.create_iscsi + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + echo "target: $TARGET" >> port-create.txt + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *iscsi" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + atf_check -o save:portlist.txt ctladm portlist -qf iscsi + # Unlike the ioctl driver, the iscsi driver creates ports in a disabled + # state, so the port's lunmap may be set before enabling it. + atf_check egrep -q "$portnum *NO *iscsi *iscsi.*$TARGET" portlist.txt +} +create_iscsi_cleanup() +{ + cleanup iscsi +} + +atf_test_case create_iscsi_alias cleanup +create_iscsi_alias_head() +{ + atf_set "descr" "ctladm can create a new iscsi port with a target alias" + atf_set "require.user" "root" +} +create_iscsi_alias_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.create_iscsi_alias + ALIAS="foobar" + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" -O cfiscsi_target_alias="$ALIAS" + echo "target: $TARGET" >> port-create.txt + atf_check egrep -q "Port created successfully" port-create.txt + atf_check egrep -q "frontend: *iscsi" port-create.txt + atf_check egrep -q "port: *[0-9]+" port-create.txt + atf_check -o save:portlist.txt ctladm portlist -qvf iscsi + atf_check egrep -q "cfiscsi_target_alias=$ALIAS" portlist.txt +} +create_iscsi_alias_cleanup() +{ + cleanup iscsi +} + +atf_test_case create_iscsi_without_required_args +create_iscsi_without_required_args_head() +{ + atf_set "descr" "ctladm will gracefully fail to create an iSCSI target if required arguments are missing" + atf_set "require.user" "root" +} +create_iscsi_without_required_args_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.create_iscsi + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -c -d "iscsi" -O cfiscsi_target=$TARGET +} + atf_test_case create_ioctl_options cleanup create_ioctl_options_head() { @@ -168,11 +256,63 @@ remove_ioctl_body() fi } +atf_test_case remove_iscsi +remove_iscsi_head() +{ + atf_set "descr" "ctladm can remove an iscsi port" + atf_set "require.user" "root" +} +remove_iscsi_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.remove_iscsi + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + portnum=`awk '/port:/ {print $2}' port-create.txt` + atf_check -o save:portlist.txt ctladm portlist -qf iscsi + atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + # Check that the port was removed. A new port may have been added with + # the same ID, so match against the target and tag, too. + PGTAGHEX=0x7631 # PGTAG in hex + if ctladm portlist -qf iscsi | egrep -q "^${portnum} .*$PGTAG +[0-9]+ +$TARGET,t,$PGTAGHEX"; then + ctladm portlist -qf iscsi + atf_fail "port was not removed" + fi +} + +atf_test_case remove_iscsi_without_required_args cleanup +remove_iscsi_without_required_args_head() +{ + atf_set "descr" "ctladm will gracefully fail to remove an iSCSI target if required arguments are missing" + atf_set "require.user" "root" +} +remove_iscsi_without_required_args_body() +{ + skip_if_ctld + load_cfiscsi + + TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args + atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + echo "target: $TARGET" >> port-create.txt + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r -d iscsi -p 9999 -O cfiscsi_target="$TARGET" + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG +} +remove_iscsi_without_required_args_cleanup() +{ + cleanup iscsi +} + atf_init_test_cases() { atf_add_test_case create_ioctl + atf_add_test_case create_iscsi + atf_add_test_case create_iscsi_without_required_args + atf_add_test_case create_iscsi_alias atf_add_test_case create_ioctl_options atf_add_test_case disable_ioctl atf_add_test_case enable_ioctl atf_add_test_case remove_ioctl + atf_add_test_case remove_iscsi + atf_add_test_case remove_iscsi_without_required_args } From nobody Fri Jun 28 19:36:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9lzg0plkz5PBtB; Fri, 28 Jun 2024 19:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9lzf3fGQz419P; Fri, 28 Jun 2024 19:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cFsAP003z/0P2lR+aXYATsrzNbn4VbOQwNZv6iGgl7U=; b=UlaU+adzoRck8FmWS1uarjKowDHKKOn/GHgAGjHgkNT+l1l7YyN8HInOCqP+/+ZJwXTtvK Aay79XoLRRya2tPzRJEH25LUU3tTRDik5lMbB8Z+U8z2DhDcs/ea1lNwmPf2d/L0C8+K+4 nrnWxmaY99wI/Wjxe4+daCTqE3vjyQgUJPiFediN97kcOcIzvoksVmaeX3NYaN5+lHdlC/ VohHUMSiMDc/2x9/nuDKMAeMdoNmEBK+NQUQjBhR3ZQ/HenzTCCrRdmcBdCtl+8qFhANM4 jaQoCC+ix91BNAKoLdocrLGIextguX79Q4ILm7L8eE5nNEggLyNGRIJMoHM00Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719603374; a=rsa-sha256; cv=none; b=XR8ducfjQ7wPYk9aAdLmqN4tCT9KyBe8d5p5BfRZ50CZZi7HuR9ThLJ3zedJr544gjDxVq H7WOLNwaqtf8rhavkRaeBRDgHu42a+rT7iFII4H7Nf1AHhnJel2Et2RkotqlmdjH7TkSGt jG9VbSXU3rRz+lqo+X+eB6P2/t/P/7MXkt2loBokJGEVdb2LQKknSIEwq87X7neBA4I5Gq WZWRcWPzN6Glf4XsIm7+0xyb/mTKEzRYe9Dyk22g7q9NYIjJ06JIG5dwyWP9ZlBrTfzoC4 eD9P0Dkhv9YUb6zZt2y8RL/R70W/gp6a1j0NzRxm4SH6ovQu1/RIyxhVJg8cyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cFsAP003z/0P2lR+aXYATsrzNbn4VbOQwNZv6iGgl7U=; b=o6XOVVGw3cW76xzjZQyeJdmeky5JEZiLtOUBn2B4odamuZoJ+/5Noaw1zio8GJEBvtZ6DH 8LsHwePG/zdZGqPhwFdFVOqryA+w0TppYW+To/RMfSYhg3xpvJlnmHghczuC/YbQPI8VRV Za9GBZa9cMNvg62ebRPSVjiARiE0anYGeHewUXQ9atHjN46NhLBsvaE6Glr+7pDaS8bdnc pLh0unwMUBtQNKJgs53a3Aggqvu2AwBkM/2PR1sygn+LuywUgQZ8uARzLkGPuDDXeFHn7T CqgYNQ3mkeWppzOzmaf5jbUHHUmJKo/aoQYRQJm3CzS4OPB9r2kMUf10355f1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9lzf31dPz175F; Fri, 28 Jun 2024 19:36: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 45SJaEAT021167; Fri, 28 Jun 2024 19:36:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJaErC021164; Fri, 28 Jun 2024 19:36:14 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:36:14 GMT Message-Id: <202406281936.45SJaErC021164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 7a8bab3d946c - stable/13 - ctladm: don't require the use of "-p" with "port -r" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7a8bab3d946c3c5408353bd5475eb6c8c9dc1d76 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=7a8bab3d946c3c5408353bd5475eb6c8c9dc1d76 commit 7a8bab3d946c3c5408353bd5475eb6c8c9dc1d76 Author: Alan Somers AuthorDate: 2024-06-06 19:14:43 +0000 Commit: Alan Somers CommitDate: 2024-06-28 19:34:10 +0000 ctladm: don't require the use of "-p" with "port -r" When removing a port, the ioctl frontend requires the "-p" argument. But other frontends, like cfiscsi, do not. So don't require that argument in the ctladm command. The frontend driver will report an error if any required argument is missing. Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 (cherry picked from commit edbd489d09babebdc6c03924a912013be584c409) --- sys/cam/ctl/ctl_frontend_ioctl.c | 2 +- usr.sbin/ctladm/ctladm.8 | 3 +-- usr.sbin/ctladm/ctladm.c | 10 +++------- usr.sbin/ctladm/tests/port.sh | 28 +++++++++++++++++++++++----- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sys/cam/ctl/ctl_frontend_ioctl.c b/sys/cam/ctl/ctl_frontend_ioctl.c index af3a552af32a..e471a4c3e24c 100644 --- a/sys/cam/ctl/ctl_frontend_ioctl.c +++ b/sys/cam/ctl/ctl_frontend_ioctl.c @@ -268,7 +268,7 @@ cfi_ioctl_port_remove(struct ctl_req *req) if (port_id == -1) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "port_id not provided"); + "Missing required argument: port_id"); return; } diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8 index a7eb1d58cbbf..6470f5d5a8ee 100644 --- a/usr.sbin/ctladm/ctladm.8 +++ b/usr.sbin/ctladm/ctladm.8 @@ -666,8 +666,7 @@ and Specify the frontend port number. The port numbers can be found in the frontend port list. .It Fl r -Remove port specified with -.Pq Fl p Ar targ_port . +Remove a port. .It Fl t Ar fe_type Specify the frontend type used by the .Pq Fl o , diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 6af25ed28925..194f0647fe7f 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -575,11 +575,6 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) break; } case CCTL_PORT_MODE_REMOVE: - if (targ_port == -1) { - warnx("%s: -r requires -p", __func__); - retval = 1; - goto bailout; - } /* FALLTHROUGH */ case CCTL_PORT_MODE_CREATE: { bzero(&req, sizeof(req)); @@ -589,8 +584,9 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) if (port_mode == CCTL_PORT_MODE_REMOVE) { req.reqtype = CTL_REQ_REMOVE; - nvlist_add_stringf(option_list, "port_id", "%d", - targ_port); + if (targ_port != -1) + nvlist_add_stringf(option_list, "port_id", "%d", + targ_port); } else req.reqtype = CTL_REQ_CREATE; diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index 161759ec14d0..633dec2fd273 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -62,8 +62,6 @@ cleanup() { ;; "iscsi") TARGET=`awk '/target:/ {print $2}' port-create.txt` - # PORTNUM is ignored, but must be set - PORTNUM=9999 ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET ;; esac @@ -93,6 +91,25 @@ create_ioctl_cleanup() cleanup ioctl } +atf_test_case remove_ioctl_without_required_args cleanup +remove_ioctl_without_required_args_head() +{ + atf_set "descr" "ctladm will gracefully fail to remove an ioctl target if required arguments are missing" + atf_set "require.user" "root" +} +remove_ioctl_without_required_args_body() +{ + skip_if_ctld + + atf_check -o save:port-create.txt ctladm port -c -d "ioctl" + atf_check egrep -q "Port created successfully" port-create.txt + atf_check -s exit:1 -e match:"Missing required argument: port_id" ctladm port -r -d "ioctl" +} +remove_ioctl_without_required_args_cleanup() +{ + cleanup ioctl +} + atf_test_case create_iscsi cleanup create_iscsi_head() { @@ -271,7 +288,7 @@ remove_iscsi_body() atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" portnum=`awk '/port:/ {print $2}' port-create.txt` atf_check -o save:portlist.txt ctladm portlist -qf iscsi - atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" + atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d iscsi -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" # Check that the port was removed. A new port may have been added with # the same ID, so match against the target and tag, too. PGTAGHEX=0x7631 # PGTAG in hex @@ -295,8 +312,8 @@ remove_iscsi_without_required_args_body() TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" echo "target: $TARGET" >> port-create.txt - atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r -d iscsi -p 9999 -O cfiscsi_target="$TARGET" - atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -r -d iscsi -p 9999 -O cfiscsi_portal_group_tag=$PGTAG + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r -d iscsi -O cfiscsi_target="$TARGET" + atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -r -d iscsi -O cfiscsi_portal_group_tag=$PGTAG } remove_iscsi_without_required_args_cleanup() { @@ -313,6 +330,7 @@ atf_init_test_cases() atf_add_test_case disable_ioctl atf_add_test_case enable_ioctl atf_add_test_case remove_ioctl + atf_add_test_case remove_ioctl_without_required_args atf_add_test_case remove_iscsi atf_add_test_case remove_iscsi_without_required_args } From nobody Fri Jun 28 19:36:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9lzg65zvz5PC6j; Fri, 28 Jun 2024 19:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9lzg4QV6z41LW; Fri, 28 Jun 2024 19:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbSP/qXz1SoKpmL8O+PC0KnwsV1K0zwRNCgfvV4adZY=; b=dcq9Eoja97G6a4I7kPTtRMDCSnMLmiiITRaKyPSUvs7WpsJuujWT5eb6In6jNsf7Q0Md0a ZfwHLvXuxZ6lkw3jpn8x4Md2p4NlVUjnr0LinixOC53Z9n1tvGK9cNsEXok1t0/sNWrla1 F0ICQH4TcAVHeUzNs+7b4M2bdxmTxqs0mWtS24cU7hpqDScbonNUIf/eLRn+u3Wxza/V59 xIUmZb6A+oOsOqUeHLbiaVvr6iybeOlpKOTc8W0R1bT9iSh057eboP0XSuCTtYap8P17Hd y2YeAnlCcFyImmxORgPm4nEdXazbr51EQxqaLMCmJ/fT+IhUalYJ7w0bRhGUQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719603375; a=rsa-sha256; cv=none; b=p1Pt+U5PgfEbE1FQd3sZxDtUy5hG4q8v7arcd0YyefrttOF5Q6wrwRovOo+xFnGbstyNoF lhI0MslQul5JWz8s/xWH+FPHdUc0JO43GqjRwPllXc7OLb1QUVFzr30K+GSPZikXNjonne Zpfhr+EuOx8MiqS8OntWUloH8BfMa1JN4dysjQ9M8S9PgJMfB0tCEUawX7YINDLUQnGQ1H ANjsZKWJYBWCILDkNdIwArXfK8rI2TxTVZLV4xYPtkPiSXi4cfq5iNRstrWv34ZslpHo2K 7KbtPLVBmldh+n4b6Aai/jbeFzb2oq7f/MTcrQ7Cz+j1SFFvDb+EOY3yjPlUDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbSP/qXz1SoKpmL8O+PC0KnwsV1K0zwRNCgfvV4adZY=; b=dK6ZCwWfihxgrbgrDIPZ4/F6ElTcyC51vomzIM8KQQSSbd39t0rsCWsbHgT8CnzpG7BU6t vSEf+LnoupjUpd8C6RfjX4yu0UJytVjo0CIuMt6jmVgBP0toBF7SY4pUFlhKMYmv90akci zN/IxJbMg3b6OlsCMpA06NorZ7SLv0XV4+TbYe4jnmOUBgxBXPCfR9Kt+NNDYWsel9vANy yM+6HnXVJlvq6/CHmnpC76r3VGrqnER5EiyQiGNeAlHg4IOMZNuhamzHOwz2zJqHONwIT9 ItP8L9C+pU56rf8LGXoXTUQ+yHtmh2PYbcsVcp31Y5CtTK2GgtBDQv+VyWzQ7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9lzg42d8z17lY; Fri, 28 Jun 2024 19:36: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 45SJaFS1021212; Fri, 28 Jun 2024 19:36:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJaF1J021209; Fri, 28 Jun 2024 19:36:15 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:36:15 GMT Message-Id: <202406281936.45SJaF1J021209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 5d5082fd986e - stable/13 - ctld: plug memory leaks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d5082fd986e11ad5bb30ac82384a28201b260b6 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=5d5082fd986e11ad5bb30ac82384a28201b260b6 commit 5d5082fd986e11ad5bb30ac82384a28201b260b6 Author: Alan Somers AuthorDate: 2024-06-12 21:34:05 +0000 Commit: Alan Somers CommitDate: 2024-06-28 19:35:38 +0000 ctld: plug memory leaks Reviewed by: mav Sponsored by: Axcient Reported by: valgrind Pull Request: https://github.com/freebsd/freebsd-src/pull/1288 (cherry picked from commit 2909ddd17cb4d750852dc04128e584f93f8c5058) --- usr.sbin/ctld/ctld.c | 1 + usr.sbin/ctld/kernel.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index f2b2de5b9a57..f3d8d5807856 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -2874,6 +2874,7 @@ main(int argc, char **argv) error = conf_apply(oldconf, newconf); if (error != 0) log_warnx("failed to apply configuration"); + conf_delete(newconf); conf_delete(oldconf); oldconf = NULL; diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index cbb8e2c25f5d..5ea9295e9df0 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -615,6 +615,22 @@ retry_port: } cp->p_ctl_port = port->port_id; } + while ((port = STAILQ_FIRST(&devlist.port_list))) { + struct cctl_lun_nv *nv; + + STAILQ_REMOVE_HEAD(&devlist.port_list, links); + free(port->port_frontend); + free(port->port_name); + free(port->cfiscsi_target); + free(port->ctld_portal_group_name); + while ((nv = STAILQ_FIRST(&port->attr_list))) { + STAILQ_REMOVE_HEAD(&port->attr_list, links); + free(nv->value); + free(nv->name); + free(nv); + } + free(port); + } free(name); STAILQ_FOREACH(lun, &devlist.lun_list, links) { @@ -665,6 +681,18 @@ retry_port: cl->l_name); } } + while ((lun = STAILQ_FIRST(&devlist.lun_list))) { + struct cctl_lun_nv *nv; + + STAILQ_REMOVE_HEAD(&devlist.lun_list, links); + while ((nv = STAILQ_FIRST(&lun->attr_list))) { + STAILQ_REMOVE_HEAD(&lun->attr_list, links); + free(nv->value); + free(nv->name); + free(nv); + } + free(lun); + } return (conf); } @@ -742,12 +770,14 @@ kernel_lun_add(struct lun *lun) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } } error = ioctl(ctl_fd, CTL_LUN_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { @@ -825,12 +855,14 @@ kernel_lun_modify(struct lun *lun) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } } error = ioctl(ctl_fd, CTL_LUN_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { @@ -1053,6 +1085,7 @@ kernel_port_add(struct port *port) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } @@ -1060,6 +1093,7 @@ kernel_port_add(struct port *port) req.result = result_buf; req.result_len = sizeof(result_buf); error = ioctl(ctl_fd, CTL_PORT_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { @@ -1203,11 +1237,13 @@ kernel_port_remove(struct port *port) req.args = nvlist_pack(req.args_nvl, &req.args_len); if (req.args == NULL) { + nvlist_destroy(req.args_nvl); log_warn("error packing nvlist"); return (1); } error = ioctl(ctl_fd, CTL_PORT_REQ, &req); + free(req.args); nvlist_destroy(req.args_nvl); if (error != 0) { From nobody Fri Jun 28 19:46:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9mC71hv2z5PDCX; Fri, 28 Jun 2024 19:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9mC711rxz42bh; Fri, 28 Jun 2024 19:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=io1j1ITO09orRKn3tXh4frF7jgNEyTH5Bj3B+pmBEXY=; b=O52h0dK9vi05fcDrbrOPhFSi97KiiMr2g8eHMY+EQ9e/lt6msjEfXYpCcDR7OQrrkgCamW UraBd40e+bmZQ9aTp9f0GuaPXDz/UWoYvXUSZRClFd72naejvyB6s3oXf3oRSC0LH5QqzB AxdxI3jqdjq6B4hFA4uSdbp2AHNTuH7Lk94zlapiSzGb5ikRIibAWL2SOB+XgWGeSFf/OC CnQwFPyo4fXCEPziC16A60tJc027obBpAlC89ZWK/2kjEnDJa+BmmjfbmgxJN6kHONY3z7 /ZFfTM6NIYbk4XKI6pRasg1R0k6mRvR4AQSzsTUMzAXkVQ8drcC/dt3FFekfog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719603971; a=rsa-sha256; cv=none; b=r1hzXA0qq7OeXiTxlNVZHnpiOSHSXALxH9sOCfsjoi9u7qp60gZjVBR1ZHgV5nYm2FUhF8 L7FYrht+Ln0w7EKisfHpi/QWLgREDyL6Nvoljz7NiXKhLRqIz/WIdOc0a4MXkz8w2DyWqs CN98EMupkQERern/tpkFrRF/kv3XsRGp2jVMu9xsLxXiIfOHv2fjw7SILZ/EwmriT631m+ pl2vdip0Z5r7DbyiS9JPqQdcI5Ql7Qz6Y68GqHqX/YVOk6gZ8n5eTsmwVPFdDVSx+yyO5L Vfaqg0I5N3fG73/6oJrWFQWl/UX2OipqJizcpuw2z/g78wNhG8t9K8vAHb8yrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719603971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=io1j1ITO09orRKn3tXh4frF7jgNEyTH5Bj3B+pmBEXY=; b=A3uff/a4mlr2HnIJdbG/kbM8AtI0yKzyo8OblNIk4v4S0IwVASBcweWAtyTKN8V18IzvJU 9nXW3a34tgzNxrJ1f14XxW+O3XsoWIxZHTmp768kgG500mFFQhRQgYo75U/dXAm8CilmW0 FrNNfSKyTxsSRhIDByPMeYpucdRqMpRUAQ4IKr8s91Oe/iqRvBhuOgSKmYc+rHfuo/rXAv 2PRWVhbhDmSfhwAaE1AVbsb75yezp8cOvapmR2wJ/eiE/dzZmwckDQ2cBztNCaPnDv6Jwf iN1M2fMds4gDj6uTwPNcJSpVnL4DHkkd7wCvcRfyEiIp45Gbe0gUIig254Z7iQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9mC70dfkz18BV; Fri, 28 Jun 2024 19:46: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 45SJkAK3038132; Fri, 28 Jun 2024 19:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJkA0R038129; Fri, 28 Jun 2024 19:46:10 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:46:10 GMT Message-Id: <202406281946.45SJkA0R038129@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: c8f147943d2e - stable/14 - MFC zfs/jail: Mark the zfs.mount_snapshot jail parameter as boolean. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: c8f147943d2e0926793af3442dd26a8e5aebcda7 Auto-Submitted: auto-generated The branch stable/14 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=c8f147943d2e0926793af3442dd26a8e5aebcda7 commit c8f147943d2e0926793af3442dd26a8e5aebcda7 Author: Jamie Gritton AuthorDate: 2024-06-24 20:00:49 +0000 Commit: Jamie Gritton CommitDate: 2024-06-28 19:44:56 +0000 MFC zfs/jail: Mark the zfs.mount_snapshot jail parameter as boolean. PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 (cherry picked from commit 9cbf1de7e34a6fced041388fad5d9180cb7705fe) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a972c720dfdb..9b56d15f1095 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -100,7 +100,7 @@ static struct zfs_jailparam zfs_jailparam0 = { static int zfs_jailparam_slot; SYSCTL_JAIL_PARAM_SYS_NODE(zfs, CTLFLAG_RW, "Jail ZFS parameters"); -SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "I", +SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "B", "Allow mounting snapshots in the .zfs directory for unjailed datasets"); SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions"); From nobody Fri Jun 28 19:50:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9mHZ322lz5PDMl; Fri, 28 Jun 2024 19:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9mHZ2W70z437c; Fri, 28 Jun 2024 19:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719604202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ddQK1ZTs9EGmID73Ko9FJgYdS0aL03C6R4/kcooPJk=; b=yLr7IQiwbJFVpHlTDx/N0agXCBsC7j/lpuHj+YZTyi9yUP8PsR/bZP26vZEroTizNvrz5Z pkCdQlzSwgwbZwl+zynmYMJ6VSyMmnV0SFTSGQijkU2XnE3pkMg5hAglIVRU1JnDl25aEd LDxiiGuSwv/9ke5Yei1JrUzDla0yEdZBxwDN332A8tvM5A2NTPJZhSSNZwPlt9PWCGp5YF vISEldv0mW9rQmU5a2QtOFXotfBbrtlt51ifaDlzwDWTiA8Ny5BB5aaXdABtM/deV0GRyD hqXTGSjZ9NnW3KdX6n79GQ48zQeanxZbHl1g38Q7W/E31gLHpHpfQtydr+BMsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719604202; a=rsa-sha256; cv=none; b=m+GFnXv4oAod4wG/hUE28BNUhlwTAcOMPUeTXfUIrVstnZwHePZ4JCCJblgZBIaL1N6R4Q Leb5+OqIy//rL70rdxeaJYJHK3LIg+hASPc7hLtMXUHsugaFms68sXRqLsK0BFUsr79OcD 1OIN3JP1MVnXjHtQpePi1QQKLH4usQj4PkaRJLbC8mA2+DG8xtKZ+5m5hD7iiSn7OyzZw3 Z61IVNXjtD7Styr80zpN4Fq4CcEXmIvuw/bBLP4MYlRXBgtAOQEJrVPT1NpAKwywsm49P/ tMRXroqiBC2PCSIQYBSX/JiN0HY5KyHKpx68KuLIGbfKVa8UleVnk+nCmnZq5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719604202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ddQK1ZTs9EGmID73Ko9FJgYdS0aL03C6R4/kcooPJk=; b=YZtGq3OEy5PkBBHsPUBULgANkOTWtXUKoNjmvdeai2EU603qZolDhl/Zw5v1bK/kSK2npE JTHU7Wg4eB3FJ39nI2fd4Px1CscC3Q6KPyciJJ03Pm73eCvMt3QAPEM53wL3pzIq/wxBdG MtwjtSM6/tN3sE6SFyWABsnERfAOpeo1DpkraH7o1LKCJKjazJ2Ux3xvizlNu929wCbbt3 gLTBvdmGPPOrI7O1aOFSdZF3kxq4fPq/1hUrBFkBtoVL7l8ki3P7RDAqtoe84PqovtvGsM n+zZgG3eSKxeYBtzh6RWGVEji87sEm2Stur5XYbsagPrxcxLmWCAnCAkjGG49g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9mHZ26x3z181D; Fri, 28 Jun 2024 19:50: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 45SJo22u040812; Fri, 28 Jun 2024 19:50:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJo2cG040808; Fri, 28 Jun 2024 19:50:02 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:50:02 GMT Message-Id: <202406281950.45SJo2cG040808@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: bb7b7b0eb7cf - stable/14 - MFC zfs/jail: Document the zfs.mount_snapshot parameter in 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: bb7b7b0eb7cf64109f05136d921a357f58839ba1 Auto-Submitted: auto-generated The branch stable/14 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=bb7b7b0eb7cf64109f05136d921a357f58839ba1 commit bb7b7b0eb7cf64109f05136d921a357f58839ba1 Author: Jamie Gritton AuthorDate: 2024-06-24 20:03:45 +0000 Commit: Jamie Gritton CommitDate: 2024-06-28 19:49:28 +0000 MFC zfs/jail: Document the zfs.mount_snapshot parameter in jail(8). PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 (cherry picked from commit 63875db56bd545896e019c922378f96ad5adc892) --- usr.sbin/jail/jail.8 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 0e98914795a2..3a6e46b065b2 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2023 +.Dd June 24, 2024 .Dt JAIL 8 .Os .Sh NAME @@ -761,7 +761,15 @@ the jail cannot perform any sysvmsg-related system calls. .It Va sysvsem, sysvshm Allow access to SYSV IPC semaphore and shared memory primitives, in the same manner as -.Va sysvmsg. +.Va sysvmsg . +.It Va zfs.mount_snapshot +Allow jailed users to access the contents of ZFS snapshots under the +filesystem's +.Pa .zfs +directory. +If +.Va allow.mount.zfs +is set, the snapshots may also be mounted. .El .Pp There are pseudo-parameters that are not passed to the kernel, but are From nobody Fri Jun 28 19:51:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9mJr33KCz5PDQg; Fri, 28 Jun 2024 19:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9mJr2bNXz43Vm; Fri, 28 Jun 2024 19:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719604268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXfsYtZMkIxzJt2fNvGJ/5fjDtd+0alyEAV7hj9NVho=; b=W9rzbj1jsViKOxC0Wf8XLtj96rW0P9nOEQ8ATDuBNDUCwLzO0d0Yluu8Pp1b2W6oXr0PuG r7S5lavpAVUW+7YtLnXu3ZV9NjZUmpMvZRX0co4qSuXM7yWA9hEuplCib5hy56z1qNnhem alQRVOyZrTrxO5fLhB0U7PsH2Azcb8M4hGCP89jjhQbLHeuPnDBfULQx/VjuwFIppdUnUd 8UsA+DgUhVpqBNeLH4Q3+TbJv1x6FBHGRBMwtZM1XKZFaAZzbIO1iqPlEcFG9gf60jsOMb WcJyomDSbWoRCoZpMExPcgOvTD8TRL6NGQeuMtSXrrVqWJJov+kDNz8gZ0vR2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719604268; a=rsa-sha256; cv=none; b=BYbUhQ8kE3efE5YWBzsQQw/tryBZ0TxiGflu+GX1i9GscaWEDSs7eSoHo6AiBYresm9/gt hcVBkwVoSoNWuvZ8ptNLSpZv16MLmPniw3mge9It6Q1xFaXe34td9Zyh+dhxcozEVw7gLr ahr/p7Nd/JiwzByoHYOaC+e2riDoJEd3N2z+TkQGqVcRkkxrPSIEDFb+KCLG6h1IKa6URC jL7Ow2dMLNLZUOV7Y5He9k5j8+RBWmAdfAq42M/WiN2Y52o4aVmUG3gi5pQ2AxV2UVLl3m eREbZ0kifrtLFNUvNwHpvy51uxdhZYUDlFfRRf5+oK85DV+stN6kZcV2rkK8YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719604268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXfsYtZMkIxzJt2fNvGJ/5fjDtd+0alyEAV7hj9NVho=; b=SxYfToNlrW+tuXgnidQH/Urz+HjKhMLZOWT+4sWJATFJCxQE/x5afgD/qofmz27SsX8wOA fSBxH4Bpwxt/PbOcsFxXQVw2Hf4UDoaAYqkj/noGD8WsY0GY14CogLIbvSWyc7ZdUAjjh9 g9Pf4n9Xow7AsgVTPDhJKTV8Y/Tku1O7A9u45rrLBUsJTO4zIPlwjlcouAvBWoGq9nfSJk jYum9jknQuVa6EXOFvYAHFH9yH2RoBdI37OEQpQiaQWAjQKSZ3AEEmM6zgHZFOqsrqjMpd djjZ89qLk8sJG+XjwrzJTwwkI8XwwlnqXyZYgGIgwgb1F54RTzqyxVQp3+TcrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9mJr2CfLz18FK; Fri, 28 Jun 2024 19:51: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 45SJp813050220; Fri, 28 Jun 2024 19:51:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJp8Jj050217; Fri, 28 Jun 2024 19:51:08 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:51:08 GMT Message-Id: <202406281951.45SJp8Jj050217@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: 172fbf12fc22 - stable/13 - MFC zfs/jail: Mark the zfs.mount_snapshot jail parameter as boolean. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/13 X-Git-Reftype: branch X-Git-Commit: 172fbf12fc22395b55d9dba6b81e7088c7ec43bd Auto-Submitted: auto-generated The branch stable/13 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=172fbf12fc22395b55d9dba6b81e7088c7ec43bd commit 172fbf12fc22395b55d9dba6b81e7088c7ec43bd Author: Jamie Gritton AuthorDate: 2024-06-24 20:00:49 +0000 Commit: Jamie Gritton CommitDate: 2024-06-28 19:50:44 +0000 MFC zfs/jail: Mark the zfs.mount_snapshot jail parameter as boolean. PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 (cherry picked from commit 9cbf1de7e34a6fced041388fad5d9180cb7705fe) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 33581d018256..42c8287a7c03 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -102,7 +102,7 @@ static struct zfs_jailparam zfs_jailparam0 = { static int zfs_jailparam_slot; SYSCTL_JAIL_PARAM_SYS_NODE(zfs, CTLFLAG_RW, "Jail ZFS parameters"); -SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "I", +SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "B", "Allow mounting snapshots in the .zfs directory for unjailed datasets"); SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions"); From nobody Fri Jun 28 19:52:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9mL273dcz5PDR6; Fri, 28 Jun 2024 19:52: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9mL26b30z44V8; Fri, 28 Jun 2024 19:52:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719604330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d4LQIjeYsPPlQT3k57oRePQVynL9WDtMk4FDXl3DkJc=; b=JYCwI4QVACvXZq2piQDjU0onsRoG4oyPjFTkPzoqiPnO++TWGEsKMX5gwm4zZzuz9ndwh9 SXpe+4U/isLHg3MXUQYeB22zkeUTl2FEnB97PWVhLI3mezckd7QECjZVBZUT/fu0eRhzt8 1X/x5YtvrlpVRx49Bq4CaCqWrAG/MVY+uspkGcvwIZsOXnJ1e5JY0dhmw3BJSFA7xEkb59 bfu9tlqnlMWmcpsg4v/VzJEX4dFvI4uBrpCAVbA3UNKFzS6mmzwxj9Pu+s42LytDWFYbu+ 3iWhKwlSCm2RrFbtzONBf2jz1+ur7l1ozzH/dnwW4yojSaCYZjXqsTRmHC291A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719604330; a=rsa-sha256; cv=none; b=WqtFY104RoBq0adVOV11zA73JFMOo6P9KzwqVK4ly0xWMIZjLCrqwVOUVPWETnHXhz0sTR piG3Y8HYrd7FvEcEfeq5sPbBu69+SWiqFzExd23k0eacQ2KF3jN4bSUPWBsqXRvnzwDQfz t1E0Kys/nIF392qKWWtiEMMbrcYaaFgWI6eVhWUJ8HMFdG5myiSJysQea98pPE0yRl62aC hlL0n58YmygVqiSVXREOp3vNPncIPOZDhFW04S4UA0TgbipvHrIkacY486DkJZEbw2dc84 ODM4HvYes1uAc8WtMZRlt0iBXPCU+72iNuXz/+K22g/5uAi22pSYBA4x43Oz+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=1719604330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d4LQIjeYsPPlQT3k57oRePQVynL9WDtMk4FDXl3DkJc=; b=Ib8pV4pQhAenKoQaWryI1PF7Nlcu3xeb6nEf7FHGutkq58BV+vh/dET7pHDHOm0JQAetvx fLhZ6sP4mEwfI0RFaONrL/YROU8PIjs4hQha6ANVmkEjUyIwygJ0LJd2ErKKAm56DUzo3A tD/Ri3nX2V8eW6305NCTKFJONaCQx4tXd3zEeDRp+8EFWYETeho+CXUGlpVpLesa4swCDY Gd06MOVVaLSv8qsEzaegb/ST8UTshuUrDl70/U5wClozlkwR3lHt+jJE8eYw48hr3QNJgv BJxClRhoZBY8fSE/la6/nwkKX4jYi8zMvPANM6jUTqxiCrFSZwcjhkkg6r5ZPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9mL26B7Zz189q; Fri, 28 Jun 2024 19:52: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 45SJqAaF053533; Fri, 28 Jun 2024 19:52:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SJqAlI053530; Fri, 28 Jun 2024 19:52:10 GMT (envelope-from git) Date: Fri, 28 Jun 2024 19:52:10 GMT Message-Id: <202406281952.45SJqAlI053530@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: 0e391d97fbe4 - stable/13 - MFC zfs/jail: Document the zfs.mount_snapshot parameter in 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/13 X-Git-Reftype: branch X-Git-Commit: 0e391d97fbe4d0369b001f1e645f6984c8c1bca1 Auto-Submitted: auto-generated The branch stable/13 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=0e391d97fbe4d0369b001f1e645f6984c8c1bca1 commit 0e391d97fbe4d0369b001f1e645f6984c8c1bca1 Author: Jamie Gritton AuthorDate: 2024-06-24 20:03:45 +0000 Commit: Jamie Gritton CommitDate: 2024-06-28 19:51:58 +0000 MFC zfs/jail: Document the zfs.mount_snapshot parameter in jail(8). PR: 274263 Differential Revision: https://reviews.freebsd.org/D45647 (cherry picked from commit 63875db56bd545896e019c922378f96ad5adc892) --- usr.sbin/jail/jail.8 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index fa2a9d472d3e..b66e3464dc5e 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 12, 2023 +.Dd June 24, 2024 .Dt JAIL 8 .Os .Sh NAME @@ -757,7 +757,15 @@ the jail cannot perform any sysvmsg-related system calls. .It Va sysvsem, sysvshm Allow access to SYSV IPC semaphore and shared memory primitives, in the same manner as -.Va sysvmsg. +.Va sysvmsg . +.It Va zfs.mount_snapshot +Allow jailed users to access the contents of ZFS snapshots under the +filesystem's +.Pa .zfs +directory. +If +.Va allow.mount.zfs +is set, the snapshots may also be mounted. .El .Pp There are pseudo-parameters that are not passed to the kernel, but are From nobody Fri Jun 28 22:51:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9rJc6c6xz5PnB5; Fri, 28 Jun 2024 22:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9rJc5Gj7z4LGB; Fri, 28 Jun 2024 22:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719615072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QD+VJ9NDWUU9edfZhVEte9BvmlhE/7lnj0eXXqv3L3k=; b=fZlcOnBq/LTdIZJVPuZMEXnFJrBkbLnmS5MROgtQNgI69RF37TCBI7+WbrDjX012HfsVoo YF+y+cgXVoqIFGG+Kwhn5amnKImrYTJmVgg763RwVIgTlzm/dariNAkWTbdxCjA9J0v08l fQYrYbFSpAYF8yA+kupRVmVTSQYEkuIGLKW6Au/4ZOLX8YXBr5i0aZ2W8Koc3tEBz1Glff lfbv/OgqXzMwBeXj+d/2sZNVzCcrF9Yj+c1QI/mniCVqMOffpBsyyRaEaoixAUJPfKMuP1 QcCYllTMm/pHrOhwTFlqUUOpZBo6sdjQbZxUxM0g+ozk7c8/jpIhYqyRU+O3yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719615072; a=rsa-sha256; cv=none; b=QXMxT/em9cYVy/qoRlQFqKSxsEWu+G/h3YjyOxSm82OrNQgCZcnRNR/+VTnj26VOD3XD/n k2eX8eBEWUmkFGYzAStmarSIxXxvfetq5noV7TdryE8hPZXGr1PMzfFNgCiHSFWOxQnTZL 60VdcVBar6Pz9u75NKbJkgvCuedGgFvEuXTaOV1H/LnUksVP8LxNF7i31rxKdL68fS5NXH By+hyn3ez3xlF6C9G7d551XGySrQSfLCSs6MNo6dyVXdqYRZwW8gAw0F9v1FTvkJ7KonRB axTtV8v0yuFd1iFeRBQETvjeOfV85SBqe1xSFnokKrmxS509Z8TsyboNU5uR2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719615072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QD+VJ9NDWUU9edfZhVEte9BvmlhE/7lnj0eXXqv3L3k=; b=LiKZhmxs9kYaOlJuaZwNMhrZGFzWJAkDHZuernL69mRQbxiyi/jhUISNfV/Bxd58RxzGLT YJhjvFH/bIVO4le2coJCovwPz7Bnx8Kp0p0v9XhF+1VHpPkvlstwL4qXNAN2jh4u//cO8O feHmT1cajlqMKcvq0HH2C3iUTsICc2QdAWit/hP4k3rZae4GMj0SUHdSnjrc1HBk4GwUYm OqlnsaZ16VrsG1226PKJSn1q8PDoBAaKZf7b3FWxpxSppmxFw47Dk9ZELgtjIv7nPWS7D9 O01amZcHQ8qzmcXuihnzHfrb9TwSPSvvEi2ZPKXMFJkkdIkdgil995ylJ8k+Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9rJc4tMKzDcl; Fri, 28 Jun 2024 22:51: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 45SMpCXJ052650; Fri, 28 Jun 2024 22:51:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45SMpCtl052647; Fri, 28 Jun 2024 22:51:12 GMT (envelope-from git) Date: Fri, 28 Jun 2024 22:51:12 GMT Message-Id: <202406282251.45SMpCtl052647@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: 59c21ed6e811 - main - release: Bump default VM size for riscv64 to 6 GB List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 59c21ed6e811c753f7806766ba45a5bfa71ae2ed Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=59c21ed6e811c753f7806766ba45a5bfa71ae2ed commit 59c21ed6e811c753f7806766ba45a5bfa71ae2ed Author: Colin Percival AuthorDate: 2024-06-28 22:47:11 +0000 Commit: Colin Percival CommitDate: 2024-06-28 22:47:11 +0000 release: Bump default VM size for riscv64 to 6 GB Due to issues with the riscv64 toolchain, some binaries end up significantly larger on riscv64 than they should be. This results in riscv64 VM images -- and at present *only* riscv64 images -- not fitting within the default 5 GB filesystem size. Bump the default size for riscv64 to 6 GB until the toolchain issues can be resolved. MFC after: 1 week Sponsored by: Amazon --- release/Makefile.vm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/Makefile.vm b/release/Makefile.vm index f5dc6af67189..d8914d305e2f 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -6,7 +6,11 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw +.if ${TARGET_ARCH} == riscv64 +VMSIZE?= 6144m +.else VMSIZE?= 5120m +.endif VMFS?= ufs VMFSLIST?= ufs zfs SWAPSIZE?= 1g From nobody Sat Jun 29 00:17:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9tDC6jf6z5PwS9 for ; Sat, 29 Jun 2024 00:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9tDC6Gb1z4SCQ; Sat, 29 Jun 2024 00:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719620251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pP4Br0lmHXtv6czULejVmbRfE30jn1/VF8hgZLDpsWk=; b=iyVOOIdObKq9jwQnUJk5gEy2uawXY2vnUbdLGWp4ogRVBrJTTX0F5ojvh2T+OPyzNngro2 NO8mr1KBDH6kX4O8J+Jmy1C5dCShpI6AsdLifpDCH0V4f+veAxcsdC7Zl6emDiH09/Q7ts 4BQ1sq8/cL9GPtPi9rrFzIg9K8vDwVw1YyJyvrtAXNZVnjKDCZLLOMYxbs43tao3Z8I5rY 6hGxa4UX5mdJ0rEVXWevm28KITLr+5b7j1Keb/6OT63u/0xG/rzwT/C5/ByLUoK1fwmw6v QtqE3TBt3vB4/bCqQv/LxPVJ8ibkSjE7tIDbHxyxlkBlP1Ec9HYsznb4hzegNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719620251; a=rsa-sha256; cv=none; b=g8nrOCgSEHRDbphHJp6xwDPzF+dKz8BfFycfy0LR9ioYC2qMu9n24HxYmZvlPku4vpMSk6 NQ4LAIS0HOkO3j+khFUErp7fGG62hPmmEcct1fU+PlPmIs/DZ2ekM9XkS5xELFQ9EQhyRX pfx6j7LSIi5I4V+9oUtnSyZ4wDHS0sXoEHKZnWLmwloKl6DcTAzQAKrzvRWyH0IImJvu3q 7dz49A9bM1B5JC5tAXcQJfpsm2PGknK9fPFT8DAhDU7H3zivqVKuxZgOOpilOcK82wuH2u 5NujqP8R2xj8ZrXGMxA/ad6Kqc8bPo3gnOy1ujAukYyqhRWS6BxQG0XnnEIt3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719620251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pP4Br0lmHXtv6czULejVmbRfE30jn1/VF8hgZLDpsWk=; b=eFv1fR1ZCltMMzucRf+UZ3O82gVMchIMrM7VR1O7qsy5O3Q4U7Ifmvio2C+GjrL3VR7eCk Z2KuzcgEOvFzPwdaz6MAjkv/X0kq9ei6rQZJZlWj5GaxjEeSTpSQrzkFlzpZzgX4Viujx5 C9DVawdvxSDPnTVAoFD8YxHimZKtes2e9qZsKtHN3PQyd4mx7OWTZFN4YgKjyWpkYHoogs i2JCaZRydb9QgD3I33XWd78vXmb+RQMXrm5biVHRJOkMrVedZSccxBEX1tAz4+hKhq7DAc qi3/i9hALWRgYkoMEGBd6T41nKJmy9qnCfpOx4aEUZFz2uJeKcHZLX44EG8Big== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9tDC5c8GzHLQ; Sat, 29 Jun 2024 00:17: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 45T0HV6X093032; Sat, 29 Jun 2024 00:17:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45T0HVwS093031; Sat, 29 Jun 2024 00:17:31 GMT (envelope-from git) Date: Sat, 29 Jun 2024 00:17:31 GMT Message-Id: <202406290017.45T0HVwS093031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 29efb3dcaedd..dbb5be7f0745 - vendor/NetBSD/bmake - 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/vendor/NetBSD/bmake X-Git-Reftype: branch X-Git-Commit: dbb5be7f07456d02ce444484c683b130439acb45 X-Git-Oldrev: 29efb3dcaedd9cbabc6f96f35545baf2c8b28501 X-Git-Newrev: dbb5be7f07456d02ce444484c683b130439acb45 Auto-Submitted: auto-generated The branch vendor/NetBSD/bmake has been updated by sjg: URL: https://cgit.FreeBSD.org/src/log/?id=29efb3dcaedd..dbb5be7f0745 dbb5be7f0745 Import bmake-20240625 From nobody Sat Jun 29 00:17:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9tDD2B28z5PwPY for ; Sat, 29 Jun 2024 00:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9tDC6fTJz4S93; Sat, 29 Jun 2024 00:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719620251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uYunSieyL60pGrCcSuQ4iHEib/QSH8cVXgyU5uQ8AaI=; b=wPUH4Er3Kq2uotZwxWj+ONgArswM3kEtrOxRO2zmp6Lam1wZp1m/PlmdPQclqoM6x7xCVq EURwoXkX7niiCcIAGxpQsr9RjKSja1Ph+re0H3RU8vK0WMdqg0VuQ3OWJ/wlkk0CYm8woW 1+x73cltK6x6flN53PoB0DxTJrKzE5nmK9bJM0vsauP6lxojmn6T9UlRkZSMc0WKVETTht 8MGi9ddoTcnDx5XiMZpQRtn8u4DuiqvyAprCSKHgdLYq1xsqLETwDhrLFM3rjJA3Zr9FYW 8BBbRpC2va0Fj1Tn4ED8Bm6vc+YjA3TKBz/gTA/XaXiyrF5jIqPRCwKdTl4w+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719620251; a=rsa-sha256; cv=none; b=SFTfgA+5TXac0x7SQZqsgqwbrwwOXu3js7NWLqw4mPoSa0s5HVM0361O7YJ57i89BupzHv E0KS47S8iffaZqKGJFAZ2gW59WPlk/axjx6hkdqmxand0p75nXNBMXAjLauKTMvAU9Wcvi A6tdiQIvOA75Rg/IVuXlhXC0BCHj8iWfb5A4zVoo+veMllZD1s0hnWweh38MHzsM6dSn8O U+TzeBS9h2ClLjtRNKB1y5l+2qnuhb/WBfEFPXYmLU7bvDzKW+eWO/s4gSSNAgdu1Enr2C oqCC7Mw51ngbUdofPAxiFQlFTywSdc0AN7PLU/XKrCoehx0yofjZSh0F8oyASQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719620251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uYunSieyL60pGrCcSuQ4iHEib/QSH8cVXgyU5uQ8AaI=; b=Y5lbvrzrTISvulzSyrU04BaAkBbn6tQGqXUdg2LLzU39P0H/o5fY6YoHEjqsQ+8OhF1uRb sF7TwMQu+WdV2FZsJn/e0EVA/mz14Zdx/u1NHyf7t5W38MWxPLkuzBL7+fY9xpKz1GbeNr imbmu92mkMxkKCfKYDMzfdPPbkFWl+5l7vQNbPyXQ+7tLK6nMN7k37Rh7u5IC9qjHAEclw kmaMWNs5/SM2LKJA2JnhMU54V/sJ99uKVSv+GS2qgw5Bg+n8bhEi/toGfM4aSz/SdXd97v q9Kimyen45rjBZegDF+W7Y+insiWSvvKE0Ww1iwQALPLmPd2IhPpIOmxxNx94g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9tDC6FcpzHTb; Sat, 29 Jun 2024 00:17: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 45T0HVGJ093051; Sat, 29 Jun 2024 00:17:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45T0HV3v093050; Sat, 29 Jun 2024 00:17:31 GMT (envelope-from git) Date: Sat, 29 Jun 2024 00:17:31 GMT Message-Id: <202406290017.45T0HV3v093050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 8c989f2bbe87 - Create tag vendor/NetBSD/bmake/20240625 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/tags/vendor/NetBSD/bmake/20240625 X-Git-Reftype: annotated tag X-Git-Commit: 8c989f2bbe871533d7a41e2285a166de12f555ec Auto-Submitted: auto-generated The annotated tag vendor/NetBSD/bmake/20240625 has been created by sjg: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/NetBSD/bmake/20240625 tag vendor/NetBSD/bmake/20240625 Tagger: Simon J. Gerraty TaggerDate: 2024-06-29 00:17:11 +0000 Tag bmake/20240625 commit dbb5be7f07456d02ce444484c683b130439acb45 Author: Simon J. Gerraty AuthorDate: 2024-06-29 00:16:32 +0000 Commit: Simon J. Gerraty CommitDate: 2024-06-29 00:16:32 +0000 Import bmake-20240625 Intersting/relevant changes since bmake-20240520 ChangeLog since bmake-20240520 2024-06-25 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240625 Merge with NetBSD make, pick up o job.c: ensure shellPath is always duped, avoid upsetting free() 2024-06-16 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240616 Merge with NetBSD make, pick up o clean up collection of context information for error messages o in warnings, move the word "warning" to the front o var.c: throw an error on attempt to override an internal read-only variable 2024-06-10 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240610 Merge with NetBSD make, pick up o for.c: remove redundant shortcut for building the .for loop body 2024-06-02 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240602 Merge with NetBSD make, pick up o rename some VarEvalMode constants to better match debug names. o var.c: avoid out-of-bounds read when parsing indirect modifiers. 2024-06-01 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240601 Merge with NetBSD make, pick up o add .export-all rather than allow .export with no argument which can happen accidentally. o if lua is available, run check-expect.lua after unit-tests o main.c: use snprintf rather than strncpy fix memory leak when purging realpath cache. 2024-05-28 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240528 Merge with NetBSD make, pick up o fix a number of memory leaks o replace magic numbers with POSIX FILENO constants o hash.c: remove dead code from HashTable_DeleteEntry o main.c: when complaining about unusable .OBJDIR call PrintOnError if MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is true. o parse.c: use fewer technical terms in debug message for dependency mk/ChangeLog since bmake-20240520 2024-06-22 Simon J Gerraty * install-mk (MK_VERSION): 20240616 * dirdeps.mk: apply DEP_DIRDEPS_BUILD_DIR_FILTER after we have computed build dirs, since some filters cannot be easily expressed via DEP_DIRDEPS_FILTER. 2024-05-31 Simon J Gerraty * dirdeps.mk: move reset of DIRDEPS_EXPORT_VARS until after we a finished with it if building a cache. From nobody Sat Jun 29 00:23:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9tMZ28Nzz5Pwqy; Sat, 29 Jun 2024 00:23: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9tMZ1mxnz4T9r; Sat, 29 Jun 2024 00:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719620634; h=from:from:reply-to:subject:subject: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/UUKMi3qSaddvL4xEtLr3LvuadM4YIfjqcudqnSl5c=; b=PHSHvOSm7ZsB7ijbnnGu+zPIrTK09sYB3FPsYpWj2nz1fp5Jd15RYgC6VcWxUU0h+oUhYr scKE8SdwbXVDuVNOWM22UeNLiYBX4Tm7ecHx8tW4IWhewc2hrjeqWkoOdTO1Eo6kQw7T/m mzM3Q78KXKl1XgMshVCPPPVqeZNhuAD8S9kT8Eh5t9SOnI3pF0hv9DtxA5atm6DCB1ZyMt /fbelAGWbbwlXxVvK7O1xKpafkdyCCY4QHZ4VdlkkhAHalN9QscDZ/lcs4jAdPlkwglOd7 4oROZ/ON6hH9CjTv8wUJOFuqTehBDz5nN389SfgvjO+vc4+O92THAjNrXZD88A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719620634; a=rsa-sha256; cv=none; b=Dc9JKeb0hb8dnthCLGZfudjggTnUVQCq62dNNhf8hYemeHQzwyARP/AOTKQof5w0f90sqh PmYfesCeBgQBdJTb98l0YJGOG86+QMlQJuKnU2jZRHi1JcqLKd4WSWOp3RC3JnpbftHhU4 92VdLnJeoDLfARHGepwsG2nnI79cpw7kLugYwOPHdCf5ILl+VW61ArUuiMkxoMtCKfa5NE jpSVVVpV8O3O2s8WuVGFf3BGb/+iMhQ9OIbHy5Sayz5scdMxc9iBqBQy3HLX8wNUM+QXUA FX4YyeX5GhHa9joYpAZzYiy1C9EfU+AvevmQJVb4xzpHeKcQnnQvzkAFaRpIuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719620634; h=from:from:reply-to:subject:subject: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/UUKMi3qSaddvL4xEtLr3LvuadM4YIfjqcudqnSl5c=; b=ZMFbAU8Zl6lz2yWCJxbNKgfqvXuSGsLKX0Q0B6Uf0FfPXLUqYOkcY0Xwv+JWgb4Hf5mZ/K C4vsHD9JBTOJGt6RhkbkyLYxX1uDuDj9N7n5hsXezjRGlILMrdgnwON9o0Zqa5Ps24rXl8 JqYvzaSwb/Y8pNpLDzJQe6PllXpJiYeXc6W7VQ611AEe+gQ+ITvMNkX/9gjYikvfLaci46 G0wFdJO0YlR63xv19fRw9ZVIUBD9Rv65ze3dGaLyNDVZK1MEBlV+tHNob7suWHVJHWL8hH CACTs0HQ7M0pciO5t5KJ4G0+TL+V9RrgxdX8+YsFtH/BExqrV90UxgNMcK+zGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9tMZ1N8gzHDc; Sat, 29 Jun 2024 00:23: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 45T0Nsc3009229; Sat, 29 Jun 2024 00:23:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45T0NmaX009218; Sat, 29 Jun 2024 00:23:48 GMT (envelope-from git) Date: Sat, 29 Jun 2024 00:23:48 GMT Message-Id: <202406290023.45T0NmaX009218@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: 8d5c8e21c690 - main - Merge bmake-20240625 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 8d5c8e21c690b35d0a9a604d6b886fba222cd2fe Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8d5c8e21c690b35d0a9a604d6b886fba222cd2fe commit 8d5c8e21c690b35d0a9a604d6b886fba222cd2fe Merge: 59c21ed6e811 dbb5be7f0745 Author: Simon J. Gerraty AuthorDate: 2024-06-29 00:19:51 +0000 Commit: Simon J. Gerraty CommitDate: 2024-06-29 00:22:11 +0000 Merge bmake-20240625 Merge commit 'dbb5be7f07456d02ce444484c683b130439acb45' contrib/bmake/ChangeLog | 49 ++++ contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 15 +- contrib/bmake/bmake.1 | 33 ++- contrib/bmake/bmake.cat1 | 26 +- contrib/bmake/compat.c | 57 ++-- contrib/bmake/cond.c | 21 +- contrib/bmake/dir.c | 25 +- contrib/bmake/for.c | 34 +-- contrib/bmake/hash.c | 31 +-- contrib/bmake/hash.h | 4 +- contrib/bmake/job.c | 36 ++- contrib/bmake/main.c | 61 +++-- contrib/bmake/make.1 | 33 ++- contrib/bmake/make.c | 36 +-- contrib/bmake/make.h | 41 +-- contrib/bmake/meta.c | 25 +- contrib/bmake/mk/ChangeLog | 13 + contrib/bmake/mk/dirdeps.mk | 46 +++- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/parse.c | 67 +++-- contrib/bmake/suff.c | 9 +- contrib/bmake/targ.c | 20 +- contrib/bmake/unit-tests/Makefile | 13 +- contrib/bmake/unit-tests/cond-func-empty.mk | 26 +- contrib/bmake/unit-tests/dep-duplicate.exp | 2 +- contrib/bmake/unit-tests/dep-duplicate.mk | 8 +- contrib/bmake/unit-tests/dep-var.exp | 4 +- contrib/bmake/unit-tests/dep-var.mk | 6 +- .../bmake/unit-tests/directive-export-literal.exp | 3 + .../bmake/unit-tests/directive-export-literal.mk | 25 +- contrib/bmake/unit-tests/directive-export.exp | 7 +- contrib/bmake/unit-tests/directive-export.mk | 8 +- contrib/bmake/unit-tests/directive-for-empty.exp | 7 +- contrib/bmake/unit-tests/directive-for-empty.mk | 26 +- contrib/bmake/unit-tests/directive-for-errors.mk | 4 +- contrib/bmake/unit-tests/export-all.mk | 4 +- contrib/bmake/unit-tests/opt-debug-hash.exp | 2 +- contrib/bmake/unit-tests/opt-debug-hash.mk | 7 +- contrib/bmake/unit-tests/parse-var.mk | 10 +- contrib/bmake/unit-tests/recursive.mk | 4 +- contrib/bmake/unit-tests/shell-csh.mk | 4 +- contrib/bmake/unit-tests/suff-incomplete.exp | 2 +- contrib/bmake/unit-tests/suff-main-several.exp | 2 +- contrib/bmake/unit-tests/var-eval-short.exp | 18 +- contrib/bmake/unit-tests/varmod-head.mk | 8 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 4 +- contrib/bmake/unit-tests/varmod-loop.exp | 10 +- contrib/bmake/unit-tests/varmod-loop.mk | 16 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 4 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 6 +- contrib/bmake/unit-tests/varmod-match.exp | 22 +- contrib/bmake/unit-tests/varmod-match.mk | 27 +- contrib/bmake/unit-tests/varmod-sysv.exp | 2 + contrib/bmake/unit-tests/varmod-sysv.mk | 10 +- contrib/bmake/unit-tests/varmod-tail.mk | 10 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 24 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 15 +- contrib/bmake/unit-tests/varmod-undefined.mk | 51 +++- contrib/bmake/unit-tests/varmod.exp | 25 ++ contrib/bmake/unit-tests/varmod.mk | 125 ++++++++- .../bmake/unit-tests/varname-dot-make-level.exp | 3 + contrib/bmake/unit-tests/varname-dot-make-level.mk | 24 +- contrib/bmake/unit-tests/varname-dot-newline.exp | 5 + contrib/bmake/unit-tests/varname-dot-newline.mk | 13 +- contrib/bmake/unit-tests/varname-dot-objdir.exp | 1 + contrib/bmake/unit-tests/varname-dot-objdir.mk | 11 +- contrib/bmake/unit-tests/varparse-errors.mk | 4 +- contrib/bmake/var.c | 298 ++++++++++++--------- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 13 +- 71 files changed, 1029 insertions(+), 584 deletions(-) diff --cc contrib/bmake/job.c index 541a61294766,d260e21911aa..a5c3d704e4a1 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@@ -1484,15 -1465,14 +1481,15 @@@ JobExec(Job *job, char **argv * was marked close-on-exec, we must clear that bit in the * new input. */ - if (dup2(fileno(job->cmdFILE), 0) == -1) + if (dup2(fileno(job->cmdFILE), STDIN_FILENO) == -1) execDie("dup2", "job->cmdFILE"); - if (fcntl(0, F_SETFD, 0) == -1) + if (fcntl(STDIN_FILENO, F_SETFD, 0) == -1) execDie("fcntl clear close-on-exec", "stdin"); - if (lseek(0, 0, SEEK_SET) == -1) + if (lseek(STDIN_FILENO, 0, SEEK_SET) == -1) execDie("lseek to 0", "stdin"); - if (job->node->type & (OP_MAKE | OP_SUBMAKE)) { + if (Always_pass_job_queue || + (job->node->type & (OP_MAKE | OP_SUBMAKE))) { /* Pass job token pipe to submakes. */ if (fcntl(tokenWaitJob.inPipe, F_SETFD, 0) == -1) execDie("clear close-on-exec", diff --cc usr.bin/bmake/Makefile.config index e62d207b70ac,000000000000..1d9a6a2880ea mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,28 -1,0 +1,28 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# things set by configure + - _MAKE_VERSION?=20240520 ++_MAKE_VERSION?=20240625 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc +MAKE_OS?= +DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk + +EGREP = egrep +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H +LDFLAGS+= +LIBOBJS+= ${LIBOBJDIR}stresep$U.o +LDADD+= +USE_META?= yes +USE_FILEMON?= dev +FILEMON_H?= /usr/include/dev/filemon/filemon.h +BMAKE_PATH_MAX?= 1024 +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} diff --cc usr.bin/bmake/unit-tests/Makefile index a461d0c874c9,000000000000..20e1b1cf94ee mode 100644,000000..100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@@ -1,888 -1,0 +1,893 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# - # $Id: Makefile,v 1.216 2024/04/30 16:42:50 sjg Exp $ ++# $Id: Makefile,v 1.219 2024/06/01 16:14:47 sjg Exp $ +# - # $NetBSD: Makefile,v 1.344 2024/04/30 16:41:32 sjg Exp $ ++# $NetBSD: Makefile,v 1.347 2024/06/01 15:54:40 sjg Exp $ +# +# Unit tests for make(1) +# +# The main targets are: +# +# all: +# run all the tests +# test: +# run 'all', and compare to expected results +# accept: +# move generated output to expected results +# +# Settable variables +# +# TEST_MAKE +# The make program to be tested. +# +# +# Adding a test case +# +# Each feature should get its own set of tests in its own suitably +# named makefile (*.mk), with its own set of expected results (*.exp), +# and it should be added to the TESTS list. +# + +.MAIN: all + +# we use these below but we might be an older make +.MAKE.OS?= ${uname -s:L:sh} +.MAKE.UID?= ${id -u:L:sh} + +# for many tests we need a TMPDIR that will not collide +# with other users. +.if ${.OBJDIR} != ${.CURDIR} +# easy +TMPDIR:= ${.OBJDIR}/tmp +.elif defined(TMPDIR) +TMPDIR:= ${TMPDIR}/uid${.MAKE.UID} +.else +TMPDIR:= /tmp/uid${.MAKE.UID} +.endif +# make sure it exists +.if !exist(${TMPDIR}) +_!= mkdir -p ${TMPDIR} +.endif + +# Each test is in a sub-makefile. +# Keep the list sorted. +# Any test that is commented out must be ignored in +# src/tests/usr.bin/make/t_make.sh as well. +#TESTS+= archive +#TESTS+= archive-suffix +TESTS+= cmd-errors +TESTS+= cmd-errors-jobs +TESTS+= cmd-errors-lint +TESTS+= cmd-interrupt +TESTS+= cmdline +TESTS+= cmdline-redirect-stdin +TESTS+= cmdline-undefined +TESTS+= comment +TESTS+= compat-error +TESTS+= cond-cmp-numeric +TESTS+= cond-cmp-numeric-eq +TESTS+= cond-cmp-numeric-ge +TESTS+= cond-cmp-numeric-gt +TESTS+= cond-cmp-numeric-le +TESTS+= cond-cmp-numeric-lt +TESTS+= cond-cmp-numeric-ne +TESTS+= cond-cmp-string +TESTS+= cond-cmp-unary +TESTS+= cond-eof +TESTS+= cond-func +TESTS+= cond-func-commands +TESTS+= cond-func-defined +TESTS+= cond-func-empty +TESTS+= cond-func-exists +TESTS+= cond-func-make +TESTS+= cond-func-make-main +TESTS+= cond-func-target +TESTS+= cond-late +TESTS+= cond-op +TESTS+= cond-op-and +TESTS+= cond-op-and-lint +TESTS+= cond-op-not +TESTS+= cond-op-or +TESTS+= cond-op-or-lint +TESTS+= cond-op-parentheses +TESTS+= cond-short +TESTS+= cond-token-number +TESTS+= cond-token-plain +TESTS+= cond-token-string +TESTS+= cond-token-var +TESTS+= cond-undef-lint +TESTS+= counter +TESTS+= counter-append +TESTS+= dep +TESTS+= dep-colon +TESTS+= dep-colon-bug-cross-file +TESTS+= dep-double-colon +TESTS+= dep-double-colon-indep +TESTS+= dep-duplicate +TESTS+= dep-exclam +TESTS+= dep-none +TESTS+= dep-op-missing +TESTS+= dep-percent +TESTS+= dep-var +TESTS+= dep-wildcards +TESTS+= depsrc +TESTS+= depsrc-end +TESTS+= depsrc-exec +TESTS+= depsrc-ignore +TESTS+= depsrc-made +TESTS+= depsrc-make +TESTS+= depsrc-meta +TESTS+= depsrc-nometa +TESTS+= depsrc-nometa_cmp +TESTS+= depsrc-nopath +TESTS+= depsrc-notmain +TESTS+= depsrc-optional +TESTS+= depsrc-phony +TESTS+= depsrc-precious +TESTS+= depsrc-recursive +TESTS+= depsrc-silent +TESTS+= depsrc-use +TESTS+= depsrc-usebefore +TESTS+= depsrc-usebefore-double-colon +TESTS+= depsrc-wait +TESTS+= deptgt +TESTS+= deptgt-begin +TESTS+= deptgt-begin-fail +TESTS+= deptgt-begin-fail-indirect +TESTS+= deptgt-default +TESTS+= deptgt-delete_on_error +TESTS+= deptgt-end +TESTS+= deptgt-end-fail +TESTS+= deptgt-end-fail-all +TESTS+= deptgt-end-fail-indirect +TESTS+= deptgt-end-jobs +TESTS+= deptgt-error +TESTS+= deptgt-ignore +TESTS+= deptgt-interrupt +TESTS+= deptgt-main +TESTS+= deptgt-makeflags +TESTS+= deptgt-no_parallel +TESTS+= deptgt-nopath +TESTS+= deptgt-notparallel +TESTS+= deptgt-objdir +TESTS+= deptgt-order +TESTS+= deptgt-path +TESTS+= deptgt-path-suffix +TESTS+= deptgt-phony +TESTS+= deptgt-posix +TESTS+= deptgt-precious +TESTS+= deptgt-shell +TESTS+= deptgt-silent +TESTS+= deptgt-silent-jobs +TESTS+= deptgt-stale +TESTS+= deptgt-suffixes +TESTS+= dir +TESTS+= dir-expand-path +TESTS+= directive +TESTS+= directive-dinclude +TESTS+= directive-elif +TESTS+= directive-elifdef +TESTS+= directive-elifmake +TESTS+= directive-elifndef +TESTS+= directive-elifnmake +TESTS+= directive-else +TESTS+= directive-endfor +TESTS+= directive-endif +TESTS+= directive-error +TESTS+= directive-export +TESTS+= directive-export-env +TESTS+= directive-export-impl +TESTS+= directive-export-gmake +TESTS+= directive-export-literal +TESTS+= directive-for +TESTS+= directive-for-break +TESTS+= directive-for-empty +TESTS+= directive-for-errors +TESTS+= directive-for-escape +TESTS+= directive-for-generating-endif +TESTS+= directive-for-if +TESTS+= directive-for-lines +TESTS+= directive-for-null +TESTS+= directive-hyphen-include +TESTS+= directive-if +TESTS+= directive-if-nested +TESTS+= directive-ifdef +TESTS+= directive-ifmake +TESTS+= directive-ifndef +TESTS+= directive-ifnmake +TESTS+= directive-include +TESTS+= directive-include-fatal +TESTS+= directive-include-guard +TESTS+= directive-info +TESTS+= directive-misspellings +TESTS+= directive-sinclude +TESTS+= directive-undef +TESTS+= directive-unexport +TESTS+= directive-unexport-env +TESTS+= directive-warning +TESTS+= dollar +TESTS+= doterror +TESTS+= dotwait +TESTS+= error +TESTS+= # escape # broken by reverting POSIX changes +TESTS+= export +TESTS+= export-all +TESTS+= export-env +TESTS+= export-variants +TESTS+= gnode-submake +TESTS+= hanoi-include +TESTS+= impsrc +TESTS+= include-main +TESTS+= job-flags +TESTS+= job-output-long-lines +TESTS+= job-output-null +TESTS+= jobs-empty-commands +TESTS+= jobs-empty-commands-error +TESTS+= jobs-error-indirect +TESTS+= jobs-error-nested +TESTS+= jobs-error-nested-make +TESTS+= lint +TESTS+= make-exported +TESTS+= meta-cmd-cmp +TESTS+= moderrs +TESTS+= modmisc +.if ${.MAKE.UID} > 0 +TESTS+= objdir-writable +.endif +TESTS+= opt +TESTS+= opt-backwards +TESTS+= opt-chdir +TESTS+= opt-debug +TESTS+= opt-debug-all +TESTS+= opt-debug-archive +TESTS+= opt-debug-curdir +TESTS+= opt-debug-cond +TESTS+= opt-debug-dir +TESTS+= opt-debug-errors +TESTS+= opt-debug-errors-jobs +TESTS+= opt-debug-file +TESTS+= opt-debug-for +TESTS+= opt-debug-graph1 +TESTS+= opt-debug-graph2 +TESTS+= opt-debug-graph3 +TESTS+= opt-debug-hash +TESTS+= opt-debug-jobs +TESTS+= opt-debug-lint +TESTS+= opt-debug-loud +TESTS+= opt-debug-meta +TESTS+= opt-debug-making +TESTS+= opt-debug-no-rm +TESTS+= opt-debug-parse +TESTS+= opt-debug-suff +TESTS+= opt-debug-targets +TESTS+= opt-debug-varraw +TESTS+= opt-debug-var +TESTS+= opt-debug-x-trace +TESTS+= opt-define +TESTS+= opt-env +TESTS+= opt-file +TESTS+= opt-ignore +TESTS+= opt-include-dir +TESTS+= opt-jobs +TESTS+= opt-jobs-internal +TESTS+= opt-jobs-no-action +TESTS+= opt-keep-going +TESTS+= opt-keep-going-indirect +TESTS+= opt-keep-going-multiple +TESTS+= opt-m-include-dir +TESTS+= opt-no-action +TESTS+= opt-no-action-at-all +TESTS+= opt-no-action-runflags +TESTS+= opt-no-action-touch +TESTS+= opt-query +TESTS+= opt-raw +TESTS+= opt-silent +TESTS+= opt-touch +TESTS+= opt-touch-jobs +TESTS+= opt-tracefile +TESTS+= opt-var-expanded +TESTS+= opt-var-literal +TESTS+= opt-version +TESTS+= opt-warnings-as-errors +TESTS+= opt-where-am-i +TESTS+= opt-x-reduce-exported +TESTS+= order +TESTS+= parse +TESTS+= parse-var +TESTS+= phony-end +TESTS+= posix +TESTS+= # posix1 # broken by reverting POSIX changes +TESTS+= recursive +TESTS+= sh +TESTS+= sh-dots +TESTS+= sh-errctl +TESTS+= sh-flags +TESTS+= sh-jobs +TESTS+= sh-jobs-error +TESTS+= sh-leading-at +TESTS+= sh-leading-hyphen +TESTS+= sh-leading-plus +TESTS+= sh-meta-chars +TESTS+= sh-multi-line +TESTS+= sh-single-line +TESTS+= shell-csh +TESTS+= shell-custom +.if exists(/bin/ksh) +TESTS+= shell-ksh +.endif +TESTS+= shell-sh +TESTS+= suff-add-later +TESTS+= suff-clear-regular +TESTS+= suff-clear-single +TESTS+= suff-incomplete +TESTS+= suff-lookup +TESTS+= suff-main +TESTS+= suff-main-several +TESTS+= suff-phony +TESTS+= suff-rebuild +TESTS+= suff-self +TESTS+= suff-transform-debug +TESTS+= suff-transform-endless +TESTS+= suff-transform-expand +TESTS+= suff-transform-select +TESTS+= suff-use +TESTS+= sunshcmd +TESTS+= ternary +TESTS+= unexport +TESTS+= unexport-env +TESTS+= use-inference +TESTS+= var-readonly +TESTS+= var-scope +TESTS+= var-scope-cmdline +TESTS+= var-scope-env +TESTS+= var-scope-global +TESTS+= var-scope-local +TESTS+= var-scope-local-legacy +TESTS+= var-eval-short +TESTS+= var-op +TESTS+= var-op-append +TESTS+= var-op-assign +TESTS+= var-op-default +TESTS+= var-op-expand +TESTS+= var-op-shell +TESTS+= var-op-sunsh +TESTS+= var-recursive +TESTS+= varcmd +TESTS+= vardebug +TESTS+= varfind +TESTS+= varmisc +TESTS+= varmod +TESTS+= varmod-assign +TESTS+= varmod-assign-shell +TESTS+= varmod-defined +TESTS+= varmod-edge +TESTS+= varmod-exclam-shell +TESTS+= varmod-extension +TESTS+= varmod-gmtime +TESTS+= varmod-hash +TESTS+= varmod-head +TESTS+= varmod-ifelse +TESTS+= varmod-indirect +TESTS+= varmod-l-name-to-value +TESTS+= varmod-localtime +TESTS+= varmod-loop +TESTS+= varmod-loop-delete +TESTS+= varmod-loop-varname +TESTS+= varmod-match +TESTS+= varmod-match-escape +TESTS+= varmod-mtime +TESTS+= varmod-no-match +TESTS+= varmod-order +TESTS+= varmod-order-numeric +TESTS+= varmod-order-reverse +TESTS+= varmod-order-shuffle +TESTS+= varmod-order-string +TESTS+= varmod-path +TESTS+= varmod-quote +TESTS+= varmod-quote-dollar +TESTS+= varmod-range +TESTS+= varmod-remember +TESTS+= varmod-root +TESTS+= varmod-select-words +TESTS+= varmod-shell +TESTS+= varmod-subst +TESTS+= varmod-subst-regex +TESTS+= varmod-sun-shell +TESTS+= varmod-sysv +TESTS+= varmod-tail +TESTS+= varmod-to-abs +TESTS+= varmod-to-lower +TESTS+= varmod-to-many-words +TESTS+= varmod-to-one-word +TESTS+= varmod-to-separator +TESTS+= varmod-to-upper +TESTS+= varmod-undefined +TESTS+= varmod-unique +TESTS+= varname +TESTS+= varname-dollar +TESTS+= varname-dot-alltargets +TESTS+= varname-dot-curdir +TESTS+= varname-dot-includes +TESTS+= varname-dot-includedfromdir +TESTS+= varname-dot-includedfromfile +TESTS+= varname-dot-libs +TESTS+= varname-dot-make-dependfile +TESTS+= varname-dot-make-expand_variables +TESTS+= varname-dot-make-exported +TESTS+= varname-dot-make-jobs +TESTS+= varname-dot-make-jobs-prefix +TESTS+= varname-dot-make-level +TESTS+= varname-dot-make-makefile_preference +TESTS+= varname-dot-make-makefiles +TESTS+= varname-dot-make-meta-bailiwick +TESTS+= varname-dot-make-meta-created +TESTS+= varname-dot-make-meta-files +.if ${.MAKE.PATH_FILEMON:Uno:Nktrace:N/dev*} == "" && ${TMPDIR:N/tmp*:N/var/tmp*} != "" +# these tests will not work if TMPDIR is or is a subdir of +# /tmp or /var/tmp +.if ${.MAKE.PATH_FILEMON:N/dev/*} != "" || exists(${.MAKE.PATH_FILEMON}) +TESTS+= varname-dot-make-meta-ignore_filter +TESTS+= varname-dot-make-meta-ignore_paths +TESTS+= varname-dot-make-meta-ignore_patterns +TESTS+= varname-dot-make-path_filemon +.else +.warning Skipping tests that require ${.MAKE.PATH_FILEMON} +.endif +.endif +TESTS+= varname-dot-make-meta-prefix +TESTS+= varname-dot-make-mode +TESTS+= varname-dot-make-pid +TESTS+= varname-dot-make-ppid +TESTS+= varname-dot-make-save_dollars +TESTS+= varname-dot-makeflags +TESTS+= varname-dot-makeoverrides +TESTS+= varname-dot-newline +TESTS+= varname-dot-objdir +TESTS+= varname-dot-parsedir +TESTS+= varname-dot-parsefile +TESTS+= varname-dot-path +TESTS+= varname-dot-shell +TESTS+= varname-dot-suffixes +TESTS+= varname-dot-targets +TESTS+= varname-empty +TESTS+= varname-make +TESTS+= varname-make_print_var_on_error +TESTS+= varname-make_print_var_on_error-jobs +TESTS+= varname-makefile +TESTS+= varname-makeflags +TESTS+= varname-pwd +TESTS+= varname-vpath +TESTS+= varparse-dynamic +TESTS+= varparse-errors +TESTS+= varparse-mod +TESTS+= varparse-undef-partial + +# some shells have quirks +_shell := ${.SHELL:tA:T} +.if ${_shell} == "dash" +# dash fails -x output +BROKEN_TESTS+= opt-debug-x-trace +.elif ${_shell} == "ksh" +BROKEN_TESTS+= sh-flags +.endif + +.if ${UTC_1:Uno} == "" +# this will not work if UTC_1 is set empty +BROKEN_TESTS+= varmod-localtime +.endif + +.if ${.MAKE.OS:NDarwin} == "" +BROKEN_TESTS+= shell-ksh +.endif + +.if ${.MAKE.OS:NIRIX*} == "" +BROKEN_TESTS+= \ + cmd-interrupt \ + deptgt-interrupt \ + job-output-null \ + opt-chdir \ + opt-debug-x-trace \ + sh-leading-hyphen \ + +.endif + +.if ${.MAKE.OS} == "SCO_SV" +BROKEN_TESTS+= \ + opt-debug-graph[23] \ + varmod-localtime \ + varmod-to-separator \ + +.if ${_shell} == "bash" +BROKEN_TESTS+= job-output-null +.else +BROKEN_TESTS+= \ + cmd-interrupt \ + job-flags \ + +.endif +.endif + +# Some tests just do not work on some platforms or environments +# so allow for some filtering. +.if !empty(BROKEN_TESTS) +.warning Skipping broken tests: ${BROKEN_TESTS:O:u} +TESTS:= ${TESTS:${BROKEN_TESTS:S,^,N,:ts:}} +.endif + +# Ideas for more tests: +# char-0020-space.mk +# char-005C-backslash.mk +# escape-cond-str.mk +# escape-cond-func-arg.mk +# escape-varmod.mk +# escape-varmod-define.mk +# escape-varmod-match.mk +# escape-varname.mk +# escape-varassign-varname.mk +# escape-varassign-varname-cmdline.mk +# escape-varassign-value.mk +# escape-varassign-value-cmdline.mk +# escape-dependency-source.mk +# escape-dependency-target.mk +# escape-for-varname.mk +# escape-for-item.mk +# posix-*.mk (see posix.mk and posix1.mk) + +# Additional environment variables for some of the tests. +# The base environment is -i PATH="$PATH". +ENV.depsrc-optional+= TZ=UTC +ENV.deptgt-phony+= MAKESYSPATH=. +ENV.directive-undef= ENV_VAR=env-value +ENV.opt-env= FROM_ENV=value-from-env +ENV.opt-m-include-dir= ${MAKEOBJDIR:DMAKEOBJDIR=${MAKEOBJDIR}} +ENV.varmisc= FROM_ENV=env +ENV.varmisc+= FROM_ENV_BEFORE=env +ENV.varmisc+= FROM_ENV_AFTER=env +ENV.varmod-localtime+= TZ=${UTC_1:UEurope/Berlin} +ENV.varname-vpath+= VPATH=varname-vpath.dir:varname-vpath.dir2 + +# Override make flags for some of the tests; default is -k. +# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of +# settings FLAGS.test=-dv here, since that is closer to the test code. +FLAGS.cond-func-make= via-cmdline +FLAGS.doterror= # none, especially not -k +FLAGS.jobs-error-indirect= # none, especially not -k +FLAGS.jobs-error-nested= # none, especially not -k +FLAGS.jobs-error-nested-make= # none, especially not -k +FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmdline-plain' + +# Some tests need extra postprocessing. +SED_CMDS.deptgt-phony= ${STD_SED_CMDS.dd} +SED_CMDS.dir= ${STD_SED_CMDS.dd} +SED_CMDS.directive-include-guard= \ + -e '/\.MAKEFLAGS/d' \ + -e '/^Parsing line/d' \ + -e '/^SetFilenameVars:/d' \ + -e '/^ParseDependency/d' \ + -e '/^ParseEOF:/d' +SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d' +.if ${.MAKE.OS:NCygwin} == "" +SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d' +.endif +SED_CMDS.export-all= ${SED_CMDS.export} +SED_CMDS.export-env= ${SED_CMDS.export} +SED_CMDS.cmdline= -e 's,uid${.MAKE.UID}/,,' +SED_CMDS.job-output-long-lines= \ + ${:D Job separators on their own line are ok. } \ + -e '/^--- job-[ab] ---$$/d' \ + ${:D Plain output lines are ok as well. } \ + ${:D They may come in multiples of 1024 or as 10000. } \ + -e '/^aa*$$/d' \ + -e '/^bb*$$/d' \ + ${:D The following lines should rather not occur since the job } \ + ${:D marker should always be at the beginning of the line. } \ + -e '/^aa*--- job-b ---$$/d' \ + -e '/^bb*--- job-a ---$$/d' +SED_CMDS.opt-chdir= -e 's,\(nonexistent\).[1-9][0-9]*,\1,' \ + -e '/name/s,file,File,' \ + -e 's,no such,No such,' \ + -e 's,Filename,File name,' + +# meta line numbers can vary based on filemon implementation +SED_CMDS.meta-ignore= -e 's,\(\.meta:\) [1-9][0-9]*:,\1 :,' +SED_CMDS.opt-debug-graph1= ${STD_SED_CMDS.dg1} +SED_CMDS.opt-debug-graph2= ${STD_SED_CMDS.dg2} +SED_CMDS.opt-debug-graph3= ${STD_SED_CMDS.dg3} +SED_CMDS.opt-debug-hash= -e 's,\(numEntries\)=[1-9][0-9],\1=,' +SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(),' +SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid ,' +SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process ,' +SED_CMDS.opt-debug-jobs+= -e 's,JobFinish: [0-9][0-9]*,JobFinish: ,' +SED_CMDS.opt-debug-jobs+= -e 's,Command: ${.SHELL:T},Command: ,' +# The "-q" may be there or not, see jobs.c, variable shells. +SED_CMDS.opt-debug-jobs+= -e 's,^\(.Command: \) -q,\1,' +SED_CMDS.opt-debug-lint+= ${STD_SED_CMDS.regex} +SED_CMDS.opt-jobs-no-action= ${STD_SED_CMDS.hide-from-output} +SED_CMDS.opt-no-action-runflags= ${STD_SED_CMDS.hide-from-output} +SED_CMDS.opt-where-am-i= -e '/usr.obj/d' +# For Compat_RunCommand, useShell == false. +SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,,' +# For Compat_RunCommand, useShell == true. +SED_CMDS.sh-dots+= -e 's,^make: exec(\(.*\)) failed (.*)$$,,' +SED_CMDS.sh-dots+= -e 's,^\(\*\*\* Error code \)[1-9][0-9]*,\1,' +SED_CMDS.sh-errctl= ${STD_SED_CMDS.dj} +SED_CMDS.sh-flags= ${STD_SED_CMDS.hide-from-output} +SED_CMDS.shell-csh= ${STD_SED_CMDS.white-space} +SED_CMDS.sh-leading-hyphen= ${STD_SED_CMDS.shell} +SED_CMDS.suff-main+= ${STD_SED_CMDS.dg1} +SED_CMDS.suff-main-several+= ${STD_SED_CMDS.dg1} +SED_CMDS.suff-transform-debug+= ${STD_SED_CMDS.dg1} +SED_CMDS.var-op-shell+= ${STD_SED_CMDS.shell} +SED_CMDS.var-op-shell+= -e '/command/s,No such.*,not found,' +SED_CMDS.var-op-shell+= ${STD_SED_CMDS.white-space} +SED_CMDS.vardebug+= -e 's,${.SHELL},,' +SED_CMDS.varmod-mtime+= -e "s,\(.*\)': .*,\1': ," +SED_CMDS.varmod-subst-regex+= ${STD_SED_CMDS.regex} +SED_CMDS.varparse-errors+= ${STD_SED_CMDS.timestamp} +SED_CMDS.varname-dot-make-meta-ignore_filter+= ${SED_CMDS.meta-ignore} +SED_CMDS.varname-dot-make-meta-ignore_paths+= ${SED_CMDS.meta-ignore} +SED_CMDS.varname-dot-make-meta-ignore_patterns+= ${SED_CMDS.meta-ignore} +SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: ",' +SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: ",' +SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g' +SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g' +SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g' +SED_CMDS.varname-empty= ${.OBJDIR .PARSEDIR .PATH .SHELL .SYSPATH:L:@v@-e '/\\$v/d'@} + +# Some tests need an additional round of postprocessing. +POSTPROC.depsrc-wait= sed -e '/^---/d' -e 's,^\(: Making 3[abc]\)[123]$$,\1,' +POSTPROC.deptgt-suffixes= awk '/^\#\*\*\* Suffixes/,/^never-stop/' +POSTPROC.gnode-submake= awk '/Input graph/, /^$$/' +POSTPROC.varname-dot-make-mode= sed 's,^\(: Making [abc]\)[123]$$,\1,' + +# Some tests reuse other tests, which makes them unnecessarily fragile. +export-all.rawout: export.mk +unexport.rawout: export.mk +unexport-env.rawout: export.mk + +# End of the configuration section. + +# Some standard sed commands, to be used in the SED_CMDS above. + +# In tests that use the debugging option -dd, ignore debugging output that is +# only logged in -DCLEANUP mode. +STD_SED_CMDS.dd= -e '/^OpenDirs_Done:/d' +STD_SED_CMDS.dd+= -e '/^CachedDir /d' +STD_SED_CMDS.dd+= -e 's, ${DEFSYSPATH:U/usr/share/mk} , ,' + +# Omit details such as process IDs from the output of the -dg1 option. +STD_SED_CMDS.dg1= -e '/\#.* \.$$/d' +STD_SED_CMDS.dg1+= -e '/\.MAKE.PATH_FILEMON/d' +STD_SED_CMDS.dg1+= -e '/^\#.*\/mk/d' +STD_SED_CMDS.dg1+= -e 's, ${DEFSYSPATH:U/usr/share/mk}$$, ,' +STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE *=\) .*,\1
,' +STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE\.[A-Z_]* *=\) .*,\1
,' +STD_SED_CMDS.dg1+= -e 's,^\(\.MAKE\.JOBS\.C *=\) .*,\1
,' +STD_SED_CMDS.dg1+= -e 's,^\(MACHINE[_ARCH]* *=\) .*,\1
,' +STD_SED_CMDS.dg1+= -e 's,^\(MAKE *=\) .*,\1
,' +STD_SED_CMDS.dg1+= -e 's,^\(\.SHELL *=\) .*,\1
,' +STD_SED_CMDS.dg1+= -e '/\.SYSPATH/d' + +STD_SED_CMDS.dg2= ${STD_SED_CMDS.dg1} +STD_SED_CMDS.dg2+= -e 's,\(last modified\) ..:..:.. ... ..\, ....,\1 ,' +STD_SED_CMDS.dg3= ${STD_SED_CMDS.dg2} + +# Omit details such as process IDs from the output of the -dj option. +STD_SED_CMDS.dj= \ + -e '/Process/d;/JobFinish:/d' \ + -e 's,^\(Job_TokenWithdraw\)([0-9]*),\1(),' \ + -e 's,^([0-9][0-9]*) \(withdrew token\),() \1,' \ + -e 's, \(pid\) [0-9][0-9]*, \1 ,' \ + -e 's,^\( Command:\) .*,\1 ,' + +# Reduce the noise for tests running with the -n option, since there is no +# other way to suppress the echoing of the commands. +STD_SED_CMDS.hide-from-output= \ + -e '/^echo hide-from-output/d' \ + -e 's,hide-from-output ,,' \ + -e 's,hide-from-output,,' + +# Normalize the output for error messages from the shell. +# +# $shell -c '...' +# NetBSD sh ...: not found +# NetBSD ksh ksh: ...: not found +# bash 5.0.18 bash: ...: command not found +# bash 5.1.0 bash: line 1: ...: command not found +# dash dash: 1: ...: not found +# +# $shell -c '< /nonexistent' +# NetBSD sh sh: cannot open /nonexistent: no such file +# NetBSD ksh ksh: cannot open /nonexistent: No such file or directory +# bash 5.0.18 bash: /nonexistent: No such file or directory +# bash 5.1.0 bash: line 1: /nonexistent: No such file or directory +# dash dash: 1: cannot open /nonexistent: No such file +# +# echo '< /nonexistent' | $shell +# NetBSD sh sh: cannot open /nonexistent: no such file +# NetBSD ksh ksh: [1]: cannot open /nonexistent: No such file or directory +# bash 5.0.18 bash: line 1: /nonexistent: No such file or directory +# bash 5.1.0 bash: line 1: /nonexistent: No such file or directory +# dash dash: 1: cannot open /nonexistent: No such file +# +STD_SED_CMDS.shell+= -e 's,^${.SHELL},${.SHELL:T},' +STD_SED_CMDS.shell+= -e 's,^${.SHELL:T}: line [0-9][0-9]*: ,,' +STD_SED_CMDS.shell+= -e 's,^${.SHELL:T}: [0-9][0-9]*: ,,' +STD_SED_CMDS.shell+= -e 's,^${.SHELL:T}: ,,' +STD_SED_CMDS.shell+= -e 's,: command not found,: not found,' + +STD_SED_CMDS.white-space= -e 's, *, ,g' -e 's, *$$,,' + +# The actual error messages for a failed regcomp or regexec differ between the +# implementations. +STD_SED_CMDS.regex= \ + -e 's,\(Regex compilation error:\).*,\1 (details omitted),' + +# Normalize timestamps from ':gmtime' or ':localtime' to ''. +# See STD_SED_CMDS.dg2 for timestamps from the debug log. +STD_SED_CMDS.timestamp= \ + -e 's,[A-Z][a-z][a-z] [A-Z][a-z][a-z] [ 0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [12][0-9][0-9][0-9],,' + +# End of the configuration helpers section. + +.sinclude "Makefile.inc" +.sinclude "Makefile.config" + +UNIT_TESTS:= ${srcdir} +.PATH: ${UNIT_TESTS} + +.if ${USE_ABSOLUTE_TESTNAMES:Uno} == yes +OUTFILES= ${TESTS:@test@${.CURDIR:tA}/${test}.out@} +.else +OUTFILES= ${TESTS:=.out} +.endif + +all: ${OUTFILES} + +CLEANFILES= *.rawout *.out *.status *.tmp *.core *.tmp +CLEANFILES+= obj*.[och] lib*.a # posix1.mk +CLEANFILES+= issue* .[ab]* # suffixes.mk - CLEANDIRS= dir dummy # posix1.mk ++CLEANDIRS= dir dummy *.tmp # posix1.mk + +clean: - rm -f ${CLEANFILES} + rm -rf ${CLEANDIRS} ++ rm -f ${CLEANFILES} + +TEST_MAKE?= ${.MAKE} +TOOL_SED?= sed +TOOL_TR?= tr +TOOL_DIFF?= diff +DIFF_FLAGS?= -u + +# ensure consistent results from sort(1) +LC_ALL= C +LANG= C +.export LANG LC_ALL + +.if ${.MAKE.MODE:Unormal:Mmeta} != "" +# we don't need the noise +_MKMSG_TEST= : +.endif + +# Some Linux systems such as Fedora have deprecated egrep in favor of grep -E. +.if ${.MAKE.OS:NLinux} == "" +EGREP= grep -E +.endif +# Keep the classical definition for all other systems. Just as the bmake code +# is kept compatible with C90, the tests are kept compatible with systems that +# are several decades old and don't follow modern POSIX standards. +EGREP?= egrep + +MAKE_TEST_ENV= EGREP="${EGREP}" +MAKE_TEST_ENV+= MALLOC_OPTIONS="JA" # for jemalloc 100 +MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510 +MAKE_TEST_ENV+= TMPDIR=${TMPDIR} + +.if ${.MAKE.OS} == "NetBSD" +LIMIT_RESOURCES?= ulimit -v 300000 +.endif +LIMIT_RESOURCES?= : + +# Each test is run in a sub-make, to keep the tests from interfering with +# each other, and because they use different environment variables and +# command line options. +.SUFFIXES: .mk .rawout .out +.mk.rawout: + @${_MKMSG_TEST:Uecho '# test '} ${.PREFIX} + @set -eu; \ + ${LIMIT_RESOURCES}; \ + cd ${.OBJDIR}; \ + env -i PATH="$$PATH" ${MAKE_TEST_ENV} ${ENV.${.PREFIX:T}} \ + ${TEST_MAKE} \ + -r -C ${.CURDIR} -f ${.IMPSRC} \ + ${FLAGS.${.PREFIX:T}:U-k} \ + > ${.TARGET}.tmp 2>&1 \ + && status=$$? || status=$$?; \ + echo $$status > ${.TARGET:R}.status + @mv ${.TARGET}.tmp ${.TARGET} + +# Postprocess the test output to make the output platform-independent. +# +# Replace anything after 'stopped in' with unit-tests +_SED_CMDS+= -e '/stopped/s, /.*, unit-tests,' +# Allow the test files to be placed anywhere. +_SED_CMDS+= -e 's,\(\.PARSEDIR}\) = `'"/[^']*'"',\1 = ,' +_SED_CMDS+= -e 's,\(\.INCLUDEDFROMDIR}\) = `'"/[^']*'"',\1 = ,' +_SED_CMDS+= -e 's,${TMPDIR},,g' -e 's,${TMPDIR:tA},,g' +# canonicalize ${.OBJDIR} and ${.CURDIR} +_SED_CMDS+= -e 's,${.CURDIR},,g' +.if ${.OBJDIR} != ${.CURDIR} +# yes this is inaccurate but none of the tests expect anywhere +# which we get depending on how MAKEOBJDIR is set. +_SED_CMDS+= -e 's,${.OBJDIR},,g' -e 's,${.OBJDIR:tA},,g' +.endif +# always pretend .MAKE was called 'make' +_SED_CMDS+= -e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,' +_SED_CMDS+= -e 's,${TEST_MAKE:S,.,\\.,g},make,' +_SED_CMDS+= -e 's,^usage: ${TEST_MAKE:T:S,.,\\.,g} ,usage: make ,' +_SED_CMDS+= -e 's,${TEST_MAKE:T:S,.,\\.,g}\(\[[1-9][0-9]*\]:\),make\1,' +_SED_CMDS+= -e 's,/,,g' *** 63 LINES SKIPPED *** From nobody Sat Jun 29 09:09:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WB61f0qs7z5JvcK; Sat, 29 Jun 2024 09:09: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WB61d6yRVz4QjC; Sat, 29 Jun 2024 09:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719652150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PunNNJGFDCTVjuHBYaxKV6tJWwuY5wf9kaRzr3o4zs=; b=CCUVJIUNGDWBYs5PHKKFNQHK44SzTJE+SoJ3JleuHdAV/PvBrmfnLbDlhxDTa+jXOPMNa0 vCtz+EqG7/nquySTRF95LkXKfV+0ctLrsagAB4ezYEYD+MDYQBO/kssL2UP4dpAyeWkdUn 2C7BlVm6sY1wve1kpmvtZalgYQpJmazWyTE9vdRspMmFd7XAxSsfLTR7itXJnnEmHtkfjq yomyLCHCYXUSll5RwIuEnpBaBEUsPtnOFyMawRLTHJP8YAnF7DRf51+FGTV3yUe6PuAt5P PnDmk2ucUlQXLYYjBqp1xOZiWzUqITTmeJAHC0zQHYPM8TfBighW/tiPmEfmvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719652150; a=rsa-sha256; cv=none; b=GgPfuL7sI7Fu7UTkjlT41U4G5EVMDfX4L7epV9wyHnRaDlIhnO3kjrelga+2M0EX3wVJ+j /ugqb1BhZ8uq4iZINkV+pdtzHyGM8U6NQzf2euokzkEJwWqbL7El19z0Hh1bYrs/t4Gxl5 KDDIq1XpM0R1Ao+lP/QsgJNqVHb7BRCqdElh05/LoEyLbdbrnKp0gAI61KPjw4JTnIXLkI FH2ffs3AZuAY7YOoPYVVvr4n1dvVO5mUalmbByvKku6LYUIHGVuzfJIx5kLbiKC1jgLlTz /QoN1TzKFArFifOasnhp6POqJLzMb6DODCr8paFjjT3RZupjfOA7e5PNX2TF+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=1719652150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PunNNJGFDCTVjuHBYaxKV6tJWwuY5wf9kaRzr3o4zs=; b=aaNE02kSmBKtmnPws8RmYKjbCiwxWIKvJi/S691aw03fdZcPdRBTZc583GuejexRVWBgBH Ax0FJPab9JPmLQovghqRzdeiJ/gdVJSxOHSlWA2ZXnWpaHHeP43n8exl0rh9GJnagOwo0M Yfgd6CbBrvbPRtEcMiuX+9fcpMS5QTp1kH6KFga54BJj5A3oViP0xEJb5xI7a8Ok4t5YQ8 XJbQmIoouv6Np5JgbiInfOaIVyZQUvQmA5qHS2dfnf3UuqGGKkugxOhkW3IIcQ7ZYmx72p KPeBLGVbqNqEC8C7Dm/JmDDSAo2Kk2J3cGiXmprNyQY9fpiF7dywvg2JRChe3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WB61d6YYszY0g; Sat, 29 Jun 2024 09:09: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 45T99942089439; Sat, 29 Jun 2024 09:09:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45T999R4089436; Sat, 29 Jun 2024 09:09:09 GMT (envelope-from git) Date: Sat, 29 Jun 2024 09:09:09 GMT Message-Id: <202406290909.45T999R4089436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 811d831050d1 - main - tcp: minor 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 811d831050d172a39c714a3f676722cf9a496a6f Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=811d831050d172a39c714a3f676722cf9a496a6f commit 811d831050d172a39c714a3f676722cf9a496a6f Author: Michael Tuexen AuthorDate: 2024-06-29 09:06:35 +0000 Commit: Michael Tuexen CommitDate: 2024-06-29 09:06:35 +0000 tcp: minor cleanup Fix two KASSERTs to catch the condition they are intended to, add two asserts to ensure that the appropriate locking is in place and fix some things related to style. No functional change intended. MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_subr.c | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 438c9cf899c6..3d860d0cf6f9 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -394,23 +394,25 @@ static struct tcp_function_block * find_tcp_functions_locked(struct tcp_function_set *fs) { struct tcp_function *f; - struct tcp_function_block *blk=NULL; + struct tcp_function_block *blk = NULL; + rw_assert(&tcp_function_lock, RA_LOCKED); TAILQ_FOREACH(f, &t_functions, tf_next) { if (strcmp(f->tf_name, fs->function_set_name) == 0) { blk = f->tf_fb; break; } } - return(blk); + return (blk); } static struct tcp_function_block * find_tcp_fb_locked(struct tcp_function_block *blk, struct tcp_function **s) { - struct tcp_function_block *rblk=NULL; + struct tcp_function_block *rblk = NULL; struct tcp_function *f; + rw_assert(&tcp_function_lock, RA_LOCKED); TAILQ_FOREACH(f, &t_functions, tf_next) { if (f->tf_fb == blk) { rblk = blk; @@ -433,7 +435,7 @@ find_and_ref_tcp_functions(struct tcp_function_set *fs) if (blk) refcount_acquire(&blk->tfb_refcnt); rw_runlock(&tcp_function_lock); - return(blk); + return (blk); } struct tcp_function_block * @@ -446,7 +448,7 @@ find_and_ref_tcp_fb(struct tcp_function_block *blk) if (rblk) refcount_acquire(&rblk->tfb_refcnt); rw_runlock(&tcp_function_lock); - return(rblk); + return (rblk); } /* Find a matching alias for the given tcp_function_block. */ @@ -647,7 +649,7 @@ out: static int sysctl_net_inet_default_tcp_functions(SYSCTL_HANDLER_ARGS) { - int error=ENOENT; + int error = ENOENT; struct tcp_function_set fs; struct tcp_function_block *blk; @@ -665,7 +667,7 @@ sysctl_net_inet_default_tcp_functions(SYSCTL_HANDLER_ARGS) /* Check for error or no change */ if (error != 0 || req->newptr == NULL) - return(error); + return (error); rw_wlock(&tcp_function_lock); blk = find_tcp_functions_locked(&fs); @@ -1174,9 +1176,9 @@ register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, struct tcp_function_set fs; int error, i; - KASSERT(names != NULL && *num_names > 0, - ("%s: Called with 0-length name list", __func__)); KASSERT(names != NULL, ("%s: Called with NULL name list", __func__)); + KASSERT(*num_names > 0, + ("%s: Called with non-positive length of name list", __func__)); KASSERT(rw_initialized(&tcp_function_lock), ("%s: called too early", __func__)); @@ -1223,7 +1225,7 @@ register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, tcp_fb_cnt++; rw_wunlock(&tcp_function_lock); } - return(0); + return (0); cleanup: /* @@ -4385,7 +4387,7 @@ tcp_req_check_for_stale_entries(struct tcpcb *tp, uint64_t ts, int rm_oldest) uint64_t time_delta, oldest_delta; int i, oldest, oldest_set = 0, cnt_rm = 0; - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; if (ent->flags != TCP_TRK_TRACK_FLG_USED) { /* @@ -4428,15 +4430,15 @@ tcp_req_check_for_stale_entries(struct tcpcb *tp, uint64_t ts, int rm_oldest) int tcp_req_check_for_comp(struct tcpcb *tp, tcp_seq ack_point) { - int i, ret=0; + int i, ret = 0; struct tcp_sendfile_track *ent; /* Clean up any old closed end requests that are now completed */ if (tp->t_tcpreq_req == 0) - return(0); + return (0); if (tp->t_tcpreq_closed == 0) - return(0); - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + return (0); + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; /* Skip empty ones */ if (ent->flags == TCP_TRK_TRACK_FLG_EMPTY) @@ -4459,11 +4461,11 @@ int tcp_req_is_entry_comp(struct tcpcb *tp, struct tcp_sendfile_track *ent, tcp_seq ack_point) { if (tp->t_tcpreq_req == 0) - return(-1); + return (-1); if (tp->t_tcpreq_closed == 0) - return(-1); + return (-1); if (ent->flags == TCP_TRK_TRACK_FLG_EMPTY) - return(-1); + return (-1); if (SEQ_GEQ(ack_point, ent->end_seq)) { return (1); } @@ -4485,7 +4487,7 @@ tcp_req_find_a_req_that_is_completed_by(struct tcpcb *tp, tcp_seq th_ack, int *i /* none open */ return (NULL); } - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; if (ent->flags == TCP_TRK_TRACK_FLG_EMPTY) continue; @@ -4509,7 +4511,7 @@ tcp_req_find_req_for_seq(struct tcpcb *tp, tcp_seq seq) /* none open */ return (NULL); } - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { ent = &tp->t_tcpreq_info[i]; tcp_req_log_req_info(tp, ent, i, TCP_TRK_REQ_LOG_SEARCH, (uint64_t)seq, 0); @@ -4557,7 +4559,7 @@ tcp_req_alloc_req_full(struct tcpcb *tp, struct tcp_snd_req *req, uint64_t ts, i (tp->t_tcpreq_req >= MAX_TCP_TRK_REQ)); /* Check to see if this is a duplicate of one not started */ if (tp->t_tcpreq_req) { - for(i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { fil = &tp->t_tcpreq_info[i]; if ((fil->flags & TCP_TRK_TRACK_FLG_USED) == 0) continue; @@ -4572,20 +4574,20 @@ tcp_req_alloc_req_full(struct tcpcb *tp, struct tcp_snd_req *req, uint64_t ts, i * a 4xx of some sort and its going to age * out, lets not duplicate it. */ - return(fil); + return (fil); } } } /* Ok if there is no room at the inn we are in trouble */ if (tp->t_tcpreq_req >= MAX_TCP_TRK_REQ) { tcp_trace_point(tp, TCP_TP_REQ_LOG_FAIL); - for(i = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0; i < MAX_TCP_TRK_REQ; i++) { tcp_req_log_req_info(tp, &tp->t_tcpreq_info[i], i, TCP_TRK_REQ_LOG_ALLOCFAIL, 0, 0); } return (NULL); } - for(i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { + for (i = 0, allocated = 0; i < MAX_TCP_TRK_REQ; i++) { fil = &tp->t_tcpreq_info[i]; if (fil->flags == TCP_TRK_TRACK_FLG_EMPTY) { allocated = 1; From nobody Sat Jun 29 20:29:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WBP6d305Gz5PjXT; Sat, 29 Jun 2024 20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WBP6c3bDqz4GDy; Sat, 29 Jun 2024 20: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=1719692968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K9u5kgdROx4knUBXqs9GrRBZsBVWBjNVOZRxSAUPzOw=; b=CH1jMdpYvd/kZ4yBIa3MYPmUfJ0Y8P8U5t25ExnlGirtw6tKXRflwXlGchh4ljn4AAnsQX +EHGkOcKXCcRNOqXm9iBqjhtHFf2Qp5sUcyxXkPH5Cgvf+aOTJkFa3JvFgpfHAslwzeraD IjOzzHNpr0CEhxZ1gqBgyb20TCMRhsVs0HW+omerR09sr3i1HoTmCZOtwjUGj1JId+1qZt acAeqke2ODA76L9gul6P4ymCu+r85f9PzgpURL5I05HBVNfVatycHJdIj2Fz+rjOSLO5P8 kQj5gu9G+RjU3ejhK0LHCKDM229mWjOMGcIfzI8vzsdJsrh+UFBRMPaoG2AOKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719692968; a=rsa-sha256; cv=none; b=Yajtcr2pogYGBQshVxq8l4phmeiRUUEZ1n1+GI4kEduAZzb/pgXp3HFC/SSVxeSaElM507 zIFPDnK26duRbRQdL47nXko9hd33WrEnHzK22smDIYAhbbOkxffoaHoe5wuQ/RXm4m4gzH 8m+VIF8FZhw+gyyDLJtGAlDissF9JEsrOPI3lGwzsGs12+mn4HwyZHtXEyDRqPcj8xKHMt EBfel1vLdHdY2YcJSfLVCVBVsli0NY2+43TrMLgQVDydYqqIczMB6IZ2LVSmaC/CQFPZTW 63eTDLgomvzvvGyS+Py1m31OydWXOkpBVLzvpVgyV9TaKiOD7sWfVHlf7o8TwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719692968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K9u5kgdROx4knUBXqs9GrRBZsBVWBjNVOZRxSAUPzOw=; b=BOxZfjI/NeMVaKr6SjucOuxjSgCW1UL35rm3tuiSyFtguIxaI3AorSs6Lvy08ehdm44GhT TOjmm1SVOUXNAXTAgO3msSj/xToG0MkSsWJoghgUO6iD5Jr1AgPj7vmKn29SFaMTPr4+8q G+BJ8ZUmL7NCS8kxEkGmy0GdyVsxT7JYZPNHxbZAlWCIYzmpiMIcrySg+XxM33vMACqLwC K4T93Rqay4cHEoqye/zuRBZDe+KuhrlkQueDLryqLbdJIv0VdLvIuwcq3klk8yUZdRIKX/ Fd5GD8g6fWNbRZX/EVZPNLvK6VF0AA9adU3gG3SA89P4Oa0UNfRg6CfGqiQKcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WBP6c3703zt5h; Sat, 29 Jun 2024 20:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 45TKTSe6034218; Sat, 29 Jun 2024 20:29:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 45TKTSoB034215; Sat, 29 Jun 2024 20:29:28 GMT (envelope-from git) Date: Sat, 29 Jun 2024 20:29:28 GMT Message-Id: <202406292029.45TKTSoB034215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 13a031f0d73d - stable/14 - Update to OpenSSL 3.0.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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 13a031f0d73dd39bcf89c152168f9c1d454f2d2a Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=13a031f0d73dd39bcf89c152168f9c1d454f2d2a commit 13a031f0d73dd39bcf89c152168f9c1d454f2d2a Author: Enji Cooper AuthorDate: 2024-06-26 23:50:13 +0000 Commit: Enji Cooper CommitDate: 2024-06-29 20:29:18 +0000 Update to OpenSSL 3.0.14 This release resolves 3 upstream found CVEs: - Fixed potential use after free after SSL_free_buffers() is called (CVE-2024-4741) - Fixed an issue where checking excessively long DSA keys or parameters may be very slow (CVE-2024-4603) - Fixed unbounded memory growth with session handling in TLSv1.3 (CVE-2024-2511) MFC after: 3 days Merge commit '1070e7dca8223387baf5155524b28f62bfe7da3c' (cherry picked from commit 44096ebd22ddd0081a357011714eff8963614b65) --- crypto/openssl/CHANGES.md | 69 ++++ crypto/openssl/CONTRIBUTING.md | 6 +- crypto/openssl/Configurations/10-main.conf | 9 +- crypto/openssl/Configurations/15-ios.conf | 6 +- crypto/openssl/Configurations/unix-Makefile.tmpl | 14 +- crypto/openssl/Configure | 3 +- crypto/openssl/INSTALL.md | 9 +- crypto/openssl/NEWS.md | 15 + crypto/openssl/NOTES-NONSTOP.md | 5 +- crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/lib/s_cb.c | 8 +- crypto/openssl/apps/list.c | 3 +- crypto/openssl/apps/ocsp.c | 4 +- crypto/openssl/apps/pkcs12.c | 16 +- crypto/openssl/apps/req.c | 2 +- crypto/openssl/apps/speed.c | 6 +- crypto/openssl/apps/ts.c | 11 +- crypto/openssl/crypto/aes/build.info | 2 +- crypto/openssl/crypto/bio/bio_lib.c | 10 +- crypto/openssl/crypto/bio/bio_sock.c | 6 +- crypto/openssl/crypto/bn/bn_lib.c | 53 ++- crypto/openssl/crypto/bn/bn_rand.c | 166 ++++++-- crypto/openssl/crypto/bn/bn_shift.c | 8 +- crypto/openssl/crypto/dsa/dsa_check.c | 46 ++- crypto/openssl/crypto/dsa/dsa_ossl.c | 11 +- crypto/openssl/crypto/dsa/dsa_sign.c | 9 +- crypto/openssl/crypto/ec/build.info | 2 +- .../openssl/crypto/ec/curve448/arch_64/f_impl64.c | 8 +- crypto/openssl/crypto/ec/ecdsa_ossl.c | 15 +- crypto/openssl/crypto/encode_decode/encoder_lib.c | 7 +- crypto/openssl/crypto/engine/eng_pkey.c | 44 +-- crypto/openssl/crypto/err/openssl.ec | 4 +- crypto/openssl/crypto/ess/ess_lib.c | 4 +- crypto/openssl/crypto/evp/keymgmt_lib.c | 9 +- crypto/openssl/crypto/evp/p_lib.c | 12 +- crypto/openssl/crypto/evp/pmeth_lib.c | 69 +++- crypto/openssl/crypto/evp/signature.c | 33 +- crypto/openssl/crypto/init.c | 14 +- crypto/openssl/crypto/o_str.c | 4 +- crypto/openssl/crypto/property/property_parse.c | 3 +- crypto/openssl/crypto/provider_core.c | 11 +- crypto/openssl/crypto/sha/build.info | 2 +- crypto/openssl/crypto/sm2/sm2_crypt.c | 37 +- crypto/openssl/crypto/sm2/sm2_sign.c | 18 +- crypto/openssl/crypto/x509/v3_addr.c | 4 +- crypto/openssl/demos/digest/EVP_MD_demo.c | 4 +- crypto/openssl/demos/digest/EVP_MD_stdin.c | 4 +- crypto/openssl/doc/fingerprints.txt | 3 + crypto/openssl/doc/internal/man3/OPTIONS.pod | 4 +- .../doc/internal/man3/ossl_method_construct.pod | 4 +- .../doc/internal/man3/ossl_provider_new.pod | 4 +- .../internal/man3/ossl_random_add_conf_module.pod | 4 +- crypto/openssl/doc/internal/man7/EVP_PKEY.pod | 4 +- crypto/openssl/doc/man1/openssl-crl.pod.in | 5 +- crypto/openssl/doc/man1/openssl-mac.pod.in | 17 +- crypto/openssl/doc/man1/openssl-req.pod.in | 33 +- crypto/openssl/doc/man1/openssl-smime.pod.in | 18 +- crypto/openssl/doc/man1/openssl-storeutl.pod.in | 5 +- crypto/openssl/doc/man1/openssl-ts.pod.in | 8 +- crypto/openssl/doc/man3/DEFINE_STACK_OF.pod | 6 +- crypto/openssl/doc/man3/EVP_DigestInit.pod | 4 +- crypto/openssl/doc/man3/EVP_KDF.pod | 4 +- .../openssl/doc/man3/EVP_PKEY_CTX_set_params.pod | 6 +- crypto/openssl/doc/man3/EVP_PKEY_check.pod | 7 +- crypto/openssl/doc/man3/SSL_CIPHER_get_name.pod | 4 +- crypto/openssl/doc/man3/SSL_CTX_set_cert_store.pod | 6 +- crypto/openssl/doc/man3/SSL_CTX_set_verify.pod | 5 +- .../openssl/doc/man3/SSL_CTX_use_certificate.pod | 5 +- .../openssl/doc/man3/SSL_load_client_CA_file.pod | 20 +- crypto/openssl/doc/man7/EVP_PKEY-SM2.pod | 5 +- crypto/openssl/doc/man7/migration_guide.pod | 28 +- crypto/openssl/e_os.h | 20 +- crypto/openssl/engines/e_afalg.c | 6 +- crypto/openssl/engines/e_dasync.c | 4 +- crypto/openssl/fuzz/asn1.c | 16 +- crypto/openssl/include/crypto/bn.h | 10 +- crypto/openssl/include/internal/constant_time.h | 25 +- crypto/openssl/include/openssl/sslerr.h | 4 +- crypto/openssl/os-dep/Apple/PrivacyInfo.xcprivacy | 23 ++ crypto/openssl/providers/fips-sources.checksums | 272 ++++++------- crypto/openssl/providers/fips.checksum | 2 +- crypto/openssl/providers/fips/fipsprov.c | 4 +- .../providers/implementations/exchange/kdf_exch.c | 44 ++- .../implementations/include/prov/ciphercommon.h | 15 +- .../openssl/providers/implementations/kdfs/hkdf.c | 10 +- .../openssl/providers/implementations/rands/drbg.c | 5 +- .../providers/implementations/rands/drbg_ctr.c | 7 +- .../providers/implementations/rands/drbg_hash.c | 5 +- .../providers/implementations/rands/drbg_hmac.c | 5 +- .../providers/implementations/rands/drbg_local.h | 3 +- crypto/openssl/ssl/record/rec_layer_s3.c | 15 + crypto/openssl/ssl/record/record.h | 3 +- crypto/openssl/ssl/record/ssl3_buffer.c | 4 +- crypto/openssl/ssl/ssl_err.c | 6 +- crypto/openssl/ssl/ssl_lib.c | 10 +- crypto/openssl/ssl/ssl_sess.c | 36 +- crypto/openssl/ssl/statem/statem_srvr.c | 9 +- crypto/openssl/ssl/t1_lib.c | 5 +- crypto/openssl/test/bad_dtls_test.c | 4 +- crypto/openssl/test/build.info | 1 + crypto/openssl/test/cmp_hdr_test.c | 51 ++- crypto/openssl/test/ct_test.c | 11 +- crypto/openssl/test/dsatest.c | 10 +- crypto/openssl/test/ecdsatest.c | 30 +- crypto/openssl/test/ecstresstest.c | 4 +- crypto/openssl/test/evp_extra_test.c | 48 ++- crypto/openssl/test/evp_pkey_provided_test.c | 63 ++- crypto/openssl/test/evp_test.c | 15 +- crypto/openssl/test/helpers/ssltestlib.c | 35 +- crypto/openssl/test/helpers/ssltestlib.h | 3 +- crypto/openssl/test/keymgmt_internal_test.c | 10 +- crypto/openssl/test/pathed.cnf | 22 ++ crypto/openssl/test/pkey_meth_kdf_test.c | 55 ++- crypto/openssl/test/prov_config_test.c | 56 ++- .../invalid/p10240_q256_too_big.pem | 57 +++ crypto/openssl/test/recipes/25-test_req.t | 3 +- crypto/openssl/test/recipes/30-test_prov_config.t | 8 +- crypto/openssl/test/recipes/80-test_pkcs12.t | 14 +- crypto/openssl/test/recipes/90-test_shlibload.t | 3 +- crypto/openssl/test/sm2_internal_test.c | 37 +- crypto/openssl/test/ssl-tests/14-curves.cnf.in | 7 +- crypto/openssl/test/ssl-tests/20-cert-select.cnf | 216 +++++------ .../openssl/test/ssl-tests/20-cert-select.cnf.in | 70 ++-- crypto/openssl/test/ssl-tests/28-seclevel.cnf.in | 8 +- crypto/openssl/test/sslapitest.c | 426 ++++++++++++++++++--- crypto/openssl/test/sslbuffertest.c | 176 ++++++++- crypto/openssl/test/test.cnf | 6 + crypto/openssl/test/tls-provider.c | 13 +- crypto/openssl/test/v3ext.c | 17 +- 129 files changed, 2301 insertions(+), 764 deletions(-) diff --git a/crypto/openssl/CHANGES.md b/crypto/openssl/CHANGES.md index bd876eb89dd4..19e0fd6e25a5 100644 --- a/crypto/openssl/CHANGES.md +++ b/crypto/openssl/CHANGES.md @@ -28,6 +28,72 @@ breaking changes, and mappings for the large list of deprecated functions. [Migration guide]: https://github.com/openssl/openssl/tree/master/doc/man7/migration_guide.pod +### Changes between 3.0.13 and 3.0.14 [4 Jun 2024] + + * Fixed potential use after free after SSL_free_buffers() is called. + + The SSL_free_buffers function is used to free the internal OpenSSL + buffer used when processing an incoming record from the network. + The call is only expected to succeed if the buffer is not currently + in use. However, two scenarios have been identified where the buffer + is freed even when still in use. + + The first scenario occurs where a record header has been received + from the network and processed by OpenSSL, but the full record body + has not yet arrived. In this case calling SSL_free_buffers will succeed + even though a record has only been partially processed and the buffer + is still in use. + + The second scenario occurs where a full record containing application + data has been received and processed by OpenSSL but the application has + only read part of this data. Again a call to SSL_free_buffers will + succeed even though the buffer is still in use. + + ([CVE-2024-4741]) + + *Matt Caswell* + + * Fixed an issue where checking excessively long DSA keys or parameters may + be very slow. + + Applications that use the functions EVP_PKEY_param_check() or + EVP_PKEY_public_check() to check a DSA public key or DSA parameters may + experience long delays. Where the key or parameters that are being checked + have been obtained from an untrusted source this may lead to a Denial of + Service. + + To resolve this issue DSA keys larger than OPENSSL_DSA_MAX_MODULUS_BITS + will now fail the check immediately with a DSA_R_MODULUS_TOO_LARGE error + reason. + + ([CVE-2024-4603]) + + *Tomáš Mráz* + + * Fixed an issue where some non-default TLS server configurations can cause + unbounded memory growth when processing TLSv1.3 sessions. An attacker may + exploit certain server configurations to trigger unbounded memory growth that + would lead to a Denial of Service + + This problem can occur in TLSv1.3 if the non-default SSL_OP_NO_TICKET option + is being used (but not if early_data is also configured and the default + anti-replay protection is in use). In this case, under certain conditions, + the session cache can get into an incorrect state and it will fail to flush + properly as it fills. The session cache will continue to grow in an unbounded + manner. A malicious client could deliberately create the scenario for this + failure to force a Denial of Service. It may also happen by accident in + normal operation. + + ([CVE-2024-2511]) + + *Matt Caswell* + + * New atexit configuration switch, which controls whether the OPENSSL_cleanup + is registered when libcrypto is unloaded. This can be used on platforms + where using atexit() from shared libraries causes crashes on exit. + + *Randall S. Becker* + ### Changes between 3.0.12 and 3.0.13 [30 Jan 2024] * A file in PKCS12 format can contain certificates and keys and may come from @@ -19824,6 +19890,9 @@ ndif +[CVE-2024-4741]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4741 +[CVE-2024-4603]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4603 +[CVE-2024-2511]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-2511 [CVE-2024-0727]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-0727 [CVE-2023-6237]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-6237 [CVE-2023-6129]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-6129 diff --git a/crypto/openssl/CONTRIBUTING.md b/crypto/openssl/CONTRIBUTING.md index 15490fd9f620..fec6616e21fe 100644 --- a/crypto/openssl/CONTRIBUTING.md +++ b/crypto/openssl/CONTRIBUTING.md @@ -9,7 +9,7 @@ Development is done on GitHub in the [openssl/openssl] repository. [openssl/openssl]: -To request new a feature, ask a question, or report a bug, +To request a new feature, ask a question, or report a bug, please open an [issue on GitHub](https://github.com/openssl/openssl/issues). To submit a patch or implement a new feature, please open a @@ -67,7 +67,8 @@ guidelines: often. We do not accept merge commits, you will have to remove them (usually by rebasing) before it will be acceptable. - 4. Code provided should follow our [coding style] and compile without warnings. + 4. Code provided should follow our [coding style] and [documentation policy] + and compile without warnings. There is a [Perl tool](util/check-format.pl) that helps finding code formatting mistakes and other coding style nits. Where `gcc` or `clang` is available, you should use the @@ -77,6 +78,7 @@ guidelines: whenever a PR is created or updated by committers. [coding style]: https://www.openssl.org/policies/technical/coding-style.html + [documentation policy]: https://openssl.org/policies/technical/documentation-policy.html 5. When at all possible, code contributions should include tests. These can either be added to an existing test, or completely new. Please see diff --git a/crypto/openssl/Configurations/10-main.conf b/crypto/openssl/Configurations/10-main.conf index ff8af7146318..1155d9859c56 100644 --- a/crypto/openssl/Configurations/10-main.conf +++ b/crypto/openssl/Configurations/10-main.conf @@ -784,7 +784,14 @@ my %targets = ( asm_arch => 'aarch64', perlasm_scheme => "linux64", }, - + "linux-arm64ilp32-clang" => { # clang config abi by --target + inherit_from => [ "linux-generic32" ], + CC => "clang", + CXX => "clang++", + bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", + asm_arch => 'aarch64', + perlasm_scheme => "linux64", + }, "linux-mips32" => { # Configure script adds minimally required -march for assembly # support, if no -march was specified at command line. diff --git a/crypto/openssl/Configurations/15-ios.conf b/crypto/openssl/Configurations/15-ios.conf index 54d37f63f445..81e3d68bc7f0 100644 --- a/crypto/openssl/Configurations/15-ios.conf +++ b/crypto/openssl/Configurations/15-ios.conf @@ -49,16 +49,16 @@ my %targets = ( # "iphoneos-cross" => { inherit_from => [ "ios-common" ], - cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"), + cflags => add("-isysroot \"\$(CROSS_TOP)/SDKs/\$(CROSS_SDK)\" -fno-common"), }, "ios-cross" => { inherit_from => [ "ios-xcrun" ], CC => "cc", - cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"), + cflags => add("-isysroot \"\$(CROSS_TOP)/SDKs/\$(CROSS_SDK)\""), }, "ios64-cross" => { inherit_from => [ "ios64-xcrun" ], CC => "cc", - cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"), + cflags => add("-isysroot \"\$(CROSS_TOP)/SDKs/\$(CROSS_SDK)\""), }, ); diff --git a/crypto/openssl/Configurations/unix-Makefile.tmpl b/crypto/openssl/Configurations/unix-Makefile.tmpl index 3754595d38b5..644540397de5 100644 --- a/crypto/openssl/Configurations/unix-Makefile.tmpl +++ b/crypto/openssl/Configurations/unix-Makefile.tmpl @@ -21,7 +21,7 @@ sub dependmagic { my $target = shift; - return "$target: build_generated\n\t\$(MAKE) depend && \$(MAKE) _$target\n_$target"; + return "$target: build_generated\n\t\"\$(MAKE)\" depend && \"\$(MAKE)\" _$target\n_$target"; } our $COLUMNS = $ENV{COLUMNS}; @@ -527,7 +527,7 @@ all: build_sw build_docs test: tests {- dependmagic('tests'); -}: build_programs_nodep build_modules_nodep link-utils - $(MAKE) run_tests + "$(MAKE)" run_tests run_tests: FORCE @ : {- output_off() if $disabled{tests}; "" -} ( SRCTOP=$(SRCDIR) \ @@ -542,7 +542,7 @@ run_tests: FORCE list-tests: @ : {- output_off() if $disabled{tests}; "" -} - $(MAKE) run_tests TESTS=list + "$(MAKE)" run_tests TESTS=list @ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -} @echo "Tests are not supported with your chosen Configure options" @ : {- output_on() if !$disabled{tests}; "" -} @@ -1193,12 +1193,12 @@ providers/fips.module.sources.new: configdata.pm cd sources-tmp \ && $$srcdir/Configure --banner=Configured enable-fips -O0 \ && ./configdata.pm --query 'get_sources("providers/fips")' > sources1 \ - && $(MAKE) -sj 4 build_generated providers/fips.so \ + && "$(MAKE)" -sj 4 build_generated providers/fips.so \ && find . -name '*.d' | xargs cat > dep1 \ - && $(MAKE) distclean \ + && "$(MAKE)" distclean \ && $$srcdir/Configure --banner=Configured enable-fips no-asm -O0 \ && ./configdata.pm --query 'get_sources("providers/fips")' > sources2 \ - && $(MAKE) -sj 4 build_generated providers/fips.so \ + && "$(MAKE)" -sj 4 build_generated providers/fips.so \ && find . -name '*.d' | xargs cat > dep2 \ && cat sources1 sources2 \ | grep -v ' : \\$$' | grep -v util/providers.num \ @@ -1332,7 +1332,7 @@ ordinals: build_generated $(SSLHEADERS) test_ordinals: - $(MAKE) run_tests TESTS=test_ordinals + "$(MAKE)" run_tests TESTS=test_ordinals tags TAGS: FORCE rm -f TAGS tags diff --git a/crypto/openssl/Configure b/crypto/openssl/Configure index 84cc4094644a..40c03ad0af32 100755 --- a/crypto/openssl/Configure +++ b/crypto/openssl/Configure @@ -1,6 +1,6 @@ #! /usr/bin/env perl # -*- mode: perl; -*- -# Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -405,6 +405,7 @@ my @disablables = ( "asan", "asm", "async", + "atexit", "autoalginit", "autoerrinit", "autoload-config", diff --git a/crypto/openssl/INSTALL.md b/crypto/openssl/INSTALL.md index fef408e9d1e3..c0dae491c94d 100644 --- a/crypto/openssl/INSTALL.md +++ b/crypto/openssl/INSTALL.md @@ -480,7 +480,7 @@ Setting the FIPS HMAC key As part of its self-test validation, the FIPS module must verify itself by performing a SHA-256 HMAC computation on itself. The default key is -the SHA256 value of "the holy handgrenade of antioch" and is sufficient +the SHA256 value of "holy hand grenade of antioch" and is sufficient for meeting the FIPS requirements. To change the key to a different value, use this flag. The value should @@ -546,6 +546,13 @@ be used even with this option. Do not build support for async operations. +### no-atexit + +Do not use `atexit()` in libcrypto builds. + +`atexit()` has varied semantics between platforms and can cause SIGSEGV in some +circumstances. This option disables the atexit registration of OPENSSL_cleanup. + ### no-autoalginit Don't automatically load all supported ciphers and digests. diff --git a/crypto/openssl/NEWS.md b/crypto/openssl/NEWS.md index d9a48b157eb1..fb231bcd8459 100644 --- a/crypto/openssl/NEWS.md +++ b/crypto/openssl/NEWS.md @@ -18,6 +18,18 @@ OpenSSL Releases OpenSSL 3.0 ----------- +### Major changes between OpenSSL 3.0.13 and OpenSSL 3.0.14 [4 Jun 2024] + + * Fixed potential use after free after SSL_free_buffers() is called + ([CVE-2024-4741]) + + * Fixed an issue where checking excessively long DSA keys or parameters may + be very slow + ([CVE-2024-4603]) + + * Fixed unbounded memory growth with session handling in TLSv1.3 + ([CVE-2024-2511]) + ### Major changes between OpenSSL 3.0.12 and OpenSSL 3.0.13 [30 Jan 2024] * Fixed PKCS12 Decoding crashes @@ -1470,6 +1482,9 @@ OpenSSL 0.9.x +[CVE-2024-4741]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4741 +[CVE-2024-4603]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4603 +[CVE-2024-2511]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-2511 [CVE-2024-0727]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-0727 [CVE-2023-6237]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-6237 [CVE-2023-6129]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-6129 diff --git a/crypto/openssl/NOTES-NONSTOP.md b/crypto/openssl/NOTES-NONSTOP.md index 68438b998884..ab13de7d3a76 100644 --- a/crypto/openssl/NOTES-NONSTOP.md +++ b/crypto/openssl/NOTES-NONSTOP.md @@ -56,7 +56,10 @@ relating to `atexit()` processing when a shared library is unloaded and when the program terminates. This limitation applies to all OpenSSL shared library components. -A resolution to this situation is under investigation. +It is possible to configure the build with `no-atexit` to avoid the SIGSEGV. +Preferably, you can explicitly call `OPENSSL_cleanup()` from your application. +It is not mandatory as it just deallocates various global data structures +OpenSSL allocated. About Prefix and OpenSSLDir --------------------------- diff --git a/crypto/openssl/VERSION.dat b/crypto/openssl/VERSION.dat index 3ee1a6f829f4..5de9bf3d01ba 100644 --- a/crypto/openssl/VERSION.dat +++ b/crypto/openssl/VERSION.dat @@ -1,7 +1,7 @@ MAJOR=3 MINOR=0 -PATCH=13 +PATCH=14 PRE_RELEASE_TAG= BUILD_METADATA= -RELEASE_DATE="30 Jan 2024" +RELEASE_DATE="4 Jun 2024" SHLIB_VERSION=3 diff --git a/crypto/openssl/apps/lib/s_cb.c b/crypto/openssl/apps/lib/s_cb.c index f2ddd94c3de4..7881c1667626 100644 --- a/crypto/openssl/apps/lib/s_cb.c +++ b/crypto/openssl/apps/lib/s_cb.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -1318,7 +1318,8 @@ int ssl_load_stores(SSL_CTX *ctx, if (vfyCAstore != NULL && !X509_STORE_load_store(vfy, vfyCAstore)) goto err; add_crls_store(vfy, crls); - SSL_CTX_set1_verify_cert_store(ctx, vfy); + if (SSL_CTX_set1_verify_cert_store(ctx, vfy) == 0) + goto err; if (crl_download) store_setup_crl_download(vfy); } @@ -1332,7 +1333,8 @@ int ssl_load_stores(SSL_CTX *ctx, goto err; if (chCAstore != NULL && !X509_STORE_load_store(ch, chCAstore)) goto err; - SSL_CTX_set1_chain_cert_store(ctx, ch); + if (SSL_CTX_set1_chain_cert_store(ctx, ch) == 0) + goto err; } rv = 1; err: diff --git a/crypto/openssl/apps/list.c b/crypto/openssl/apps/list.c index 0fcbcbb083cb..7d3136a8a161 100644 --- a/crypto/openssl/apps/list.c +++ b/crypto/openssl/apps/list.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -1230,6 +1230,7 @@ static void list_provider_info(void) } if (OSSL_PROVIDER_do_all(NULL, &collect_providers, providers) != 1) { + sk_OSSL_PROVIDER_free(providers); BIO_printf(bio_err, "ERROR: Memory allocation\n"); return; } diff --git a/crypto/openssl/apps/ocsp.c b/crypto/openssl/apps/ocsp.c index 821e224c6ce4..fb3105da5526 100644 --- a/crypto/openssl/apps/ocsp.c +++ b/crypto/openssl/apps/ocsp.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -11,7 +11,7 @@ #ifdef OPENSSL_SYS_VMS /* So fd_set and friends get properly defined on OpenVMS */ -# define _XOPEN_SOURCE_EXTENDED +# define _XOPEN_SOURCE_EXTENDED 1 #endif #include diff --git a/crypto/openssl/apps/pkcs12.c b/crypto/openssl/apps/pkcs12.c index b442d358f8b7..ab78903ee9cd 100644 --- a/crypto/openssl/apps/pkcs12.c +++ b/crypto/openssl/apps/pkcs12.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -712,9 +712,6 @@ int pkcs12_main(int argc, char **argv) in = bio_open_default(infile, 'r', FORMAT_PKCS12); if (in == NULL) goto end; - out = bio_open_owner(outfile, FORMAT_PEM, private); - if (out == NULL) - goto end; p12 = PKCS12_init_ex(NID_pkcs7_data, app_get0_libctx(), app_get0_propq()); if (p12 == NULL) { @@ -814,6 +811,11 @@ int pkcs12_main(int argc, char **argv) dump: assert(private); + + out = bio_open_owner(outfile, FORMAT_PEM, private); + if (out == NULL) + goto end; + if (!dump_certs_keys_p12(out, p12, cpass, -1, options, passout, enc)) { BIO_printf(bio_err, "Error outputting keys and certificates\n"); ERR_print_errors(bio_err); @@ -855,7 +857,11 @@ int dump_certs_keys_p12(BIO *out, const PKCS12 *p12, const char *pass, } else if (bagnid == NID_pkcs7_encrypted) { if (options & INFO) { BIO_printf(bio_err, "PKCS7 Encrypted data: "); - alg_print(p7->d.encrypted->enc_data->algorithm); + if (p7->d.encrypted == NULL) { + BIO_printf(bio_err, "\n"); + } else { + alg_print(p7->d.encrypted->enc_data->algorithm); + } } bags = PKCS12_unpack_p7encdata(p7, pass, passlen); } else { diff --git a/crypto/openssl/apps/req.c b/crypto/openssl/apps/req.c index c7d4c7822cda..2fc53d4bfcfa 100644 --- a/crypto/openssl/apps/req.c +++ b/crypto/openssl/apps/req.c @@ -569,7 +569,7 @@ int req_main(int argc, char **argv) X509V3_CTX ctx; X509V3_set_ctx_test(&ctx); - X509V3_set_nconf(&ctx, addext_conf); + X509V3_set_nconf(&ctx, req_conf); if (!X509V3_EXT_add_nconf(addext_conf, &ctx, "default", NULL)) { BIO_printf(bio_err, "Error checking extensions defined using -addext\n"); goto end; diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c index 1113d775b8ab..d8e2c70e6128 100644 --- a/crypto/openssl/apps/speed.c +++ b/crypto/openssl/apps/speed.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -727,8 +727,12 @@ static int EVP_Update_loop(void *args) unsigned char *buf = tempargs->buf; EVP_CIPHER_CTX *ctx = tempargs->ctx; int outl, count, rc; + unsigned char faketag[16] = { 0xcc }; if (decrypt) { + if (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER) { + (void)EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(faketag), faketag); + } for (count = 0; COND(c[D_EVP][testnum]); count++) { rc = EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); if (rc != 1) { diff --git a/crypto/openssl/apps/ts.c b/crypto/openssl/apps/ts.c index 57292e187cd2..01b73f380428 100644 --- a/crypto/openssl/apps/ts.c +++ b/crypto/openssl/apps/ts.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -535,15 +535,18 @@ static int create_digest(BIO *input, const char *digest, const EVP_MD *md, *md_value = OPENSSL_hexstr2buf(digest, &digest_len); if (*md_value == NULL || md_value_len != digest_len) { - OPENSSL_free(*md_value); - *md_value = NULL; BIO_printf(bio_err, "bad digest, %d bytes " "must be specified\n", md_value_len); - return 0; + goto err; } } rv = md_value_len; err: + if (rv <= 0) { + OPENSSL_free(*md_value); + *md_value = NULL; + rv = 0; + } EVP_MD_CTX_free(md_ctx); return rv; } diff --git a/crypto/openssl/crypto/aes/build.info b/crypto/openssl/crypto/aes/build.info index b250903fa6e2..271015e35e1b 100644 --- a/crypto/openssl/crypto/aes/build.info +++ b/crypto/openssl/crypto/aes/build.info @@ -76,7 +76,7 @@ DEFINE[../../providers/libdefault.a]=$AESDEF # already gets everything that the static libcrypto.a has, and doesn't need it # added again. IF[{- !$disabled{module} && !$disabled{shared} -}] - DEFINE[../providers/liblegacy.a]=$AESDEF + DEFINE[../../providers/liblegacy.a]=$AESDEF ENDIF GENERATE[aes-ia64.s]=asm/aes-ia64.S diff --git a/crypto/openssl/crypto/bio/bio_lib.c b/crypto/openssl/crypto/bio/bio_lib.c index c86b9ac198ca..245a75afa1b8 100644 --- a/crypto/openssl/crypto/bio/bio_lib.c +++ b/crypto/openssl/crypto/bio/bio_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -869,8 +869,12 @@ static int bio_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds) return 1; #ifndef OPENSSL_NO_SOCK - if (BIO_get_fd(bio, &fd) > 0 && fd < FD_SETSIZE) - return BIO_socket_wait(fd, BIO_should_read(bio), max_time); + if (BIO_get_fd(bio, &fd) > 0) { + int ret = BIO_socket_wait(fd, BIO_should_read(bio), max_time); + + if (ret != -1) + return ret; + } #endif /* fall back to polling since no sockets are available */ diff --git a/crypto/openssl/crypto/bio/bio_sock.c b/crypto/openssl/crypto/bio/bio_sock.c index 476cbcc5cef1..12e6a68e3a25 100644 --- a/crypto/openssl/crypto/bio/bio_sock.c +++ b/crypto/openssl/crypto/bio/bio_sock.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -396,7 +396,11 @@ int BIO_socket_wait(int fd, int for_read, time_t max_time) struct timeval tv; time_t now; +#ifdef _WIN32 + if ((SOCKET)fd == INVALID_SOCKET) +#else if (fd < 0 || fd >= FD_SETSIZE) +#endif return -1; if (max_time == 0) return 1; diff --git a/crypto/openssl/crypto/bn/bn_lib.c b/crypto/openssl/crypto/bn/bn_lib.c index cf1bfe8ab085..9677a603cb2d 100644 --- a/crypto/openssl/crypto/bn/bn_lib.c +++ b/crypto/openssl/crypto/bn/bn_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -618,14 +618,29 @@ int BN_ucmp(const BIGNUM *a, const BIGNUM *b) int i; BN_ULONG t1, t2, *ap, *bp; + ap = a->d; + bp = b->d; + + if (BN_get_flags(a, BN_FLG_CONSTTIME) + && a->top == b->top) { + int res = 0; + + for (i = 0; i < b->top; i++) { + res = constant_time_select_int(constant_time_lt_bn(ap[i], bp[i]), + -1, res); + res = constant_time_select_int(constant_time_lt_bn(bp[i], ap[i]), + 1, res); + } + return res; + } + bn_check_top(a); bn_check_top(b); i = a->top - b->top; if (i != 0) return i; - ap = a->d; - bp = b->d; + for (i = a->top - 1; i >= 0; i--) { t1 = ap[i]; t2 = bp[i]; @@ -737,11 +752,10 @@ int BN_is_bit_set(const BIGNUM *a, int n) return (int)(((a->d[i]) >> j) & ((BN_ULONG)1)); } -int BN_mask_bits(BIGNUM *a, int n) +int ossl_bn_mask_bits_fixed_top(BIGNUM *a, int n) { int b, w; - bn_check_top(a); if (n < 0) return 0; @@ -755,10 +769,21 @@ int BN_mask_bits(BIGNUM *a, int n) a->top = w + 1; a->d[w] &= ~(BN_MASK2 << b); } - bn_correct_top(a); + a->flags |= BN_FLG_FIXED_TOP; return 1; } +int BN_mask_bits(BIGNUM *a, int n) +{ + int ret; + + bn_check_top(a); + ret = ossl_bn_mask_bits_fixed_top(a, n); + if (ret) + bn_correct_top(a); + return ret; +} + void BN_set_negative(BIGNUM *a, int b) { if (b && !BN_is_zero(a)) @@ -935,6 +960,22 @@ int BN_is_word(const BIGNUM *a, const BN_ULONG w) return BN_abs_is_word(a, w) && (!w || !a->neg); } +int ossl_bn_is_word_fixed_top(const BIGNUM *a, BN_ULONG w) +{ + int res, i; + const BN_ULONG *ap = a->d; + + if (a->neg || a->top == 0) + return 0; + + res = constant_time_select_int(constant_time_eq_bn(ap[0], w), 1, 0); + + for (i = 1; i < a->top; i++) + res = constant_time_select_int(constant_time_is_zero_bn(ap[i]), + res, 0); + return res; +} + int BN_is_odd(const BIGNUM *a) { return (a->top > 0) && (a->d[0] & 1); diff --git a/crypto/openssl/crypto/bn/bn_rand.c b/crypto/openssl/crypto/bn/bn_rand.c index 2ca426ff76ed..ba0970b1f87d 100644 --- a/crypto/openssl/crypto/bn/bn_rand.c +++ b/crypto/openssl/crypto/bn/bn_rand.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -186,8 +186,8 @@ static int bnrand_range(BNRAND_FLAG flag, BIGNUM *r, const BIGNUM *range, } else { do { /* range = 11..._2 or range = 101..._2 */ - if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY, 0, - ctx)) + if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY, + strength, ctx)) return 0; if (!--count) { @@ -240,17 +240,63 @@ int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range) # endif #endif +int ossl_bn_priv_rand_range_fixed_top(BIGNUM *r, const BIGNUM *range, + unsigned int strength, BN_CTX *ctx) +{ + int n; + int count = 100; + + if (r == NULL) { + ERR_raise(ERR_LIB_BN, ERR_R_PASSED_NULL_PARAMETER); + return 0; + } + + if (range->neg || BN_is_zero(range)) { + ERR_raise(ERR_LIB_BN, BN_R_INVALID_RANGE); + return 0; + } + + n = BN_num_bits(range); /* n > 0 */ + + /* BN_is_bit_set(range, n - 1) always holds */ + + if (n == 1) { + BN_zero(r); + } else { + BN_set_flags(r, BN_FLG_CONSTTIME); + do { + if (!bnrand(PRIVATE, r, n + 1, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY, + strength, ctx)) + return 0; + + if (!--count) { + ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_ITERATIONS); + return 0; + } + ossl_bn_mask_bits_fixed_top(r, n); + } + while (BN_ucmp(r, range) >= 0); +#ifdef BN_DEBUG + /* With BN_DEBUG on a fixed top number cannot be returned */ + bn_correct_top(r); +#endif + } + + return 1; +} + /* - * BN_generate_dsa_nonce generates a random number 0 <= out < range. Unlike - * BN_rand_range, it also includes the contents of |priv| and |message| in - * the generation so that an RNG failure isn't fatal as long as |priv| + * ossl_bn_gen_dsa_nonce_fixed_top generates a random number 0 <= out < range. + * Unlike BN_rand_range, it also includes the contents of |priv| and |message| + * in the generation so that an RNG failure isn't fatal as long as |priv| * remains secret. This is intended for use in DSA and ECDSA where an RNG * weakness leads directly to private key exposure unless this function is * used. */ -int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range, - const BIGNUM *priv, const unsigned char *message, - size_t message_len, BN_CTX *ctx) +int ossl_bn_gen_dsa_nonce_fixed_top(BIGNUM *out, const BIGNUM *range, + const BIGNUM *priv, + const unsigned char *message, + size_t message_len, BN_CTX *ctx) { EVP_MD_CTX *mdctx = EVP_MD_CTX_new(); /* @@ -260,20 +306,24 @@ int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range, unsigned char random_bytes[64]; unsigned char digest[SHA512_DIGEST_LENGTH]; unsigned done, todo; - /* We generate |range|+8 bytes of random output. */ - const unsigned num_k_bytes = BN_num_bytes(range) + 8; + /* We generate |range|+1 bytes of random output. */ + const unsigned num_k_bytes = BN_num_bytes(range) + 1; unsigned char private_bytes[96]; unsigned char *k_bytes = NULL; + const int max_n = 64; /* Pr(failure to generate) < 2^max_n */ + int n; int ret = 0; EVP_MD *md = NULL; OSSL_LIB_CTX *libctx = ossl_bn_get_libctx(ctx); if (mdctx == NULL) - goto err; + goto end; k_bytes = OPENSSL_malloc(num_k_bytes); if (k_bytes == NULL) - goto err; + goto end; + /* Ensure top byte is set to avoid non-constant time in bin2bn */ + k_bytes[0] = 0xff; /* We copy |priv| into a local buffer to avoid exposing its length. */ if (BN_bn2binpad(priv, private_bytes, sizeof(private_bytes)) < 0) { @@ -283,41 +333,60 @@ int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range, * length of the private key. */ ERR_raise(ERR_LIB_BN, BN_R_PRIVATE_KEY_TOO_LARGE); - goto err; + goto end; } md = EVP_MD_fetch(libctx, "SHA512", NULL); if (md == NULL) { ERR_raise(ERR_LIB_BN, BN_R_NO_SUITABLE_DIGEST); - goto err; - } - for (done = 0; done < num_k_bytes;) { - if (RAND_priv_bytes_ex(libctx, random_bytes, sizeof(random_bytes), 0) <= 0) - goto err; - - if (!EVP_DigestInit_ex(mdctx, md, NULL) - || !EVP_DigestUpdate(mdctx, &done, sizeof(done)) - || !EVP_DigestUpdate(mdctx, private_bytes, - sizeof(private_bytes)) - || !EVP_DigestUpdate(mdctx, message, message_len) - || !EVP_DigestUpdate(mdctx, random_bytes, sizeof(random_bytes)) - || !EVP_DigestFinal_ex(mdctx, digest, NULL)) - goto err; - - todo = num_k_bytes - done; - if (todo > SHA512_DIGEST_LENGTH) - todo = SHA512_DIGEST_LENGTH; - memcpy(k_bytes + done, digest, todo); - done += todo; + goto end; } + for (n = 0; n < max_n; n++) { + unsigned char i = 0; *** 5529 LINES SKIPPED *** From nobody Sat Jun 29 20:29:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WBP6f1jm8z5Pjqq; Sat, 29 Jun 2024 20:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WBP6d5PY7z4GF7; Sat, 29 Jun 2024 20:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719692969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4s4liQpeD1Pwu+9i37h07UcB2fl1HZIHzHUGJBsuvmc=; b=kt7QJFMP7zFAbjrJBcmOngJmKet9O+B+wx+2FuOki/qty+gU4QLQJXT7FL1Bo5rynq153U qldrlZ0tMJ3YMg3q6BI+btmWZaHnOGAHXJBbjSIZSMF1H8sVwilvElJkff+r1rz6Jea1xt KTKmcb9YkVEAdGLP24x7FG4aX4mISWynLhQebRvwxaYWUDGSalLZXvQOFgr6Nb/eKnUc6A Th4I4ZUzG0l+9RqKT1fYT1C1Hw/JBGpjBVOjhPjIyXbxSf0HUv6ZzTlt4M6I8beKa+/0cA LBcdKogu68sQYYqjPU3UR+AZpnyR84HbLCKVe0NbKq5lHY1lW0kvoAlAXln9tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719692969; a=rsa-sha256; cv=none; b=c1GhyeMs248ZpFQ2gr7sekXocbSSwwux4WVll86UTtMD7xM7lt5LPU6IyUzpORik66H97t 7m6nI6KKEz3J+k/ZEHXXeHmIjQSVjt5LGwqUsUkMUWX7Je3Ne/3bEWdSuxX9gMeLpGL4N8 cMnd9D+Tb9e0QS5v4k2OjesYgz5CAcBmNSh7y+z3v5P1VntGBPzf04I31rtiBj9lwV5MSV 4wnDt7H9bwW8ave0fkmW0qABWF6dRWRZkKw1RORql1DMzAodCrqzXjCEA5XsWc4bklKfTD Pz05zXA+u3ZUVLONKHJmhXYuMrPvNPWWbCP2397hmDSD1sb7hfQjtNuTf3Tywg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719692969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4s4liQpeD1Pwu+9i37h07UcB2fl1HZIHzHUGJBsuvmc=; b=jtHAIW9MRIlGafiUtwjxXsvbpo0SGxZnwPFnJPaoU8cwNqFU6YajSWQUnnRokEepK+EoRE ZyFeRjqmFJfPstaiNsAOg0G97JH8J1kU+umyWwidCbsv859KzlF/8oEQEGKXOm9PigZK4a HIBboLq70y5H83i+XS898W8KIVf0akGbiyxKnX8aF9XeuyIiyuDfXF2XTorJcVFYX0iv7n gxN6nNu96W+tg0Zgvq4TMOo65TYExgWBBAfi381N0qimKcY2XA6dUC2i9EXRNBTpYiLnEH O22h0X1EPdmj3cs1Z19MQzreMs9cteYcrw0hZnWmtdTEtmqFuRtW5ToKD30iSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WBP6d3npyzsvY; Sat, 29 Jun 2024 20:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 45TKTTOt034267; Sat, 29 Jun 2024 20:29:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 45TKTTU8034264; Sat, 29 Jun 2024 20:29:29 GMT (envelope-from git) Date: Sat, 29 Jun 2024 20:29:29 GMT Message-Id: <202406292029.45TKTTU8034264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: dd43e907c7c0 - stable/14 - Update config/build info for OpenSSL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dd43e907c7c0caec8867e42fa1fcfea4ac4c87f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=dd43e907c7c0caec8867e42fa1fcfea4ac4c87f6 commit dd43e907c7c0caec8867e42fa1fcfea4ac4c87f6 Author: Enji Cooper AuthorDate: 2024-06-26 23:41:47 +0000 Commit: Enji Cooper CommitDate: 2024-06-29 20:29:19 +0000 Update config/build info for OpenSSL This is a companion commit to the OpenSSL 3.0.14 update. MFC after: 3 days MFC with: 44096ebd22ddd0081a357011714eff8963614b65 (cherry picked from commit 303596eac3f5a7fed63f1084028d811919d37eaf) --- crypto/openssl/include/openssl/opensslv.h | 10 +++++----- secure/lib/libcrypto/Makefile.inc | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crypto/openssl/include/openssl/opensslv.h b/crypto/openssl/include/openssl/opensslv.h index 012d77ee8bd0..537144b32e97 100644 --- a/crypto/openssl/include/openssl/opensslv.h +++ b/crypto/openssl/include/openssl/opensslv.h @@ -29,7 +29,7 @@ extern "C" { */ # define OPENSSL_VERSION_MAJOR 3 # define OPENSSL_VERSION_MINOR 0 -# define OPENSSL_VERSION_PATCH 13 +# define OPENSSL_VERSION_PATCH 14 /* * Additional version information @@ -74,21 +74,21 @@ extern "C" { * longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and * OPENSSL_VERSION_BUILD_METADATA_STR appended. */ -# define OPENSSL_VERSION_STR "3.0.13" -# define OPENSSL_FULL_VERSION_STR "3.0.13" +# define OPENSSL_VERSION_STR "3.0.14" +# define OPENSSL_FULL_VERSION_STR "3.0.14" /* * SECTION 3: ADDITIONAL METADATA * * These strings are defined separately to allow them to be parsable. */ -# define OPENSSL_RELEASE_DATE "30 Jan 2024" +# define OPENSSL_RELEASE_DATE "4 Jun 2024" /* * SECTION 4: BACKWARD COMPATIBILITY */ -# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.13 30 Jan 2024" +# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.14 4 Jun 2024" /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ # ifdef OPENSSL_VERSION_PRE_RELEASE diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index de24bfb1038a..d95f08e27256 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -2,8 +2,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 3.0.13 -OPENSSL_DATE= 2024-02-02 +OPENSSL_VER= 3.0.14 +OPENSSL_DATE= 2024-06-04 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc From nobody Sun Jun 30 05:30:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WBd6y6CNWz5NmS3; Sun, 30 Jun 2024 05:30: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WBd6y5jjxz47XC; Sun, 30 Jun 2024 05:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719725434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9RAkCbKc7Ygoyw5DZlCYhkPH5rQkXhywS0KqbDTRGcM=; b=sAFMMQEZMq4Gd1sWhVxnL/a5YOT8rATL57LRSji7Pqjf9njdvj09CjQ0M8ilngXURLVmD3 RHYvqeyehOWLknUSEIBpHft6CQrMWGh4cGYsw5l6EJaC66Xyujqi+cAyNxT0RQ5hccvj7l qq9nJ7RuSAWxcGX192I36TJw/hs8GANCaNOTzS7sUXYkXISVa95qg1euayJjUhQXo+ocXB ICTfROgE9fW5Rjokcsy0tVZp/Ac7jZfqlVAlF+NmvYQu5f0P6UqEWEjQ6Wqe3Ra/14tdWh 4TWWnCQ+eTAp/z+v2J2WOCZRvyWyRxWvyiXjXfhC1st0FQTbvrTo5OoOc33gsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719725434; a=rsa-sha256; cv=none; b=fVn0MPtk4+7HAx1uUxQ/ZBJllU9Ey0Bm2VfjO3lwrsCvg3POSn2chAvPI+Crxt1wvystRK K7Ucxr9zdAq3J/nxx2Q5mOi5+R1lhmzfoCdS1hICfs5B53p3Nm8M0Bi1RuAZ/A0Dgal+u2 9YG8pEJZr3qbW6rm3r6xwhNvxNZOI+5/yo3az5KSK8uOiMvMJfxklMHkLnwuqA2vCyS7Dl GDXEz3obUW674qZfuh/m1o2WWSLgVAqvc+9Lr0UqPbCzHNuXGnt1kichfhWFAdQIkLLVz8 kK3wPJ6yEA6eJ8YsCZ7a8Nt8rxOPXgKvu0SfZe/qnHGJrI/Pm82tTEKIkzWr9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719725434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9RAkCbKc7Ygoyw5DZlCYhkPH5rQkXhywS0KqbDTRGcM=; b=K1iNpfUWyG/RnvWnbETRw6QB3hiO9DeJ+c42Gwzre2go95WHau4XX8mLM5/RjCbbwRnCHs gG7j4uCMtugVB/dm0CLaqQlO9uRrzNlOFUqrvrbgKB7Y1o9ZdEKi+QO0Ovolpe7J3T/Cv3 WkT1fx0GkX7MwblJgOVhbq3G5i+c/wUwc0B8JK/rN5/19TediaeVH743nm8MW8d63hh59m uys3kfu6OT0FB5v2FVQk9R47786bpFCyh+J3Oq2vtrcU7QuiYWHcntgtlHa49UAelB20/f 9k50yPSbobD6EvAG36sH0BHyOQpjylhotr5fllqsMIE2cGCdrIh47Or5DB/AaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WBd6y5Jbgz18ST; Sun, 30 Jun 2024 05:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 45U5UYed054460; Sun, 30 Jun 2024 05:30:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 45U5UYAC054457; Sun, 30 Jun 2024 05:30:34 GMT (envelope-from git) Date: Sun, 30 Jun 2024 05:30:34 GMT Message-Id: <202406300530.45U5UYAC054457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 939f5a7b2bfb - stable/14 - erf.3: Add a STANDARDS section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 939f5a7b2bfbd7ba3b23ddc691e12e8a332623f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=939f5a7b2bfbd7ba3b23ddc691e12e8a332623f4 commit 939f5a7b2bfbd7ba3b23ddc691e12e8a332623f4 Author: Gordon Bergling AuthorDate: 2024-06-23 10:50:47 +0000 Commit: Gordon Bergling CommitDate: 2024-06-30 05:29:47 +0000 erf.3: Add a STANDARDS section Add a STANDARDS section for the erf(3) manual page. PR: 273413 Reviewed by: pauamma_gundo.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44140 (cherry picked from commit 16c3d7e1fa150ee136b910448cf431e8deab5293) --- lib/msun/man/erf.3 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/msun/man/erf.3 b/lib/msun/man/erf.3 index e0771863cca1..8d66017ed11c 100644 --- a/lib/msun/man/erf.3 +++ b/lib/msun/man/erf.3 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)erf.3 6.4 (Berkeley) 4/20/91 -.\" -.Dd July 13, 2014 +.Dd June 23, 2024 .Dt ERF 3 .Os .Sh NAME @@ -88,6 +86,17 @@ subtracts the result of the error function from 1.0. .Sh SEE ALSO .Xr math 3 +.Sh STANDARDS +The +.Fn erf , +.Fn erff , +.Fn erfl , +.Fn erfc , +.Fn erfcf +and +.Fn erfcl +functions conform to +.St -isoC-99 . .Sh HISTORY The .Fn erf From nobody Sun Jun 30 05:32:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WBd8j1bZKz5NmVq; Sun, 30 Jun 2024 05:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WBd8j17pFz49Wb; Sun, 30 Jun 2024 05:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719725525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EEMWa8WD6lu7RViClrdXZkTDr/1TB9zW6bDWTRVyyRM=; b=l2oBagiKwz/1VJUvs44S83g3YfIw5yjPeuJR893AeZ0ordC0SrjnkjASo1Ax4T5vLnxgxd rTBC5cK62D56905jZpg2vxYdix0TkEJUJUV76zAAAoUKincO1ZvjozxXZbatUg2+GqMMzj z03IIkepqBiOnsMgOuhUFt5jVaDoMwxdQNvw3i0kDjRO3yotseKr/HZKV/+xkS31DZJzZu 9l39NiaznBv7blPveDhPln8/y0cNmcmscVXSuedOR5IGu6hWmQPT8Bxm0B8wMCJgHEO8+j elB5jnSfmslis5THqVyx5LNCMu8IC3uwTd1U5OWr+b/nL/zZ2WdGMjIDxPgh8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719725525; a=rsa-sha256; cv=none; b=SJZaa1L55m4Va8voNQklqcMguQznMO44hJ2OqZqkEynHH/yDmnzCWZHftVCO8BU3Kf8+w5 d99g3mSnpOIkoy8JMJx/zhLEzkx+pOFkybG79gHaQ4QUUQhfptzU9vLnOcTXdoK8i54qqg uirzxFZTpEyCPrwsqYzUPkMvzJ04fpjskhaf2x+C55vxcUbxrQYYuSjMQjs4qhR7EWo0oO MJfzmJvoIt/c9UhRYtNA9urhYzLdcVqEiz5V/nMJfR411WO+vPFDfYF+CeeB9g3xZDEAIR BXBW5Yi2OJjvvxs6WSslR8JyEVjBuHy7DNAOesfPsGMcuIc16Cy3X9eMmPyZbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719725525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EEMWa8WD6lu7RViClrdXZkTDr/1TB9zW6bDWTRVyyRM=; b=sxLtvzncOhrzbmtU66vYLNhGR1eRif+UTFmWDMvul5pEfAX+izVM/jWmhIdCFZacZA693i SjBmjjhSKp2Pd3M07uhZv+6VPKpW+9b/4YU8jVDsA1VO5teg590kM4VY500hpSonPX7EOe ncmOTafMOdTimZVqdTlryDBPMyMlRR8D+c0DB6l0JZ8/zEyx2a4Sn5xdrGGtxN0Zu40HV5 UUBbQcats/Uurgt94yner22Kzs2Q0rQrrRMN2ijgfNJtPS2uajK/TWDndlACj/MwC4o4my aRecqKMBUn+js/1PqP8u1ir+HyvDpOB/rpEgaWLZiRsTW8ZtjJKYYpSRSVMtAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WBd8j0l6Yz18T8; Sun, 30 Jun 2024 05:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 45U5W5Ih061259; Sun, 30 Jun 2024 05:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 45U5W5j3061256; Sun, 30 Jun 2024 05:32:05 GMT (envelope-from git) Date: Sun, 30 Jun 2024 05:32:05 GMT Message-Id: <202406300532.45U5W5j3061256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 9242934b6fbf - stable/13 - erf.3: Add a STANDARDS section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9242934b6fbf00fc5cb1f161c0c7d60a3ba3ec4d Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=9242934b6fbf00fc5cb1f161c0c7d60a3ba3ec4d commit 9242934b6fbf00fc5cb1f161c0c7d60a3ba3ec4d Author: Gordon Bergling AuthorDate: 2024-06-23 10:50:47 +0000 Commit: Gordon Bergling CommitDate: 2024-06-30 05:31:52 +0000 erf.3: Add a STANDARDS section Add a STANDARDS section for the erf(3) manual page. PR: 273413 Reviewed by: pauamma_gundo.com Differential Revision: https://reviews.freebsd.org/D44140 (cherry picked from commit 16c3d7e1fa150ee136b910448cf431e8deab5293) --- lib/msun/man/erf.3 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/msun/man/erf.3 b/lib/msun/man/erf.3 index e0771863cca1..8d66017ed11c 100644 --- a/lib/msun/man/erf.3 +++ b/lib/msun/man/erf.3 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)erf.3 6.4 (Berkeley) 4/20/91 -.\" -.Dd July 13, 2014 +.Dd June 23, 2024 .Dt ERF 3 .Os .Sh NAME @@ -88,6 +86,17 @@ subtracts the result of the error function from 1.0. .Sh SEE ALSO .Xr math 3 +.Sh STANDARDS +The +.Fn erf , +.Fn erff , +.Fn erfl , +.Fn erfc , +.Fn erfcf +and +.Fn erfcl +functions conform to +.St -isoC-99 . .Sh HISTORY The .Fn erf From nobody Sun Jun 30 09:34:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WBkX628TCz5PGZj; Sun, 30 Jun 2024 09:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WBkX61dgwz4W73; Sun, 30 Jun 2024 09:34:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719740054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CAwHDsSNOVVXhQc91a2NFQMoqohjC+ms5FG6zGuwgyE=; b=JCPoPByrkdEZVKEBdcWcI1hc7Wzhlm0DHhKL1jSzoUxrnnsfpMfOFs343Wv58EdbT2Dcxb ANI1hxy9iEhoMFzKDazUzr4J45JPVjb0yRPaCSbj0lATm5iYXERQbUjADOo7/kQ4oaSwGV MJetV8fiNrizV83lBO/SlUv8FIbTjCjnVYhAgll6ggTfGG4X4jntELk71WO/mk7+YyItn0 1wDSjns3ptfTOuw+QezdkvXp1AlYe4/+st/R6lBH2Eohtgft0zxk1XQqaL4D926oZg/NAj Ew7LuhiYcRMBk7jBnkETwyA0luAYAZWWob70dTEkylkmL5Tun9OH/vDZuKTP3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719740054; a=rsa-sha256; cv=none; b=XkFygKaKAL5ooNfthNWTVVKYwpW5ArNCU+zpMRoDeQ6RzETLaSE+ji4FiGVh5OYWKqEGv3 W6f59b82HtrBqTzogNdPJL5AoJy/rUimh8gisSBZ+gDRJNP+gzHA0c9zgBia7VuIXurO+a 8zmdaCpCM77J7wI4GpQcOt4TL7oIJpA+UaIANAgSPgK2vH82d8HVaB/kQqesIVdEQrrS07 5jahb+KTKrkB4IWf+59urS8CM/yADdFXQ9VlpGHRJjNutnlI8R58ixfb09wZtLuxsa9p8r Z2vGHbrF0FG/EXAU9zffYHX1QSdx/k+UH3PIyUZ4VfnKORfM4zmQKxgcHvjh4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719740054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CAwHDsSNOVVXhQc91a2NFQMoqohjC+ms5FG6zGuwgyE=; b=cITzq1NnL3sD9SsaIuS1prBbLCiTpA3a3METpNRUVoceG7VP0BuXcxt1iK7xrjavI8My6O OioQAtRt/uwhVLC7EdEHKBJi7oNuReeiawMv6xauatRWSSgXDhLmgDcsoERdP7H/u/7O6Y 9wWYkFEGjAL0HskiObZR2uepWh9sHNyfHr1lwsBjO3WqHiJpeocPdC0EyZqeRUyw9oPGQa vhCMyr33CvAP+udS07D6VXIkNbYcUPSBGY5KBNsgsN4HhOAkIZGXgdWQnMJYBDF4BTVSi4 4nP7TXubJnx58yQ0kpYmOz1yPQaOGiWch5D4rwjOzA2NaYCgWSNkWq5Wxdb9Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WBkX61DtnzH0x; Sun, 30 Jun 2024 09:34:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 45U9YEr0067018; Sun, 30 Jun 2024 09:34:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 45U9YEYM067015; Sun, 30 Jun 2024 09:34:14 GMT (envelope-from git) Date: Sun, 30 Jun 2024 09:34:14 GMT Message-Id: <202406300934.45U9YEYM067015@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: 4ca4a3b1c8e3 - main - enc.4: Remove a redundant word List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4ca4a3b1c8e33cafcd9462e2d068246153846d57 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=4ca4a3b1c8e33cafcd9462e2d068246153846d57 commit 4ca4a3b1c8e33cafcd9462e2d068246153846d57 Author: Igor Ostapenko AuthorDate: 2024-06-30 09:27:05 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-30 09:27:05 +0000 enc.4: Remove a redundant word Reviewed by: zlei MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45706 --- share/man/man4/enc.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/enc.4 b/share/man/man4/enc.4 index 87ff46878266..86f14d2bf290 100644 --- a/share/man/man4/enc.4 +++ b/share/man/man4/enc.4 @@ -126,7 +126,7 @@ The special value 0x4 can be configured in the .Ar ipsec_bpf_mask and packets will be also captured after firewall processing. .Sh EXAMPLES -To see the packets the processed via +To see the packets processed via .Xr ipsec 4 , adjust the .Xr sysctl 8 From nobody Sun Jun 30 09:46:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WBknj6P79z5PJ82; Sun, 30 Jun 2024 09:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WBknj59hjz4X8k; Sun, 30 Jun 2024 09:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719740761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xuo56QFMXIP1mTu50DlGZ213s4gn7K1fyZZ2VV9o/hQ=; b=c1UJFIVj3zB6Xk5wM6OwzID9YBxwZYxTY1T48GbAclBzn34gJanMLoCVRJCSU0ELImKSl8 EvXvK44b3MUx/SrJnbikAO+d5XXtnYLHACqXnEHSFxXKB/sQ8Fga9IJeMm3n9/W0ZRVUqt CzG3zu1RcJ21GKktEo/5uaUVXlOlMz9uIZ5YRIM9kH9ZmwGLBJVloFjCY+i90ZFUDNRIwm EsmlcIC1A6T2SvJVMpnJar+omS5BOeCw2IsbnzGScFIxgmt2L2PHfB+pcvaCDT1Rds87ma T7rjgSlBfmIfTfolmXRg+wSGLjSEiENXSlcQhp0G15ydBCBwRxtHLjSWIPZuRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719740761; a=rsa-sha256; cv=none; b=p6y/aZ9OXx0j2AWokjx8lDxnvMltCz4xq6PzXxa5uRBIgdRKYM5lCOyOm0FgOUWP4CKccN A+mqnShYtpc513pFPrOcqU/Jis7abNDJT+DSKU78UL0MvTpHLm7MY/AD11tEBoy5doWYzj sOHs8F2nhqKC/Q9LSdLWpaJMIU/1DFzKiqsZTAxQjV6RbQtZqXiV6CuiQfHPUIU3HPkh24 KbdAuoxiw6Dcv4mqCUrSZDQVbKytRQqifcvSyrSbbKInrvNi+9P+H+RezVtIh4chOuZe/t uQn2rk5QD2RANheWkS+dtUffYRenRn/QmUauvWT9ZHDiV4YEG2Wco4LuptoxHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719740761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xuo56QFMXIP1mTu50DlGZ213s4gn7K1fyZZ2VV9o/hQ=; b=vfndi+6utqhQOqx1HIPsLalAXOAB9+lyKpM9FPbs7pWPxwQqqPx1IVTCpwLClJthNL8SyS XoWEKiJMPpT3kdrWEFMGjHELzvioKvMPkCV3LNu7w14RUoAwmGA47o1jHorCs+46pJfqTL 1jqJW4JSwh6RCIdKl+Q5/AzlP03coGYFwZTuzwQy4BO0PqP9ZzBKNfS3LQgGCXv0jPK9Pm aeL5ffIp7jtC29NR33KcbRrw89lwCPKoRbdwkbNcvx/BWQ7n8HbAQlXS0u5+YYvULkeiKj RoFjxibNIYrPQo3VFR1APTUZgrTJODkem76yysrDbwfqJ/cP8xIAEc921coT4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WBknj4fxdzGFp; Sun, 30 Jun 2024 09:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 45U9k1YE083894; Sun, 30 Jun 2024 09:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 45U9k1GZ083891; Sun, 30 Jun 2024 09:46:01 GMT (envelope-from git) Date: Sun, 30 Jun 2024 09:46:01 GMT Message-Id: <202406300946.45U9k1GZ083891@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: 9738277b5c66 - main - ifnet: Remove dead 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9738277b5c662a75347efa6a58daea485d30f895 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9738277b5c662a75347efa6a58daea485d30f895 commit 9738277b5c662a75347efa6a58daea485d30f895 Author: Zhenlei Huang AuthorDate: 2024-06-30 09:44:21 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-30 09:44:21 +0000 ifnet: Remove dead code Since change [1], if_bpf will not be detached by the interface departure eventhandler and will not be NULL. Then the logic to re-attach if_bpf becomes dead and serves no purpose any more. This partially reverts commit 05fc416403ec. 1. 9ce40d321dd5 bpf: Fix incorrect cleanup Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45599 --- sys/net/if.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 98be23e564c6..ee8fe533f338 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1265,20 +1265,8 @@ finish_vnet_shutdown: static int if_vmove(struct ifnet *ifp, struct vnet *new_vnet) { -#ifdef DEV_BPF - u_int bif_dlt, bif_hdrlen; -#endif int rc; -#ifdef DEV_BPF - /* - * if_detach_internal() will call the eventhandler to notify - * interface departure. That will detach if_bpf. We need to - * safe the dlt and hdrlen so we can re-attach it later. - */ - bpf_get_bp_params(ifp->if_bpf, &bif_dlt, &bif_hdrlen); -#endif - /* * Detach from current vnet, but preserve LLADDR info, do not * mark as dead etc. so that the ifnet can be reattached later. @@ -1300,12 +1288,6 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet) */ CURVNET_SET_QUIET(new_vnet); if_attach_internal(ifp, true); - -#ifdef DEV_BPF - if (ifp->if_bpf == NULL) - bpfattach(ifp, bif_dlt, bif_hdrlen); -#endif - CURVNET_RESTORE(); return (0); } From nobody Sun Jun 30 15:55:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WBv0Z08Bxz5PyMy; Sun, 30 Jun 2024 15:55: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WBv0Y6TcTz4M7m; Sun, 30 Jun 2024 15:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719762957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUpqrJSE0fxOiQxlq4mPqlvlg+UhPRfQX+43E3wF800=; b=c9rSTrfrCRhYTky6EHKfpE+2Oq3TKJ1F2+zjeqA5CVUevf+v9zGPD/L1FjQHEHluroa2Qi sTtq45sd/zpyfd0DvKc3fQfLYm1Aux5V4MpAqZOnWSyzhJt9HELLXNUx5duR3nSSk9EHe5 lMVlJKvhqb+XMnag7/wVoJsCkktBiyEFehdPFqovkoMhusHrnUJ0bZfG5YY+A0Py5pNxAK Hhg6FnBRYgQINHjgDwE7eukY4YRMVxnlrWqfDqGiVV0ucpGo/FGsNU4ig4CS5czS5+a5ut bLGDF3Ssf4U1Jt2bis+6buv8lSa+AH0TgH0dmBXfKX8DhnV099np6/+UAXLI3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719762957; a=rsa-sha256; cv=none; b=Zl+7mAKTC9AFagWKpoEEMhGk/LBXQIrzGzDqdk+etE3Sr2ksSxDR//WBBjRSTTDEI6fG1d OaKMHAt26nIhs4SvCyLCkdlU92GcoOEiH7eGffzGnrZmPL1j48gaOUwxUvKmpciQCUaMjj w/ZhY7bn+v9x3JipXoInBOtE3Gm2C5bDsN489yUJoTY9WLz9NJ9Z1gewED5Kx5bUH7T35l e+NiS8rCcI+PcQFEvPsu2vYyMzuXmE+xWHGm99MYWw2eet0H0b5suZrwoc3YSN1JQfsKYv heXOYhA7le8L9K4p238+y26AgrA25Yo7lpMICgsqWXEar0HyVhqYFtuiQIdmrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719762957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUpqrJSE0fxOiQxlq4mPqlvlg+UhPRfQX+43E3wF800=; b=pA8lkx7LB0tICZzJkHvsGMXkdwnKvSI3Qnglpu/zGeRxYgaQxxr+AnK897iRYVqQMC7ufi yWaBXywwY/JgRWbFwy2HnyfjtsvPwezT7E8MVydPfxlKvuCGZwtZFfXFlk05vuGGdgAzyt J+kh1ywi50u+V0ENS9HRVRNQiofv94OtbZLXUG9GVJwHy9LU3scaZauRDjoG9+WPFpec07 a0MU4ydspb9zC+DdIiY2bvSxsTd1Mw65VbiQyFJD0mnELHY67AbWmkjQtC8fKFgoVnLerr XYYSq58mpvB3UO/izfsioskCY4Z4JCJXh9EpZdd8+Y31f5W2oX25IqlM1YioaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WBv0Y5gfwzSfx; Sun, 30 Jun 2024 15:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 45UFtvI1014954; Sun, 30 Jun 2024 15:55:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 45UFtv3E014951; Sun, 30 Jun 2024 15:55:57 GMT (envelope-from git) Date: Sun, 30 Jun 2024 15:55:57 GMT Message-Id: <202406301555.45UFtv3E014951@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: 4ce4a0fe14c4 - main - diff: Document the --no-dereference 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 4ce4a0fe14c455c6ec77452bc99cd93ea45737b1 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4ce4a0fe14c455c6ec77452bc99cd93ea45737b1 commit 4ce4a0fe14c455c6ec77452bc99cd93ea45737b1 Author: Dag-Erling Smørgrav AuthorDate: 2024-06-30 15:55:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-06-30 15:55:27 +0000 diff: Document the --no-dereference option. Also, --no-dereference should not imply --recurse. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D45779 --- usr.bin/diff/diff.1 | 10 +++++++++- usr.bin/diff/diff.c | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index 9bc46d07b58a..5f211372e15f 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 7, 2024 +.Dd June 29, 2024 .Dt DIFF 1 .Os .Sh NAME @@ -52,6 +52,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -rcs @@ -83,6 +84,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -110,6 +112,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -139,6 +142,7 @@ .Op Fl -ignore-space-change .Op Fl -initial-tab .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -171,6 +175,7 @@ .Op Fl -initial-tab .Op Fl -minimal .Op Fl -new-file +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -normal .Op Fl -paginate @@ -201,6 +206,7 @@ .Op Fl -ignore-blank-lines .Op Fl -ignore-case .Op Fl -minimal +.Op Fl -no-dereference .Op Fl -no-ignore-file-name-case .Op Fl -strip-trailing-cr .Op Fl -suppress-common-lines @@ -497,6 +503,8 @@ lines from FILE2 .El .It Fl -ignore-file-name-case ignore case when comparing file names +.It Fl -no-dereference +do not follow symbolic links .It Fl -no-ignore-file-name-case do not ignore case when comparing file names (default) .It Fl -normal diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index c3fe255a294d..5ca9a36505ce 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -368,7 +368,6 @@ main(int argc, char **argv) optarg); break; case OPT_NO_DEREFERENCE: - rflag = true; noderef = true; break; case OPT_VERSION: