From nobody Mon Jun 24 01:30:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7Bc43HwPz5P5c1 for ; Mon, 24 Jun 2024 15:25:24 +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 4W7Bc42BVVz4Gqk for ; Mon, 24 Jun 2024 15:25:24 +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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: 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: 4W7Bc42BVVz4Gqk ------=_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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7ByP3qVWz5P7Mp for ; Mon, 24 Jun 2024 15:41:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (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 4W7ByN6kPgz4JNC for ; Mon, 24 Jun 2024 15:41:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2c7dd4586afso3528931a91.2 for ; Mon, 24 Jun 2024 08:41:16 -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=NG3cW3G6hsW7pPT0nJdLtD4YulGQK1Gy4Rvr57bcZdRUzq6xuZI6Ju9KZANKtnWa5q 57lcF5MYE+HH1N44rGxwa4vCWKy5PY+1gwefAZGGnYzhirZi/06Ejf3NZCppJFI58RHI zTRQ64/j4Z1G4c0NYu8piN0DmcvRd5Ai4t5S2waGJMoZq3AFF1lwWMd0wfiFw8g/65h7 1xbmWMcZtXryTJzzuZC7xP7W/aZMLENJPglkXGQsN5dTvV5fY8PGltSUrChRUiBcVksO tGYDFWEXKgZRMARon0XwwbdXX6jUNKKNdDiPpBbSHmskRJfEzlPgyJqjXSkSuWJtYtaW LCjQ== X-Forwarded-Encrypted: i=1; AJvYcCXW+bFW9jvn97V1iDDXhI0PvoGTHWhdNHk5Oi0jznF/hmdO5sbvoDi2hCd1mMwHqy+YjvNaZnJTwZDh9r/+/ggXr4Dfga7DsZbqIyeG2ihqQQ== X-Gm-Message-State: AOJu0Yy21nosdGtY0UsA2zk7gGUEi+ASPAmhs/XVnKKOvLg6D9fT1Ecq v++f1KWC+IzKtZ+zcvBWiJzBZ99QaRDj++nAz5/fawNm0+lrTFy1qZ/kDIM2dGPoePigVJBXDcC zzpTZ42+Asu1CjpB8ksWjxwnSLyWJRJ/aQLF8Rs5i6Nb9WY/45ss= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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: 4W7ByN6kPgz4JNC --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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (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:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 20:49:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 21:10:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7MXq5mVXz5Pmd2 for ; Mon, 24 Jun 2024 22:08:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (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 4W7MXq3tV8z4CcS 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-x1132.google.com with SMTP id 00721157ae682-645808a3294so11459057b3.3 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=mbWOKwC4btdgLoiEbzLEhFLP08Oz61RyKNFZHZFmb7P5LYpKIzFaQJTItLKRN4ViIe isYo5TfvwbkYeNVXUpjQogw42ivzxOMgt62VkUVG0G9NEBgBZnUzoLjUEx7v99wdiG2A nxgorp2iX5Ys9vlARh7Sw5sP/ZsfVoFVBUguXJgl3C7QURxAxwXVjvRnpkeV2x/ss4Oe H/cIyx4Zzt0s0gNHfZpZnd5w5KJu3JRSNCq/inFGnKsZeUqU3T6uWlFxyRQPAPN0Pn// lgGqTLihVNe4JpEfo9meYhCat2MAiGjtZ/4kQJ6hU4H6CYgkVt00Ubu9gsZvcKJhTclF 0jzg== X-Forwarded-Encrypted: i=1; AJvYcCX0jWQmzyM29E7IHVpA+FrY11AoZjGJpIuRRORUH0Kg8O03Y6Wps6/hZYl3Uyz/rkJaKtrt2kAa9hKQdS6wgaloruVTVHKEMVs+wbJBvBpF7A== X-Gm-Message-State: AOJu0Yz6EAdlsNu0pWT/UK41NqcUyz5rZ1IxTakjdJ46SZF9ZU+aaTFQ jrfmK/b3Gvg30w79jOTssLM6oeGkqwNE84mJfsZAgfCnwZPUJ6MltUBBZ7t18Tu7I7JRDZwto0l 3QlayfhpiiBtUzp5QXPzOSDehf43gQ5SY+msmIw== 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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: 4W7MXq3tV8z4CcS --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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 05:36:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 13:15:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 01:35:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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 07:04:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@FreeBSD.org From: Andriy Gapon Subject: git: 0deaf4be346f - main - rk_i2c: emulate repeated start List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 16:24:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 19:17:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla/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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:18:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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:25:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 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 22:51:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:23:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 Sun Jun 30 09:34:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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-main@mlmmj.nyi.freebsd.org 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 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: